mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
stop IdleDet from affecting save states
This commit is contained in:
parent
eefdb8a559
commit
7e056c853a
1 changed files with 6 additions and 0 deletions
|
@ -227,6 +227,9 @@ static int state_save(void *file)
|
||||||
areaWrite(&ver, 1, 4, file);
|
areaWrite(&ver, 1, 4, file);
|
||||||
|
|
||||||
if (!(PicoIn.AHW & PAHW_SMS)) {
|
if (!(PicoIn.AHW & PAHW_SMS)) {
|
||||||
|
// the patches can cause incompatible saves with no-idle
|
||||||
|
SekFinishIdleDet();
|
||||||
|
|
||||||
memset(buff, 0, sizeof(buff));
|
memset(buff, 0, sizeof(buff));
|
||||||
SekPackCpu(buff, 0);
|
SekPackCpu(buff, 0);
|
||||||
CHECKED_WRITE_BUFF(CHUNK_M68K, buff);
|
CHECKED_WRITE_BUFF(CHUNK_M68K, buff);
|
||||||
|
@ -235,6 +238,9 @@ static int state_save(void *file)
|
||||||
CHECKED_WRITE_BUFF(CHUNK_IOPORTS, PicoMem.ioports);
|
CHECKED_WRITE_BUFF(CHUNK_IOPORTS, PicoMem.ioports);
|
||||||
ym2612_pack_state();
|
ym2612_pack_state();
|
||||||
CHECKED_WRITE(CHUNK_FM, 0x200+4, ym2612_regs);
|
CHECKED_WRITE(CHUNK_FM, 0x200+4, ym2612_regs);
|
||||||
|
|
||||||
|
if (!(PicoIn.opt & POPT_DIS_IDLE_DET))
|
||||||
|
SekInitIdleDet();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CHECKED_WRITE_BUFF(CHUNK_SMS, Pico.ms);
|
CHECKED_WRITE_BUFF(CHUNK_SMS, Pico.ms);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue