From d4c7175910c6d8f0b0069f5d3341de8201769b68 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 14 Aug 2016 01:12:53 +0300 Subject: [PATCH] N64.ITraceable: log non-zero regs still gigantic file for 1 frame todo: implement internal tracer instead --- .../Consoles/Nintendo/N64/N64.ITraceable.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs index 37b09d2572..48689d3d7b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs @@ -28,10 +28,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 var traceInfo = new TraceInfo { - Disassembly = string.Format("{0:X}: {1}", pc, disasm), - RegisterInfo = "" + Disassembly = string.Format("{0:X}: {1}", pc, disasm) }; + var sb = new StringBuilder(); + + foreach (var r in regs) + { + if (r.Value.Value != 0) + sb.Append( + string.Format("{0}:{1} ", + r.Key.Trim(), + r.Value.Value.ToHexString(r.Value.BitSize / 4))); + } + + traceInfo.RegisterInfo = sb.ToString().Trim(); + Put(traceInfo); } }