summaryrefslogtreecommitdiff
path: root/src/home/start.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2021-09-19 00:21:14 -0500
committerGitHub <noreply@github.com>2021-09-19 00:21:14 -0500
commitdf67aac83b466dadf5f74c881bf84dd9ef19bdfc (patch)
tree47501aced2d256052b8f78bc97328d5af5703add /src/home/start.asm
parente4bce9b7ee5e89f8edfd921de2379f0fa06af206 (diff)
parent8dee6b7a11e85d6d4b9f8ec9fb9d53a499fd37dc (diff)
Merge pull request #110 from ElectroDeoxys/master
Split Home bank
Diffstat (limited to 'src/home/start.asm')
-rw-r--r--src/home/start.asm32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/home/start.asm b/src/home/start.asm
new file mode 100644
index 0000000..6a02660
--- /dev/null
+++ b/src/home/start.asm
@@ -0,0 +1,32 @@
+SECTION "start", ROM0
+Start:
+ di
+ ld sp, $fffe
+ push af
+ xor a
+ ldh [rIF], a
+ ldh [rIE], a
+ call ZeroRAM
+ ld a, $1
+ call BankswitchROM
+ xor a
+ call BankswitchSRAM
+ call BankswitchVRAM0
+ call DisableLCD
+ pop af
+ ld [wInitialA], a
+ call DetectConsole
+ ld a, $20
+ ld [wTileMapFill], a
+ call SetupVRAM
+ call SetupRegisters
+ call SetupPalettes
+ call SetupSound
+ call SetupTimer
+ call ResetSerial
+ call CopyDMAFunction
+ call ValidateSRAM
+ ld a, BANK(GameLoop)
+ call BankswitchROM
+ ld sp, $e000
+ jp GameLoop