From 0f2197cec139e63c8c2a1662827f803440d7ea57 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 23 Dec 2014 01:58:12 +0000 Subject: [PATCH] Break off ITracer from IDebuggable, rename to ITraceable and make it an IEmulatorService, refactor things accordingly --- BizHawk.Client.EmuHawk/tools/TraceLogger.cs | 3 +-- .../Base Implementations/TraceBuffer.cs | 2 +- .../BizHawk.Emulation.Common.csproj | 2 +- BizHawk.Emulation.Common/Extensions.cs | 20 +++++-------------- .../Interfaces/IDebuggable.cs | 2 -- .../Interfaces/{ITracer.cs => ITraceable.cs} | 2 +- .../Calculator/TI83.IDebuggable.cs | 6 ------ .../Computers/Commodore64/C64.IDebuggable.cs | 6 ------ .../Atari/2600/Atari2600.IDebuggable.cs | 2 -- .../Consoles/Atari/2600/Atari2600.cs | 3 +++ .../Atari/7800/Atari7800.IDebuggable.cs | 6 ------ .../Coleco/ColecoVision.IDebuggable.cs | 6 ------ .../Consoles/Nintendo/GBA/Meteor.cs | 5 +++-- .../Consoles/Nintendo/GBA/VBANext.cs | 3 ++- .../Consoles/Nintendo/Gameboy/Gambatte.cs | 3 ++- .../Consoles/Nintendo/Gameboy/GambatteLink.cs | 6 ------ .../Consoles/Nintendo/N64/N64.IDebuggable.cs | 9 --------- .../Consoles/Nintendo/NES/NES.cs | 7 +++++-- .../Consoles/Nintendo/QuickNES/QuickNES.cs | 9 --------- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 3 ++- .../Consoles/PC Engine/PCEngine.cs | 4 +++- .../Consoles/Sega/Genesis/Genesis.cs | 9 --------- .../Consoles/Sega/SMS/SMS.cs | 4 ++-- .../Consoles/Sega/gpgx/GPGX.cs | 10 +--------- .../Consoles/Sony/PSX/Octoshock.cs | 3 ++- .../Consoles/WonderSwan/WonderSwan.cs | 9 --------- 26 files changed, 34 insertions(+), 110 deletions(-) rename BizHawk.Emulation.Common/Interfaces/{ITracer.cs => ITraceable.cs} (90%) diff --git a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs index 4e6ba55f85..10b7efe181 100644 --- a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs +++ b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs @@ -17,8 +17,7 @@ namespace BizHawk.Client.EmuHawk public partial class TraceLogger : Form, IToolFormAutoConfig { [RequiredService] - private IDebuggable _debugtarget { get; set; } - private ITracer Tracer { get { return _debugtarget.Tracer; } } + private ITraceable Tracer { get; set; } [ConfigPersist] private int MaxLines { get; set; } diff --git a/BizHawk.Emulation.Common/Base Implementations/TraceBuffer.cs b/BizHawk.Emulation.Common/Base Implementations/TraceBuffer.cs index d823f4a426..4aa781befd 100644 --- a/BizHawk.Emulation.Common/Base Implementations/TraceBuffer.cs +++ b/BizHawk.Emulation.Common/Base Implementations/TraceBuffer.cs @@ -2,7 +2,7 @@ namespace BizHawk.Emulation.Common { - public class TraceBuffer : ITracer + public class TraceBuffer : ITraceable { private readonly StringBuilder buffer; diff --git a/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj b/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj index d3ffcfb00f..3367909cfa 100644 --- a/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj +++ b/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj @@ -87,7 +87,7 @@ - + diff --git a/BizHawk.Emulation.Common/Extensions.cs b/BizHawk.Emulation.Common/Extensions.cs index d3a6cd0908..ca15613df0 100644 --- a/BizHawk.Emulation.Common/Extensions.cs +++ b/BizHawk.Emulation.Common/Extensions.cs @@ -115,22 +115,12 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions return false; } - // TODO: this is a pretty ugly way to handle this - var debuggable = (IDebuggable)core.ServiceProvider.GetService(); - if (debuggable != null) - { - try - { - var tracer = debuggable.Tracer; - return true; - } - catch (NotImplementedException) - { - return false; - } - } + return core.ServiceProvider.HasService(); + } - return false; + public static ITraceable AsTracer(this IEmulator core) + { + return (ITraceable)core.ServiceProvider.GetService(); } public static bool MemoryCallbacksAvailable(this IEmulator core) diff --git a/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs b/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs index 484d5e239f..2f680eaa62 100644 --- a/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs +++ b/BizHawk.Emulation.Common/Interfaces/IDebuggable.cs @@ -17,8 +17,6 @@ namespace BizHawk.Emulation.Common /// void SetCpuRegister(string register, int value); - ITracer Tracer { get; } - IMemoryCallbackSystem MemoryCallbacks { get; } /// diff --git a/BizHawk.Emulation.Common/Interfaces/ITracer.cs b/BizHawk.Emulation.Common/Interfaces/ITraceable.cs similarity index 90% rename from BizHawk.Emulation.Common/Interfaces/ITracer.cs rename to BizHawk.Emulation.Common/Interfaces/ITraceable.cs index 0ebb542eb5..d3cd24c78b 100644 --- a/BizHawk.Emulation.Common/Interfaces/ITracer.cs +++ b/BizHawk.Emulation.Common/Interfaces/ITraceable.cs @@ -3,7 +3,7 @@ /// /// Allows the cpu to dump trace info to a trace stream /// - public interface ITracer + public interface ITraceable : IEmulatorService { // TODO: would it be faster (considering both disk and screen output) to keep the data as a List directly? diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs index ed17ba22c6..ac7da168e4 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.IDebuggable.cs @@ -120,12 +120,6 @@ namespace BizHawk.Emulation.Cores.Calculators } } - public ITracer Tracer - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public IMemoryCallbackSystem MemoryCallbacks { get; private set; } [FeatureNotImplemented] diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs index a6a032bcbc..f01f915c14 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs @@ -51,12 +51,6 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 } } - public ITracer Tracer - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public IMemoryCallbackSystem MemoryCallbacks { [FeatureNotImplemented] diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs index ffe8ff710e..0a734bad71 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs @@ -56,8 +56,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 } } - public ITracer Tracer { get; private set; } - public IMemoryCallbackSystem MemoryCallbacks { get; private set; } public bool CanStep(StepType type) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs index f7811ffcf3..07eac79b9a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs @@ -21,6 +21,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 private readonly GameInfo _game; private int _frame; + private ITraceable Tracer { get; set; } + [CoreConstructor("A26")] public Atari2600(CoreComm comm, GameInfo game, byte[] rom, object settings, object syncSettings) { @@ -47,6 +49,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 var ser = new BasicServiceProvider(this); ser.Register(Cpu); + ser.Register(Tracer); ServiceProvider = ser; } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs index c89d31ffd3..4f27b4289d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IDebuggable.cs @@ -54,12 +54,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800 } } - public ITracer Tracer - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public IMemoryCallbackSystem MemoryCallbacks { [FeatureNotImplemented] diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs index 66fa9a60d3..297bf256ba 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs @@ -121,12 +121,6 @@ namespace BizHawk.Emulation.Cores.ColecoVision } } - public ITracer Tracer - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public IMemoryCallbackSystem MemoryCallbacks { [FeatureNotImplemented] diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs index 75b2d4e243..d6b0fe744a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs @@ -65,6 +65,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA Header = " -Addr--- -Opcode- -Instruction------------------- -R0----- -R1----- -R2----- -R3----- -R4----- -R5----- -R6----- -R7----- -R8----- -R9----- -R10---- -R11---- -R12---- -R13(SP) -R14(LR) -R15(PC) -CPSR--- -SPSR---" }; + (ServiceProvider as BasicServiceProvider).Register(Tracer); + CoreComm = comm; comm.VsyncNum = 262144; @@ -112,8 +114,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA // TODO: optimize managed to unmanaged using the ActiveChanged event public IInputCallbackSystem InputCallbacks { [FeatureNotImplemented]get { return _inputCallbacks; } } - - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } public string SystemId { get { return "GBA"; } } public bool DeterministicEmulation { get { return true; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index e4cd61eb3a..1f2de7b13c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -71,6 +71,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA throw new InvalidOperationException("LoadRom() returned false!"); Tracer = new TraceBuffer(); + ser.Register(Tracer); CoreComm.VsyncNum = 262144; CoreComm.VsyncDen = 4389; @@ -117,7 +118,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA public int LagCount { get; set; } public bool IsLagFrame { get; private set; } - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } public string SystemId { get { return "GBA"; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index c74f7c1a7f..d93c7170bd 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -129,6 +129,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy ser.Register(new GBDisassembler()); ServiceProvider = ser; Tracer = new TraceBuffer(); + ser.Register(Tracer); InitMemoryCallbacks(); CoreComm = comm; @@ -264,7 +265,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy throw new NotImplementedException(); } - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } /// /// true if the emulator is currently emulating CGB diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index 548449b466..680caf827a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -92,12 +92,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem(); public IMemoryCallbackSystem MemoryCallbacks { get { return _memorycallbacks; } } - public ITracer Tracer - { - [FeatureNotImplemented] - get { throw new NotImplementedException(); } - } - public IVideoProvider VideoProvider { get { return this; } } public ISoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs index 2fd7e90d5e..c5de924eb6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs @@ -60,15 +60,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 throw new NotImplementedException(); } - public ITracer Tracer - { - [FeatureNotImplemented] - get - { - throw new NotImplementedException(); - } - } - public IMemoryCallbackSystem MemoryCallbacks { get; private set; } public bool CanStep(StepType type) { return false; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 669bde0de7..88102f96ab 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -38,7 +38,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES this.SyncSettings = (NESSyncSettings)SyncSettings ?? new NESSyncSettings(); this.ControllerSettings = this.SyncSettings.Controls; CoreComm = comm; - Tracer = new TraceBuffer(); + MemoryCallbacks = new MemoryCallbackSystem(); BootGodDB.Initialize(); videoProvider = new MyVideoProvider(this); @@ -53,6 +53,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES var ser = new BasicServiceProvider(this); ser.Register(cpu); + Tracer = new TraceBuffer(); + ser.Register(Tracer); + if (board is BANDAI_FCG_1) { var reader = (board as BANDAI_FCG_1).reader; @@ -951,7 +954,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES [FeatureNotImplemented] public void Step(StepType type) { throw new NotImplementedException(); } - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } public IMemoryCallbackSystem MemoryCallbacks { get; private set; } NESSettings Settings = new NESSettings(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index b811e3a9a0..31834ae0e4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -408,15 +408,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES [FeatureNotImplemented] public void Step(StepType type) { throw new NotImplementedException(); } - public ITracer Tracer - { - [FeatureNotImplemented] - get - { - throw new NotImplementedException(); - } - } - public IMemoryCallbackSystem MemoryCallbacks { [FeatureNotImplemented] diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 1d0275b89b..923511021c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -38,6 +38,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES ServiceProvider = new BasicServiceProvider(this); MemoryCallbacks = new MemoryCallbackSystem(); Tracer = new TraceBuffer(); + (ServiceProvider as BasicServiceProvider).Register(Tracer); _game = game; CoreComm = comm; @@ -251,7 +252,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES // TODO: optimize managed to unmanaged using the ActiveChanged event public IInputCallbackSystem InputCallbacks { [FeatureNotImplemented]get { return _inputCallbacks; } } - public ITracer Tracer { get; private set; } + public ITraceable Tracer { get; private set; } public IMemoryCallbackSystem MemoryCallbacks { get; private set; } public bool CanStep(StepType type) { return false; } diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 27e1ef0bd4..43e0c3ef89 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -70,6 +70,8 @@ namespace BizHawk.Emulation.Cores.PCEngine { ServiceProvider = new BasicServiceProvider(this); Tracer = new TraceBuffer(); + (ServiceProvider as BasicServiceProvider).Register(Tracer); + MemoryCallbacks = new MemoryCallbackSystem(); CoreComm = comm; @@ -94,7 +96,7 @@ namespace BizHawk.Emulation.Cores.PCEngine public string BoardName { get { return null; } } - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } public IMemoryCallbackSystem MemoryCallbacks { get; private set; } public PCEngine(CoreComm comm, GameInfo game, Disc disc, object Settings, object syncSettings) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs index 8f09c612c0..4fa94170a2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs @@ -303,15 +303,6 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis throw new NotImplementedException(); } - public ITracer Tracer - { - [FeatureNotImplemented] - get - { - throw new NotImplementedException(); - } - } - int vdpcallback(int level) // Musashi handler { InterruptCallback(level); diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index 70fce301b3..b8ed791d58 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem IsSG1000 = game.System == "SG"; RomData = rom; Tracer = new TraceBuffer(); - + (ServiceProvider as BasicServiceProvider).Register(Tracer); if (RomData.Length % BankSize != 0) Array.Resize(ref RomData, ((RomData.Length / BankSize) + 1) * BankSize); RomBanks = (byte)(RomData.Length / BankSize); @@ -216,7 +216,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ITracer Tracer { get; private set; } + private ITraceable Tracer { get; set; } string DetermineRegion(string gameRegion) { diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index 6c1066dbf1..9ca357258a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -61,7 +61,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx public GPGX(CoreComm comm, byte[] rom, DiscSystem.Disc CD, object Settings, object SyncSettings) { ServiceProvider = new BasicServiceProvider(this); - + (ServiceProvider as BasicServiceProvider).Register(_tracer); // this can influence some things internally string romextension = "GEN"; @@ -392,14 +392,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx private readonly TraceBuffer _tracer = new TraceBuffer(); - public ITracer Tracer - { - get - { - return _tracer; - } - } - #endregion // TODO: use render and rendersound diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index 1f34964ec4..c1420387b2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -201,6 +201,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public Octoshock(CoreComm comm, List discs, List discNames, byte[] exe, object settings, object syncSettings) { ServiceProvider = new BasicServiceProvider(this); + (ServiceProvider as BasicServiceProvider).Register(tracer); CoreComm = comm; DriveLightEnabled = true; @@ -996,7 +997,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX OctoshockDll.shock_SetRegister_CPU(psx, index, (uint)value); } - public ITracer Tracer { get { return tracer; } } + public ITraceable Tracer { get { return tracer; } } public int ShockTraceCallback(IntPtr opaque, uint PC, uint inst, string dis) { diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index e88e64445d..a34a5687e9 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -133,15 +133,6 @@ namespace BizHawk.Emulation.Cores.WonderSwan public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ITracer Tracer - { - [FeatureNotImplemented] - get - { - throw new NotImplementedException(); - } - } - public void Dispose() { if (Core != IntPtr.Zero)