snapshot: Keep compatibility with version 11.

This commit is contained in:
BearOso 2023-03-08 13:33:15 -06:00
parent cea5148166
commit 879134ca5a
3 changed files with 4 additions and 2 deletions

View File

@ -410,7 +410,7 @@ static FreezeData SnapTimings[] =
INT_ENTRY(6, NMITriggerPos), INT_ENTRY(6, NMITriggerPos),
INT_ENTRY(6, WRAMRefreshPos), INT_ENTRY(6, WRAMRefreshPos),
INT_ENTRY(6, RenderPos), INT_ENTRY(6, RenderPos),
DELETED_INT_ENTRY(6, 12, InterlaceField, 1), INT_ENTRY(6, InterlaceField),
INT_ENTRY(6, DMACPUSync), INT_ENTRY(6, DMACPUSync),
INT_ENTRY(6, NMIDMADelay), INT_ENTRY(6, NMIDMADelay),
INT_ENTRY(6, IRQFlagChanging), INT_ENTRY(6, IRQFlagChanging),
@ -1204,6 +1204,7 @@ void S9xFreezeToStream (STREAM stream)
S9xControlPreSaveState(&ctl_snap); S9xControlPreSaveState(&ctl_snap);
FreezeStruct(stream, "CTL", &ctl_snap, SnapControls, COUNT(SnapControls)); FreezeStruct(stream, "CTL", &ctl_snap, SnapControls, COUNT(SnapControls));
Timings.InterlaceField = S9xInterlaceField();
FreezeStruct(stream, "TIM", &Timings, SnapTimings, COUNT(SnapTimings)); FreezeStruct(stream, "TIM", &Timings, SnapTimings, COUNT(SnapTimings));
if (Settings.SuperFX) if (Settings.SuperFX)

View File

@ -13,7 +13,7 @@
#define SNAPSHOT_VERSION_IRQ 7 #define SNAPSHOT_VERSION_IRQ 7
#define SNAPSHOT_VERSION_BAPU 8 #define SNAPSHOT_VERSION_BAPU 8
#define SNAPSHOT_VERSION_IRQ_2018 11 // irq changes were introduced earlier, since this we store NextIRQTimer directly #define SNAPSHOT_VERSION_IRQ_2018 11 // irq changes were introduced earlier, since this we store NextIRQTimer directly
#define SNAPSHOT_VERSION 12 #define SNAPSHOT_VERSION 11
#define SUCCESS 1 #define SUCCESS 1
#define WRONG_FORMAT (-1) #define WRONG_FORMAT (-1)

View File

@ -180,6 +180,7 @@ struct STimings
int32 IRQTriggerCycles; int32 IRQTriggerCycles;
int32 WRAMRefreshPos; int32 WRAMRefreshPos;
int32 RenderPos; int32 RenderPos;
bool8 InterlaceField;
int32 DMACPUSync; // The cycles to synchronize DMA and CPU. Snes9x cannot emulate correctly. int32 DMACPUSync; // The cycles to synchronize DMA and CPU. Snes9x cannot emulate correctly.
int32 NMIDMADelay; // The delay of NMI trigger after DMA transfers. Snes9x cannot emulate correctly. int32 NMIDMADelay; // The delay of NMI trigger after DMA transfers. Snes9x cannot emulate correctly.
int32 IRQFlagChanging; // This value is just a hack. int32 IRQFlagChanging; // This value is just a hack.