From b61b04352e72cc5a55f91f1502aa3efbb2f2632f Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 17 Jan 2010 01:16:16 +0000 Subject: [PATCH] Stop Story Mode in F-Zero GX from crashing. Story mode still doesn't work though, it just stops. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4862 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/Memmap.h | 1 + Source/Core/Core/Src/HW/MemmapFunctions.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/Memmap.h b/Source/Core/Core/Src/HW/Memmap.h index 2466ebdd6c..1401c92fdd 100644 --- a/Source/Core/Core/Src/HW/Memmap.h +++ b/Source/Core/Core/Src/HW/Memmap.h @@ -53,6 +53,7 @@ extern u8 *base; // These are guarenteed to point to "low memory" addresses (sub-32-bit). extern u8 *m_pRAM; +extern u8 *m_pEXRAM; extern u8 *m_pL1Cache; enum diff --git a/Source/Core/Core/Src/HW/MemmapFunctions.cpp b/Source/Core/Core/Src/HW/MemmapFunctions.cpp index 2fb7f329e6..77573ca4db 100644 --- a/Source/Core/Core/Src/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/Src/HW/MemmapFunctions.cpp @@ -164,9 +164,9 @@ inline void ReadFromHardware(T &_var, u32 em_address, u32 effective_address, Mem { _var = bswap((*(const T*)&m_pRAM[em_address & RAM_MASK])); } - else if (((em_address & 0xF0000000) == 0x90000000) || + else if (m_pEXRAM && (((em_address & 0xF0000000) == 0x90000000) || ((em_address & 0xF0000000) == 0xD0000000) || - ((em_address & 0xF0000000) == 0x10000000)) + ((em_address & 0xF0000000) == 0x10000000))) { _var = bswap((*(const T*)&m_pEXRAM[em_address & EXRAM_MASK])); }