gba: correct tracelogger address for PC pipelining. note that the disassembly for some branch instructions shows up wrong, making this seem "wrong". but it's right, and the disassembly will be fixed...

core: tracelogger can now show a custom column header.  GBA uses it; all other traceloggers untouched
This commit is contained in:
goyuken 2012-11-24 00:45:25 +00:00
parent 7ff342f907
commit d20970afa7
5 changed files with 8 additions and 3 deletions

View File

@ -114,7 +114,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo.GBA
{
VsyncNum = 262144,
VsyncDen = 4389,
CpuTraceAvailable = true
CpuTraceAvailable = true,
TraceHeader = " -Addr--- -Opcode- -Instruction------------------- -R0----- -R1----- -R2----- -R3----- -R4----- -R5----- -R6----- -R7----- -R8----- -R9----- -R10---- -R11---- -R12---- -R13(SP) -R14(LR) -R15(PC) -CPSR--- -SPSR---"
};
public CoreOutputComm CoreOutputComm { get { return _CoreOutputComm; } }

View File

@ -53,6 +53,8 @@ namespace BizHawk
public int ScreenLogicalOffsetX, ScreenLogicalOffsetY;
public bool CpuTraceAvailable = false;
public string TraceHeader = "Instructions";
}
public class TraceBuffer

View File

@ -65,6 +65,7 @@ namespace BizHawk.MultiClient
LoggingEnabled.Checked = true;
Global.CoreInputComm.Tracer.Enabled = true;
SetTracerBoxTitle();
Restart();
}
public void UpdateValues()
@ -83,6 +84,7 @@ namespace BizHawk.MultiClient
if (Global.Emulator.CoreOutputComm.CpuTraceAvailable)
{
ClearList();
TraceView.Columns[0].Text = Global.Emulator.CoreOutputComm.TraceHeader;
}
else
{

View File

@ -74,7 +74,7 @@ namespace AMeteor
if (traceenabled)
{
std::stringstream ss;
ss << IOS_TRACE << R(15) << ':' << std::setw(4) << code << " ";
ss << IOS_TRACE << R(15) - 2 << ':' << std::setw(4) << code << " ";
ss.setf(std::ios::left, std::ios::adjustfield);
ss << std::setw(32) << std::setfill(' ') << Disassembler::Instruction(R(15), (uint16_t)code).ToString();
ss.setf(std::ios::right, std::ios::adjustfield);
@ -126,7 +126,7 @@ namespace AMeteor
if (traceenabled)
{
std::stringstream ss;
ss << IOS_TRACE << R(15) << ':' << std::setw(8) << code << ' ';
ss << IOS_TRACE << R(15) - 4 << ':' << std::setw(8) << code << ' ';
ss.setf(std::ios::left, std::ios::adjustfield);
ss << std::setw(32) << std::setfill(' ') << Disassembler::Instruction(R(15), (uint32_t)code).ToString();
ss.setf(std::ios::right, std::ios::adjustfield);