diff --git a/tb_snes/checksum.inc b/tb_snes/checksum.inc index 29b2fec..3071784 100644 --- a/tb_snes/checksum.inc +++ b/tb_snes/checksum.inc @@ -1,2 +1,2 @@ - .word $d6a7 ; Complement of checksum - .word $2958 ; Unsigned 16-bit sum of ROM + .word $cc93 ; Complement of checksum + .word $336c ; Unsigned 16-bit sum of ROM diff --git a/tb_snes/opening.s b/tb_snes/opening.s index eff2a13..d41df77 100644 --- a/tb_snes/opening.s +++ b/tb_snes/opening.s @@ -268,18 +268,17 @@ opening_setup_video: sta $4200 ; -less: - -joypad_read: +opening_joypad_read: lda $4212 ; get joypad status - and #%00000001 ; if joy is not ready - bne joypad_read ; wait + and #%00000001 ; if joy is not ready + bne opening_joypad_read ; wait lda $4219 ; read joypad (BYSTudlr) and #%11110000 ; see if a button pressed - beq less ; if so, skip and don't move ball + beq opening_joypad_read + ; if so, skip and don't move ball lda #$80 sta $2100 ; Turn off screen diff --git a/tb_snes/tb1_snes.s b/tb_snes/tb1_snes.s index b7c0ddd..2a48a6b 100644 --- a/tb_snes/tb1_snes.s +++ b/tb_snes/tb1_snes.s @@ -41,7 +41,7 @@ start_program: jsr display_opening -; jsr display_title + jsr display_title jsr level_1 diff --git a/tb_snes/title_screen.s b/tb_snes/title_screen.s index 1bd11ab..9137613 100644 --- a/tb_snes/title_screen.s +++ b/tb_snes/title_screen.s @@ -203,15 +203,24 @@ setup_video: ; lda #$81 ; Enable NMI (VBlank Interrupt) and joypads -; sta $4200 ; + lda #$01 ; Enable joypad + sta $4200 ; +title_joypad_read: + lda $4212 ; get joypad status + and #%00000001 ; if joy is not ready + bne title_joypad_read ; wait -overflowing: + lda $4219 ; read joypad (BYSTudlr) - ; repeat forever - ; stp? + and #%11110000 ; see if a button pressed - bra overflowing + beq title_joypad_read + + lda #$80 + sta $2100 ; Turn off screen + + rts ;============================================================================