aboutsummaryrefslogtreecommitdiff
path: root/main.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-12-12 17:33:37 +0900
committerAstatin <[email protected]>2024-12-12 17:33:37 +0900
commitbfc32de4fd80c7bb51283840abf21d48151b5feb (patch)
treed38f2ca7acf89961f538a1ea7d65d279e42f81d2 /main.gbasm
parente93a99e8e8565db0111b40d3286ce3d78f263559 (diff)
Fix copy dialogue buffer update outside of VBlank (+ add dbg for lcd status at the end of expected vblank thingy)
Diffstat (limited to 'main.gbasm')
-rw-r--r--main.gbasm22
1 files changed, 17 insertions, 5 deletions
diff --git a/main.gbasm b/main.gbasm
index ad326fa..55a72c8 100644
--- a/main.gbasm
+++ b/main.gbasm
@@ -91,17 +91,28 @@ New_Dungeon:
LD $mem_current_mode, A
LD $mem_requested_mode, A
+ LD HL, $9c0f
+ LD BC, =Debug_Text
+ CALL =Print_str
+
+ LD A, $68
+ LD ($9c02), A
+
.ENABLE_WINDOW_NO_WAIT_HBLANK
.ENABLE_VBLANK_INTERRUPTS
EI
- Wait_for_VRAM.loop:
+ Wait_for_Interrupt.loop:
HALT
EI
- JP =Wait_for_VRAM.loop
+ JP =Wait_for_Interrupt.loop
VBLANK_Entrypoint:
.ENABLE_WINDOW_NO_WAIT_HBLANK
+ LD A, $tmp_var_5
+ LD HL, $9c12
+ CALL =Print_8bit
+
LD A, $palette_bold_font
LD $reg_bg_palette, A
@@ -109,9 +120,6 @@ VBLANK_Entrypoint:
LD A, $mem_bunny_health
CALL =Print_8bit
- LD A, $68
- LD (HL), A
-
CALL $OAM_DMA_Transfer_routine
CALL =Loading_Mode_VBlank
@@ -122,9 +130,13 @@ VBLANK_Entrypoint:
CALL =Display_Object
Skip_VBlank_Dungeon_Update:
+
CALL =Copy_Dialogue_Buffer
CALL =Display_dialogue_cursor
+ LD A, $reg_lcd_status
+ LD $tmp_var_5, A
+
; LYC
LD A, $09
LD $reg_lyc, A