m64p: fix spacing, add fgrs to tracer

This commit is contained in:
feos 2016-08-21 12:46:29 +03:00
parent 3e7972ee9d
commit 2d8a247bec
4 changed files with 11 additions and 3 deletions

View File

@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
{
// note: the approach this code takes is highly bug-prone
// warning: tracer magically relies on these register names!
var ret = new Dictionary<string, RegisterValue>();
var data = new byte[32 * 8 + 4 + 4 + 8 + 8 + 4 + 4 + 32 * 4 + 32 * 8];
api.getRegisters(data);

View File

@ -40,14 +40,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
sb.Append(string.Format("HI:{0:X8}{1:X8} ", regs["HI_hi"].Value, regs["HI_lo"].Value));
sb.Append(string.Format("FCR0:{0:X8} ", regs["FCR0"].Value));
sb.Append(string.Format("FCR31:{0:X8} ", regs["FCR31"].Value));
// drop co-processor regs for now
for (int i = 0; i < 32; i++) // r0 is always zero
{
UInt64 val = (regs["CP1 FGR REG" + i + "_hi"].Value << 32) | regs["CP1 FGR REG" + i + "_lo"].Value;
sb.Append(string.Format("f{0}:{1:X16} ", i, val));
}
// drop MMU co-processor regs for now
traceInfo.RegisterInfo = sb.ToString().Trim();
Tracer.Put(traceInfo);
}
private const string TraceHeader = "r3400: PC, mnemonic, operands, registers (GPRs, Load/Link Bit, MultHI, MultLO, Implementation/Revision, Control/Status)";
private const string TraceHeader = "r3400: PC, mnemonic, operands, registers (GPRs, Load/Link Bit, MultHI, MultLO, Implementation/Revision, Control/Status, FGRs)";
private void ConnectTracer()
{

View File

@ -687,7 +687,7 @@ db_disasm_insn ( struct r4k_dis_t * state,
break;
case OP_CACHE:
db_printf(state, "%-16s0x%x,0x%x(%s)",
db_printf(state, "%-10s0x%x,0x%x(%s)",
r4k_str_op_name[i.IType.op],
i.IType.rt,
i.IType.imm,

Binary file not shown.