diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-07 23:11:09 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-07 23:11:09 +0100 |
| commit | e8f39dc4a7cc19fb97e24ec0819ccd964cbd325f (patch) | |
| tree | 2392d04e46abe4c1e112a027b81f63b6b3c05ffd /src/jetpac.s | |
| parent | 60f21153e18ccf45cb120d50f6d5f5c860de78f2 (diff) | |
| download | jetpac.nes-e8f39dc4a7cc19fb97e24ec0819ccd964cbd325f.tar.gz jetpac.nes-e8f39dc4a7cc19fb97e24ec0819ccd964cbd325f.zip | |
Initialize 'zp_pause_toggle' before NMI enablement
Otherwise we might randomly get weird scenarios like the title screen
not showing up properly.
Fixes: bc99212539f6 ("Toggle a "Paused" message on top of the screen")
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/jetpac.s')
| -rw-r--r-- | src/jetpac.s | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jetpac.s b/src/jetpac.s index 5c1c099..52ec1f7 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -121,7 +121,8 @@ sta PPU::zp_control ;; Initialize other global variables which the rest of the game assume to - ;; have zero as their initial values. + ;; have zero as their initial values. Note that it's important to have these + ;; variables defined before sta Globals::zp_flags sta Joypad::zp_buttons1 sta Joypad::zp_buttons2 @@ -146,6 +147,10 @@ ;; Initialize some variables from the "Game Over" side of the game. jsr Over::init + ;; Initialize variables from the game's driver that need to be set before + ;; NMIs start ticking. + jsr Driver::init_before_nmi + ;; Initialize some PAL-specific constants. .ifdef PAL lda #0 |
