Properly handle result of M68K::step
This commit is contained in:
parent
a0eaccaf7f
commit
1cff8b26ce
18
src/main.rs
18
src/main.rs
@ -171,7 +171,14 @@ fn main() -> Result<(), anyhow::Error> {
|
|||||||
let pc = state.cpu.pc();
|
let pc = state.cpu.pc();
|
||||||
out += &disas_fmt(&mut state.cpu, pc, &state.symbol_tables).0;
|
out += &disas_fmt(&mut state.cpu, pc, &state.symbol_tables).0;
|
||||||
}
|
}
|
||||||
state.cpu.step();
|
match state.cpu.step() {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(bus_error) => {
|
||||||
|
println!("{bus_error}");
|
||||||
|
state.cpu.stopped=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if args.get_flag("print_regs") {
|
if args.get_flag("print_regs") {
|
||||||
out += &format!("{}\n", state.cpu);
|
out += &format!("{}\n", state.cpu);
|
||||||
@ -214,7 +221,14 @@ fn main() -> Result<(), anyhow::Error> {
|
|||||||
let pc = state.cpu.pc();
|
let pc = state.cpu.pc();
|
||||||
out += &disas_fmt(&mut state.cpu, pc, &state.symbol_tables).0;
|
out += &disas_fmt(&mut state.cpu, pc, &state.symbol_tables).0;
|
||||||
}
|
}
|
||||||
state.cpu.step();
|
match state.cpu.step() {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(bus_error) => {
|
||||||
|
println!("{bus_error}");
|
||||||
|
state.cpu.stopped=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out += &format!("{}\n", state.cpu);
|
out += &format!("{}\n", state.cpu);
|
||||||
let pc = state.cpu.pc();
|
let pc = state.cpu.pc();
|
||||||
|
Loading…
Reference in New Issue
Block a user