From c9cbac7021b709ec8709798d3157a049b5d603ae Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 24 Jan 2015 21:08:20 +0000 Subject: [PATCH] Colecovision - implement the disassembler and memory read/write/execute callbacks --- .../Consoles/Coleco/ColecoVision.IDebuggable.cs | 6 +----- BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs index 297bf256ba..1cbb9ca6eb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs @@ -121,11 +121,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision } } - public IMemoryCallbackSystem MemoryCallbacks - { - [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/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs index ec4b57af60..b7ec897845 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs @@ -36,6 +36,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision public ColecoVision(CoreComm comm, GameInfo game, byte[] rom, object SyncSettings) { ServiceProvider = new BasicServiceProvider(this); + MemoryCallbacks = new MemoryCallbackSystem(); CoreComm = comm; _syncSettings = (ColecoSyncSettings)SyncSettings ?? new ColecoSyncSettings(); bool skipbios = this._syncSettings.SkipBiosIntro; @@ -45,6 +46,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision Cpu.WriteMemory = WriteMemory; Cpu.ReadHardware = ReadPort; Cpu.WriteHardware = WritePort; + Cpu.MemoryCallbacks = MemoryCallbacks; VDP = new TMS9918A(Cpu); (ServiceProvider as BasicServiceProvider).Register(VDP); @@ -60,6 +62,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision LoadRom(rom, skipbios); this.game = game; SetupMemoryDomains(); + (ServiceProvider as BasicServiceProvider).Register(new Disassembler()); } public IEmulatorServiceProvider ServiceProvider { get; private set; }