mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Memory cleanup, page flags implemented
RSXCMDMem, SPRXMem, MmaperMem removed MainMem range fixed
This commit is contained in:
parent
0eebfb0aaa
commit
267de68441
23 changed files with 259 additions and 260 deletions
|
|
@ -30,16 +30,12 @@ namespace vm
|
|||
class MemoryBase
|
||||
{
|
||||
std::vector<MemoryBlock*> MemoryBlocks;
|
||||
u32 m_pages[0x100000000 / 4096]; // information about every page
|
||||
|
||||
public:
|
||||
MemoryBlock* UserMemory;
|
||||
|
||||
DynamicMemoryBlock MainMem;
|
||||
DynamicMemoryBlock SPRXMem;
|
||||
DynamicMemoryBlock PRXMem;
|
||||
DynamicMemoryBlock RSXCMDMem;
|
||||
DynamicMemoryBlock MmaperMem;
|
||||
DynamicMemoryBlock Userspace;
|
||||
DynamicMemoryBlock RSXFBMem;
|
||||
DynamicMemoryBlock StackMem;
|
||||
MemoryBlock* RawSPUMem[(0x100000000 - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET];
|
||||
|
|
@ -82,27 +78,6 @@ public:
|
|||
|
||||
void Init(MemoryType type);
|
||||
|
||||
bool IsGoodAddr(const u32 addr)
|
||||
{
|
||||
return m_pages[addr / 4096] != 0; // TODO: define page parameters
|
||||
}
|
||||
|
||||
bool IsGoodAddr(const u32 addr, const u32 size)
|
||||
{
|
||||
if (!size || addr + size - 1 < addr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (u32 i = addr / 4096; i <= (addr + size - 1) / 4096; i++)
|
||||
{
|
||||
if (!m_pages[i]) return false; // TODO: define page parameters
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void Close();
|
||||
|
||||
__noinline void WriteMMIO32(u32 addr, const u32 data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue