diff --git a/src/main.asm b/src/main.asm index 1576648..5ba2eee 100644 --- a/src/main.asm +++ b/src/main.asm @@ -28,9 +28,17 @@ INCLUDE "res/title_map.inc" SECTION "High Globals", HRAM hGameState:: ds 1 hSwapAB:: ds 1 -hInitialA:: 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 wStack:: @@ -40,8 +48,20 @@ wStackEnd:: SECTION "Code Entry Point", ROM0 Main:: - ; Load the initial A register. For reasons. - ldh [hInitialA], a + ; Load the initial registers. For reasons. + 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. wait_vram diff --git a/src/state_title.asm b/src/state_title.asm index 0aee39a..709e9a2 100644 --- a/src/state_title.asm +++ b/src/state_title.asm @@ -39,7 +39,7 @@ SwitchToTitle:: call UnsafeMemCopy ; Little easter egg. - ldh a, [hInitialA] + ld a, [wInitialA] cp a, $FF jr nz, :+ ld de, sEaster0