diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-08 21:56:43 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-08 21:56:43 +0200 |
| commit | 466dcce47cc1158d5d92a66119d4d89fe657e356 (patch) | |
| tree | 53c85116d480eee768bdf4521c6eb2bd58a6d816 /crates/runrom/src/main.rs | |
| parent | 6b4f6e26bb5fc2e2ba52e87960ef1c2e242dea50 (diff) | |
| download | tools.nes-466dcce47cc1158d5d92a66119d4d89fe657e356.tar.gz tools.nes-466dcce47cc1158d5d92a66119d4d89fe657e356.zip | |
runrom: regularize the output on report
Make the hexadecimal values more cohesive and avoid having a
variable-sized line because of them.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'crates/runrom/src/main.rs')
| -rw-r--r-- | crates/runrom/src/main.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crates/runrom/src/main.rs b/crates/runrom/src/main.rs index 9671a0b..4d94384 100644 --- a/crates/runrom/src/main.rs +++ b/crates/runrom/src/main.rs @@ -328,10 +328,17 @@ fn run( title = true; } - println!( - "[${:X}] = ${:02X} [reads={}, writes={}]", - idx, cell.value, cell.reads, cell.writes - ); + if idx > 0xFF { + println!( + "[${:04X}] = ${:02X} [reads={}, writes={}]", + idx, cell.value, cell.reads, cell.writes + ); + } else { + println!( + " [${:02X}] = ${:02X} [reads={}, writes={}]", + idx, cell.value, cell.reads, cell.writes + ); + } } } } |
