aboutsummaryrefslogtreecommitdiff
path: root/init.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-08-29 16:14:35 +0900
committerAstatin <astatin@redacted>2024-08-29 16:14:35 +0900
commit522bde7b7e7d70fc86a5dac2042b7b20e05c197b (patch)
tree01d3f81170c91debdf0784fa5c6255955730cd80 /init.gbasm
parent4a4ff1db8fe026ced0530f8c2531033da43164e6 (diff)
Fix issues related to VBlank wait in sameboy + Add stairs interactions
Diffstat (limited to 'init.gbasm')
-rw-r--r--init.gbasm9
1 files changed, 4 insertions, 5 deletions
diff --git a/init.gbasm b/init.gbasm
index ac9b67b..e160727 100644
--- a/init.gbasm
+++ b/init.gbasm
@@ -21,6 +21,9 @@ Checksum: ; The bytes 0x134-0x14d need to add up to 0xe7 (= 0xff - 0x19)
.DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$e7
Initialize_RAM:
+; Disable Interrupts
+LD A, $00
+LD $reg_interrupt_enable, A
Empty_WRAM:
LD HL, $C000
Empty_WRAM.loop:
@@ -30,11 +33,7 @@ Empty_WRAM:
CP h
JR NZ, =Empty_WRAM.loop
-Wait_VBlank:
- LD A, $reg_lcd_status
- AND $03
- CP $01
- JR NZ, =Wait_VBlank
+ CALL =VBlank_Wait
; LCDC
XOR A