fix: account for pipeline in obscure bios behaviour

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-09-12 23:36:11 -03:00
parent 98bfacd267
commit 85072b5d17
1 changed files with 2 additions and 2 deletions

View File

@ -39,12 +39,12 @@ pub fn read(self: *Self, comptime T: type, r15: u32, addr: u32) T {
}
log.debug("Rejected read since r15=0x{X:0>8}", .{r15});
return @truncate(T, self.uncheckedRead(T, self.addr_latch + 8));
return @truncate(T, self.uncheckedRead(T, self.addr_latch));
}
pub fn dbgRead(self: *const Self, comptime T: type, r15: u32, addr: u32) T {
if (r15 < Self.size) return self.uncheckedRead(T, addr);
return @truncate(T, self.uncheckedRead(T, self.addr_latch + 8));
return @truncate(T, self.uncheckedRead(T, self.addr_latch));
}
fn uncheckedRead(self: *const Self, comptime T: type, addr: u32) T {