diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs index 1699e2d2ec..ee1267a5fd 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs @@ -60,18 +60,15 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 // keeps track of tia cycles, 3 cycles per CPU cycle private int cyc_counter; - private static MapperBase SetMultiCartMapper(int romLength, int gameTotal) + private MapperBase SetMultiCartMapper(int romLength, int gameTotal) { - switch (romLength / gameTotal) + return (romLength / gameTotal) switch { - case 1024 * 2: // 2K - return new Multicart2K(gameTotal); - default: - case 1024 * 4: // 4K - return new Multicart4K(gameTotal); - case 1024 * 8: // 8K - return new Multicart8K(gameTotal); - } + 1024 * 2 => new Multicart2K(this, gameTotal), + 1024 * 4 => new Multicart4K(this, gameTotal), + 1024 * 8 => new Multicart8K(this, gameTotal), + _ => new Multicart4K(this, gameTotal) + }; } internal byte BaseReadMemory(ushort addr) @@ -199,123 +196,47 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private void RebootCore() { // Regenerate mapper here to make sure its state is entirely clean - switch (_game.GetOptionsDict()["m"]) + _mapper = _game.GetOptionsDict()["m"] switch { - case "2IN1": - _mapper = SetMultiCartMapper(Rom.Length, 2); - break; - case "4IN1": - _mapper = SetMultiCartMapper(Rom.Length, 4); - break; - case "8IN1": - _mapper = SetMultiCartMapper(Rom.Length, 8); - break; - case "16IN1": - _mapper = SetMultiCartMapper(Rom.Length, 16); - break; - case "32IN1": - _mapper = SetMultiCartMapper(Rom.Length, 32); - break; - case "AR": - _mapper = new mAR(this); // This mapper has to set up configurations in the contructor. - break; - case "4K": - _mapper = new m4K(); - break; - case "2K": - _mapper = new m2K(); - break; - case "CM": - _mapper = new mCM(); - break; - case "CV": - _mapper = new mCV(); - break; - case "DPC": - _mapper = new mDPC(); - break; - case "DPC+": - _mapper = new mDPCPlus(); - break; - case "F8": - _mapper = new mF8(); - break; - case "F8SC": - _mapper = new mF8SC(); - break; - case "F6": - _mapper = new mF6(); - break; - case "F6SC": - _mapper = new mF6SC(); - break; - case "F4": - _mapper = new mF4(); - break; - case "F4SC": - _mapper = new mF4SC(); - break; - case "FE": - _mapper = new mFE(); - break; - case "E0": - _mapper = new mE0(); - break; - case "3F": - _mapper = new m3F(); - break; - case "FA": - _mapper = new mFA(); - break; - case "FA2": - _mapper = new mFA2(); - break; - case "E7": - _mapper = new mE7(); - break; - case "F0": - _mapper = new mF0(); - break; - case "UA": - _mapper = new mUA(); - break; - - // Special Sega Mapper which has swapped banks - case "F8_sega": - _mapper = new mF8_sega(); - break; + "2IN1" => SetMultiCartMapper(Rom.Length, 2), + "4IN1" => SetMultiCartMapper(Rom.Length, 4), + "8IN1" => SetMultiCartMapper(Rom.Length, 8), + "16IN1" => SetMultiCartMapper(Rom.Length, 16), + "32IN1" => SetMultiCartMapper(Rom.Length, 32), + "AR" => new mAR(this), + "4K" => new m4K(this), + "2K" => new m2K(this), + "CM" => new mCM(this), + "CV" => new mCV(this), + "DPC" => new mDPC(this), + "DPC+" => new mDPCPlus(this), + "F8" => new mF8(this), + "F8SC" => new mF8SC(this), + "F6" => new mF6(this), + "F6SC" => new mF6SC(this), + "F4" => new mF4(this), + "F4SC" => new mF4SC(this), + "FE" => new mFE(this), + "E0" => new mE0(this), + "3F" => new m3F(this), + "FA" => new mFA(this), + "FA2" => new mFA2(this), + "E7" => new mE7(this), + "F0" => new mF0(this), + "UA" => new mUA(this), + "F8_sega" => new mF8_sega(this), // Homebrew mappers - case "3E": - _mapper = new m3E(); - break; - case "0840": - _mapper = new m0840(); - break; - case "MC": - _mapper = new mMC(); - break; - case "EF": - _mapper = new mEF(); - break; - case "EFSC": - _mapper = new mEFSC(); - break; - case "X07": - _mapper = new mX07(); - break; - case "4A50": - _mapper = new m4A50(); - break; - case "SB": - _mapper = new mSB(); - break; - - default: - throw new InvalidOperationException("mapper not supported: " + _game.GetOptionsDict()["m"]); - } - - _mapper.Core = this; + "3E" => new m3E(this), + "0840" => new m0840(this), + "MC" => new mMC(this), + "EF" => new mEF(this), + "EFSC" => new mEFSC(this), + "X07" => new mX07(this), + "4A50" => new m4A50(this), + "SB" => new mSB(this), + _ => throw new InvalidOperationException("mapper not supported: " + _game.GetOptionsDict()["m"]) + }; _lagCount = 0; Cpu = new MOS6502X(new CpuLink(this)); @@ -342,7 +263,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 HardReset(); - // Show mapper class on romstatusdetails RomDetails = $"{_game.Name}\r\nSHA1:{Rom.HashSHA1()}\r\nMD5:{Rom.HashMD5()}\r\nMapper Impl \"{_mapper.GetType()}\""; // Some games (ex. 3D tic tac toe), turn off the screen for extended periods, so we need to allow for this here. diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/MapperBase.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/MapperBase.cs index ab0116ae2e..a91421c1a8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/MapperBase.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/MapperBase.cs @@ -4,29 +4,26 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { public class MapperBase { - public Atari2600 Core { get; set; } + public MapperBase(Atari2600 core) + { + Core = core; + } + + protected readonly Atari2600 Core; public virtual byte[] CartRam => new byte[0]; public virtual byte ReadMemory(ushort addr) - { - return Core.BaseReadMemory(addr); - } + => Core.BaseReadMemory(addr); public virtual byte PeekMemory(ushort addr) - { - return Core.BasePeekMemory(addr); - } + => Core.BasePeekMemory(addr); public virtual void WriteMemory(ushort addr, byte value) - { - Core.BaseWriteMemory(addr, value); - } + => Core.BaseWriteMemory(addr, value); public virtual void PokeMemory(ushort addr, byte value) - { - Core.BasePokeMemory(addr, value); - } + => Core.BasePokeMemory(addr, value); public virtual void SyncState(Serializer ser) { diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart2K.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart2K.cs index f98905f8d4..ade1261eba 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart2K.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart2K.cs @@ -10,7 +10,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _gameTotal; private int _currentGame; - public Multicart2K(int gameTotal) + public Multicart2K(Atari2600 core, int gameTotal) + : base(core) { _gameTotal = gameTotal; _currentGame = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart4K.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart4K.cs index 2ae332d828..e28ed8153e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart4K.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart4K.cs @@ -10,7 +10,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _gameTotal; private int _currentGame; - public Multicart4K(int gameTotal) + public Multicart4K(Atari2600 core, int gameTotal) + : base(core) { _gameTotal = gameTotal; _currentGame = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart8K.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart8K.cs index b7aac4dc1e..fd2612e641 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart8K.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/Multicart8K.cs @@ -12,7 +12,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _gameTotal; private int _currentGame; - public Multicart8K(int gameTotal) + public Multicart8K(Atari2600 core, int gameTotal) + : base(core) { _gameTotal = gameTotal; _currentGame = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m0840.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m0840.cs index e6ae90984d..ab36f1637d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m0840.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m0840.cs @@ -23,6 +23,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class m0840 : MapperBase { + public m0840(Atari2600 core) : base(core) + { + } + private int _bank4K; public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m2K.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m2K.cs index 94dfc502a0..701f8a595b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m2K.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m2K.cs @@ -2,6 +2,10 @@ { internal class m2K : MapperBase { + public m2K(Atari2600 core) : base(core) + { + } + public override byte ReadMemory(ushort addr) { if (addr < 0x1000) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3E.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3E.cs index 14d73498cc..4ef09e19c3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3E.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3E.cs @@ -22,6 +22,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class m3E : MapperBase { + public m3E(Atari2600 core) : base(core) + { + } + private int _lowbank2K; private int _rambank1K; private bool _hasRam; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3F.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3F.cs index bc23b12875..5f2bf09f8a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3F.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m3F.cs @@ -23,6 +23,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class m3F : MapperBase { + public m3F(Atari2600 core) : base(core) + { + } + private int _lowbank2K; public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4A50.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4A50.cs index 115ece1869..dd727e07a2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4A50.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4A50.cs @@ -43,6 +43,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class m4A50 : MapperBase { + public m4A50(Atari2600 core) : base(core) + { + } + private byte[] _ram = new byte[32768]; private byte _lastData = 0xFF; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4K.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4K.cs index 44f9bef985..feba337201 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4K.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/m4K.cs @@ -2,6 +2,10 @@ { internal class m4K : MapperBase { + public m4K(Atari2600 core) : base(core) + { + } + public override byte ReadMemory(ushort addr) { if (addr < 0x1000) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs index 15b46362b9..fa0e034daa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs @@ -33,9 +33,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { internal class mAR : MapperBase { - public mAR(Atari2600 core) + public mAR(Atari2600 core) : base(core) { - Core = core; InitializeSettings(); } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCM.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCM.cs index 8b576f71b9..86b781337a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCM.cs @@ -179,6 +179,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mCM : MapperBase { + public mCM(Atari2600 core) : base(core) + { + } + // TODO: PokeMem private byte[] _ram = new byte[2048]; private int _bank4K = 3; // On Start up, controller port is all 1's, so start on the last bank, flags enabled diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCV.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCV.cs index 35b7d1a992..5947f62757 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCV.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mCV.cs @@ -17,6 +17,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mCV : MapperBase { + public mCV(Atari2600 core) : base(core) + { + } + private byte[] _ram = new byte[1024]; public override byte[] CartRam => _ram; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPC.cs index 89ed8c7749..1fb081a310 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPC.cs @@ -225,6 +225,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mDPC : MapperBase { + public mDPC(Atari2600 core) : base(core) + { + } + // Table for computing the input bit of the random number generator's // shift register (it's the NOT of the EOR of four bits) private readonly byte[] _randomInputBits = { 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1 }; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPCPlus.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPCPlus.cs index 40537e32e1..f8962c29a8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPCPlus.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mDPCPlus.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mDPCPlus : MapperBase { // TODO: PokeMem, and everything else - public mDPCPlus() + public mDPCPlus(Atari2600 core) : base(core) { throw new NotImplementedException(); } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE0.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE0.cs index 3e79c1bedb..04a0941117 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE0.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE0.cs @@ -25,6 +25,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mE0 : MapperBase { + public mE0(Atari2600 core) : base(core) + { + } + private int _toggle1; private int _toggle2; private int _toggle3; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE7.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE7.cs index 2f4e251d4d..cfac7bd5dc 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE7.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mE7.cs @@ -36,6 +36,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private bool _enableRam0; + public mE7(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEF.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEF.cs index 8edd72cf65..b32c627cb4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEF.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEF.cs @@ -16,6 +16,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { private int _toggle; + public mEF(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEFSC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEFSC.cs index 03784243db..fe56954157 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEFSC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mEFSC.cs @@ -9,6 +9,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mEFSC : MapperBase { + public mEFSC(Atari2600 core) : base(core) + { + } + private int _bank4k; private byte[] _ram = new byte[128]; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF0.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF0.cs index a46bb897be..c1e6328f84 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF0.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF0.cs @@ -22,6 +22,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { private int _bank; + public mF0(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4.cs index 22d395cf16..56a48af6a4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4.cs @@ -14,6 +14,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { private int _toggle; + public mF4(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4SC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4SC.cs index d557160f48..38506d9312 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4SC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF4SC.cs @@ -11,6 +11,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _bank4k; private byte[] _ram = new byte[128]; + public mF4SC(Atari2600 core) : base(core) + { + } + public override byte[] CartRam => _ram; public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6.cs index 4206b25ca5..0ca2abd16e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6.cs @@ -13,6 +13,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mF6 : MapperBase { + public mF6(Atari2600 core) : base(core) + { + } + private int _toggle; public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6SC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6SC.cs index a9020458a0..8d1283634c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6SC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF6SC.cs @@ -8,6 +8,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mF6SC : MapperBase { + public mF6SC(Atari2600 core) : base(core) + { + } + private int _bank4k; private byte[] _ram = new byte[128]; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8.cs index 45643c6650..006b8e7ce6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8.cs @@ -23,6 +23,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { private int _bank4K; + public mF8(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8SC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8SC.cs index e7c97daa9d..0054ce4464 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8SC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8SC.cs @@ -8,6 +8,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mF8SC : MapperBase { + public mF8SC(Atari2600 core) : base(core) + { + } + private int _bank_4K; private byte[] _ram = new byte[128]; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8_sega.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8_sega.cs index 50dc0c866b..1707ad3dea 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8_sega.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mF8_sega.cs @@ -13,6 +13,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { private int _bank4K = 1; + public mF8_sega(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA.cs index 8c4563a86a..52b76f4dfa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA.cs @@ -19,6 +19,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _toggle; private byte[] _ram = new byte[256]; + public mFA(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA2.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA2.cs index 7e33f5f07b..b6e7c713ea 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA2.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFA2.cs @@ -10,6 +10,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 */ internal class mFA2 : MapperBase { + public mFA2(Atari2600 core) : base(core) + { + } + private int _bank4k; private byte[] _ram = new byte[256]; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFE.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFE.cs index cca8c8983d..2889b2de74 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFE.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mFE.cs @@ -56,6 +56,10 @@ */ internal class mFE : MapperBase { + public mFE(Atari2600 core) : base(core) + { + } + public override byte ReadMemory(ushort addr) { if (addr < 0x1000) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mMC.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mMC.cs index 0ca8918345..4236f549a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mMC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mMC.cs @@ -61,7 +61,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mMC : MapperBase { - public mMC() + public mMC(Atari2600 core) : base(core) { throw new NotImplementedException(); } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mSB.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mSB.cs index f978fb10b6..3ef4b4277a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mSB.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mSB.cs @@ -11,6 +11,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private int _bank4K; private int myStartBank => (Core.Rom.Length >> 12) - 1; + public mSB(Atari2600 core) : base(core) + { + } + public override void SyncState(Serializer ser) { base.SyncState(ser); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mUA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mUA.cs index 75e9c372ea..e392bbc2d1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mUA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mUA.cs @@ -14,6 +14,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mUA : MapperBase { + public mUA(Atari2600 core) : base(core) + { + } + private int _toggle; public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mX07.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mX07.cs index 895a8082e9..7fc4c2f039 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mX07.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mX07.cs @@ -35,6 +35,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 internal class mX07 : MapperBase { + public mX07(Atari2600 core) : base(core) + { + } + private int _rombank2K; public override void SyncState(Serializer ser)