diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
index 34d802312c..22f90619b4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs
@@ -75,9 +75,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
//register 0:
public int chr_mode;
public int prg_mode;
- public int prg_slot; //complicated
+ public int prg_slot; // complicated
public NES.NESBoardBase.EMirrorType mirror;
- static NES.NESBoardBase.EMirrorType[] _mirrorTypes = new NES.NESBoardBase.EMirrorType[] { NES.NESBoardBase.EMirrorType.OneScreenA, NES.NESBoardBase.EMirrorType.OneScreenB, NES.NESBoardBase.EMirrorType.Vertical, NES.NESBoardBase.EMirrorType.Horizontal };
+ static readonly NES.NESBoardBase.EMirrorType[] _mirrorTypes =
+ {
+ NES.NESBoardBase.EMirrorType.OneScreenA,
+ NES.NESBoardBase.EMirrorType.OneScreenB,
+ NES.NESBoardBase.EMirrorType.Vertical,
+ NES.NESBoardBase.EMirrorType.Horizontal
+ };
//register 1,2:
int chr_0, chr_1;
@@ -87,8 +93,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
int prg;
//regenerable state
- IntBuffer chr_banks_4k = new IntBuffer(2);
- IntBuffer prg_banks_16k = new IntBuffer(2);
+ readonly IntBuffer chr_banks_4k = new IntBuffer(2);
+ readonly IntBuffer prg_banks_16k = new IntBuffer(2);
public class MMC1_SerialController
{
@@ -117,8 +123,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
shift_count = 0;
shift_val = 0;
- if (Reset != null)
- Reset();
+ Reset?.Invoke();
}
else
{
@@ -178,7 +183,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
break;
case 3: //E000-FFFF
prg = value & 0xF;
- wram_disable = value.Bit(4) ? true : false;
+ wram_disable = value.Bit(4);
break;
}
//board.NES.LogLine("mapping.. chr_mode={0}, chr={1},{2}", chr_mode, chr_0, chr_1);
@@ -227,16 +232,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public int Get_PRGBank(int addr)
{
- int bank_16k = addr >> 14;
- bank_16k = prg_banks_16k[bank_16k];
- return bank_16k;
+ return prg_banks_16k[addr >> 14];
}
public int Get_CHRBank_4K(int addr)
{
- int bank_4k = addr >> 12;
- bank_4k = chr_banks_4k[bank_4k];
- return bank_4k;
+ return chr_banks_4k[addr >> 12];
}
}
@@ -279,8 +280,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
if (!disablemirror)
SetMirrorType(mmc1.mirror); //often redundant, but gets the job done
}
-
-
}
public override byte ReadWRAM(int addr)
@@ -314,8 +313,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override byte ReadPPU(int addr)
{
-
-
if (addr < 0x2000)
{
if (_is_snrom)
@@ -355,8 +352,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public override void WritePPU(int addr, byte value)
{
-
-
if (NES._isVS)
{
if (addr < 0x2000)
@@ -555,7 +550,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
}
} //class SxROM
-
class SoROM : SuROM
{
//this uses a CHR bit to select WRAM banks
@@ -639,7 +633,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
}
}
-
class SuROM : SxROM
{
public override bool Configure(NES.EDetectionOrigin origin)
@@ -681,5 +674,4 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
return ROM[addr];
}
}
-
}
diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings
index 33207db7ed..a365a0b643 100644
--- a/BizHawk.sln.DotSettings
+++ b/BizHawk.sln.DotSettings
@@ -168,5 +168,10 @@
LIVE_MONITOR
LIVE_MONITOR
DO_NOTHING
- LIVE_MONITOR
+ LIVE_MONITOR
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file