fix: reimpl debug reads w/out throwing away *const Self

This commit is contained in:
2022-08-07 05:11:29 -05:00
parent 5a18b1dcc7
commit 739db99c83
6 changed files with 155 additions and 76 deletions

View File

@@ -137,7 +137,7 @@ pub const Logger = struct {
if (arm7tdmi.cpsr.t.read()) {
if (opcode >> 11 == 0x1E) {
// Instruction 1 of a BL Opcode, print in ARM mode
const low = arm7tdmi.bus.debugRead(u16, arm7tdmi.r[15]);
const low = arm7tdmi.bus.dbgRead(u16, arm7tdmi.r[15]);
const bl_opcode = @as(u32, opcode) << 16 | low;
self.print(arm_fmt, Self.fmtArgs(arm7tdmi, bl_opcode)) catch @panic("failed to write to log file");