paper mario fixes

This commit is contained in:
Logan McNaughton
2023-10-11 17:13:49 -06:00
parent f07a6d2714
commit 80ea6b2c1f
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -122,8 +122,9 @@ pub fn get_handler(address: u32) -> PiHandler {
};
if address >= device::memory::MM_CART_ROM as u32 {
if address >= device::memory::MM_DOM1_ADDR3 as u32 {
panic!("unimplemented handler")
//RW(cart, cart_dom3);
// this should result in all 0's being read/written
handler.read = device::cart_rom::dma_read;
handler.write = device::cart_rom::dma_write;
} else {
handler.read = device::cart_rom::dma_read;
handler.write = device::cart_rom::dma_write;
+3 -1
View File
@@ -238,9 +238,11 @@ pub fn tlb_map(device: &mut device::Device, index: u64) {
pub fn get_physical_address(
device: &mut device::Device,
address: u64,
mut address: u64,
access_type: device::memory::AccessType,
) -> (u64, bool, bool) {
address &= 0xffffffff;
if access_type == device::memory::AccessType::Write {
if device.cpu.cop0.tlb_lut_w[(address >> 12) as usize].address != 0 {
return (