summaryrefslogtreecommitdiff
path: root/home.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home.asm')
-rw-r--r--home.asm64
1 files changed, 48 insertions, 16 deletions
diff --git a/home.asm b/home.asm
index 8d4fd91..53df26e 100644
--- a/home.asm
+++ b/home.asm
@@ -1,22 +1,54 @@
INCLUDE "constants.asm"
-SECTION "Entry point", ROM0[$100]
- nop
- jp Init
-
-SECTION "Global check value", ROM0[$14E]
-; The ROM has an incorrect global check, so set it here
-; It is not corrected by RGBFIX
- db $21, $C6
-
+INCLUDE "home/rst.asm"
+INCLUDE "home/interrupts.asm"
+INCLUDE "home/init.asm"
+INCLUDE "home/vblank.asm"
+INCLUDE "home/lcd.asm"
+INCLUDE "home/serial.asm"
-SECTION "VBlank handler", ROM0[$150]
- ; TODO
+SECTION "Empty function", ROM0[$2F97]
-
-SECTION "Init", ROM0[$52F]
-
-Init:
- di
+InexplicablyEmptyFunction:: ; 2f97
+REPT 16
+ nop
+ENDR
+ ret
+
+INCLUDE "home/farcall.asm"
+INCLUDE "home/predef.asm"
+INCLUDE "home/sram.asm"
+INCLUDE "home/bankswitch.asm"
+INCLUDE "home/clear_sprites.asm"
+INCLUDE "home/copy.asm"
+INCLUDE "home/copy_tilemap.asm"
+INCLUDE "home/audio.asm"
+INCLUDE "home/oam_dma.asm"
+
+
+; TODO:
+; 1. Figure out what these are. Might be related to RTC, like ClearRTCStatus and the ilk.
+; 2. Give them proper names.
+; 3. Move them to their own file(s).
+
+SECTION "Unknown functions", ROM0[$1FF4]
+
+_1FF4:: ; 1ff4
+ ld a, BANK(s0_a600)
+ call OpenSRAM
+ ld hl, s0_a600 ; TODO: label this.
+ ld bc, 7
xor a
+ call ByteFill
+ call CloseSRAM
+ ret
+
+_2007:: ; 2007
+ ld a, BANK(s0_a600)
+ call OpenSRAM
+ ld a, [s0_a600]
+ and 8
+ ld [wce5f], a
+ call CloseSRAM
+ ret