chore: remove awful ptr casts in backup.zig and bios.zig

This commit is contained in:
2022-05-27 20:24:09 -03:00
parent d4bc1f2cd0
commit 517ed7a835
5 changed files with 13 additions and 23 deletions

View File

@@ -336,11 +336,11 @@ pub const Arm7tdmi = struct {
prettyPrintPsr(&self.spsr);
if (self.cpsr.t.read()) {
const opcode = self.bus.read(u16, self.r[15] - 4);
const opcode = self.bus.debugRead(u16, self.r[15] - 4);
const id = thumbIdx(opcode);
std.debug.print("opcode: ID: 0x{b:0>10} 0x{X:0>4}\n", .{ id, opcode });
} else {
const opcode = self.bus.read(u32, self.r[15] - 4);
const opcode = self.bus.debugRead(u32, self.r[15] - 4);
const id = armIdx(opcode);
std.debug.print("opcode: ID: 0x{X:0>3} 0x{X:0>8}\n", .{ id, opcode });
}