From e88691152dfe90c84b599a8abf71bbd3ba95584d Mon Sep 17 00:00:00 2001 From: goyuken Date: Thu, 18 Jul 2013 14:15:46 +0000 Subject: [PATCH] NES: remove vs system cruft that never worked and i never followed up on --- .../Consoles/Nintendo/NES/Core.cs | 71 +------------------ .../Consoles/Nintendo/NES/NES.cs | 10 --- 2 files changed, 2 insertions(+), 79 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs index b1c1522fdc..2397c8ddbe 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs @@ -29,10 +29,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo public bool SoundOn = true; int sprdma_countdown; bool _irq_apu; //various irq signals that get merged to the cpu irq pin - /// if true, use VS. system arrangement of $4016..$4020 - bool vs_io = false; - bool vs_coin1; - bool vs_coin2; /// clock speed of the main cpu in hz public int cpuclockrate { get; private set; } @@ -192,15 +188,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo cpuclockrate = 1789773; cpu_sequence = cpu_sequence_NTSC; break; - // there's no official name for these in bootgod, not sure what we should use - //case "PC10"://TODO - case "VS": - apu = new APU(this, apu, false); - ppu.region = PPU.Region.RGB; - cpuclockrate = 1789773; - cpu_sequence = cpu_sequence_NTSC; - vs_io = true; - break; // this is in bootgod, but not used at all case "Dendy": apu = new APU(this, apu, false); @@ -267,13 +254,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo if (Controller["FDS Insert " + i]) b.InsertSide(i); } - if (vs_io) - { - if (Controller["VS Coin 1"]) - vs_coin1 = true; - if (Controller["VS Coin 2"]) - vs_coin2 = true; - } ppu.FrameAdvance(); if (lagged) @@ -399,12 +379,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo case 0x4016: ports[0].Write(val & 1); ports[1].Write(val & 1); - if (vs_io && board is Mapper099) - { - // happily, there aren't any other "VS exceptions" like this - var b = board as Mapper099; - b.Signal4016(val >> 2 & 1); - } break; case 0x4017: apu.WriteReg(addr, val); break; default: @@ -431,44 +405,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo lagged = false; byte ret; if (addr == 0x4016) - ret = ports[vs_io ? 1 : 0].Read(peek); + ret = ports[0].Read(peek); else - ret = ports[vs_io ? 0 : 1].Read(peek); - if (vs_io) - { - if (addr == 0x4016) - { - // clear bits 2-6 - ret &= 0x83; - if (false) // service switch - ret |= 0x04; - if (false) // DIP1 - ret |= 0x08; - if (false) // DIP2 - ret |= 0x10; - if (vs_coin1) - ret |= 0x20; - if (vs_coin2) - ret |= 0x40; - } - else - { - // clear bits 2-7 - ret &= 0x03; - if (false) // DIP3 - ret |= 0x04; - if (false) // DIP4 - ret |= 0x08; - if (false) // DIP5 - ret |= 0x10; - if (false) // DIP6 - ret |= 0x20; - if (false) // DIP7 - ret |= 0x40; - if (false) // DIP8 - ret |= 0x80; - } - } + ret = ports[1].Read(peek); return ret; } @@ -658,12 +597,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo } else if (addr < 0x6000) { - if (vs_io && addr == 0x4020 && (value & 1) != 0) - { - // acknowledge coin insertion - vs_coin1 = false; - vs_coin2 = false; - } board.WriteEXP(addr - 0x4000, value); } else if (addr < 0x8000) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs index 44d75dec69..9144146790 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs @@ -32,11 +32,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo CoreComm.UsesDriveLed = true; b.SetDriveLightCallback((val) => CoreComm.DriveLED = val); } - if (vs_io) - { - ControllerDefinition.BoolButtons.Add("VS Coin 1"); - ControllerDefinition.BoolButtons.Add("VS Coin 2"); - } } private NES() @@ -817,11 +812,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo ser.Sync("cpu_step", ref cpu_step); ser.Sync("cpu_stepcounter", ref cpu_stepcounter); ser.Sync("cpu_deadcounter", ref cpu_deadcounter); - if (vs_io) - { - ser.Sync("vs_coin1", ref vs_coin1); - ser.Sync("vs_coin2", ref vs_coin2); - } ser.BeginSection("Board"); board.SyncState(ser); if (board is NESBoardBase && !((NESBoardBase)board).SyncStateFlag)