quick fix for 6502 trace log

This commit is contained in:
zeromus 2012-11-17 01:31:34 +00:00
parent c41d7f2388
commit e48f24d266
2 changed files with 10 additions and 4 deletions

View File

@ -548,10 +548,13 @@ namespace BizHawk.Emulation.CPUs.M6502
bool booltemp;
int tempint;
int lo, hi;
public Action FetchCallback;
void Fetch1()
{
{
if (FetchCallback != null)
FetchCallback();
my_iflag = FlagI;
FlagI = iflag_pending;
if (!branch_irq_hack)

View File

@ -122,6 +122,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo
//cpu = new MOS6502X_CPP((h) => DisposeList.Add(h));
//cpu = new MOS6502XDouble((h) => DisposeList.Add(h));
cpu.SetCallbacks(ReadMemory, ReadMemory, PeekMemory, WriteMemory, (h) => DisposeList.Add(h));
cpu.FetchCallback = () =>
{
if (CoreInputComm.Tracer.Enabled)
{
CoreInputComm.Tracer.Put(cpu.TraceState());
}
};
cpu.BCD_Enabled = false;
ppu = new PPU(this);
ram = new byte[0x800];
@ -283,10 +290,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
else
{
cpu.IRQ = _irq_apu || board.IRQSignal;
if (CoreInputComm.Tracer.Enabled)
{
CoreInputComm.Tracer.Put(cpu.TraceState());
}
cpu.ExecuteOne();
}