Skip to content

Commit

Permalink
deconstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
pineman committed May 22, 2024
1 parent 324e632 commit aaf16a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fpt-egui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,17 @@ impl FPT {
self.debug_console
.push(format!("> {}", self.debug_console_cmd));
if self.debug_console_cmd == "d" {
self.gb.cpu().decode_ahead(5).iter().for_each(|inst| {
self.gb.cpu().decode_ahead(5).iter().for_each(|(pc, inst)| {
let args = self
.gb
.bus()
.copy_range((inst.0 as usize)..((inst.0 + inst.1.size as u16) as usize))
.copy_range((*pc as usize)..((pc + inst.size as u16) as usize))
.iter()
.fold(String::new(), |acc, &b| acc + &format!("{:#02X} ", b))
.trim()
.to_string();
self.debug_console
.push(format!("{:#06X}: {} ({})", inst.0, inst.1.mnemonic, args));
.push(format!("{:#06X}: {} ({})", pc, inst.mnemonic, args));
});
}
self.debug_console_last_cmd
Expand Down

0 comments on commit aaf16a1

Please sign in to comment.