Re: [hatari-devel] Blitter bug in STe mode

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


Le 09/06/2020 à 10:37, Nicolas Pomarède a écrit :


For those not familiar with blitter, TAS is often used in non-hog mode because it allows to restart the blitter if the blitter has still the busy bit set, doing this with only one instruction.


hi

problem should now be fixed ; I added a RMW flag to the cpu emulation in the case of TAS, and the blitter will now delay its restart in non hog mode in case the blitter's 1st bus access happens during a RMW operation. In that case, blitter will now wait until the RMW operation is done (after the write in the case of TAS).

for those not familiar with blitter, this happened because of this code used to restart the blitter as fast as possible in non hog mode :

   lea    0xFFFF8A3C,a0
loop:
   tas    (a0)
   nop
   jbmi   loop

this allows to run the blitter nearly as fast as in hog mode, but still leaving the possibility to handle interrupt routines on a regular basis (keyboard, ...)

In some cases the 64th cpu bus access happens just before the TAS, which means the blitter takes control again and try to get the bus after the read access in TAS, which should not be possible because TAS uses a Read/Modify/Write access which can't be interrupted.

Thanks again to Christian for doing the analysis work :)

Nicolas




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