From cc0a348394f70ed485db2615b5f2bed4509efd05 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 11 Jun 2024 12:56:11 -0400 Subject: [PATCH] fish: add flashing text for spacebar message --- games/sb/fish/fish.s | 13 +++++++++---- games/sb/fish/text_print.s | 19 +++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/games/sb/fish/fish.s b/games/sb/fish/fish.s index 725ae237..08e66627 100644 --- a/games/sb/fish/fish.s +++ b/games/sb/fish/fish.s @@ -18,9 +18,11 @@ ; NOTES -; page1= $2000-$5fff -; code = $6000-$bfff - +; hgr page1= $2000-$3fff +; hgr page2= $4000-$5fff +; code = $4000-$bfff +; note we have to be done with the code in page2 before +; we over-write it by playing the game div7_table = $400 mod7_table = $500 @@ -130,12 +132,15 @@ wait_at_tile: jsr set_normal ; normal text - ldx #9 + ldx #7 print_help: jsr move_and_print dex bne print_help + jsr set_flash ; have the "press spacebar" flash + jsr move_and_print + wait_at_directions: lda KEYPRESS bpl wait_at_directions diff --git a/games/sb/fish/text_print.s b/games/sb/fish/text_print.s index 34bae3db..95f0cff4 100644 --- a/games/sb/fish/text_print.s +++ b/games/sb/fish/text_print.s @@ -60,25 +60,36 @@ done_print_string: rts - ; set normal text + ; set normal text ($80-$ff) set_normal: lda #$80 sta ps_smc1+1 - lda #09 ; ora + lda #$09 ; ora sta ps_smc1 rts - ; restore inverse text + ; restore inverse text ($00-$3f) set_inverse: - lda #$29 + lda #$29 ; and sta ps_smc1 lda #$3f sta ps_smc1+1 rts + ; set flashing text ($40-$7f) +set_flash: + lda #$40 + sta ps_smc1+1 + + lda #$09 ; ora + sta ps_smc1 + + rts + + ;================================ ; move and print a list of lines