m297: Fix mapper mode not applied when loading save state'

This commit is contained in:
negativeExponent
2022-02-18 20:52:11 +08:00
parent ea0e198cf9
commit ed91566fd3

View File

@@ -549,11 +549,16 @@ static void M297Power(void) {
SetWriteHandler(0x8000, 0xFFFF, M297Latch);
}
static void M297StateRestore(void) {
Sync();
}
void Mapper297_Init(CartInfo *info) {
GenMMC1Init(info, 256, 256, 0, 0);
info->Power = M297Power;
MMC1CHRHook4 = M297CHR;
MMC1PRGHook16 = M297PRG;
GameStateRestore = M297StateRestore;
AddExState(&latch, 1, 0, "LATC");
AddExState(&mode, 1, 0, "MODE");
}