mirror of
https://github.com/deater/tb1.git
synced 2024-06-06 14:29:37 +00:00
snes: make star scrolling wrap properly
This commit is contained in:
parent
0ee9573daa
commit
e9aa81ccda
|
@ -1,2 +1,2 @@
|
||||||
.word $a832 ; Complement of checksum
|
.word $a4b0 ; Complement of checksum
|
||||||
.word $57cd ; Unsigned 16-bit sum of ROM
|
.word $5b4f ; Unsigned 16-bit sum of ROM
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
joypad1 = $0000
|
joypad1 = $0000
|
||||||
joypad2 = $0001
|
joypad2 = $0001
|
||||||
shipx = $0002
|
shipx = $0002
|
||||||
|
star_scroll = $0003
|
||||||
|
star_scroll_h = $0004 ; 0004 too, 16-bit
|
||||||
|
|
||||||
.setcpu "65816"
|
.setcpu "65816"
|
||||||
|
|
||||||
|
@ -242,18 +244,30 @@ level1_setup_video:
|
||||||
|
|
||||||
jsr svmw_fade_in
|
jsr svmw_fade_in
|
||||||
|
|
||||||
; lda #$0f
|
|
||||||
; sta $2100 ; Turn on screen, full Brightness
|
|
||||||
|
|
||||||
|
|
||||||
; init vars
|
; init vars
|
||||||
lda #104
|
lda #104
|
||||||
sta shipx
|
sta shipx
|
||||||
|
|
||||||
|
stz star_scroll
|
||||||
|
stz star_scroll_h
|
||||||
|
|
||||||
level1_loop:
|
level1_loop:
|
||||||
|
|
||||||
wai ; wait for interrupt
|
wai ; wait for interrupt
|
||||||
|
|
||||||
|
|
||||||
|
; scroll background
|
||||||
|
lda star_scroll
|
||||||
|
sta $2110
|
||||||
|
lda star_scroll_h
|
||||||
|
sta $2110
|
||||||
|
|
||||||
|
rep #$20 ; A/mem=16 bit
|
||||||
|
.a16
|
||||||
|
dec star_scroll
|
||||||
|
sep #$20 ; A/mem=8 bit
|
||||||
|
.a8
|
||||||
|
|
||||||
; handle keypress
|
; handle keypress
|
||||||
lda joypad1
|
lda joypad1
|
||||||
check_left:
|
check_left:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user