Skip to content

Commit

Permalink
fixes for gbp detection
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbowman committed Jan 9, 2021
1 parent a105905 commit 926c81d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/platform/gba/gba_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ static bool unlock_gameboy_player(Platform& pfrm)

RegisterRamReset(RESET_VRAM);


REG_DISPCNT = MODE_0 | BG0_ENABLE;
*bg0_control = 0x0088;
*bg0_x_scroll = 0;
Expand Down Expand Up @@ -1428,7 +1429,15 @@ u16 Platform::get_tile(Layer layer, u16 x, u16 y)

[[noreturn]] static void restart()
{
RegisterRamReset(RESET_VRAM);
// NOTE: I am clearing almost everything, because when I did not clear all
// of these memory segments, something seemed to be interfering with gameboy
// player unlocking.
RegisterRamReset(RESET_VRAM |
RESET_PALETTE |
RESET_OAM |
RESET_SIO |
RESET_SOUND |
RESET_OTHER);
SoftReset(ROM_RESTART), __builtin_unreachable();
}

Expand Down

0 comments on commit 926c81d

Please sign in to comment.