From d08fb39cb8498c47a9279e38139c07d082a3813f Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 15 Dec 2014 22:19:10 +0000 Subject: [PATCH] Refactor IDebuggable StepInto/Over/Out methods into void Step(StepType type); --- BizHawk.Emulation.Common/Interfaces/IDebuggable.cs | 10 +++++++--- BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs | 8 +------- .../Computers/Commodore64/C64.Core.cs | 8 +------- .../Consoles/Atari/2600/Atari2600.IDebuggable.cs | 8 +------- .../Consoles/Atari/7800/Atari7800.IDebuggable.cs | 8 +------- .../Consoles/Coleco/ColecoVision.IDebuggable.cs | 8 +------- .../Consoles/Nintendo/GBA/Meteor.cs | 8 +------- .../Consoles/Nintendo/GBA/VBANext.cs | 8 +------- .../Consoles/Nintendo/Gameboy/Gambatte.cs | 8 +------- .../Consoles/Nintendo/Gameboy/GambatteLink.cs | 5 ++--- .../Consoles/Nintendo/N64/N64.IDebuggable.cs | 8 +------- BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs | 8 +------- .../Consoles/Nintendo/QuickNES/QuickNES.cs | 8 +------- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 8 +------- BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs | 8 +------- .../Consoles/Sega/Genesis/Genesis.cs | 8 +------- BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs | 8 +------- BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs | 8 +------- BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs | 6 +----- .../Consoles/WonderSwan/WonderSwan.cs | 8 +------- 20 files changed, 27 insertions(+), 130 deletions(-) diff --git a/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs b/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs index f9e4aeb347..a8226b8c11 100644 --- a/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs +++ b/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs @@ -22,8 +22,12 @@ namespace BizHawk.Emulation.Common IMemoryCallbackSystem MemoryCallbacks { get; } // Advanced Navigation - void StepInto(); - void StepOut(); - void StepOver(); + //void StepInto(); + //void StepOut(); + //void StepOver(); + + void Step(StepType type); } + + public enum StepType { Into, Out, Over } } diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs index 7774600084..0c1036de5e 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs @@ -129,12 +129,6 @@ namespace BizHawk.Emulation.Cores.Calculators public IMemoryCallbackSystem MemoryCallbacks { get; private set; } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } } } diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs index abc6088922..2906d8e2c0 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs @@ -128,13 +128,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } public ITracer Tracer { diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs index 2036001ac2..5a5e2b2da5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs @@ -61,12 +61,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 public IMemoryCallbackSystem MemoryCallbacks { get; private set; } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } } } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs index fd84b03a8a..f218165864 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs @@ -67,12 +67,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800 } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } } } diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs index 66adbab0cf..6cc186d8d2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs @@ -134,12 +134,6 @@ namespace BizHawk.Emulation.Cores.ColecoVision } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs index f2ad2e21b9..f7f23e5d61 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs @@ -28,13 +28,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } [FeatureNotImplemented] public void SetCpuRegister(string register, int value) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index 21a0a1b8dc..3e10c52a15 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -422,13 +422,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } #endregion diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index 655e2138c5..ba85e47599 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -290,13 +290,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } #endregion diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index a518fd1244..9d8a0916a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -448,9 +448,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy MemoryDomains = new MemoryDomainList(mm); } - public void StepInto() { throw new NotImplementedException(); } - public void StepOut() { throw new NotImplementedException(); } - public void StepOver() { throw new NotImplementedException(); } + [FeatureNotImplemented] + public void Step(StepType type) { throw new NotImplementedException(); } #endregion diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs index 4d096d92e5..c1273a239e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs @@ -72,13 +72,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 public IMemoryCallbackSystem MemoryCallbacks { get; private set; } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } private mupen64plusApi.MemoryCallback _readcb; private mupen64plusApi.MemoryCallback _writecb; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 5aae0a7e6e..d110842499 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -943,13 +943,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } public ITracer Tracer { get; private set; } public IMemoryCallbackSystem MemoryCallbacks { get; private set; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index a48274f9e9..4274d453fc 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -395,13 +395,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } public ITracer Tracer { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 5ce2426de4..83a643da5a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -255,13 +255,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES public IMemoryCallbackSystem MemoryCallbacks { get; private set; } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } [FeatureNotImplemented] public void SetCpuRegister(string register, int value) diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 51d76a74cb..371e10577c 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -566,13 +566,7 @@ namespace BizHawk.Emulation.Cores.PCEngine } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } [FeatureNotImplemented] public void SetCpuRegister(string register, int value) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs index bb3e12c946..ec402053ba 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs @@ -293,13 +293,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } [FeatureNotImplemented] public void SetCpuRegister(string register, int value) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index d4ec7ed2a1..71f6522d97 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -601,13 +601,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } public void Dispose() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index 658a3a3dc2..65e0241dfe 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -644,13 +644,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } [FeatureNotImplemented] public void SetCpuRegister(string register, int value) diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index b8b58aea6c..1ffc945a79 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -765,11 +765,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public IMemoryCallbackSystem MemoryCallbacks { get { throw new NotImplementedException(); } } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } #endregion //IDebuggable } diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index 0b2ae20fc1..e0a8be2d56 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -349,13 +349,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan } [FeatureNotImplemented] - public void StepInto() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOut() { throw new NotImplementedException(); } - - [FeatureNotImplemented] - public void StepOver() { throw new NotImplementedException(); } + public void Step(StepType type) { throw new NotImplementedException(); } BizSwan.MemoryCallback ReadCallbackD; BizSwan.MemoryCallback WriteCallbackD;