support Trace Logging in PCE
This commit is contained in:
parent
a87a5c96b2
commit
ea6e170703
|
@ -8,6 +8,9 @@ namespace BizHawk.Emulation.CPUs.H6280
|
||||||
{
|
{
|
||||||
public partial class HuC6280
|
public partial class HuC6280
|
||||||
{
|
{
|
||||||
|
public bool Debug;
|
||||||
|
public Action<string> Logger;
|
||||||
|
|
||||||
public void Execute(int cycles)
|
public void Execute(int cycles)
|
||||||
{
|
{
|
||||||
sbyte rel8;
|
sbyte rel8;
|
||||||
|
@ -56,6 +59,8 @@ namespace BizHawk.Emulation.CPUs.H6280
|
||||||
IRQControlByte = IRQNextControlByte;
|
IRQControlByte = IRQNextControlByte;
|
||||||
LagIFlag = FlagI;
|
LagIFlag = FlagI;
|
||||||
|
|
||||||
|
if (Debug) Logger(State());
|
||||||
|
|
||||||
byte opcode = ReadMemory(PC++);
|
byte opcode = ReadMemory(PC++);
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
public PCEngine(GameInfo game, byte[] rom)
|
public PCEngine(GameInfo game, byte[] rom)
|
||||||
{
|
{
|
||||||
CoreOutputComm = new CoreOutputComm();
|
CoreOutputComm = new CoreOutputComm();
|
||||||
|
CoreOutputComm.CpuTraceAvailable = true;
|
||||||
|
|
||||||
switch (game.System)
|
switch (game.System)
|
||||||
{
|
{
|
||||||
|
@ -87,6 +88,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
PSG = new HuC6280PSG();
|
PSG = new HuC6280PSG();
|
||||||
SCSI = new ScsiCDBus(this, disc);
|
SCSI = new ScsiCDBus(this, disc);
|
||||||
|
|
||||||
|
Cpu.Logger = (s) => CoreInputComm.Tracer.Put(s);
|
||||||
|
|
||||||
if (TurboGrafx)
|
if (TurboGrafx)
|
||||||
{
|
{
|
||||||
Ram = new byte[0x2000];
|
Ram = new byte[0x2000];
|
||||||
|
@ -238,6 +241,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
Controller.UpdateControls(Frame++);
|
Controller.UpdateControls(Frame++);
|
||||||
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
||||||
|
|
||||||
|
Cpu.Debug = CoreInputComm.Tracer.Enabled;
|
||||||
|
|
||||||
if (SuperGrafx)
|
if (SuperGrafx)
|
||||||
VPC.ExecFrame(render);
|
VPC.ExecFrame(render);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue