Page 1 of 1

Just an other floppy crap :(

Posted: Thu Feb 08, 2007 9:39 am
by Phoenix
I'm trying to write a floppy driver, but I couldn't success yet
Would you recommend any good resource ? I have already freedos32 and linux drives, but there is very strange things happend
If I try to read boot sector
* Bochs = destroy boot sector
* QEmu = reads 000000....
* VMware = Crash ! :(

If you have time, maybe you could take a look here a part of my source, http://int6.net/fdc.rar

Best regards,

Posted: Thu Feb 08, 2007 10:35 am
by Dex
My floppy code worked fine on all real PC, but give div errors in most emulators.
When i try to find out why, it came down to a div by 0 error, as some of the BPB are not the same as the image boot sector.
eg: this would give error in emulators

Code: Select all

        mov   ax,[bpbRootEntries]
        mov   cx, 32
        mul   cx
        div   word [bpbBytesPerSector]
        mov   [RootSize],ax      	       
But this is more to do with fat12, than the floppy driver, if it's just the driver then you can look at DexOS code here: REMOVED
Or you can get more examples from bubachs site here: http://bos.asmhackers.net/docs/floppy/

Posted: Thu Feb 08, 2007 10:49 am
by Phoenix
Thanks for DexOS code, it's very clear and usefull.

Best regards.

Posted: Sat Feb 10, 2007 1:49 pm
by earlz
Dex, why don't you check that for 0 rather than just hoping it's not, I'm sure you can correct it somehow if it is 0

Posted: Sun Feb 11, 2007 10:29 am
by Dex
That what i do ;), but i was just illustrating that emulator are just a basic guide.