fix: get beeg.gba working again
This commit is contained in:
parent
66ac4050fd
commit
379e667704
|
@ -241,6 +241,7 @@ pub const Arm7tdmi = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.cpsr.mode.write(@enumToInt(next));
|
self.cpsr.mode.write(@enumToInt(next));
|
||||||
|
self.pipe.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fastBoot(self: *Self) void {
|
pub fn fastBoot(self: *Self) void {
|
||||||
|
|
|
@ -13,6 +13,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
const old_carry = @boolToInt(cpu.cpsr.c.read());
|
const old_carry = @boolToInt(cpu.cpsr.c.read());
|
||||||
|
|
||||||
// If certain conditions are met, PC is 12 ahead instead of 8
|
// If certain conditions are met, PC is 12 ahead instead of 8
|
||||||
|
// TODO: What are these conditions? I can't remember
|
||||||
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] += 4;
|
if (!I and opcode >> 4 & 1 == 1) cpu.r[15] += 4;
|
||||||
|
|
||||||
const op1 = if (rn == 0xF) cpu.fakePC() else cpu.r[rn];
|
const op1 = if (rn == 0xF) cpu.fakePC() else cpu.r[rn];
|
||||||
|
@ -127,6 +128,8 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
setArmLogicOpFlags(S, cpu, rd, result);
|
setArmLogicOpFlags(S, cpu, rd, result);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rd == 0xF) cpu.pipe.flush();
|
||||||
}
|
}
|
||||||
}.inner;
|
}.inner;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue