[hatari-devel] It seems I encounter a bug into hatari

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


Hi,

While testing racer on my real hardware, I encounter something that works under hatari but not under the falcon (with both old and new cpu)

The piece of code given above displays the sky (one color per line).

Under hatari, the sky displays correctly, but under the Falcon, it seems the color palette pointer is wrong and the sky is displayed with bad colors.

Is it related to the fact I use the ffff8040 + memory address in long mode ?

At least, Hatari and the real hardware differs here.

Regards

Laurent



sky_palette: dc.l $5c3a5c3a,$5c3a5c3a,$5c3a5c3a,$5c3a5c3a,$5c3a5c3a,$5c3a5c3a,$5c5a5c5a,$5c5a5c5a dc.l $5c5a5c5a,$5c5a5c5a,$5c5a5c5a,$5c5a5c5a,$5c5a5c5a,$645a645a,$645a645a,$645a645a dc.l $645a645a,$645a645a,$647a647a,$647a647a,$647a647a,$647a647a,$647a647a,$647a647a dc.l $647a647a,$647a647a,$647a647a,$647a647a,$647a647a,$647a647a,$6c7b6c7b,$6c9b6c9b dc.l $6c9a6c9a,$6c9b6c9b,$6c9a6c9a,$6c9b6c9b,$6c9b6c9b,$6c9b6c9b,$6cbb6cbb,$6cbb6cbb dc.l $6cbb6cbb,$6cbb6cbb,$6cbb6cbb,$6cbb6cbb,$74bb74bb,$74db74db,$74db74db,$74db74db dc.l $74db74db,$74db74db,$74db74db,$74db74db,$74db74db,$74fb74fb,$74fb74fb,$74fb74fb dc.l $7cfb7cfb,$7cfb7cfb,$7cfb7cfb,$7cfb7cfb,$7cfb7cfb,$7cfb7cfb,$7d1b7d1b,$7d1b7d1b dc.l $7d1b7d1b,$7d1b7d1b,$7d3c7d3c,$853c853c,$853c853c,$853c853c,$853c853c,$853c853c dc.l $853c853c,$855c855c,$855c855c,$855c855c,$855c855c,$8d5c8d5c,$8d5c8d5c,$8d5c8d5c dc.l $8d5c8d5c,$8d7c8d7c,$8d7c8d7c,$8d7c8d7c,$8d7c8d7c,$8d7c8d7c,$8d7c8d7c,$959c959c dc.l $959c959c,$959c959c,$959c959c,$95bc95bc,$95bc95bc,$95bc95bc,$9dbc9dbc,$9dbc9dbc dc.l $9dbc9dbc,$9ddc9ddc,$9ddc9ddc,$9ddc9ddc,$9ddc9ddc,$9ddc9ddc,$a5fca5fc,$a5fca5fc dc.l $a5fca5fc,$a5fda5fd,$a5fda5fd,$a5fda5fd,$a5fda5fd,$ae1dae1d,$ae1dae1d,$ae1dae1d dc.l $ae1dae1d,$ae3dae3d,$ae3dae3d,$ae3dae3d,$ae3dae3d,$ae3dae3d,$b65db65d,$b65db65d dc.l $b65db65d,$b65db65d,$b65db65d,$b67db67d,$b67db67d,$b67db67d,$b67db67d,$b67db67d dc.l $b67db67d,$b69db69d,$b69db69d,$b69db69d,$b6bdb6bd,$b6bdb6bd,$b6bdb6bd,$b6bdb6bd dc.l $b6bdb6bd,$b6bdb6bd,$b6bdb6bd,$b6bdb6bd,$b6ddb6dd,$b6ddb6dd,$b6ddb6dd,$b6fdb6fd
            dc.l        $b6fdb6fd,$b6fdb6fd
sky_palette_end:


display_background: ; Code specific to the level 1 : display the background
            ; input : a6 = screen address
            ;       d0 = number of lines of the picture to display
            ;       d1 = number of sky lines to display
            ;      d2 = background picture X position

            ; Save the input datas
            move.w        d0,$ffff8240.w
            move.w        d1,$ffff8242.w
            move.l        d2,$ffff8244.w

            ; Write the sky from the right to the left
            lea.l        320*2(a6),a6

            ; Display the sky part
            lea.l        sky_palette_end-8(pc),a0
            move.w        $ffff8242.w,d0
            add.w        d0,d0
            add.w        d0,d0
            sub.w        d0,a0
            move.l        a0,$ffff8248.w

..do_display_sky:    addq.l        #4,$ffff8248.w
            move.l        $ffff8248.w,a0

            ; Load the color of this line in the registers
            move.l        (a0),d0
            move.l        d0,d1
            move.l        d0,d2
            move.l        d0,d3
            move.l        d0,d4
            move.l        d0,d5
            move.l        d0,d6
            move.l        d0,d7
            move.l        d0,a0
            move.l        d0,a1
            move.l        d0,a2
            move.l        d0,a3
            move.l        d0,a4
            move.l        d0,a5


..loop_sky:        movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d7/a0-a5,-(a6)            ; 28 pixels
            movem.l        d0-d5,-(a6)                ; 12 pixels
            lea.l        _SCREEN_WIDTH+320*2(a6),a6
            subq.w        #1,$ffff8242.w
            bpl.s        .do_display_sky







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