mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
fix cellGcmMapMainMemory
This commit is contained in:
parent
14c7c63e34
commit
f260d1c602
1 changed files with 6 additions and 1 deletions
|
@ -74,7 +74,7 @@ int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress)
|
||||||
|
|
||||||
InitOffsetTable();
|
InitOffsetTable();
|
||||||
Memory.RSXCMDMem.Alloc(cmdSize);
|
Memory.RSXCMDMem.Alloc(cmdSize);
|
||||||
Memory.MemoryBlocks.push_back(Memory.RSXIOMem.SetRange(0xE0000000, 0x10000000/*256MB*/));//TODO: implement allocateAdressSpace in memoryBase
|
Memory.MemoryBlocks.push_back(Memory.RSXIOMem.SetRange(0x50000000, 0x10000000/*256MB*/));//TODO: implement allocateAdressSpace in memoryBase
|
||||||
cellGcmMapEaIoAddress(ioAddress, 0, ioSize);
|
cellGcmMapEaIoAddress(ioAddress, 0, ioSize);
|
||||||
|
|
||||||
u32 ctx_begin = ioAddress/* + 0x1000*/;
|
u32 ctx_begin = ioAddress/* + 0x1000*/;
|
||||||
|
@ -702,12 +702,17 @@ int32_t cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset)
|
||||||
//check if the mapping was successfull
|
//check if the mapping was successfull
|
||||||
if(io = Memory.RSXIOMem.Map(ea, size, 0))
|
if(io = Memory.RSXIOMem.Map(ea, size, 0))
|
||||||
{
|
{
|
||||||
|
// convert to offset
|
||||||
|
io = io - Memory.RSXIOMem.GetStartAddr();
|
||||||
|
|
||||||
//fill the offset table
|
//fill the offset table
|
||||||
for(u32 i=0; i<(size >> 20); i++)
|
for(u32 i=0; i<(size >> 20); i++)
|
||||||
{
|
{
|
||||||
Memory.Write16(offsetTable.io + ((ea >> 20) + i)*sizeof(u16), (io >> 20) + i);
|
Memory.Write16(offsetTable.io + ((ea >> 20) + i)*sizeof(u16), (io >> 20) + i);
|
||||||
Memory.Write16(offsetTable.ea + ((io >> 20) + i)*sizeof(u16), (ea >> 20) + i);
|
Memory.Write16(offsetTable.ea + ((io >> 20) + i)*sizeof(u16), (ea >> 20) + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
offset = io;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue