diff options
author | Astatin <[email protected]> | 2025-04-08 14:15:40 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-04-08 14:15:40 +0200 |
commit | 51bdddd2ee8357950d785a60b887730368527277 (patch) | |
tree | a42d8b10221605c77240004795f227988b21a9c2 /modes | |
parent | 85c478d0c2368c0a38fa3e6aa4d4e9070ea63fc3 (diff) |
Fix frame specific and sameboy specific bug with loading screens
Diffstat (limited to 'modes')
-rw-r--r-- | modes/dialoguemenu.gbasm | 2 | ||||
-rw-r--r-- | modes/dungeon.gbasm | 6 | ||||
-rw-r--r-- | modes/dungeongeneration.gbasm | 15 | ||||
-rw-r--r-- | modes/loading.gbasm | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/modes/dialoguemenu.gbasm b/modes/dialoguemenu.gbasm index 5138c40..4f8e410 100644 --- a/modes/dialoguemenu.gbasm +++ b/modes/dialoguemenu.gbasm @@ -15,7 +15,7 @@ Dialogue_VBLANK_Entrypoint: LD A, $0a LD $reg_lyc, A .ENABLE_LYC_INTERRUPT - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS EI CALL =Pad_Button_Check diff --git a/modes/dungeon.gbasm b/modes/dungeon.gbasm index 41fc11d..bd3515e 100644 --- a/modes/dungeon.gbasm +++ b/modes/dungeon.gbasm @@ -88,7 +88,7 @@ STAT_Entrypoint: LD $reg_bg_palette, A LD A, $77 LD $reg_lyc, A - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS POP DE POP AF RETI @@ -103,7 +103,7 @@ STAT_Entrypoint: .DISABLE_DIALOGUE LD A, $67 LD $reg_lyc, A - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS POP DE POP AF RETI @@ -136,7 +136,7 @@ Dungeon_VBLANK_Entrypoint: LD A, $0a LD $reg_lyc, A .ENABLE_LYC_INTERRUPT - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS EI CALL =Pad_Button_Check diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm index 1588e81..c119338 100644 --- a/modes/dungeongeneration.gbasm +++ b/modes/dungeongeneration.gbasm @@ -7,7 +7,7 @@ LD ($mem_stat_jump_destination), A LD A, high(=Dungeon_generation_Out_Of_VBlank) LD ($mem_stat_jump_destination+1), A - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS LD A, $20 LD $reg_lcd_status, A LD A, $02 @@ -125,6 +125,8 @@ New_Dungeon: CALL =Load_Prepared_Map + CALL =VBlank_Wait + Dungeon_generation_VBlank: .ENABLE_MODE_2_INTERRUPT EI @@ -141,7 +143,9 @@ Dungeon_generation_VBlank: LD A, $f4 LD ($9d73), A + LD B, B CALL =Reload_Entities_Tile_Data + LD B, B ; Clear OAM LD HL, $fe00 LD BC, $00a0 @@ -164,14 +168,14 @@ Dungeon_generation_VBlank: CALL =Reset_Entities_Collision_Map - .SET_WINDOW_LCDC_E .ENABLE_VBLANK_INTERRUPTS - .RESET_STAT_INTERRUPT - LD A, $00 - LD $reg_interrupt_flags, A + .RESET_INTERRUPTS + LD A, $lcdc_mapbg_tilemap + LD $reg_lcd_controller, A EI Wait_for_Interrupt.loop: + LD A, $reg_lcd_status HALT JP =Wait_for_Interrupt.loop @@ -179,5 +183,6 @@ Dungeon_generation_Out_Of_VBlank: PUSH AF CALL =VBlank_Wait .ENABLE_MODE_2_INTERRUPT + .RESET_INTERRUPTS POP AF RETI diff --git a/modes/loading.gbasm b/modes/loading.gbasm index dea6e89..df1bd24 100644 --- a/modes/loading.gbasm +++ b/modes/loading.gbasm @@ -12,7 +12,7 @@ Loading_VBLANK_Entrypoint: LD A, $0a LD $reg_lyc, A .ENABLE_LYC_INTERRUPT - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS EI CALL =Pad_Button_Check |