[hatari-devel] Improved timings for the FDC emulation

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello

I committed a new version of fdc.c with many internal changes.

This should give very few compatibility's improvements compared to previous version, as I don't know of many programs which had problems with FDC's emulation, but it should be much closer to the WD1772 datasheet and avoid future incompatibilities with usage not yet encountered.

The changes are :

- much improved status register and commands' behaviour when the drive is off, or not selected or there's no floppy in it. Also, correct timeout (or no timeout at all) for those case (most commands should wait forever when a drive is off or empty).

- more accurate index emulation ; delays are now counted using indexes, instead of using the corresponding number of expected cycles (which didn't take into account the case of disabled/empty drive)

- much closer to the statemachine described in the WD1772 doc. Timings were OK, but not always applied at the exact place or in the correct order. This would certainly not have made a game/demo crash before, as those timings are hard to measure exactly on a real STF, but still, experiment prooved it's always better to stick to the HW as close as possible.

- some code's reorganisation to try to have a general emulation's logic that follows all the steps described in the WD1772's doc.


I tested many demos/games I use as reference for FDC's emulation and didn't see any problem so far, don't hesisate do test some of your favorites ones (from my experience, games (even if cracked) are often more likely to show errors in FDC's emulation)

(one game not working so far is "Knightmare" on DBug 24, the way it worked in Hatari 1.7 was not correct anyway, so this needs more investigation).


Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/