diff --git a/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs b/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs
index b2eb45d44b..4d0521fc15 100644
--- a/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs
+++ b/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs
@@ -193,15 +193,15 @@ namespace BizHawk.Emulation.Cores.Components.M68000
writer.WriteLine();
writer.WriteLine("PC {0:X6}", PC);
- writer.WriteLine("InterruptMaskLevel {0}", InterruptMaskLevel);
+ writer.WriteLine($"{nameof(InterruptMaskLevel)} {InterruptMaskLevel}");
writer.WriteLine("USP {0:X8}", usp);
writer.WriteLine("SSP {0:X8}", ssp);
writer.WriteLine("S {0}", s);
writer.WriteLine("M {0}", m);
writer.WriteLine();
- writer.WriteLine("TotalExecutedCycles {0}", TotalExecutedCycles);
- writer.WriteLine("PendingCycles {0}", PendingCycles);
+ writer.WriteLine($"{nameof(TotalExecutedCycles)} {TotalExecutedCycles}");
+ writer.WriteLine($"{nameof(PendingCycles)} {PendingCycles}");
writer.WriteLine("[/{0}]", id);
}
@@ -232,14 +232,14 @@ namespace BizHawk.Emulation.Cores.Components.M68000
else if (args[0] == "A7") A[7].s32 = int.Parse(args[1], NumberStyles.HexNumber);
else if (args[0] == "PC") PC = int.Parse(args[1], NumberStyles.HexNumber);
- else if (args[0] == "InterruptMaskLevel") InterruptMaskLevel = int.Parse(args[1]);
+ else if (args[0] == nameof(InterruptMaskLevel)) InterruptMaskLevel = int.Parse(args[1]);
else if (args[0] == "USP") usp = int.Parse(args[1], NumberStyles.HexNumber);
else if (args[0] == "SSP") ssp = int.Parse(args[1], NumberStyles.HexNumber);
else if (args[0] == "S") s = bool.Parse(args[1]);
else if (args[0] == "M") m = bool.Parse(args[1]);
- else if (args[0] == "TotalExecutedCycles") TotalExecutedCycles = int.Parse(args[1]);
- else if (args[0] == "PendingCycles") PendingCycles = int.Parse(args[1]);
+ else if (args[0] == nameof(TotalExecutedCycles)) TotalExecutedCycles = int.Parse(args[1]);
+ else if (args[0] == nameof(PendingCycles)) PendingCycles = int.Parse(args[1]);
else
Console.WriteLine("Skipping unrecognized identifier " + args[0]);
diff --git a/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs b/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs
index 8a4ced6fa0..f1b795f1b8 100644
--- a/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs
+++ b/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs
@@ -58,21 +58,21 @@ namespace BizHawk.Emulation.Cores.Components.CP1610
public void SyncState(Serializer ser)
{
- ser.BeginSection("CP1610");
+ ser.BeginSection(nameof(CP1610));
- ser.Sync("Register", ref Register, false);
- ser.Sync("FlagS", ref FlagS);
- ser.Sync("FlagC", ref FlagC);
- ser.Sync("FlagZ", ref FlagZ);
- ser.Sync("FlagO", ref FlagO);
- ser.Sync("FlagI", ref FlagI);
- ser.Sync("FlagD", ref FlagD);
- ser.Sync("IntRM", ref IntRM);
- ser.Sync("BusRq", ref BusRq);
- ser.Sync("BusAk", ref BusAk);
- ser.Sync("BusRq", ref BusRq);
- ser.Sync("Interruptible", ref Interruptible);
- ser.Sync("Interrupted", ref Interrupted);
+ ser.Sync(nameof(Register), ref Register, false);
+ ser.Sync(nameof(FlagS), ref FlagS);
+ ser.Sync(nameof(FlagC), ref FlagC);
+ ser.Sync(nameof(FlagZ), ref FlagZ);
+ ser.Sync(nameof(FlagO), ref FlagO);
+ ser.Sync(nameof(FlagI), ref FlagI);
+ ser.Sync(nameof(FlagD), ref FlagD);
+ ser.Sync(nameof(IntRM), ref IntRM);
+ ser.Sync(nameof(BusRq), ref BusRq);
+ ser.Sync(nameof(BusAk), ref BusAk);
+ ser.Sync(nameof(BusRq), ref BusRq);
+ ser.Sync(nameof(Interruptible), ref Interruptible);
+ ser.Sync(nameof(Interrupted), ref Interrupted);
ser.Sync("Toal_executed_cycles", ref TotalExecutedCycles);
ser.Sync("Pending_Cycles", ref PendingCycles);
diff --git a/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs b/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs
index 9e2e8ad470..27a93c5d2d 100644
--- a/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs
+++ b/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs
@@ -70,28 +70,28 @@ namespace BizHawk.Emulation.Cores.Components.H6280
public void SyncState(Serializer ser)
{
- ser.BeginSection("HuC6280");
- ser.Sync("A", ref A);
- ser.Sync("X", ref X);
- ser.Sync("Y", ref Y);
- ser.Sync("P", ref P);
- ser.Sync("PC", ref PC);
- ser.Sync("S", ref S);
- ser.Sync("MPR", ref MPR, false);
- ser.Sync("LagIFlag", ref LagIFlag);
- ser.Sync("IRQ1Assert", ref IRQ1Assert);
- ser.Sync("IRQ2Assert", ref IRQ2Assert);
- ser.Sync("TimerAssert", ref TimerAssert);
- ser.Sync("IRQControlByte", ref IRQControlByte);
- ser.Sync("IRQNextControlByte", ref IRQNextControlByte);
+ ser.BeginSection(nameof(HuC6280));
+ ser.Sync(nameof(A), ref A);
+ ser.Sync(nameof(X), ref X);
+ ser.Sync(nameof(Y), ref Y);
+ ser.Sync(nameof(P), ref P);
+ ser.Sync(nameof(PC), ref PC);
+ ser.Sync(nameof(S), ref S);
+ ser.Sync(nameof(MPR), ref MPR, false);
+ ser.Sync(nameof(LagIFlag), ref LagIFlag);
+ ser.Sync(nameof(IRQ1Assert), ref IRQ1Assert);
+ ser.Sync(nameof(IRQ2Assert), ref IRQ2Assert);
+ ser.Sync(nameof(TimerAssert), ref TimerAssert);
+ ser.Sync(nameof(IRQControlByte), ref IRQControlByte);
+ ser.Sync(nameof(IRQNextControlByte), ref IRQNextControlByte);
ser.Sync("ExecutedCycles", ref TotalExecutedCycles);
- ser.Sync("PendingCycles", ref PendingCycles);
- ser.Sync("LowSpeed", ref LowSpeed);
- ser.Sync("TimerTickCounter", ref TimerTickCounter);
- ser.Sync("TimerReloadValue", ref TimerReloadValue);
- ser.Sync("TimerValue", ref TimerValue);
- ser.Sync("TimerEnabled", ref TimerEnabled);
- ser.Sync("InBlockTransfer", ref InBlockTransfer);
+ ser.Sync(nameof(PendingCycles), ref PendingCycles);
+ ser.Sync(nameof(LowSpeed), ref LowSpeed);
+ ser.Sync(nameof(TimerTickCounter), ref TimerTickCounter);
+ ser.Sync(nameof(TimerReloadValue), ref TimerReloadValue);
+ ser.Sync(nameof(TimerValue), ref TimerValue);
+ ser.Sync(nameof(TimerEnabled), ref TimerEnabled);
+ ser.Sync(nameof(InBlockTransfer), ref InBlockTransfer);
ser.Sync("BTFrom", ref btFrom);
ser.Sync("BTTo", ref btTo);
ser.Sync("BTLen", ref btLen);
diff --git a/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs b/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs
index 063b41ee5c..a4e26f5a7c 100644
--- a/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs
+++ b/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs
@@ -591,29 +591,29 @@ namespace BizHawk.Emulation.Common.Components.LR35902
public void SyncState(Serializer ser)
{
- ser.BeginSection("LR35902");
- ser.Sync("Regs", ref Regs, false);
+ ser.BeginSection(nameof(LR35902));
+ ser.Sync(nameof(Regs), ref Regs, false);
ser.Sync("IRQ", ref interrupts_enabled);
- ser.Sync("I_use", ref I_use);
- ser.Sync("skip_once", ref skip_once);
- ser.Sync("Halt_bug_2", ref Halt_bug_2);
- ser.Sync("Halt_bug_3", ref Halt_bug_3);
+ ser.Sync(nameof(I_use), ref I_use);
+ ser.Sync(nameof(skip_once), ref skip_once);
+ ser.Sync(nameof(Halt_bug_2), ref Halt_bug_2);
+ ser.Sync(nameof(Halt_bug_3), ref Halt_bug_3);
ser.Sync("Halted", ref halted);
ser.Sync("ExecutedCycles", ref totalExecutedCycles);
- ser.Sync("EI_pending", ref EI_pending);
- ser.Sync("int_src", ref int_src);
- ser.Sync("stop_time", ref stop_time);
- ser.Sync("stop_check", ref stop_check);
- ser.Sync("is_GBC", ref is_GBC);
+ ser.Sync(nameof(EI_pending), ref EI_pending);
+ ser.Sync(nameof(int_src), ref int_src);
+ ser.Sync(nameof(stop_time), ref stop_time);
+ ser.Sync(nameof(stop_check), ref stop_check);
+ ser.Sync(nameof(is_GBC), ref is_GBC);
- ser.Sync("instr_pntr", ref instr_pntr);
- ser.Sync("cur_instr", ref cur_instr, false);
- ser.Sync("CB Preifx", ref CB_prefix);
+ ser.Sync(nameof(instr_pntr), ref instr_pntr);
+ ser.Sync(nameof(cur_instr), ref cur_instr, false);
+ ser.Sync("CB Prefix", ref CB_prefix);
ser.Sync("Stopped", ref stopped);
- ser.Sync("opcode", ref opcode);
- ser.Sync("jammped", ref jammed);
- ser.Sync("LY", ref LY);
- ser.Sync("FlagI", ref FlagI);
+ ser.Sync(nameof(opcode), ref opcode);
+ ser.Sync(nameof(jammed), ref jammed);
+ ser.Sync(nameof(LY), ref LY);
+ ser.Sync(nameof(FlagI), ref FlagI);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs
index 2b0965e0ed..5fc328f146 100644
--- a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs
+++ b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs
@@ -126,28 +126,28 @@ namespace BizHawk.Emulation.Cores.Components.M6502
public void SyncState(Serializer ser)
{
- ser.BeginSection("MOS6502X");
- ser.Sync("A", ref A);
- ser.Sync("X", ref X);
- ser.Sync("Y", ref Y);
- ser.Sync("P", ref P);
- ser.Sync("PC", ref PC);
- ser.Sync("S", ref S);
- ser.Sync("NMI", ref NMI);
- ser.Sync("IRQ", ref IRQ);
- ser.Sync("RDY", ref RDY);
- ser.Sync("TotalExecutedCycles", ref TotalExecutedCycles);
- ser.Sync("opcode", ref opcode);
- ser.Sync("opcode2", ref opcode2);
- ser.Sync("opcode3", ref opcode3);
- ser.Sync("ea", ref ea);
- ser.Sync("alu_temp", ref alu_temp);
- ser.Sync("mi", ref mi);
- ser.Sync("iflag_pending", ref iflag_pending);
- ser.Sync("interrupt_pending", ref interrupt_pending);
- ser.Sync("branch_irq_hack", ref branch_irq_hack);
- ser.Sync("rdy_freeze", ref rdy_freeze);
- ser.Sync("ext_ppu_cycle", ref ext_ppu_cycle);
+ ser.BeginSection(nameof(MOS6502X));
+ ser.Sync(nameof(A), ref A);
+ ser.Sync(nameof(X), ref X);
+ ser.Sync(nameof(Y), ref Y);
+ ser.Sync(nameof(P), ref P);
+ ser.Sync(nameof(PC), ref PC);
+ ser.Sync(nameof(S), ref S);
+ ser.Sync(nameof(NMI), ref NMI);
+ ser.Sync(nameof(IRQ), ref IRQ);
+ ser.Sync(nameof(RDY), ref RDY);
+ ser.Sync(nameof(TotalExecutedCycles), ref TotalExecutedCycles);
+ ser.Sync(nameof(opcode), ref opcode);
+ ser.Sync(nameof(opcode2), ref opcode2);
+ ser.Sync(nameof(opcode3), ref opcode3);
+ ser.Sync(nameof(ea), ref ea);
+ ser.Sync(nameof(alu_temp), ref alu_temp);
+ ser.Sync(nameof(mi), ref mi);
+ ser.Sync(nameof(iflag_pending), ref iflag_pending);
+ ser.Sync(nameof(interrupt_pending), ref interrupt_pending);
+ ser.Sync(nameof(branch_irq_hack), ref branch_irq_hack);
+ ser.Sync(nameof(rdy_freeze), ref rdy_freeze);
+ ser.Sync(nameof(ext_ppu_cycle), ref ext_ppu_cycle);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs b/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs
index 6de41ae296..8560300319 100644
--- a/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs
+++ b/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs
@@ -839,38 +839,38 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
// State Save/Load
public void SyncState(Serializer ser)
{
- ser.BeginSection("Z80A");
- ser.Sync("Regs", ref Regs, false);
+ ser.BeginSection(nameof(Z80A));
+ ser.Sync(nameof(Regs), ref Regs, false);
ser.Sync("NMI", ref nonMaskableInterrupt);
ser.Sync("NMIPending", ref nonMaskableInterruptPending);
ser.Sync("IM", ref interruptMode);
ser.Sync("IFF1", ref iff1);
ser.Sync("IFF2", ref iff2);
ser.Sync("Halted", ref halted);
- ser.Sync("I_skip", ref I_skip);
+ ser.Sync(nameof(I_skip), ref I_skip);
ser.Sync("ExecutedCycles", ref TotalExecutedCycles);
- ser.Sync("EI_pending", ref EI_pending);
+ ser.Sync(nameof(EI_pending), ref EI_pending);
- ser.Sync("instr_pntr", ref instr_pntr);
- ser.Sync("bus_pntr", ref bus_pntr);
- ser.Sync("mem_pntr", ref mem_pntr);
- ser.Sync("irq_pntr", ref irq_pntr);
- ser.Sync("cur_instr", ref cur_instr, false);
- ser.Sync("BUSRQ", ref BUSRQ, false);
- ser.Sync("IRQS", ref IRQS);
- ser.Sync("MEMRQ", ref MEMRQ, false);
- ser.Sync("opcode", ref opcode);
- ser.Sync("FlagI", ref FlagI);
- ser.Sync("FlagW", ref FlagW);
+ ser.Sync(nameof(instr_pntr), ref instr_pntr);
+ ser.Sync(nameof(bus_pntr), ref bus_pntr);
+ ser.Sync(nameof(mem_pntr), ref mem_pntr);
+ ser.Sync(nameof(irq_pntr), ref irq_pntr);
+ ser.Sync(nameof(cur_instr), ref cur_instr, false);
+ ser.Sync(nameof(BUSRQ), ref BUSRQ, false);
+ ser.Sync(nameof(IRQS), ref IRQS);
+ ser.Sync(nameof(MEMRQ), ref MEMRQ, false);
+ ser.Sync(nameof(opcode), ref opcode);
+ ser.Sync(nameof(FlagI), ref FlagI);
+ ser.Sync(nameof(FlagW), ref FlagW);
- ser.Sync("NO Preifx", ref NO_prefix);
- ser.Sync("CB Preifx", ref CB_prefix);
- ser.Sync("IX_prefix", ref IX_prefix);
- ser.Sync("IY_prefix", ref IY_prefix);
- ser.Sync("IXCB_prefix", ref IXCB_prefix);
- ser.Sync("IYCB_prefix", ref IYCB_prefix);
- ser.Sync("EXTD_prefix", ref EXTD_prefix);
- ser.Sync("PRE_SRC", ref PRE_SRC);
+ ser.Sync(nameof(NO_prefix), ref NO_prefix);
+ ser.Sync(nameof(CB_prefix), ref CB_prefix);
+ ser.Sync(nameof(IX_prefix), ref IX_prefix);
+ ser.Sync(nameof(IY_prefix), ref IY_prefix);
+ ser.Sync(nameof(IXCB_prefix), ref IXCB_prefix);
+ ser.Sync(nameof(IYCB_prefix), ref IYCB_prefix);
+ ser.Sync(nameof(EXTD_prefix), ref EXTD_prefix);
+ ser.Sync(nameof(PRE_SRC), ref PRE_SRC);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IStatable.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IStatable.cs
index d2bd9192ca..9c18bcbf70 100644
--- a/BizHawk.Emulation.Cores/Calculator/TI83.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Calculator/TI83.IStatable.cs
@@ -52,7 +52,7 @@ namespace BizHawk.Emulation.Cores.Calculators
}
_cpu.SyncState(ser);
- ser.BeginSection("TI83");
+ ser.BeginSection(nameof(TI83));
ser.Sync("RAM", ref _ram, false);
ser.Sync("romPageLow3Bits", ref _romPageLow3Bits);
ser.Sync("romPageHighBit", ref _romPageHighBit);
@@ -69,14 +69,14 @@ namespace BizHawk.Emulation.Cores.Calculators
ser.Sync("Frame", ref _frame);
ser.Sync("LagCount", ref _lagCount);
ser.Sync("IsLag", ref _isLag);
- ser.Sync("ON_key_int", ref ON_key_int);
- ser.Sync("ON_key_int_EN", ref ON_key_int_EN);
- ser.Sync("TIM_1_int", ref TIM_1_int);
- ser.Sync("TIM_1_int_EN", ref TIM_1_int_EN);
- ser.Sync("TIM_frq", ref TIM_frq);
- ser.Sync("TIM_mult", ref TIM_mult);
- ser.Sync("TIM_count", ref TIM_count);
- ser.Sync("TIM_hit", ref TIM_hit);
+ ser.Sync(nameof(ON_key_int), ref ON_key_int);
+ ser.Sync(nameof(ON_key_int_EN), ref ON_key_int_EN);
+ ser.Sync(nameof(TIM_1_int), ref TIM_1_int);
+ ser.Sync(nameof(TIM_1_int_EN), ref TIM_1_int_EN);
+ ser.Sync(nameof(TIM_frq), ref TIM_frq);
+ ser.Sync(nameof(TIM_mult), ref TIM_mult);
+ ser.Sync(nameof(TIM_count), ref TIM_count);
+ ser.Sync(nameof(TIM_hit), ref TIM_hit);
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IStatable.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IStatable.cs
index 910e618a17..7f006c8f23 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IStatable.cs
@@ -57,10 +57,10 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
if (ser.IsWriter)
{
- ser.SyncEnum("_machineType", ref _machineType);
+ ser.SyncEnum(nameof(_machineType), ref _machineType);
_cpu.SyncState(ser);
- ser.BeginSection("AmstradCPC");
+ ser.BeginSection(nameof(AmstradCPC));
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
@@ -71,7 +71,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
if (ser.IsReader)
{
var tmpM = _machineType;
- ser.SyncEnum("_machineType", ref _machineType);
+ ser.SyncEnum(nameof(_machineType), ref _machineType);
if (tmpM != _machineType && _machineType.ToString() != "72")
{
string msg = "SAVESTATE FAILED TO LOAD!!\n\n";
@@ -86,7 +86,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
else
{
_cpu.SyncState(ser);
- ser.BeginSection("AmstradCPC");
+ ser.BeginSection(nameof(AmstradCPC));
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs
index 7bc4c9c247..d9bb008f20 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs
@@ -824,15 +824,15 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
///
public void SyncState(Serializer ser)
{
- ser.BeginSection("DatacorderDevice");
- ser.Sync("counter", ref counter);
- ser.Sync("_currentDataBlockIndex", ref _currentDataBlockIndex);
- ser.Sync("_position", ref _position);
- ser.Sync("_tapeIsPlaying", ref _tapeIsPlaying);
- ser.Sync("_lastCycle", ref _lastCycle);
- ser.Sync("_waitEdge", ref _waitEdge);
- ser.Sync("currentState", ref currentState);
- ser.Sync("TapeMotor", ref tapeMotor);
+ ser.BeginSection(nameof(DatacorderDevice));
+ ser.Sync(nameof(counter), ref counter);
+ ser.Sync(nameof(_currentDataBlockIndex), ref _currentDataBlockIndex);
+ ser.Sync(nameof(_position), ref _position);
+ ser.Sync(nameof(_tapeIsPlaying), ref _tapeIsPlaying);
+ ser.Sync(nameof(_lastCycle), ref _lastCycle);
+ ser.Sync(nameof(_waitEdge), ref _waitEdge);
+ ser.Sync(nameof(currentState), ref currentState);
+ ser.Sync(nameof(tapeMotor), ref tapeMotor);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.Definitions.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.Definitions.cs
index ff1bacb223..950cb07d7b 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.Definitions.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.Definitions.cs
@@ -806,15 +806,15 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
ser.BeginSection("ActiveCmdParams");
- ser.Sync("UnitSelect", ref UnitSelect);
- ser.Sync("Side", ref Side);
- ser.Sync("Cylinder", ref Cylinder);
- ser.Sync("Head", ref Head);
- ser.Sync("Sector", ref Sector);
- ser.Sync("SectorSize", ref SectorSize);
- ser.Sync("EOT", ref EOT);
- ser.Sync("Gap3Length", ref Gap3Length);
- ser.Sync("DTL", ref DTL);
+ ser.Sync(nameof(UnitSelect), ref UnitSelect);
+ ser.Sync(nameof(Side), ref Side);
+ ser.Sync(nameof(Cylinder), ref Cylinder);
+ ser.Sync(nameof(Head), ref Head);
+ ser.Sync(nameof(Sector), ref Sector);
+ ser.Sync(nameof(SectorSize), ref SectorSize);
+ ser.Sync(nameof(EOT), ref EOT);
+ ser.Sync(nameof(Gap3Length), ref Gap3Length);
+ ser.Sync(nameof(DTL), ref DTL);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.FDD.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.FDD.cs
index ef04817a68..487048bbc6 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.FDD.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.FDD.cs
@@ -861,28 +861,28 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
- ser.Sync("ID", ref ID);
- ser.Sync("FLAG_WRITEPROTECT", ref FLAG_WRITEPROTECT);
- //ser.Sync("FLAG_DISKCHANGED", ref FLAG_DISKCHANGED);
- //ser.Sync("FLAG_RECALIBRATING", ref FLAG_RECALIBRATING);
- //ser.Sync("FLAG_SEEK_INTERRUPT", ref FLAG_SEEK_INTERRUPT);
- //ser.Sync("IntStatus", ref IntStatus);
- //ser.Sync("ST0", ref ST0);
- //ser.Sync("RecalibrationCounter", ref RecalibrationCounter);
- ser.Sync("SeekCounter", ref SeekCounter);
- ser.Sync("SeekStatus", ref SeekStatus);
- ser.Sync("SeekAge", ref SeekAge);
- ser.Sync("CurrentSide", ref CurrentSide);
- //ser.Sync("CurrentTrack", ref CurrentTrack);
- ser.Sync("TrackIndex", ref TrackIndex);
- ser.Sync("SeekingTrack", ref SeekingTrack);
- //ser.Sync("CurrentSector", ref CurrentSector);
- ser.Sync("SectorIndex", ref SectorIndex);
- //ser.Sync("RAngles", ref RAngles);
- //ser.Sync("DataPointer", ref DataPointer);
- //ser.SyncEnum("CurrentState", ref CurrentState);
- //ser.SyncEnum("SeekState", ref SeekState);
- //ser.SyncEnum("SeekIntState", ref SeekIntState);
+ ser.Sync(nameof(ID), ref ID);
+ ser.Sync(nameof(FLAG_WRITEPROTECT), ref FLAG_WRITEPROTECT);
+ //ser.Sync(nameof(FLAG_DISKCHANGED), ref FLAG_DISKCHANGED);
+ //ser.Sync(nameof(FLAG_RECALIBRATING), ref FLAG_RECALIBRATING);
+ //ser.Sync(nameof(FLAG_SEEK_INTERRUPT), ref FLAG_SEEK_INTERRUPT);
+ //ser.Sync(nameof(IntStatus), ref IntStatus);
+ //ser.Sync(nameof(ST0), ref ST0);
+ //ser.Sync(nameof(RecalibrationCounter), ref RecalibrationCounter);
+ ser.Sync(nameof(SeekCounter), ref SeekCounter);
+ ser.Sync(nameof(SeekStatus), ref SeekStatus);
+ ser.Sync(nameof(SeekAge), ref SeekAge);
+ ser.Sync(nameof(CurrentSide), ref CurrentSide);
+ //ser.Sync(nameof(CurrentTrack), ref CurrentTrack);
+ ser.Sync(nameof(TrackIndex), ref TrackIndex);
+ ser.Sync(nameof(SeekingTrack), ref SeekingTrack);
+ //ser.Sync(nameof(CurrentSector), ref CurrentSector);
+ ser.Sync(nameof(SectorIndex), ref SectorIndex);
+ //ser.Sync(nameof(RAngles), ref RAngles);
+ //ser.Sync(nameof(DataPointer), ref DataPointer);
+ //ser.SyncEnum(nameof(CurrentState), ref CurrentState);
+ //ser.SyncEnum(nameof(SeekState), ref SeekState);
+ //ser.SyncEnum(nameof(SeekIntState), ref SeekIntState);
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs
index 43f09fb829..a365a7b796 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs
@@ -159,7 +159,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
#region FDD
- ser.Sync("FDD_FLAG_MOTOR", ref FDD_FLAG_MOTOR);
+ ser.Sync(nameof(FDD_FLAG_MOTOR), ref FDD_FLAG_MOTOR);
for (int i = 0; i < 4; i++)
{
@@ -168,7 +168,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
ser.EndSection();
}
- ser.Sync("DiskDriveIndex", ref _diskDriveIndex);
+ ser.Sync(nameof(DiskDriveIndex), ref _diskDriveIndex);
// set active drive
DiskDriveIndex = _diskDriveIndex;
@@ -186,55 +186,55 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
#region Controller state
- ser.Sync("DriveLight", ref DriveLight);
- ser.SyncEnum("ActivePhase", ref ActivePhase);
- //ser.SyncEnum("ActiveDirection", ref ActiveDirection);
- ser.SyncEnum("ActiveInterrupt", ref ActiveInterrupt);
- ser.Sync("CommBuffer", ref CommBuffer, false);
- ser.Sync("CommCounter", ref CommCounter);
- ser.Sync("ResBuffer", ref ResBuffer, false);
- ser.Sync("ExecBuffer", ref ExecBuffer, false);
- ser.Sync("ExecCounter", ref ExecCounter);
- ser.Sync("ExecLength", ref ExecLength);
- ser.Sync("InterruptResultBuffer", ref InterruptResultBuffer, false);
- ser.Sync("ResCounter", ref ResCounter);
- ser.Sync("ResLength", ref ResLength);
- ser.Sync("LastSectorDataWriteByte", ref LastSectorDataWriteByte);
- ser.Sync("LastSectorDataReadByte", ref LastSectorDataReadByte);
- ser.Sync("LastByteReceived", ref LastByteReceived);
+ ser.Sync(nameof(DriveLight), ref DriveLight);
+ ser.SyncEnum(nameof(ActivePhase), ref ActivePhase);
+ //ser.SyncEnum(nameof(ActiveDirection), ref ActiveDirection);
+ ser.SyncEnum(nameof(ActiveInterrupt), ref ActiveInterrupt);
+ ser.Sync(nameof(CommBuffer), ref CommBuffer, false);
+ ser.Sync(nameof(CommCounter), ref CommCounter);
+ ser.Sync(nameof(ResBuffer), ref ResBuffer, false);
+ ser.Sync(nameof(ExecBuffer), ref ExecBuffer, false);
+ ser.Sync(nameof(ExecCounter), ref ExecCounter);
+ ser.Sync(nameof(ExecLength), ref ExecLength);
+ ser.Sync(nameof(InterruptResultBuffer), ref InterruptResultBuffer, false);
+ ser.Sync(nameof(ResCounter), ref ResCounter);
+ ser.Sync(nameof(ResLength), ref ResLength);
+ ser.Sync(nameof(LastSectorDataWriteByte), ref LastSectorDataWriteByte);
+ ser.Sync(nameof(LastSectorDataReadByte), ref LastSectorDataReadByte);
+ ser.Sync(nameof(LastByteReceived), ref LastByteReceived);
- ser.Sync("_cmdIndex", ref _cmdIndex);
+ ser.Sync(nameof(_cmdIndex), ref _cmdIndex);
// resync the ActiveCommand
CMDIndex = _cmdIndex;
ActiveCommandParams.SyncState(ser);
- ser.Sync("IndexPulseCounter", ref IndexPulseCounter);
- //ser.SyncEnum("_activeStatus", ref _activeStatus);
- //ser.SyncEnum("_statusRaised", ref _statusRaised);
+ ser.Sync(nameof(IndexPulseCounter), ref IndexPulseCounter);
+ //ser.SyncEnum(nameof(_activeStatus), ref _activeStatus);
+ //ser.SyncEnum(nameof(_statusRaised), ref _statusRaised);
- ser.Sync("CMD_FLAG_MT", ref CMD_FLAG_MT);
- ser.Sync("CMD_FLAG_MF", ref CMD_FLAG_MF);
- ser.Sync("CMD_FLAG_SK", ref CMD_FLAG_SK);
- ser.Sync("SRT", ref SRT);
- ser.Sync("HUT", ref HUT);
- ser.Sync("HLT", ref HLT);
- ser.Sync("ND", ref ND);
- ser.Sync("SRT_Counter", ref SRT_Counter);
- ser.Sync("HUT_Counter", ref HUT_Counter);
- ser.Sync("HLT_Counter", ref HLT_Counter);
+ ser.Sync(nameof(CMD_FLAG_MT), ref CMD_FLAG_MT);
+ ser.Sync(nameof(CMD_FLAG_MF), ref CMD_FLAG_MF);
+ ser.Sync(nameof(CMD_FLAG_SK), ref CMD_FLAG_SK);
+ ser.Sync(nameof(SRT), ref SRT);
+ ser.Sync(nameof(HUT), ref HUT);
+ ser.Sync(nameof(HLT), ref HLT);
+ ser.Sync(nameof(ND), ref ND);
+ ser.Sync(nameof(SRT_Counter), ref SRT_Counter);
+ ser.Sync(nameof(HUT_Counter), ref HUT_Counter);
+ ser.Sync(nameof(HLT_Counter), ref HLT_Counter);
- ser.Sync("SectorDelayCounter", ref SectorDelayCounter);
- ser.Sync("SectorID", ref SectorID);
+ ser.Sync(nameof(SectorDelayCounter), ref SectorDelayCounter);
+ ser.Sync(nameof(SectorID), ref SectorID);
#endregion
#region Timing
- ser.Sync("LastCPUCycle", ref LastCPUCycle);
- ser.Sync("StatusDelay", ref StatusDelay);
- ser.Sync("TickCounter", ref TickCounter);
- ser.Sync("DriveCycleCounter", ref DriveCycleCounter);
+ ser.Sync(nameof(LastCPUCycle), ref LastCPUCycle);
+ ser.Sync(nameof(StatusDelay), ref StatusDelay);
+ ser.Sync(nameof(TickCounter), ref TickCounter);
+ ser.Sync(nameof(DriveCycleCounter), ref DriveCycleCounter);
#endregion
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs
index 866fd627ca..56706302c3 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs
@@ -1262,34 +1262,34 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("GateArray");
- ser.SyncEnum("ChipType", ref ChipType);
- ser.Sync("_PENR", ref _PENR);
- ser.Sync("_INKR", ref _INKR);
- ser.Sync("_RMR", ref _RMR);
- ser.Sync("_RAMR", ref _RAMR);
- ser.Sync("ColourRegisters", ref ColourRegisters, false);
- ser.Sync("CurrentPen", ref CurrentPen);
- ser.Sync("ClockCounter", ref ClockCounter);
- ser.Sync("FrameClock", ref FrameClock);
- ser.Sync("FrameEnd", ref FrameEnd);
- ser.Sync("WaitLine", ref WaitLine);
- ser.Sync("_interruptCounter", ref _interruptCounter);
- ser.Sync("VSYNCDelay", ref VSYNCDelay);
- ser.Sync("ScreenMode", ref ScreenMode);
- ser.Sync("HSYNC", ref HSYNC);
- //ser.Sync("HSYNC_falling", ref HSYNC_falling);
- ser.Sync("HSYNC_counter", ref HSYNC_counter);
- ser.Sync("VSYNC", ref VSYNC);
- ser.Sync("InterruptRaised", ref InterruptRaised);
- ser.Sync("InterruptHoldCounter", ref InterruptHoldCounter);
- ser.Sync("_MA", ref _MA);
- ser.Sync("IsNewFrame", ref IsNewFrame);
- ser.Sync("IsNewLine", ref IsNewLine);
- ser.Sync("HCC", ref HCC);
- ser.Sync("VLC", ref VLC);
- ser.Sync("VideoByte1", ref VideoByte1);
- ser.Sync("VideoByte2", ref VideoByte2);
- ser.Sync("NextVidRamLine", ref NextVidRamLine, false);
+ ser.SyncEnum(nameof(ChipType), ref ChipType);
+ ser.Sync(nameof(_PENR), ref _PENR);
+ ser.Sync(nameof(_INKR), ref _INKR);
+ ser.Sync(nameof(_RMR), ref _RMR);
+ ser.Sync(nameof(_RAMR), ref _RAMR);
+ ser.Sync(nameof(ColourRegisters), ref ColourRegisters, false);
+ ser.Sync(nameof(CurrentPen), ref CurrentPen);
+ ser.Sync(nameof(ClockCounter), ref ClockCounter);
+ ser.Sync(nameof(FrameClock), ref FrameClock);
+ ser.Sync(nameof(FrameEnd), ref FrameEnd);
+ ser.Sync(nameof(WaitLine), ref WaitLine);
+ ser.Sync(nameof(_interruptCounter), ref _interruptCounter);
+ ser.Sync(nameof(VSYNCDelay), ref VSYNCDelay);
+ ser.Sync(nameof(ScreenMode), ref ScreenMode);
+ ser.Sync(nameof(HSYNC), ref HSYNC);
+ //ser.Sync(nameof(HSYNC_falling), ref HSYNC_falling);
+ ser.Sync(nameof(HSYNC_counter), ref HSYNC_counter);
+ ser.Sync(nameof(VSYNC), ref VSYNC);
+ ser.Sync(nameof(InterruptRaised), ref InterruptRaised);
+ ser.Sync(nameof(InterruptHoldCounter), ref InterruptHoldCounter);
+ ser.Sync(nameof(_MA), ref _MA);
+ ser.Sync(nameof(IsNewFrame), ref IsNewFrame);
+ ser.Sync(nameof(IsNewLine), ref IsNewLine);
+ ser.Sync(nameof(HCC), ref HCC);
+ ser.Sync(nameof(VLC), ref VLC);
+ ser.Sync(nameof(VideoByte1), ref VideoByte1);
+ ser.Sync(nameof(VideoByte2), ref VideoByte2);
+ ser.Sync(nameof(NextVidRamLine), ref NextVidRamLine, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRCT_6845.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRCT_6845.cs
index 8176b7db14..b68b4e8d21 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRCT_6845.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRCT_6845.cs
@@ -1182,24 +1182,24 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("CRTC");
- ser.SyncEnum("ChipType", ref ChipType);
- ser.Sync("HSYNC", ref HSYNC);
- ser.Sync("VSYNC", ref VSYNC);
- ser.Sync("DISPTMG", ref DISPTMG);
- ser.Sync("MA", ref MA);
- ser.Sync("CurrentByteAddress", ref CurrentByteAddress);
- ser.Sync("ByteCounter", ref ByteCounter);
- ser.Sync("Regs", ref Regs, false);
- ser.Sync("SelectedRegister", ref SelectedRegister);
- ser.Sync("HCC", ref HCC);
- ser.Sync("VCC", ref VCC);
- ser.Sync("VLC", ref VLC);
- ser.Sync("CycleCounter", ref CycleCounter);
- ser.Sync("EndOfScreen", ref EndOfScreen);
- ser.Sync("HSYNCWidth", ref HSYNCWidth);
- ser.Sync("HSYNCCounter", ref HSYNCCounter);
- ser.Sync("VSYNCWidth", ref VSYNCWidth);
- ser.Sync("VSYNCCounter", ref VSYNCCounter);
+ ser.SyncEnum(nameof(ChipType), ref ChipType);
+ ser.Sync(nameof(HSYNC), ref HSYNC);
+ ser.Sync(nameof(VSYNC), ref VSYNC);
+ ser.Sync(nameof(DISPTMG), ref DISPTMG);
+ ser.Sync(nameof(MA), ref MA);
+ ser.Sync(nameof(CurrentByteAddress), ref CurrentByteAddress);
+ ser.Sync(nameof(ByteCounter), ref ByteCounter);
+ ser.Sync(nameof(Regs), ref Regs, false);
+ ser.Sync(nameof(SelectedRegister), ref SelectedRegister);
+ ser.Sync(nameof(HCC), ref HCC);
+ ser.Sync(nameof(VCC), ref VCC);
+ ser.Sync(nameof(VLC), ref VLC);
+ ser.Sync(nameof(CycleCounter), ref CycleCounter);
+ ser.Sync(nameof(EndOfScreen), ref EndOfScreen);
+ ser.Sync(nameof(HSYNCWidth), ref HSYNCWidth);
+ ser.Sync(nameof(HSYNCCounter), ref HSYNCCounter);
+ ser.Sync(nameof(VSYNCWidth), ref VSYNCWidth);
+ ser.Sync(nameof(VSYNCCounter), ref VSYNCCounter);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTC6845.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTC6845.cs
index 6e2fa4c2cf..6c9c4c50cc 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTC6845.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTC6845.cs
@@ -2326,44 +2326,39 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("CRCT");
- ser.SyncEnum("ChipType", ref ChipType);
- ser.Sync("_VSYNC", ref _VSYNC);
- ser.Sync("_HSYNC", ref _HSYNC);
- ser.Sync("_DISPTMG", ref _DISPTMG);
- ser.Sync("_CUDISP", ref _CUDISP);
- ser.Sync("_CLK", ref _CLK);
- ser.Sync("_RESET", ref _RESET);
- ser.Sync("_LPSTB", ref _LPSTB);
- ser.Sync("AddressRegister", ref AddressRegister);
- ser.Sync("Register", ref Register, false);
- ser.Sync("StatusRegister", ref StatusRegister);
- ser.Sync("_CharacterCTR", ref _CharacterCTR);
- ser.Sync("_HorizontalSyncWidthCTR", ref _HorizontalSyncWidthCTR);
- ser.Sync("_LineCTR", ref _LineCTR);
- ser.Sync("_RasterCTR", ref _RasterCTR);
- ser.Sync("StartAddressLatch)", ref StartAddressLatch);
- //ser.Sync("VDisplay", ref VDisplay);
- //ser.Sync("HDisplay", ref HDisplay);
- ser.Sync("RowSelects", ref RowSelects);
- ser.Sync("DISPTMG_Delay_Counter", ref DISPTMG_Delay_Counter);
- ser.Sync("CUDISP_Delay_Counter", ref CUDISP_Delay_Counter);
- ser.Sync("AsicStatusRegister1", ref AsicStatusRegister1);
- ser.Sync("AsicStatusRegister2", ref AsicStatusRegister2);
- ser.Sync("LAG_Counter", ref LAG_Counter);
- ser.Sync("LAG_Counter_Latch", ref LAG_Counter_Latch);
- ser.Sync("LAG_Counter_RowLatch", ref LAG_Counter_RowLatch);
- ser.Sync("s_VS", ref s_VS);
- ser.Sync("s_HDISP", ref s_VS);
- ser.Sync("s_VDISP", ref s_VDISP);
- ser.Sync("s_HSYNC", ref s_HSYNC);
- ser.Sync("CUR_Field_Counter", ref CUR_Field_Counter);
- //ser.Sync("VS", ref VS);
+ ser.SyncEnum(nameof(ChipType), ref ChipType);
+ ser.Sync(nameof(_VSYNC), ref _VSYNC);
+ ser.Sync(nameof(_HSYNC), ref _HSYNC);
+ ser.Sync(nameof(_DISPTMG), ref _DISPTMG);
+ ser.Sync(nameof(_CUDISP), ref _CUDISP);
+ ser.Sync(nameof(_CLK), ref _CLK);
+ ser.Sync(nameof(_RESET), ref _RESET);
+ ser.Sync(nameof(_LPSTB), ref _LPSTB);
+ ser.Sync(nameof(AddressRegister), ref AddressRegister);
+ ser.Sync(nameof(Register), ref Register, false);
+ ser.Sync(nameof(StatusRegister), ref StatusRegister);
+ ser.Sync(nameof(_CharacterCTR), ref _CharacterCTR);
+ ser.Sync(nameof(_HorizontalSyncWidthCTR), ref _HorizontalSyncWidthCTR);
+ ser.Sync(nameof(_LineCTR), ref _LineCTR);
+ ser.Sync(nameof(_RasterCTR), ref _RasterCTR);
+ ser.Sync(nameof(StartAddressLatch), ref StartAddressLatch);
+ //ser.Sync(nameof(VDisplay), ref VDisplay);
+ //ser.Sync(nameof(HDisplay), ref HDisplay);
+ ser.Sync(nameof(RowSelects), ref RowSelects);
+ ser.Sync(nameof(DISPTMG_Delay_Counter), ref DISPTMG_Delay_Counter);
+ ser.Sync(nameof(CUDISP_Delay_Counter), ref CUDISP_Delay_Counter);
+ ser.Sync(nameof(AsicStatusRegister1), ref AsicStatusRegister1);
+ ser.Sync(nameof(AsicStatusRegister2), ref AsicStatusRegister2);
+ ser.Sync(nameof(LAG_Counter), ref LAG_Counter);
+ ser.Sync(nameof(LAG_Counter_Latch), ref LAG_Counter_Latch);
+ ser.Sync(nameof(LAG_Counter_RowLatch), ref LAG_Counter_RowLatch);
+ ser.Sync(nameof(s_VS), ref s_VS);
+ ser.Sync(nameof(s_HDISP), ref s_VS);
+ ser.Sync(nameof(s_VDISP), ref s_VDISP);
+ ser.Sync(nameof(s_HSYNC), ref s_HSYNC);
+ ser.Sync(nameof(CUR_Field_Counter), ref CUR_Field_Counter);
+ //ser.Sync(nameof(VS), ref VS);
ser.EndSection();
-
- /*
- * int ;
- int ;
- * */
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTDevice.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTDevice.cs
index 5f318c47be..b9d83a4723 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTDevice.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/CRTDevice.cs
@@ -256,8 +256,8 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
ser.Sync("BufferHeight", ref _bufferHeight);
ser.Sync("VirtualHeight", ref _virtualHeight);
ser.Sync("VirtualWidth", ref _virtualWidth);
- ser.Sync("ScreenBuffer", ref ScreenBuffer, false);
- ser.Sync("ScanlineCounter", ref ScanlineCounter);
+ ser.Sync(nameof(ScreenBuffer), ref ScreenBuffer, false);
+ ser.Sync(nameof(ScanlineCounter), ref ScanlineCounter);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI/PPI_8255.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI/PPI_8255.cs
index 921bf2a332..0f6599c4dd 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI/PPI_8255.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI/PPI_8255.cs
@@ -455,7 +455,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("PPI");
- ser.Sync("Regs", ref Regs, false);
+ ser.Sync(nameof(Regs), ref Regs, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/AY38912.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/AY38912.cs
index 2e2b2f0bc0..97c4a964db 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/AY38912.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/AY38912.cs
@@ -827,50 +827,50 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
ser.BeginSection("PSG-AY");
- ser.Sync("ActiveFunction", ref ActiveFunction);
+ ser.Sync(nameof(ActiveFunction), ref ActiveFunction);
- ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
- ser.Sync("_sampleRate", ref _sampleRate);
- ser.Sync("_samplesPerFrame", ref _samplesPerFrame);
- //ser.Sync("_tStatesPerSample", ref _tStatesPerSample);
- ser.Sync("_audioBufferIndex", ref _audioBufferIndex);
- ser.Sync("_audioBuffer", ref _audioBuffer, false);
- ser.Sync("PortAInput", ref PortAInput);
- ser.Sync("PortBInput", ref PortBInput);
+ ser.Sync(nameof(_tStatesPerFrame), ref _tStatesPerFrame);
+ ser.Sync(nameof(_sampleRate), ref _sampleRate);
+ ser.Sync(nameof(_samplesPerFrame), ref _samplesPerFrame);
+ //ser.Sync(nameof(_tStatesPerSample), ref _tStatesPerSample);
+ ser.Sync(nameof(_audioBufferIndex), ref _audioBufferIndex);
+ ser.Sync(nameof(_audioBuffer), ref _audioBuffer, false);
+ ser.Sync(nameof(PortAInput), ref PortAInput);
+ ser.Sync(nameof(PortBInput), ref PortBInput);
- ser.Sync("_registers", ref _registers, false);
- ser.Sync("_activeRegister", ref _activeRegister);
- ser.Sync("_bitA", ref _bitA);
- ser.Sync("_bitB", ref _bitB);
- ser.Sync("_bitC", ref _bitC);
- ser.Sync("_eState", ref _eState);
- ser.Sync("_eDirection", ref _eDirection);
- ser.Sync("_noiseSeed", ref _noiseSeed);
- ser.Sync("_bit0", ref _bit0);
- ser.Sync("_bit1", ref _bit1);
- ser.Sync("_bit2", ref _bit2);
- ser.Sync("_bit3", ref _bit3);
- ser.Sync("_bit4", ref _bit4);
- ser.Sync("_bit5", ref _bit5);
- ser.Sync("_bitN", ref _bitN);
- ser.Sync("_eMaskA", ref _eMaskA);
- ser.Sync("_eMaskB", ref _eMaskB);
- ser.Sync("_eMaskC", ref _eMaskC);
- ser.Sync("_vA", ref _vA);
- ser.Sync("_vB", ref _vB);
- ser.Sync("_vC", ref _vC);
- ser.Sync("_countA", ref _countA);
- ser.Sync("_countB", ref _countB);
- ser.Sync("_countC", ref _countC);
- ser.Sync("_countE", ref _countE);
- ser.Sync("_countN", ref _countN);
- ser.Sync("_dividerA", ref _dividerA);
- ser.Sync("_dividerB", ref _dividerB);
- ser.Sync("_dividerC", ref _dividerC);
- ser.Sync("_dividerE", ref _dividerE);
- ser.Sync("_dividerN", ref _dividerN);
- ser.SyncEnum("_currentPanTab", ref _currentPanTab);
- ser.Sync("_volume", ref nullDump);
+ ser.Sync(nameof(_registers), ref _registers, false);
+ ser.Sync(nameof(_activeRegister), ref _activeRegister);
+ ser.Sync(nameof(_bitA), ref _bitA);
+ ser.Sync(nameof(_bitB), ref _bitB);
+ ser.Sync(nameof(_bitC), ref _bitC);
+ ser.Sync(nameof(_eState), ref _eState);
+ ser.Sync(nameof(_eDirection), ref _eDirection);
+ ser.Sync(nameof(_noiseSeed), ref _noiseSeed);
+ ser.Sync(nameof(_bit0), ref _bit0);
+ ser.Sync(nameof(_bit1), ref _bit1);
+ ser.Sync(nameof(_bit2), ref _bit2);
+ ser.Sync(nameof(_bit3), ref _bit3);
+ ser.Sync(nameof(_bit4), ref _bit4);
+ ser.Sync(nameof(_bit5), ref _bit5);
+ ser.Sync(nameof(_bitN), ref _bitN);
+ ser.Sync(nameof(_eMaskA), ref _eMaskA);
+ ser.Sync(nameof(_eMaskB), ref _eMaskB);
+ ser.Sync(nameof(_eMaskC), ref _eMaskC);
+ ser.Sync(nameof(_vA), ref _vA);
+ ser.Sync(nameof(_vB), ref _vB);
+ ser.Sync(nameof(_vC), ref _vC);
+ ser.Sync(nameof(_countA), ref _countA);
+ ser.Sync(nameof(_countB), ref _countB);
+ ser.Sync(nameof(_countC), ref _countC);
+ ser.Sync(nameof(_countE), ref _countE);
+ ser.Sync(nameof(_countN), ref _countN);
+ ser.Sync(nameof(_dividerA), ref _dividerA);
+ ser.Sync(nameof(_dividerB), ref _dividerB);
+ ser.Sync(nameof(_dividerC), ref _dividerC);
+ ser.Sync(nameof(_dividerE), ref _dividerE);
+ ser.Sync(nameof(_dividerN), ref _dividerN);
+ ser.SyncEnum(nameof(_currentPanTab), ref _currentPanTab);
+ ser.Sync(nameof(_volume), ref nullDump);
for (int i = 0; i < 6; i++)
{
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/Beeper.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/Beeper.cs
index 5f1f96c92e..cd2732bb21 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/Beeper.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/Beeper.cs
@@ -202,10 +202,10 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("Buzzer");
- ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
- ser.Sync("_sampleRate", ref _sampleRate);
- ser.Sync("LastPulse", ref LastPulse);
- ser.Sync("LastPulseTState", ref LastPulseTState);
+ ser.Sync(nameof(_tStatesPerFrame), ref _tStatesPerFrame);
+ ser.Sync(nameof(_sampleRate), ref _sampleRate);
+ ser.Sync(nameof(LastPulse), ref LastPulse);
+ ser.Sync(nameof(LastPulseTState), ref LastPulseTState);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs
index 0fb5f9a916..a3c87688f2 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs
@@ -319,29 +319,29 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public void SyncState(Serializer ser)
{
ser.BeginSection("CPCMachine");
- ser.Sync("FrameCompleted", ref FrameCompleted);
- ser.Sync("OverFlow", ref OverFlow);
- ser.Sync("FrameCount", ref FrameCount);
- ser.Sync("_frameCycles", ref _frameCycles);
- ser.Sync("inputRead", ref inputRead);
- ser.Sync("LastFrameStartCPUTick", ref LastFrameStartCPUTick);
- ser.Sync("ROMLower", ref ROMLower, false);
- ser.Sync("ROM0", ref ROM0, false);
- ser.Sync("ROM7", ref ROM7, false);
- ser.Sync("RAM0", ref RAM0, false);
- ser.Sync("RAM1", ref RAM1, false);
- ser.Sync("RAM2", ref RAM2, false);
- ser.Sync("RAM3", ref RAM3, false);
- ser.Sync("RAM4", ref RAM4, false);
- ser.Sync("RAM5", ref RAM5, false);
- ser.Sync("RAM6", ref RAM6, false);
- ser.Sync("RAM7", ref RAM7, false);
+ ser.Sync(nameof(FrameCompleted), ref FrameCompleted);
+ ser.Sync(nameof(OverFlow), ref OverFlow);
+ ser.Sync(nameof(FrameCount), ref FrameCount);
+ ser.Sync(nameof(_frameCycles), ref _frameCycles);
+ ser.Sync(nameof(inputRead), ref inputRead);
+ ser.Sync(nameof(LastFrameStartCPUTick), ref LastFrameStartCPUTick);
+ ser.Sync(nameof(ROMLower), ref ROMLower, false);
+ ser.Sync(nameof(ROM0), ref ROM0, false);
+ ser.Sync(nameof(ROM7), ref ROM7, false);
+ ser.Sync(nameof(RAM0), ref RAM0, false);
+ ser.Sync(nameof(RAM1), ref RAM1, false);
+ ser.Sync(nameof(RAM2), ref RAM2, false);
+ ser.Sync(nameof(RAM3), ref RAM3, false);
+ ser.Sync(nameof(RAM4), ref RAM4, false);
+ ser.Sync(nameof(RAM5), ref RAM5, false);
+ ser.Sync(nameof(RAM6), ref RAM6, false);
+ ser.Sync(nameof(RAM7), ref RAM7, false);
- ser.Sync("UpperROMPosition", ref UpperROMPosition);
- ser.Sync("UpperROMPaged", ref UpperROMPaged);
- ser.Sync("LowerROMPaged", ref LowerROMPaged);
- ser.Sync("RAMConfig", ref RAMConfig);
- ser.Sync("RAM64KBank", ref RAM64KBank);
+ ser.Sync(nameof(UpperROMPosition), ref UpperROMPosition);
+ ser.Sync(nameof(UpperROMPaged), ref UpperROMPaged);
+ ser.Sync(nameof(LowerROMPaged), ref LowerROMPaged);
+ ser.Sync(nameof(RAMConfig), ref RAMConfig);
+ ser.Sync(nameof(RAM64KBank), ref RAM64KBank);
CRCT.SyncState(ser);
//CRT.SyncState(ser);
@@ -350,13 +350,13 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
TapeBuzzer.SyncState(ser);
AYDevice.SyncState(ser);
- ser.Sync("tapeMediaIndex", ref tapeMediaIndex);
+ ser.Sync(nameof(tapeMediaIndex), ref tapeMediaIndex);
if (ser.IsReader)
TapeMediaIndex = tapeMediaIndex;
TapeDevice.SyncState(ser);
- ser.Sync("diskMediaIndex", ref diskMediaIndex);
+ ser.Sync(nameof(diskMediaIndex), ref diskMediaIndex);
if (ser.IsReader)
DiskMediaIndex = diskMediaIndex;
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCExtendedFloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCExtendedFloppyDisk.cs
index 07919dce7a..34be938128 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCExtendedFloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCExtendedFloppyDisk.cs
@@ -236,20 +236,20 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
}
// sync deterministic track and sector counters
- ser.Sync(" _randomCounter", ref _randomCounter);
+ ser.Sync(nameof( _randomCounter), ref _randomCounter);
RandomCounter = _randomCounter;
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCFloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCFloppyDisk.cs
index c30415842e..f1f875b95f 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCFloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/CPCFloppyDisk.cs
@@ -223,13 +223,13 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Tape/TapeDataBlock.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Tape/TapeDataBlock.cs
index 69086fc02d..8b0f9fafbc 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Tape/TapeDataBlock.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Tape/TapeDataBlock.cs
@@ -172,11 +172,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
ser.BeginSection("DataBlock" + blockPosition);
- ser.Sync("_blockID", ref _blockID);
- //ser.SyncFixedString("_blockDescription", ref _blockDescription, 200);
- ser.SyncEnum("_blockType", ref _blockType);
- ser.Sync("_blockData", ref _blockData, true);
- ser.SyncEnum("_command", ref _command);
+ ser.Sync(nameof(_blockID), ref _blockID);
+ //ser.SyncFixedString(nameof(_blockDescription), ref _blockDescription, 200);
+ ser.SyncEnum(nameof(_blockType), ref _blockType);
+ ser.Sync(nameof(_blockData), ref _blockData, true);
+ ser.SyncEnum(nameof(_command), ref _command);
int[] tempArray = null;
diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IStatable.cs b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IStatable.cs
index c3fa2f9aab..e7b748e46c 100644
--- a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IStatable.cs
@@ -41,13 +41,13 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
{
// this is much faster than other possibilities for serialization
w.WriteStartObject();
- w.WritePropertyName("Frame");
+ w.WritePropertyName(nameof(Frame));
w.WriteValue(Frame);
- w.WritePropertyName("LagCount");
+ w.WritePropertyName(nameof(LagCount));
w.WriteValue(LagCount);
- w.WritePropertyName("IsLagFrame");
+ w.WritePropertyName(nameof(IsLagFrame));
w.WriteValue(IsLagFrame);
- w.WritePropertyName("CurrentDisk");
+ w.WritePropertyName(nameof(CurrentDisk));
w.WriteValue(CurrentDisk);
w.WritePropertyName("PreviousDiskPressed");
w.WriteValue(_prevPressed);
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IStatable.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IStatable.cs
index 1bef375cba..d8c3e9840f 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IStatable.cs
@@ -43,11 +43,11 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
private void SyncState(Serializer ser)
{
ser.BeginSection("core");
- ser.Sync("_frameCycles", ref _frameCycles);
- ser.Sync("Frame", ref _frame);
- ser.Sync("IsLagFrame", ref _isLagFrame);
- ser.Sync("LagCount", ref _lagCount);
- ser.Sync("CurrentDisk", ref _currentDisk);
+ ser.Sync(nameof(_frameCycles), ref _frameCycles);
+ ser.Sync(nameof(Frame), ref _frame);
+ ser.Sync(nameof(IsLagFrame), ref _isLagFrame);
+ ser.Sync(nameof(LagCount), ref _lagCount);
+ ser.Sync(nameof(CurrentDisk), ref _currentDisk);
ser.Sync("PreviousDiskPressed", ref _prevPressed);
ser.Sync("NextDiskPressed", ref _nextPressed);
ser.BeginSection("Board");
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
index b4b5a7b9b1..d37a27590f 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs
@@ -278,83 +278,83 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
public void SyncState(Serializer ser)
{
- ser.BeginSection("Cia0");
+ ser.BeginSection(nameof(Cia0));
Cia0.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Cia1");
+ ser.BeginSection(nameof(Cia1));
Cia1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("ColorRam");
+ ser.BeginSection(nameof(ColorRam));
ColorRam.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Cpu");
+ ser.BeginSection(nameof(Cpu));
Cpu.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Pla");
+ ser.BeginSection(nameof(Pla));
Pla.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Ram");
+ ser.BeginSection(nameof(Ram));
Ram.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Sid");
+ ser.BeginSection(nameof(Sid));
Sid.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Vic");
+ ser.BeginSection(nameof(Vic));
Vic.SyncState(ser);
ser.EndSection();
if (CartPort.IsConnected)
{
- ser.BeginSection("CartPort");
+ ser.BeginSection(nameof(CartPort));
CartPort.SyncState(ser);
ser.EndSection();
}
- ser.BeginSection("Cassette");
+ ser.BeginSection(nameof(Cassette));
Cassette.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Serial");
+ ser.BeginSection(nameof(Serial));
Serial.SyncState(ser);
ser.EndSection();
if (TapeDrive != null) // TODO: a tape object is already in a nested class, is it the same reference? do we need this?
{
- ser.BeginSection("TapeDrive");
+ ser.BeginSection(nameof(TapeDrive));
TapeDrive.SyncState(ser);
ser.EndSection();
}
- ser.BeginSection("User");
+ ser.BeginSection(nameof(User));
User.SyncState(ser);
ser.EndSection();
if (DiskDrive != null) // TODO: a disk object is already in a nested class, is it the same reference? do we need this?
{
- ser.BeginSection("DiskDrive");
+ ser.BeginSection(nameof(DiskDrive));
DiskDrive.SyncState(ser);
ser.EndSection();
}
- ser.Sync("Bus", ref Bus);
- ser.Sync("InputRead", ref InputRead);
- ser.Sync("Irq", ref Irq);
- ser.Sync("Nmi", ref Nmi);
+ ser.Sync(nameof(Bus), ref Bus);
+ ser.Sync(nameof(InputRead), ref InputRead);
+ ser.Sync(nameof(Irq), ref Irq);
+ ser.Sync(nameof(Nmi), ref Nmi);
- ser.Sync("_lastReadVicAddress", ref _lastReadVicAddress);
- ser.Sync("_lastReadVicData", ref _lastReadVicData);
- ser.Sync("_vicBank", ref _vicBank);
+ ser.Sync(nameof(_lastReadVicAddress), ref _lastReadVicAddress);
+ ser.Sync(nameof(_lastReadVicData), ref _lastReadVicData);
+ ser.Sync(nameof(_vicBank), ref _vicBank);
- ser.Sync("_joystickPressed", ref _joystickPressed, useNull: false);
- ser.Sync("_keyboardPressed", ref _keyboardPressed, useNull: false);
- ser.Sync("_restorePressed", ref _restorePressed);
+ ser.Sync(nameof(_joystickPressed), ref _joystickPressed, useNull: false);
+ ser.Sync(nameof(_keyboardPressed), ref _keyboardPressed, useNull: false);
+ ser.Sync(nameof(_restorePressed), ref _restorePressed);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgeDevice.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgeDevice.cs
index 32dd387854..dd208242ab 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgeDevice.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgeDevice.cs
@@ -229,14 +229,14 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Cartridge
public virtual void SyncState(Serializer ser)
{
- ser.Sync("pinExRom", ref pinExRom);
- ser.Sync("pinGame", ref pinGame);
- ser.Sync("pinIRQ", ref pinIRQ);
- ser.Sync("pinNMI", ref pinNMI);
- ser.Sync("pinReset", ref pinReset);
+ ser.Sync(nameof(pinExRom), ref pinExRom);
+ ser.Sync(nameof(pinGame), ref pinGame);
+ ser.Sync(nameof(pinIRQ), ref pinIRQ);
+ ser.Sync(nameof(pinNMI), ref pinNMI);
+ ser.Sync(nameof(pinReset), ref pinReset);
- ser.Sync("_driveLightEnabled", ref _driveLightEnabled);
- ser.Sync("_driveLightOn", ref _driveLightOn);
+ ser.Sync(nameof(_driveLightEnabled), ref _driveLightEnabled);
+ ser.Sync(nameof(_driveLightOn), ref _driveLightOn);
}
public bool Valid => validCartridge;
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgePort.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgePort.cs
index 19570789ed..055f1fe0af 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgePort.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/CartridgePort.cs
@@ -127,9 +127,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Cartridge
public void SyncState(Serializer ser)
{
- ser.Sync("_connected", ref _connected);
+ ser.Sync(nameof(_connected), ref _connected);
- ser.BeginSection("CartridgeDevice");
+ ser.BeginSection(nameof(CartridgeDevice));
_cartridgeDevice.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper000F.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper000F.cs
index ae623445af..49cd16f657 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper000F.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/Cartridge/Mapper000F.cs
@@ -133,8 +133,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Cartridge
public override void SyncState(Serializer ser)
{
- ser.Sync("_bankMask", ref _bankMask);
- ser.Sync("_bankNumber", ref _bankNumber);
+ ser.Sync(nameof(_bankMask), ref _bankMask);
+ ser.Sync(nameof(_bankNumber), ref _bankNumber);
base.SyncState(ser);
if (ser.IsReader)
{
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip2114.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip2114.cs
index 506545a041..82ed244d69 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip2114.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip2114.cs
@@ -42,7 +42,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_ram", ref _ram, useNull: false);
+ ser.Sync(nameof(_ram), ref _ram, useNull: false);
}
public void Write(int addr, int val)
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip4864.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip4864.cs
index ebd81cd2d7..78367804a7 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip4864.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip4864.cs
@@ -48,7 +48,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_ram", ref _ram, useNull: false);
+ ser.Sync(nameof(_ram), ref _ram, useNull: false);
}
public void Write(int addr, int val)
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs
index 8d3e5125b0..dc99da4183 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs
@@ -219,14 +219,14 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
_cpu.SyncState(ser);
ser.EndSection();
- ser.Sync("_pinNmiLast", ref _pinNmiLast);
+ ser.Sync(nameof(_pinNmiLast), ref _pinNmiLast);
- ser.BeginSection("_port");
+ ser.BeginSection(nameof(_port));
_port.SyncState(ser);
ser.EndSection();
- ser.Sync("_thisNmi", ref _thisNmi);
- ser.Sync("LagCycles", ref LagCycles);
+ ser.Sync(nameof(_thisNmi), ref _thisNmi);
+ ser.Sync(nameof(LagCycles), ref LagCycles);
}
public void Write(int addr, int val)
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip90611401.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip90611401.cs
index a32f8c71b5..d01280b092 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip90611401.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip90611401.cs
@@ -307,20 +307,20 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_p24", ref _p24);
- ser.Sync("_p25", ref _p25);
- ser.Sync("_p26", ref _p26);
- ser.Sync("_p27", ref _p27);
- ser.Sync("_p28", ref _p28);
- ser.Sync("_loram", ref _loram);
- ser.Sync("_hiram", ref _hiram);
- ser.Sync("_game", ref _game);
- ser.Sync("_exrom", ref _exrom);
- ser.Sync("_charen", ref _charen);
- ser.Sync("_a15", ref _a15);
- ser.Sync("_a14", ref _a14);
- ser.Sync("_a13", ref _a13);
- ser.Sync("_a12", ref _a12);
+ ser.Sync(nameof(_p24), ref _p24);
+ ser.Sync(nameof(_p25), ref _p25);
+ ser.Sync(nameof(_p26), ref _p26);
+ ser.Sync(nameof(_p27), ref _p27);
+ ser.Sync(nameof(_p28), ref _p28);
+ ser.Sync(nameof(_loram), ref _loram);
+ ser.Sync(nameof(_hiram), ref _hiram);
+ ser.Sync(nameof(_game), ref _game);
+ ser.Sync(nameof(_exrom), ref _exrom);
+ ser.Sync(nameof(_charen), ref _charen);
+ ser.Sync(nameof(_a15), ref _a15);
+ ser.Sync(nameof(_a14), ref _a14);
+ ser.Sync(nameof(_a13), ref _a13);
+ ser.Sync(nameof(_a12), ref _a12);
}
public int VicRead(int addr)
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Cia.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Cia.cs
index dccf7bab2f..113c0fcfa6 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Cia.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Cia.cs
@@ -533,51 +533,51 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("DelayedInterrupts", ref DelayedInterrupts);
- ser.Sync("_pra", ref _pra);
- ser.Sync("_prb", ref _prb);
- ser.Sync("_ddra", ref _ddra);
- ser.Sync("_ddrb", ref _ddrb);
- ser.Sync("_ta", ref _ta);
- ser.Sync("_tb", ref _tb);
- ser.Sync("_latcha", ref _latcha);
- ser.Sync("_latchb", ref _latchb);
- ser.Sync("_tod10Ths", ref _tod10Ths);
- ser.Sync("_todSec", ref _todSec);
- ser.Sync("_todMin", ref _todMin);
- ser.Sync("_todHr", ref _todHr);
- ser.Sync("_latch10Ths", ref _latch10Ths);
- ser.Sync("_latchSec", ref _latchSec);
- ser.Sync("_latchMin", ref _latchMin);
- ser.Sync("_latchHr", ref _latchHr);
- ser.Sync("_alm10Ths", ref _alm10Ths);
- ser.Sync("_almSec", ref _almSec);
- ser.Sync("_almMin", ref _almMin);
- ser.Sync("_almHr", ref _almHr);
- ser.Sync("_sdr", ref _sdr);
- ser.Sync("_icr", ref _icr);
- ser.Sync("_cra", ref _cra);
- ser.Sync("_crb", ref _crb);
- ser.Sync("_intMask", ref _intMask);
- ser.Sync("_todLatch", ref _todLatch);
- ser.Sync("_taCntPhi2", ref _taCntPhi2);
- ser.Sync("_taCntCnt", ref _taCntCnt);
- ser.Sync("_tbCntPhi2", ref _tbCntPhi2);
- ser.Sync("_tbCntTa", ref _tbCntTa);
- ser.Sync("_tbCntCnt", ref _tbCntCnt);
- ser.Sync("_taIrqNextCycle", ref _taIrqNextCycle);
- ser.Sync("_taPrb6NegativeNextCycle", ref _taPrb6NegativeNextCycle);
- ser.Sync("_tbIrqNextCycle", ref _tbIrqNextCycle);
- ser.Sync("_tbPrb7NegativeNextCycle", ref _tbPrb7NegativeNextCycle);
- ser.Sync("_hasNewCra", ref _hasNewCra);
- ser.Sync("_hasNewCrb", ref _hasNewCrb);
- ser.SyncEnum("_taState", ref _taState);
- ser.SyncEnum("_tbState", ref _tbState);
- ser.Sync("_newCra", ref _newCra);
- ser.Sync("_newCrb", ref _newCrb);
- ser.Sync("_flagLatch", ref _flagLatch);
+ ser.Sync(nameof(DelayedInterrupts), ref DelayedInterrupts);
+ ser.Sync(nameof(_pra), ref _pra);
+ ser.Sync(nameof(_prb), ref _prb);
+ ser.Sync(nameof(_ddra), ref _ddra);
+ ser.Sync(nameof(_ddrb), ref _ddrb);
+ ser.Sync(nameof(_ta), ref _ta);
+ ser.Sync(nameof(_tb), ref _tb);
+ ser.Sync(nameof(_latcha), ref _latcha);
+ ser.Sync(nameof(_latchb), ref _latchb);
+ ser.Sync(nameof(_tod10Ths), ref _tod10Ths);
+ ser.Sync(nameof(_todSec), ref _todSec);
+ ser.Sync(nameof(_todMin), ref _todMin);
+ ser.Sync(nameof(_todHr), ref _todHr);
+ ser.Sync(nameof(_latch10Ths), ref _latch10Ths);
+ ser.Sync(nameof(_latchSec), ref _latchSec);
+ ser.Sync(nameof(_latchMin), ref _latchMin);
+ ser.Sync(nameof(_latchHr), ref _latchHr);
+ ser.Sync(nameof(_alm10Ths), ref _alm10Ths);
+ ser.Sync(nameof(_almSec), ref _almSec);
+ ser.Sync(nameof(_almMin), ref _almMin);
+ ser.Sync(nameof(_almHr), ref _almHr);
+ ser.Sync(nameof(_sdr), ref _sdr);
+ ser.Sync(nameof(_icr), ref _icr);
+ ser.Sync(nameof(_cra), ref _cra);
+ ser.Sync(nameof(_crb), ref _crb);
+ ser.Sync(nameof(_intMask), ref _intMask);
+ ser.Sync(nameof(_todLatch), ref _todLatch);
+ ser.Sync(nameof(_taCntPhi2), ref _taCntPhi2);
+ ser.Sync(nameof(_taCntCnt), ref _taCntCnt);
+ ser.Sync(nameof(_tbCntPhi2), ref _tbCntPhi2);
+ ser.Sync(nameof(_tbCntTa), ref _tbCntTa);
+ ser.Sync(nameof(_tbCntCnt), ref _tbCntCnt);
+ ser.Sync(nameof(_taIrqNextCycle), ref _taIrqNextCycle);
+ ser.Sync(nameof(_taPrb6NegativeNextCycle), ref _taPrb6NegativeNextCycle);
+ ser.Sync(nameof(_tbIrqNextCycle), ref _tbIrqNextCycle);
+ ser.Sync(nameof(_tbPrb7NegativeNextCycle), ref _tbPrb7NegativeNextCycle);
+ ser.Sync(nameof(_hasNewCra), ref _hasNewCra);
+ ser.Sync(nameof(_hasNewCrb), ref _hasNewCrb);
+ ser.SyncEnum(nameof(_taState), ref _taState);
+ ser.SyncEnum(nameof(_tbState), ref _tbState);
+ ser.Sync(nameof(_newCra), ref _newCra);
+ ser.Sync(nameof(_newCrb), ref _newCrb);
+ ser.Sync(nameof(_flagLatch), ref _flagLatch);
- ser.Sync("_todCounter", ref _todCounter);
+ ser.Sync(nameof(_todCounter), ref _todCounter);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/LatchedPort.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/LatchedPort.cs
index 70ec16bdf2..13d2e9a387 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/LatchedPort.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/LatchedPort.cs
@@ -37,8 +37,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("Direction", ref Direction);
- ser.Sync("Latch", ref Latch);
+ ser.Sync(nameof(Direction), ref Direction);
+ ser.Sync(nameof(Latch), ref Latch);
}
}
@@ -78,8 +78,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("Direction", ref Direction);
- ser.Sync("Latch", ref Latch);
+ ser.Sync(nameof(Direction), ref Direction);
+ ser.Sync(nameof(Latch), ref Latch);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Envelope.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Envelope.cs
index 9122c2d183..e011908307 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Envelope.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Envelope.cs
@@ -235,19 +235,19 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_attack", ref _attack);
- ser.Sync("_decay", ref _decay);
- ser.Sync("_delay", ref _delay);
- ser.Sync("_envCounter", ref _envCounter);
- ser.Sync("_expCounter", ref _expCounter);
- ser.Sync("_expPeriod", ref _expPeriod);
- ser.Sync("_freeze", ref _freeze);
- ser.Sync("_lfsr", ref _lfsr);
- ser.Sync("_gate", ref _gate);
- ser.Sync("_rate", ref _rate);
- ser.Sync("_release", ref _release);
- ser.Sync("_state", ref _state);
- ser.Sync("_sustain", ref _sustain);
+ ser.Sync(nameof(_attack), ref _attack);
+ ser.Sync(nameof(_decay), ref _decay);
+ ser.Sync(nameof(_delay), ref _delay);
+ ser.Sync(nameof(_envCounter), ref _envCounter);
+ ser.Sync(nameof(_expCounter), ref _expCounter);
+ ser.Sync(nameof(_expPeriod), ref _expPeriod);
+ ser.Sync(nameof(_freeze), ref _freeze);
+ ser.Sync(nameof(_lfsr), ref _lfsr);
+ ser.Sync(nameof(_gate), ref _gate);
+ ser.Sync(nameof(_rate), ref _rate);
+ ser.Sync(nameof(_release), ref _release);
+ ser.Sync(nameof(_state), ref _state);
+ ser.Sync(nameof(_sustain), ref _sustain);
}
// ------------------------------------
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Voice.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Voice.cs
index bf3020e63c..d6e943f9e2 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Voice.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.Voice.cs
@@ -276,30 +276,30 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
// ------------------------------------
public void SyncState(Serializer ser)
{
- ser.Sync("_accBits", ref _accBits);
- ser.Sync("_accNext", ref _accNext);
- ser.Sync("_accumulator", ref _accumulator);
- ser.Sync("_controlTestPrev", ref _controlTestPrev);
- ser.Sync("_controlWavePrev", ref _controlWavePrev);
- ser.Sync("_delay", ref _delay);
- ser.Sync("_floatOutputTtl", ref _floatOutputTtl);
- ser.Sync("_frequency", ref _frequency);
- ser.Sync("_msbRising", ref _msbRising);
- ser.Sync("_noise", ref _noise);
- ser.Sync("_noNoise", ref _noNoise);
- ser.Sync("_noNoiseOrNoise", ref _noNoiseOrNoise);
- ser.Sync("_noPulse", ref _noPulse);
- ser.Sync("_output", ref _output);
- ser.Sync("_pulse", ref _pulse);
- ser.Sync("_pulseWidth", ref _pulseWidth);
- ser.Sync("_ringMod", ref _ringMod);
- ser.Sync("_ringMsbMask", ref _ringMsbMask);
- ser.Sync("_shiftRegister", ref _shiftRegister);
- ser.Sync("_shiftRegisterReset", ref _shiftRegisterReset);
- ser.Sync("_sync", ref _sync);
- ser.Sync("_test", ref _test);
- ser.Sync("_waveform", ref _waveform);
- ser.Sync("_waveformIndex", ref _waveformIndex);
+ ser.Sync(nameof(_accBits), ref _accBits);
+ ser.Sync(nameof(_accNext), ref _accNext);
+ ser.Sync(nameof(_accumulator), ref _accumulator);
+ ser.Sync(nameof(_controlTestPrev), ref _controlTestPrev);
+ ser.Sync(nameof(_controlWavePrev), ref _controlWavePrev);
+ ser.Sync(nameof(_delay), ref _delay);
+ ser.Sync(nameof(_floatOutputTtl), ref _floatOutputTtl);
+ ser.Sync(nameof(_frequency), ref _frequency);
+ ser.Sync(nameof(_msbRising), ref _msbRising);
+ ser.Sync(nameof(_noise), ref _noise);
+ ser.Sync(nameof(_noNoise), ref _noNoise);
+ ser.Sync(nameof(_noNoiseOrNoise), ref _noNoiseOrNoise);
+ ser.Sync(nameof(_noPulse), ref _noPulse);
+ ser.Sync(nameof(_output), ref _output);
+ ser.Sync(nameof(_pulse), ref _pulse);
+ ser.Sync(nameof(_pulseWidth), ref _pulseWidth);
+ ser.Sync(nameof(_ringMod), ref _ringMod);
+ ser.Sync(nameof(_ringMsbMask), ref _ringMsbMask);
+ ser.Sync(nameof(_shiftRegister), ref _shiftRegister);
+ ser.Sync(nameof(_shiftRegisterReset), ref _shiftRegisterReset);
+ ser.Sync(nameof(_sync), ref _sync);
+ ser.Sync(nameof(_test), ref _test);
+ ser.Sync(nameof(_waveform), ref _waveform);
+ ser.Sync(nameof(_waveformIndex), ref _waveformIndex);
_wave = _waveTable[_waveform & 0x07];
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs
index 781cfa569c..87744b909b 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs
@@ -331,12 +331,12 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_databus", ref _databus);
- ser.Sync("_cachedCycles", ref _cachedCycles);
- ser.Sync("_disableVoice3", ref _disableVoice3);
- ser.Sync("_envelopeOutput0", ref _envelopeOutput0);
- ser.Sync("_envelopeOutput1", ref _envelopeOutput1);
- ser.Sync("_envelopeOutput2", ref _envelopeOutput2);
+ ser.Sync(nameof(_databus), ref _databus);
+ ser.Sync(nameof(_cachedCycles), ref _cachedCycles);
+ ser.Sync(nameof(_disableVoice3), ref _disableVoice3);
+ ser.Sync(nameof(_envelopeOutput0), ref _envelopeOutput0);
+ ser.Sync(nameof(_envelopeOutput1), ref _envelopeOutput1);
+ ser.Sync(nameof(_envelopeOutput2), ref _envelopeOutput2);
for (int i = 0; i < _envelopes.Length; i++)
{
@@ -345,20 +345,20 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
ser.EndSection();
}
- ser.Sync("_filterEnable", ref _filterEnable, useNull: false);
- ser.Sync("_filterFrequency", ref _filterFrequency);
- ser.Sync("_filterResonance", ref _filterResonance);
- ser.Sync("_filterSelectBandPass", ref _filterSelectBandPass);
- ser.Sync("_filterSelectLoPass", ref _filterSelectLoPass);
- ser.Sync("_filterSelectHiPass", ref _filterSelectHiPass);
- ser.Sync("_mixer", ref _mixer);
- ser.Sync("_potCounter", ref _potCounter);
- ser.Sync("_potX", ref _potX);
- ser.Sync("_potY", ref _potY);
- ser.Sync("_sample", ref _sample);
- ser.Sync("_voiceOutput0", ref _voiceOutput0);
- ser.Sync("_voiceOutput1", ref _voiceOutput1);
- ser.Sync("_voiceOutput2", ref _voiceOutput2);
+ ser.Sync(nameof(_filterEnable), ref _filterEnable, useNull: false);
+ ser.Sync(nameof(_filterFrequency), ref _filterFrequency);
+ ser.Sync(nameof(_filterResonance), ref _filterResonance);
+ ser.Sync(nameof(_filterSelectBandPass), ref _filterSelectBandPass);
+ ser.Sync(nameof(_filterSelectLoPass), ref _filterSelectLoPass);
+ ser.Sync(nameof(_filterSelectHiPass), ref _filterSelectHiPass);
+ ser.Sync(nameof(_mixer), ref _mixer);
+ ser.Sync(nameof(_potCounter), ref _potCounter);
+ ser.Sync(nameof(_potX), ref _potX);
+ ser.Sync(nameof(_potY), ref _potY);
+ ser.Sync(nameof(_sample), ref _sample);
+ ser.Sync(nameof(_voiceOutput0), ref _voiceOutput0);
+ ser.Sync(nameof(_voiceOutput1), ref _voiceOutput1);
+ ser.Sync(nameof(_voiceOutput2), ref _voiceOutput2);
for (int i = 0; i < _voices.Length; i++)
{
@@ -367,7 +367,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
ser.EndSection();
}
- ser.Sync("_volume", ref _volume);
+ ser.Sync(nameof(_volume), ref _volume);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Via.Port.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Via.Port.cs
index 209c88e0b7..173314dfb5 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Via.Port.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Via.Port.cs
@@ -127,7 +127,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_driveNumber", ref _driveNumber);
+ ser.Sync(nameof(_driveNumber), ref _driveNumber);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Sprite.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Sprite.cs
index 542e853cda..7fd16863de 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Sprite.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Sprite.cs
@@ -54,27 +54,27 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("CollideData", ref CollideData);
- ser.Sync("CollideSprite", ref CollideSprite);
- ser.Sync("Color", ref Color);
- ser.Sync("Display", ref Display);
- ser.Sync("Dma", ref Dma);
- ser.Sync("Enable", ref Enable);
- ser.Sync("Loaded", ref Loaded);
- ser.Sync("Mc", ref Mc);
- ser.Sync("Mcbase", ref Mcbase);
- ser.Sync("Multicolor", ref Multicolor);
- ser.Sync("MulticolorCrunch", ref MulticolorCrunch);
- ser.Sync("Pointer", ref Pointer);
- ser.Sync("Priority", ref Priority);
- ser.Sync("ShiftEnable", ref ShiftEnable);
- ser.Sync("Sr", ref Sr);
- ser.Sync("X", ref X);
- ser.Sync("XCrunch", ref XCrunch);
- ser.Sync("XExpand", ref XExpand);
- ser.Sync("Y", ref Y);
- ser.Sync("YCrunch", ref YCrunch);
- ser.Sync("YExpand", ref YExpand);
+ ser.Sync(nameof(CollideData), ref CollideData);
+ ser.Sync(nameof(CollideSprite), ref CollideSprite);
+ ser.Sync(nameof(Color), ref Color);
+ ser.Sync(nameof(Display), ref Display);
+ ser.Sync(nameof(Dma), ref Dma);
+ ser.Sync(nameof(Enable), ref Enable);
+ ser.Sync(nameof(Loaded), ref Loaded);
+ ser.Sync(nameof(Mc), ref Mc);
+ ser.Sync(nameof(Mcbase), ref Mcbase);
+ ser.Sync(nameof(Multicolor), ref Multicolor);
+ ser.Sync(nameof(MulticolorCrunch), ref MulticolorCrunch);
+ ser.Sync(nameof(Pointer), ref Pointer);
+ ser.Sync(nameof(Priority), ref Priority);
+ ser.Sync(nameof(ShiftEnable), ref ShiftEnable);
+ ser.Sync(nameof(Sr), ref Sr);
+ ser.Sync(nameof(X), ref X);
+ ser.Sync(nameof(XCrunch), ref XCrunch);
+ ser.Sync(nameof(XExpand), ref XExpand);
+ ser.Sync(nameof(Y), ref Y);
+ ser.Sync(nameof(YCrunch), ref YCrunch);
+ ser.Sync(nameof(YExpand), ref YExpand);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.State.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.State.cs
index 39afdfe805..aae4938e95 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.State.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.State.cs
@@ -160,71 +160,71 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
public void SyncState(Serializer ser)
{
- ser.Sync("_cyclesExecuted", ref _cyclesExecuted);
- ser.Sync("_parseIsSprCrunch", ref _parseIsSprCrunch);
- ser.Sync("_srSync", ref _srSync);
- ser.Sync("_srColorSync", ref _srColorSync);
- ser.Sync("_srColorIndexLatch", ref _srColorIndexLatch);
- ser.Sync("_videoMode", ref _videoMode);
- ser.Sync("_borderOnShiftReg", ref _borderOnShiftReg);
- ser.Sync("_backgroundColor0", ref _backgroundColor0);
- ser.Sync("_backgroundColor1", ref _backgroundColor1);
- ser.Sync("_backgroundColor2", ref _backgroundColor2);
- ser.Sync("_backgroundColor3", ref _backgroundColor3);
- ser.Sync("_baCount", ref _baCount);
- ser.Sync("_badline", ref _badline);
- ser.Sync("_badlineEnable", ref _badlineEnable);
- ser.Sync("_bitmapMode", ref _bitmapMode);
- ser.Sync("_borderB", ref _borderB);
- ser.Sync("_borderCheckLEnable", ref _borderCheckLEnable);
- ser.Sync("_borderCheckREnable", ref _borderCheckREnable);
- ser.Sync("_borderColor", ref _borderColor);
- ser.Sync("_borderL", ref _borderL);
- ser.Sync("_borderOnMain", ref _borderOnMain);
- ser.Sync("_borderOnVertical", ref _borderOnVertical);
- ser.Sync("_borderR", ref _borderR);
- ser.Sync("_borderT", ref _borderT);
- ser.Sync("_bufferC", ref _bufferC, useNull: false);
- ser.Sync("_bufferG", ref _bufferG, useNull: false);
- ser.Sync("_cycle", ref _cycle);
- ser.Sync("_cycleIndex", ref _cycleIndex);
- ser.Sync("_columnSelect", ref _columnSelect);
- ser.Sync("_dataC", ref _dataC);
- ser.Sync("_dataG", ref _dataG);
- ser.Sync("_displayEnable", ref _displayEnable);
- ser.Sync("_displayC", ref _displayC);
- ser.Sync("_enableIntLightPen", ref _enableIntLightPen);
- ser.Sync("_enableIntRaster", ref _enableIntRaster);
- ser.Sync("_enableIntSpriteCollision", ref _enableIntSpriteCollision);
- ser.Sync("_enableIntSpriteDataCollision", ref _enableIntSpriteDataCollision);
- ser.Sync("_extraColorMode", ref _extraColorMode);
- ser.Sync("_extraColorModeBuffer", ref _extraColorModeBuffer);
- ser.Sync("_idle", ref _idle);
- ser.Sync("_intLightPen", ref _intLightPen);
- ser.Sync("_intRaster", ref _intRaster);
- ser.Sync("_intSpriteCollision", ref _intSpriteCollision);
- ser.Sync("_intSpriteDataCollision", ref _intSpriteDataCollision);
- ser.Sync("_lightPenX", ref _lightPenX);
- ser.Sync("_lightPenY", ref _lightPenY);
- ser.Sync("_multicolorMode", ref _multicolorMode);
- ser.Sync("_pinAec", ref _pinAec);
- ser.Sync("_pinBa", ref _pinBa);
- ser.Sync("_pinIrq", ref _pinIrq);
- ser.Sync("_pointerCb", ref _pointerCb);
- ser.Sync("_pointerVm", ref _pointerVm);
- ser.Sync("_rasterInterruptLine", ref _rasterInterruptLine);
- ser.Sync("_rasterInterruptTriggered", ref _rasterInterruptTriggered);
- ser.Sync("_rasterLine", ref _rasterLine);
- ser.Sync("_rasterX", ref _rasterX);
- ser.Sync("_rasterXHold", ref _rasterXHold);
- ser.Sync("_rc", ref _rc);
- ser.Sync("_refreshCounter", ref _refreshCounter);
- ser.Sync("_renderEnabled", ref _renderEnabled);
- ser.Sync("_rowSelect", ref _rowSelect);
- ser.Sync("_spriteBackgroundCollisionClearPending", ref _spriteBackgroundCollisionClearPending);
- ser.Sync("_spriteSpriteCollisionClearPending", ref _spriteSpriteCollisionClearPending);
- ser.Sync("_spriteMulticolor0", ref _spriteMulticolor0);
- ser.Sync("_spriteMulticolor1", ref _spriteMulticolor1);
+ ser.Sync(nameof(_cyclesExecuted), ref _cyclesExecuted);
+ ser.Sync(nameof(_parseIsSprCrunch), ref _parseIsSprCrunch);
+ ser.Sync(nameof(_srSync), ref _srSync);
+ ser.Sync(nameof(_srColorSync), ref _srColorSync);
+ ser.Sync(nameof(_srColorIndexLatch), ref _srColorIndexLatch);
+ ser.Sync(nameof(_videoMode), ref _videoMode);
+ ser.Sync(nameof(_borderOnShiftReg), ref _borderOnShiftReg);
+ ser.Sync(nameof(_backgroundColor0), ref _backgroundColor0);
+ ser.Sync(nameof(_backgroundColor1), ref _backgroundColor1);
+ ser.Sync(nameof(_backgroundColor2), ref _backgroundColor2);
+ ser.Sync(nameof(_backgroundColor3), ref _backgroundColor3);
+ ser.Sync(nameof(_baCount), ref _baCount);
+ ser.Sync(nameof(_badline), ref _badline);
+ ser.Sync(nameof(_badlineEnable), ref _badlineEnable);
+ ser.Sync(nameof(_bitmapMode), ref _bitmapMode);
+ ser.Sync(nameof(_borderB), ref _borderB);
+ ser.Sync(nameof(_borderCheckLEnable), ref _borderCheckLEnable);
+ ser.Sync(nameof(_borderCheckREnable), ref _borderCheckREnable);
+ ser.Sync(nameof(_borderColor), ref _borderColor);
+ ser.Sync(nameof(_borderL), ref _borderL);
+ ser.Sync(nameof(_borderOnMain), ref _borderOnMain);
+ ser.Sync(nameof(_borderOnVertical), ref _borderOnVertical);
+ ser.Sync(nameof(_borderR), ref _borderR);
+ ser.Sync(nameof(_borderT), ref _borderT);
+ ser.Sync(nameof(_bufferC), ref _bufferC, useNull: false);
+ ser.Sync(nameof(_bufferG), ref _bufferG, useNull: false);
+ ser.Sync(nameof(_cycle), ref _cycle);
+ ser.Sync(nameof(_cycleIndex), ref _cycleIndex);
+ ser.Sync(nameof(_columnSelect), ref _columnSelect);
+ ser.Sync(nameof(_dataC), ref _dataC);
+ ser.Sync(nameof(_dataG), ref _dataG);
+ ser.Sync(nameof(_displayEnable), ref _displayEnable);
+ ser.Sync(nameof(_displayC), ref _displayC);
+ ser.Sync(nameof(_enableIntLightPen), ref _enableIntLightPen);
+ ser.Sync(nameof(_enableIntRaster), ref _enableIntRaster);
+ ser.Sync(nameof(_enableIntSpriteCollision), ref _enableIntSpriteCollision);
+ ser.Sync(nameof(_enableIntSpriteDataCollision), ref _enableIntSpriteDataCollision);
+ ser.Sync(nameof(_extraColorMode), ref _extraColorMode);
+ ser.Sync(nameof(_extraColorModeBuffer), ref _extraColorModeBuffer);
+ ser.Sync(nameof(_idle), ref _idle);
+ ser.Sync(nameof(_intLightPen), ref _intLightPen);
+ ser.Sync(nameof(_intRaster), ref _intRaster);
+ ser.Sync(nameof(_intSpriteCollision), ref _intSpriteCollision);
+ ser.Sync(nameof(_intSpriteDataCollision), ref _intSpriteDataCollision);
+ ser.Sync(nameof(_lightPenX), ref _lightPenX);
+ ser.Sync(nameof(_lightPenY), ref _lightPenY);
+ ser.Sync(nameof(_multicolorMode), ref _multicolorMode);
+ ser.Sync(nameof(_pinAec), ref _pinAec);
+ ser.Sync(nameof(_pinBa), ref _pinBa);
+ ser.Sync(nameof(_pinIrq), ref _pinIrq);
+ ser.Sync(nameof(_pointerCb), ref _pointerCb);
+ ser.Sync(nameof(_pointerVm), ref _pointerVm);
+ ser.Sync(nameof(_rasterInterruptLine), ref _rasterInterruptLine);
+ ser.Sync(nameof(_rasterInterruptTriggered), ref _rasterInterruptTriggered);
+ ser.Sync(nameof(_rasterLine), ref _rasterLine);
+ ser.Sync(nameof(_rasterX), ref _rasterX);
+ ser.Sync(nameof(_rasterXHold), ref _rasterXHold);
+ ser.Sync(nameof(_rc), ref _rc);
+ ser.Sync(nameof(_refreshCounter), ref _refreshCounter);
+ ser.Sync(nameof(_renderEnabled), ref _renderEnabled);
+ ser.Sync(nameof(_rowSelect), ref _rowSelect);
+ ser.Sync(nameof(_spriteBackgroundCollisionClearPending), ref _spriteBackgroundCollisionClearPending);
+ ser.Sync(nameof(_spriteSpriteCollisionClearPending), ref _spriteSpriteCollisionClearPending);
+ ser.Sync(nameof(_spriteMulticolor0), ref _spriteMulticolor0);
+ ser.Sync(nameof(_spriteMulticolor1), ref _spriteMulticolor1);
for (int i = 0; i < _sprites.Length; i++)
{
@@ -233,17 +233,17 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
ser.EndSection();
}
- ser.Sync("_sr", ref _sr);
- ser.Sync("_vc", ref _vc);
- ser.Sync("_vcbase", ref _vcbase);
- ser.Sync("_vmli", ref _vmli);
- ser.Sync("_xScroll", ref _xScroll);
- ser.Sync("_yScroll", ref _yScroll);
- ser.Sync("_bufOffset", ref _bufOffset);
- ser.Sync("_pixBuffer", ref _pixBuffer, useNull: false);
- ser.Sync("_pixBufferIndex", ref _pixBufferIndex);
- ser.Sync("_pixBorderBuffer", ref _pixBorderBuffer, useNull: false);
- ser.Sync("_pixBufferBorderIndex", ref _pixBufferBorderIndex);
+ ser.Sync(nameof(_sr), ref _sr);
+ ser.Sync(nameof(_vc), ref _vc);
+ ser.Sync(nameof(_vcbase), ref _vcbase);
+ ser.Sync(nameof(_vmli), ref _vmli);
+ ser.Sync(nameof(_xScroll), ref _xScroll);
+ ser.Sync(nameof(_yScroll), ref _yScroll);
+ ser.Sync(nameof(_bufOffset), ref _bufOffset);
+ ser.Sync(nameof(_pixBuffer), ref _pixBuffer, useNull: false);
+ ser.Sync(nameof(_pixBufferIndex), ref _pixBufferIndex);
+ ser.Sync(nameof(_pixBorderBuffer), ref _pixBorderBuffer, useNull: false);
+ ser.Sync(nameof(_pixBufferBorderIndex), ref _pixBufferBorderIndex);
if (ser.IsReader)
{
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/Media/Disk.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/Media/Disk.cs
index 4c77366b8d..712c71e03a 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/Media/Disk.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/Media/Disk.cs
@@ -167,7 +167,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
public void SyncState(Serializer ser)
{
- ser.Sync("WriteProtected", ref WriteProtected);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
// Currently nothing actually writes to _tracks and so it is always the same as _originalMedia
// So commenting out this (very slow) code for now
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs
index 268ede9a47..e92642d09c 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs
@@ -69,7 +69,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.User
public void SyncState(Serializer ser)
{
- ser.Sync("_connected", ref _connected);
+ ser.Sync(nameof(_connected), ref _connected);
_device?.SyncState(ser);
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
index 3ae4eafd72..ccd2065e66 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
@@ -983,19 +983,19 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
public void SyncState(Serializer ser)
{
- ser.BeginSection("DatacorderDevice");
- ser.Sync("counter", ref counter);
- ser.Sync("_currentDataBlockIndex", ref _currentDataBlockIndex);
- ser.Sync("_position", ref _position);
- ser.Sync("_tapeIsPlaying", ref _tapeIsPlaying);
- ser.Sync("_lastCycle", ref _lastCycle);
- ser.Sync("_waitEdge", ref _waitEdge);
- ser.Sync("currentState", ref currentState);
- ser.Sync("_lastINCycle", ref _lastINCycle);
- ser.Sync("_monitorCount", ref _monitorCount);
- ser.Sync("_monitorTimeOut", ref _monitorTimeOut);
- ser.Sync("_monitorLastPC", ref _monitorLastPC);
- ser.Sync("_monitorLastRegs", ref _monitorLastRegs, false);
+ ser.BeginSection(nameof(DatacorderDevice));
+ ser.Sync(nameof(counter), ref counter);
+ ser.Sync(nameof(_currentDataBlockIndex), ref _currentDataBlockIndex);
+ ser.Sync(nameof(_position), ref _position);
+ ser.Sync(nameof(_tapeIsPlaying), ref _tapeIsPlaying);
+ ser.Sync(nameof(_lastCycle), ref _lastCycle);
+ ser.Sync(nameof(_waitEdge), ref _waitEdge);
+ ser.Sync(nameof(currentState), ref currentState);
+ ser.Sync(nameof(_lastINCycle), ref _lastINCycle);
+ ser.Sync(nameof(_monitorCount), ref _monitorCount);
+ ser.Sync(nameof(_monitorTimeOut), ref _monitorTimeOut);
+ ser.Sync(nameof(_monitorLastPC), ref _monitorLastPC);
+ ser.Sync(nameof(_monitorLastRegs), ref _monitorLastRegs, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.Definitions.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.Definitions.cs
index 0d025e4e24..cb49b7c6cf 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.Definitions.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.Definitions.cs
@@ -806,15 +806,15 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("ActiveCmdParams");
- ser.Sync("UnitSelect", ref UnitSelect);
- ser.Sync("Side", ref Side);
- ser.Sync("Cylinder", ref Cylinder);
- ser.Sync("Head", ref Head);
- ser.Sync("Sector", ref Sector);
- ser.Sync("SectorSize", ref SectorSize);
- ser.Sync("EOT", ref EOT);
- ser.Sync("Gap3Length", ref Gap3Length);
- ser.Sync("DTL", ref DTL);
+ ser.Sync(nameof(UnitSelect), ref UnitSelect);
+ ser.Sync(nameof(Side), ref Side);
+ ser.Sync(nameof(Cylinder), ref Cylinder);
+ ser.Sync(nameof(Head), ref Head);
+ ser.Sync(nameof(Sector), ref Sector);
+ ser.Sync(nameof(SectorSize), ref SectorSize);
+ ser.Sync(nameof(EOT), ref EOT);
+ ser.Sync(nameof(Gap3Length), ref Gap3Length);
+ ser.Sync(nameof(DTL), ref DTL);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.FDD.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.FDD.cs
index 272930e904..f96ae1938f 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.FDD.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.FDD.cs
@@ -869,28 +869,28 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
- ser.Sync("ID", ref ID);
- ser.Sync("FLAG_WRITEPROTECT", ref FLAG_WRITEPROTECT);
- //ser.Sync("FLAG_DISKCHANGED", ref FLAG_DISKCHANGED);
- //ser.Sync("FLAG_RECALIBRATING", ref FLAG_RECALIBRATING);
- //ser.Sync("FLAG_SEEK_INTERRUPT", ref FLAG_SEEK_INTERRUPT);
- //ser.Sync("IntStatus", ref IntStatus);
- //ser.Sync("ST0", ref ST0);
- //ser.Sync("RecalibrationCounter", ref RecalibrationCounter);
- ser.Sync("SeekCounter", ref SeekCounter);
- ser.Sync("SeekStatus", ref SeekStatus);
- ser.Sync("SeekAge", ref SeekAge);
- ser.Sync("CurrentSide", ref CurrentSide);
- //ser.Sync("CurrentTrack", ref CurrentTrack);
- ser.Sync("TrackIndex", ref TrackIndex);
- ser.Sync("SeekingTrack", ref SeekingTrack);
- //ser.Sync("CurrentSector", ref CurrentSector);
- ser.Sync("SectorIndex", ref SectorIndex);
- //ser.Sync("RAngles", ref RAngles);
- //ser.Sync("DataPointer", ref DataPointer);
- //ser.SyncEnum("CurrentState", ref CurrentState);
- //ser.SyncEnum("SeekState", ref SeekState);
- //ser.SyncEnum("SeekIntState", ref SeekIntState);
+ ser.Sync(nameof(ID), ref ID);
+ ser.Sync(nameof(FLAG_WRITEPROTECT), ref FLAG_WRITEPROTECT);
+ //ser.Sync(nameof(FLAG_DISKCHANGED), ref FLAG_DISKCHANGED);
+ //ser.Sync(nameof(FLAG_RECALIBRATING), ref FLAG_RECALIBRATING);
+ //ser.Sync(nameof(FLAG_SEEK_INTERRUPT), ref FLAG_SEEK_INTERRUPT);
+ //ser.Sync(nameof(IntStatus), ref IntStatus);
+ //ser.Sync(nameof(ST0), ref ST0);
+ //ser.Sync(nameof(RecalibrationCounter), ref RecalibrationCounter);
+ ser.Sync(nameof(SeekCounter), ref SeekCounter);
+ ser.Sync(nameof(SeekStatus), ref SeekStatus);
+ ser.Sync(nameof(SeekAge), ref SeekAge);
+ ser.Sync(nameof(CurrentSide), ref CurrentSide);
+ //ser.Sync(nameof(CurrentTrack), ref CurrentTrack);
+ ser.Sync(nameof(TrackIndex), ref TrackIndex);
+ ser.Sync(nameof(SeekingTrack), ref SeekingTrack);
+ //ser.Sync(nameof(CurrentSector), ref CurrentSector);
+ ser.Sync(nameof(SectorIndex), ref SectorIndex);
+ //ser.Sync(nameof(RAngles), ref RAngles);
+ //ser.Sync(nameof(DataPointer), ref DataPointer);
+ //ser.SyncEnum(nameof(CurrentState), ref CurrentState);
+ //ser.SyncEnum(nameof(SeekState), ref SeekState);
+ //ser.SyncEnum(nameof(SeekIntState), ref SeekIntState);
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs
index a78c2f77df..d0c2c5ad20 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs
@@ -159,7 +159,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region FDD
- ser.Sync("FDD_FLAG_MOTOR", ref FDD_FLAG_MOTOR);
+ ser.Sync(nameof(FDD_FLAG_MOTOR), ref FDD_FLAG_MOTOR);
for (int i = 0; i < 4; i++)
{
@@ -168,7 +168,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
ser.EndSection();
}
- ser.Sync("DiskDriveIndex", ref _diskDriveIndex);
+ ser.Sync(nameof(DiskDriveIndex), ref _diskDriveIndex);
// set active drive
DiskDriveIndex = _diskDriveIndex;
@@ -186,55 +186,55 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region Controller state
- ser.Sync("DriveLight", ref DriveLight);
- ser.SyncEnum("ActivePhase", ref ActivePhase);
- //ser.SyncEnum("ActiveDirection", ref ActiveDirection);
- ser.SyncEnum("ActiveInterrupt", ref ActiveInterrupt);
- ser.Sync("CommBuffer", ref CommBuffer, false);
- ser.Sync("CommCounter", ref CommCounter);
- ser.Sync("ResBuffer", ref ResBuffer, false);
- ser.Sync("ExecBuffer", ref ExecBuffer, false);
- ser.Sync("ExecCounter", ref ExecCounter);
- ser.Sync("ExecLength", ref ExecLength);
- ser.Sync("InterruptResultBuffer", ref InterruptResultBuffer, false);
- ser.Sync("ResCounter", ref ResCounter);
- ser.Sync("ResLength", ref ResLength);
- ser.Sync("LastSectorDataWriteByte", ref LastSectorDataWriteByte);
- ser.Sync("LastSectorDataReadByte", ref LastSectorDataReadByte);
- ser.Sync("LastByteReceived", ref LastByteReceived);
+ ser.Sync(nameof(DriveLight), ref DriveLight);
+ ser.SyncEnum(nameof(ActivePhase), ref ActivePhase);
+ //ser.SyncEnum(nameof(ActiveDirection), ref ActiveDirection);
+ ser.SyncEnum(nameof(ActiveInterrupt), ref ActiveInterrupt);
+ ser.Sync(nameof(CommBuffer), ref CommBuffer, false);
+ ser.Sync(nameof(CommCounter), ref CommCounter);
+ ser.Sync(nameof(ResBuffer), ref ResBuffer, false);
+ ser.Sync(nameof(ExecBuffer), ref ExecBuffer, false);
+ ser.Sync(nameof(ExecCounter), ref ExecCounter);
+ ser.Sync(nameof(ExecLength), ref ExecLength);
+ ser.Sync(nameof(InterruptResultBuffer), ref InterruptResultBuffer, false);
+ ser.Sync(nameof(ResCounter), ref ResCounter);
+ ser.Sync(nameof(ResLength), ref ResLength);
+ ser.Sync(nameof(LastSectorDataWriteByte), ref LastSectorDataWriteByte);
+ ser.Sync(nameof(LastSectorDataReadByte), ref LastSectorDataReadByte);
+ ser.Sync(nameof(LastByteReceived), ref LastByteReceived);
- ser.Sync("_cmdIndex", ref _cmdIndex);
+ ser.Sync(nameof(_cmdIndex), ref _cmdIndex);
// resync the ActiveCommand
CMDIndex = _cmdIndex;
ActiveCommandParams.SyncState(ser);
- ser.Sync("IndexPulseCounter", ref IndexPulseCounter);
- //ser.SyncEnum("_activeStatus", ref _activeStatus);
- //ser.SyncEnum("_statusRaised", ref _statusRaised);
+ ser.Sync(nameof(IndexPulseCounter), ref IndexPulseCounter);
+ //ser.SyncEnum(nameof(_activeStatus), ref _activeStatus);
+ //ser.SyncEnum(nameof(_statusRaised), ref _statusRaised);
- ser.Sync("CMD_FLAG_MT", ref CMD_FLAG_MT);
- ser.Sync("CMD_FLAG_MF", ref CMD_FLAG_MF);
- ser.Sync("CMD_FLAG_SK", ref CMD_FLAG_SK);
- ser.Sync("SRT", ref SRT);
- ser.Sync("HUT", ref HUT);
- ser.Sync("HLT", ref HLT);
- ser.Sync("ND", ref ND);
- ser.Sync("SRT_Counter", ref SRT_Counter);
- ser.Sync("HUT_Counter", ref HUT_Counter);
- ser.Sync("HLT_Counter", ref HLT_Counter);
+ ser.Sync(nameof(CMD_FLAG_MT), ref CMD_FLAG_MT);
+ ser.Sync(nameof(CMD_FLAG_MF), ref CMD_FLAG_MF);
+ ser.Sync(nameof(CMD_FLAG_SK), ref CMD_FLAG_SK);
+ ser.Sync(nameof(SRT), ref SRT);
+ ser.Sync(nameof(HUT), ref HUT);
+ ser.Sync(nameof(HLT), ref HLT);
+ ser.Sync(nameof(ND), ref ND);
+ ser.Sync(nameof(SRT_Counter), ref SRT_Counter);
+ ser.Sync(nameof(HUT_Counter), ref HUT_Counter);
+ ser.Sync(nameof(HLT_Counter), ref HLT_Counter);
- ser.Sync("SectorDelayCounter", ref SectorDelayCounter);
- ser.Sync("SectorID", ref SectorID);
+ ser.Sync(nameof(SectorDelayCounter), ref SectorDelayCounter);
+ ser.Sync(nameof(SectorID), ref SectorID);
#endregion
#region Timing
- ser.Sync("LastCPUCycle", ref LastCPUCycle);
- ser.Sync("StatusDelay", ref StatusDelay);
- ser.Sync("TickCounter", ref TickCounter);
- ser.Sync("DriveCycleCounter", ref DriveCycleCounter);
+ ser.Sync(nameof(LastCPUCycle), ref LastCPUCycle);
+ ser.Sync(nameof(StatusDelay), ref StatusDelay);
+ ser.Sync(nameof(TickCounter), ref TickCounter);
+ ser.Sync(nameof(DriveCycleCounter), ref DriveCycleCounter);
#endregion
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
index 77cb18d38c..36a55e3d29 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
@@ -278,8 +278,8 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
ser.BeginSection("Keyboard");
- ser.Sync("LineStatus", ref LineStatus, false);
- ser.Sync("_keyLine", ref _keyLine, false);
+ ser.Sync(nameof(LineStatus), ref LineStatus, false);
+ ser.Sync(nameof(_keyLine), ref _keyLine, false);
ser.EndSection();
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs
index 9ed0a069b9..12c821f345 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs
@@ -768,46 +768,46 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("PSG-AY");
- ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
- ser.Sync("_sampleRate", ref _sampleRate);
- ser.Sync("_samplesPerFrame", ref _samplesPerFrame);
- ser.Sync("_tStatesPerSample", ref _tStatesPerSample);
- ser.Sync("_audioBufferIndex", ref _audioBufferIndex);
- ser.Sync("_audioBuffer", ref _audioBuffer, false);
+ ser.Sync(nameof(_tStatesPerFrame), ref _tStatesPerFrame);
+ ser.Sync(nameof(_sampleRate), ref _sampleRate);
+ ser.Sync(nameof(_samplesPerFrame), ref _samplesPerFrame);
+ ser.Sync(nameof(_tStatesPerSample), ref _tStatesPerSample);
+ ser.Sync(nameof(_audioBufferIndex), ref _audioBufferIndex);
+ ser.Sync(nameof(_audioBuffer), ref _audioBuffer, false);
- ser.Sync("_registers", ref _registers, false);
- ser.Sync("_activeRegister", ref _activeRegister);
- ser.Sync("_bitA", ref _bitA);
- ser.Sync("_bitB", ref _bitB);
- ser.Sync("_bitC", ref _bitC);
- ser.Sync("_eState", ref _eState);
- ser.Sync("_eDirection", ref _eDirection);
- ser.Sync("_noiseSeed", ref _noiseSeed);
- ser.Sync("_bit0", ref _bit0);
- ser.Sync("_bit1", ref _bit1);
- ser.Sync("_bit2", ref _bit2);
- ser.Sync("_bit3", ref _bit3);
- ser.Sync("_bit4", ref _bit4);
- ser.Sync("_bit5", ref _bit5);
- ser.Sync("_bitN", ref _bitN);
- ser.Sync("_eMaskA", ref _eMaskA);
- ser.Sync("_eMaskB", ref _eMaskB);
- ser.Sync("_eMaskC", ref _eMaskC);
- ser.Sync("_vA", ref _vA);
- ser.Sync("_vB", ref _vB);
- ser.Sync("_vC", ref _vC);
- ser.Sync("_countA", ref _countA);
- ser.Sync("_countB", ref _countB);
- ser.Sync("_countC", ref _countC);
- ser.Sync("_countE", ref _countE);
- ser.Sync("_countN", ref _countN);
- ser.Sync("_dividerA", ref _dividerA);
- ser.Sync("_dividerB", ref _dividerB);
- ser.Sync("_dividerC", ref _dividerC);
- ser.Sync("_dividerE", ref _dividerE);
- ser.Sync("_dividerN", ref _dividerN);
- ser.SyncEnum("_currentPanTab", ref _currentPanTab);
- ser.Sync("_volume", ref nullDump);
+ ser.Sync(nameof(_registers), ref _registers, false);
+ ser.Sync(nameof(_activeRegister), ref _activeRegister);
+ ser.Sync(nameof(_bitA), ref _bitA);
+ ser.Sync(nameof(_bitB), ref _bitB);
+ ser.Sync(nameof(_bitC), ref _bitC);
+ ser.Sync(nameof(_eState), ref _eState);
+ ser.Sync(nameof(_eDirection), ref _eDirection);
+ ser.Sync(nameof(_noiseSeed), ref _noiseSeed);
+ ser.Sync(nameof(_bit0), ref _bit0);
+ ser.Sync(nameof(_bit1), ref _bit1);
+ ser.Sync(nameof(_bit2), ref _bit2);
+ ser.Sync(nameof(_bit3), ref _bit3);
+ ser.Sync(nameof(_bit4), ref _bit4);
+ ser.Sync(nameof(_bit5), ref _bit5);
+ ser.Sync(nameof(_bitN), ref _bitN);
+ ser.Sync(nameof(_eMaskA), ref _eMaskA);
+ ser.Sync(nameof(_eMaskB), ref _eMaskB);
+ ser.Sync(nameof(_eMaskC), ref _eMaskC);
+ ser.Sync(nameof(_vA), ref _vA);
+ ser.Sync(nameof(_vB), ref _vB);
+ ser.Sync(nameof(_vC), ref _vC);
+ ser.Sync(nameof(_countA), ref _countA);
+ ser.Sync(nameof(_countB), ref _countB);
+ ser.Sync(nameof(_countC), ref _countC);
+ ser.Sync(nameof(_countE), ref _countE);
+ ser.Sync(nameof(_countN), ref _countN);
+ ser.Sync(nameof(_dividerA), ref _dividerA);
+ ser.Sync(nameof(_dividerB), ref _dividerB);
+ ser.Sync(nameof(_dividerC), ref _dividerC);
+ ser.Sync(nameof(_dividerE), ref _dividerE);
+ ser.Sync(nameof(_dividerN), ref _dividerN);
+ ser.SyncEnum(nameof(_currentPanTab), ref _currentPanTab);
+ ser.Sync(nameof(_volume), ref nullDump);
for (int i = 0; i < 6; i++)
{
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
index a3f5dec9c4..8ee5dc0067 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
@@ -204,10 +204,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
ser.BeginSection("Buzzer");
- ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
- ser.Sync("_sampleRate", ref _sampleRate);
- ser.Sync("LastPulse", ref LastPulse);
- ser.Sync("LastPulseTState", ref LastPulseTState);
+ ser.Sync(nameof(_tStatesPerFrame), ref _tStatesPerFrame);
+ ser.Sync(nameof(_sampleRate), ref _sampleRate);
+ ser.Sync(nameof(LastPulse), ref LastPulse);
+ ser.Sync(nameof(LastPulseTState), ref LastPulseTState);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs
index e163d88682..eabdc7ff30 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs
@@ -398,9 +398,9 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
- ser.BeginSection("CPUMonitor");
- ser.Sync("lastPortAddr", ref lastPortAddr);
- ser.Sync("NextMemReadContended", ref NextMemReadContended);
+ ser.BeginSection(nameof(CPUMonitor));
+ ser.Sync(nameof(lastPortAddr), ref lastPortAddr);
+ ser.Sync(nameof(NextMemReadContended), ref NextMemReadContended);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
index a03e22ed25..8137e21ea5 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
@@ -321,34 +321,34 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
ser.BeginSection("ZXMachine");
- ser.Sync("FrameCompleted", ref FrameCompleted);
- ser.Sync("OverFlow", ref OverFlow);
- ser.Sync("FrameCount", ref FrameCount);
- ser.Sync("_frameCycles", ref _frameCycles);
- ser.Sync("inputRead", ref inputRead);
- ser.Sync("LastFrameStartCPUTick", ref LastFrameStartCPUTick);
- ser.Sync("LastULAOutByte", ref LastULAOutByte);
- ser.Sync("ROM0", ref ROM0, false);
- ser.Sync("ROM1", ref ROM1, false);
- ser.Sync("ROM2", ref ROM2, false);
- ser.Sync("ROM3", ref ROM3, false);
- ser.Sync("RAM0", ref RAM0, false);
- ser.Sync("RAM1", ref RAM1, false);
- ser.Sync("RAM2", ref RAM2, false);
- ser.Sync("RAM3", ref RAM3, false);
- ser.Sync("RAM4", ref RAM4, false);
- ser.Sync("RAM5", ref RAM5, false);
- ser.Sync("RAM6", ref RAM6, false);
- ser.Sync("RAM7", ref RAM7, false);
- ser.Sync("ROMPaged", ref ROMPaged);
- ser.Sync("SHADOWPaged", ref SHADOWPaged);
- ser.Sync("RAMPaged", ref RAMPaged);
- ser.Sync("PagingDisabled", ref PagingDisabled);
- ser.Sync("SpecialPagingMode", ref SpecialPagingMode);
- ser.Sync("PagingConfiguration", ref PagingConfiguration);
- ser.Sync("ROMhigh", ref ROMhigh);
- ser.Sync("ROMlow", ref ROMlow);
- ser.Sync("LastContendedReadByte", ref LastContendedReadByte);
+ ser.Sync(nameof(FrameCompleted), ref FrameCompleted);
+ ser.Sync(nameof(OverFlow), ref OverFlow);
+ ser.Sync(nameof(FrameCount), ref FrameCount);
+ ser.Sync(nameof(_frameCycles), ref _frameCycles);
+ ser.Sync(nameof(inputRead), ref inputRead);
+ ser.Sync(nameof(LastFrameStartCPUTick), ref LastFrameStartCPUTick);
+ ser.Sync(nameof(LastULAOutByte), ref LastULAOutByte);
+ ser.Sync(nameof(ROM0), ref ROM0, false);
+ ser.Sync(nameof(ROM1), ref ROM1, false);
+ ser.Sync(nameof(ROM2), ref ROM2, false);
+ ser.Sync(nameof(ROM3), ref ROM3, false);
+ ser.Sync(nameof(RAM0), ref RAM0, false);
+ ser.Sync(nameof(RAM1), ref RAM1, false);
+ ser.Sync(nameof(RAM2), ref RAM2, false);
+ ser.Sync(nameof(RAM3), ref RAM3, false);
+ ser.Sync(nameof(RAM4), ref RAM4, false);
+ ser.Sync(nameof(RAM5), ref RAM5, false);
+ ser.Sync(nameof(RAM6), ref RAM6, false);
+ ser.Sync(nameof(RAM7), ref RAM7, false);
+ ser.Sync(nameof(ROMPaged), ref ROMPaged);
+ ser.Sync(nameof(SHADOWPaged), ref SHADOWPaged);
+ ser.Sync(nameof(RAMPaged), ref RAMPaged);
+ ser.Sync(nameof(PagingDisabled), ref PagingDisabled);
+ ser.Sync(nameof(SpecialPagingMode), ref SpecialPagingMode);
+ ser.Sync(nameof(PagingConfiguration), ref PagingConfiguration);
+ ser.Sync(nameof(ROMhigh), ref ROMhigh);
+ ser.Sync(nameof(ROMlow), ref ROMlow);
+ ser.Sync(nameof(LastContendedReadByte), ref LastContendedReadByte);
KeyboardDevice.SyncState(ser);
BuzzerDevice.SyncState(ser);
@@ -362,7 +362,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
((AY38912)AYDevice as AY38912).PanningConfiguration = Spectrum.Settings.AYPanConfig;
}
- ser.Sync("tapeMediaIndex", ref tapeMediaIndex);
+ ser.Sync(nameof(tapeMediaIndex), ref tapeMediaIndex);
if (ser.IsReader)
{
IsLoadState = true;
@@ -373,7 +373,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
TapeDevice.SyncState(ser);
- ser.Sync("diskMediaIndex", ref diskMediaIndex);
+ ser.Sync(nameof(diskMediaIndex), ref diskMediaIndex);
if (ser.IsReader)
{
IsLoadState = true;
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
index 5951326a93..df7541189e 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
@@ -1035,29 +1035,29 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public void SyncState(Serializer ser)
{
- ser.BeginSection("ULA");
+ ser.BeginSection(nameof(ULA));
if (ScreenBuffer != null)
- ser.Sync("ScreenBuffer", ref ScreenBuffer, false);
- ser.Sync("BorderColor", ref BorderColor);
- ser.Sync("LastTState", ref LastTState);
- ser.Sync("flashOn", ref flashOn);
- ser.Sync("fetchB1", ref fetchB1);
- ser.Sync("fetchA1", ref fetchA1);
- ser.Sync("fetchB2", ref fetchB2);
- ser.Sync("fetchA2", ref fetchA2);
- ser.Sync("ink", ref ink);
- ser.Sync("paper", ref paper);
- ser.Sync("fetchBorder", ref fetchBorder);
- ser.Sync("bright", ref bright);
- ser.Sync("flash", ref flash);
- ser.Sync("palPaper", ref palPaper);
- ser.Sync("palInk", ref palInk);
+ ser.Sync(nameof(ScreenBuffer), ref ScreenBuffer, false);
+ ser.Sync(nameof(BorderColor), ref BorderColor);
+ ser.Sync(nameof(LastTState), ref LastTState);
+ ser.Sync(nameof(flashOn), ref flashOn);
+ ser.Sync(nameof(fetchB1), ref fetchB1);
+ ser.Sync(nameof(fetchA1), ref fetchA1);
+ ser.Sync(nameof(fetchB2), ref fetchB2);
+ ser.Sync(nameof(fetchA2), ref fetchA2);
+ ser.Sync(nameof(ink), ref ink);
+ ser.Sync(nameof(paper), ref paper);
+ ser.Sync(nameof(fetchBorder), ref fetchBorder);
+ ser.Sync(nameof(bright), ref bright);
+ ser.Sync(nameof(flash), ref flash);
+ ser.Sync(nameof(palPaper), ref palPaper);
+ ser.Sync(nameof(palInk), ref palInk);
- ser.Sync("LastULATick", ref LastULATick);
- ser.Sync("ULACycleCounter", ref ULACycleCounter);
- ser.Sync("FrameEnd", ref FrameEnd);
+ ser.Sync(nameof(LastULATick), ref LastULATick);
+ ser.Sync(nameof(ULACycleCounter), ref ULACycleCounter);
+ ser.Sync(nameof(FrameEnd), ref FrameEnd);
- ser.Sync("InterruptRaised", ref InterruptRaised);
+ ser.Sync(nameof(InterruptRaised), ref InterruptRaised);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs
index fcc06fdd35..a52f1e3bbd 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs
@@ -247,20 +247,20 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
}
// sync deterministic track and sector counters
- ser.Sync(" _randomCounter", ref _randomCounter);
+ ser.Sync(nameof( _randomCounter), ref _randomCounter);
RandomCounter = _randomCounter;
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs
index 97f3b49cbf..05d99a88d1 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs
@@ -241,13 +241,13 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/IPFFormat/IPFFloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/IPFFormat/IPFFloppyDisk.cs
index cebfd3ec04..4ebf4ea26b 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/IPFFormat/IPFFloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/IPFFormat/IPFFloppyDisk.cs
@@ -439,20 +439,20 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
}
// sync deterministic track and sector counters
- ser.Sync(" _randomCounter", ref _randomCounter);
+ ser.Sync(nameof( _randomCounter), ref _randomCounter);
RandomCounter = _randomCounter;
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/UDIFormat/UDI1_0FloppyDisk.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/UDIFormat/UDI1_0FloppyDisk.cs
index 953ec8d4b1..00297c69b7 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/UDIFormat/UDI1_0FloppyDisk.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/UDIFormat/UDI1_0FloppyDisk.cs
@@ -195,20 +195,20 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("Plus3FloppyDisk");
- ser.Sync("CylinderCount", ref CylinderCount);
- ser.Sync("SideCount", ref SideCount);
- ser.Sync("BytesPerTrack", ref BytesPerTrack);
- ser.Sync("WriteProtected", ref WriteProtected);
- ser.SyncEnum("Protection", ref Protection);
+ ser.Sync(nameof(CylinderCount), ref CylinderCount);
+ ser.Sync(nameof(SideCount), ref SideCount);
+ ser.Sync(nameof(BytesPerTrack), ref BytesPerTrack);
+ ser.Sync(nameof(WriteProtected), ref WriteProtected);
+ ser.SyncEnum(nameof(Protection), ref Protection);
- ser.Sync("DirtyData", ref DirtyData);
+ ser.Sync(nameof(DirtyData), ref DirtyData);
if (DirtyData)
{
}
// sync deterministic track and sector counters
- ser.Sync(" _randomCounter", ref _randomCounter);
+ ser.Sync(nameof( _randomCounter), ref _randomCounter);
RandomCounter = _randomCounter;
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TapeDataBlock.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TapeDataBlock.cs
index 82019ccf88..ee82000d46 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TapeDataBlock.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TapeDataBlock.cs
@@ -173,11 +173,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
ser.BeginSection("DataBlock" + blockPosition);
- ser.Sync("_blockID", ref _blockID);
- //ser.SyncFixedString("_blockDescription", ref _blockDescription, 200);
- ser.SyncEnum("_blockType", ref _blockType);
- ser.Sync("_blockData", ref _blockData, true);
- ser.SyncEnum("_command", ref _command);
+ ser.Sync(nameof(_blockID), ref _blockID);
+ //ser.SyncFixedString(nameof(_blockDescription), ref _blockDescription, 200);
+ ser.SyncEnum(nameof(_blockType), ref _blockType);
+ ser.Sync(nameof(_blockData), ref _blockData, true);
+ ser.SyncEnum(nameof(_command), ref _command);
int[] tempArray = null;
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IStatable.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IStatable.cs
index 74ab460903..c0b6b4b06d 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IStatable.cs
@@ -56,10 +56,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (ser.IsWriter)
{
- ser.SyncEnum("_machineType", ref _machineType);
+ ser.SyncEnum(nameof(_machineType), ref _machineType);
_cpu.SyncState(ser);
- ser.BeginSection("ZXSpectrum");
+ ser.BeginSection(nameof(ZXSpectrum));
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
@@ -70,7 +70,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (ser.IsReader)
{
var tmpM = _machineType;
- ser.SyncEnum("_machineType", ref _machineType);
+ ser.SyncEnum(nameof(_machineType), ref _machineType);
if (tmpM != _machineType && _machineType.ToString() != "72")
{
string msg = "SAVESTATE FAILED TO LOAD!!\n\n";
@@ -85,7 +85,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
else
{
_cpu.SyncState(ser);
- ser.BeginSection("ZXSpectrum");
+ ser.BeginSection(nameof(ZXSpectrum));
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IStatable.cs
index 69a1191c46..eabaf20fdc 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IStatable.cs
@@ -46,12 +46,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
- ser.Sync("cyc_counter", ref cyc_counter);
+ ser.Sync(nameof(cyc_counter), ref cyc_counter);
ser.Sync("leftDifficultySwitchPressed", ref _leftDifficultySwitchPressed);
ser.Sync("rightDifficultySwitchPressed", ref _rightDifficultySwitchPressed);
ser.Sync("leftDifficultySwitchHeld", ref _leftDifficultySwitchHeld);
ser.Sync("rightDifficultySwitchHeld", ref _rightDifficultySwitchHeld);
- ser.Sync("unselect_reset", ref unselect_reset);
+ ser.Sync(nameof(unselect_reset), ref unselect_reset);
_tia.SyncState(ser);
_m6532.SyncState(ser);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600ControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600ControllerDeck.cs
index 89604f6516..2578acdd99 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600ControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600ControllerDeck.cs
@@ -66,11 +66,11 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Port2");
+ ser.BeginSection(nameof(Port2));
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs
index e0d83199e8..f4b2856b94 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs
@@ -178,7 +178,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public void SyncState(Serializer ser)
{
- ser.BeginSection("M6532");
+ ser.BeginSection(nameof(M6532));
ser.Sync("ddra", ref _ddRa);
ser.Sync("ddrb", ref _ddRb);
ser.Sync("OutputA", ref _outputA);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs
index fb83e6ef0f..3c84e12bff 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs
@@ -196,16 +196,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public void SyncState(Serializer ser)
{
- ser.Sync("AUDC", ref AUDC);
- ser.Sync("AUDF", ref AUDF);
- ser.Sync("AUDV", ref AUDV);
- ser.Sync("sr1", ref sr1);
- ser.Sync("sr3", ref sr3);
- ser.Sync("sr4", ref sr4);
- ser.Sync("sr5", ref sr5);
- ser.Sync("sr9", ref sr9);
- ser.Sync("freqcnt", ref freqcnt);
- ser.Sync("on", ref on);
+ ser.Sync(nameof(AUDC), ref AUDC);
+ ser.Sync(nameof(AUDF), ref AUDF);
+ ser.Sync(nameof(AUDV), ref AUDV);
+ ser.Sync(nameof(sr1), ref sr1);
+ ser.Sync(nameof(sr3), ref sr3);
+ ser.Sync(nameof(sr4), ref sr4);
+ ser.Sync(nameof(sr5), ref sr5);
+ ser.Sync(nameof(sr9), ref sr9);
+ ser.Sync(nameof(freqcnt), ref freqcnt);
+ ser.Sync(nameof(on), ref on);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.BallData.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.BallData.cs
index 93d7505343..f0b8bed111 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.BallData.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.BallData.cs
@@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
ser.Sync("denabled", ref Denabled);
ser.Sync("delay", ref Delay);
ser.Sync("size", ref Size);
- ser.Sync("HM", ref HM);
+ ser.Sync(nameof(HM), ref HM);
ser.Sync("hPosCnt", ref HPosCnt);
ser.Sync("collisions", ref Collisions);
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.PlayerData.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.PlayerData.cs
index 8700b4aebb..d57bc7d735 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.PlayerData.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.PlayerData.cs
@@ -179,7 +179,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
ser.Sync("hPosCnt", ref HPosCnt);
ser.Sync("scanCnt", ref ScanCnt);
ser.Sync("scanCntInit", ref ScanCntInit);
- ser.Sync("HM", ref HM);
+ ser.Sync(nameof(HM), ref HM);
ser.Sync("reflect", ref Reflect);
ser.Sync("delay", ref Delay);
ser.Sync("nusiz", ref Nusiz);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.SyncState.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.SyncState.cs
index 8a67dc32d6..43ad77adb1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.SyncState.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.SyncState.cs
@@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
public void SyncState(Serializer ser)
{
- ser.BeginSection("TIA");
+ ser.BeginSection(nameof(TIA));
_ball.SyncState(ser);
_hmove.SyncState(ser);
ser.Sync("hsyncCnt", ref _hsyncCnt);
@@ -57,7 +57,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
ser.Sync("PRG1_val", ref _prg1Val);
ser.Sync("Ticks", ref _doTicks);
- ser.Sync("hmove_cnt_up", ref hmove_cnt_up);
+ ser.Sync(nameof(hmove_cnt_up), ref hmove_cnt_up);
ser.Sync("VBlankDelay", ref _vblankDelay);
ser.Sync("VBlankValue", ref _vblankValue);
@@ -69,8 +69,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
ser.Sync("vblankEnabled", ref _vblankEnabled);
ser.Sync("vsyncEnabled", ref _vsyncEnabled);
ser.Sync("CurrentScanLine", ref _currentScanLine);
- ser.Sync("AudioClocks", ref AudioClocks);
- ser.Sync("New_Frame", ref New_Frame);
+ ser.Sync(nameof(AudioClocks), ref AudioClocks);
+ ser.Sync(nameof(New_Frame), ref New_Frame);
ser.BeginSection("Player0");
_player0.SyncState(ser);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IStatable.cs
index 7a0b6d38fc..3203b0d194 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IStatable.cs
@@ -53,38 +53,38 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
ser.Sync("IsLag", ref _islag);
_controllerDeck.SyncState(ser);
- ser.Sync("A7800_control_register", ref A7800_control_register);
- ser.Sync("_isPAL", ref _isPAL);
+ ser.Sync(nameof(A7800_control_register), ref A7800_control_register);
+ ser.Sync(nameof(_isPAL), ref _isPAL);
- ser.Sync("Maria_regs", ref Maria_regs, false);
- ser.Sync("RAM", ref RAM, false);
- ser.Sync("RAM_6532", ref RAM_6532, false);
- ser.Sync("hs_bios_mem", ref hs_bios_mem, false);
+ ser.Sync(nameof(Maria_regs), ref Maria_regs, false);
+ ser.Sync(nameof(RAM), ref RAM, false);
+ ser.Sync(nameof(RAM_6532), ref RAM_6532, false);
+ ser.Sync(nameof(hs_bios_mem), ref hs_bios_mem, false);
- ser.Sync("cycle", ref cycle);
- ser.Sync("cpu_cycle", ref cpu_cycle);
- ser.Sync("cpu_is_haltable", ref cpu_is_haltable);
- ser.Sync("cpu_is_halted", ref cpu_is_halted);
- ser.Sync("cpu_halt_pending", ref cpu_halt_pending);
- ser.Sync("cpu_resume_pending", ref cpu_resume_pending);
+ ser.Sync(nameof(cycle), ref cycle);
+ ser.Sync(nameof(cpu_cycle), ref cpu_cycle);
+ ser.Sync(nameof(cpu_is_haltable), ref cpu_is_haltable);
+ ser.Sync(nameof(cpu_is_halted), ref cpu_is_halted);
+ ser.Sync(nameof(cpu_halt_pending), ref cpu_halt_pending);
+ ser.Sync(nameof(cpu_resume_pending), ref cpu_resume_pending);
- ser.Sync("slow_access", ref slow_access);
- ser.Sync("slow_access", ref slow_countdown);
+ ser.Sync(nameof(slow_access), ref slow_access);
+ ser.Sync(nameof(slow_access), ref slow_countdown);
ser.Sync("small flag", ref small_flag);
ser.Sync("pal kara", ref PAL_Kara);
ser.Sync("Cart RAM", ref cart_RAM);
- ser.Sync("is_pokey", ref is_pokey);
- ser.Sync("left_toggle", ref left_toggle);
- ser.Sync("right_toggle", ref right_toggle);
- ser.Sync("left_was_pressed", ref left_was_pressed);
- ser.Sync("right_was_pressed", ref right_was_pressed);
+ ser.Sync(nameof(is_pokey), ref is_pokey);
+ ser.Sync(nameof(left_toggle), ref left_toggle);
+ ser.Sync(nameof(right_toggle), ref right_toggle);
+ ser.Sync(nameof(left_was_pressed), ref left_was_pressed);
+ ser.Sync(nameof(right_was_pressed), ref right_was_pressed);
- ser.Sync("temp_s_tia", ref temp_s_tia);
- ser.Sync("temp_s_pokey", ref temp_s_pokey);
- ser.Sync("samp_l", ref samp_l);
- ser.Sync("samp_c", ref samp_c);
- ser.Sync("master_audio_clock", ref master_audio_clock);
- ser.Sync("temp", ref temp);
+ ser.Sync(nameof(temp_s_tia), ref temp_s_tia);
+ ser.Sync(nameof(temp_s_pokey), ref temp_s_pokey);
+ ser.Sync(nameof(samp_l), ref samp_l);
+ ser.Sync(nameof(samp_c), ref samp_c);
+ ser.Sync(nameof(master_audio_clock), ref master_audio_clock);
+ ser.Sync(nameof(temp), ref temp);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800HawkControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800HawkControllerDeck.cs
index 7c761c65b2..a796aedd30 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800HawkControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800HawkControllerDeck.cs
@@ -104,11 +104,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Port2");
+ ser.BeginSection(nameof(Port2));
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs
index 50798c8fbc..cf2673517e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs
@@ -196,7 +196,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public void SyncState(Serializer ser)
{
- ser.BeginSection("M6532");
+ ser.BeginSection(nameof(M6532));
ser.Sync("ddra", ref _ddRa);
ser.Sync("ddrb", ref _ddRb);
ser.Sync("OutputA", ref _outputA);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs
index 160b2a7679..964b5539fc 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs
@@ -102,7 +102,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public override void SyncState(Serializer ser)
{
- ser.Sync("RAM", ref RAM, false);
+ ser.Sync(nameof(RAM), ref RAM, false);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs
index bf97fad11c..b308a2e500 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs
@@ -167,7 +167,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public override void SyncState(Serializer ser)
{
ser.Sync("Bank", ref bank);
- ser.Sync("RAM", ref RAM, false);
+ ser.Sync(nameof(RAM), ref RAM, false);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs
index 5220d1b525..a82b2583cb 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs
@@ -698,9 +698,9 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
// also since DMA is always killed at scanline boundaries, most related check variables are also not needed
public void SyncState(Serializer ser)
{
- ser.BeginSection("Maria");
+ ser.BeginSection(nameof(Maria));
- ser.Sync("GFX_index", ref GFX_index);
+ ser.Sync(nameof(GFX_index), ref GFX_index);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs
index bafb4694cf..2b5d6ff334 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs
@@ -311,21 +311,21 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public void SyncState(Serializer ser)
{
- ser.BeginSection("Pokey");
+ ser.BeginSection(nameof(Pokey));
- ser.Sync("Regs", ref Regs, false);
+ ser.Sync(nameof(Regs), ref Regs, false);
- ser.Sync("poly4", ref poly4);
- ser.Sync("poly5", ref poly5);
- ser.Sync("poly9", ref poly9);
- ser.Sync("poly17", ref poly17);
- ser.Sync("ch_div", ref ch_div, false);
- ser.Sync("inc_ch", ref inc_ch, false);
- ser.Sync("ch_out", ref ch_out, false);
- ser.Sync("ch_src", ref ch_src, false);
- ser.Sync("ch_vol", ref ch_vol, false);
- ser.Sync("high_pass_1", ref high_pass_1);
- ser.Sync("high_pass_2", ref high_pass_2);
+ ser.Sync(nameof(poly4), ref poly4);
+ ser.Sync(nameof(poly5), ref poly5);
+ ser.Sync(nameof(poly9), ref poly9);
+ ser.Sync(nameof(poly17), ref poly17);
+ ser.Sync(nameof(ch_div), ref ch_div, false);
+ ser.Sync(nameof(inc_ch), ref inc_ch, false);
+ ser.Sync(nameof(ch_out), ref ch_out, false);
+ ser.Sync(nameof(ch_src), ref ch_src, false);
+ ser.Sync(nameof(ch_vol), ref ch_vol, false);
+ ser.Sync(nameof(high_pass_1), ref high_pass_1);
+ ser.Sync(nameof(high_pass_2), ref high_pass_2);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs
index cf5aa3e0c7..1bda5b3521 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs
@@ -196,16 +196,16 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public void SyncState(Serializer ser)
{
- ser.Sync("AUDC", ref AUDC);
- ser.Sync("AUDF", ref AUDF);
- ser.Sync("AUDV", ref AUDV);
- ser.Sync("sr1", ref sr1);
- ser.Sync("sr3", ref sr3);
- ser.Sync("sr4", ref sr4);
- ser.Sync("sr5", ref sr5);
- ser.Sync("sr9", ref sr9);
- ser.Sync("freqcnt", ref freqcnt);
- ser.Sync("on", ref on);
+ ser.Sync(nameof(AUDC), ref AUDC);
+ ser.Sync(nameof(AUDF), ref AUDF);
+ ser.Sync(nameof(AUDV), ref AUDV);
+ ser.Sync(nameof(sr1), ref sr1);
+ ser.Sync(nameof(sr3), ref sr3);
+ ser.Sync(nameof(sr4), ref sr4);
+ ser.Sync(nameof(sr5), ref sr5);
+ ser.Sync(nameof(sr9), ref sr9);
+ ser.Sync(nameof(freqcnt), ref freqcnt);
+ ser.Sync(nameof(on), ref on);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.SyncState.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.SyncState.cs
index 89a2c50cfd..150358532d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.SyncState.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.SyncState.cs
@@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
{
public void SyncState(Serializer ser)
{
- ser.BeginSection("TIA");
+ ser.BeginSection(nameof(TIA));
ser.Sync("hsyncCnt", ref _hsyncCnt);
@@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
// states were always taken at frame boundaries
ser.Sync("capChargeStart", ref _capChargeStart);
ser.Sync("capCharging", ref _capCharging);
- ser.Sync("AudioClocks", ref AudioClocks);
+ ser.Sync(nameof(AudioClocks), ref AudioClocks);
ser.Sync("FrameStartCycles", ref _frameStartCycles);
ser.Sync("FrameEndCycles", ref _frameEndCycles);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IStatable.cs
index e2c600f015..adad5e2c4b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.IStatable.cs
@@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
{
if (!LibLynx.BinStateSave(Core, _savebuff, _savebuff.Length))
{
- throw new InvalidOperationException("Core's BinStateSave() returned false!");
+ throw new InvalidOperationException($"Core's {nameof(LibLynx.BinStateSave)}() returned false!");
}
writer.Write(_savebuff.Length);
@@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
reader.Read(_savebuff, 0, length);
if (!LibLynx.BinStateLoad(Core, _savebuff, _savebuff.Length))
{
- throw new InvalidOperationException("Core's BinStateLoad() returned false!");
+ throw new InvalidOperationException($"Core's {nameof(LibLynx.BinStateLoad)}() returned false!");
}
// other variables
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/AY_3_8910_SGM.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/AY_3_8910_SGM.cs
index 4f5c0eaca0..d1aef90365 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/AY_3_8910_SGM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/AY_3_8910_SGM.cs
@@ -65,21 +65,21 @@ namespace BizHawk.Emulation.Cores.ColecoVision
{
ser.BeginSection("PSG");
- ser.Sync("Register", ref Register, false);
+ ser.Sync(nameof(Register), ref Register, false);
- ser.Sync("psg_clock", ref psg_clock);
- ser.Sync("clock_A", ref clock_A);
- ser.Sync("clock_B", ref clock_B);
- ser.Sync("clock_C", ref clock_C);
- ser.Sync("noise_clock", ref noise_clock);
- ser.Sync("env_clock", ref env_clock);
- ser.Sync("A_up", ref A_up);
- ser.Sync("B_up", ref B_up);
- ser.Sync("C_up", ref C_up);
- ser.Sync("noise", ref noise);
- ser.Sync("env_E", ref env_E);
- ser.Sync("E_up_down", ref E_up_down);
- ser.Sync("port_sel", ref port_sel);
+ ser.Sync(nameof(psg_clock), ref psg_clock);
+ ser.Sync(nameof(clock_A), ref clock_A);
+ ser.Sync(nameof(clock_B), ref clock_B);
+ ser.Sync(nameof(clock_C), ref clock_C);
+ ser.Sync(nameof(noise_clock), ref noise_clock);
+ ser.Sync(nameof(env_clock), ref env_clock);
+ ser.Sync(nameof(A_up), ref A_up);
+ ser.Sync(nameof(B_up), ref B_up);
+ ser.Sync(nameof(C_up), ref C_up);
+ ser.Sync(nameof(noise), ref noise);
+ ser.Sync(nameof(env_E), ref env_E);
+ ser.Sync(nameof(E_up_down), ref E_up_down);
+ ser.Sync(nameof(port_sel), ref port_sel);
sync_psg_state();
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs
index 162fe4f4f7..457cfd7388 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs
@@ -68,13 +68,13 @@ namespace BizHawk.Emulation.Cores.ColecoVision
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
- ser.Sync("temp_wheel1", ref temp_wheel1);
+ ser.Sync(nameof(temp_wheel1), ref temp_wheel1);
ser.EndSection();
- ser.BeginSection("Port2");
- ser.Sync("temp_wheel2", ref temp_wheel2);
+ ser.BeginSection(nameof(Port2));
+ ser.Sync(nameof(temp_wheel2), ref temp_wheel2);
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IStatable.cs
index c17eb19946..c5b767d73a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IStatable.cs
@@ -58,15 +58,15 @@ namespace BizHawk.Emulation.Cores.ColecoVision
PSG.SyncState(ser);
SGM_sound.SyncState(ser);
ser.Sync("UseSGM", ref use_SGM);
- ser.Sync("is_MC", ref is_MC);
- ser.Sync("MC_bank", ref MC_bank);
+ ser.Sync(nameof(is_MC), ref is_MC);
+ ser.Sync(nameof(MC_bank), ref MC_bank);
ser.Sync("EnableSGMhigh", ref enable_SGM_high);
ser.Sync("EnableSGMlow", ref enable_SGM_low);
ser.Sync("Port_0x53", ref port_0x53);
ser.Sync("Port_0x7F", ref port_0x7F);
ser.Sync("RAM", ref _ram, false);
- ser.Sync("SGM_high_RAM", ref SGM_high_RAM, false);
- ser.Sync("SGM_low_RAM", ref SGM_low_RAM, false);
+ ser.Sync(nameof(SGM_high_RAM), ref SGM_high_RAM, false);
+ ser.Sync(nameof(SGM_low_RAM), ref SGM_low_RAM, false);
ser.Sync("Frame", ref _frame);
ser.Sync("LagCount", ref _lagCount);
ser.Sync("IsLag", ref _isLag);
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs
index 8cdd3e6026..265bfce147 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs
@@ -53,28 +53,28 @@ namespace BizHawk.Emulation.Cores.ColecoVision
{
ser.BeginSection("SN76489");
- ser.Sync("Chan_vol", ref Chan_vol, false);
- ser.Sync("Chan_tone", ref Chan_tone, false);
+ ser.Sync(nameof(Chan_vol), ref Chan_vol, false);
+ ser.Sync(nameof(Chan_tone), ref Chan_tone, false);
ser.Sync("Chan_sel", ref chan_sel);
- ser.Sync("vol_tone", ref vol_tone);
- ser.Sync("noise_type", ref noise_type);
- ser.Sync("noise_rate", ref noise_rate);
+ ser.Sync(nameof(vol_tone), ref vol_tone);
+ ser.Sync(nameof(noise_type), ref noise_type);
+ ser.Sync(nameof(noise_rate), ref noise_rate);
ser.Sync("Clock_A", ref clock_A);
ser.Sync("Clock_B", ref clock_B);
ser.Sync("Clock_C", ref clock_C);
- ser.Sync("noise_clock", ref noise_clock);
- ser.Sync("noise_bit", ref noise_bit);
+ ser.Sync(nameof(noise_clock), ref noise_clock);
+ ser.Sync(nameof(noise_bit), ref noise_bit);
- ser.Sync("psg_clock", ref psg_clock);
+ ser.Sync(nameof(psg_clock), ref psg_clock);
- ser.Sync("A_up", ref A_up);
- ser.Sync("B_up", ref B_up);
- ser.Sync("C_up", ref C_up);
- ser.Sync("noise", ref noise);
+ ser.Sync(nameof(A_up), ref A_up);
+ ser.Sync(nameof(B_up), ref B_up);
+ ser.Sync(nameof(C_up), ref C_up);
+ ser.Sync(nameof(noise), ref noise);
- ser.Sync("current_sample", ref current_sample);
+ ser.Sync(nameof(current_sample), ref current_sample);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs
index 9133312472..4453e69cac 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs
@@ -511,13 +511,13 @@ namespace BizHawk.Emulation.Cores.ColecoVision
public void SyncState(Serializer ser)
{
ser.BeginSection("VDP");
- ser.Sync("StatusByte", ref StatusByte);
+ ser.Sync(nameof(StatusByte), ref StatusByte);
ser.Sync("WaitingForLatchByte", ref VdpWaitingForLatchByte);
ser.Sync("Latch", ref VdpLatch);
ser.Sync("ReadBuffer", ref VdpBuffer);
- ser.Sync("VdpAddress", ref VdpAddress);
- ser.Sync("Registers", ref Registers, false);
- ser.Sync("VRAM", ref VRAM, false);
+ ser.Sync(nameof(VdpAddress), ref VdpAddress);
+ ser.Sync(nameof(Registers), ref Registers, false);
+ ser.Sync(nameof(VRAM), ref VRAM, false);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs
index 71cf602d0e..de01986004 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
ser.BeginSection("Cart");
ser.Sync("mapper", ref _mapper);
- ser.Sync("Cart_Ram", ref Cart_Ram, false);
+ ser.Sync(nameof(Cart_Ram), ref Cart_Ram, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Controllers/IntellivisionControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Controllers/IntellivisionControllerDeck.cs
index fc242d5f67..f765c4fbf0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Controllers/IntellivisionControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Controllers/IntellivisionControllerDeck.cs
@@ -59,11 +59,11 @@ namespace BizHawk.Emulation.Cores.Intellivision
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Port2");
+ ser.BeginSection(nameof(Port2));
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IStatable.cs
index 8a99dfc6c3..79d6c0c4e0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IStatable.cs
@@ -43,16 +43,16 @@ namespace BizHawk.Emulation.Cores.Intellivision
private void SyncState(Serializer ser)
{
int version = 1;
- ser.BeginSection("Intellivision");
- ser.Sync("version", ref version);
+ ser.BeginSection(nameof(Intellivision));
+ ser.Sync(nameof(version), ref version);
ser.Sync("Frame", ref _frame);
ser.Sync("stic_row", ref _sticRow);
- ser.Sync("ScratchpadRam", ref ScratchpadRam, false);
- ser.Sync("SystemRam", ref SystemRam, false);
- ser.Sync("ExecutiveRom", ref ExecutiveRom, false);
- ser.Sync("GraphicsRom", ref GraphicsRom, false);
- ser.Sync("GraphicsRam", ref GraphicsRam, false);
+ ser.Sync(nameof(ScratchpadRam), ref ScratchpadRam, false);
+ ser.Sync(nameof(SystemRam), ref SystemRam, false);
+ ser.Sync(nameof(ExecutiveRom), ref ExecutiveRom, false);
+ ser.Sync(nameof(GraphicsRom), ref GraphicsRom, false);
+ ser.Sync(nameof(GraphicsRam), ref GraphicsRam, false);
ser.Sync("islag", ref _islag);
ser.Sync("lagcount", ref _lagcount);
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs
index a15958359b..72c3ad7b81 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs
@@ -118,24 +118,24 @@ namespace BizHawk.Emulation.Cores.Intellivision
public void SyncState(Serializer ser)
{
- ser.BeginSection("PSG");
+ ser.BeginSection(nameof(PSG));
- ser.Sync("Register", ref Register, false);
+ ser.Sync(nameof(Register), ref Register, false);
ser.Sync("Toal_executed_cycles", ref TotalExecutedCycles);
ser.Sync("Pending_Cycles", ref PendingCycles);
- ser.Sync("psg_clock", ref psg_clock);
- ser.Sync("clock_A", ref clock_A);
- ser.Sync("clock_B", ref clock_B);
- ser.Sync("clock_C", ref clock_C);
- ser.Sync("noise_clock", ref noise_clock);
- ser.Sync("env_clock", ref env_clock);
- ser.Sync("A_up", ref A_up);
- ser.Sync("B_up", ref B_up);
- ser.Sync("C_up", ref C_up);
- ser.Sync("noise", ref noise);
- ser.Sync("env_E", ref env_E);
- ser.Sync("E_up_down", ref E_up_down);
+ ser.Sync(nameof(psg_clock), ref psg_clock);
+ ser.Sync(nameof(clock_A), ref clock_A);
+ ser.Sync(nameof(clock_B), ref clock_B);
+ ser.Sync(nameof(clock_C), ref clock_C);
+ ser.Sync(nameof(noise_clock), ref noise_clock);
+ ser.Sync(nameof(env_clock), ref env_clock);
+ ser.Sync(nameof(A_up), ref A_up);
+ ser.Sync(nameof(B_up), ref B_up);
+ ser.Sync(nameof(C_up), ref C_up);
+ ser.Sync(nameof(noise), ref noise);
+ ser.Sync(nameof(env_E), ref env_E);
+ ser.Sync(nameof(E_up_down), ref E_up_down);
sync_psg_state();
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs
index 856aea5f8e..dbb20b910c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs
@@ -30,15 +30,15 @@ namespace BizHawk.Emulation.Cores.Intellivision
public void SyncState(Serializer ser)
{
- ser.BeginSection("STIC");
+ ser.BeginSection(nameof(STIC));
- ser.Sync("Sr1", ref Sr1);
- ser.Sync("Sr2", ref Sr2);
- ser.Sync("Sst", ref Sst);
- ser.Sync("active_display", ref active_display);
- ser.Sync("in_vb_1", ref in_vb_1);
- ser.Sync("in_vb_2", ref in_vb_2);
- ser.Sync("Fgbg", ref Fgbg);
+ ser.Sync(nameof(Sr1), ref Sr1);
+ ser.Sync(nameof(Sr2), ref Sr2);
+ ser.Sync(nameof(Sst), ref Sst);
+ ser.Sync(nameof(active_display), ref active_display);
+ ser.Sync(nameof(in_vb_1), ref in_vb_1);
+ ser.Sync(nameof(in_vb_2), ref in_vb_2);
+ ser.Sync(nameof(Fgbg), ref Fgbg);
ser.Sync("Toal_executed_cycles", ref TotalExecutedCycles);
ser.Sync("Pending_Cycles", ref PendingCycles);
ser.Sync("Registers", ref Register, false);
diff --git a/BizHawk.Emulation.Cores/Consoles/Magnavox/O2Em.cs b/BizHawk.Emulation.Cores/Consoles/Magnavox/O2Em.cs
index aaac852c81..b6b0a6ef6c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Magnavox/O2Em.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Magnavox/O2Em.cs
@@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Magnavox
if (!_core.Init(rom, rom.Length, bios, bios.Length))
- throw new InvalidOperationException("Init() failed");
+ throw new InvalidOperationException($"{nameof(_core.Init)}() failed");
PostInit();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs
index 264d658e98..06c9737275 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs
@@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
_core = LibmGBA.BizCreate(bios, file, file.Length, GetOverrideInfo(game), skipBios);
if (_core == IntPtr.Zero)
{
- throw new InvalidOperationException("BizCreate() returned NULL! Bad BIOS? and/or ROM?");
+ throw new InvalidOperationException($"{nameof(LibmGBA.BizCreate)}() returned NULL! Bad BIOS? and/or ROM?");
}
try
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISaveRam.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISaveRam.cs
index 4058e83441..0f4feb4ac7 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISaveRam.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISaveRam.cs
@@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
var data = new byte[LibVBANext.SaveRamSize(Core)];
if (!LibVBANext.SaveRamSave(Core, data, data.Length))
{
- throw new InvalidOperationException("SaveRamSave() failed!");
+ throw new InvalidOperationException($"{nameof(LibVBANext.SaveRamSave)}() failed!");
}
return data;
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
// internally, we try to salvage bad-sized saverams
if (!LibVBANext.SaveRamLoad(Core, data, data.Length))
{
- throw new InvalidOperationException("SaveRamLoad() failed!");
+ throw new InvalidOperationException($"{nameof(LibVBANext.SaveRamLoad)}() failed!");
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IStatable.cs
index 514b3850c8..4456474a5c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.IStatable.cs
@@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
public void SaveStateBinary(BinaryWriter writer)
{
if (!LibVBANext.BinStateSave(Core, _savebuff, _savebuff.Length))
- throw new InvalidOperationException("Core's BinStateSave() returned false!");
+ throw new InvalidOperationException($"Core's {nameof(LibVBANext.BinStateSave)}() returned false!");
writer.Write(_savebuff.Length);
writer.Write(_savebuff);
@@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
throw new InvalidOperationException("Save buffer size mismatch!");
reader.Read(_savebuff, 0, length);
if (!LibVBANext.BinStateLoad(Core, _savebuff, _savebuff.Length))
- throw new InvalidOperationException("Core's BinStateLoad() returned false!");
+ throw new InvalidOperationException($"Core's {nameof(LibVBANext.BinStateLoad)}() returned false!");
// other variables
IsLagFrame = reader.ReadBoolean();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs
index 247d7fd68d..72cb7af7ca 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs
@@ -57,11 +57,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
Core = LibVBANext.Create();
if (Core == IntPtr.Zero)
- throw new InvalidOperationException("Create() returned nullptr!");
+ throw new InvalidOperationException($"{nameof(LibVBANext.Create)}() returned nullptr!");
try
{
if (!LibVBANext.LoadRom(Core, file, (uint)file.Length, biosfile, (uint)biosfile.Length, FES))
- throw new InvalidOperationException("LoadRom() returned false!");
+ throw new InvalidOperationException($"{nameof(LibVBANext.LoadRom)}() returned false!");
Tracer = new TraceBuffer()
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs
index 4d16137978..52778985e4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs
@@ -950,113 +950,113 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public void SyncState(Serializer ser)
{
- ser.Sync("Audio_Regs", ref Audio_Regs, false);
+ ser.Sync(nameof(Audio_Regs), ref Audio_Regs, false);
ser.Sync("Wave_Ram", ref Wave_RAM, false);
- ser.Sync("SQ1_vol_done", ref SQ1_vol_done);
- ser.Sync("SQ1_calc_done", ref SQ1_calc_done);
- ser.Sync("SQ1_swp_enable", ref SQ1_swp_enable);
+ ser.Sync(nameof(SQ1_vol_done), ref SQ1_vol_done);
+ ser.Sync(nameof(SQ1_calc_done), ref SQ1_calc_done);
+ ser.Sync(nameof(SQ1_swp_enable), ref SQ1_swp_enable);
ser.Sync("SQ1_length_counter", ref SQ1_len_cntr);
- ser.Sync("SQ1_enable", ref SQ1_enable);
- ser.Sync("SQ1_vol_state", ref SQ1_vol_state);
- ser.Sync("SQ1_duty_cntr", ref SQ1_duty_cntr);
- ser.Sync("SQ1_frq_shadow", ref SQ1_frq_shadow);
- ser.Sync("SQ1_intl_cntr", ref SQ1_intl_cntr);
- ser.Sync("SQ1_vol_per", ref SQ1_vol_per);
- ser.Sync("SQ1_intl_swp_cnt", ref SQ1_intl_swp_cnt);
- ser.Sync("SQ1_len_cntr", ref SQ1_len_cntr);
- ser.Sync("SQ1_negate", ref SQ1_negate);
- ser.Sync("SQ1_trigger", ref SQ1_trigger);
- ser.Sync("SQ1_len_en", ref SQ1_len_en);
- ser.Sync("SQ1_env_add", ref SQ1_env_add);
- ser.Sync("SQ1_shift", ref SQ1_shift);
- ser.Sync("SQ1_duty", ref SQ1_duty);
- ser.Sync("SQ1_st_vol", ref SQ1_st_vol);
- ser.Sync("SQ1_per", ref SQ1_per);
- ser.Sync("SQ1_swp_prd", ref SQ1_swp_prd);
- ser.Sync("SQ1_frq", ref SQ1_frq);
- ser.Sync("SQ1_length", ref SQ1_length);
- ser.Sync("SQ1_output", ref SQ1_output);
+ ser.Sync(nameof(SQ1_enable), ref SQ1_enable);
+ ser.Sync(nameof(SQ1_vol_state), ref SQ1_vol_state);
+ ser.Sync(nameof(SQ1_duty_cntr), ref SQ1_duty_cntr);
+ ser.Sync(nameof(SQ1_frq_shadow), ref SQ1_frq_shadow);
+ ser.Sync(nameof(SQ1_intl_cntr), ref SQ1_intl_cntr);
+ ser.Sync(nameof(SQ1_vol_per), ref SQ1_vol_per);
+ ser.Sync(nameof(SQ1_intl_swp_cnt), ref SQ1_intl_swp_cnt);
+ ser.Sync(nameof(SQ1_len_cntr), ref SQ1_len_cntr);
+ ser.Sync(nameof(SQ1_negate), ref SQ1_negate);
+ ser.Sync(nameof(SQ1_trigger), ref SQ1_trigger);
+ ser.Sync(nameof(SQ1_len_en), ref SQ1_len_en);
+ ser.Sync(nameof(SQ1_env_add), ref SQ1_env_add);
+ ser.Sync(nameof(SQ1_shift), ref SQ1_shift);
+ ser.Sync(nameof(SQ1_duty), ref SQ1_duty);
+ ser.Sync(nameof(SQ1_st_vol), ref SQ1_st_vol);
+ ser.Sync(nameof(SQ1_per), ref SQ1_per);
+ ser.Sync(nameof(SQ1_swp_prd), ref SQ1_swp_prd);
+ ser.Sync(nameof(SQ1_frq), ref SQ1_frq);
+ ser.Sync(nameof(SQ1_length), ref SQ1_length);
+ ser.Sync(nameof(SQ1_output), ref SQ1_output);
- ser.Sync("SQ2_vol_done", ref SQ2_vol_done);
+ ser.Sync(nameof(SQ2_vol_done), ref SQ2_vol_done);
ser.Sync("SQ2_length_counter", ref SQ2_len_cntr);
- ser.Sync("SQ2_enable", ref SQ2_enable);
- ser.Sync("SQ2_vol_state", ref SQ2_vol_state);
- ser.Sync("SQ2_duty_cntr", ref SQ2_duty_cntr);
- ser.Sync("SQ2_intl_cntr", ref SQ2_intl_cntr);
- ser.Sync("SQ2_vol_per", ref SQ2_vol_per);
- ser.Sync("SQ2_len_cntr", ref SQ2_len_cntr);
- ser.Sync("SQ2_trigger", ref SQ2_trigger);
- ser.Sync("SQ2_len_en", ref SQ2_len_en);
- ser.Sync("SQ2_env_add", ref SQ2_env_add);
- ser.Sync("SQ2_duty", ref SQ2_duty);
- ser.Sync("SQ2_st_vol", ref SQ2_st_vol);
- ser.Sync("SQ2_per", ref SQ2_per);
- ser.Sync("SQ2_frq", ref SQ2_frq);
- ser.Sync("SQ2_length", ref SQ2_length);
- ser.Sync("SQ2_output", ref SQ2_output);
+ ser.Sync(nameof(SQ2_enable), ref SQ2_enable);
+ ser.Sync(nameof(SQ2_vol_state), ref SQ2_vol_state);
+ ser.Sync(nameof(SQ2_duty_cntr), ref SQ2_duty_cntr);
+ ser.Sync(nameof(SQ2_intl_cntr), ref SQ2_intl_cntr);
+ ser.Sync(nameof(SQ2_vol_per), ref SQ2_vol_per);
+ ser.Sync(nameof(SQ2_len_cntr), ref SQ2_len_cntr);
+ ser.Sync(nameof(SQ2_trigger), ref SQ2_trigger);
+ ser.Sync(nameof(SQ2_len_en), ref SQ2_len_en);
+ ser.Sync(nameof(SQ2_env_add), ref SQ2_env_add);
+ ser.Sync(nameof(SQ2_duty), ref SQ2_duty);
+ ser.Sync(nameof(SQ2_st_vol), ref SQ2_st_vol);
+ ser.Sync(nameof(SQ2_per), ref SQ2_per);
+ ser.Sync(nameof(SQ2_frq), ref SQ2_frq);
+ ser.Sync(nameof(SQ2_length), ref SQ2_length);
+ ser.Sync(nameof(SQ2_output), ref SQ2_output);
- ser.Sync("WAVE_can_get", ref WAVE_can_get);
+ ser.Sync(nameof(WAVE_can_get), ref WAVE_can_get);
ser.Sync("WAVE_length_counter", ref WAVE_len_cntr);
- ser.Sync("WAVE_enable", ref WAVE_enable);
- ser.Sync("WAVE_wave_cntr", ref WAVE_wave_cntr);
- ser.Sync("WAVE_intl_cntr", ref WAVE_intl_cntr);
- ser.Sync("WAVE_len_cntr", ref WAVE_len_cntr);
- ser.Sync("WAVE_DAC_pow", ref WAVE_DAC_pow);
- ser.Sync("WAVE_trigger", ref WAVE_trigger);
- ser.Sync("WAVE_len_en", ref WAVE_len_en);
- ser.Sync("WAVE_vol_code", ref WAVE_vol_code);
- ser.Sync("WAVE_frq", ref WAVE_frq);
- ser.Sync("WAVE_length", ref WAVE_length);
- ser.Sync("WAVE_output", ref WAVE_output);
+ ser.Sync(nameof(WAVE_enable), ref WAVE_enable);
+ ser.Sync(nameof(WAVE_wave_cntr), ref WAVE_wave_cntr);
+ ser.Sync(nameof(WAVE_intl_cntr), ref WAVE_intl_cntr);
+ ser.Sync(nameof(WAVE_len_cntr), ref WAVE_len_cntr);
+ ser.Sync(nameof(WAVE_DAC_pow), ref WAVE_DAC_pow);
+ ser.Sync(nameof(WAVE_trigger), ref WAVE_trigger);
+ ser.Sync(nameof(WAVE_len_en), ref WAVE_len_en);
+ ser.Sync(nameof(WAVE_vol_code), ref WAVE_vol_code);
+ ser.Sync(nameof(WAVE_frq), ref WAVE_frq);
+ ser.Sync(nameof(WAVE_length), ref WAVE_length);
+ ser.Sync(nameof(WAVE_output), ref WAVE_output);
- ser.Sync("NOISE_vol_done", ref NOISE_vol_done);
+ ser.Sync(nameof(NOISE_vol_done), ref NOISE_vol_done);
ser.Sync("NOISE_length_counter", ref NOISE_len_cntr);
- ser.Sync("NOISE_enable", ref NOISE_enable);
- ser.Sync("NOISE_vol_state", ref NOISE_vol_state);
- ser.Sync("NOISE_intl_cntr", ref NOISE_intl_cntr);
- ser.Sync("NOISE_vol_per", ref NOISE_vol_per);
- ser.Sync("NOISE_LFSR", ref NOISE_LFSR);
- ser.Sync("NOISE_len_cntr", ref NOISE_len_cntr);
- ser.Sync("NOISE_wdth_md", ref NOISE_wdth_md);
- ser.Sync("NOISE_trigger", ref NOISE_trigger);
- ser.Sync("NOISE_len_en", ref NOISE_len_en);
- ser.Sync("NOISE_env_add", ref NOISE_env_add);
- ser.Sync("NOISE_clk_shft", ref NOISE_clk_shft);
- ser.Sync("NOISE_div_code", ref NOISE_div_code);
- ser.Sync("NOISE_st_vol", ref NOISE_st_vol);
- ser.Sync("NOISE_per", ref NOISE_per);
- ser.Sync("NOISE_length", ref NOISE_length);
- ser.Sync("NOISE_output", ref NOISE_output);
+ ser.Sync(nameof(NOISE_enable), ref NOISE_enable);
+ ser.Sync(nameof(NOISE_vol_state), ref NOISE_vol_state);
+ ser.Sync(nameof(NOISE_intl_cntr), ref NOISE_intl_cntr);
+ ser.Sync(nameof(NOISE_vol_per), ref NOISE_vol_per);
+ ser.Sync(nameof(NOISE_LFSR), ref NOISE_LFSR);
+ ser.Sync(nameof(NOISE_len_cntr), ref NOISE_len_cntr);
+ ser.Sync(nameof(NOISE_wdth_md), ref NOISE_wdth_md);
+ ser.Sync(nameof(NOISE_trigger), ref NOISE_trigger);
+ ser.Sync(nameof(NOISE_len_en), ref NOISE_len_en);
+ ser.Sync(nameof(NOISE_env_add), ref NOISE_env_add);
+ ser.Sync(nameof(NOISE_clk_shft), ref NOISE_clk_shft);
+ ser.Sync(nameof(NOISE_div_code), ref NOISE_div_code);
+ ser.Sync(nameof(NOISE_st_vol), ref NOISE_st_vol);
+ ser.Sync(nameof(NOISE_per), ref NOISE_per);
+ ser.Sync(nameof(NOISE_length), ref NOISE_length);
+ ser.Sync(nameof(NOISE_output), ref NOISE_output);
- ser.Sync("sequencer_len", ref sequencer_len);
- ser.Sync("sequencer_vol", ref sequencer_vol);
- ser.Sync("sequencer_swp", ref sequencer_swp);
- ser.Sync("timer_bit_old", ref timer_bit_old);
+ ser.Sync(nameof(sequencer_len), ref sequencer_len);
+ ser.Sync(nameof(sequencer_vol), ref sequencer_vol);
+ ser.Sync(nameof(sequencer_swp), ref sequencer_swp);
+ ser.Sync(nameof(timer_bit_old), ref timer_bit_old);
- ser.Sync("master_audio_clock", ref master_audio_clock);
+ ser.Sync(nameof(master_audio_clock), ref master_audio_clock);
- ser.Sync("sample", ref sample);
- ser.Sync("latched_sample_L", ref latched_sample_L);
- ser.Sync("latched_sample_R", ref latched_sample_R);
+ ser.Sync(nameof(sample), ref sample);
+ ser.Sync(nameof(latched_sample_L), ref latched_sample_L);
+ ser.Sync(nameof(latched_sample_R), ref latched_sample_R);
- ser.Sync("AUD_CTRL_vin_L_en", ref AUD_CTRL_vin_L_en);
- ser.Sync("AUD_CTRL_vin_R_en", ref AUD_CTRL_vin_R_en);
- ser.Sync("AUD_CTRL_sq1_L_en", ref AUD_CTRL_sq1_L_en);
- ser.Sync("AUD_CTRL_sq2_L_en", ref AUD_CTRL_sq2_L_en);
- ser.Sync("AUD_CTRL_wave_L_en", ref AUD_CTRL_wave_L_en);
- ser.Sync("AUD_CTRL_noise_L_en", ref AUD_CTRL_noise_L_en);
- ser.Sync("AUD_CTRL_sq1_R_en", ref AUD_CTRL_sq1_R_en);
- ser.Sync("AUD_CTRL_sq2_R_en", ref AUD_CTRL_sq2_R_en);
- ser.Sync("AUD_CTRL_wave_R_en", ref AUD_CTRL_wave_R_en);
- ser.Sync("AUD_CTRL_noise_R_en", ref AUD_CTRL_noise_R_en);
- ser.Sync("AUD_CTRL_power", ref AUD_CTRL_power);
- ser.Sync("AUD_CTRL_vol_L", ref AUD_CTRL_vol_L);
- ser.Sync("AUD_CTRL_vol_R", ref AUD_CTRL_vol_R);
+ ser.Sync(nameof(AUD_CTRL_vin_L_en), ref AUD_CTRL_vin_L_en);
+ ser.Sync(nameof(AUD_CTRL_vin_R_en), ref AUD_CTRL_vin_R_en);
+ ser.Sync(nameof(AUD_CTRL_sq1_L_en), ref AUD_CTRL_sq1_L_en);
+ ser.Sync(nameof(AUD_CTRL_sq2_L_en), ref AUD_CTRL_sq2_L_en);
+ ser.Sync(nameof(AUD_CTRL_wave_L_en), ref AUD_CTRL_wave_L_en);
+ ser.Sync(nameof(AUD_CTRL_noise_L_en), ref AUD_CTRL_noise_L_en);
+ ser.Sync(nameof(AUD_CTRL_sq1_R_en), ref AUD_CTRL_sq1_R_en);
+ ser.Sync(nameof(AUD_CTRL_sq2_R_en), ref AUD_CTRL_sq2_R_en);
+ ser.Sync(nameof(AUD_CTRL_wave_R_en), ref AUD_CTRL_wave_R_en);
+ ser.Sync(nameof(AUD_CTRL_noise_R_en), ref AUD_CTRL_noise_R_en);
+ ser.Sync(nameof(AUD_CTRL_power), ref AUD_CTRL_power);
+ ser.Sync(nameof(AUD_CTRL_vol_L), ref AUD_CTRL_vol_L);
+ ser.Sync(nameof(AUD_CTRL_vol_R), ref AUD_CTRL_vol_R);
- ser.Sync("WAVE_output_decay", ref WAVE_output_decay);
- ser.Sync("WAVE_output_decay_L", ref WAVE_output_decay_L);
- ser.Sync("WAVE_output_decay_R", ref WAVE_output_decay_R);
+ ser.Sync(nameof(WAVE_output_decay), ref WAVE_output_decay);
+ ser.Sync(nameof(WAVE_output_decay_L), ref WAVE_output_decay_L);
+ ser.Sync(nameof(WAVE_output_decay_R), ref WAVE_output_decay_R);
}
public byte Read_NR52()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs
index 27775f026b..c1d420be36 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs
@@ -1532,34 +1532,34 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
{
ser.Sync("pal_transfer_byte", ref BG_transfer_byte);
ser.Sync("spr_transfer_byte", ref OBJ_transfer_byte);
- ser.Sync("HDMA_src_hi", ref HDMA_src_hi);
- ser.Sync("HDMA_src_lo", ref HDMA_src_lo);
- ser.Sync("HDMA_dest_hi", ref HDMA_dest_hi);
- ser.Sync("HDMA_dest_lo", ref HDMA_dest_lo);
- ser.Sync("HDMA_tick", ref HDMA_tick);
- ser.Sync("HDMA_byte", ref HDMA_byte);
+ ser.Sync(nameof(HDMA_src_hi), ref HDMA_src_hi);
+ ser.Sync(nameof(HDMA_src_lo), ref HDMA_src_lo);
+ ser.Sync(nameof(HDMA_dest_hi), ref HDMA_dest_hi);
+ ser.Sync(nameof(HDMA_dest_lo), ref HDMA_dest_lo);
+ ser.Sync(nameof(HDMA_tick), ref HDMA_tick);
+ ser.Sync(nameof(HDMA_byte), ref HDMA_byte);
- ser.Sync("VRAM_sel", ref VRAM_sel);
- ser.Sync("BG_V_flip", ref BG_V_flip);
- ser.Sync("HDMA_mode", ref HDMA_mode);
- ser.Sync("cur_DMA_src", ref cur_DMA_src);
- ser.Sync("cur_DMA_dest", ref cur_DMA_dest);
- ser.Sync("HDMA_length", ref HDMA_length);
- ser.Sync("HDMA_countdown", ref HDMA_countdown);
- ser.Sync("HBL_HDMA_count", ref HBL_HDMA_count);
- ser.Sync("last_HBL", ref last_HBL);
- ser.Sync("HBL_HDMA_go", ref HBL_HDMA_go);
- ser.Sync("HBL_test", ref HBL_test);
+ ser.Sync(nameof(VRAM_sel), ref VRAM_sel);
+ ser.Sync(nameof(BG_V_flip), ref BG_V_flip);
+ ser.Sync(nameof(HDMA_mode), ref HDMA_mode);
+ ser.Sync(nameof(cur_DMA_src), ref cur_DMA_src);
+ ser.Sync(nameof(cur_DMA_dest), ref cur_DMA_dest);
+ ser.Sync(nameof(HDMA_length), ref HDMA_length);
+ ser.Sync(nameof(HDMA_countdown), ref HDMA_countdown);
+ ser.Sync(nameof(HBL_HDMA_count), ref HBL_HDMA_count);
+ ser.Sync(nameof(last_HBL), ref last_HBL);
+ ser.Sync(nameof(HBL_HDMA_go), ref HBL_HDMA_go);
+ ser.Sync(nameof(HBL_test), ref HBL_test);
- ser.Sync("BG_bytes", ref BG_bytes, false);
- ser.Sync("OBJ_bytes", ref OBJ_bytes, false);
- ser.Sync("BG_bytes_inc", ref BG_bytes_inc);
- ser.Sync("OBJ_bytes_inc", ref OBJ_bytes_inc);
- ser.Sync("BG_bytes_index", ref BG_bytes_index);
- ser.Sync("OBJ_bytes_index", ref OBJ_bytes_index);
+ ser.Sync(nameof(BG_bytes), ref BG_bytes, false);
+ ser.Sync(nameof(OBJ_bytes), ref OBJ_bytes, false);
+ ser.Sync(nameof(BG_bytes_inc), ref BG_bytes_inc);
+ ser.Sync(nameof(OBJ_bytes_inc), ref OBJ_bytes_inc);
+ ser.Sync(nameof(BG_bytes_index), ref BG_bytes_index);
+ ser.Sync(nameof(OBJ_bytes_index), ref OBJ_bytes_index);
- ser.Sync("LYC_t", ref LYC_t);
- ser.Sync("LYC_cd", ref LYC_cd);
+ ser.Sync(nameof(LYC_t), ref LYC_t);
+ ser.Sync(nameof(LYC_cd), ref LYC_cd);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IStatable.cs
index 5091c6ceb8..74cd3fa611 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IStatable.cs
@@ -55,56 +55,56 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
audio.SyncState(ser);
ser.BeginSection("Gameboy");
- ser.Sync("core", ref core, false);
+ ser.Sync(nameof(core), ref core, false);
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
_controllerDeck.SyncState(ser);
- ser.Sync("controller_state", ref controller_state);
- ser.Sync("Acc_X_state", ref Acc_X_state);
- ser.Sync("Acc_Y_state", ref Acc_Y_state);
- ser.Sync("in_vblank", ref in_vblank);
- ser.Sync("in_vblank_old", ref in_vblank_old);
- ser.Sync("vblank_rise", ref vblank_rise);
- ser.Sync("GB_bios_register", ref GB_bios_register);
- ser.Sync("input_register", ref input_register);
+ ser.Sync(nameof(controller_state), ref controller_state);
+ ser.Sync(nameof(Acc_X_state), ref Acc_X_state);
+ ser.Sync(nameof(Acc_Y_state), ref Acc_Y_state);
+ ser.Sync(nameof(in_vblank), ref in_vblank);
+ ser.Sync(nameof(in_vblank_old), ref in_vblank_old);
+ ser.Sync(nameof(vblank_rise), ref vblank_rise);
+ ser.Sync(nameof(GB_bios_register), ref GB_bios_register);
+ ser.Sync(nameof(input_register), ref input_register);
- ser.Sync("REG_FFFF", ref REG_FFFF);
- ser.Sync("REG_FF0F", ref REG_FF0F);
- ser.Sync("REG_FF0F_OLD", ref REG_FF0F_OLD);
+ ser.Sync(nameof(REG_FFFF), ref REG_FFFF);
+ ser.Sync(nameof(REG_FF0F), ref REG_FF0F);
+ ser.Sync(nameof(REG_FF0F_OLD), ref REG_FF0F_OLD);
// memory domains
- ser.Sync("RAM", ref RAM, false);
- ser.Sync("ZP_RAM", ref ZP_RAM, false);
- ser.Sync("VRAM", ref VRAM, false);
- ser.Sync("OAM", ref OAM, false);
+ ser.Sync(nameof(RAM), ref RAM, false);
+ ser.Sync(nameof(ZP_RAM), ref ZP_RAM, false);
+ ser.Sync(nameof(VRAM), ref VRAM, false);
+ ser.Sync(nameof(OAM), ref OAM, false);
- ser.Sync("_bios", ref _bios, false);
+ ser.Sync(nameof(_bios), ref _bios, false);
- ser.Sync("RAM_Bank", ref RAM_Bank);
- ser.Sync("VRAM_Bank", ref VRAM_Bank);
- ser.Sync("is_GBC", ref is_GBC);
- ser.Sync("GBC_compat", ref GBC_compat);
- ser.Sync("double_speed", ref double_speed);
- ser.Sync("speed_switch", ref speed_switch);
- ser.Sync("HDMA_transfer", ref HDMA_transfer);
+ ser.Sync(nameof(RAM_Bank), ref RAM_Bank);
+ ser.Sync(nameof(VRAM_Bank), ref VRAM_Bank);
+ ser.Sync(nameof(is_GBC), ref is_GBC);
+ ser.Sync(nameof(GBC_compat), ref GBC_compat);
+ ser.Sync(nameof(double_speed), ref double_speed);
+ ser.Sync(nameof(speed_switch), ref speed_switch);
+ ser.Sync(nameof(HDMA_transfer), ref HDMA_transfer);
- ser.Sync("undoc_6C", ref undoc_6C);
- ser.Sync("undoc_72", ref undoc_72);
- ser.Sync("undoc_73", ref undoc_73);
- ser.Sync("undoc_74", ref undoc_74);
- ser.Sync("undoc_75", ref undoc_75);
- ser.Sync("undoc_76", ref undoc_76);
- ser.Sync("undoc_77", ref undoc_77);
+ ser.Sync(nameof(undoc_6C), ref undoc_6C);
+ ser.Sync(nameof(undoc_72), ref undoc_72);
+ ser.Sync(nameof(undoc_73), ref undoc_73);
+ ser.Sync(nameof(undoc_74), ref undoc_74);
+ ser.Sync(nameof(undoc_75), ref undoc_75);
+ ser.Sync(nameof(undoc_76), ref undoc_76);
+ ser.Sync(nameof(undoc_77), ref undoc_77);
- ser.Sync("Use_MT", ref Use_MT);
- ser.Sync("addr_access", ref addr_access);
+ ser.Sync(nameof(Use_MT), ref Use_MT);
+ ser.Sync(nameof(addr_access), ref addr_access);
// probably a better way to do this
if (cart_RAM != null)
{
- ser.Sync("cart_RAM", ref cart_RAM, false);
+ ser.Sync(nameof(cart_RAM), ref cart_RAM, false);
}
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs
index 5f21be47e0..bfd7487f43 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs
@@ -50,7 +50,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs
index 160516c159..358ff7aa21 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs
@@ -211,7 +211,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public void SyncState(Serializer ser)
{
// since we need rate of change of angle, need to savestate them
- ser.Sync("theta", ref theta);
+ ser.Sync(nameof(theta), ref theta);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs
index 453c83237b..98ef698735 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs
@@ -179,12 +179,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
- ser.Sync("IR_signal", ref IR_signal);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
+ ser.Sync(nameof(IR_signal), ref IR_signal);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs
index 88029763c2..5347487ed4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs
@@ -284,20 +284,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
- ser.Sync("IR_signal", ref IR_signal);
- ser.Sync("control", ref control);
- ser.Sync("chip_read", ref chip_read);
- ser.Sync("timer_read", ref timer_read);
- ser.Sync("time_val_shift", ref time_val_shift);
- ser.Sync("time", ref time);
- ser.Sync("RTC_timer", ref RTC_timer);
- ser.Sync("RTC_low_clock", ref RTC_low_clock);
- ser.Sync("RTC_seconds", ref RTC_seconds);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
+ ser.Sync(nameof(IR_signal), ref IR_signal);
+ ser.Sync(nameof(control), ref control);
+ ser.Sync(nameof(chip_read), ref chip_read);
+ ser.Sync(nameof(timer_read), ref timer_read);
+ ser.Sync(nameof(time_val_shift), ref time_val_shift);
+ ser.Sync(nameof(time), ref time);
+ ser.Sync(nameof(RTC_timer), ref RTC_timer);
+ ser.Sync(nameof(RTC_low_clock), ref RTC_low_clock);
+ ser.Sync(nameof(RTC_seconds), ref RTC_seconds);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs
index c294059501..f931d33b73 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs
@@ -185,12 +185,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
- ser.Sync("sel_mode", ref sel_mode);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
+ ser.Sync(nameof(sel_mode), ref sel_mode);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs
index 3d84b4fde2..017debca25 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs
@@ -181,12 +181,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
- ser.Sync("sel_mode", ref sel_mode);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
+ ser.Sync(nameof(sel_mode), ref sel_mode);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs
index 9d82306f50..abd71d724b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs
@@ -108,10 +108,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_enable", ref RAM_enable);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs
index f52c8c6e65..378d156429 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs
@@ -258,17 +258,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
- ser.Sync("halt", ref halt);
- ser.Sync("RTC_regs", ref RTC_regs, false);
- ser.Sync("RTC_regs_latch", ref RTC_regs_latch, false);
- ser.Sync("RTC_regs_latch_wr", ref RTC_regs_latch_wr);
- ser.Sync("RTC_timer", ref RTC_timer);
- ser.Sync("RTC_low_clock", ref RTC_low_clock);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
+ ser.Sync(nameof(halt), ref halt);
+ ser.Sync(nameof(RTC_regs), ref RTC_regs, false);
+ ser.Sync(nameof(RTC_regs_latch), ref RTC_regs_latch, false);
+ ser.Sync(nameof(RTC_regs_latch_wr), ref RTC_regs_latch_wr);
+ ser.Sync(nameof(RTC_timer), ref RTC_timer);
+ ser.Sync(nameof(RTC_low_clock), ref RTC_low_clock);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs
index 46c8878502..924af960df 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs
@@ -150,11 +150,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_Bank", ref RAM_bank);
- ser.Sync("RAM_Mask", ref RAM_mask);
- ser.Sync("RAM_enable", ref RAM_enable);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_bank), ref RAM_bank);
+ ser.Sync(nameof(RAM_mask), ref RAM_mask);
+ ser.Sync(nameof(RAM_enable), ref RAM_enable);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs
index ba00d55c9d..aa5d756a2b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs
@@ -159,31 +159,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("RAM_enable_1", ref RAM_enable_1);
- ser.Sync("RAM_enable_2", ref RAM_enable_2);
- ser.Sync("acc_x_low", ref acc_x_low);
- ser.Sync("acc_x_high", ref acc_x_high);
- ser.Sync("acc_y_low", ref acc_y_low);
- ser.Sync("acc_y_high", ref acc_y_high);
- ser.Sync("is_erased", ref is_erased);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(RAM_enable_1), ref RAM_enable_1);
+ ser.Sync(nameof(RAM_enable_2), ref RAM_enable_2);
+ ser.Sync(nameof(acc_x_low), ref acc_x_low);
+ ser.Sync(nameof(acc_x_high), ref acc_x_high);
+ ser.Sync(nameof(acc_y_low), ref acc_y_low);
+ ser.Sync(nameof(acc_y_high), ref acc_y_high);
+ ser.Sync(nameof(is_erased), ref is_erased);
- ser.Sync("CS_prev", ref CS_prev);
- ser.Sync("CLK_prev", ref CLK_prev);
- ser.Sync("DI_prev", ref DI_prev);
- ser.Sync("DO", ref DO);
- ser.Sync("instr_read", ref instr_read);
- ser.Sync("perf_instr", ref perf_instr);
- ser.Sync("instr_bit_counter", ref instr_bit_counter);
- ser.Sync("instr", ref instr);
- ser.Sync("WR_EN", ref WR_EN);
- ser.Sync("EE_addr", ref EE_addr);
- ser.Sync("instr_case", ref instr_case);
- ser.Sync("instr_clocks", ref instr_clocks);
- ser.Sync("EE_value", ref EE_value);
- ser.Sync("countdown", ref countdown);
- ser.Sync("countdown_start", ref countdown_start);
+ ser.Sync(nameof(CS_prev), ref CS_prev);
+ ser.Sync(nameof(CLK_prev), ref CLK_prev);
+ ser.Sync(nameof(DI_prev), ref DI_prev);
+ ser.Sync(nameof(DO), ref DO);
+ ser.Sync(nameof(instr_read), ref instr_read);
+ ser.Sync(nameof(perf_instr), ref perf_instr);
+ ser.Sync(nameof(instr_bit_counter), ref instr_bit_counter);
+ ser.Sync(nameof(instr), ref instr);
+ ser.Sync(nameof(WR_EN), ref WR_EN);
+ ser.Sync(nameof(EE_addr), ref EE_addr);
+ ser.Sync(nameof(instr_case), ref instr_case);
+ ser.Sync(nameof(instr_clocks), ref instr_clocks);
+ ser.Sync(nameof(EE_value), ref EE_value);
+ ser.Sync(nameof(countdown), ref countdown);
+ ser.Sync(nameof(countdown_start), ref countdown_start);
}
public byte Register_Access_Read(ushort addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs
index e50d297e3d..6e71464da0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs
@@ -82,8 +82,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC1.cs
index 57af41fd0a..25cf1420ff 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC1.cs
@@ -174,14 +174,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("locked", ref locked);
- ser.Sync("ROM_bank_mask", ref ROM_bank_mask);
- ser.Sync("BASE_ROM_Bank", ref BASE_ROM_Bank);
- ser.Sync("reg_access", ref reg_access);
- ser.Sync("addr_last", ref addr_last);
- ser.Sync("counter", ref counter);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(locked), ref locked);
+ ser.Sync(nameof(ROM_bank_mask), ref ROM_bank_mask);
+ ser.Sync(nameof(BASE_ROM_Bank), ref BASE_ROM_Bank);
+ ser.Sync(nameof(reg_access), ref reg_access);
+ ser.Sync(nameof(addr_last), ref addr_last);
+ ser.Sync(nameof(counter), ref counter);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC2.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC2.cs
index d63f4b47a5..46e680477d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC2.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Sachen_MMC2.cs
@@ -208,16 +208,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
- ser.Sync("locked", ref locked);
- ser.Sync("locked_GBC", ref locked_GBC);
- ser.Sync("finished", ref finished);
- ser.Sync("ROM_bank_mask", ref ROM_bank_mask);
- ser.Sync("BASE_ROM_Bank", ref BASE_ROM_Bank);
- ser.Sync("reg_access", ref reg_access);
- ser.Sync("addr_last", ref addr_last);
- ser.Sync("counter", ref counter);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
+ ser.Sync(nameof(locked), ref locked);
+ ser.Sync(nameof(locked_GBC), ref locked_GBC);
+ ser.Sync(nameof(finished), ref finished);
+ ser.Sync(nameof(ROM_bank_mask), ref ROM_bank_mask);
+ ser.Sync(nameof(BASE_ROM_Bank), ref BASE_ROM_Bank);
+ ser.Sync(nameof(reg_access), ref reg_access);
+ ser.Sync(nameof(addr_last), ref addr_last);
+ ser.Sync(nameof(counter), ref counter);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs
index 9d1889f007..15825d2fe4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs
@@ -34,16 +34,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
}
}
- public override void MapCDL(ushort addr, LR35902.eCDLogMemFlags flags)
- {
- if (addr < 0x8000)
- {
- SetCDLROM(flags, ROM_bank * 0x8000 + addr);
- }
- else
- {
- return;
- }
+ public override void MapCDL(ushort addr, LR35902.eCDLogMemFlags flags)
+ {
+ if (addr < 0x8000)
+ {
+ SetCDLROM(flags, ROM_bank * 0x8000 + addr);
+ }
+ else
+ {
+ return;
+ }
}
public override byte PeekMemory(ushort addr)
@@ -67,8 +67,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public override void SyncState(Serializer ser)
{
- ser.Sync("ROM_Bank", ref ROM_bank);
- ser.Sync("ROM_Mask", ref ROM_mask);
+ ser.Sync(nameof(ROM_bank), ref ROM_bank);
+ ser.Sync(nameof(ROM_mask), ref ROM_mask);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs
index 520db111e1..340b61fc2b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs
@@ -161,97 +161,97 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public virtual void SyncState(Serializer ser)
{
- ser.Sync("BG_palette", ref BG_palette, false);
- ser.Sync("OBJ_palette", ref OBJ_palette, false);
- ser.Sync("HDMA_active", ref HDMA_active);
+ ser.Sync(nameof(BG_palette), ref BG_palette, false);
+ ser.Sync(nameof(OBJ_palette), ref OBJ_palette, false);
+ ser.Sync(nameof(HDMA_active), ref HDMA_active);
- ser.Sync("LCDC", ref LCDC);
- ser.Sync("STAT", ref STAT);
- ser.Sync("scroll_y", ref scroll_y);
- ser.Sync("scroll_x", ref scroll_x);
- ser.Sync("LY", ref LY);
- ser.Sync("LY_actual", ref LY_actual);
- ser.Sync("LYinc", ref LY_inc);
- ser.Sync("LYC", ref LYC);
- ser.Sync("DMA_addr", ref DMA_addr);
- ser.Sync("BGP", ref BGP);
- ser.Sync("obj_pal_0", ref obj_pal_0);
- ser.Sync("obj_pal_1", ref obj_pal_1);
- ser.Sync("window_y", ref window_y);
- ser.Sync("window_x", ref window_x);
- ser.Sync("DMA_start", ref DMA_start);
- ser.Sync("DMA_clock", ref DMA_clock);
- ser.Sync("DMA_inc", ref DMA_inc);
- ser.Sync("DMA_byte", ref DMA_byte);
+ ser.Sync(nameof(LCDC), ref LCDC);
+ ser.Sync(nameof(STAT), ref STAT);
+ ser.Sync(nameof(scroll_y), ref scroll_y);
+ ser.Sync(nameof(scroll_x), ref scroll_x);
+ ser.Sync(nameof(LY), ref LY);
+ ser.Sync(nameof(LY_actual), ref LY_actual);
+ ser.Sync(nameof(LY_inc), ref LY_inc);
+ ser.Sync(nameof(LYC), ref LYC);
+ ser.Sync(nameof(DMA_addr), ref DMA_addr);
+ ser.Sync(nameof(BGP), ref BGP);
+ ser.Sync(nameof(obj_pal_0), ref obj_pal_0);
+ ser.Sync(nameof(obj_pal_1), ref obj_pal_1);
+ ser.Sync(nameof(window_y), ref window_y);
+ ser.Sync(nameof(window_x), ref window_x);
+ ser.Sync(nameof(DMA_start), ref DMA_start);
+ ser.Sync(nameof(DMA_clock), ref DMA_clock);
+ ser.Sync(nameof(DMA_inc), ref DMA_inc);
+ ser.Sync(nameof(DMA_byte), ref DMA_byte);
- ser.Sync("cycle", ref cycle);
- ser.Sync("LYC_INT", ref LYC_INT);
- ser.Sync("HBL_INT", ref HBL_INT);
- ser.Sync("VBL_INT", ref VBL_INT);
- ser.Sync("OAM_INT", ref OAM_INT);
- ser.Sync("stat_line", ref stat_line);
- ser.Sync("stat_line_old", ref stat_line_old);
- ser.Sync("LCD_was_off", ref LCD_was_off);
- ser.Sync("OAM_scan_index", ref OAM_scan_index);
- ser.Sync("SL_sprites_index", ref SL_sprites_index);
- ser.Sync("SL_sprites", ref SL_sprites, false);
- ser.Sync("write_sprite", ref write_sprite);
- ser.Sync("no_scan", ref no_scan);
+ ser.Sync(nameof(cycle), ref cycle);
+ ser.Sync(nameof(LYC_INT), ref LYC_INT);
+ ser.Sync(nameof(HBL_INT), ref HBL_INT);
+ ser.Sync(nameof(VBL_INT), ref VBL_INT);
+ ser.Sync(nameof(OAM_INT), ref OAM_INT);
+ ser.Sync(nameof(stat_line), ref stat_line);
+ ser.Sync(nameof(stat_line_old), ref stat_line_old);
+ ser.Sync(nameof(LCD_was_off), ref LCD_was_off);
+ ser.Sync(nameof(OAM_scan_index), ref OAM_scan_index);
+ ser.Sync(nameof(SL_sprites_index), ref SL_sprites_index);
+ ser.Sync(nameof(SL_sprites), ref SL_sprites, false);
+ ser.Sync(nameof(write_sprite), ref write_sprite);
+ ser.Sync(nameof(no_scan), ref no_scan);
- ser.Sync("DMA_OAM_access", ref DMA_OAM_access);
- ser.Sync("OAM_access_read", ref OAM_access_read);
- ser.Sync("OAM_access_write", ref OAM_access_write);
- ser.Sync("VRAM_access_read", ref VRAM_access_read);
- ser.Sync("VRAM_access_write", ref VRAM_access_write);
+ ser.Sync(nameof(DMA_OAM_access), ref DMA_OAM_access);
+ ser.Sync(nameof(OAM_access_read), ref OAM_access_read);
+ ser.Sync(nameof(OAM_access_write), ref OAM_access_write);
+ ser.Sync(nameof(VRAM_access_read), ref VRAM_access_read);
+ ser.Sync(nameof(VRAM_access_write), ref VRAM_access_write);
- ser.Sync("read_case", ref read_case);
- ser.Sync("internal_cycle", ref internal_cycle);
- ser.Sync("y_tile", ref y_tile);
- ser.Sync("y_scroll_offset", ref y_scroll_offset);
- ser.Sync("x_tile", ref x_tile);
- ser.Sync("x_scroll_offset", ref x_scroll_offset);
- ser.Sync("tile_byte", ref tile_byte);
- ser.Sync("sprite_fetch_cycles", ref sprite_fetch_cycles);
- ser.Sync("fetch_sprite", ref fetch_sprite);
- ser.Sync("going_to_fetch", ref going_to_fetch);
- ser.Sync("first_fetch", ref first_fetch);
- ser.Sync("sprite_fetch_counter", ref sprite_fetch_counter);
- ser.Sync("sprite_attr_list", ref sprite_attr_list, false);
- ser.Sync("sprite_pixel_list", ref sprite_pixel_list, false);
- ser.Sync("sprite_present_list", ref sprite_present_list, false);
- ser.Sync("temp_fetch", ref temp_fetch);
- ser.Sync("tile_inc", ref tile_inc);
- ser.Sync("pre_render", ref pre_render);
- ser.Sync("pre_render_2", ref pre_render_2);
- ser.Sync("tile_data", ref tile_data, false);
- ser.Sync("tile_data_latch", ref tile_data_latch, false);
- ser.Sync("latch_counter", ref latch_counter);
- ser.Sync("latch_new_data", ref latch_new_data);
- ser.Sync("render_counter", ref render_counter);
- ser.Sync("render_offset", ref render_offset);
- ser.Sync("pixel_counter", ref pixel_counter);
- ser.Sync("pixel", ref pixel);
- ser.Sync("sprite_data", ref sprite_data, false);
- ser.Sync("sl_use_index", ref sl_use_index);
- ser.Sync("sprite_sel", ref sprite_sel, false);
- ser.Sync("no_sprites", ref no_sprites);
- ser.Sync("evaled_sprites", ref evaled_sprites);
- ser.Sync("SL_sprites_ordered", ref SL_sprites_ordered, false);
- ser.Sync("sprite_ordered_index", ref sprite_ordered_index);
- ser.Sync("blank_frame", ref blank_frame);
- ser.Sync("window_latch", ref window_latch);
- ser.Sync("consecutive_sprite", ref consecutive_sprite);
- ser.Sync("last_eval", ref last_eval);
+ ser.Sync(nameof(read_case), ref read_case);
+ ser.Sync(nameof(internal_cycle), ref internal_cycle);
+ ser.Sync(nameof(y_tile), ref y_tile);
+ ser.Sync(nameof(y_scroll_offset), ref y_scroll_offset);
+ ser.Sync(nameof(x_tile), ref x_tile);
+ ser.Sync(nameof(x_scroll_offset), ref x_scroll_offset);
+ ser.Sync(nameof(tile_byte), ref tile_byte);
+ ser.Sync(nameof(sprite_fetch_cycles), ref sprite_fetch_cycles);
+ ser.Sync(nameof(fetch_sprite), ref fetch_sprite);
+ ser.Sync(nameof(going_to_fetch), ref going_to_fetch);
+ ser.Sync(nameof(first_fetch), ref first_fetch);
+ ser.Sync(nameof(sprite_fetch_counter), ref sprite_fetch_counter);
+ ser.Sync(nameof(sprite_attr_list), ref sprite_attr_list, false);
+ ser.Sync(nameof(sprite_pixel_list), ref sprite_pixel_list, false);
+ ser.Sync(nameof(sprite_present_list), ref sprite_present_list, false);
+ ser.Sync(nameof(temp_fetch), ref temp_fetch);
+ ser.Sync(nameof(tile_inc), ref tile_inc);
+ ser.Sync(nameof(pre_render), ref pre_render);
+ ser.Sync(nameof(pre_render_2), ref pre_render_2);
+ ser.Sync(nameof(tile_data), ref tile_data, false);
+ ser.Sync(nameof(tile_data_latch), ref tile_data_latch, false);
+ ser.Sync(nameof(latch_counter), ref latch_counter);
+ ser.Sync(nameof(latch_new_data), ref latch_new_data);
+ ser.Sync(nameof(render_counter), ref render_counter);
+ ser.Sync(nameof(render_offset), ref render_offset);
+ ser.Sync(nameof(pixel_counter), ref pixel_counter);
+ ser.Sync(nameof(pixel), ref pixel);
+ ser.Sync(nameof(sprite_data), ref sprite_data, false);
+ ser.Sync(nameof(sl_use_index), ref sl_use_index);
+ ser.Sync(nameof(sprite_sel), ref sprite_sel, false);
+ ser.Sync(nameof(no_sprites), ref no_sprites);
+ ser.Sync(nameof(evaled_sprites), ref evaled_sprites);
+ ser.Sync(nameof(SL_sprites_ordered), ref SL_sprites_ordered, false);
+ ser.Sync(nameof(sprite_ordered_index), ref sprite_ordered_index);
+ ser.Sync(nameof(blank_frame), ref blank_frame);
+ ser.Sync(nameof(window_latch), ref window_latch);
+ ser.Sync(nameof(consecutive_sprite), ref consecutive_sprite);
+ ser.Sync(nameof(last_eval), ref last_eval);
- ser.Sync("window_counter", ref window_counter);
- ser.Sync("window_pre_render", ref window_pre_render);
- ser.Sync("window_started", ref window_started);
- ser.Sync("window_is_reset", ref window_is_reset);
- ser.Sync("window_tile_inc", ref window_tile_inc);
- ser.Sync("window_y_tile", ref window_y_tile);
- ser.Sync("window_x_tile", ref window_x_tile);
- ser.Sync("window_y_tile_inc", ref window_y_tile_inc);
- ser.Sync("window_x_latch", ref window_x_latch);
+ ser.Sync(nameof(window_counter), ref window_counter);
+ ser.Sync(nameof(window_pre_render), ref window_pre_render);
+ ser.Sync(nameof(window_started), ref window_started);
+ ser.Sync(nameof(window_is_reset), ref window_is_reset);
+ ser.Sync(nameof(window_tile_inc), ref window_tile_inc);
+ ser.Sync(nameof(window_y_tile), ref window_y_tile);
+ ser.Sync(nameof(window_x_tile), ref window_x_tile);
+ ser.Sync(nameof(window_y_tile_inc), ref window_y_tile_inc);
+ ser.Sync(nameof(window_x_latch), ref window_x_latch);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs
index f5e0150c61..c4fb5218e9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs
@@ -166,15 +166,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public void SyncState(Serializer ser)
{
- ser.Sync("serial_control", ref serial_control);
- ser.Sync("serial_data", ref serial_data);
- ser.Sync("serial_start", ref serial_start);
- ser.Sync("serial_clock", ref serial_clock);
- ser.Sync("serial_bits", ref serial_bits);
- ser.Sync("clk_internal", ref clk_internal);
- ser.Sync("clk_rate", ref clk_rate);
- ser.Sync("going_out", ref going_out);
- ser.Sync("coming_in", ref coming_in);
+ ser.Sync(nameof(serial_control), ref serial_control);
+ ser.Sync(nameof(serial_data), ref serial_data);
+ ser.Sync(nameof(serial_start), ref serial_start);
+ ser.Sync(nameof(serial_clock), ref serial_clock);
+ ser.Sync(nameof(serial_bits), ref serial_bits);
+ ser.Sync(nameof(clk_internal), ref clk_internal);
+ ser.Sync(nameof(clk_rate), ref clk_rate);
+ ser.Sync(nameof(going_out), ref going_out);
+ ser.Sync(nameof(coming_in), ref coming_in);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs
index 5f3fb8e9ce..a8b5eb541e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs
@@ -168,17 +168,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
public void SyncState(Serializer ser)
{
- ser.Sync("divider_reg", ref divider_reg);
- ser.Sync("timer_reload", ref timer_reload);
- ser.Sync("timer", ref timer);
- ser.Sync("timer_old", ref timer_old);
- ser.Sync("timer_control", ref timer_control);
- ser.Sync("pending_reload", ref pending_reload);
- ser.Sync("write_ignore", ref write_ignore);
- ser.Sync("old_state", ref old_state);
- ser.Sync("state", ref state);
- ser.Sync("reload_block", ref reload_block);
- ser.Sync("TMA_coincidence", ref TMA_coincidence);
+ ser.Sync(nameof(divider_reg), ref divider_reg);
+ ser.Sync(nameof(timer_reload), ref timer_reload);
+ ser.Sync(nameof(timer), ref timer);
+ ser.Sync(nameof(timer_old), ref timer_old);
+ ser.Sync(nameof(timer_control), ref timer_control);
+ ser.Sync(nameof(pending_reload), ref pending_reload);
+ ser.Sync(nameof(write_ignore), ref write_ignore);
+ ser.Sync(nameof(old_state), ref old_state);
+ ser.Sync(nameof(state), ref state);
+ ser.Sync(nameof(reload_block), ref reload_block);
+ ser.Sync(nameof(TMA_coincidence), ref TMA_coincidence);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs
index 215b4ca51c..9481bfc597 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IStatable.cs
@@ -57,9 +57,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
- ser.Sync("_cableconnected", ref _cableconnected);
- ser.Sync("_cablediscosignal", ref _cablediscosignal);
- ser.Sync("do_r_next", ref do_r_next);
+ ser.Sync(nameof(_cableconnected), ref _cableconnected);
+ ser.Sync(nameof(_cablediscosignal), ref _cablediscosignal);
+ ser.Sync(nameof(do_r_next), ref do_r_next);
_controllerDeck.SyncState(ser);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLinkControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLinkControllerDeck.cs
index 9bc1143bb4..7f789b0059 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLinkControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLinkControllerDeck.cs
@@ -49,11 +49,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Port2");
+ ser.BeginSection(nameof(Port2));
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
index bd862827a5..086ad2b779 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
@@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (!LibGambatte.gambatte_getmemoryarea(GambatteState, which, ref data, ref length))
{
- throw new Exception("gambatte_getmemoryarea() failed!");
+ throw new Exception($"{nameof(LibGambatte.gambatte_getmemoryarea)}() failed!");
}
// if length == 0, it's an empty block; (usually rambank on some carts); that's ok
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
index 55af4c3d1f..b4c83a3c62 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
@@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
if (!LibGambatte.gambatte_newstatesave(GambatteState, _savebuff, _savebuff.Length))
{
- throw new Exception("gambatte_newstatesave() returned false");
+ throw new Exception($"{nameof(LibGambatte.gambatte_newstatesave)}() returned false");
}
writer.Write(_savebuff.Length);
@@ -53,7 +53,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (!LibGambatte.gambatte_newstateload(GambatteState, _savebuff, _savebuff.Length))
{
- throw new Exception("gambatte_newstateload() returned false");
+ throw new Exception($"{nameof(LibGambatte.gambatte_newstateload)}() returned false");
}
// other variables
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
index 1f1891e1a5..ad53a9b698 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
@@ -49,7 +49,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (GambatteState == IntPtr.Zero)
{
- throw new InvalidOperationException("gambatte_create() returned null???");
+ throw new InvalidOperationException($"{nameof(LibGambatte.gambatte_create)}() returned null???");
}
Console.WriteLine(game.System);
@@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (LibGambatte.gambatte_load(GambatteState, file, (uint)file.Length, GetCurrentTime(), flags, DivInternal) != 0)
{
- throw new InvalidOperationException("gambatte_load() returned non-zero (is this not a gb or gbc rom?)");
+ throw new InvalidOperationException($"{nameof(LibGambatte.gambatte_load)}() returned non-zero (is this not a gb or gbc rom?)");
}
if ((flags & LibGambatte.LoadFlags.FORCE_DMG) == LibGambatte.LoadFlags.FORCE_DMG)
@@ -103,7 +103,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (LibGambatte.gambatte_loaddmgbios(GambatteState, Bios) != 0)
{
- throw new InvalidOperationException("gambatte_loaddmgbios() returned non-zero (bios error)");
+ throw new InvalidOperationException($"{nameof(LibGambatte.gambatte_loaddmgbios)}() returned non-zero (bios error)");
}
}
else
@@ -114,7 +114,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (LibGambatte.gambatte_loadgbcbios(GambatteState, Bios) != 0)
{
- throw new InvalidOperationException("gambatte_loadgbcbios() returned non-zero (bios error)");
+ throw new InvalidOperationException($"{nameof(LibGambatte.gambatte_loadgbcbios)}() returned non-zero (bios error)");
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs
index b770f404f9..ae44856892 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs
@@ -96,35 +96,35 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
ser.BeginSection("Pulse" + unit);
- ser.Sync("duty_cnt", ref duty_cnt);
- ser.Sync("env_loop", ref env_loop);
- ser.Sync("env_constant", ref env_constant);
- ser.Sync("env_cnt_value", ref env_cnt_value);
- ser.Sync("len_halt", ref len_halt);
+ ser.Sync(nameof(duty_cnt), ref duty_cnt);
+ ser.Sync(nameof(env_loop), ref env_loop);
+ ser.Sync(nameof(env_constant), ref env_constant);
+ ser.Sync(nameof(env_cnt_value), ref env_cnt_value);
+ ser.Sync(nameof(len_halt), ref len_halt);
- ser.Sync("sweep_en", ref sweep_en);
- ser.Sync("sweep_divider_cnt", ref sweep_divider_cnt);
- ser.Sync("sweep_negate", ref sweep_negate);
- ser.Sync("sweep_shiftcount", ref sweep_shiftcount);
- ser.Sync("sweep_reload", ref sweep_reload);
+ ser.Sync(nameof(sweep_en), ref sweep_en);
+ ser.Sync(nameof(sweep_divider_cnt), ref sweep_divider_cnt);
+ ser.Sync(nameof(sweep_negate), ref sweep_negate);
+ ser.Sync(nameof(sweep_shiftcount), ref sweep_shiftcount);
+ ser.Sync(nameof(sweep_reload), ref sweep_reload);
- ser.Sync("len_cnt", ref len_cnt);
- ser.Sync("timer_raw_reload_value", ref timer_raw_reload_value);
- ser.Sync("timer_reload_value", ref timer_reload_value);
+ ser.Sync(nameof(len_cnt), ref len_cnt);
+ ser.Sync(nameof(timer_raw_reload_value), ref timer_raw_reload_value);
+ ser.Sync(nameof(timer_reload_value), ref timer_reload_value);
- ser.Sync("lenctr_en", ref lenctr_en);
+ ser.Sync(nameof(lenctr_en), ref lenctr_en);
- ser.Sync("swp_divider_counter", ref swp_divider_counter);
- ser.Sync("swp_silence", ref swp_silence);
- ser.Sync("duty_step", ref duty_step);
- ser.Sync("timer_counter", ref timer_counter);
- ser.Sync("sample", ref sample);
- ser.Sync("duty_value", ref duty_value);
+ ser.Sync(nameof(swp_divider_counter), ref swp_divider_counter);
+ ser.Sync(nameof(swp_silence), ref swp_silence);
+ ser.Sync(nameof(duty_step), ref duty_step);
+ ser.Sync(nameof(timer_counter), ref timer_counter);
+ ser.Sync(nameof(sample), ref sample);
+ ser.Sync(nameof(duty_value), ref duty_value);
- ser.Sync("env_start_flag", ref env_start_flag);
- ser.Sync("env_divider", ref env_divider);
- ser.Sync("env_counter", ref env_counter);
- ser.Sync("env_output", ref env_output);
+ ser.Sync(nameof(env_start_flag), ref env_start_flag);
+ ser.Sync(nameof(env_divider), ref env_divider);
+ ser.Sync(nameof(env_counter), ref env_counter);
+ ser.Sync(nameof(env_output), ref env_output);
ser.EndSection();
}
@@ -394,25 +394,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
ser.BeginSection("Noise");
- ser.Sync("env_cnt_value", ref env_cnt_value);
- ser.Sync("env_loop", ref env_loop);
- ser.Sync("env_constant", ref env_constant);
- ser.Sync("mode_cnt", ref mode_cnt);
- ser.Sync("period_cnt", ref period_cnt);
+ ser.Sync(nameof(env_cnt_value), ref env_cnt_value);
+ ser.Sync(nameof(env_loop), ref env_loop);
+ ser.Sync(nameof(env_constant), ref env_constant);
+ ser.Sync(nameof(mode_cnt), ref mode_cnt);
+ ser.Sync(nameof(period_cnt), ref period_cnt);
- ser.Sync("len_halt", ref len_halt);
- ser.Sync("len_cnt", ref len_cnt);
- ser.Sync("lenctr_en", ref lenctr_en);
+ ser.Sync(nameof(len_halt), ref len_halt);
+ ser.Sync(nameof(len_cnt), ref len_cnt);
+ ser.Sync(nameof(lenctr_en), ref lenctr_en);
- ser.Sync("shift_register", ref shift_register);
- ser.Sync("timer_counter", ref timer_counter);
- ser.Sync("sample", ref sample);
+ ser.Sync(nameof(shift_register), ref shift_register);
+ ser.Sync(nameof(timer_counter), ref timer_counter);
+ ser.Sync(nameof(sample), ref sample);
- ser.Sync("env_output", ref env_output);
- ser.Sync("env_start_flag", ref env_start_flag);
- ser.Sync("env_divider", ref env_divider);
- ser.Sync("env_counter", ref env_counter);
- ser.Sync("noise_bit", ref noise_bit);
+ ser.Sync(nameof(env_output), ref env_output);
+ ser.Sync(nameof(env_start_flag), ref env_start_flag);
+ ser.Sync(nameof(env_divider), ref env_divider);
+ ser.Sync(nameof(env_counter), ref env_counter);
+ ser.Sync(nameof(noise_bit), ref noise_bit);
ser.EndSection();
}
@@ -552,18 +552,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
ser.BeginSection("Triangle");
- ser.Sync("linear_counter_reload", ref linear_counter_reload);
- ser.Sync("control_flag", ref control_flag);
- ser.Sync("timer_cnt", ref timer_cnt);
- ser.Sync("reload_flag", ref reload_flag);
- ser.Sync("len_cnt", ref len_cnt);
+ ser.Sync(nameof(linear_counter_reload), ref linear_counter_reload);
+ ser.Sync(nameof(control_flag), ref control_flag);
+ ser.Sync(nameof(timer_cnt), ref timer_cnt);
+ ser.Sync(nameof(reload_flag), ref reload_flag);
+ ser.Sync(nameof(len_cnt), ref len_cnt);
- ser.Sync("lenctr_en", ref lenctr_en);
- ser.Sync("linear_counter", ref linear_counter);
- ser.Sync("timer", ref timer);
- ser.Sync("timer_cnt_reload", ref timer_cnt_reload);
- ser.Sync("seq", ref seq);
- ser.Sync("sample", ref sample);
+ ser.Sync(nameof(lenctr_en), ref lenctr_en);
+ ser.Sync(nameof(linear_counter), ref linear_counter);
+ ser.Sync(nameof(timer), ref timer);
+ ser.Sync(nameof(timer_cnt_reload), ref timer_cnt_reload);
+ ser.Sync(nameof(seq), ref seq);
+ ser.Sync(nameof(sample), ref sample);
ser.EndSection();
}
@@ -729,23 +729,23 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
ser.BeginSection("DMC");
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("loop_flag", ref loop_flag);
- ser.Sync("timer_reload", ref timer_reload);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(loop_flag), ref loop_flag);
+ ser.Sync(nameof(timer_reload), ref timer_reload);
- ser.Sync("timer", ref timer);
- ser.Sync("user_address", ref user_address);
- ser.Sync("user_length", ref user_length);
+ ser.Sync(nameof(timer), ref timer);
+ ser.Sync(nameof(user_address), ref user_address);
+ ser.Sync(nameof(user_length), ref user_length);
- ser.Sync("sample_address", ref sample_address);
- ser.Sync("sample_length", ref sample_length);
- ser.Sync("sample_buffer", ref sample_buffer);
- ser.Sync("sample_buffer_filled", ref sample_buffer_filled);
+ ser.Sync(nameof(sample_address), ref sample_address);
+ ser.Sync(nameof(sample_length), ref sample_length);
+ ser.Sync(nameof(sample_buffer), ref sample_buffer);
+ ser.Sync(nameof(sample_buffer_filled), ref sample_buffer_filled);
- ser.Sync("out_shift", ref out_shift);
- ser.Sync("out_bits_remaining", ref out_bits_remaining);
- ser.Sync("out_deltacounter", ref out_deltacounter);
- ser.Sync("out_silence", ref out_silence);
+ ser.Sync(nameof(out_shift), ref out_shift);
+ ser.Sync(nameof(out_bits_remaining), ref out_bits_remaining);
+ ser.Sync(nameof(out_deltacounter), ref out_deltacounter);
+ ser.Sync(nameof(out_silence), ref out_silence);
ser.Sync("dmc_call_delay", ref delay);
@@ -945,31 +945,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("dmc_irq", ref dmc_irq);
- ser.Sync("pending_reg", ref pending_reg);
- ser.Sync("pending_val", ref pending_val);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(dmc_irq), ref dmc_irq);
+ ser.Sync(nameof(pending_reg), ref pending_reg);
+ ser.Sync(nameof(pending_val), ref pending_val);
- ser.Sync("sequencer_counter", ref sequencer_counter);
- ser.Sync("sequencer_step", ref sequencer_step);
- ser.Sync("sequencer_mode", ref sequencer_mode);
- ser.Sync("sequencer_irq_inhibit;", ref sequencer_irq_inhibit);
- ser.Sync("sequencer_irq", ref sequencer_irq);
- ser.Sync("sequence_reset_pending", ref sequence_reset_pending);
- ser.Sync("sequencer_irq_clear_pending", ref sequencer_irq_clear_pending);
- ser.Sync("sequencer_irq_assert", ref sequencer_irq_assert);
+ ser.Sync(nameof(sequencer_counter), ref sequencer_counter);
+ ser.Sync(nameof(sequencer_step), ref sequencer_step);
+ ser.Sync(nameof(sequencer_mode), ref sequencer_mode);
+ ser.Sync(nameof(sequencer_irq_inhibit), ref sequencer_irq_inhibit);
+ ser.Sync(nameof(sequencer_irq), ref sequencer_irq);
+ ser.Sync(nameof(sequence_reset_pending), ref sequence_reset_pending);
+ ser.Sync(nameof(sequencer_irq_clear_pending), ref sequencer_irq_clear_pending);
+ ser.Sync(nameof(sequencer_irq_assert), ref sequencer_irq_assert);
- ser.Sync("dmc_dma_countdown", ref dmc_dma_countdown);
+ ser.Sync(nameof(dmc_dma_countdown), ref dmc_dma_countdown);
ser.Sync("sample_length_delay", ref pending_length_change);
ser.Sync("dmc_called_from_write", ref call_from_write);
ser.Sync("sequencer_tick_delay", ref seq_tick);
ser.Sync("seq_val_to_apply", ref seq_val);
- ser.Sync("sequencer_irq_flag", ref sequencer_irq_flag);
- ser.Sync("len_clock_active", ref len_clock_active);
+ ser.Sync(nameof(sequencer_irq_flag), ref sequencer_irq_flag);
+ ser.Sync(nameof(len_clock_active), ref len_clock_active);
- ser.Sync("oldmix", ref oldmix);
- ser.Sync("cart_sound", ref cart_sound);
- ser.Sync("old_cart_sound", ref old_cart_sound);
+ ser.Sync(nameof(oldmix), ref oldmix);
+ ser.Sync(nameof(cart_sound), ref cart_sound);
+ ser.Sync(nameof(old_cart_sound), ref old_cart_sound);
pulse[0].SyncState(ser);
pulse[1].SyncState(ser);
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs
index 22aa7188e0..aa796813e2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs
@@ -21,8 +21,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_banks_4k", ref chr_banks_4k);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
+ ser.Sync(nameof(chr_banks_4k), ref chr_banks_4k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
}
public override bool Configure(NES.EDetectionOrigin origin)
@@ -105,9 +105,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
- ser.Sync("isMapper79", ref isMapper79);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
+ ser.Sync(nameof(isMapper79), ref isMapper79);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs
index 28dd117a49..2fbf1b9aa3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs
@@ -87,7 +87,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg",ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs
index 6796424108..d8e990dd50 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs
@@ -56,11 +56,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_reg_16k", ref prg_reg_16k);
- ser.Sync("regs", ref regs);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_latch", ref irq_latch);
+ ser.Sync(nameof(prg_reg_16k), ref prg_reg_16k);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_latch), ref irq_latch);
if (eprom != null)
eprom.SyncState(ser);
if (reader != null)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs
index d6dbc7266a..0763442522 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs
@@ -29,8 +29,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_block", ref chr_block);
- ser.Sync("chr_pos", ref chr_pos);
+ ser.Sync(nameof(chr_block), ref chr_block);
+ ser.Sync(nameof(chr_pos), ref chr_pos);
ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_32k);
ser.Sync("prg_bank_16k", ref prg_bank_32k);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs
index 3a5a722abb..142344184e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs
@@ -43,10 +43,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs
index f1f2ffd275..39fc42c2ab 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs
@@ -16,8 +16,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs
index 1f70954115..1788cf3574 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs
@@ -154,9 +154,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("seicross", ref seicross);
- ser.Sync("chr_enabled", ref chr_enabled);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(seicross), ref seicross);
+ ser.Sync(nameof(chr_enabled), ref chr_enabled);
}
public override byte ReadPRG(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs
index 0542577863..7045c8c0d1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs
@@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr",ref chr);
+ ser.Sync(nameof(chr), ref chr);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs
index 3dd2914b9f..4c93fa4e7c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
public override bool Configure(NES.EDetectionOrigin origin)
@@ -111,9 +111,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("prg_block", ref prg_block);
- ser.Sync("prg_page", ref prg_page);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(prg_block), ref prg_block);
+ ser.Sync(nameof(prg_page), ref prg_page);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs
index 3decb3fb74..4c9a315d3a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs
@@ -51,14 +51,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_regs", ref prg_regs);
- ser.Sync("chr_regs", ref chr_regs);
- ser.Sync("IRQCount", ref IRQCount);
- ser.Sync("IRQa", ref IRQa);
- ser.Sync("bank", ref bank);
- ser.Sync("mode", ref mode);
- ser.Sync("is_2k_bank", ref is_2k_bank);
- ser.Sync("is_not_2k_bank", ref is_not_2k_bank);
+ ser.Sync(nameof(prg_regs), ref prg_regs);
+ ser.Sync(nameof(chr_regs), ref chr_regs);
+ ser.Sync(nameof(IRQCount), ref IRQCount);
+ ser.Sync(nameof(IRQa), ref IRQa);
+ ser.Sync(nameof(bank), ref bank);
+ ser.Sync(nameof(mode), ref mode);
+ ser.Sync(nameof(is_2k_bank), ref is_2k_bank);
+ ser.Sync(nameof(is_not_2k_bank), ref is_not_2k_bank);
}
public void Mirroring()
@@ -242,14 +242,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_regs", ref prg_regs);
- ser.Sync("chr_regs", ref chr_regs);
- ser.Sync("IRQCount", ref IRQCount);
- ser.Sync("IRQa", ref IRQa);
- ser.Sync("bank", ref bank);
- ser.Sync("mode", ref mode);
- ser.Sync("is_2k_bank", ref is_2k_bank);
- ser.Sync("is_not_2k_bank", ref is_not_2k_bank);
+ ser.Sync(nameof(prg_regs), ref prg_regs);
+ ser.Sync(nameof(chr_regs), ref chr_regs);
+ ser.Sync(nameof(IRQCount), ref IRQCount);
+ ser.Sync(nameof(IRQa), ref IRQa);
+ ser.Sync(nameof(bank), ref bank);
+ ser.Sync(nameof(mode), ref mode);
+ ser.Sync(nameof(is_2k_bank), ref is_2k_bank);
+ ser.Sync(nameof(is_not_2k_bank), ref is_not_2k_bank);
}
public void Mirroring()
@@ -433,8 +433,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_regs", ref chr_regs);
- ser.Sync("prg_regs", ref prg_regs);
+ ser.Sync(nameof(chr_regs), ref chr_regs);
+ ser.Sync(nameof(prg_regs), ref prg_regs);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs
index 979abfbdd9..8e33a2420a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs
@@ -121,7 +121,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exp", ref exp, false);
+ ser.Sync(nameof(exp), ref exp, false);
}
public override void NESSoftReset()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/DatachBarcode.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/DatachBarcode.cs
index de789fb36e..59dddf8770 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/DatachBarcode.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/DatachBarcode.cs
@@ -63,11 +63,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.BeginSection("DatachBarcode");
- ser.Sync("cycles", ref cycles);
- ser.Sync("output", ref output);
- ser.Sync("stream_idx", ref stream_idx);
- ser.Sync("data", ref data, false);
+ ser.BeginSection(nameof(DatachBarcode));
+ ser.Sync(nameof(cycles), ref cycles);
+ ser.Sync(nameof(output), ref output);
+ ser.Sync(nameof(stream_idx), ref stream_idx);
+ ser.Sync(nameof(data), ref data, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
index b1a561e271..16800da327 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs
@@ -66,25 +66,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("irq_target", ref irq_target);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("in_frame", ref in_frame);
- ser.Sync("exram_mode", ref exram_mode);
- ser.Sync("chr_mode", ref chr_mode);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("chr_reg_high", ref chr_reg_high);
- ser.Sync("ab_mode", ref ab_mode);
- ser.Sync("regs_a", ref regs_a);
- ser.Sync("regs_b", ref regs_b);
- ser.Sync("regs_prg", ref regs_prg);
- ser.Sync("nt_modes", ref nt_modes);
- ser.Sync("nt_fill_tile", ref nt_fill_tile);
- ser.Sync("nt_fill_attrib", ref nt_fill_attrib);
- ser.Sync("wram_bank", ref wram_bank);
- ser.Sync("last_nt_read", ref last_nt_read);
- ser.Sync("EXRAM", ref EXRAM, false);
+ ser.Sync(nameof(irq_target), ref irq_target);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(in_frame), ref in_frame);
+ ser.Sync(nameof(exram_mode), ref exram_mode);
+ ser.Sync(nameof(chr_mode), ref chr_mode);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(chr_reg_high), ref chr_reg_high);
+ ser.Sync(nameof(ab_mode), ref ab_mode);
+ ser.Sync(nameof(regs_a), ref regs_a);
+ ser.Sync(nameof(regs_b), ref regs_b);
+ ser.Sync(nameof(regs_prg), ref regs_prg);
+ ser.Sync(nameof(nt_modes), ref nt_modes);
+ ser.Sync(nameof(nt_fill_tile), ref nt_fill_tile);
+ ser.Sync(nameof(nt_fill_attrib), ref nt_fill_attrib);
+ ser.Sync(nameof(wram_bank), ref wram_bank);
+ ser.Sync(nameof(last_nt_read), ref last_nt_read);
+ ser.Sync(nameof(EXRAM), ref EXRAM, false);
SyncPRGBanks();
SyncCHRBanks();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs
index 5cf8366e46..4606856e21 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs
@@ -109,12 +109,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_count", ref irq_count);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_count), ref irq_count);
}
public override byte ReadPRG(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs
index 72a36b5308..fdb10c00d0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs
@@ -56,10 +56,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(BizHawk.Common.Serializer ser)
{
base.SyncState(ser);
- ser.Sync("c", ref c);
- ser.Sync("e", ref e);
- ser.Sync("prginner", ref prginner);
- ser.Sync("prgouter", ref prgouter);
+ ser.Sync(nameof(c), ref c);
+ ser.Sync(nameof(e), ref e);
+ ser.Sync(nameof(prginner), ref prginner);
+ ser.Sync(nameof(prgouter), ref prgouter);
}
public override void NESSoftReset()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs
index 699abea7c3..1edc25e1f5 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs
@@ -78,8 +78,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs
index 480f4c160b..b3765682d6 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs
@@ -92,8 +92,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs
index d62a37d17e..79b01d0590 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs
@@ -32,8 +32,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs
index 7b51a69e07..42d535df0d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs
@@ -37,9 +37,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs
index 77a2b56ca5..2c90571c13 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs
@@ -28,10 +28,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
- ser.Sync("prg_mode", ref chr_regs_1k);
- ser.Sync("mirror_mode", ref chr_regs_1k);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
+ ser.Sync(nameof(prg_mode), ref chr_regs_1k);
+ ser.Sync(nameof(mirror_mode), ref chr_regs_1k);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs
index 3775f47222..3bc0c0ca84 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs
@@ -31,13 +31,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
- ser.Sync("irq_counter_enabled", ref irq_counter_enabled);
- ser.Sync("irq_asserted", ref irq_asserted);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("clock_counter", ref clock_counter);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
+ ser.Sync(nameof(irq_counter_enabled), ref irq_counter_enabled);
+ ser.Sync(nameof(irq_asserted), ref irq_asserted);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(clock_counter), ref clock_counter);
SyncIRQ();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs
index d32bce9697..9b9b8db7af 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs
@@ -53,7 +53,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(chr), ref chr);
}
public override void WriteWRAM(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs
index 0fdc6039db..333ac7f667 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs
@@ -74,8 +74,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs
index e3ccbe97ca..74c64a3c57 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs
@@ -66,9 +66,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("latch", ref latch);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("chr_banks_8k", ref chr_banks_8k);
+ ser.Sync(nameof(latch), ref latch);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(chr_banks_8k), ref chr_banks_8k);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs
index 143525ba20..52191278ea 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs
@@ -63,9 +63,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("latch", ref latch);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("chr_banks_8k", ref chr_banks_8k);
+ ser.Sync(nameof(latch), ref latch);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(chr_banks_8k), ref chr_banks_8k);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs
index 4e824669c5..30c09d7496 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs
@@ -51,13 +51,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_1k", ref chr_banks_1k);
- ser.Sync("ppuclock", ref ppuclock);
- ser.Sync("irqclock", ref irqclock);
- ser.Sync("irqreload", ref irqreload);
- ser.Sync("irqcountwidth", ref irqcountwidth);
- ser.Sync("irqcountpaused", ref irqcountpaused);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_1k), ref chr_banks_1k);
+ ser.Sync(nameof(ppuclock), ref ppuclock);
+ ser.Sync(nameof(irqclock), ref irqclock);
+ ser.Sync(nameof(irqreload), ref irqreload);
+ ser.Sync(nameof(irqcountwidth), ref irqcountwidth);
+ ser.Sync(nameof(irqcountpaused), ref irqcountpaused);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs
index 4ebee4b4db..aaf436a29a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs
@@ -68,8 +68,8 @@ Other chips used: Sunsoft-1
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs
index 09583ef19c..9dc3bf9ac9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs
@@ -122,11 +122,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
ser.Sync("chip", ref chip_offset);
- ser.Sync("eRAM", ref eRAM);
+ ser.Sync(nameof(eRAM), ref eRAM);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs
index d772ce9b9d..408d47daa8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs
@@ -47,12 +47,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("mode", ref mode);
- ser.Sync("block_high", ref block_high);
- ser.Sync("block_low", ref block_low);
- ser.Sync("prg_bank", ref prg_bank);
+ ser.Sync(nameof(mode), ref mode);
+ ser.Sync(nameof(block_high), ref block_high);
+ ser.Sync(nameof(block_low), ref block_low);
+ ser.Sync(nameof(prg_bank), ref prg_bank);
ser.Sync("chr_bank", ref chr_bank_high);
- ser.Sync("reg_0_locked", ref reg_0_locked);
+ ser.Sync(nameof(reg_0_locked), ref reg_0_locked);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs
index a2414fa58d..23eb8af17a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs
@@ -41,11 +41,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("wram_enabled", ref wram_enabled);
- ser.Sync("wram_h_enabled", ref wram_h_enabled);
- ser.Sync("wram_l_enabled", ref wram_l_enabled);
- ser.Sync("wram_h_enabled_write", ref wram_h_enabled_write);
- ser.Sync("wram_l_enabled_write", ref wram_l_enabled_write);
+ ser.Sync(nameof(wram_enabled), ref wram_enabled);
+ ser.Sync(nameof(wram_h_enabled), ref wram_h_enabled);
+ ser.Sync(nameof(wram_l_enabled), ref wram_l_enabled);
+ ser.Sync(nameof(wram_h_enabled_write), ref wram_h_enabled_write);
+ ser.Sync(nameof(wram_l_enabled_write), ref wram_l_enabled_write);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs
index 999d23605b..cddb957e3d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs
@@ -147,21 +147,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public virtual void SyncState(Serializer ser)
{
- ser.Sync("reg_addr", ref reg_addr);
- ser.Sync("chr_mode", ref chr_mode);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("regs", ref regs);
- ser.Sync("mirror", ref mirror);
- ser.Sync("a12_old", ref a12_old);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("separator_counter", ref separator_counter);
- ser.Sync("irq_countdown", ref irq_countdown);
- ser.Sync("irq_reload_flag", ref irq_reload_flag);
- ser.Sync("wram_enable", ref wram_enable);
- ser.Sync("wram_write_protect", ref wram_write_protect);
+ ser.Sync(nameof(reg_addr), ref reg_addr);
+ ser.Sync(nameof(chr_mode), ref chr_mode);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(mirror), ref mirror);
+ ser.Sync(nameof(a12_old), ref a12_old);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(separator_counter), ref separator_counter);
+ ser.Sync(nameof(irq_countdown), ref irq_countdown);
+ ser.Sync(nameof(irq_reload_flag), ref irq_reload_flag);
+ ser.Sync(nameof(wram_enable), ref wram_enable);
+ ser.Sync(nameof(wram_write_protect), ref wram_write_protect);
Sync();
}
@@ -346,7 +346,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
mmc3.SyncState(ser);
- ser.Sync("extra_vrom", ref extra_vrom);
+ ser.Sync(nameof(extra_vrom), ref extra_vrom);
}
protected virtual int Get_CHRBank_1K(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs
index 7ad1eacfed..24214c6344 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs
@@ -24,8 +24,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("block0", ref block0);
- ser.Sync("block1", ref block1);
+ ser.Sync(nameof(block0), ref block0);
+ ser.Sync(nameof(block1), ref block1);
}
int block0, block1;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs
index 19b96dbac9..1e082ecef3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs
@@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("exreg", ref exreg);
+ ser.Sync(nameof(exreg), ref exreg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs
index 46747c18ee..dda7224722 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs
@@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("block_select", ref block_select);
+ ser.Sync(nameof(block_select), ref block_select);
}
int block_select;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs
index 26563599a8..59afd1d5d4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs
@@ -27,9 +27,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("block", ref block);
- ser.Sync("prg", ref prg);
- ser.Sync("mode", ref mode);
+ ser.Sync(nameof(block), ref block);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(mode), ref mode);
}
int block, prg;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs
index 1715b9e211..e8aab5b12e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs
@@ -29,11 +29,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("lock_regs", ref lock_regs);
- ser.Sync("prg_block_size", ref prg_block_size);
- ser.Sync("chr_block_size", ref chr_block_size);
- ser.Sync("prg_or", ref prg_or);
- ser.Sync("chr_or", ref chr_or);
+ ser.Sync(nameof(lock_regs), ref lock_regs);
+ ser.Sync(nameof(prg_block_size), ref prg_block_size);
+ ser.Sync(nameof(chr_block_size), ref chr_block_size);
+ ser.Sync(nameof(prg_or), ref prg_or);
+ ser.Sync(nameof(chr_or), ref chr_or);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs
index c78e0d813c..fd46dacfe8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs
@@ -28,9 +28,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_mode_mapper", ref prg_mode_mapper);
- ser.Sync("prg_page", ref prg_page);
- ser.Sync("chr_block_or", ref chr_block_or);
+ ser.Sync(nameof(prg_mode_mapper), ref prg_mode_mapper);
+ ser.Sync(nameof(prg_page), ref prg_page);
+ ser.Sync(nameof(chr_block_or), ref chr_block_or);
}
bool prg_mode_mapper;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs
index 2f589102ec..802869ce8b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs
@@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
+ ser.Sync(nameof(exRegs), ref exRegs);
}
public override byte ReadEXP(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs
index e898949ce3..f2e5a13f8d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
}
public override void WriteWRAM(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs
index 0c284c6f2d..ee95bb2214 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs
@@ -32,8 +32,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("latch0", ref latch0);
- ser.Sync("latch1", ref latch1);
+ ser.Sync(nameof(latch0), ref latch0);
+ ser.Sync(nameof(latch1), ref latch1);
}
// same as ReadPPU, but doesn't process latches
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs
index f176f97dbf..92ef82768a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs
@@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs
index 1a1599ac83..4fdd8ce17c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs
@@ -39,9 +39,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.BeginSection("Mapper196");
- ser.Sync("prgmode", ref prgmode);
- ser.Sync("prgreg", ref prgreg);
+ ser.BeginSection(nameof(Mapper196));
+ ser.Sync(nameof(prgmode), ref prgmode);
+ ser.Sync(nameof(prgreg), ref prgreg);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs
index 1adfda1ca9..dfa7405530 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs
@@ -59,7 +59,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_regs_1k_512", ref chr_regs_1k_512);
+ ser.Sync(nameof(chr_regs_1k_512), ref chr_regs_1k_512);
}
public override void Dispose()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs
index ab619862db..56aaf80215 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs
@@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
+ ser.Sync(nameof(exRegs), ref exRegs);
}
public override byte ReadPPU(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs
index 3496146d08..fe37155ab2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs
@@ -84,11 +84,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
- ser.Sync("is_mk3", ref is_mk3);
- ser.Sync("ptg_regs_8k", ref prg_regs_8k);
- ser.Sync("prg_mask", ref prg_mask_8k);
- ser.Sync("chr_mask", ref chr_mask_1k);
+ ser.Sync(nameof(exRegs), ref exRegs);
+ ser.Sync(nameof(is_mk3), ref is_mk3);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(prg_mask), ref prg_mask_8k);
+ ser.Sync(nameof(chr_mask), ref chr_mask_1k);
}
public void sync_prg(int i)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs
index ed2a41300f..5510b72bf1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs
@@ -50,10 +50,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
- ser.Sync("ptg_regs_8k", ref prg_regs_8k);
- ser.Sync("prg_mask", ref prg_mask_8k);
- ser.Sync("chr_mask", ref chr_mask_1k);
+ ser.Sync(nameof(exRegs), ref exRegs);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(prg_mask), ref prg_mask_8k);
+ ser.Sync(nameof(chr_mask), ref chr_mask_1k);
}
public void sync_prg()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs
index 13d30b938d..306dc183f3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs
@@ -147,11 +147,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("exregs", ref exregs, false);
- ser.Sync("prgregs", ref prgregs, false);
- ser.Sync("chrregs", ref chrregs, false);
- ser.Sync("bits_rev", ref bits_rev);
- ser.Sync("reg_value", ref reg_value);
+ ser.Sync(nameof(exregs), ref exregs, false);
+ ser.Sync(nameof(prgregs), ref prgregs, false);
+ ser.Sync(nameof(chrregs), ref chrregs, false);
+ ser.Sync(nameof(bits_rev), ref bits_rev);
+ ser.Sync(nameof(reg_value), ref reg_value);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs
index d529fc0ced..b51c128d6b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs
@@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
}
public override byte ReadEXP(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs
index 5f4de42af4..c139cb7770 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs
@@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("chr_mode", ref chr_mode);
+ ser.Sync(nameof(chr_mode), ref chr_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs
index eff310aab1..e54d85a944 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs
@@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("piratecrap", ref piratecrap);
+ ser.Sync(nameof(piratecrap), ref piratecrap);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs
index d2baf71db5..ce270c2098 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs
@@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(regs), ref regs);
}
public override byte ReadWRAM(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs
index 5dd2335ead..49c7326aae 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs
@@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("block", ref block);
+ ser.Sync(nameof(block), ref block);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs
index e8642c2aec..03f47bafea 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs
@@ -50,10 +50,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
- ser.Sync("ptg_regs_8k", ref prg_regs_8k);
- ser.Sync("prg_mask", ref prg_mask_8k);
- ser.Sync("chr_mask", ref chr_mask_1k);
+ ser.Sync(nameof(exRegs), ref exRegs);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(prg_mask), ref prg_mask_8k);
+ ser.Sync(nameof(chr_mask), ref chr_mask_1k);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs
index 6566ed5664..e40334ff5b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs
@@ -36,10 +36,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(BizHawk.Common.Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exmode", ref exmode);
- ser.Sync("exprg", ref exprg, false);
- ser.Sync("exchr", ref exchr, false);
- ser.Sync("exnmt", ref exnmt);
+ ser.Sync(nameof(exmode), ref exmode);
+ ser.Sync(nameof(exprg), ref exprg, false);
+ ser.Sync(nameof(exchr), ref exchr, false);
+ ser.Sync(nameof(exnmt), ref exnmt);
}
public override byte ReadPRG(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs
index 0fe238bfeb..6a665045ec 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs
@@ -123,7 +123,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("nametables", ref nametables, false);
+ ser.Sync(nameof(nametables), ref nametables, false);
}
}
}
\ No newline at end of file
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs
index e15ac229bf..62aeae6a9b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs
@@ -101,7 +101,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs
index a7f2e43cc3..9fe341ec84 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs
@@ -186,11 +186,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg", ref reg);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
- ser.Sync("mode", ref mode);
- ser.Sync("outer", ref outer);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(mode), ref mode);
+ ser.Sync(nameof(outer), ref outer);
if (!ser.IsWriter)
Sync();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs
index 69649784f3..a5296db020 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs
@@ -55,13 +55,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
- ser.Sync("flash_state", ref flash_state);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(flash_state), ref flash_state);
int tmp = (int)flash_mode;
- ser.Sync("flash_mode", ref tmp);
+ ser.Sync(nameof(flash_mode), ref tmp);
flash_mode = (flashmode)tmp;
- ser.Sync("flash_rom", ref flash_rom, true);
+ ser.Sync(nameof(flash_rom), ref flash_rom, true);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs
index 472f229a4d..05173bf5a2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs
@@ -86,8 +86,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs
index 8c55044f87..7f2a2e7b2c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs
@@ -94,11 +94,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
- ser.Sync("R", ref R);
- ser.Sync("M", ref M);
- ser.Sync("P", ref P);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(R), ref R);
+ ser.Sync(nameof(M), ref M);
+ ser.Sync(nameof(P), ref P);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs
index acb94fa21f..53ce1bb7d4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs
@@ -66,8 +66,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs
index 38f252b00c..847395cc4b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs
@@ -72,9 +72,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("irqcnt", ref irqcnt);
- ser.Sync("irqactive", ref irqactive);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(irqcnt), ref irqcnt);
+ ser.Sync(nameof(irqactive), ref irqactive);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs
index 3fa15a8c9b..28dade5c45 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs
@@ -62,9 +62,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
- ser.Sync("regenable", ref regenable);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(regenable), ref regenable);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs
index dd950ebc1a..3ae0c2b2e6 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs
@@ -93,10 +93,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
- ser.Sync("irqenable", ref irqenable);
- ser.Sync("irqcnt", ref irqcnt);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(irqenable), ref irqenable);
+ ser.Sync(nameof(irqcnt), ref irqcnt);
}
public override byte ReadPPU(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs
index 49e87f21da..eae264daff 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs
@@ -129,10 +129,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("irqenable", ref irqenable);
- ser.Sync("irqcnt", ref irqcnt);
- ser.Sync("swap", ref swap);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(irqenable), ref irqenable);
+ ser.Sync(nameof(irqcnt), ref irqcnt);
+ ser.Sync(nameof(swap), ref swap);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs
index 2a56268faa..78d737bbd3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs
@@ -38,8 +38,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("regs", ref regs);
- ser.Sync("lock_regs", ref lock_regs);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(lock_regs), ref lock_regs);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs
index 4401ef27b7..14bfd3b6d8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs
@@ -77,10 +77,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_32k_H", ref prg_bank_32k_H);
- ser.Sync("prg_bank_32k_L", ref prg_bank_32k_L);
- ser.Sync("chr_bank_8k_H", ref chr_bank_8k_H);
- ser.Sync("chr_bank_8k_L", ref chr_bank_8k_L);
+ ser.Sync(nameof(prg_bank_32k_H), ref prg_bank_32k_H);
+ ser.Sync(nameof(prg_bank_32k_L), ref prg_bank_32k_L);
+ ser.Sync(nameof(chr_bank_8k_H), ref chr_bank_8k_H);
+ ser.Sync(nameof(chr_bank_8k_L), ref chr_bank_8k_L);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs
index 32416906da..02ef8eb9b6 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs
@@ -33,11 +33,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
- ser.Sync("chr_reg_low_0", ref chr_reg);
- ser.Sync("chr_reg_low_1", ref chr_reg);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
+ ser.Sync(nameof(chr_reg_low_0), ref chr_reg);
+ ser.Sync(nameof(chr_reg_low_1), ref chr_reg);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs
index f9193d10f5..6167a25e02 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs
@@ -61,9 +61,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs
index c808732674..cd0a062a47 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs
@@ -75,11 +75,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg0", ref prg0);
- ser.Sync("prg1", ref prg1);
- ser.Sync("prg2", ref prg2);
- ser.Sync("prg3", ref prg3);
- ser.Sync("open_bus", ref open_bus);
+ ser.Sync(nameof(prg0), ref prg0);
+ ser.Sync(nameof(prg1), ref prg1);
+ ser.Sync(nameof(prg2), ref prg2);
+ ser.Sync(nameof(prg3), ref prg3);
+ ser.Sync(nameof(open_bus), ref open_bus);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs
index 35034f8aa1..44fa9ea502 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs
@@ -73,17 +73,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("addr_reg", ref addr_reg);
- ser.Sync("regs", ref regs);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("wram_bank", ref wram_bank);
- ser.Sync("wram_ram_selected", ref wram_ram_selected);
- ser.Sync("wram_ram_enabled", ref wram_ram_enabled);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_countdown", ref irq_countdown);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_asserted", ref irq_asserted);
- ser.Sync("clock_counter", ref clock_counter);
+ ser.Sync(nameof(addr_reg), ref addr_reg);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(wram_bank), ref wram_bank);
+ ser.Sync(nameof(wram_ram_selected), ref wram_ram_selected);
+ ser.Sync(nameof(wram_ram_enabled), ref wram_ram_enabled);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_countdown), ref irq_countdown);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_asserted), ref irq_asserted);
+ ser.Sync(nameof(clock_counter), ref clock_counter);
SyncIrq();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs
index 776279dfe2..79af148e52 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs
@@ -43,11 +43,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("holydiver", ref holydiver);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(holydiver), ref holydiver);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs
index 296cf53d6d..1b0246b699 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs
@@ -132,54 +132,54 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
- ser.Sync("prg_regs", ref prg_regs);
- ser.Sync("chr_regs", ref chr_regs);
- ser.Sync("chr_latches", ref chr_latches);
- ser.Sync("nt_regs", ref nt_regs);
+ ser.Sync(nameof(prg_regs), ref prg_regs);
+ ser.Sync(nameof(chr_regs), ref chr_regs);
+ ser.Sync(nameof(chr_latches), ref chr_latches);
+ ser.Sync(nameof(nt_regs), ref nt_regs);
- ser.Sync("prg_banks", ref prg_banks);
- ser.Sync("chr_banks", ref chr_banks);
- ser.Sync("ram_bytes", ref ram_bytes);
+ ser.Sync(nameof(prg_banks), ref prg_banks);
+ ser.Sync(nameof(chr_banks), ref chr_banks);
+ ser.Sync(nameof(ram_bytes), ref ram_bytes);
- ser.Sync("dipswitch_0", ref dipswitch_0);
- ser.Sync("dipswitch_1", ref dipswitch_1);
+ ser.Sync(nameof(dipswitch_0), ref dipswitch_0);
+ ser.Sync(nameof(dipswitch_1), ref dipswitch_1);
- ser.Sync("prg_bank_mask_8k", ref prg_bank_mask_8k);
- ser.Sync("chr_bank_mask_1k", ref chr_bank_mask_1k);
+ ser.Sync(nameof(prg_bank_mask_8k), ref prg_bank_mask_8k);
+ ser.Sync(nameof(chr_bank_mask_1k), ref chr_bank_mask_1k);
- ser.Sync("prg_mode_select", ref prg_mode_select);
- ser.Sync("chr_mode_select", ref chr_mode_select);
- ser.Sync("sram_prg", ref sram_prg);
- ser.Sync("ram_bank", ref ram_bank);
+ ser.Sync(nameof(prg_mode_select), ref prg_mode_select);
+ ser.Sync(nameof(chr_mode_select), ref chr_mode_select);
+ ser.Sync(nameof(sram_prg), ref sram_prg);
+ ser.Sync(nameof(ram_bank), ref ram_bank);
- ser.Sync("mapper_035", ref mapper_035);
- ser.Sync("mapper_090", ref mapper_090);
- ser.Sync("mapper_209", ref mapper_209);
- ser.Sync("mapper_211", ref mapper_211);
+ ser.Sync(nameof(mapper_035), ref mapper_035);
+ ser.Sync(nameof(mapper_090), ref mapper_090);
+ ser.Sync(nameof(mapper_209), ref mapper_209);
+ ser.Sync(nameof(mapper_211), ref mapper_211);
- ser.Sync("nt_advanced_control", ref nt_advanced_control);
- ser.Sync("nt_ram_disable", ref nt_ram_disable);
- ser.Sync("nt_ram_select", ref nt_ram_select);
+ ser.Sync(nameof(nt_advanced_control), ref nt_advanced_control);
+ ser.Sync(nameof(nt_ram_disable), ref nt_ram_disable);
+ ser.Sync(nameof(nt_ram_select), ref nt_ram_select);
- ser.Sync("mirror_chr", ref mirror_chr);
- ser.Sync("chr_block_mode", ref chr_block_mode);
- ser.Sync("chr_block", ref chr_block);
- ser.Sync("prg_block", ref prg_block);
+ ser.Sync(nameof(mirror_chr), ref mirror_chr);
+ ser.Sync(nameof(chr_block_mode), ref chr_block_mode);
+ ser.Sync(nameof(chr_block), ref chr_block);
+ ser.Sync(nameof(prg_block), ref prg_block);
- ser.Sync("multiplicator", ref multiplicator);
- ser.Sync("multiplicand", ref multiplicand);
- ser.Sync("multiplication_result", ref multiplication_result);
+ ser.Sync(nameof(multiplicator), ref multiplicator);
+ ser.Sync(nameof(multiplicand), ref multiplicand);
+ ser.Sync(nameof(multiplication_result), ref multiplication_result);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_count_down", ref irq_count_down);
- ser.Sync("irq_count_up", ref irq_count_up);
- ser.Sync("irq_prescaler_size", ref irq_prescaler_size);
- ser.Sync("irq_source", ref irq_source);
- ser.Sync("prescaler", ref prescaler);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("xor_reg", ref xor_reg);
- ser.Sync("a12_old", ref a12_old);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_count_down), ref irq_count_down);
+ ser.Sync(nameof(irq_count_up), ref irq_count_up);
+ ser.Sync(nameof(irq_prescaler_size), ref irq_prescaler_size);
+ ser.Sync(nameof(irq_source), ref irq_source);
+ ser.Sync(nameof(prescaler), ref prescaler);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(xor_reg), ref xor_reg);
+ ser.Sync(nameof(a12_old), ref a12_old);
Sync();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs
index 70cb903b1c..d877201589 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs
@@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs
index efad39f3e4..8d7c19f4ba 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs
@@ -73,8 +73,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("romenable", ref romenable);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(romenable), ref romenable);
+ ser.Sync(nameof(prg), ref prg);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs
index 5dee9d4a37..90e44ae3d7 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs
@@ -42,9 +42,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("regs", ref regs);
- ser.Sync("IRQa", ref IRQa);
- ser.Sync("IRQCount", ref IRQCount);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(IRQa), ref IRQa);
+ ser.Sync(nameof(IRQCount), ref IRQCount);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs
index 9dbfc85673..acc558c3ac 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs
@@ -13,8 +13,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs
index 74c745c285..8a6841a2b1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs
@@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs
index 1c907bdd87..3256092829 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs
index 50d5f1b4f4..c3e44c9ad3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs
@@ -28,7 +28,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs
index 05e81b9d21..1062eec3e2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs
@@ -117,11 +117,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
- ser.Sync("is172", ref is172);
- ser.Sync("is173", ref is173);
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(is172), ref is172);
+ ser.Sync(nameof(is173), ref is173);
+ ser.Sync(nameof(reg), ref reg);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs
index 99b153d352..873a70e052 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs
@@ -36,8 +36,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("latch", ref latch);
- ser.Sync("cmd", ref cmd);
+ ser.Sync(nameof(latch), ref latch);
+ ser.Sync(nameof(cmd), ref cmd);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs
index 696cba92e6..a49935f9e0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs
@@ -110,7 +110,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
// do not need to serialize mirroring, as that's handled for us
for (int i = 0; i < chr.Length; i++)
ser.Sync("chr" + i, ref chr[i]);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs
index 71fbb2ee36..99ec6833db 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs
@@ -87,9 +87,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
- ser.Sync("irqclock", ref irqclock);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(irqclock), ref irqclock);
}
public override void ClockCPU()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs
index 37f90c2a0f..11fd6ee818 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs
@@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs
index 5a2c0b2658..9755c01bd9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs
@@ -31,15 +31,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("delay", ref delay);
+ ser.Sync(nameof(delay), ref delay);
- ser.Sync("reg", ref reg);
- ser.Sync("mirr", ref mirr);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(mirr), ref mirr);
- ser.Sync("chrReg", ref chrReg);
- ser.Sync("prgReg8", ref prgReg8);
- ser.Sync("prgRegC", ref prgRegC);
- ser.Sync("prgRegE", ref prgRegE);
+ ser.Sync(nameof(chrReg), ref chrReg);
+ ser.Sync(nameof(prgReg8), ref prgReg8);
+ ser.Sync(nameof(prgRegC), ref prgRegC);
+ ser.Sync(nameof(prgRegE), ref prgRegE);
base.SyncState(ser);
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs
index 7427ae7c47..1b2c828aa4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs
@@ -124,10 +124,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("mirror", ref mirror);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_8k", ref chr_banks_8k);
- ser.Sync("sbw", ref sbw);
+ ser.Sync(nameof(mirror), ref mirror);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_8k), ref chr_banks_8k);
+ ser.Sync(nameof(sbw), ref sbw);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs
index 5c31161cd3..13ab928420 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs
@@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs
index c3f1610282..dc00dc4de9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs
@@ -67,8 +67,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_32k", ref prg_banks_32k);
- ser.Sync("reg4802", ref reg4802);
+ ser.Sync(nameof(prg_banks_32k), ref prg_banks_32k);
+ ser.Sync(nameof(reg4802), ref reg4802);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs
index 099fa34624..1f6677ad84 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs
@@ -37,9 +37,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs
index acdbb7b7df..cf5551146a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs
@@ -44,8 +44,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
}
private void SetMirroring(int mirr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs
index 51aa6e1286..4f3df52dae 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs
@@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
ser.Sync("SRAM", ref _SRAM);
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(regs), ref regs);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs
index dfa03fb586..dd37801bd2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs
@@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs
index fef5c4916b..5e17d8b56c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs
@@ -13,8 +13,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg, false);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg, false);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs
index fe3284e036..e0f4e0de88 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs
@@ -92,8 +92,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_2k", ref chr_banks_2k);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_2k), ref chr_banks_2k);
}
public override void WriteWRAM(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs
index 8ad3e871ba..063cac6307 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs
@@ -66,8 +66,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg_16k", ref prg_reg_16k);
- ser.Sync("chr_reg_8k", ref chr_reg_8k);
+ ser.Sync(nameof(prg_reg_16k), ref prg_reg_16k);
+ ser.Sync(nameof(chr_reg_8k), ref chr_reg_8k);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs
index 2ad9dd0ebc..f5594f9bcb 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs
@@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs
index 857e3d91ea..cb7f07e21a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs
@@ -64,8 +64,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg_16k", ref prg_reg_16k);
- ser.Sync("chr_reg_8k", ref chr_reg_8k);
+ ser.Sync(nameof(prg_reg_16k), ref prg_reg_16k);
+ ser.Sync(nameof(chr_reg_8k), ref chr_reg_8k);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs
index 93d286a2be..ea1e0cc422 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs
@@ -36,7 +36,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("_reg", ref _reg);
+ ser.Sync(nameof(_reg), ref _reg);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs
index 4315b308f1..2b1ef978fa 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs
@@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("_reg", ref _reg);
+ ser.Sync(nameof(_reg), ref _reg);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs
index bc8f4c5682..67bae19969 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs
@@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs
index 0474c55126..0ed3601e59 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(regs), ref regs);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs
index 52607fcd15..8747abf6f4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs
@@ -120,10 +120,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg", ref prg, false);
- ser.Sync("chr", ref chr, false);
- ser.Sync("irq_time", ref irq_time);
- ser.Sync("irq_counting", ref irq_counting);
+ ser.Sync(nameof(prg), ref prg, false);
+ ser.Sync(nameof(chr), ref chr, false);
+ ser.Sync(nameof(irq_time), ref irq_time);
+ ser.Sync(nameof(irq_counting), ref irq_counting);
base.SyncState(ser);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs
index 09c5cc47e5..23b768a9dc 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs
@@ -33,10 +33,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("eRAM", ref eRAM);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(eRAM), ref eRAM);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs
index 95d55040d2..5b26257276 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs
@@ -48,10 +48,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_page", ref prg_page);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("resetFlag", ref resetFlag);
- ser.Sync("resetSwitchMode", ref resetSwitchMode);
+ ser.Sync(nameof(prg_page), ref prg_page);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(resetFlag), ref resetFlag);
+ ser.Sync(nameof(resetSwitchMode), ref resetSwitchMode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs
index 464944047e..baaa6995b8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs
@@ -120,7 +120,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs
index 5356d1d130..a271b134fa 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs
@@ -91,9 +91,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("contra_mode", ref contra_mode);
- ser.Sync("prg_page", ref prg_page);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(contra_mode), ref contra_mode);
+ ser.Sync(nameof(prg_page), ref prg_page);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs
index fa5d8b6173..3233fe7de9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs
@@ -57,7 +57,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs
index 678f7141c2..367526136d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs
@@ -82,8 +82,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_page", ref prg_page);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_page), ref prg_page);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs
index f08add262c..6bbb192846 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs
@@ -41,11 +41,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("isLargeBanks", ref isLargeBanks);
- ser.Sync("large_bank", ref large_bank);
- ser.Sync("prg_bank", ref prg_bank);
- ser.Sync("chr_bank", ref chr_bank);
- ser.Sync("bank_mode", ref bank_mode);
+ ser.Sync(nameof(isLargeBanks), ref isLargeBanks);
+ ser.Sync(nameof(large_bank), ref large_bank);
+ ser.Sync(nameof(prg_bank), ref prg_bank);
+ ser.Sync(nameof(chr_bank), ref chr_bank);
+ ser.Sync(nameof(bank_mode), ref bank_mode);
ser.Sync("Cart_Switch", ref CartSwitch_70in1);
ser.Sync("Cart_Switch", ref CartSwitch_800in1);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs
index d0218f87f9..ea32eb0e0e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs
@@ -38,8 +38,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_32k", ref prg_bank_32k);
- ser.Sync("chr_bank_8k", ref chr_bank_8k);
+ ser.Sync(nameof(prg_bank_32k), ref prg_bank_32k);
+ ser.Sync(nameof(chr_bank_8k), ref chr_bank_8k);
}
public override byte ReadPPU(int addr)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs
index 7499234655..6296d6ac39 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs
@@ -58,7 +58,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_32k", ref prg_banks_32k);
+ ser.Sync(nameof(prg_banks_32k), ref prg_banks_32k);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs
index 8a45658cda..38989c8956 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs
@@ -55,7 +55,7 @@ mirroring - both
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs
index 3c92f064c0..647575faf3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs
@@ -36,8 +36,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg_addr", ref reg_addr);
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(reg_addr), ref reg_addr);
+ ser.Sync(nameof(regs), ref regs);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs
index 365c7f9ee6..da6e5b5724 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs
@@ -98,8 +98,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_2k", ref chr_banks_2k);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_2k), ref chr_banks_2k);
}
public override void WriteWRAM(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
index 52af4d130e..88de5db5fc 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs
@@ -44,8 +44,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("preg", ref preg);
- ser.Sync("creg", ref creg);
+ ser.Sync(nameof(preg), ref preg);
+ ser.Sync(nameof(creg), ref creg);
}
public override void ClockCPU()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs
index 89bb8d6dc0..79426e2bf4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs
@@ -43,8 +43,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
ser.Sync("preg", ref prg);
- ser.Sync("chrlo", ref chrlo);
- ser.Sync("chrhi", ref chrhi);
+ ser.Sync(nameof(chrlo), ref chrlo);
+ ser.Sync(nameof(chrhi), ref chrhi);
}
public override void ClockCPU()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs
index 18cd9bfaad..11794ba28b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs
@@ -31,11 +31,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("ppu_cyclecount", ref ppu_cyclecount);
- ser.Sync("prg_bank", ref prg_bank);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_ready", ref irq_ready);
+ ser.Sync(nameof(ppu_cyclecount), ref ppu_cyclecount);
+ ser.Sync(nameof(prg_bank), ref prg_bank);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_ready), ref irq_ready);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs
index d9ff278ff9..aac8e1b7a4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs
@@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("_reg", ref _reg);
+ ser.Sync(nameof(_reg), ref _reg);
}
public override void WritePRG(int addr, byte value)
@@ -107,7 +107,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("resetSwitch", ref resetSwitch);
+ ser.Sync(nameof(resetSwitch), ref resetSwitch);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs
index 6f69ce26a2..2fd0a4841c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs
@@ -61,8 +61,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_page", ref prg_page);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_page), ref prg_page);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs
index 2c463c41d5..fe6e7ede65 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs
@@ -66,9 +66,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
- ser.Sync("prg_mode", ref prg_mode);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs
index fb17de069a..c222b0e32b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs
@@ -201,17 +201,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
base.SyncState(ser);
scnt.SyncState(ser);
- ser.Sync("c000_swappable", ref c000_swappable);
+ ser.Sync(nameof(c000_swappable), ref c000_swappable);
ser.Sync("prg_16k_mode", ref prg_32k_mode);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_count", ref irq_count);
- ser.Sync("prg_a", ref prg_a);
- ser.Sync("prg_b", ref prg_b);
- ser.Sync("init_sequence", ref init_sequence);
- ser.Sync("chip_select", ref chip_select);
- ser.Sync("wram_disable", ref wram_disable);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_count), ref irq_count);
+ ser.Sync(nameof(prg_a), ref prg_a);
+ ser.Sync(nameof(prg_b), ref prg_b);
+ ser.Sync(nameof(init_sequence), ref init_sequence);
+ ser.Sync(nameof(chip_select), ref chip_select);
+ ser.Sync(nameof(wram_disable), ref wram_disable);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
if (ser.IsReader) Sync();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs
index a3bf9dc415..bbc752cd2a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs
@@ -84,11 +84,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_4k", ref prg_banks_4k);
- ser.Sync("Patch_Vectors", ref Patch_Vectors);
- ser.Sync("CurrentSong", ref CurrentSong);
- ser.Sync("InitPending", ref InitPending);
- ser.Sync("ButtonState", ref ButtonState);
+ ser.Sync(nameof(prg_banks_4k), ref prg_banks_4k);
+ ser.Sync(nameof(Patch_Vectors), ref Patch_Vectors);
+ ser.Sync(nameof(CurrentSong), ref CurrentSong);
+ ser.Sync(nameof(InitPending), ref InitPending);
+ ser.Sync(nameof(ButtonState), ref ButtonState);
}
public void InitNSF(NSFFormat nsf)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs
index e6d2ddac41..d9be399703 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs
@@ -45,18 +45,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_1k", ref chr_banks_1k);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_1k), ref chr_banks_1k);
for (int i = 0; i < vram_enable.Length; i++)
ser.Sync("vram_enable_" + i, ref vram_enable[i]);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
SyncIRQ();
- ser.Sync("audio_cycles", ref audio_cycles);
+ ser.Sync(nameof(audio_cycles), ref audio_cycles);
audio.SyncState(ser);
- ser.Sync("audio_disable", ref audio_disable);
- ser.Sync("prgram_write", ref prgram_write);
+ ser.Sync(nameof(audio_disable), ref audio_disable);
+ ser.Sync(nameof(prgram_write), ref prgram_write);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs
index be3f8ce59d..45f192721b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs
@@ -78,9 +78,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg, false);
- ser.Sync("chr", ref chr, false);
- ser.Sync("wramenable", ref wramenable);
+ ser.Sync(nameof(prg), ref prg, false);
+ ser.Sync(nameof(chr), ref chr, false);
+ ser.Sync(nameof(wramenable), ref wramenable);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs
index 7908eef567..89a3f3b548 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs
@@ -78,9 +78,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg, false);
- ser.Sync("chr", ref chr, false);
- ser.Sync("port", ref port);
+ ser.Sync(nameof(prg), ref prg, false);
+ ser.Sync(nameof(chr), ref chr, false);
+ ser.Sync(nameof(port), ref port);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs
index 913ed0e80a..2e99aa0b5e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs
@@ -47,9 +47,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg_addr", ref reg_addr);
- ser.Sync("regs", ref regs);
- ser.Sync("chr_outer_Reg", ref chr_outer_reg);
+ ser.Sync(nameof(reg_addr), ref reg_addr);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(chr_outer_reg), ref chr_outer_reg);
Sync();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namco163Audio.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namco163Audio.cs
index 6a45136c1f..eea85483c9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namco163Audio.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namco163Audio.cs
@@ -101,10 +101,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("ram", ref ram, false);
- ser.Sync("addr", ref addr);
- ser.Sync("autoincrement", ref autoincrement);
- ser.Sync("ch", ref ch);
+ ser.Sync(nameof(ram), ref ram, false);
+ ser.Sync(nameof(addr), ref addr);
+ ser.Sync(nameof(autoincrement), ref autoincrement);
+ ser.Sync(nameof(ch), ref ch);
}
Action enqueuer;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs
index 6cb98ebfbd..d2fff1a5ac 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs
@@ -38,8 +38,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public virtual void SyncState(Serializer ser)
{
- ser.Sync("reg_addr", ref reg_addr);
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(reg_addr), ref reg_addr);
+ ser.Sync(nameof(regs), ref regs);
Sync();
}
@@ -123,9 +123,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
if (NES._isVS)
- ser.Sync("CIRAM_VS", ref CIRAM_VS, false);
+ ser.Sync(nameof(CIRAM_VS), ref CIRAM_VS, false);
- ser.Sync("tko_security", ref tko_security);
+ ser.Sync(nameof(tko_security), ref tko_security);
mapper.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs
index 61ff11113b..7229ee1ffe 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs
@@ -157,12 +157,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg0", ref reg0);
- ser.Sync("reg1", ref reg1);
- ser.Sync("prg", ref prg);
- ser.Sync("security", ref security);
- ser.Sync("trigger", ref trigger);
- ser.Sync("strobe", ref strobe);
+ ser.Sync(nameof(reg0), ref reg0);
+ ser.Sync(nameof(reg1), ref reg1);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(security), ref security);
+ ser.Sync(nameof(trigger), ref trigger);
+ ser.Sync(nameof(strobe), ref strobe);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs
index 58b62e693e..5f495f9284 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs
@@ -45,8 +45,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs
index 73f567325d..13511e2e34 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs
@@ -20,9 +20,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_banks_4k", ref chr_banks_4k);
- ser.Sync("chr_latches", ref chr_latches);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_banks_4k), ref chr_banks_4k);
+ ser.Sync(nameof(chr_latches), ref chr_latches);
if (ser.IsReader)
SyncPRG();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs
index c1eb5895b0..a708bef9e4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs
@@ -245,17 +245,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.BeginSection("SEEPROM");
- ser.Sync("rom", ref rom, false);
- ser.Sync("OutEnable", ref OutEnable);
- ser.Sync("SCK", ref SCK);
- ser.Sync("SDA", ref SDA);
- ser.Sync("PullDown", ref PullDown);
- ser.Sync("BitsLeft", ref BitsLeft);
- ser.Sync("Data", ref Data);
- ser.Sync("Addr", ref Addr);
+ ser.BeginSection(nameof(SEEPROM));
+ ser.Sync(nameof(rom), ref rom, false);
+ ser.Sync(nameof(OutEnable), ref OutEnable);
+ ser.Sync(nameof(SCK), ref SCK);
+ ser.Sync(nameof(SDA), ref SDA);
+ ser.Sync(nameof(PullDown), ref PullDown);
+ ser.Sync(nameof(BitsLeft), ref BitsLeft);
+ ser.Sync(nameof(Data), ref Data);
+ ser.Sync(nameof(Addr), ref Addr);
int tmp = (int)State;
- ser.Sync("State", ref tmp);
+ ser.Sync(nameof(State), ref tmp);
State = (EState)tmp;
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs
index 37565a1aae..8444e8a7bf 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs
@@ -158,10 +158,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("port", ref port);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr, false);
- ser.Sync("simple", ref simple);
+ ser.Sync(nameof(port), ref port);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr, false);
+ ser.Sync(nameof(simple), ref simple);
}
}
@@ -304,9 +304,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("port", ref port);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr, false);
+ ser.Sync(nameof(port), ref port);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr, false);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs
index 7b27880341..1cbfcfe8d9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs
@@ -108,8 +108,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg), ref prg);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs
index 361a5b3d31..6ea2340e68 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs
@@ -32,8 +32,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("regs", ref regs);
- ser.Sync("is167", ref is167);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(is167), ref is167);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs
index ba379f2201..4b10191bb0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs
@@ -61,8 +61,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("left_piece", ref left_piece);
- ser.Sync("right_piece", ref right_piece);
+ ser.Sync(nameof(left_piece), ref left_piece);
+ ser.Sync(nameof(right_piece), ref right_piece);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs
index 09b48a0ed2..2a690fb454 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs
@@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(BizHawk.Common.Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs
index 3d1ab46852..29d921bb43 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs
@@ -41,10 +41,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs
index 08aaa0f9b5..e577b11123 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs
@@ -42,9 +42,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
index 997440082c..7c22a49f52 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs
@@ -27,13 +27,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("toggle", ref toggle);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("chr_banks_2k", ref chr_banks_2k);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_asserted", ref irq_asserted);
- ser.Sync("clock_counter", ref clock_counter);
+ ser.Sync(nameof(toggle), ref toggle);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(chr_banks_2k), ref chr_banks_2k);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_asserted), ref irq_asserted);
+ ser.Sync(nameof(clock_counter), ref clock_counter);
if (NES.IsVS)
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs
index 12c5699dae..01ec7b9cd4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs
@@ -29,11 +29,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_regs_2k", ref chr_regs_2k);
- ser.Sync("nt_regs", ref nt_regs);
- ser.Sync("prg_regs_16k", ref prg_regs_16k);
- ser.Sync("flag_m", ref flag_m);
- ser.Sync("flag_r", ref flag_r);
+ ser.Sync(nameof(chr_regs_2k), ref chr_regs_2k);
+ ser.Sync(nameof(nt_regs), ref nt_regs);
+ ser.Sync(nameof(prg_regs_16k), ref prg_regs_16k);
+ ser.Sync(nameof(flag_m), ref flag_m);
+ ser.Sync(nameof(flag_r), ref flag_r);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
index 22f90619b4..1eeb61ed64 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
@@ -54,14 +54,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
scnt.SyncState(ser);
- ser.Sync("chr_mode", ref chr_mode);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("prg_slot", ref prg_slot);
- ser.Sync("chr_0", ref chr_0);
- ser.Sync("chr_1", ref chr_1);
- ser.Sync("wram_disable", ref wram_disable);
- ser.Sync("prg", ref prg);
- ser.SyncEnum("mirror", ref mirror);
+ ser.Sync(nameof(chr_mode), ref chr_mode);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(prg_slot), ref prg_slot);
+ ser.Sync(nameof(chr_0), ref chr_0);
+ ser.Sync(nameof(chr_1), ref chr_1);
+ ser.Sync(nameof(wram_disable), ref wram_disable);
+ ser.Sync(nameof(prg), ref prg);
+ ser.SyncEnum(nameof(mirror), ref mirror);
SyncCHR();
SyncPRG();
@@ -103,8 +103,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("shift_count", ref shift_count);
- ser.Sync("shift_val", ref shift_val);
+ ser.Sync(nameof(shift_count), ref shift_count);
+ ser.Sync(nameof(shift_val), ref shift_val);
}
public Action Reset;
@@ -393,8 +393,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
mmc1.SyncState(ser);
- ser.Sync("ppuclock", ref ppuclock);
- ser.Sync("chr_wram_enable", ref chr_wram_enable);
+ ser.Sync(nameof(ppuclock), ref ppuclock);
+ ser.Sync(nameof(chr_wram_enable), ref chr_wram_enable);
if (NES._isVS)
ser.Sync("VS_CIRAM", ref CIRAM_VS, false);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs
index dc23872ef8..0e490a241a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs
@@ -40,10 +40,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
- ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(prg_bank_mask_16k), ref prg_bank_mask_16k);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
}
void SyncPRG()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs
index 9c17d9e76d..9e2123011e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs
@@ -41,20 +41,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("regs", ref regs);
- ser.Sync("address", ref address);
- ser.Sync("chr_1k", ref chr_1k);
- ser.Sync("chr_mode", ref chr_mode);
- ser.Sync("prg_mode", ref prg_mode);
- ser.Sync("irq_countdown", ref irq_countdown);
- ser.Sync("a12_old", ref a12_old);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_enable", ref irq_enable);
- ser.Sync("irq_mode", ref irq_mode);
- ser.Sync("irq_reload_pending", ref irq_reload_pending);
- ser.Sync("separator_counter", ref separator_counter);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(address), ref address);
+ ser.Sync(nameof(chr_1k), ref chr_1k);
+ ser.Sync(nameof(chr_mode), ref chr_mode);
+ ser.Sync(nameof(prg_mode), ref prg_mode);
+ ser.Sync(nameof(irq_countdown), ref irq_countdown);
+ ser.Sync(nameof(a12_old), ref a12_old);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_enable), ref irq_enable);
+ ser.Sync(nameof(irq_mode), ref irq_mode);
+ ser.Sync(nameof(irq_reload_pending), ref irq_reload_pending);
+ ser.Sync(nameof(separator_counter), ref separator_counter);
Sync();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs
index 520a53b182..0c9023ec8d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs
@@ -54,8 +54,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(chr), ref chr);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs
index c770bef585..e032d56748 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs
@@ -34,8 +34,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
ser.BeginSection("mmc3variant");
- ser.Sync("pending", ref pending);
- ser.Sync("delay", ref delay);
+ ser.Sync(nameof(pending), ref pending);
+ ser.Sync(nameof(delay), ref delay);
ser.EndSection();
}
@@ -84,9 +84,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
if(mmc3 != null) mmc3.SyncState(ser);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
- ser.Sync("mirror_mode", ref mirror_mode);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
+ ser.Sync(nameof(mirror_mode), ref mirror_mode);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs
index 0bdaefdd98..9ee071a0e3 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs
@@ -52,9 +52,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("wramenable", ref wramenable);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(wramenable), ref wramenable);
}
public override void Dispose()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs
index 0aacb6be96..74ea6c91bf 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs
@@ -76,9 +76,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("chr_regs_1k", ref chr_regs_1k);
- ser.Sync("ChrMode", ref ChrMode);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(chr_regs_1k), ref chr_regs_1k);
+ ser.Sync(nameof(ChrMode), ref ChrMode);
for (int i = 0; i < wramenable.Length; i++)
ser.Sync("wramenable_" + i, ref wramenable[i]);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs
index bf642a252c..724d140003 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs
@@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs
index 80e90a5d59..b268323987 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs
@@ -23,8 +23,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("regs", ref regs);
- ser.Sync("ctrl", ref ctrl);
+ ser.Sync(nameof(regs), ref regs);
+ ser.Sync(nameof(ctrl), ref ctrl);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs
index 9386a87c91..b7f29f10bd 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs
@@ -89,7 +89,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("regs", ref regs);
+ ser.Sync(nameof(regs), ref regs);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs
index 4fb8e19e80..3826ec224c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs
@@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("latche", ref latche);
+ ser.Sync(nameof(latche), ref latche);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs
index 88c8db1ecc..104a233727 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs
@@ -53,9 +53,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg_prg", ref reg_prg);
- ser.Sync("reg_chr", ref reg_chr);
- ser.Sync("BMC_BS_5_DipSwitch", ref BMC_BS_5_DipSwitch);
+ ser.Sync(nameof(reg_prg), ref reg_prg);
+ ser.Sync(nameof(reg_chr), ref reg_chr);
+ ser.Sync(nameof(BMC_BS_5_DipSwitch), ref BMC_BS_5_DipSwitch);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs
index b3543e83a9..97462732bf 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs
@@ -37,7 +37,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
ser.Sync("reg", ref _reg);
- ser.Sync("D1038_Dipswitch", ref D1038_Dipswitch);
+ ser.Sync(nameof(D1038_Dipswitch), ref D1038_Dipswitch);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs
index e39ad1cbab..d91261b218 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs
@@ -43,7 +43,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
ser.Sync("reg", ref _reg);
- ser.Sync("_isRom2", ref _isRom2);
+ ser.Sync(nameof(_isRom2), ref _isRom2);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs
index afef3e003d..cb8a3c6c0e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs
@@ -39,10 +39,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
- ser.Sync("bank", ref bank);
- ser.Sync("bank", ref Ghostbusters63in1_63set);
- ser.Sync("bank", ref Ghostbusters63in1_chip_22_select);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(bank), ref bank);
+ ser.Sync(nameof(bank), ref Ghostbusters63in1_63set);
+ ser.Sync(nameof(bank), ref Ghostbusters63in1_chip_22_select);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs
index abc100e521..0463013e8b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs
@@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("latche", ref latche);
+ ser.Sync(nameof(latche), ref latche);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs
index 61ec883370..338676941e 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs
@@ -83,12 +83,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
- ser.Sync("prg_regs_8k", ref prg_regs_8k);
- ser.Sync("prg_mask", ref prg_mask_8k);
- ser.Sync("chr_mask", ref chr_mask_1k);
- ser.Sync("dip_switch", ref dip_switch);
- ser.Sync("dip_switch_setting", ref dip_switch_setting);
+ ser.Sync(nameof(exRegs), ref exRegs);
+ ser.Sync(nameof(prg_regs_8k), ref prg_regs_8k);
+ ser.Sync(nameof(prg_mask), ref prg_mask_8k);
+ ser.Sync(nameof(chr_mask), ref chr_mask_1k);
+ ser.Sync(nameof(dip_switch), ref dip_switch);
+ ser.Sync(nameof(dip_switch_setting), ref dip_switch_setting);
}
void UpdateChr()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs
index 8bd3ad0fdd..83e14080d2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs
@@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("exRegs", ref exRegs);
+ ser.Sync(nameof(exRegs), ref exRegs);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs
index a12401eb11..424ea572ac 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs
@@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("latche", ref latche);
+ ser.Sync(nameof(latche), ref latche);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs
index 8d391e2a5d..6c5136a720 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs
@@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs
index 2067bf8724..000b579a96 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs
@@ -33,8 +33,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_reg", ref prg_reg);
- ser.Sync("chr_reg", ref chr_reg);
+ ser.Sync(nameof(prg_reg), ref prg_reg);
+ ser.Sync(nameof(chr_reg), ref chr_reg);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs
index a0573add6f..e058dc781d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs
@@ -26,8 +26,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(chr), ref chr);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs
index 83278d6cab..7b45f1b690 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs
@@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs
index 43550ef399..22cff63251 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs
@@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
+ ser.Sync(nameof(reg), ref reg);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs
index ff6e12e7d4..17fa4b4518 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs
@@ -36,8 +36,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
- ser.Sync("reg", ref reg);
- ser.Sync("cmd", ref cmd);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(cmd), ref cmd);
base.SyncState(ser);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs
index aa25648f75..b913b40f78 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs
@@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("reg", ref reg);
- ser.Sync("RegionAsia", ref RegionAsia);
+ ser.Sync(nameof(reg), ref reg);
+ ser.Sync(nameof(RegionAsia), ref RegionAsia);
}
public override void WriteEXP(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs
index c8df6cac0d..12765f33e5 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs
@@ -40,13 +40,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg0", ref prg0);
- ser.Sync("prg1", ref prg1);
- ser.Sync("swap", ref swap);
- ser.Sync("chr", ref chr);
- ser.Sync("IRQa", ref IRQa);
- ser.Sync("IRQCount", ref IRQCount);
- ser.Sync("IRQpre", ref IRQpre);
+ ser.Sync(nameof(prg0), ref prg0);
+ ser.Sync(nameof(prg1), ref prg1);
+ ser.Sync(nameof(swap), ref swap);
+ ser.Sync(nameof(chr), ref chr);
+ ser.Sync(nameof(IRQa), ref IRQa);
+ ser.Sync(nameof(IRQCount), ref IRQCount);
+ ser.Sync(nameof(IRQpre), ref IRQpre);
}
public override void WritePRG(int addr, byte value)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs
index 10aae8f739..951e7305fd 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs
@@ -56,25 +56,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
- ser.Sync("DripGameDipSwitch", ref DripGameDipSwitch);
+ ser.Sync(nameof(DripGameDipSwitch), ref DripGameDipSwitch);
- ser.Sync("warmupclock", ref warmupclock);
- ser.Sync("prg", ref prg, false);
- ser.Sync("chr", ref chr, false);
+ ser.Sync(nameof(warmupclock), ref warmupclock);
+ ser.Sync(nameof(prg), ref prg, false);
+ ser.Sync(nameof(chr), ref chr, false);
- ser.Sync("exram", ref exram, false);
- ser.Sync("nt", ref nt, false);
- ser.Sync("exattr", ref exattr);
- ser.Sync("sramwrite", ref sramwrite);
- ser.Sync("irqbuffer", ref irqbuffer);
- ser.Sync("irqvalue", ref irqvalue);
+ ser.Sync(nameof(exram), ref exram, false);
+ ser.Sync(nameof(nt), ref nt, false);
+ ser.Sync(nameof(exattr), ref exattr);
+ ser.Sync(nameof(sramwrite), ref sramwrite);
+ ser.Sync(nameof(irqbuffer), ref irqbuffer);
+ ser.Sync(nameof(irqvalue), ref irqvalue);
- ser.Sync("lastntread", ref lastntread); // technically not needed if states are always at frame boundary
+ ser.Sync(nameof(lastntread), ref lastntread); // technically not needed if states are always at frame boundary
- ser.BeginSection("sound0");
+ ser.BeginSection(nameof(sound0));
sound0.SyncState(ser);
ser.EndSection();
- ser.BeginSection("sound1");
+ ser.BeginSection(nameof(sound1));
sound1.SyncState(ser);
ser.EndSection();
}
@@ -270,18 +270,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("fifo", ref fifo, false);
- ser.Sync("active", ref active);
- ser.Sync("writecursor", ref writecursor);
- ser.Sync("readcursor", ref readcursor);
+ ser.Sync(nameof(fifo), ref fifo, false);
+ ser.Sync(nameof(active), ref active);
+ ser.Sync(nameof(writecursor), ref writecursor);
+ ser.Sync(nameof(readcursor), ref readcursor);
- ser.Sync("timer", ref timer);
- ser.Sync("period", ref period);
- ser.Sync("volume", ref volume);
- ser.Sync("sample", ref sample);
- ser.Sync("latched", ref latched); // not needed
+ ser.Sync(nameof(timer), ref timer);
+ ser.Sync(nameof(period), ref period);
+ ser.Sync(nameof(volume), ref volume);
+ ser.Sync(nameof(sample), ref sample);
+ ser.Sync(nameof(latched), ref latched); // not needed
- ser.Sync("volumeChangePending", ref volumeChangePending); // very not needed
+ ser.Sync(nameof(volumeChangePending), ref volumeChangePending); // very not needed
}
// sound data fifo
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs
index 41123272c6..2a74e04162 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs
@@ -83,10 +83,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
- ser.Sync("irqenable", ref irqenable);
- ser.Sync("irqcnt", ref irqcnt);
- ser.Sync("swap", ref swap);
+ ser.Sync(nameof(prg), ref prg);
+ ser.Sync(nameof(irqenable), ref irqenable);
+ ser.Sync(nameof(irqcnt), ref irqcnt);
+ ser.Sync(nameof(swap), ref swap);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs
index 5b708c256c..73695b5f46 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs
@@ -161,7 +161,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg);
+ ser.Sync(nameof(prg), ref prg);
if (NES.IsVS)
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
index 8808c0aa42..9ffbafd49d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs
@@ -30,8 +30,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_4k", ref chr_banks_4k);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_4k), ref chr_banks_4k);
if (NES.IsVS)
{
ser.Sync("VS_CIRAM", ref CIRAM_VS, false);
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs
index 51e4bc3af9..caf0c2e99b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs
@@ -97,21 +97,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
base.SyncState(ser);
for (int i = 0; i < 2; i++) ser.Sync("prg_bank_reg_8k_" + i, ref prg_bank_reg_8k[i]);
for (int i = 0; i < 16; i++) ser.Sync("chr_bank_reg_1k_" + i, ref chr_bank_reg_1k[i]);
- ser.Sync("irq_mode", ref irq_mode);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_autoen", ref irq_autoen);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_prescaler", ref irq_prescaler);
- ser.Sync("extra_vrom", ref extra_vrom);
+ ser.Sync(nameof(irq_mode), ref irq_mode);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_autoen), ref irq_autoen);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_prescaler), ref irq_prescaler);
+ ser.Sync(nameof(extra_vrom), ref extra_vrom);
if (latch6k_exists)
- ser.Sync("latch6k_value", ref latch6k_value);
+ ser.Sync(nameof(latch6k_value), ref latch6k_value);
//SyncPRG();
ser.Sync("prg_banks", ref prg_banks_8k, false);
SyncCHR();
SyncIRQ();
- ser.Sync("isPirate", ref isPirate);
+ ser.Sync(nameof(isPirate), ref isPirate);
ser.Sync("isBMC", ref _isBMC);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs
index 10f74262a9..c93c27bef2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs
@@ -27,14 +27,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg_banks_16k", ref prg_banks_16k);
- ser.Sync("irq_mode", ref irq_mode);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_autoen", ref irq_autoen);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_cycles", ref irq_cycles);
+ ser.Sync(nameof(prg_banks_16k), ref prg_banks_16k);
+ ser.Sync(nameof(irq_mode), ref irq_mode);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_autoen), ref irq_autoen);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_cycles), ref irq_cycles);
SyncIRQ();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs
index ee5479a2bb..03de6c809b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs
@@ -138,20 +138,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
base.SyncState(ser);
VRC6Sound.SyncState(ser);
- ser.Sync("prg_bank_16k", ref prg_bank_16k);
- ser.Sync("prg_bank_8k", ref prg_bank_8k);
- ser.Sync("chr_banks_1k", ref chr_banks_1k);
- ser.Sync("irq_mode", ref irq_mode);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_autoen", ref irq_autoen);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_prescaler", ref irq_prescaler);
+ ser.Sync(nameof(prg_bank_16k), ref prg_bank_16k);
+ ser.Sync(nameof(prg_bank_8k), ref prg_bank_8k);
+ ser.Sync(nameof(chr_banks_1k), ref chr_banks_1k);
+ ser.Sync(nameof(irq_mode), ref irq_mode);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_autoen), ref irq_autoen);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_prescaler), ref irq_prescaler);
- ser.Sync("chrA10replace", ref chrA10replace);
- ser.Sync("NTROM", ref NTROM);
- ser.Sync("PPUBankingMode", ref PPUBankingMode);
+ ser.Sync(nameof(chrA10replace), ref chrA10replace);
+ ser.Sync(nameof(NTROM), ref NTROM);
+ ser.Sync(nameof(PPUBankingMode), ref PPUBankingMode);
SyncPRG();
SyncIRQ();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
index 3804ca06d1..640ac83dfb 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs
@@ -38,15 +38,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
base.SyncState(ser);
if (fm != null)
fm.SyncState(ser);
- ser.Sync("prg_banks_8k", ref prg_banks_8k);
- ser.Sync("chr_banks_1k", ref chr_banks_1k);
- ser.Sync("irq_mode", ref irq_mode);
- ser.Sync("irq_enabled", ref irq_enabled);
- ser.Sync("irq_pending", ref irq_pending);
- ser.Sync("irq_autoen", ref irq_autoen);
- ser.Sync("irq_reload", ref irq_reload);
- ser.Sync("irq_counter", ref irq_counter);
- ser.Sync("irq_prescaler", ref irq_prescaler);
+ ser.Sync(nameof(prg_banks_8k), ref prg_banks_8k);
+ ser.Sync(nameof(chr_banks_1k), ref chr_banks_1k);
+ ser.Sync(nameof(irq_mode), ref irq_mode);
+ ser.Sync(nameof(irq_enabled), ref irq_enabled);
+ ser.Sync(nameof(irq_pending), ref irq_pending);
+ ser.Sync(nameof(irq_autoen), ref irq_autoen);
+ ser.Sync(nameof(irq_reload), ref irq_reload);
+ ser.Sync(nameof(irq_counter), ref irq_counter);
+ ser.Sync(nameof(irq_prescaler), ref irq_prescaler);
SyncIRQ();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
index 0f96dd3f1f..cf083f4ffa 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs
@@ -104,7 +104,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("chr", ref chr);
+ ser.Sync(nameof(chr), ref chr);
ser.Sync("VS_CIRAM", ref CIRAM_VS, false);
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs
index 6a34c25e5c..a6537bd966 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs
@@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.Sync("prg", ref prg, true);
+ ser.Sync(nameof(prg), ref prg, true);
}
public override bool Configure(NES.EDetectionOrigin origin)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
index c32715179c..960a93dbc1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs
@@ -53,31 +53,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
- ser.BeginSection("FDS");
- ser.BeginSection("RamAdapter");
+ ser.BeginSection(nameof(FDS));
+ ser.BeginSection(nameof(RamAdapter));
diskdrive.SyncState(ser);
ser.EndSection();
- ser.BeginSection("audio");
+ ser.BeginSection(nameof(audio));
audio.SyncState(ser);
ser.EndSection();
{
// silly little hack
int tmp = currentside != null ? (int)currentside : 1234567;
- ser.Sync("currentside", ref tmp);
+ ser.Sync(nameof(currentside), ref tmp);
currentside = tmp == 1234567 ? null : (int?)tmp;
}
for (int i = 0; i < NumSides; i++)
ser.Sync("diskdiffs" + i, ref diskdiffs[i], true);
- ser.Sync("_timerirq", ref _timerirq);
- ser.Sync("timer_irq_active", ref timer_irq_active);
- ser.Sync("timerirq_cd", ref timerirq_cd);
- ser.Sync("_diskirq", ref _diskirq);
- ser.Sync("diskenable", ref diskenable);
- ser.Sync("soundenable", ref soundenable);
- ser.Sync("reg4026", ref reg4026);
- ser.Sync("timerlatch", ref timerlatch);
- ser.Sync("timervalue", ref timervalue);
- ser.Sync("timerreg", ref timerreg);
+ ser.Sync(nameof(_timerirq), ref _timerirq);
+ ser.Sync(nameof(timer_irq_active), ref timer_irq_active);
+ ser.Sync(nameof(timerirq_cd), ref timerirq_cd);
+ ser.Sync(nameof(_diskirq), ref _diskirq);
+ ser.Sync(nameof(diskenable), ref diskenable);
+ ser.Sync(nameof(soundenable), ref soundenable);
+ ser.Sync(nameof(reg4026), ref reg4026);
+ ser.Sync(nameof(timerlatch), ref timerlatch);
+ ser.Sync(nameof(timervalue), ref timervalue);
+ ser.Sync(nameof(timerreg), ref timerreg);
ser.EndSection();
SetIRQ();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSAudio.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSAudio.cs
index 4041027bba..84439ea181 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSAudio.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSAudio.cs
@@ -8,48 +8,48 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
public void SyncState(Serializer ser)
{
- ser.Sync("waveram", ref waveram, false);
- ser.Sync("waverampos", ref waverampos);
+ ser.Sync(nameof(waveram), ref waveram, false);
+ ser.Sync(nameof(waverampos), ref waverampos);
- ser.Sync("volumespd", ref volumespd);
- ser.Sync("r4080_6", ref r4080_6);
- ser.Sync("r4080_7", ref r4080_7);
+ ser.Sync(nameof(volumespd), ref volumespd);
+ ser.Sync(nameof(r4080_6), ref r4080_6);
+ ser.Sync(nameof(r4080_7), ref r4080_7);
- ser.Sync("frequency", ref frequency);
- ser.Sync("r4083_6", ref r4083_6);
- ser.Sync("r4083_7", ref r4083_7);
+ ser.Sync(nameof(frequency), ref frequency);
+ ser.Sync(nameof(r4083_6), ref r4083_6);
+ ser.Sync(nameof(r4083_7), ref r4083_7);
- ser.Sync("sweepspd", ref sweepspd);
- ser.Sync("r4084_6", ref r4084_6);
- ser.Sync("r4084_7", ref r4084_7);
+ ser.Sync(nameof(sweepspd), ref sweepspd);
+ ser.Sync(nameof(r4084_6), ref r4084_6);
+ ser.Sync(nameof(r4084_7), ref r4084_7);
- ser.Sync("sweepbias", ref sweepbias);
+ ser.Sync(nameof(sweepbias), ref sweepbias);
- ser.Sync("modfreq", ref modfreq);
- ser.Sync("r4087_7", ref r4087_7);
+ ser.Sync(nameof(modfreq), ref modfreq);
+ ser.Sync(nameof(r4087_7), ref r4087_7);
- ser.Sync("modtable", ref modtable, false);
- ser.Sync("modtablepos", ref modtablepos);
+ ser.Sync(nameof(modtable), ref modtable, false);
+ ser.Sync(nameof(modtablepos), ref modtablepos);
- ser.Sync("mastervol_num", ref mastervol_num);
- ser.Sync("mastervol_den", ref mastervol_den);
- ser.Sync("waveram_writeenable", ref waveram_writeenable);
+ ser.Sync(nameof(mastervol_num), ref mastervol_num);
+ ser.Sync(nameof(mastervol_den), ref mastervol_den);
+ ser.Sync(nameof(waveram_writeenable), ref waveram_writeenable);
- ser.Sync("envspeed", ref envspeed);
+ ser.Sync(nameof(envspeed), ref envspeed);
- ser.Sync("volumeclock", ref volumeclock);
- ser.Sync("sweepclock", ref sweepclock);
- ser.Sync("modclock", ref modclock);
- ser.Sync("mainclock", ref mainclock);
+ ser.Sync(nameof(volumeclock), ref volumeclock);
+ ser.Sync(nameof(sweepclock), ref sweepclock);
+ ser.Sync(nameof(modclock), ref modclock);
+ ser.Sync(nameof(mainclock), ref mainclock);
- ser.Sync("modoutput", ref modoutput);
+ ser.Sync(nameof(modoutput), ref modoutput);
- ser.Sync("volumegain", ref volumegain);
- ser.Sync("sweepgain", ref sweepgain);
+ ser.Sync(nameof(volumegain), ref volumegain);
+ ser.Sync(nameof(sweepgain), ref sweepgain);
- ser.Sync("waveramoutput", ref waveramoutput);
+ ser.Sync(nameof(waveramoutput), ref waveramoutput);
- ser.Sync("latchedoutput", ref latchedoutput);
+ ser.Sync(nameof(latchedoutput), ref latchedoutput);
}
//4040:407f
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs
index 540e471764..77b613a588 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs
@@ -130,34 +130,34 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("originaldisk", ref originaldisk, true);
- ser.Sync("disk", ref disk, true);
- ser.Sync("diskpos", ref diskpos);
- ser.Sync("disksize", ref disksize);
- ser.Sync("writeprotect", ref writeprotect);
+ ser.Sync(nameof(originaldisk), ref originaldisk, true);
+ ser.Sync(nameof(disk), ref disk, true);
+ ser.Sync(nameof(diskpos), ref diskpos);
+ ser.Sync(nameof(disksize), ref disksize);
+ ser.Sync(nameof(writeprotect), ref writeprotect);
- ser.Sync("cycleswaiting", ref cycleswaiting);
+ ser.Sync(nameof(cycleswaiting), ref cycleswaiting);
{
int tmp = (int)state;
- ser.Sync("state", ref tmp);
+ ser.Sync(nameof(state), ref tmp);
state = (RamAdapterState)tmp;
}
- ser.Sync("cached4025", ref cached4025);
- ser.Sync("irq", ref irq);
- ser.Sync("transferreset", ref transferreset);
+ ser.Sync(nameof(cached4025), ref cached4025);
+ ser.Sync(nameof(irq), ref irq);
+ ser.Sync(nameof(transferreset), ref transferreset);
- ser.Sync("crc", ref crc);
- ser.Sync("writecomputecrc", ref writecomputecrc);
+ ser.Sync(nameof(crc), ref crc);
+ ser.Sync(nameof(writecomputecrc), ref writecomputecrc);
- ser.Sync("readreg", ref readreg);
- ser.Sync("writereg", ref writereg);
- ser.Sync("readregpos", ref readregpos);
- ser.Sync("writeregpos", ref writeregpos);
- ser.Sync("readreglatch", ref readreglatch);
- ser.Sync("writereglatch", ref writereglatch);
+ ser.Sync(nameof(readreg), ref readreg);
+ ser.Sync(nameof(writereg), ref writereg);
+ ser.Sync(nameof(readregpos), ref readregpos);
+ ser.Sync(nameof(writeregpos), ref writeregpos);
+ ser.Sync(nameof(readreglatch), ref readreglatch);
+ ser.Sync(nameof(writereglatch), ref writereglatch);
- ser.Sync("bytetransferflag", ref bytetransferflag);
- ser.Sync("lookingforendofgap", ref lookingforendofgap);
+ ser.Sync(nameof(bytetransferflag), ref bytetransferflag);
+ ser.Sync(nameof(lookingforendofgap), ref lookingforendofgap);
}
#region state
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs
index d4486394b3..ba665367f7 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs
@@ -97,10 +97,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public virtual void SyncState(Serializer ser)
{
- ser.Sync("vram", ref vram, true);
- ser.Sync("wram", ref wram, true);
+ ser.Sync(nameof(vram), ref vram, true);
+ ser.Sync(nameof(wram), ref wram, true);
for (int i = 0; i < 4; i++) ser.Sync("mirroring" + i, ref mirroring[i]);
- ser.Sync("irq_signal", ref irq_signal);
+ ser.Sync(nameof(irq_signal), ref irq_signal);
SyncStateFlag = true;
}
@@ -490,7 +490,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
#if DEBUG
if (ret != null)
- throw new Exception(string.Format("Boards {0} and {1} both responded to Configure!", ret, type));
+ throw new Exception($"Boards {ret} and {type} both responded to {nameof(NESBoardBase.Configure)}!");
else
ret = type;
#else
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IStatable.cs
index 5b6e2d992d..67226bae60 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IStatable.cs
@@ -49,19 +49,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
private void SyncState(Serializer ser)
{
int version = 4;
- ser.BeginSection("NES");
- ser.Sync("version", ref version);
+ ser.BeginSection(nameof(NES));
+ ser.Sync(nameof(version), ref version);
ser.Sync("Frame", ref _frame);
ser.Sync("Lag", ref _lagcount);
ser.Sync("IsLag", ref islag);
cpu.SyncState(ser);
- ser.Sync("ram", ref ram, false);
- ser.Sync("CIRAM", ref CIRAM, false);
- ser.Sync("_irq_apu", ref _irq_apu);
- ser.Sync("sprdma_countdown", ref sprdma_countdown);
- ser.Sync("cpu_deadcounter", ref cpu_deadcounter);
+ ser.Sync(nameof(ram), ref ram, false);
+ ser.Sync(nameof(CIRAM), ref CIRAM, false);
+ ser.Sync(nameof(_irq_apu), ref _irq_apu);
+ ser.Sync(nameof(sprdma_countdown), ref sprdma_countdown);
+ ser.Sync(nameof(cpu_deadcounter), ref cpu_deadcounter);
- ser.Sync("old_s", ref old_s);
+ ser.Sync(nameof(old_s), ref old_s);
//oam related
ser.Sync("Oam_Dma_Index", ref oam_dma_index);
@@ -69,10 +69,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
ser.Sync("Oam_Dma_Addr", ref oam_dma_addr);
ser.Sync("Oam_Dma_Byte", ref oam_dma_byte);
ser.Sync("Dmc_Dma_Exec", ref dmc_dma_exec);
- ser.Sync("dmc_realign", ref dmc_realign);
- ser.Sync("IRQ_delay", ref IRQ_delay);
- ser.Sync("special_case_delay", ref special_case_delay);
- ser.Sync("do_the_reread", ref do_the_reread);
+ ser.Sync(nameof(dmc_realign), ref dmc_realign);
+ ser.Sync(nameof(IRQ_delay), ref IRQ_delay);
+ ser.Sync(nameof(special_case_delay), ref special_case_delay);
+ ser.Sync(nameof(do_the_reread), ref do_the_reread);
//VS related
ser.Sync("VS", ref _isVS);
@@ -85,32 +85,32 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
ser.Sync("VS_ROM_Control", ref VS_ROM_control);
// single cycle execution related
- ser.Sync("current_strobe", ref current_strobe);
- ser.Sync("new_strobe", ref new_strobe);
+ ser.Sync(nameof(current_strobe), ref current_strobe);
+ ser.Sync(nameof(new_strobe), ref new_strobe);
- ser.BeginSection("Board");
+ ser.BeginSection(nameof(Board));
Board.SyncState(ser);
if (Board is NESBoardBase && !((NESBoardBase)Board).SyncStateFlag)
- throw new InvalidOperationException("the current NES mapper didnt call base.SyncState");
+ throw new InvalidOperationException($"the current NES mapper didn't call base.{nameof(INESBoard.SyncState)}");
ser.EndSection();
ppu.SyncState(ser);
apu.SyncState(ser);
if (version >= 2)
{
- ser.Sync("DB", ref DB);
+ ser.Sync(nameof(DB), ref DB);
}
if (version >= 3)
{
- ser.Sync("latched4016", ref latched4016);
- ser.BeginSection("ControllerDeck");
+ ser.Sync(nameof(latched4016), ref latched4016);
+ ser.BeginSection(nameof(ControllerDeck));
ControllerDeck.SyncState(ser);
ser.EndSection();
}
if (version >= 4)
{
- ser.Sync("resetSignal", ref resetSignal);
- ser.Sync("hardResetSignal", ref hardResetSignal);
+ ser.Sync(nameof(resetSignal), ref resetSignal);
+ ser.Sync(nameof(hardResetSignal), ref hardResetSignal);
}
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs
index 48adc81990..c612f335d4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs
@@ -190,10 +190,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.BeginSection("Left");
+ ser.BeginSection(nameof(Left));
Left.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Right");
+ ser.BeginSection(nameof(Right));
Right.SyncState(ser);
ser.EndSection();
}
@@ -323,8 +323,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
@@ -386,8 +386,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
@@ -439,9 +439,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("shiftidx", ref shiftidx);
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(shiftidx), ref shiftidx);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
@@ -497,8 +497,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
@@ -546,9 +546,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("restting", ref resetting);
- ser.Sync("latched3", ref latched3);
- ser.Sync("latched4", ref latched4);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latched3), ref latched3);
+ ser.Sync(nameof(latched4), ref latched4);
}
}
@@ -663,8 +663,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
// famicom expansion hookups
@@ -805,9 +805,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("shiftidx", ref shiftidx);
- ser.Sync("restting", ref resetting);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(shiftidx), ref shiftidx);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
@@ -951,9 +951,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("active", ref active);
- ser.Sync("column", ref column);
- ser.Sync("row", ref row);
+ ser.Sync(nameof(active), ref active);
+ ser.Sync(nameof(column), ref column);
+ ser.Sync(nameof(row), ref row);
}
}
@@ -1013,9 +1013,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("resetting", ref resetting);
- ser.Sync("latchedp1", ref latchedp1);
- ser.Sync("latchedp2", ref latchedp2);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(latchedp1), ref latchedp1);
+ ser.Sync(nameof(latchedp2), ref latchedp2);
}
}
@@ -1085,9 +1085,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("resetting", ref resetting);
- ser.Sync("shiftidx", ref shiftidx);
- ser.Sync("latchedvalue", ref latchedvalue);
+ ser.Sync(nameof(resetting), ref resetting);
+ ser.Sync(nameof(shiftidx), ref shiftidx);
+ ser.Sync(nameof(latchedvalue), ref latchedvalue);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs
index 7e4bcdb1a9..74c2b582d9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs
@@ -225,87 +225,87 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("cpu_step", ref cpu_step);
- ser.Sync("cpu_stepcounter", ref cpu_stepcounter);
- ser.Sync("ppudead", ref ppudead);
- ser.Sync("idleSynch", ref idleSynch);
- ser.Sync("NMI_PendingInstructions", ref NMI_PendingInstructions);
- ser.Sync("PPUGenLatch", ref PPUGenLatch);
- ser.Sync("vtoggle", ref vtoggle);
- ser.Sync("VRAMBuffer", ref VRAMBuffer);
- ser.Sync("ppu_addr_temp", ref ppu_addr_temp);
+ ser.Sync(nameof(cpu_step), ref cpu_step);
+ ser.Sync(nameof(cpu_stepcounter), ref cpu_stepcounter);
+ ser.Sync(nameof(ppudead), ref ppudead);
+ ser.Sync(nameof(idleSynch), ref idleSynch);
+ ser.Sync(nameof(NMI_PendingInstructions), ref NMI_PendingInstructions);
+ ser.Sync(nameof(PPUGenLatch), ref PPUGenLatch);
+ ser.Sync(nameof(vtoggle), ref vtoggle);
+ ser.Sync(nameof(VRAMBuffer), ref VRAMBuffer);
+ ser.Sync(nameof(ppu_addr_temp), ref ppu_addr_temp);
- ser.Sync("spr_true_count", ref spr_true_count);
- ser.Sync("sprite_eval_write", ref sprite_eval_write);
- ser.Sync("Read_Value", ref read_value);
+ ser.Sync(nameof(spr_true_count), ref spr_true_count);
+ ser.Sync(nameof(sprite_eval_write), ref sprite_eval_write);
+ ser.Sync(nameof(read_value), ref read_value);
ser.Sync("Prev_soam_index", ref soam_index_prev);
ser.Sync("Spr_Zero_Go", ref sprite_zero_go);
ser.Sync("Spr_zero_in_Range", ref sprite_zero_in_range);
- ser.Sync("Is_even_cycle", ref is_even_cycle);
- ser.Sync("soam_index", ref soam_index);
- ser.Sync("soam_m_index", ref soam_m_index);
- ser.Sync("oam_index", ref oam_index);
- ser.Sync("oam_index_aux", ref oam_index_aux);
- ser.Sync("soam_index_aux", ref soam_index_aux);
- ser.Sync("yp", ref yp);
- ser.Sync("target", ref target);
- ser.Sync("ppu_was_on", ref ppu_was_on);
- ser.Sync("spriteHeight", ref spriteHeight);
- ser.Sync("install_2006", ref install_2006);
- ser.Sync("race_2006", ref race_2006);
- ser.Sync("race_2006_2", ref race_2006_2);
- ser.Sync("install_2001", ref install_2001);
- ser.Sync("show_bg_new", ref show_bg_new);
- ser.Sync("show_obj_new", ref show_obj_new);
+ ser.Sync(nameof(is_even_cycle), ref is_even_cycle);
+ ser.Sync(nameof(soam_index), ref soam_index);
+ ser.Sync(nameof(soam_m_index), ref soam_m_index);
+ ser.Sync(nameof(oam_index), ref oam_index);
+ ser.Sync(nameof(oam_index_aux), ref oam_index_aux);
+ ser.Sync(nameof(soam_index_aux), ref soam_index_aux);
+ ser.Sync(nameof(yp), ref yp);
+ ser.Sync(nameof(target), ref target);
+ ser.Sync(nameof(ppu_was_on), ref ppu_was_on);
+ ser.Sync(nameof(spriteHeight), ref spriteHeight);
+ ser.Sync(nameof(install_2006), ref install_2006);
+ ser.Sync(nameof(race_2006), ref race_2006);
+ ser.Sync(nameof(race_2006_2), ref race_2006_2);
+ ser.Sync(nameof(install_2001), ref install_2001);
+ ser.Sync(nameof(show_bg_new), ref show_bg_new);
+ ser.Sync(nameof(show_obj_new), ref show_obj_new);
- ser.Sync("ppu_open_bus", ref ppu_open_bus);
- ser.Sync("double_2007_read", ref double_2007_read);
- ser.Sync("ppu_open_bus_decay_timer", ref ppu_open_bus_decay_timer, false);
- ser.Sync("glitchy_reads_2003", ref glitchy_reads_2003, false);
+ ser.Sync(nameof(ppu_open_bus), ref ppu_open_bus);
+ ser.Sync(nameof(double_2007_read), ref double_2007_read);
+ ser.Sync(nameof(ppu_open_bus_decay_timer), ref ppu_open_bus_decay_timer, false);
+ ser.Sync(nameof(glitchy_reads_2003), ref glitchy_reads_2003, false);
- ser.Sync("OAM", ref OAM, false);
- ser.Sync("soam", ref soam, false);
- ser.Sync("PALRAM", ref PALRAM, false);
- ser.Sync("ppuphase", ref ppuphase);
+ ser.Sync(nameof(OAM), ref OAM, false);
+ ser.Sync(nameof(soam), ref soam, false);
+ ser.Sync(nameof(PALRAM), ref PALRAM, false);
+ ser.Sync(nameof(ppuphase), ref ppuphase);
- ser.Sync("Reg2002_objoverflow", ref Reg2002_objoverflow);
- ser.Sync("Reg2002_objhit", ref Reg2002_objhit);
- ser.Sync("Reg2002_vblank_active", ref Reg2002_vblank_active);
- ser.Sync("Reg2002_vblank_active_pending", ref Reg2002_vblank_active_pending);
- ser.Sync("Reg2002_vblank_clear_pending", ref Reg2002_vblank_clear_pending);
+ ser.Sync(nameof(Reg2002_objoverflow), ref Reg2002_objoverflow);
+ ser.Sync(nameof(Reg2002_objhit), ref Reg2002_objhit);
+ ser.Sync(nameof(Reg2002_vblank_active), ref Reg2002_vblank_active);
+ ser.Sync(nameof(Reg2002_vblank_active_pending), ref Reg2002_vblank_active_pending);
+ ser.Sync(nameof(Reg2002_vblank_clear_pending), ref Reg2002_vblank_clear_pending);
ppur.SyncState(ser);
- byte temp8 = reg_2000.Value; ser.Sync("reg_2000.Value", ref temp8); reg_2000.Value = temp8;
- temp8 = reg_2001.Value; ser.Sync("reg_2001.Value", ref temp8); reg_2001.Value = temp8;
- ser.Sync("reg_2003", ref reg_2003);
+ byte temp8 = reg_2000.Value; ser.Sync($"{nameof(reg_2000)}.{nameof(reg_2000.Value)}", ref temp8); reg_2000.Value = temp8;
+ temp8 = reg_2001.Value; ser.Sync($"{nameof(reg_2001)}.{nameof(reg_2001.Value)}", ref temp8); reg_2001.Value = temp8;
+ ser.Sync(nameof(reg_2003), ref reg_2003);
//don't sync framebuffer into binary (rewind) states
if(ser.IsText)
- ser.Sync("xbuf", ref xbuf, false);
+ ser.Sync(nameof(xbuf), ref xbuf, false);
- ser.Sync("_totalCycles", ref _totalCycles);
+ ser.Sync(nameof(_totalCycles), ref _totalCycles);
- ser.Sync("do_vbl", ref do_vbl);
- ser.Sync("do_active_sl", ref do_active_sl);
- ser.Sync("do_pre_vbl", ref do_pre_vbl);
+ ser.Sync(nameof(do_vbl), ref do_vbl);
+ ser.Sync(nameof(do_active_sl), ref do_active_sl);
+ ser.Sync(nameof(do_pre_vbl), ref do_pre_vbl);
- ser.Sync("nmi_destiny", ref nmi_destiny);
- ser.Sync("evenOddDestiny", ref evenOddDestiny);
- ser.Sync("NMI_offset", ref NMI_offset);
- ser.Sync("yp_shift", ref yp_shift);
- ser.Sync("sprite_eval_cycle", ref sprite_eval_cycle);
- ser.Sync("xt", ref xt);
- ser.Sync("xp", ref xp);
- ser.Sync("xstart", ref xstart);
- ser.Sync("rasterpos", ref rasterpos);
- ser.Sync("renderspritenow", ref renderspritenow);
- ser.Sync("s", ref s);
- ser.Sync("ppu_aux_index", ref ppu_aux_index);
- ser.Sync("junksprite", ref junksprite);
- ser.Sync("line", ref line);
- ser.Sync("patternNumber", ref patternNumber);
- ser.Sync("patternAddress", ref patternAddress);
- ser.Sync("temp_addr", ref temp_addr);
- ser.Sync("sl_sprites", ref sl_sprites, false);
+ ser.Sync(nameof(nmi_destiny), ref nmi_destiny);
+ ser.Sync(nameof(evenOddDestiny), ref evenOddDestiny);
+ ser.Sync(nameof(NMI_offset), ref NMI_offset);
+ ser.Sync(nameof(yp_shift), ref yp_shift);
+ ser.Sync(nameof(sprite_eval_cycle), ref sprite_eval_cycle);
+ ser.Sync(nameof(xt), ref xt);
+ ser.Sync(nameof(xp), ref xp);
+ ser.Sync(nameof(xstart), ref xstart);
+ ser.Sync(nameof(rasterpos), ref rasterpos);
+ ser.Sync(nameof(renderspritenow), ref renderspritenow);
+ ser.Sync(nameof(s), ref s);
+ ser.Sync(nameof(ppu_aux_index), ref ppu_aux_index);
+ ser.Sync(nameof(junksprite), ref junksprite);
+ ser.Sync(nameof(line), ref line);
+ ser.Sync(nameof(patternNumber), ref patternNumber);
+ ser.Sync(nameof(patternAddress), ref patternAddress);
+ ser.Sync(nameof(temp_addr), ref temp_addr);
+ ser.Sync(nameof(sl_sprites), ref sl_sprites, false);
byte bg_byte;
for (int i = 0; i < 34; i++)
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs
index 739338840a..01d0aadf5a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs
@@ -77,19 +77,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void SyncState(Serializer ser)
{
- ser.Sync("fv", ref fv);
- ser.Sync("v", ref v);
- ser.Sync("h", ref h);
- ser.Sync("vt", ref vt);
- ser.Sync("ht", ref ht);
- ser.Sync("_fv", ref _fv);
- ser.Sync("_v", ref _v);
- ser.Sync("_h", ref _h);
- ser.Sync("_vt", ref _vt);
- ser.Sync("_ht", ref _ht);
- ser.Sync("fh", ref fh);
- ser.Sync("status.cycle", ref status.cycle);
- ser.Sync("status.sl", ref status.sl);
+ ser.Sync(nameof(fv), ref fv);
+ ser.Sync(nameof(v), ref v);
+ ser.Sync(nameof(h), ref h);
+ ser.Sync(nameof(vt), ref vt);
+ ser.Sync(nameof(ht), ref ht);
+ ser.Sync(nameof(_fv), ref _fv);
+ ser.Sync(nameof(_v), ref _v);
+ ser.Sync(nameof(_h), ref _h);
+ ser.Sync(nameof(_vt), ref _vt);
+ ser.Sync(nameof(_ht), ref _ht);
+ ser.Sync(nameof(fh), ref fh);
+ ser.Sync($"{nameof(status)}.{nameof(status.cycle)}", ref status.cycle);
+ ser.Sync($"{nameof(status)}.{nameof(status.sl)}", ref status.sl);
}
//normal clocked regs. as the game can interfere with these at any time, they need to be savestated
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
index aad8579a37..dc60a866f1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
@@ -37,7 +37,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
Context = QN.qn_new();
if (Context == IntPtr.Zero)
{
- throw new InvalidOperationException("qn_new() returned NULL");
+ throw new InvalidOperationException($"{nameof(QN.qn_new)}() returned NULL");
}
try
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IStatable.cs
index 110e5274b0..6ded0e50d8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IStatable.cs
@@ -52,13 +52,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
- ser.Sync("pass_a_frame", ref pass_a_frame);
- ser.Sync("reset_frame", ref reset_frame);
- ser.Sync("pass_new_input", ref pass_new_input);
- ser.Sync("current_cycle", ref current_cycle);
- ser.Sync("reset_cycle", ref reset_cycle);
- ser.Sync("reset_cycle_int", ref reset_cycle_int);
- ser.Sync("VBL_CNT", ref VBL_CNT);
+ ser.Sync(nameof(pass_a_frame), ref pass_a_frame);
+ ser.Sync(nameof(reset_frame), ref reset_frame);
+ ser.Sync(nameof(pass_new_input), ref pass_new_input);
+ ser.Sync(nameof(current_cycle), ref current_cycle);
+ ser.Sync(nameof(reset_cycle), ref reset_cycle);
+ ser.Sync(nameof(reset_cycle_int), ref reset_cycle_int);
+ ser.Sync(nameof(VBL_CNT), ref VBL_CNT);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs
index 89472c489b..838f6584b6 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs
@@ -322,27 +322,27 @@ namespace BizHawk.Emulation.Cores.PCEngine
public void SyncState(Serializer ser)
{
- ser.BeginSection("ADPCM");
- ser.Sync("RAM", ref RAM, false);
- ser.Sync("IOAddress", ref IOAddress);
- ser.Sync("AdpcmLength", ref AdpcmLength);
- ser.Sync("ReadAddress", ref ReadAddress);
- ser.Sync("ReadTimer", ref ReadTimer);
- ser.Sync("ReadPending", ref ReadPending);
- ser.Sync("WriteAddress", ref WriteAddress);
- ser.Sync("WriteTimer", ref WriteTimer);
- ser.Sync("WriteBuffer", ref WriteBuffer);
- ser.Sync("WritePending", ref WritePending);
+ ser.BeginSection(nameof(ADPCM));
+ ser.Sync(nameof(RAM), ref RAM, false);
+ ser.Sync(nameof(IOAddress), ref IOAddress);
+ ser.Sync(nameof(AdpcmLength), ref AdpcmLength);
+ ser.Sync(nameof(ReadAddress), ref ReadAddress);
+ ser.Sync(nameof(ReadTimer), ref ReadTimer);
+ ser.Sync(nameof(ReadPending), ref ReadPending);
+ ser.Sync(nameof(WriteAddress), ref WriteAddress);
+ ser.Sync(nameof(WriteTimer), ref WriteTimer);
+ ser.Sync(nameof(WriteBuffer), ref WriteBuffer);
+ ser.Sync(nameof(WritePending), ref WritePending);
- ser.Sync("Port180B", ref Port180B);
- ser.Sync("Port180D", ref Port180D);
- ser.Sync("Port180E", ref port180E);
+ ser.Sync(nameof(Port180B), ref Port180B);
+ ser.Sync(nameof(Port180D), ref Port180D);
+ ser.Sync(nameof(Port180E), ref port180E);
- ser.Sync("AdpcmIsPlaying", ref AdpcmIsPlaying);
- ser.Sync("HalfReached", ref HalfReached);
- ser.Sync("EndReached", ref EndReached);
+ ser.Sync(nameof(AdpcmIsPlaying), ref AdpcmIsPlaying);
+ ser.Sync(nameof(HalfReached), ref HalfReached);
+ ser.Sync(nameof(EndReached), ref EndReached);
- ser.Sync("Playback44khzTimer", ref Playback44khzTimer);
+ ser.Sync(nameof(Playback44khzTimer), ref Playback44khzTimer);
ser.Sync("PlayingSample", ref playingSample);
ser.Sync("NextSampleTimer", ref nextSampleTimer);
ser.Sync("Nibble", ref nibble);
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ArcadeCard.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ArcadeCard.cs
index 8d5168efca..33ce5525af 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ArcadeCard.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ArcadeCard.cs
@@ -139,10 +139,10 @@ namespace BizHawk.Emulation.Cores.PCEngine
public void ArcadeCardSyncState(Serializer ser)
{
- ser.BeginSection("ArcadeCard");
- ser.Sync("ShiftRegister", ref ShiftRegister);
- ser.Sync("ShiftAmount", ref ShiftAmount);
- ser.Sync("RotateAmount", ref RotateAmount);
+ ser.BeginSection(nameof(ArcadeCard));
+ ser.Sync(nameof(ShiftRegister), ref ShiftRegister);
+ ser.Sync(nameof(ShiftAmount), ref ShiftAmount);
+ ser.Sync(nameof(RotateAmount), ref RotateAmount);
if (ArcadeCardRewindHack == false || ser.IsText)
{
@@ -153,10 +153,10 @@ namespace BizHawk.Emulation.Cores.PCEngine
{
ser.BeginSection("Page" + i);
- ser.Sync("Control", ref ArcadePage[i].Control);
- ser.Sync("Base", ref ArcadePage[i].Base);
- ser.Sync("Offset", ref ArcadePage[i].Offset);
- ser.Sync("IncrementValue", ref ArcadePage[i].IncrementValue);
+ ser.Sync(nameof(ArcadeCardPage.Control), ref ArcadePage[i].Control);
+ ser.Sync(nameof(ArcadeCardPage.Base), ref ArcadePage[i].Base);
+ ser.Sync(nameof(ArcadeCardPage.Offset), ref ArcadePage[i].Offset);
+ ser.Sync(nameof(ArcadeCardPage.IncrementValue), ref ArcadePage[i].IncrementValue);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IStatable.cs
index a390c09de3..67c58347ec 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IStatable.cs
@@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
private void SyncState(Serializer ser)
{
- ser.BeginSection("PCEngine");
+ ser.BeginSection(nameof(PCEngine));
Cpu.SyncState(ser);
VCE.SyncState(ser);
VDC1.SyncState(ser, 1);
@@ -87,26 +87,26 @@ namespace BizHawk.Emulation.Cores.PCEngine
}
ser.Sync("RAM", ref Ram, false);
- ser.Sync("IOBuffer", ref IOBuffer);
- ser.Sync("CdIoPorts", ref CdIoPorts, false);
- ser.Sync("BramLocked", ref BramLocked);
+ ser.Sync(nameof(IOBuffer), ref IOBuffer);
+ ser.Sync(nameof(CdIoPorts), ref CdIoPorts, false);
+ ser.Sync(nameof(BramLocked), ref BramLocked);
ser.Sync("Frame", ref _frame);
ser.Sync("Lag", ref _lagCount);
ser.Sync("IsLag", ref _isLag);
if (Cpu.ReadMemory21 == ReadMemorySF2)
{
- ser.Sync("SF2MapperLatch", ref SF2MapperLatch);
+ ser.Sync(nameof(SF2MapperLatch), ref SF2MapperLatch);
}
if (PopulousRAM != null)
{
- ser.Sync("PopulousRAM", ref PopulousRAM, false);
+ ser.Sync(nameof(PopulousRAM), ref PopulousRAM, false);
}
if (BRAM != null)
{
- ser.Sync("BRAM", ref BRAM, false);
+ ser.Sync(nameof(BRAM), ref BRAM, false);
}
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs
index 1a8472594f..bf09781625 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs
@@ -686,19 +686,19 @@ namespace BizHawk.Emulation.Cores.PCEngine
ser.Sync("ACK", ref ack);
ser.Sync("ATN", ref atn);
ser.Sync("RST", ref rst);
- ser.Sync("DataBits", ref DataBits);
- ser.Sync("Phase", ref Phase);
+ ser.Sync(nameof(DataBits), ref DataBits);
+ ser.Sync(nameof(Phase), ref Phase);
- ser.Sync("MessageCompleted", ref MessageCompleted);
- ser.Sync("StatusCompleted", ref StatusCompleted);
- ser.Sync("MessageValue", ref MessageValue);
+ ser.Sync(nameof(MessageCompleted), ref MessageCompleted);
+ ser.Sync(nameof(StatusCompleted), ref StatusCompleted);
+ ser.Sync(nameof(MessageValue), ref MessageValue);
- ser.Sync("DataReadWaitTimer", ref DataReadWaitTimer);
- ser.Sync("DataReadInProgress", ref DataReadInProgress);
- ser.Sync("DataTransferWasDone", ref DataTransferWasDone);
- ser.Sync("DataTransferInProgress", ref DataTransferInProgress);
- ser.Sync("CurrentReadingSector", ref CurrentReadingSector);
- ser.Sync("SectorsLeftToRead", ref SectorsLeftToRead);
+ ser.Sync(nameof(DataReadWaitTimer), ref DataReadWaitTimer);
+ ser.Sync(nameof(DataReadInProgress), ref DataReadInProgress);
+ ser.Sync(nameof(DataTransferWasDone), ref DataTransferWasDone);
+ ser.Sync(nameof(DataTransferInProgress), ref DataTransferInProgress);
+ ser.Sync(nameof(CurrentReadingSector), ref CurrentReadingSector);
+ ser.Sync(nameof(SectorsLeftToRead), ref SectorsLeftToRead);
ser.Sync("CommandBuffer", ref CommandBuffer.buffer, false);
ser.Sync("CommandBufferPosition", ref CommandBuffer.Position);
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs
index 4473b23c59..4c80c601bf 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs
@@ -72,10 +72,10 @@ namespace BizHawk.Emulation.Cores.PCEngine
public void SyncState(Serializer ser)
{
- ser.BeginSection("VCE");
- ser.Sync("VceAddress", ref VceAddress);
- ser.Sync("CR", ref CR);
- ser.Sync("VceData", ref VceData, false);
+ ser.BeginSection(nameof(VCE));
+ ser.Sync(nameof(VceAddress), ref VceAddress);
+ ser.Sync(nameof(CR), ref CR);
+ ser.Sync(nameof(VceData), ref VceData, false);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs
index 4dd59e373f..f6aa768715 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs
@@ -309,21 +309,21 @@ namespace BizHawk.Emulation.Cores.PCEngine
public void SyncState(Serializer ser, int vdcNo)
{
ser.BeginSection("VDC"+vdcNo);
- ser.Sync("VRAM", ref VRAM, false);
+ ser.Sync(nameof(VRAM), ref VRAM, false);
ser.Sync("SAT", ref SpriteAttributeTable, false);
- ser.Sync("Registers", ref Registers, false);
- ser.Sync("RegisterLatch", ref RegisterLatch);
- ser.Sync("ReadBuffer", ref ReadBuffer);
- ser.Sync("StatusByte", ref StatusByte);
+ ser.Sync(nameof(Registers), ref Registers, false);
+ ser.Sync(nameof(RegisterLatch), ref RegisterLatch);
+ ser.Sync(nameof(ReadBuffer), ref ReadBuffer);
+ ser.Sync(nameof(StatusByte), ref StatusByte);
- ser.Sync("DmaRequested", ref DmaRequested);
- ser.Sync("SatDmaRequested", ref SatDmaRequested);
- ser.Sync("SatDmaPerformed", ref SatDmaPerformed);
+ ser.Sync(nameof(DmaRequested), ref DmaRequested);
+ ser.Sync(nameof(SatDmaRequested), ref SatDmaRequested);
+ ser.Sync(nameof(SatDmaPerformed), ref SatDmaPerformed);
- ser.Sync("ScanLine", ref ScanLine);
- ser.Sync("BackgroundY", ref BackgroundY);
- ser.Sync("RCRCounter", ref RCRCounter);
- ser.Sync("ActiveLine", ref ActiveLine);
+ ser.Sync(nameof(ScanLine), ref ScanLine);
+ ser.Sync(nameof(BackgroundY), ref BackgroundY);
+ ser.Sync(nameof(RCRCounter), ref RCRCounter);
+ ser.Sync(nameof(ActiveLine), ref ActiveLine);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs
index 47fd130afc..0239736e07 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs
@@ -81,8 +81,8 @@ namespace BizHawk.Emulation.Cores.PCEngine
public void SyncState(Serializer ser)
{
- ser.BeginSection("VPC");
- ser.Sync("Registers", ref Registers, false);
+ ser.BeginSection(nameof(VPC));
+ ser.Sync(nameof(Registers), ref Registers, false);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IStatable.cs
index a220384e44..5da5d644d7 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IStatable.cs
@@ -56,9 +56,9 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
- ser.Sync("_cableconnected", ref _cableconnected);
- ser.Sync("_cablediscosignal", ref _cablediscosignal);
- ser.Sync("do_r_next", ref do_r_next);
+ ser.Sync(nameof(_cableconnected), ref _cableconnected);
+ ser.Sync(nameof(_cablediscosignal), ref _cablediscosignal);
+ ser.Sync(nameof(do_r_next), ref do_r_next);
_controllerDeck.SyncState(ser);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLinkControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLinkControllerDeck.cs
index bba074f0be..82cfed4c06 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLinkControllerDeck.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLinkControllerDeck.cs
@@ -49,11 +49,11 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink
public void SyncState(Serializer ser)
{
- ser.BeginSection("Port1");
+ ser.BeginSection(nameof(Port1));
Port1.SyncState(ser);
ser.EndSection();
- ser.BeginSection("Port2");
+ ser.BeginSection(nameof(Port2));
Port2.SyncState(ser);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs
index ec0acddec1..6f9281da46 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs
@@ -219,14 +219,14 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
public void SyncState(Serializer ser)
{
ser.BeginSection("93c46");
- ser.Sync("Address", ref Address);
- ser.Sync("Value", ref Value);
- ser.Sync("BitsWritten", ref BitsWritten);
- ser.Sync("BitsRead", ref BitsRead);
- ser.Sync("WriteEnable", ref WriteEnable);
- ser.SyncEnum("WriteMode", ref WriteMode);
- ser.SyncEnum("ReadMode", ref ReadMode);
- ser.SyncEnum("Flags", ref Flags);
+ ser.Sync(nameof(Address), ref Address);
+ ser.Sync(nameof(Value), ref Value);
+ ser.Sync(nameof(BitsWritten), ref BitsWritten);
+ ser.Sync(nameof(BitsRead), ref BitsRead);
+ ser.Sync(nameof(WriteEnable), ref WriteEnable);
+ ser.SyncEnum(nameof(WriteMode), ref WriteMode);
+ ser.SyncEnum(nameof(ReadMode), ref ReadMode);
+ ser.SyncEnum(nameof(Flags), ref Flags);
ser.EndSection();
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs
index 4fad13ee29..ac07eeac62 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs
@@ -53,39 +53,39 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
}
Cpu.SyncState(ser);
- ser.BeginSection("SMS");
+ ser.BeginSection(nameof(SMS));
Vdp.SyncState(ser);
PSG.SyncState(ser);
ser.Sync("RAM", ref SystemRam, false);
- ser.Sync("RomBank0", ref RomBank0);
- ser.Sync("RomBank1", ref RomBank1);
- ser.Sync("RomBank2", ref RomBank2);
- ser.Sync("RomBank3", ref RomBank3);
- ser.Sync("Bios_bank", ref Bios_bank);
- ser.Sync("Port01", ref Port01);
- ser.Sync("Port02", ref Port02);
- ser.Sync("Port05", ref Port05);
- ser.Sync("Port3E", ref Port3E);
- ser.Sync("Port3F", ref Port3F);
- ser.Sync("Controller1SelectHigh", ref Controller1SelectHigh);
- ser.Sync("ControllerSelect2High", ref Controller2SelectHigh);
- ser.Sync("LatchLightPhaser", ref LatchLightPhaser);
- ser.Sync("start_pressed", ref start_pressed);
- ser.Sync("cntr_rd_0", ref cntr_rd_0);
- ser.Sync("cntr_rd_1", ref cntr_rd_1);
- ser.Sync("cntr_rd_2", ref cntr_rd_2);
- ser.Sync("stand_alone", ref stand_alone);
- ser.Sync("disablePSG", ref disablePSG);
- ser.Sync("sampleclock", ref sampleclock);
- ser.Sync("old_s_L", ref old_s_L);
- ser.Sync("old_s_R", ref old_s_R);
+ ser.Sync(nameof(RomBank0), ref RomBank0);
+ ser.Sync(nameof(RomBank1), ref RomBank1);
+ ser.Sync(nameof(RomBank2), ref RomBank2);
+ ser.Sync(nameof(RomBank3), ref RomBank3);
+ ser.Sync(nameof(Bios_bank), ref Bios_bank);
+ ser.Sync(nameof(Port01), ref Port01);
+ ser.Sync(nameof(Port02), ref Port02);
+ ser.Sync(nameof(Port05), ref Port05);
+ ser.Sync(nameof(Port3E), ref Port3E);
+ ser.Sync(nameof(Port3F), ref Port3F);
+ ser.Sync(nameof(Controller1SelectHigh), ref Controller1SelectHigh);
+ ser.Sync(nameof(Controller2SelectHigh), ref Controller2SelectHigh);
+ ser.Sync(nameof(LatchLightPhaser), ref LatchLightPhaser);
+ ser.Sync(nameof(start_pressed), ref start_pressed);
+ ser.Sync(nameof(cntr_rd_0), ref cntr_rd_0);
+ ser.Sync(nameof(cntr_rd_1), ref cntr_rd_1);
+ ser.Sync(nameof(cntr_rd_2), ref cntr_rd_2);
+ ser.Sync(nameof(stand_alone), ref stand_alone);
+ ser.Sync(nameof(disablePSG), ref disablePSG);
+ ser.Sync(nameof(sampleclock), ref sampleclock);
+ ser.Sync(nameof(old_s_L), ref old_s_L);
+ ser.Sync(nameof(old_s_R), ref old_s_R);
if (SaveRAM != null)
{
- ser.Sync("SaveRAM", ref SaveRAM, false);
+ ser.Sync(nameof(SaveRAM), ref SaveRAM, false);
}
- ser.Sync("SaveRamBank", ref SaveRamBank);
+ ser.Sync(nameof(SaveRamBank), ref SaveRamBank);
if (ExtRam != null)
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs
index 7051920d8d..f528652581 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs
@@ -397,20 +397,20 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
public void SyncState(Serializer ser)
{
- ser.BeginSection("VDP");
- ser.Sync("StatusByte", ref StatusByte);
+ ser.BeginSection(nameof(VDP));
+ ser.Sync(nameof(StatusByte), ref StatusByte);
ser.Sync("WaitingForLatchByte", ref VdpWaitingForLatchByte);
ser.Sync("Latch", ref VdpLatch);
ser.Sync("ReadBuffer", ref VdpBuffer);
- ser.Sync("VdpAddress", ref VdpAddress);
+ ser.Sync(nameof(VdpAddress), ref VdpAddress);
ser.Sync("Command", ref VdpCommand);
- ser.Sync("HIntPending", ref HIntPending);
- ser.Sync("VIntPending", ref VIntPending);
+ ser.Sync(nameof(HIntPending), ref HIntPending);
+ ser.Sync(nameof(VIntPending), ref VIntPending);
ser.Sync("LineIntLinesRemaining", ref lineIntLinesRemaining);
- ser.Sync("Registers", ref Registers, false);
- ser.Sync("CRAM", ref CRAM, false);
- ser.Sync("VRAM", ref VRAM, false);
- ser.Sync("HCounter", ref HCounter);
+ ser.Sync(nameof(Registers), ref Registers, false);
+ ser.Sync(nameof(CRAM), ref CRAM, false);
+ ser.Sync(nameof(VRAM), ref VRAM, false);
+ ser.Sync(nameof(HCounter), ref HCounter);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/FilePiping.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/FilePiping.cs
index 969f7b32df..62b68db8f7 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/FilePiping.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/FilePiping.cs
@@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
if (e != null)
throw new InvalidOperationException("Previous attempt failed!", e);
if (!s.CanWrite)
- throw new ArgumentException("Stream must be readable!");
+ throw new ArgumentException($"{nameof(Stream)} must be readable!");
using (var evt = new ManualResetEventSlim())
{
@@ -78,7 +78,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
if (e != null)
throw new InvalidOperationException("Previous attempt failed!", e);
if (!s.CanRead)
- throw new ArgumentException("Stream must be readable!");
+ throw new ArgumentException($"{nameof(Stream)} must be readable!");
using (var evt = new ManualResetEventSlim())
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs
index 475d1562fc..35caf3331c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs
@@ -51,7 +51,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
ControlConverter.Convert(controller, input);
if (!Core.gpgx_put_control(input, inputsize))
- throw new Exception("gpgx_put_control() failed!");
+ throw new Exception($"{nameof(Core.gpgx_put_control)}() failed!");
IsLagFrame = true;
Frame++;
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs
index c28bfe7067..2c507c30ca 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs
@@ -114,7 +114,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
}
if (!Core.gpgx_init(romextension, LoadCallback, _syncSettings.UseSixButton, system_a, system_b, _syncSettings.Region, _syncSettings.GetNativeSettings()))
- throw new Exception("gpgx_init() failed");
+ throw new Exception($"{nameof(Core.gpgx_init)}() failed");
{
int fpsnum = 60;
@@ -374,7 +374,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
{
inputsize = Marshal.SizeOf(typeof(LibGPGX.InputData));
if (!Core.gpgx_get_control(input, inputsize))
- throw new Exception("gpgx_get_control() failed");
+ throw new Exception($"{nameof(Core.gpgx_get_control)}() failed");
ControlConverter = new GPGXControlConverter(input, false); // _cds != null);
ControllerDefinition = ControlConverter.ControllerDef;
diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
index eca318a577..0b2931de02 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
@@ -840,7 +840,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
fixed (short* samples = sbuff)
{
sbuffcontains = OctoshockDll.shock_GetSamples(psx, null);
- if (sbuffcontains * 2 > sbuff.Length) throw new InvalidOperationException("shock_GetSamples returned too many samples: " + sbuffcontains);
+ if (sbuffcontains * 2 > sbuff.Length) throw new InvalidOperationException($"{nameof(OctoshockDll.shock_GetSamples)} returned too many samples: {sbuffcontains}");
OctoshockDll.shock_GetSamples(psx, samples);
}
@@ -1076,7 +1076,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
};
int result = OctoshockDll.shock_StateTransaction(psx, ref transaction);
if (result != OctoshockDll.SHOCK_OK)
- throw new InvalidOperationException("eShockStateTransaction.TextSave returned error!");
+ throw new InvalidOperationException($"{nameof(OctoshockDll.eShockStateTransaction)}.{nameof(OctoshockDll.eShockStateTransaction.TextSave)} returned error!");
s.ExtraData.IsLagFrame = IsLagFrame;
s.ExtraData.LagCount = LagCount;
@@ -1099,7 +1099,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
int result = OctoshockDll.shock_StateTransaction(psx, ref transaction);
if (result != OctoshockDll.SHOCK_OK)
- throw new InvalidOperationException("eShockStateTransaction.TextLoad returned error!");
+ throw new InvalidOperationException($"{nameof(OctoshockDll.eShockStateTransaction)}.{nameof(OctoshockDll.eShockStateTransaction.TextLoad)} returned error!");
IsLagFrame = s.ExtraData.IsLagFrame;
LagCount = s.ExtraData.LagCount;
@@ -1134,7 +1134,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
int result = OctoshockDll.shock_StateTransaction(psx, ref transaction);
if (result != OctoshockDll.SHOCK_OK)
- throw new InvalidOperationException("eShockStateTransaction.BinarySave returned error!");
+ throw new InvalidOperationException($"{nameof(OctoshockDll.eShockStateTransaction)}.{nameof(OctoshockDll.eShockStateTransaction.BinarySave)} returned error!");
writer.Write(savebuff.Length);
writer.Write(savebuff);
@@ -1164,7 +1164,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
reader.Read(savebuff, 0, length);
int ret = OctoshockDll.shock_StateTransaction(psx, ref transaction);
if (ret != OctoshockDll.SHOCK_OK)
- throw new InvalidOperationException("eShockStateTransaction.BinaryLoad returned error!");
+ throw new InvalidOperationException($"{nameof(OctoshockDll.eShockStateTransaction)}.{nameof(OctoshockDll.eShockStateTransaction.BinaryLoad)} returned error!");
// other variables
IsLagFrame = reader.ReadBoolean();
diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISaveRam.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISaveRam.cs
index 0c83a13649..6ff43e6c6c 100644
--- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISaveRam.cs
+++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISaveRam.cs
@@ -20,14 +20,14 @@ namespace BizHawk.Emulation.Cores.WonderSwan
public byte[] CloneSaveRam()
{
if (!BizSwan.bizswan_saveramsave(Core, saverambuff, saverambuff.Length))
- throw new InvalidOperationException("bizswan_saveramsave() returned false!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_saveramsave)}() returned false!");
return (byte[])saverambuff.Clone();
}
public void StoreSaveRam(byte[] data)
{
if (!BizSwan.bizswan_saveramload(Core, data, data.Length))
- throw new InvalidOperationException("bizswan_saveramload() returned false!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_saveramload)}() returned false!");
}
public bool SaveRamModified
diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.IStatable.cs
index a228dbb8ae..eb25855adf 100644
--- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.IStatable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.IStatable.cs
@@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
public void SaveStateBinary(BinaryWriter writer)
{
if (!BizSwan.bizswan_binstatesave(Core, savebuff, savebuff.Length))
- throw new InvalidOperationException("bizswan_binstatesave() returned false!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_binstatesave)}() returned false!");
writer.Write(savebuff.Length);
writer.Write(savebuff);
@@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
throw new InvalidOperationException("Save buffer size mismatch!");
reader.Read(savebuff, 0, length);
if (!BizSwan.bizswan_binstateload(Core, savebuff, savebuff.Length))
- throw new InvalidOperationException("bizswan_binstateload() returned false!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_binstateload)}() returned false!");
var d = BinaryQuickSerializer.Create(reader);
LoadTextStateData(d);
diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs
index b5224065ea..4068514676 100644
--- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs
+++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs
@@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
DeterministicEmulation = deterministic; // when true, remember to force the RTC flag!
Core = BizSwan.bizswan_new();
if (Core == IntPtr.Zero)
- throw new InvalidOperationException("bizswan_new() returned NULL!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_new)}() returned NULL!");
try
{
var ss = _SyncSettings.GetNativeSettings();
@@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
bool rotate = false;
if (!BizSwan.bizswan_load(Core, file, file.Length, ref ss, ref rotate))
- throw new InvalidOperationException("bizswan_load() returned FALSE!");
+ throw new InvalidOperationException($"{nameof(BizSwan.bizswan_load)}() returned FALSE!");
InitISaveRam();
diff --git a/BizHawk.Emulation.Cores/CoreInventory.cs b/BizHawk.Emulation.Cores/CoreInventory.cs
index 12de472ea6..9f5a5aa905 100644
--- a/BizHawk.Emulation.Cores/CoreInventory.cs
+++ b/BizHawk.Emulation.Cores/CoreInventory.cs
@@ -178,7 +178,7 @@ namespace BizHawk.Emulation.Cores
{
var coreattr = typ.GetCustomAttributes(typeof(CoreAttribute), false);
if (coreattr.Length != 1)
- throw new InvalidOperationException(string.Format("IEmulator {0} without CoreAttributes!", typ));
+ throw new InvalidOperationException($"{nameof(IEmulator)} {typ} without {nameof(CoreAttribute)}s!");
var cons = typ.GetConstructors(BindingFlags.Public | BindingFlags.Instance)
.Where(c => c.GetCustomAttributes(typeof(CoreConstructorAttribute), false).Length > 0).ToList();
foreach(var con in cons)
diff --git a/BizHawk.Emulation.Cores/Sound/CDAudio.cs b/BizHawk.Emulation.Cores/Sound/CDAudio.cs
index c2016f2ff0..db892d3901 100644
--- a/BizHawk.Emulation.Cores/Sound/CDAudio.cs
+++ b/BizHawk.Emulation.Cores/Sound/CDAudio.cs
@@ -229,17 +229,17 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.BeginSection("CDAudio");
- ser.Sync("Mode", ref Mode);
- ser.Sync("PlayMode", ref PlayMode);
- ser.Sync("LogicalVolume", ref LogicalVolume);
- ser.Sync("StartLBA", ref StartLBA);
- ser.Sync("EndLBA", ref EndLBA);
- ser.Sync("PlayingTrack", ref PlayingTrack);
- ser.Sync("CurrentSector", ref CurrentSector);
- ser.Sync("SectorOffset", ref SectorOffset);
- ser.Sync("FadeOutOverFrames", ref FadeOutOverFrames);
- ser.Sync("FadeOutFramesRemaining", ref FadeOutFramesRemaining);
+ ser.BeginSection(nameof(CDAudio));
+ ser.Sync(nameof(Mode), ref Mode);
+ ser.Sync(nameof(PlayMode), ref PlayMode);
+ ser.Sync(nameof(LogicalVolume), ref LogicalVolume);
+ ser.Sync(nameof(StartLBA), ref StartLBA);
+ ser.Sync(nameof(EndLBA), ref EndLBA);
+ ser.Sync(nameof(PlayingTrack), ref PlayingTrack);
+ ser.Sync(nameof(CurrentSector), ref CurrentSector);
+ ser.Sync(nameof(SectorOffset), ref SectorOffset);
+ ser.Sync(nameof(FadeOutOverFrames), ref FadeOutOverFrames);
+ ser.Sync(nameof(FadeOutFramesRemaining), ref FadeOutFramesRemaining);
ser.EndSection();
if (ser.IsReader)
diff --git a/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs b/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs
index 0aa5cac72f..4c008a551a 100644
--- a/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs
+++ b/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs
@@ -227,28 +227,28 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
ser.BeginSection("PSG");
- ser.Sync("MainVolumeLeft", ref MainVolumeLeft);
- ser.Sync("MainVolumeRight", ref MainVolumeRight);
- ser.Sync("VoiceLatch", ref VoiceLatch);
- ser.Sync("WaveTableWriteOffset", ref WaveTableWriteOffset);
+ ser.Sync(nameof(MainVolumeLeft), ref MainVolumeLeft);
+ ser.Sync(nameof(MainVolumeRight), ref MainVolumeRight);
+ ser.Sync(nameof(VoiceLatch), ref VoiceLatch);
+ ser.Sync(nameof(WaveTableWriteOffset), ref WaveTableWriteOffset);
for (int i = 0; i < 6; i++)
{
ser.BeginSection("Channel"+i);
- ser.Sync("Frequency", ref Channels[i].Frequency);
- ser.Sync("Panning", ref Channels[i].Panning);
- ser.Sync("Volume", ref Channels[i].Volume);
- ser.Sync("Enabled", ref Channels[i].Enabled);
+ ser.Sync(nameof(PSGChannel.Frequency), ref Channels[i].Frequency);
+ ser.Sync(nameof(PSGChannel.Panning), ref Channels[i].Panning);
+ ser.Sync(nameof(PSGChannel.Volume), ref Channels[i].Volume);
+ ser.Sync(nameof(PSGChannel.Enabled), ref Channels[i].Enabled);
if (i.In(4, 5))
{
- ser.Sync("NoiseChannel", ref Channels[i].NoiseChannel);
- ser.Sync("NoiseFreq", ref Channels[i].NoiseFreq);
+ ser.Sync(nameof(PSGChannel.NoiseChannel), ref Channels[i].NoiseChannel);
+ ser.Sync(nameof(PSGChannel.NoiseFreq), ref Channels[i].NoiseFreq);
}
- ser.Sync("DDA", ref Channels[i].DDA);
- ser.Sync("DDAValue", ref Channels[i].DDAValue);
- ser.Sync("SampleOffset", ref Channels[i].SampleOffset);
- ser.Sync("Wave", ref Channels[i].Wave, false);
+ ser.Sync(nameof(PSGChannel.DDA), ref Channels[i].DDA);
+ ser.Sync(nameof(PSGChannel.DDAValue), ref Channels[i].DDAValue);
+ ser.Sync(nameof(PSGChannel.SampleOffset), ref Channels[i].SampleOffset);
+ ser.Sync(nameof(PSGChannel.Wave), ref Channels[i].Wave, false);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Sound/MMC5Audio.cs b/BizHawk.Emulation.Cores/Sound/MMC5Audio.cs
index ed81b55961..559ed36672 100644
--- a/BizHawk.Emulation.Cores/Sound/MMC5Audio.cs
+++ b/BizHawk.Emulation.Cores/Sound/MMC5Audio.cs
@@ -50,20 +50,20 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.Sync("V", ref V);
- ser.Sync("T", ref T);
- ser.Sync("L", ref L);
- ser.Sync("D", ref D);
- ser.Sync("LenCntDisable", ref LenCntDisable);
- ser.Sync("ConstantVolume", ref ConstantVolume);
- ser.Sync("Enable", ref Enable);
- ser.Sync("estart", ref estart);
- ser.Sync("etime", ref etime);
- ser.Sync("ecount", ref ecount);
- ser.Sync("length", ref length);
- ser.Sync("sequence", ref sequence);
- ser.Sync("clock", ref clock);
- ser.Sync("output", ref output);
+ ser.Sync(nameof(V), ref V);
+ ser.Sync(nameof(T), ref T);
+ ser.Sync(nameof(L), ref L);
+ ser.Sync(nameof(D), ref D);
+ ser.Sync(nameof(LenCntDisable), ref LenCntDisable);
+ ser.Sync(nameof(ConstantVolume), ref ConstantVolume);
+ ser.Sync(nameof(Enable), ref Enable);
+ ser.Sync(nameof(estart), ref estart);
+ ser.Sync(nameof(etime), ref etime);
+ ser.Sync(nameof(ecount), ref ecount);
+ ser.Sync(nameof(length), ref length);
+ ser.Sync(nameof(sequence), ref sequence);
+ ser.Sync(nameof(clock), ref clock);
+ ser.Sync(nameof(output), ref output);
}
public void Write0(byte val)
@@ -265,19 +265,19 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.BeginSection("MMC5Audio");
- ser.Sync("frame", ref frame);
+ ser.BeginSection(nameof(MMC5Audio));
+ ser.Sync(nameof(frame), ref frame);
ser.BeginSection("Pulse0");
pulse[0].SyncState(ser);
ser.EndSection();
ser.BeginSection("Pulse1");
pulse[1].SyncState(ser);
ser.EndSection();
- ser.Sync("PCMRead", ref PCMRead);
- ser.Sync("PCMEnableIRQ", ref PCMEnableIRQ);
- ser.Sync("PCMIRQTriggered", ref PCMIRQTriggered);
- ser.Sync("PCMVal", ref PCMVal);
- ser.Sync("PCMNextVal", ref PCMNextVal);
+ ser.Sync(nameof(PCMRead), ref PCMRead);
+ ser.Sync(nameof(PCMEnableIRQ), ref PCMEnableIRQ);
+ ser.Sync(nameof(PCMIRQTriggered), ref PCMIRQTriggered);
+ ser.Sync(nameof(PCMVal), ref PCMVal);
+ ser.Sync(nameof(PCMNextVal), ref PCMNextVal);
ser.EndSection();
if (ser.IsReader)
RaiseIRQ(PCMEnableIRQ && PCMIRQTriggered);
diff --git a/BizHawk.Emulation.Cores/Sound/SN76489sms.cs b/BizHawk.Emulation.Cores/Sound/SN76489sms.cs
index 2d04ccd233..1cc1bc0de7 100644
--- a/BizHawk.Emulation.Cores/Sound/SN76489sms.cs
+++ b/BizHawk.Emulation.Cores/Sound/SN76489sms.cs
@@ -74,39 +74,39 @@ namespace BizHawk.Emulation.Cores.Components
{
ser.BeginSection("SN76489");
- ser.Sync("Chan_vol", ref Chan_vol, false);
- ser.Sync("Chan_tone", ref Chan_tone, false);
+ ser.Sync(nameof(Chan_vol), ref Chan_vol, false);
+ ser.Sync(nameof(Chan_tone), ref Chan_tone, false);
- ser.Sync("Chan_sel", ref chan_sel);
- ser.Sync("vol_tone", ref vol_tone);
- ser.Sync("noise_type", ref noise_type);
- ser.Sync("noise_rate", ref noise_rate);
+ ser.Sync(nameof(chan_sel), ref chan_sel);
+ ser.Sync(nameof(vol_tone), ref vol_tone);
+ ser.Sync(nameof(noise_type), ref noise_type);
+ ser.Sync(nameof(noise_rate), ref noise_rate);
- ser.Sync("Clock_A", ref clock_A);
- ser.Sync("Clock_B", ref clock_B);
- ser.Sync("Clock_C", ref clock_C);
- ser.Sync("noise_clock", ref noise_clock);
- ser.Sync("noise_bit", ref noise_bit);
+ ser.Sync(nameof(clock_A), ref clock_A);
+ ser.Sync(nameof(clock_B), ref clock_B);
+ ser.Sync(nameof(clock_C), ref clock_C);
+ ser.Sync(nameof(noise_clock), ref noise_clock);
+ ser.Sync(nameof(noise_bit), ref noise_bit);
- ser.Sync("psg_clock", ref psg_clock);
+ ser.Sync(nameof(psg_clock), ref psg_clock);
- ser.Sync("A_up", ref A_up);
- ser.Sync("B_up", ref B_up);
- ser.Sync("C_up", ref C_up);
- ser.Sync("noise", ref noise);
+ ser.Sync(nameof(A_up), ref A_up);
+ ser.Sync(nameof(B_up), ref B_up);
+ ser.Sync(nameof(C_up), ref C_up);
+ ser.Sync(nameof(noise), ref noise);
- ser.Sync("A_L", ref A_L);
- ser.Sync("B_L", ref B_L);
- ser.Sync("C_L", ref C_L);
- ser.Sync("noise_L", ref noise_L);
- ser.Sync("A_L", ref A_R);
- ser.Sync("B_L", ref B_R);
- ser.Sync("C_L", ref C_R);
- ser.Sync("noise_L", ref noise_R);
+ ser.Sync(nameof(A_L), ref A_L);
+ ser.Sync(nameof(B_L), ref B_L);
+ ser.Sync(nameof(C_L), ref C_L);
+ ser.Sync(nameof(noise_L), ref noise_L);
+ ser.Sync(nameof(A_L), ref A_R);
+ ser.Sync(nameof(B_L), ref B_R);
+ ser.Sync(nameof(C_L), ref C_R);
+ ser.Sync(nameof(noise_L), ref noise_R);
- ser.Sync("current_sample_L", ref current_sample_L);
- ser.Sync("current_sample_R", ref current_sample_R);
- ser.Sync("stereo_panning", ref stereo_panning);
+ ser.Sync(nameof(current_sample_L), ref current_sample_L);
+ ser.Sync(nameof(current_sample_R), ref current_sample_R);
+ ser.Sync(nameof(stereo_panning), ref stereo_panning);
ser.EndSection();
}
diff --git a/BizHawk.Emulation.Cores/Sound/Sunsoft5BAudio.cs b/BizHawk.Emulation.Cores/Sound/Sunsoft5BAudio.cs
index 7b06cc59cb..a33fea9559 100644
--- a/BizHawk.Emulation.Cores/Sound/Sunsoft5BAudio.cs
+++ b/BizHawk.Emulation.Cores/Sound/Sunsoft5BAudio.cs
@@ -26,12 +26,12 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.Sync("Period", ref Period);
- ser.Sync("Disable", ref Disable);
- ser.Sync("Volume", ref Volume);
- ser.Sync("clock", ref clock);
- ser.Sync("sequence", ref sequence);
- ser.Sync("output", ref output);
+ ser.Sync(nameof(Period), ref Period);
+ ser.Sync(nameof(Disable), ref Disable);
+ ser.Sync(nameof(Volume), ref Volume);
+ ser.Sync(nameof(clock), ref clock);
+ ser.Sync(nameof(sequence), ref sequence);
+ ser.Sync(nameof(output), ref output);
}
public Pulse(Action SendDiff)
@@ -122,8 +122,8 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.BeginSection("Sunsoft5BAudio");
- ser.Sync("RegNum", ref RegNum);
+ ser.BeginSection(nameof(Sunsoft5BAudio));
+ ser.Sync(nameof(RegNum), ref RegNum);
for (int i = 0; i < pulse.Length; i++)
{
ser.BeginSection("Pulse" + i);
diff --git a/BizHawk.Emulation.Cores/Sound/VRC6Alt.cs b/BizHawk.Emulation.Cores/Sound/VRC6Alt.cs
index 57e0cbb980..756982d66b 100644
--- a/BizHawk.Emulation.Cores/Sound/VRC6Alt.cs
+++ b/BizHawk.Emulation.Cores/Sound/VRC6Alt.cs
@@ -44,8 +44,8 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.BeginSection("VRC6Alt");
- ser.Sync("masterenable", ref masterenable);
+ ser.BeginSection(nameof(VRC6Alt));
+ ser.Sync(nameof(masterenable), ref masterenable);
ser.BeginSection("Pulse1");
pulse1.SyncState(ser);
ser.EndSection();
@@ -135,14 +135,14 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.Sync("A", ref A);
- ser.Sync("F", ref F);
- ser.Sync("E", ref E);
- ser.Sync("RSHIFT", ref RSHIFT);
- ser.Sync("count", ref count);
- ser.Sync("accum", ref accum);
- ser.Sync("acount", ref acount);
- ser.Sync("output", ref output);
+ ser.Sync(nameof(A), ref A);
+ ser.Sync(nameof(F), ref F);
+ ser.Sync(nameof(E), ref E);
+ ser.Sync(nameof(RSHIFT), ref RSHIFT);
+ ser.Sync(nameof(count), ref count);
+ ser.Sync(nameof(accum), ref accum);
+ ser.Sync(nameof(acount), ref acount);
+ ser.Sync(nameof(output), ref output);
}
public void Write0(byte value)
@@ -247,14 +247,14 @@ namespace BizHawk.Emulation.Cores.Components
public void SyncState(Serializer ser)
{
- ser.Sync("V", ref V);
- ser.Sync("D", ref D);
- ser.Sync("F", ref F);
- ser.Sync("E", ref E);
- ser.Sync("RSHIFT", ref RSHIFT);
- ser.Sync("count", ref count);
- ser.Sync("duty", ref duty);
- ser.Sync("output", ref output);
+ ser.Sync(nameof(V), ref V);
+ ser.Sync(nameof(D), ref D);
+ ser.Sync(nameof(F), ref F);
+ ser.Sync(nameof(E), ref E);
+ ser.Sync(nameof(RSHIFT), ref RSHIFT);
+ ser.Sync(nameof(count), ref count);
+ ser.Sync(nameof(duty), ref duty);
+ ser.Sync(nameof(output), ref output);
}
public void Write0(byte value)
diff --git a/BizHawk.Emulation.Cores/Sound/YM2413.cs b/BizHawk.Emulation.Cores/Sound/YM2413.cs
index f0d961f8f7..91268635e9 100644
--- a/BizHawk.Emulation.Cores/Sound/YM2413.cs
+++ b/BizHawk.Emulation.Cores/Sound/YM2413.cs
@@ -39,8 +39,8 @@ namespace BizHawk.Emulation.Common.Components
public void SyncState(Serializer ser)
{
- ser.BeginSection("YM2413");
- ser.Sync("RegisterLatch", ref RegisterLatch);
+ ser.BeginSection(nameof(YM2413));
+ ser.Sync(nameof(RegisterLatch), ref RegisterLatch);
ser.Sync("Registers", ref opll.reg, false);
ser.EndSection();
diff --git a/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs b/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs
index 3ae6e57a7c..499988bc35 100644
--- a/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs
+++ b/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs
@@ -6,8 +6,8 @@ using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Runtime.InteropServices;
-using BizHawk.Common.BizInvoke;
-
+using BizHawk.Common.BizInvoke;
+
namespace BizHawk.Emulation.Cores.Waterbox
{
///
@@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
_pages = (MemoryBlock.Protection[])(object)_pagesAsBytes;
for (var i = 0; i < _pages.Length; i++)
_pages[i] = FREE;
- Console.WriteLine("Created mapheap `{1}` at {0:x16}:{2:x16}", start, name, start + size);
+ Console.WriteLine($"Created {nameof(MapHeap)} `{name}` at {start:x16}:{start + size:x16}");
}
// find consecutive unused pages to map
@@ -294,14 +294,14 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
var name = br.ReadString();
if (name != Name)
- throw new InvalidOperationException(string.Format("Name did not match for mapheap {0}", Name));
+ throw new InvalidOperationException($"Name did not match for {nameof(MapHeap)} {Name}");
var size = br.ReadUInt64();
if (size != Memory.Size)
- throw new InvalidOperationException(string.Format("Size did not match for mapheap {0}", Name));
+ throw new InvalidOperationException($"Size did not match for {nameof(MapHeap)} {Name}");
var used = br.ReadUInt64();
var hash = br.ReadBytes(Memory.XorHash.Length);
if (!hash.SequenceEqual(Memory.XorHash))
- throw new InvalidOperationException(string.Format("Hash did not match for mapheap {0}. Is this the same rom?", Name));
+ throw new InvalidOperationException($"Hash did not match for {nameof(MapHeap)} {Name}. Is this the same rom?");
if (br.BaseStream.Read(_pagesAsBytes, 0, _pagesAsBytes.Length) != _pagesAsBytes.Length)
throw new InvalidOperationException("Unexpected error reading!");
diff --git a/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs b/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs
index fdb242e35a..d81aac84be 100644
--- a/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs
+++ b/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs
@@ -1217,7 +1217,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
// if a different runtime instance than this one saved the state,
// Exvoker imports need to be reconnected
- Console.WriteLine("Restoring PeRunner state from a different core...");
+ Console.WriteLine($"Restoring {nameof(PeRunner)} state from a different core...");
ConnectAllImports();
_psx.ReloadVtables();
}
diff --git a/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs b/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs
index 8f2e5d3d28..9f4854b8ba 100644
--- a/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs
+++ b/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs
@@ -333,7 +333,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
public void SealImportsAndTakeXorSnapshot()
{
if (_everythingSealed)
- throw new InvalidOperationException("PeWrapper already sealed!");
+ throw new InvalidOperationException($"{nameof(PeWrapper)} already sealed!");
// save import values, then zero them all (for hash purposes), then take our snapshot, then load them again,
// then set the .idata area to read only