|Re: [hatari-users] Floppy in Falcon mode|
[ Thread Index |
| More lists.tuxfamily.org/hatari-users Archives
On 25/12/2011 22:50, Vincent Rivière wrote:
I measure the time taken for the Restore command by using Hatari's VBL
traces between "fdc type I restore" and "fdc complete command". On
Falcon it is (156 - 12) = 144 VBLs which means 2.4 seconds at 60 Hz.
According to fdc.c, it should be 1.2 second (1.2 second for motor on and
~0 second for Restore from track 0).
So it seems that the FDC delays are twice as expected in Falcon mode.
This is enough to explain all my trouble.
I barely use the Falcon mode, so I never noticed this.
In fact, the Falcon Ajax FDC uses a 16 MHz clock, while other ST models
use a 8 MHz, and a stated in FDC_DelayToCpuCycles, FDC_Freq is expected
to be the same as CPU_Freq (ie 8 MHz) for correct timings calculation.
So, on Falcon converting an FDC delay from microsec to cpu cycles
returned twice the expected value. This is now corrected, I added a
special case for Falcon to correct the cpu cycles.
All your delays should now be the same as on STF.
example from tos 4.04 booting in falcon mode :
fdc write 8604 data=0x0 VBL=133 video_cyc=878 366@1 pc=e045d2
fdc write 8604 command=0x0 VBL=133 video_cyc=878 366@1 pc=e045d2
fdc type I restore drive=0 current_track=0x0 VBL=133 video_cyc=878 366@1
fdc start motor VBL=133 video_cyc=878 366@1 pc=e045d2
fdc complete command VBL=193 video_cyc=11854 78@23 pc=e04524
Thanks for noticing this.