From 10e56a4a4f2f005c2f247b415baaddaeba14adbf Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 13 Jan 2015 19:30:50 +0000 Subject: [PATCH] Genesis.cs and Meteor.cs - remove IDebuggable from these since they aren't being used, and remove not implemented methods, left implemented ones, if we ever use these the IDebuggable designation can be easily added back --- .../Consoles/Nintendo/GBA/Meteor.cs | 63 +++++++------------ .../Consoles/Sega/Genesis/Genesis.cs | 19 +----- 2 files changed, 24 insertions(+), 58 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs index 14765e4b7e..e8030ad2be 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs @@ -15,47 +15,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA isReleased: false )] [ServiceNotApplicable(typeof(IDriveLight))] - public class GBA : IEmulator, IVideoProvider, ISyncSoundProvider, IGBAGPUViewable, IMemoryDomains, ISaveRam, IDebuggable, IStatable, IInputPollable + public class GBA : IEmulator, IVideoProvider, ISyncSoundProvider, IGBAGPUViewable, IMemoryDomains, ISaveRam, IStatable, IInputPollable { - public IDictionary GetCpuFlagsAndRegisters() - { - var ret = new Dictionary(); - int[] data = new int[LibMeteor.regnames.Length]; - LibMeteor.libmeteor_getregs(data); - for (int i = 0; i < data.Length; i++) - ret.Add(LibMeteor.regnames[i], data[i]); - return ret; - } - - public bool CanStep(StepType type) { return false; } - - [FeatureNotImplemented] - public void Step(StepType type) { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void SetCpuRegister(string register, int value) - { - throw new NotImplementedException(); - } - - public IMemoryCallbackSystem MemoryCallbacks - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - - public static readonly ControllerDefinition GBAController = - new ControllerDefinition - { - Name = "GBA Controller", - BoolButtons = - { - "Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "L", "R", "Power" - } - }; - public ControllerDefinition ControllerDefinition { get { return GBAController; } } - public IController Controller { get; set; } - [CoreConstructor("GBA")] public GBA(CoreComm comm, byte[] file) { @@ -90,6 +51,28 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA public IEmulatorServiceProvider ServiceProvider { get; private set; } + public IDictionary GetCpuFlagsAndRegisters() + { + var ret = new Dictionary(); + int[] data = new int[LibMeteor.regnames.Length]; + LibMeteor.libmeteor_getregs(data); + for (int i = 0; i < data.Length; i++) + ret.Add(LibMeteor.regnames[i], data[i]); + return ret; + } + + public static readonly ControllerDefinition GBAController = + new ControllerDefinition + { + Name = "GBA Controller", + BoolButtons = + { + "Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "L", "R", "Power" + } + }; + public ControllerDefinition ControllerDefinition { get { return GBAController; } } + public IController Controller { get; set; } + public void FrameAdvance(bool render, bool rendersound = true) { Frame++; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs index 4fa94170a2..94a99d60a5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis isPorted: false, isReleased: false )] - public sealed partial class Genesis : IEmulator, IMemoryDomains, IDebuggable, ISaveRam, IStatable, IInputPollable + public sealed partial class Genesis : IEmulator, IMemoryDomains, ISaveRam, IStatable, IInputPollable { private int _lagcount = 0; private bool lagged = true; @@ -48,12 +48,6 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis [FeatureNotImplemented] public IInputCallbackSystem InputCallbacks { get { throw new NotImplementedException(); } } - public IMemoryCallbackSystem MemoryCallbacks - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public void ResetCounters() { Frame = 0; @@ -292,17 +286,6 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis }; } - public bool CanStep(StepType type) { return false; } - - [FeatureNotImplemented] - public void Step(StepType type) { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void SetCpuRegister(string register, int value) - { - throw new NotImplementedException(); - } - int vdpcallback(int level) // Musashi handler { InterruptCallback(level);