mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
IOS: Clear 0-0x3fff when setting up low MEM1 constants
Low MEM1 is cleared by IOS before all the other constants are written. This will overwrite the Gecko code handler but it should be fine because HLE::Reload (which will set up the code handler hook again) will be called after a title change is detected.
This commit is contained in:
parent
be500a98e2
commit
011f7789e0
@ -137,6 +137,12 @@ static bool SetupMemory(u64 ios_title_id, MemorySetupType setup_type)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This region is typically used to store constants (e.g. game ID, console type, ...)
|
||||||
|
// and system information (see below).
|
||||||
|
constexpr u32 LOW_MEM1_REGION_START = 0;
|
||||||
|
constexpr u32 LOW_MEM1_REGION_SIZE = 0x3fff;
|
||||||
|
Memory::Memset(LOW_MEM1_REGION_START, 0, LOW_MEM1_REGION_SIZE);
|
||||||
|
|
||||||
Memory::Write_U32(target_imv->mem1_physical_size, ADDR_MEM1_SIZE);
|
Memory::Write_U32(target_imv->mem1_physical_size, ADDR_MEM1_SIZE);
|
||||||
Memory::Write_U32(target_imv->mem1_simulated_size, ADDR_MEM1_SIM_SIZE);
|
Memory::Write_U32(target_imv->mem1_simulated_size, ADDR_MEM1_SIM_SIZE);
|
||||||
Memory::Write_U32(target_imv->mem1_end, ADDR_MEM1_END);
|
Memory::Write_U32(target_imv->mem1_end, ADDR_MEM1_END);
|
||||||
|
Loading…
Reference in New Issue
Block a user