From aef156ac6216ed157b06a2872ba051af43317e93 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 13 Apr 2026 16:34:11 +0200 Subject: Add sound effects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/jetpac.s | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/jetpac.s') diff --git a/src/jetpac.s b/src/jetpac.s index f2e28b2..a011a45 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -42,6 +42,7 @@ .include "assets.s" .include "background.s" .include "prng.s" +.include "sound.s" .include "explosions.s" .include "score.s" .include "items.s" @@ -53,6 +54,14 @@ .include "driver.s" .include "interrupts.s" +;; Sanity check for some constant values. 'cl65' fails at this, so I'm only +;; doing the check on 'nasm'. +.ifdef __NASM__ + .if Bullets::BULLET_TIMER_VALUE > Sound::BULLET_SFX_FRAME_COUNT + .error "Sound::BULLET_SFX_FRAME_COUNT must be smaller than Bullets::BULLET_TIMER_VALUE" + .endif +.endif + ;; Pretty standard reset function, nothing crazy. .proc reset ;; Disable interrupts and decimal mode. @@ -73,6 +82,9 @@ stx PPU::m_mask stx APU::m_dmc + ;; Initialize the APU. + jsr Sound::init + ;; First PPU wait. bit PPU::m_status @vblankwait1: -- cgit v1.2.3