mirror of
https://github.com/FranLMSP/snes.git
synced 2026-08-03 08:30:01 -04:00
print status flags
This commit is contained in:
@@ -185,6 +185,13 @@ impl Registers {
|
||||
self.d as u8
|
||||
}
|
||||
|
||||
pub fn is_emu_mode_flag_exposed(&self) -> bool {
|
||||
match self.exposed_bit_zero {
|
||||
ModeFlag::Carry => false,
|
||||
ModeFlag::EmulationMode => true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn exchange_carry_and_emulation(&mut self) {
|
||||
match self.exposed_bit_zero {
|
||||
ModeFlag::Carry => {
|
||||
|
||||
@@ -333,6 +333,11 @@ fn main() {
|
||||
ui.text(format!("PC: | {:#06X}", emulator.cpu.registers.pc));
|
||||
ui.text(format!("EMU MODE: | {}", emulator.cpu.registers.emulation_mode));
|
||||
ui.text(format!("CARRY: | {}", emulator.cpu.registers.carry));
|
||||
ui.separator();
|
||||
ui.text("Status flags:");
|
||||
ui.text(format!(" E (exposed: {})", emulator.cpu.registers.is_emu_mode_flag_exposed()));
|
||||
ui.text("NVMXDIZC");
|
||||
ui.text(format!("{:08b}", emulator.cpu.registers.p));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user