aboutsummaryrefslogtreecommitdiff
path: root/src/interrupts.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-03-05 18:49:02 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-03-05 18:49:02 +0100
commit0de830d9ac786fbbf32e9abebf3975e909b1a5e7 (patch)
tree8a5d1ad9ec7aacb29de5a2cde3524bdd22e577a7 /src/interrupts.s
parent95dee49559d78a3d1c458ad98c277ef7dbee473e (diff)
downloadjetpac.nes-0de830d9ac786fbbf32e9abebf3975e909b1a5e7.tar.gz
jetpac.nes-0de830d9ac786fbbf32e9abebf3975e909b1a5e7.zip
Make randomness a bit more random
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/interrupts.s')
-rw-r--r--src/interrupts.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interrupts.s b/src/interrupts.s
index b5120b4..522ee9e 100644
--- a/src/interrupts.s
+++ b/src/interrupts.s
@@ -24,6 +24,9 @@
lda #$02
sta OAM::m_dma
+ ;; Increase the random seed.
+ inc Prng::zp_rand
+
;; Are we paused? If so skip timers, PAL handler and the likes.
lda #%00001000
and Globals::zp_flags
@@ -61,9 +64,6 @@
and #%00000001
bne @ppu_registers
- ;; Increase the random seed.
- inc Prng::zp_rand
-
;; Decrease title timer.
lda Title::zp_title_timer
beq @ppu_registers