mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Simplify the HDRemaster struct, eliminating the need for the g_MemoryEnd variable.
This commit is contained in:
parent
87f6d14abd
commit
da9472c486
6 changed files with 14 additions and 20 deletions
|
@ -29,7 +29,6 @@ extern bool g_DoubleTextureCoordinates;
|
|||
struct HDRemaster {
|
||||
std::string gameID;
|
||||
u64 MemorySize;
|
||||
u64 MemoryEnd; //Seems to be different for each game as well
|
||||
bool DoubleTextureCoordinates;
|
||||
};
|
||||
|
||||
|
@ -38,13 +37,13 @@ struct HDRemaster {
|
|||
// TODO: Do all of the remasters aside from Monster Hunter use double texture coordinates?
|
||||
// TODO: Are all remasters happy with this end address?
|
||||
const struct HDRemaster g_HDRemasters[] = {
|
||||
{ "NPJB40001", 0x4000000, 0x0BBFFFFF, false }, // MONSTER HUNTER PORTABLE 3rd HD Ver.
|
||||
{ "BLJM85002", 0x4000000, 0x0BBFFFFF, true }, // K-ON Houkago Live HD Ver
|
||||
{ "NPJB40002", 0x4000000, 0x0BBFFFFF, true }, // K-ON Houkago Live HD Ver
|
||||
{ "BLJM85003", 0x4000000, 0x0BBFFFFF, true }, // Shin Sangoku Musou Multi Raid 2 HD Ver
|
||||
{ "NPJB40003", 0x4000000, 0x0BBFFFFF, true }, // Shin Sangoku Musou Multi Raid 2 HD Ver
|
||||
{ "BLJM85004", 0x4000000, 0x0BBFFFFF, true }, // Eiyuu Densetsu Sora no Kiseki FC Kai HD Edition
|
||||
{ "NPJB40004", 0x4000000, 0x0BBFFFFF, true }, // Eiyuu Densetsu Sora no Kiseki FC Kai HD Edition
|
||||
{ "BLJM85005", 0x4000000, 0x0BBFFFFF, true }, // Eiyuu Densetsu: Sora no Kiseki SC Kai HD Edition
|
||||
{ "NPJB40005", 0x4000000, 0x0BBFFFFF, true }, // Eiyuu Densetsu: Sora no Kiseki SC Kai HD Edition
|
||||
{ "NPJB40001", 0x4000000, false }, // MONSTER HUNTER PORTABLE 3rd HD Ver.
|
||||
{ "BLJM85002", 0x4000000, true }, // K-ON Houkago Live HD Ver
|
||||
{ "NPJB40002", 0x4000000, true }, // K-ON Houkago Live HD Ver
|
||||
{ "BLJM85003", 0x4000000, true }, // Shin Sangoku Musou Multi Raid 2 HD Ver
|
||||
{ "NPJB40003", 0x4000000, true }, // Shin Sangoku Musou Multi Raid 2 HD Ver
|
||||
{ "BLJM85004", 0x4000000, true }, // Eiyuu Densetsu Sora no Kiseki FC Kai HD Edition
|
||||
{ "NPJB40004", 0x4000000, true }, // Eiyuu Densetsu Sora no Kiseki FC Kai HD Edition
|
||||
{ "BLJM85005", 0x4000000, true }, // Eiyuu Densetsu: Sora no Kiseki SC Kai HD Edition
|
||||
{ "NPJB40005", 0x4000000, true }, // Eiyuu Densetsu: Sora no Kiseki SC Kai HD Edition
|
||||
};
|
||||
|
|
|
@ -57,7 +57,6 @@ u8 *m_pUncachedVRAM;
|
|||
|
||||
// Holds the ending address of the PSP's user space.
|
||||
// Required for HD Remasters to work properly.
|
||||
u32 g_MemoryEnd;
|
||||
u32 g_MemoryMask;
|
||||
u32 g_MemorySize;
|
||||
|
||||
|
@ -101,11 +100,9 @@ void DoState(PointerWrap &p)
|
|||
p.DoMarker("VRAM");
|
||||
p.DoArray(m_pScratchPad, SCRATCHPAD_SIZE);
|
||||
p.DoMarker("ScratchPad");
|
||||
p.Do(g_RemasterMode);
|
||||
p.Do(g_RemasterMode); // TODO: Need to test more if this and MemoryMask need to be saved in the state
|
||||
p.DoMarker("RemasterMode");
|
||||
p.Do(g_MemoryEnd);
|
||||
p.DoMarker("MemoryEnd");
|
||||
p.Do(g_MemoryMask);
|
||||
p.Do(g_MemoryMask);
|
||||
p.DoMarker("MemoryMask");
|
||||
p.Do(g_DoubleTextureCoordinates); // TODO: Is there a more appropriate place for this?
|
||||
p.DoMarker("DoubleTextureCoordinates");
|
||||
|
|
|
@ -83,7 +83,6 @@ extern u8 *m_pUncachedRAM;
|
|||
extern u8 *m_pPhysicalVRAM;
|
||||
extern u8 *m_pUncachedVRAM;
|
||||
|
||||
extern u32 g_MemoryEnd; // End of PSP Userspace
|
||||
extern u32 g_MemorySize; // Replaces RAM_SIZE
|
||||
extern u32 g_MemoryMask; // Replaces RAM_MASK
|
||||
|
||||
|
@ -341,11 +340,12 @@ struct PSPPointer
|
|||
}
|
||||
};
|
||||
|
||||
inline u32 PSP_GetUserMemoryEnd() { return Memory::g_MemoryEnd;}
|
||||
|
||||
inline u32 PSP_GetScratchpadMemoryBase() { return 0x00010000;}
|
||||
inline u32 PSP_GetScratchpadMemoryEnd() { return 0x00014000;}
|
||||
|
||||
inline u32 PSP_GetKernelMemoryBase() { return 0x08000000;}
|
||||
inline u32 PSP_GetUserMemoryEnd() { return PSP_GetKernelMemoryBase() + Memory::g_MemorySize;}
|
||||
inline u32 PSP_GetKernelMemoryEnd() { return 0x08400000;}
|
||||
// "Volatile" RAM is between 0x08400000 and 0x08800000, can be requested by the
|
||||
// game through sceKernelVolatileMemTryLock.
|
||||
|
|
|
@ -75,7 +75,6 @@ void InitMemoryForGameISO(std::string fileToStart) {
|
|||
for(int i = 0; i < ARRAY_SIZE(g_HDRemasters); i++) {
|
||||
if(g_HDRemasters[i].gameID == gameID) {
|
||||
g_RemasterMode = true;
|
||||
Memory::g_MemoryEnd = g_HDRemasters[i].MemoryEnd;
|
||||
Memory::g_MemorySize = g_HDRemasters[i].MemorySize;
|
||||
if(g_HDRemasters[i].DoubleTextureCoordinates)
|
||||
g_DoubleTextureCoordinates = true;
|
||||
|
|
|
@ -76,7 +76,6 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string)
|
|||
|
||||
// Default memory settings
|
||||
// Seems to be the safest place currently..
|
||||
Memory::g_MemoryEnd = 0x0A000000; // End of PSP User space memory
|
||||
Memory::g_MemorySize = 0x2000000; // 32 MB of ram by default
|
||||
g_RemasterMode = false;
|
||||
g_DoubleTextureCoordinates = false;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8b0c30efe52e0c799a99a632e5e743a56375d3ec
|
||||
Subproject commit d1038e00bdcf48e2ab057616bb2ec973980a7b3f
|
Loading…
Add table
Reference in a new issue