From b7c591c930ae74998463435e6f05d3312cfd1c8f Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 3 Apr 2025 19:02:10 +0200 Subject: Add the ability to pause the game MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/vectors.s | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/vectors.s') diff --git a/src/vectors.s b/src/vectors.s index f9aa31d..559a59d 100644 --- a/src/vectors.s +++ b/src/vectors.s @@ -85,6 +85,11 @@ lda #$02 sta OAM::DMA + ;; Are we paused? If so skip timers, PAL handler and the likes. + lda #%00001000 + and Globals::zp_flags + bne @ppu_registers + ;; PAL-specific code .ifdef PAL jsr Driver::pal_handler @@ -94,10 +99,10 @@ ;; Decrease title timer. lda Title::zp_title_timer - beq :+ + beq @ppu_registers dec Title::zp_title_timer -: +@ppu_registers: ;; Should we update PPU registers? bit Globals::zp_flags bvc @scroll -- cgit v1.2.3