Add HD Remaster support. It's a HUGE hack right now, and needs to be properly rewritten so that allocation and stuff work better. This is based off the work of BlackDaemon, and I added in the auto check to switch the code on/off depending on if the game is a remaster or not. It does not affect or break any games that I know of.
This commit is contained in:
parent
c743e02851
commit
f8d309ec99
9 changed files with 111 additions and 4 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "MIPS/MIPS.h"
|
||||
|
||||
#include "Core/HDRemaster.h"
|
||||
|
||||
// TODO: Fix this
|
||||
#undef ENABLE_MEM_CHECK
|
||||
|
||||
|
@ -45,6 +47,10 @@ u8 *GetPointer(const u32 address)
|
|||
{
|
||||
return m_pRAM + (address & RAM_MASK);
|
||||
}
|
||||
else if (g_RemasterMode && (address & 0x3E000000) != 0x08000000)
|
||||
{
|
||||
return m_pRAM + (address & RAM_MASK);
|
||||
}
|
||||
else if ((address & 0x3F800000) == 0x04000000)
|
||||
{
|
||||
return m_pVRAM + (address & VRAM_MASK);
|
||||
|
@ -76,6 +82,10 @@ inline void ReadFromHardware(T &var, const u32 address)
|
|||
{
|
||||
var = *((const T*)&m_pRAM[address & RAM_MASK]);
|
||||
}
|
||||
else if (g_RemasterMode && (address & 0x3E000000) != 0x08000000)
|
||||
{
|
||||
var = *((const T*)&m_pRAM[address & RAM_MASK]);
|
||||
}
|
||||
else if ((address & 0x3F800000) == 0x04000000)
|
||||
{
|
||||
var = *((const T*)&m_pVRAM[address & VRAM_MASK]);
|
||||
|
@ -109,6 +119,10 @@ inline void WriteToHardware(u32 address, const T data)
|
|||
{
|
||||
*(T*)&m_pRAM[address & RAM_MASK] = data;
|
||||
}
|
||||
else if (g_RemasterMode && (address & 0x3E000000) != 0x08000000)
|
||||
{
|
||||
*(T*)&m_pRAM[address & RAM_MASK] = data;
|
||||
}
|
||||
else if ((address & 0x3F800000) == 0x04000000)
|
||||
{
|
||||
*(T*)&m_pVRAM[address & VRAM_MASK] = data;
|
||||
|
@ -139,6 +153,10 @@ bool IsValidAddress(const u32 address)
|
|||
{
|
||||
return true;
|
||||
}
|
||||
else if (g_RemasterMode && (address & 0x3E000000) != 0x08000000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((address & 0x3F800000) == 0x04000000)
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue