Use SFVAR_BOOL

This commit is contained in:
twinaphex 2020-10-06 14:29:31 +02:00
parent 97cabdef4e
commit ad175bffff
7 changed files with 25 additions and 24 deletions

View File

@ -3148,10 +3148,10 @@ int SCSICD_StateAction(StateMem* sm, const unsigned load, const bool data_only,
SFVARN(cd_bus.signals, "Signals"),
SFVAR(CurrentPhase),
SFVARN_BOOL(cd.last_RST_signal, "last_RST"),
SFVAR_BOOL(cd.last_RST_signal),
SFVARN(cd.message_pending, "message_pending"),
SFVARN_BOOL(cd.status_sent, "status_sent"),
SFVARN_BOOL(cd.message_sent, "message_sent"),
SFVAR_BOOL(cd.status_sent),
SFVAR_BOOL(cd.message_sent),
SFVARN(cd.key_pending, "key_pending"),
SFVARN(cd.asc_pending, "asc_pending"),
SFVARN(cd.ascq_pending, "ascq_pending"),
@ -3165,13 +3165,13 @@ int SCSICD_StateAction(StateMem* sm, const unsigned load, const bool data_only,
SFARRAYN(&din->data[0], din->data.size(), "din_fifo"),
SFVARN(din->read_pos, "din_read_pos"),
SFVARN(din->in_count, "din_in_count"),
SFVARN_BOOL(cd.data_transfer_done, "data_transfer_done"),
SFVAR_BOOL(cd.data_transfer_done),
SFARRAYN(cd.data_out, sizeof(cd.data_out), "data_out"),
SFVARN(cd.data_out_pos, "data_out_pos"),
SFVARN(cd.data_out_want, "data_out_want"),
SFVARN_BOOL(cd.DiscChanged, "DiscChanged"),
SFVAR_BOOL(cd.DiscChanged),
SFVAR(cdda.PlayMode),
SFARRAY16(cdda.CDDASectorBuffer, 1176),

View File

@ -297,7 +297,7 @@ int ArcadeCard::StateAction(StateMem *sm, int load, int data_only)
{
SFORMAT ACUsedRegs[] =
{
SFVARN_BOOL(ACRAMUsed, "ACRAMUsed"),
SFVAR_BOOL(ACRAMUsed),
SFEND
};

View File

@ -892,9 +892,9 @@ static int ADPCM_StateAction(StateMem *sm, int load, int data_only)
SFVAR(ADPCM.WritePending),
SFVAR(ADPCM.WritePendingValue),
SFVARN_BOOL(ADPCM.HalfReached, "ADPCM.HalfReached"),
SFVARN_BOOL(ADPCM.EndReached, "ADPCM.EndReached"),
SFVARN_BOOL(ADPCM.Playing, "ADPCM.Playing"),
SFVAR_BOOL(ADPCM.HalfReached),
SFVAR_BOOL(ADPCM.EndReached),
SFVAR_BOOL(ADPCM.Playing),
SFVAR(ADPCM.PlayNibble),
@ -916,7 +916,7 @@ int PCECD_StateAction(StateMem *sm, int load, int data_only)
{
SFORMAT StateRegs[] =
{
SFVAR(bBRAMEnabled),
SFVAR_BOOL(bBRAMEnabled),
SFVAR(ACKStatus),
SFVAR(ClearACKDelay),
SFARRAY16(RawPCMVolumeCache, 2),
@ -926,7 +926,7 @@ int PCECD_StateAction(StateMem *sm, int load, int data_only)
SFVAR(Fader.Volume),
SFVAR(Fader.CycleCounter),
SFVAR(Fader.CountValue),
SFVARN_BOOL(Fader.Clocked, "Fader.Clocked"),
SFVAR_BOOL(Fader.Clocked),
SFARRAY(&SubChannelFIFO.data[0], SubChannelFIFO.size),
SFVAR(SubChannelFIFO.read_pos),

View File

@ -1252,10 +1252,10 @@ int PCECD_Drive_StateAction(StateMem * sm, int load, int data_only, const char *
SFVARN(cd_bus.signals, "Signals"),
SFVARN(CurrentPhase, "CurrentPhase"),
SFVARN_BOOL(cd.last_RST_signal, "last_RST"),
SFVAR_BOOL(cd.last_RST_signal),
SFVARN(cd.message_pending, "message_pending"),
SFVARN_BOOL(cd.status_sent, "status_sent"),
SFVARN_BOOL(cd.message_sent, "message_sent"),
SFVAR_BOOL(cd.status_sent),
SFVAR_BOOL(cd.message_sent),
SFVARN(cd.key_pending, "key_pending"),
SFVARN(cd.asc_pending, "asc_pending"),
SFVARN(cd.ascq_pending, "ascq_pending"),
@ -1269,10 +1269,10 @@ int PCECD_Drive_StateAction(StateMem * sm, int load, int data_only, const char *
SFARRAYN(&din.data[0], din.size, "din_fifo"),
SFVARN(din.read_pos, "din_read_pos"),
SFVARN(din.in_count, "din_in_count"),
SFVARN_BOOL(cd.data_transfer_done, "data_transfer_done"),
SFVAR_BOOL(cd.data_transfer_done),
SFVARN_BOOL(cd.TrayOpen, "TrayOpen"),
SFVARN_BOOL(cd.DiscChanged, "DiscChanged"),
SFVAR_BOOL(cd.TrayOpen),
SFVAR_BOOL(cd.DiscChanged),
SFVAR(cdda.PlayMode),
SFARRAY16(cdda.CDDASectorBuffer, 1176),

View File

@ -631,7 +631,7 @@ int PCEFast_PSG::StateAction(StateMem *sm, int load, int data_only)
SFVARN(vol_update_counter, "vol_update_counter"),
SFVARN(vol_update_which, "vol_update_which"),
SFVARN_BOOL(vol_pending, "vol_pending"),
SFVAR_BOOL(vol_pending),
SFEND
};

View File

@ -1152,8 +1152,8 @@ int VDC_StateAction(StateMem *sm, int load, int data_only)
SFORMAT VCE_StateRegs[] =
{
SFVARN(vce.CR, "VCECR"),
SFVARN_BOOL(vce.lc263, "lc263"),
SFVARN_BOOL(vce.bw, "bw"),
SFVAR_BOOL(vce.lc263),
SFVAR_BOOL(vce.bw),
SFVARN(vce.dot_clock, "dot clock"),
SFVARN(vce.ctaddress, "ctaddress"),
SFARRAY16N(vce.color_table, 0x200, "color_table"),
@ -1202,10 +1202,10 @@ int VDC_StateAction(StateMem *sm, int load, int data_only)
SFARRAY16N(vdc->VRAM, VRAM_Size, "VRAM"),
SFVARN(vdc->DMAReadBuffer, "DMAReadBuffer"),
SFVARN_BOOL(vdc->DMAReadWrite, "DMAReadWrite"),
SFVARN_BOOL(vdc->DMARunning, "DMARunning"),
SFVARN_BOOL(vdc->SATBPending, "SATBPending"),
SFVARN_BOOL(vdc->burst_mode, "burst_mode"),
SFVAR_BOOL(vdc->DMAReadWrite),
SFVAR_BOOL(vdc->DMARunning),
SFVAR_BOOL(vdc->SATBPending),
SFVAR_BOOL(vdc->burst_mode),
SFVARN(vdc->BG_YOffset, "BG_YOffset"),
SFVARN(vdc->BG_XOffset, "BG_XOffset"),

View File

@ -6,6 +6,7 @@
#define SFVARN_BOOL(x, n) { &(x), 1, MDFNSTATE_RLSB | MDFNSTATE_BOOL, n }
#define SFVARN(x, n) { &(x), (uint32_t)sizeof(x), MDFNSTATE_RLSB, n }
#define SFVAR_BOOL(x) SFVARN_BOOL((x), #x)
#define SFVAR(x) SFVARN((x), #x)
#define SFARRAYN(x, l, n) { (x), (uint32_t)(l), 0, n }