Re: Re: [hatari-devel] Sokoban VGA (Falcon)

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


Interesting that it goes to the trouble / risk of using TAS to restart the blitter, yet the old NOP is still present.

Despite trying I was never able to get a blitter restart to fail with the nop removed, and its purpose - if there is one - was never clearly explained by Atari. Perhaps the delay eliminates one unnecessary/bogus spin, or perhaps it is for safety on 16mhz machines, or some board/chip revisions. (?)

It is of course always bad to shortcut advice from developer docs... but there are few strict rules in demo land :)

D.


On 8 October 2013 13:13, Carsten Koeckritz <defjam_cp@xxxxxxx> wrote:
I would never ever use tas on hardware-registers..

Gesendet: Montag, 07. Oktober 2013 um 22:58 Uhr
Von: "Thomas Huth" <th.huth@xxxxxx>
An: hatari-devel@xxxxxxxxxxxxxxxxxxx
Betreff: Re: [hatari-devel] Sokoban VGA (Falcon)
Am Mon, 07 Oct 2013 00:35:32 +0200
schrieb Laurent Sallafranque <laurent.sallafranque@xxxxxxx>:

> Hi,
>
> I've given a quick look at Sokoban (Falcon), and I get the following
> error:

Is that game freely available for download somewhere?

> Exception 2 (e12bcc) at e12bce -> e00fb6!

That's an bus error... can you determine where it comes from (e.g. by
putting a breakpoint with gdb and do a backtrace when it triggers?).

> The executed code before the error is a linea #7 (Bit block transfer)
> And the program stops on the TAS instruction.
>
> I suspect the TAS instruction not to return to the correct PC
> address, but I haven't digged more for now (maybe there's a patch of
> this instruction in winuae, or in the old cpu).

I hardly believe that TAS itself is wrong (although the code for the
cycle-exact 68000 mode seems to be dodgy, but that does not matter here
since you run in 68030 mode instead).
The code you've added below seems to try to start the blitter. So I
think the problem could be related to the blitter instead.
Could you do a "info blitter" in the debugger when you reach the TAS
instruction?

> The last instructions before the crash
>
>
> $06aac6 : a007 linea
> #7 ; Bit block transfer
[...]
> $e12bcc : 4ad5 tas (a5)
> Debugger: *CPU breakpoint*
> >
> > r
> D0 0000007E D1 00000004 D2 00000000 D3 FFFF0000
> D4 00000001 D5 00000000 D6 00000000 D7 000080C0
> A0 002DEA41 A1 00FF9841 A2 00000002 A3 00000002
> A4 00000000 A5 00FF8A3C A6 00083E02 A7 00087768

A5 = 0xff8a3c is the blitter control register ... TAS is obviously used
to test whether it is already running and to start it if it was not
running yet.

Thomas






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