mirror of
https://github.com/gopher64/gopher64.git
synced 2026-11-17 19:24:36 +01:00
fix some small emulation issues (#1391)
This commit is contained in:
1 parent
892ba9175b
commit
24f8acb68e
3 files changed
+3
-2
No files matched your search
@@ -147,7 +147,7 @@ pub fn addi(device: &mut device::Device, opcode: u32) {
|
||||
|
||||
pub fn addiu(device: &mut device::Device, opcode: u32) {
|
||||
device.cpu.gpr[rt(opcode) as usize] =
|
||||
se32(device.cpu.gpr[rs(opcode) as usize] as i32).wrapping_add(se16(imm(opcode) as i16))
|
||||
se32((device.cpu.gpr[rs(opcode) as usize] as i32).wrapping_add(imm(opcode) as i16 as i32))
|
||||
}
|
||||
|
||||
pub fn slti(device: &mut device::Device, opcode: u32) {
|
||||
|
||||
@@ -49,6 +49,7 @@ pub fn get_event(device: &device::Device, name: usize) -> Option<&Event> {
|
||||
|
||||
pub fn remove_event(device: &mut device::Device, name: usize) {
|
||||
device.cpu.events[name].enabled = false;
|
||||
set_next_event(device);
|
||||
}
|
||||
|
||||
fn get_event_handler(name: usize) -> fn(&mut device::Device) {
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ fn dma_write(device: &mut device::Device) {
|
||||
length += 1;
|
||||
}
|
||||
if length <= 0x80 {
|
||||
length -= dram_addr & 0x7;
|
||||
length = length.saturating_sub(dram_addr & 0x7);
|
||||
}
|
||||
|
||||
// check RDP before PI writes to RDRAM
|
||||
|
||||
Reference in new issue
Block a user