Commit 5c737031 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Refactor isOnRAM - backport of...

Refactor isOnRAM - backport of https://github.com/flyinghead/flycast/commit/632731bedee26e7e786bcfbe83fd09bd6c481958
parent 330176fa
......@@ -333,19 +333,6 @@ u8* GetMemPtr(u32 Addr,u32 size)
}
}
bool IsOnRam(u32 addr)
{
if (((addr>>26)&0x7)==3)
{
if ((((addr>>29) &0x7)!=7) && (((addr>>29) &0x7)!=3))
{
return true;
}
}
return false;
}
static bool interpreterRunning = false;
void SetMemoryHandlers()
......
......@@ -69,7 +69,11 @@ void mem_map_default();
//For debugger(gdb) - dynarec
u8* GetMemPtr(u32 Addr,u32 size);
bool IsOnRam(u32 addr);
static inline bool IsOnRam(u32 addr)
{
// in area 3 but not in P4
return ((addr >> 26) & 7) == 3 && ((addr >> 29) & 7) != 7;
}
bool LoadRomFiles(const string& root);
void SaveRomFiles(const string& root);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment