From 522bde7b7e7d70fc86a5dac2042b7b20e05c197b Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 29 Aug 2024 16:14:35 +0900 Subject: Fix issues related to VBlank wait in sameboy + Add stairs interactions --- init.gbasm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'init.gbasm') 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 -- cgit v1.2.3-70-g09d2