From 97a11ec083a190c28843866c8ae3b8f2d9cb4f61 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Tue, 5 Apr 2022 21:01:05 -0700 Subject: [PATCH] fix NESHawk mistakenly having cycle count complained about --- .../Consoles/Nintendo/NES/NES.Core.cs | 2 +- .../Consoles/Nintendo/SubNESHawk/SubNESHawk.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs index d619891813..54a678e2fd 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs @@ -11,7 +11,7 @@ using BizHawk.Emulation.Cores.Components.M6502; namespace BizHawk.Emulation.Cores.Nintendo.NES { - public partial class NES : IEmulator, ISoundProvider, ICycleTiming + public partial class NES : IEmulator, ISoundProvider/*, ICycleTiming*/ { internal static class RomChecksums { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs index 2364c2d275..3bd7c25ad1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk [Core(CoreNames.SubNesHawk, "")] [ServiceNotApplicable(new[] { typeof(IDriveLight) })] public partial class SubNESHawk : IEmulator, IStatable, IInputPollable, - ISettable + ISettable, ICycleTiming { [CoreConstructor(VSystemID.Raw.NES, Priority = CorePriority.SuperLow)] public SubNESHawk(CoreComm comm, GameInfo game, byte[] rom, /*string gameDbFn,*/ NES.NES.NESSettings settings, NES.NES.NESSyncSettings syncSettings) @@ -36,7 +36,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk ser.Register(_nesCore.ServiceProvider.GetService()); ser.Register(_nesCore.ServiceProvider.GetService()); ser.Register(_nesCore.ServiceProvider.GetService()); - ser.Register(_nesCore.ServiceProvider.GetService()); const string TRACE_HEADER = "6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR), CPU Cycle, PPU Cycle"; _tracer = new TraceBuffer(TRACE_HEADER); @@ -77,5 +76,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk public NES.NES.NESSyncSettings GetSyncSettings() => _nesCore.GetSyncSettings(); public PutSettingsDirtyBits PutSettings(NES.NES.NESSettings o) => _nesCore.PutSettings(o); public PutSettingsDirtyBits PutSyncSettings(NES.NES.NESSyncSettings o) => _nesCore.PutSyncSettings(o); + + public long CycleCount => _nesCore.CycleCount; + public double ClockRate => _nesCore.ClockRate; } }