From 0a0746674a84731b3d85698fa15350f596685f33 Mon Sep 17 00:00:00 2001 From: zohassadar Date: Mon, 24 Mar 2025 19:54:48 +0000 Subject: [PATCH] Clean unused init bytes These bytes are remnants from the vanilla rom and aren't used by anything. They appear to be either an incorrect version of the Famicom Disk System Interupt/Reset vector controls, or the correct version of the same controls for an internal development platform. Either way they can be cleaned up. from: https://www.nesdev.org/wiki/FDS_BIOS#Interrupt/Reset_vector_controls > Interrupt/Reset vector controls > The FDS BIOS uses 4 bytes at the > lower end of the stack page to control the behaviour of interrupt/reset > vectors: > > [$0100]: PC action on NMI. $C0 (NMI #3) on reset. > [$0101]: PC action on IRQ. $80 (BIOS acknowledge and delay) on reset. > [$0102]: RESET flag. $35 on reset after the boot files have loaded. > [$0103]: RESET type. $AC = first boot of the game, $53 = the game was soft-reset by the user. --- src/boot.asm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/boot.asm b/src/boot.asm index f6d496e8..707d2ac2 100644 --- a/src/boot.asm +++ b/src/boot.asm @@ -76,14 +76,6 @@ sta PPUMASK jsr LE006 jsr updateAudio2 - lda #$C0 - sta stack - lda #$80 - sta stack+1 - lda #$35 - sta stack+3 - lda #$AC - sta stack+4 jsr updateAudioWaitForNmiAndDisablePpuRendering jsr disableNmi jsr drawBlackBGPalette