Floppy Driver ?
Floppy Driver ?
sorry that I repeat this post, because my floppy disk driver does not work.
when I try to read a sector, I send all requested data ( command, track, head, ...) but after that I floppy does not send Interrupt, so that we know that the command has been done and I have read the MSR register, it has the value 16, that mean "command busy". you could see I have a wrong timeout counter. but that is not the problem, because when I try to read the floppy as 1.68MB it return from command with an error reading sector and I have test it with big timeout and with loop util the floppy send interrupt. but it still not work.
have an idea where the problem could be?
note :
seek and recalibrate work fine " bit 7 in MSR is one "
when I try to read a sector, I send all requested data ( command, track, head, ...) but after that I floppy does not send Interrupt, so that we know that the command has been done and I have read the MSR register, it has the value 16, that mean "command busy". you could see I have a wrong timeout counter. but that is not the problem, because when I try to read the floppy as 1.68MB it return from command with an error reading sector and I have test it with big timeout and with loop util the floppy send interrupt. but it still not work.
have an idea where the problem could be?
note :
seek and recalibrate work fine " bit 7 in MSR is one "
Re:Floppy Driver ?
Before and read or write or even using the controller, you need to set the specification. ie head load, head unload, etc. I think its command 0x03, read the docs. there is a disk parameter table in bios that specifies these timing values. I think ralf's int docs can help.
Re:Floppy Driver ?
I have set those value and I mentioned the seek command work, only read and write does not work!!!!
Re:Floppy Driver ?
another note:
after sending the last command byte ( for reading, DTL is 0xff) the controller run in execution phase and thus it set bit 4 with 1 - command busy in MSR- . this bit will not change until the command finished and result phase also finished, but nothing happend, it still working in the command phase.
That what I do not understand.
I ask me, is there no one accept Therx has implement a floppy disk driver?? ???
after sending the last command byte ( for reading, DTL is 0xff) the controller run in execution phase and thus it set bit 4 with 1 - command busy in MSR- . this bit will not change until the command finished and result phase also finished, but nothing happend, it still working in the command phase.
That what I do not understand.
I ask me, is there no one accept Therx has implement a floppy disk driver?? ???
Re:Floppy Driver ?
I have read it and it is good organized.
your setting is exactly like mine, therefor I don't understand why it does not work.
the controller go in command phase but it is not come back. note that I have deactivate DMA, so that I can receive the interrupt after FIFO is full, but nothing happend :-[, it still in command busy ( MSR = 16)
your setting is exactly like mine, therefor I don't understand why it does not work.
the controller go in command phase but it is not come back. note that I have deactivate DMA, so that I can receive the interrupt after FIFO is full, but nothing happend :-[, it still in command busy ( MSR = 16)
Re:Floppy Driver ?
I don't recommend not using DMA. This is similar to why you don't use polling for the keyboard driver. Speed.
As to why your code doesn't work. The code you sent me had the line to program the Data Rate commented out. Why?
As to why your code doesn't work. The code you sent me had the line to program the Data Rate commented out. Why?
Re:Floppy Driver ?
I have disamble DMA only for test purpose, so that I receive interrupt very soon as FIFO full is.
Data rate I have uncomment it, because DSR was not supported by buchs, thus I use CCR instead, but it still not working.
Data rate I have uncomment it, because DSR was not supported by buchs, thus I use CCR instead, but it still not working.
Re:Floppy Driver ?
Some Floppy controllers do not work in NON-DMA mode. Programming DMA is not difficult, try it.
Re:Floppy Driver ?
I have programed it before, but with DMA or without it, it does not work!
Re:Floppy Driver ?
We can't help you until you post every line of code that related to your floppy driver. Until then, We are all guessing in the DARK.
Re:Floppy Driver ?
thanks for all who has helped me to solve this problem.
I have change the Fabian Code so that it could compiled
under linux and with my kernel.
and finaly it work.
I have change the Fabian Code so that it could compiled
under linux and with my kernel.
and finaly it work.