Just an other floppy crap :(

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
User avatar
Phoenix
Posts: 12
Joined: Sat Nov 11, 2006 5:30 pm
Contact:

Just an other floppy crap :(

Post 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,
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post 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/
Last edited by Dex on Sun Apr 22, 2007 7:14 am, edited 1 time in total.
User avatar
Phoenix
Posts: 12
Joined: Sat Nov 11, 2006 5:30 pm
Contact:

Post by Phoenix »

Thanks for DexOS code, it's very clear and usefull.

Best regards.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post 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
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

That what i do ;), but i was just illustrating that emulator are just a basic guide.
Post Reply