From d6fa66174ee5a729609b47ce048189bb2600b60a Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sat, 3 Aug 2019 07:16:24 +0200 Subject: [PATCH] ppcmemory: temporarily fix Nubus ROM mirror reading. --- ppcmemory.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ppcmemory.cpp b/ppcmemory.cpp index e1e86fc..ccea6c5 100644 --- a/ppcmemory.cpp +++ b/ppcmemory.cpp @@ -772,22 +772,21 @@ void address_quickgrab_translate(uint32_t address_grab, uint8_t num_bytes) //regular grabbing else if (address_grab < 0x80000000){ + if ((address_grab >= 0x40000000) && (address_grab < 0x40400000) && is_nubus){ + storage_area = address_grab % rom_file_setsize; + grab_macmem_ptr = machine_sysrom_mem; + ppc_set_return_val(storage_area, num_bytes); + return; + } + if (mpc106_check_membound(address_grab)){ if (address_grab > 0x03ffffff){ //for debug purposes storage_area = address_grab; grab_macmem_ptr = machine_sysram_mem; } else if ((address_grab >= 0x40000000) && (address_grab < 0x40400000)){ - if (is_nubus){ - storage_area = address_grab % rom_file_setsize; - grab_macmem_ptr = machine_sysrom_mem; - ppc_set_return_val(storage_area, num_bytes); - return; - } - else{ - storage_area = address_grab; - grab_macmem_ptr = machine_sysram_mem; - } + storage_area = address_grab; + grab_macmem_ptr = machine_sysram_mem; } else if ((address_grab >= 0x5fffe000) && (address_grab <= 0x5fffffff)){ storage_area = address_grab % 0x2000;