Floppy driver problems :(

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
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA
Contact:

Floppy driver problems :(

Post by quok »

I've been working on my floppy driver for a couple of weeks now. Reads work fine in VMware, but not Bochs or on real hardware. VMware dumps core on writes. I've only tried writes on vmware so far.

After trying to debug this for a week solid, my mind is going nuts from staring at this code and the floppy datasheets. I'm going to start on my ATA driver in an attempt to clear my head, but in the meantime I was wondering if maybe someone could spot what I'm doing wrong. I've attached the floppy header file and the C source as well.

Thanks!
Attachments
floppy.c
Floppy C Source file
(22.05 KiB) Downloaded 70 times
floppy.h
Floppy Header File
(9.27 KiB) Downloaded 62 times
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

I can't see anything obviously wrong, but then the floppy is easily the most temperamental piece of hardware on the surface of the planet. Have you tried increasing the stepping rate time beyond the "standard" values? Failing that, is the problem with the DMA transfer?
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Freenode IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

mathematician wrote:I can't see anything obviously wrong, but then the floppy is easily the most temperamental piece of hardware on the surface of the planet.


Hence the reason my OS doesn't support floppies yet (does support hard drives through LBA28 though - ATA is much easier).

With the floppy driver, there are multiple things to look for, such as disk changes (which it notifies you about), errors in reads (common) etc...

Also remember that in Bochs you have the log - you can easily find out what went wrong that way.
Post Reply