Floppy disk problems, again

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Khumba

Floppy disk problems, again

Post by Khumba »

Okay, I've been having problems floppy IO in my OS using INT 13h. When I use function 8 (Get Drive Parameters), it says there are 18 sectors per track, right??? But then I wrote a test bootloader that would fill the the first sector of the second track with 0xFF, it wrote it at 0x4800 on the floppy, not at 0x2400 where it should've. And I'm sure I'm using a 1.44MB floppy, I've tried different disks also.

When I write to Track 0 Sector 18 (the end of the first track), it writes to 0x2200-0x23FF (which is right), but then I go to Track 1 Sector 1 and that's when it writes at 0x4800 instead of 0x2400. I know the disk(s) only have 18 sectors per track because when I tried to write at Track 0 Sector 19, INT 13h returned with an error. Does someone know what is going on?
dave68

RE:Floppy disk problems, again

Post by dave68 »

You are forgetting about the 2 sides ! track 0 head 0 sectors 1-18 are 0x0000 - 0x23ff, track 0 head 1 sectors 1-18 are 0x2400 - 0x47ff, so track 1 head 0 sectors 1-18 are 0x4800 onwards, so your program is actually doing the right thing
Khumba

RE:Floppy disk problems, again

Post by Khumba »

Oh, tracks are bigger than heads! Thanks a ton!!!
Post Reply