Merge pull request #205 from retro-wertz/savestate_fix

Refactor state variables for expansion audio
This commit is contained in:
Twinaphex
2018-02-21 09:39:12 +01:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -218,7 +218,6 @@ void Mapper69_ESI(void) {
memset(dcount, 0, sizeof(dcount));
memset(vcount, 0, sizeof(vcount));
memset(CAYBC, 0, sizeof(CAYBC));
AddExState(&SStateRegs, ~0, 0, 0);
}
/* SUNSOFT-5/FME-7 Sound */
@@ -271,6 +270,7 @@ void Mapper69_Init(CartInfo *info) {
}
GameStateRestore = StateRestore;
Mapper69_ESI();
AddExState(&SStateRegs, ~0, 0, 0);
AddExState(&StateRegs, ~0, 0, 0);
}
@@ -279,4 +279,5 @@ void NSFAY_Init(void) {
SetWriteHandler(0xC000, 0xDFFF, M69SWrite0);
SetWriteHandler(0xE000, 0xFFFF, M69SWrite1);
Mapper69_ESI();
AddExState(&SStateRegs, ~0, 0, 0);
}

View File

@@ -337,7 +337,6 @@ static void VRC6_ESI(void) {
}
} else
memset(sfun, 0, sizeof(sfun));
AddExState(&SStateRegs, ~0, 0, 0);
}
/* VRC6 Sound */
@@ -348,6 +347,7 @@ void Mapper24_Init(CartInfo *info) {
MapIRQHook = VRC6IRQHook;
VRC6_ESI();
GameStateRestore = StateRestore;
AddExState(&SStateRegs, ~0, 0, 0);
AddExState(&StateRegs, ~0, 0, 0);
}
@@ -367,11 +367,12 @@ void Mapper26_Init(CartInfo *info) {
info->SaveGame[0] = WRAM;
info->SaveGameLen[0] = WRAMSIZE;
}
AddExState(&SStateRegs, ~0, 0, 0);
AddExState(&StateRegs, ~0, 0, 0);
}
void NSFVRC6_Init(void) {
VRC6_ESI();
SetWriteHandler(0x8000, 0xbfff, VRC6SW);
AddExState(&SStateRegs, ~0, 0, 0);
}