diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs index b4e281facf..6d64c4cf82 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs @@ -34,6 +34,11 @@ namespace BizHawk.Emulation.Cores.Calculators { _lagged = true; + Cpu.Debug = Tracer.Enabled; + + if (Cpu.Debug && Cpu.Logger == null) // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first + Cpu.Logger = (s) => Tracer.Put(s); + //I eyeballed this speed for (int i = 0; i < 5; i++) { diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.cs b/BizHawk.Emulation.Cores/Calculator/TI83.cs index 071b2339aa..eddf4c7b2a 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.cs @@ -53,9 +53,17 @@ namespace BizHawk.Emulation.Cores.Calculators HardReset(); SetupMemoryDomains(); - (ServiceProvider as BasicServiceProvider).Register(new Disassembler()); + + Tracer = new TraceBuffer { Header = Cpu.TraceHeader }; + + var serviceProvider = ServiceProvider as BasicServiceProvider; + + serviceProvider.Register(Tracer); + serviceProvider.Register(new Disassembler()); } + private ITraceable Tracer { get; set; } + // hardware private const ushort RamSizeMask = 0x7FFF;