move sprites beyond 255 x - horizontal

JMP $FCE2
peppe56
Member
Member
Posts: 3
Joined: Thu May 13, 2021 9:01 am
Contact:

move sprites beyond 255 x - horizontal

Post by peppe56 »

hi, I was wondering how I can move the sprite
"penguino" over 255 position,
I tried, but it only works on first start, can you please tell me how to do it.
this is the portion of the code affected thanks.
the code is written in cbm prg studio

; 10 SYS (2064)

*=$0801

BYTE $0E, $08, $0A, $00, $9E, $20, $28, $32, $30, $36, $34, $29, $00, $00, $00

clear = $e544


*=$3000
incbin "pinguino.bin"
incbin "dog.bin"

*=$0810

jsr clear ;print chr$(147) cancella schermo
lda #00 ;A=0
sta $d020 ;poke53280,0 (bordo)
lda #02 ;A=2
sta $d021 ;poke53281,2 (sfondo)


lda #$01 ;A=1 (sprite 0 )
sta $d015 ;53269,3 (abilita sprite 0 )


lda #$c0 ;c0=192 (192*64 = 12288)
sta $07f8 ;2040,192


lda #$90 ;A=144
sta $d000 ;poke53248,144 (sprite 0 posiz. X) pinguino
sta $d001 ;poke53249,144 (sprite 0 posiz. Y) pinguino


muovix

ldx $d000 ;X= peek(53248)
ldy $d001 ;Y= peek(53249)

goto

lda #250 ;ritardo
cmp $d012 ;raster
bne goto

inx ;X=X+1

stx $d000 ;poke53248,x
sty $d001 ;poke53249,x
bne goto

lda#$01 ;A=1
sta$d010 ;53264,1 attiva bit HIGH

jmp muovix

lda#$0 ;A=10
sta$d010 ;53264,0 attiva bit LOW

rts


Who is online

Users browsing this forum: No registered users and 1 guest