From b779e7dc3d44f7b9d90aeeee91ed36cf57d65e95 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 24 Mar 2026 00:34:26 +0100 Subject: Use the 'nmi_' prefix for NMI-only functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/background.s | 4 +--- src/driver.s | 8 ++------ src/interrupts.s | 6 +++--- src/over.s | 6 +++--- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/background.s b/src/background.s index 369def9..c843063 100644 --- a/src/background.s +++ b/src/background.s @@ -109,9 +109,7 @@ .byte $FF ;; Clear out the shuttle from the background. - ;; - ;; NOTE: this should only be called from NMI code. - .proc clear_shuttle + .proc nmi_clear_shuttle ;; The low part of the rocket. bit PPU::m_status ldx #$2B diff --git a/src/driver.s b/src/driver.s index 3372f9a..8e26fbe 100644 --- a/src/driver.s +++ b/src/driver.s @@ -908,9 +908,7 @@ .endproc ;; Toggle the "Paused" message from the (not quite) HUD. - ;; - ;; NOTE: only call this function from NMI code. - .proc hud_toggle_pause + .proc nmi_hud_toggle_pause ;; Unset the 'P' flag. lda Driver::zp_flags and #%10111111 @@ -964,9 +962,7 @@ ;; This function expects the 'Globals::zp_nmi_reserved' to be set with the ;; addition to be performed on each base character in order to set the ;; proper animation phase (i.e. either "#$00" or "#$70"). - ;; - ;; NOTE: only call this function from NMI code. - .proc blink_player_selection + .proc nmi_blink_player_selection bit PPU::m_status ;; Which player are we talking about? diff --git a/src/interrupts.s b/src/interrupts.s index 6c7e75b..9c2cb45 100644 --- a/src/interrupts.s +++ b/src/interrupts.s @@ -30,7 +30,7 @@ ;; Toggle pause message from the HUD. bit Driver::zp_flags bvc @increase_rand - jsr Driver::hud_toggle_pause + jsr Driver::nmi_hud_toggle_pause @increase_rand: ;; Increase the random seed. @@ -56,7 +56,7 @@ lda #$70 @set_blinking: sta Globals::zp_nmi_reserved - jsr Driver::blink_player_selection + jsr Driver::nmi_blink_player_selection @update_lifes: ;; Do we need to update the lifes from players on the HUD? @@ -109,7 +109,7 @@ ;; the usual route. lda Items::zp_collected bne @do_update_shuttle - jsr Background::clear_shuttle + jsr Background::nmi_clear_shuttle jmp @unset_shuttle_flag @do_update_shuttle: jsr Items::update_shuttle diff --git a/src/over.s b/src/over.s index ab13d76..6ec4745 100644 --- a/src/over.s +++ b/src/over.s @@ -67,7 +67,7 @@ rts @do_render: - jsr Over::clear_out_screen + jsr Over::nmi_clear_out_screen lda Globals::zp_flags and #$03 cmp #2 @@ -97,7 +97,7 @@ .endproc ;; Remove all platforms and the ground. - .proc clear_out_screen + .proc nmi_clear_out_screen ;; Remove left platform. bit PPU::m_status ldx #$29 @@ -153,7 +153,7 @@ bne @clear_ground_loop ;; Clear the shuttle from the background. - jsr Background::clear_shuttle + jsr Background::nmi_clear_shuttle rts .endproc -- cgit v1.2.3