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.
My FDC works on Bochs,VM-Ware,... but if I try it on a real PC it doesn't work ... Here is the FDC code, maybe somebody could tell me the error in the code:
The only thing I can suggest is if the problem can't be found in this code try posting your DMA code.
Why are you now asking about delay times? Are you getting 1 correct read and then none after that? If you don't even get the first read then delay times probably aren't the problem.
I do not use C, but if you understand asm, you can take a look at my floppy code, it is commented to go with the intel fdd controler pdfs, pudo code. http://www.dex4u.com/images/FloppyDriver.zip
PS: I would try a bigger delay for motor on spin up time, as mine is twice yours, you can alway cut delays back, once waying right.
hunter wrote:
Thank you ... I have solved the problem ;D... Now I make a recalibrate() ( at the readsector() funktion ) and then I start the motor ...
But there is another problem ... the FDC is to slowly ...
Good that you got it working, here some things i found with speed, First once you have your floppy code working, start making the delays smaller, until it stop working, than increase it a bit, then you know the best delay.
Next i think BIOS floppy int 13h knows some special tricks, as going back to realmode from pmode, doing int 13h, every 512bytes,
is about the same speed as using my pmode floppy driver.
Dex4u wrote:
Next i think BIOS floppy int 13h knows some special tricks, as going back to realmode from pmode, doing int 13h, every 512bytes,
is about the same speed as using my pmode floppy driver.
I think mainly that the floppy drive transfer speed (500kbps) is so much slower than the processor you're testing it on (expecting a p3+ system) that you can't notice a difference in the speed because the fdd is so d*mn slow.
Now I have an other question ... if I want to load more sectors, is there a better way to do that faster ... if I want to load more sektores I load ther first sector, the second sector,... but there are big loading times ...
The sad thing is floppys are slow, but have you made a fat12 driver yet, if not you will need to make one, for code to do this you can take a look at Dex4u source code it got drivers for fdd, hdd, atapi. fat12, fat16, fat32,You will find the source on this page: http://www.dex4u.com/download.htm
Note reading from HDD is a lot easier that FDD so once you happy with your fdd code you will find HDD easier.
If you down load Dex4U you can see the speed compeared too yours.
@Candy, There is still little differance on a p2 233.
But there is another problem ... the FDC is to slowly ...
i've just started learning on fdc. but i've noticed that in your code, in seeK() function you stop the motor after the seek is finished. so if you look at the following code from readSector
You should keep the motor on at least until the readSector is finished. Ideally, you should keep the motor on some more times after the read/write operation so if another read/write occurs a few time later you dont have to restart the motor.
First is your driver slower then other Drivers like linux, xp, dex4u, dos, or any other hobby OS if so then let me know and i will see if i can find any bottle-necks in your code.
Now I have an other question ... if I want to load more sectors, is there a better way to do that faster ... if I want to load more sektores I load ther first sector, the second sector,... but there are big loading times ...
you can read a complete track instead of a single sector, and use a cache of one or more tracks for read operations.