[hatari-devel] Sokoban VGA (Falcon)

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


Hi,

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

Exception 2 (e12bcc) at e12bce -> e00fb6!

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).

Does this TAS instruction works well with the old cpu ?
(I don't use this one in general, I'll learn a new instruction by the same time ;)

Regards
Laurent

The last instructions before the crash


$06aac6 : a007 linea #7 ; Bit block transfer
$e094ea : 226f 0002                            movea.l   2(sp),a1
$e094ee : 3411                                 move.w    (a1),d2
$e094f0 : c47c 0fff                            and.w     #$fff,d2
$e094f4 : 5489                                 addq.l    #2,a1
$e094f6 : 2f49 0002                            move.l    a1,2(sp)
$e094fa : b47c 000f                            cmp.w     #$f,d2
$e094fe : 6210                                 bhi.s     $e09510
$e09500 : e54a                                 lsl.w     #2,d2
$e09502 : 227b 2024                            movea.l $e09528(pc,d2.w),a1
$e09506 : 48e7 1f1c                            movem.l d3-d7/a3-a5,-(sp)
$e0950a : 4e91                                 jsr       (a1)
$e0fbf2 : dcfc 004c                            adda.w    #$4c,a6
$e0fbf6 : 302e ffc2                            move.w $ffc2(a6),d0
$e0fbfa : 3a2e ffc4                            move.w $ffc4(a6),d5
$e0fbfe : 342e ffd0                            move.w $ffd0(a6),d2
$e0fc02 : 3e2e ffd2                            move.w $ffd2(a6),d7
$e0fc06 : 3800                                 move.w    d0,d4
$e0fc08 : 3c02                                 move.w    d2,d6
$e0fc0a : 322e ffb6                            move.w $ffb6(a6),d1
$e0fc0e : 5341                                 subq.w    #1,d1
$e0fc10 : da41                                 add.w     d1,d5
$e0fc12 : de41                                 add.w     d1,d7
$e0fc14 : 322e ffb4                            move.w $ffb4(a6),d1
$e0fc18 : 5341                                 subq.w    #1,d1
$e0fc1a : d841                                 add.w     d1,d4
$e0fc1c : dc41                                 add.w     d1,d6
$e0fc1e : 3d44 ffee                            move.w d4,$ffee(a6)
$e0fc22 : 3d45 fff0                            move.w d5,$fff0(a6)
$e0fc26 : 3d46 fff6                            move.w d6,$fff6(a6)
$e0fc2a : 3d47 fff8                            move.w d7,$fff8(a6)
$e0fc2e : 2a79 00e4 d17e                       movea.l   $e4d17e,a5
$e0fc34 : 2a6d 00a2                            movea.l   $a2(a5),a5
$e0fc38 : 2a6d 0010                            movea.l   $10(a5),a5
$e0fc3c : 4ed5                                 jmp       (a5)
$e12a0e : 4bf9 00ff 8a3c                       lea       $ff8a3c,a5
$e12a14 : 720f                                 moveq     #$f,d1
$e12a16 : 3a02                                 move.w    d2,d5
$e12a18 : ca41                                 and.w     d1,d5
$e12a1a : 3e05                                 move.w    d5,d7
$e12a1c : da45                                 add.w     d5,d5
$e12a1e : 363b 50cc                            move.w $e129ec(pc,d5.w),d3
$e12a22 : 4643                                 not.w     d3
$e12a24 : 4843                                 swap      d3
$e12a26 : 3a06                                 move.w    d6,d5
$e12a28 : ca41                                 and.w     d1,d5
$e12a2a : da45                                 add.w     d5,d5
$e12a2c : 363b 50c0                            move.w $e129ee(pc,d5.w),d3
$e12a30 : 3a00                                 move.w    d0,d5
$e12a32 : ca41                                 and.w     d1,d5
$e12a34 : 9e45                                 sub.w     d5,d7
$e12a36 : e848                                 lsr.w     #4,d0
$e12a38 : e84c                                 lsr.w     #4,d4
$e12a3a : e84a                                 lsr.w     #4,d2
$e12a3c : e84e                                 lsr.w     #4,d6
$e12a3e : 3204                                 move.w    d4,d1
$e12a40 : 9840                                 sub.w     d0,d4
$e12a42 : c3ee ffca                            muls.w $ffca(a6),d1
$e12a46 : 3a2e fff0                            move.w $fff0(a6),d5
$e12a4a : cbee ffcc                            muls.w $ffcc(a6),d5
$e12a4e : da81                                 add.l     d1,d5
$e12a50 : 246e ffc6                            movea.l $ffc6(a6),a2
$e12a54 : 41f2 5800                            lea (a2,d5.l),a0
$e12a58 : 3206                                 move.w    d6,d1
$e12a5a : 9c42                                 sub.w     d2,d6
$e12a5c : 6e06                                 bgt.s     $e12a64
$e12a64 : c3ee ffd8                            muls.w $ffd8(a6),d1
$e12a68 : 3a2e fff8                            move.w $fff8(a6),d5
$e12a6c : 3d45 ffe8                            move.w d5,$ffe8(a6)
$e12a70 : cbee ffda                            muls.w $ffda(a6),d5
$e12a74 : da81                                 add.l     d1,d5
$e12a76 : 266e ffd4                            movea.l $ffd4(a6),a3
$e12a7a : 43f3 5800                            lea (a3,d5.l),a1
$e12a7e : 7200                                 moveq     #0,d1
$e12a80 : b1c9                                 cmpa.l    a1,a0
$e12a82 : 6e06                                 bgt.s     $e12a8a
$e12a84 : 6634                                 bne.s     $e12aba
$e12aba : 3b7c ffff ffee                       move.w #$ffff,$ffee(a5)
$e12ac0 : 3b43 ffec                            move.w d3,$ffec(a5)
$e12ac4 : 4843                                 swap      d3
$e12ac6 : 3b43 fff0                            move.w d3,$fff0(a5)
$e12aca : 3006                                 move.w    d6,d0
$e12acc : 5240                                 addq.w    #1,d0
$e12ace : 3b40 fffa                            move.w d0,$fffa(a5)
$e12ad2 : 4a47                                 tst.w     d7
$e12ad4 : 6c02                                 bge.s     $e12ad8
$e12ad8 : bc44                                 cmp.w     d4,d6
$e12ada : 6602                                 bne.s     $e12ade
$e12adc : 5841                                 addq.w    #4,d1
$e12ade : 342e ffca                            move.w $ffca(a6),d2
$e12ae2 : 362e ffd8                            move.w $ffd8(a6),d3
$e12ae6 : 3004                                 move.w    d4,d0
$e12ae8 : c9c2                                 muls.w    d2,d4
$e12aea : 4444                                 neg.w     d4
$e12aec : d86e ffcc                            add.w $ffcc(a6),d4
$e12af0 : d046                                 add.w     d6,d0
$e12af2 : cdc3                                 muls.w    d3,d6
$e12af4 : 4446                                 neg.w     d6
$e12af6 : dc6e ffda                            add.w $ffda(a6),d6
$e12afa : 0801 0003                            btst      #3,d1
$e12afe : 6608                                 bne.s     $e12b08
$e12b00 : 4442                                 neg.w     d2
$e12b02 : 4443                                 neg.w     d3
$e12b04 : 4444                                 neg.w     d4
$e12b06 : 4446                                 neg.w     d6
$e12b08 : 3b46 fff4                            move.w d6,$fff4(a5)
$e12b0c : 3b44 ffe6                            move.w d4,$ffe6(a5)
$e12b10 : 4a40                                 tst.w     d0
$e12b12 : 6606                                 bne.s     $e12b1a
$e12b1a : ce7c 000f                            and.w     #$f,d7
$e12b1e : 8e7b 1012                            or.w $e12b32(pc,d1.w),d7
$e12b22 : 3b43 fff2                            move.w d3,$fff2(a5)
$e12b26 : 3b42 ffe4                            move.w d2,$ffe4(a5)
$e12b2a : 6626                                 bne.s     $e12b52
$e12b52 : 346e ffce                            movea.w $ffce(a6),a2
$e12b56 : 366e ffdc                            movea.w $ffdc(a6),a3
$e12b5a : 342e ffbc                            move.w $ffbc(a6),d2
$e12b5e : 362e ffba                            move.w $ffba(a6),d3
$e12b62 : 382e ffb6                            move.w $ffb6(a6),d4
$e12b66 : 3a2e ffb8                            move.w $ffb8(a6),d5
$e12b6a : 3b7c 0200 fffe                       move.w #$200,$fffe(a5)
$e12b70 : 286e ffde                            movea.l $ffde(a6),a4
$e12b74 : 2c0c                                 move.l    a4,d6
$e12b76 : 677a                                 beq.s     $e12bf2
$e12bf2 : 51cd ffb6                            dbra      d5,$e12baa
$e12baa : 2b48 ffe8                            move.l a0,$ffe8(a5)
$e12bae : 2b49 fff6                            move.l a1,$fff6(a5)
$e12bb2 : 3b44 fffc                            move.w d4,$fffc(a5)
$e12bb6 : 4246                                 clr.w     d6
$e12bb8 : e24b                                 lsr.w     #1,d3
$e12bba : dd46                                 addx.w    d6,d6
$e12bbc : e24a                                 lsr.w     #1,d2
$e12bbe : dd46                                 addx.w    d6,d6
$e12bc0 : 1b76 60be ffff                       move.b $be(a6,d6.w),$ffff(a5)
$e12bc6 : 3a87                                 move.w    d7,(a5)
$e12bc8 : d0ca                                 adda.w    a2,a0
$e12bca : d2cb                                 adda.w    a3,a1
$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
USP  000877F2 ISP  00087768 SFC  00000000 DFC  00000000
CACR 00000000 VBR  00000000 CAAR 00000000 MSP  00000000
T=00 S=1 M=0 X=0 N=1 Z=0 V=0 C=0 IMASK=3 STP=0
FP0: 0 FP1: 0 FP2: 0 FP3: 0
FP4: 0 FP5: 0 FP6: 0 FP7: 0
N=0 Z=0 I=0 NAN=0
00E00FB6 48f8 ffff 0384           MOVEM.L D0-D7/A0-A7,$00000384
Next PC: 00e00fbc





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