fixes
This commit is contained in:
parent
7559e22603
commit
9884488bf0
|
@ -1,4 +1,6 @@
|
|||
|
||||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Components.vr6502
|
||||
{
|
||||
public partial class vr6502
|
||||
|
@ -6,6 +8,8 @@ namespace BizHawk.Emulation.Cores.Components.vr6502
|
|||
private VrEmu6502State _6502s;
|
||||
private readonly VrEmu6502Model _model;
|
||||
|
||||
public long TotalExecutedCycles;
|
||||
|
||||
public vr6502(VrEmu6502Model model, VrEmu6502MemRead readFn, VrEmu6502MemWrite writeFn)
|
||||
{
|
||||
_model = model;
|
||||
|
@ -21,13 +25,24 @@ namespace BizHawk.Emulation.Cores.Components.vr6502
|
|||
}
|
||||
|
||||
public void ExecuteTick()
|
||||
{
|
||||
{
|
||||
VrEmu6502Interop.vrEmu6502Tick(ref _6502s);
|
||||
TotalExecutedCycles++;
|
||||
}
|
||||
|
||||
public void ExecuteInstruction()
|
||||
public byte ExecuteInstruction()
|
||||
{
|
||||
VrEmu6502Interop.vrEmu6502InstCycle(ref _6502s);
|
||||
int cycles = VrEmu6502Interop.vrEmu6502InstCycle(ref _6502s);
|
||||
TotalExecutedCycles += cycles;
|
||||
return (byte)cycles;
|
||||
}
|
||||
|
||||
|
||||
public void SyncState(Serializer ser)
|
||||
{
|
||||
ser.BeginSection("vrEmu6502");
|
||||
ser.Sync(nameof(TotalExecutedCycles), ref TotalExecutedCycles);
|
||||
ser.EndSection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue