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

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


Christian Zietz schrieb:

> It is. The TAS instruction is there to *prevent* what currently is
> happening on Hatari. With BSET #7,... the Blitter can take the bus
> in-between the read and the write cycle. With TAS it shouldn't be able
> to. Therefore, imho it's the right choice to use TAS (as recommended by
> Atari) to restart the Blitter.

A brief follow-up to my investigation: The read cycle in TAS eventually
ends up in mem_access_delay_byte_read(), where the following happens:

v = get_byte (addr);
x_do_cycles_post (4 * cpucycleunit, v);

x_do_cycles_post() can restart the Blitter if it is the "right time".
This is why the Blitter control registers changes *during* a TAS
instruction and the wrong value is written back in the write cycle.

If I move x_do_cycles_post() to before get_byte() the screen artifacts
vanish. (And I break cycle accuracy, so this is not a real solution.)

This can happen with other instructions on real HW, too; the main reason
why TAS exists is so that this does not happen. I.e., Hatari would have
to block the Blitter restart if the CPU was executing a TAS instruction.
This, BTW, is why Atari changed their recommendation to use TAS (instead
of BSET) in later revisions of the Blitter user manual.

Regards
Christian
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA



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