diff --git a/src/device/pif.rs b/src/device/pif.rs index a10be7e..b707e62 100644 --- a/src/device/pif.rs +++ b/src/device/pif.rs @@ -99,7 +99,7 @@ pub fn update_pif_ram(device: &mut device::Device) -> u64 { for k in 0..PIF_CHANNELS_COUNT { active_channels += process_channel(device, k) } - (24000 + (active_channels * 28000)) as u64 + (24000 + (active_channels * 30000)) as u64 } pub fn disable_pif_channel(channel: &mut PifChannel) { diff --git a/src/device/si.rs b/src/device/si.rs index 2a6663f..10643cf 100644 --- a/src/device/si.rs +++ b/src/device/si.rs @@ -59,7 +59,7 @@ pub fn dma_write(device: &mut device::Device) { device::events::create_event( device, device::events::EventType::SI, - device.cpu.cop0.regs[device::cop0::COP0_COUNT_REG as usize] + 5200, //based on https://github.com/rasky/n64-systembench + device.cpu.cop0.regs[device::cop0::COP0_COUNT_REG as usize] + 6000, //based on https://github.com/rasky/n64-systembench dma_event, ) } diff --git a/src/ui/storage.rs b/src/ui/storage.rs index dc2c41a..f708230 100644 --- a/src/ui/storage.rs +++ b/src/ui/storage.rs @@ -148,7 +148,7 @@ pub fn load_saves(ui: &mut ui::Ui) { pub fn write_rom_save(ui: &ui::Ui) { let f = std::fs::File::create(ui.paths.romsave_file_path.clone()).unwrap(); - serde_json::to_writer(f, &ui.saves.romsave).unwrap(); + serde_json::to_writer(f, &ui.saves.romsave.0).unwrap(); } pub fn write_saves(ui: &ui::Ui) {