summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-04-20 01:54:44 +0300
committerOxore <oxore@protonmail.com>2023-04-20 01:58:22 +0300
commit4bf92c651d761eb9749f4ca6eae38f57cbe8ea75 (patch)
treea7d382643298795378c70d828a7eeab4766b6c38 /main.cpp
parent09ea96e0d2fc82147603259c3b1bcbe30f586164 (diff)
Use %08x for all offsets
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.cpp b/main.cpp
index 0e7b63d..6dcb669 100644
--- a/main.cpp
+++ b/main.cpp
@@ -71,7 +71,7 @@ struct DisasmNode {
static size_t disasm_verbatim(
char *out, size_t out_sz, uint16_t instr, uint32_t offset, const DataBuffer &)
{
- snprintf(out, out_sz, " .short 0x%04x | traced @%08" PRIx32 "\n", instr, offset);
+ snprintf(out, out_sz, " .short 0x%04x | traced @%08x\n", instr, offset);
return kInstructionSizeStepBytes;
}
@@ -79,19 +79,19 @@ static size_t disasm_mfff0_v4e70(
char *out, size_t out_sz, uint16_t instr, uint32_t offset, const DataBuffer &code)
{
if (instr == 0x4e70) {
- snprintf(out, out_sz, " reset | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " reset | %04x @%08x\n", instr, offset);
} else if (instr == 0x4e71) {
- snprintf(out, out_sz, " nop | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " nop | %04x @%08x\n", instr, offset);
} else if (instr == 0x4e72) {
- snprintf(out, out_sz, " .short 0x%04x | stop (not implemented) @%08" PRIx32 "\n", instr, offset);
+ snprintf(out, out_sz, " .short 0x%04x | stop (not implemented) @%08x\n", instr, offset);
} else if (instr == 0x4e73) {
- snprintf(out, out_sz, " rte | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " rte | %04x @%08x\n", instr, offset);
} else if (instr == 0x4e75) {
- snprintf(out, out_sz, " rts | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " rts | %04x @%08x\n", instr, offset);
} else if (instr == 0x4e76) {
- snprintf(out, out_sz, " trapv | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " trapv | %04x @%08x\n", instr, offset);
} else if (instr == 0x4e77) {
- snprintf(out, out_sz, " rtr | %04x @%04x\n", instr, offset);
+ snprintf(out, out_sz, " rtr | %04x @%08x\n", instr, offset);
} else {
return disasm_verbatim(out, out_sz, instr, offset, code);
}