Clear up a byte of memory.

This commit is contained in:
Randy Thiemann 2023-10-23 06:17:34 +02:00
parent 6ca137d41b
commit 6474d431a4
2 changed files with 24 additions and 4 deletions

View File

@ -28,9 +28,17 @@ INCLUDE "res/title_map.inc"
SECTION "High Globals", HRAM SECTION "High Globals", HRAM
hGameState:: ds 1 hGameState:: ds 1
hSwapAB:: ds 1 hSwapAB:: ds 1
hInitialA:: ds 1
hSimulationMode:: ds 1 hSimulationMode:: ds 1
SECTION "Globals", WRAM0
wInitialA:: ds 1
wInitialB:: ds 1
wInitialC:: ds 1
wInitialD:: ds 1
wInitialE:: ds 1
wInitialH:: ds 1
wInitialL:: ds 1
SECTION "Stack", WRAM0 SECTION "Stack", WRAM0
wStack:: wStack::
@ -40,8 +48,20 @@ wStackEnd::
SECTION "Code Entry Point", ROM0 SECTION "Code Entry Point", ROM0
Main:: Main::
; Load the initial A register. For reasons. ; Load the initial registers. For reasons.
ldh [hInitialA], a ld [wInitialA], a
ld a, b
ld [wInitialB], a
ld a, c
ld [wInitialC], a
ld a, d
ld [wInitialD], a
ld a, e
ld [wInitialE], a
ld a, h
ld [wInitialH], a
ld a, l
ld [wInitialL], a
; Turn off LCD during initialization. ; Turn off LCD during initialization.
wait_vram wait_vram

View File

@ -39,7 +39,7 @@ SwitchToTitle::
call UnsafeMemCopy call UnsafeMemCopy
; Little easter egg. ; Little easter egg.
ldh a, [hInitialA] ld a, [wInitialA]
cp a, $FF cp a, $FF
jr nz, :+ jr nz, :+
ld de, sEaster0 ld de, sEaster0