From 44d5009a61cb6f5149c222837a2d9252d2526ebf Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 19 Jan 2013 02:09:55 -0500 Subject: [PATCH] snes: have both opening screen and title screen come up --- tb_snes/checksum.inc | 4 ++-- tb_snes/opening.s | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/tb_snes/checksum.inc b/tb_snes/checksum.inc index 013b6a6..779055f 100644 --- a/tb_snes/checksum.inc +++ b/tb_snes/checksum.inc @@ -1,2 +1,2 @@ - .word $dd2e ; Complement of checksum - .word $22d1 ; Unsigned 16-bit sum of ROM + .word $d3ee ; Complement of checksum + .word $2c11 ; Unsigned 16-bit sum of ROM diff --git a/tb_snes/opening.s b/tb_snes/opening.s index 03a934a..eff2a13 100644 --- a/tb_snes/opening.s +++ b/tb_snes/opening.s @@ -62,10 +62,10 @@ opening_copypal: bne opening_copypal ; make last color white - lda #$7f - sta $2122 lda #$ff sta $2122 + lda #$7f + sta $2122 @@ -264,15 +264,27 @@ opening_setup_video: ; lda #$81 ; Enable NMI (VBlank Interrupt) and joypads -; sta $4200 ; + lda #$01 ; enable joypad + sta $4200 ; less: - ; repeat forever - ; stp? +joypad_read: + lda $4212 ; get joypad status + and #%00000001 ; if joy is not ready + bne joypad_read ; wait - bra less + lda $4219 ; read joypad (BYSTudlr) + + and #%11110000 ; see if a button pressed + + beq less ; if so, skip and don't move ball + + lda #$80 + sta $2100 ; Turn off screen + + rts opening_string: