aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-03-24 00:34:26 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-03-24 00:34:26 +0100
commitb779e7dc3d44f7b9d90aeeee91ed36cf57d65e95 (patch)
tree1f94f26d5781c93997fd4a052e1b6177ce3874a3
parent0c9b0ad7938e2ba7e994574b4947e25c82440b8c (diff)
downloadjetpac.nes-b779e7dc3d44f7b9d90aeeee91ed36cf57d65e95.tar.gz
jetpac.nes-b779e7dc3d44f7b9d90aeeee91ed36cf57d65e95.zip
Use the 'nmi_' prefix for NMI-only functions
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
-rw-r--r--src/background.s4
-rw-r--r--src/driver.s8
-rw-r--r--src/interrupts.s6
-rw-r--r--src/over.s6
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