chore(io): replace some bitfields with enums

This commit is contained in:
2022-10-21 05:12:23 -03:00
parent fd9ffb20b4
commit 4885a86833
2 changed files with 18 additions and 12 deletions

View File

@@ -247,7 +247,7 @@ pub const Arm7tdmi = struct {
pub fn step(self: *Self) u64 {
// If we're halted, the cpu is disabled
if (self.bus.io.is_halted) return 1;
if (self.bus.io.haltcnt == .Halt) return 1;
if (self.cpsr.t.read()) {
const opcode = self.thumbFetch();
@@ -270,7 +270,7 @@ pub const Arm7tdmi = struct {
const should_handle = self.bus.io.ie.raw & self.bus.io.irq.raw;
if (should_handle != 0) {
self.bus.io.is_halted = false;
self.bus.io.haltcnt = .Execute;
// log.info("An Interrupt was Fired!", .{});
// Either IME is not true or I in CPSR is true