Floppy disk controller

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
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

Floppy disk controller

Post by melgmry0101b »

Hi everyone :D ,
I am developing and operating system but now i want to make a Floppy Disk Controller i have made up to 10 FDCs but no one running successfully :oops: .
and i want to read a sector from a floppy.
---------------------------
Thank you in advance.
fronty
Member
Member
Posts: 188
Joined: Mon Jan 14, 2008 5:53 am
Location: Helsinki

Re: Floppy disk controller

Post by fronty »

Either your design blows or your soldering skills aren't good enough.





Oh, you meant a driver? Read the docs. It would also help helping you if you really asked something (correctly).
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Floppy disk controller

Post by NickJohnson »

What has been the problem with your other attempts? Have you read the wiki page on this?
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

Re: Floppy disk controller

Post by melgmry0101b »

I simply followed this tutorial :
http://www.brokenthorn.com/Resources/OSDevIndex.htm
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

Re: Floppy disk controller

Post by melgmry0101b »

The code is good ind VPC or Bochs but in Real hardware it doesn't run
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Floppy disk controller

Post by neon »

Hello,

What is it currently doing now? How does it "not work"? What debugging have you already performed?

Please note the demo provided for that chapter uses the DMAC for data transfer so debugging steps should be performed on the DMAC interface and floppy driver software.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

Re: Floppy disk controller

Post by melgmry0101b »

Hi,
The error is :
When i start it in a real computer the error handler starts and tells me "General Protection Fault"
and when i change the DMA buffer to any hex except "0x8000" it runs but when i want to read file it stops without any reason or error.
after that i returned to the FDC chapter and run it in a real computer , it runs successfully until i attempt to read sector 10 or higher it again stops without any reason or error.
after that i changed the DMA buffer from 0x8000 to 0x6000 or anything else it runs successfully until i attempt to read sector 2 or higher it again stops without any reason or error.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Floppy disk controller

Post by Combuster »

When i start it in a real computer the error handler starts and tells me "General Protection Fault"
Continue?

That's only step 1 in debugging: finding a symptom. So what is directly causing that exception? Can you trace that error further down to its origin? You should try and see how well that works :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply