From 898c57f5d9e0d9b55cdfb8c1141b0e79ac14d08f Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 26 May 2014 01:01:47 +0000 Subject: [PATCH] Atari 2600 - AR (Super Charger) - implement Cart Ram memory domain, and a Fast SC Bios sync setting --- .../Consoles/Atari/2600/Atari2600.Settings.cs | 3 +++ .../Consoles/Atari/2600/Mappers/mAR.cs | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs index 1acf0bf35a..70864bcffa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs @@ -122,6 +122,9 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 [Description("Set the Right Difficulty switch on the console")] public bool RightDifficulty { get; set; } + [Description("Super Charger only, sets whether or not to skip the BIOS intro")] + public bool FastScBios { get; set; } + public A2600SyncSettings Clone() { return (A2600SyncSettings)MemberwiseClone(); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs index 701af6dc6f..1be138143f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs @@ -35,8 +35,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { internal class mAR : MapperBase { - // TODO: fastscbios setting - // TODO: cart ram public mAR(Atari2600 core) { Core = core; @@ -165,6 +163,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 #endregion + public override bool HasCartRam + { + get { return true; } + } + + public override ByteBuffer CartRam + { + get { return _superChargerImage; } + } + public override void HardReset() { _superChargerImage = new ByteBuffer(8192); @@ -353,7 +361,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 // The scrom.asm code checks a value at offset 109 as follows: // 0xFF -> do a complete jump over the SC BIOS progress bars code // 0x00 -> show SC BIOS progress bars as normal - DummyRomCode[109] = 0x00; // TODO: fastscbios setting + DummyRomCode[109] = (byte)(Core.SyncSettings.FastScBios ? 0xFF : 0x00); // Stella does this, but randomness is bad for determinacy! Hopefully we don't really need it //ourDummyROMCode[281] = mySystem->randGenerator().next();