mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
commit
4b356998f2
@ -541,6 +541,14 @@ VirtualMemoryBlock::VirtualMemoryBlock() : MemoryBlock()
|
||||
{
|
||||
}
|
||||
|
||||
MemoryBlock* VirtualMemoryBlock::SetRange(const u64 start, const u32 size)
|
||||
{
|
||||
range_start = start;
|
||||
range_size = size;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
bool VirtualMemoryBlock::IsInMyRange(const u64 addr)
|
||||
{
|
||||
return addr >= GetStartAddr() && addr < GetStartAddr() + GetSize() - GetResevedAmount();
|
||||
|
@ -231,6 +231,7 @@ class VirtualMemoryBlock : public MemoryBlock
|
||||
public:
|
||||
VirtualMemoryBlock();
|
||||
|
||||
virtual MemoryBlock* SetRange(const u64 start, const u32 size);
|
||||
virtual bool IsInMyRange(const u64 addr);
|
||||
virtual bool IsInMyRange(const u64 addr, const u32 size);
|
||||
virtual bool IsMyAddress(const u64 addr);
|
||||
|
@ -74,7 +74,7 @@ int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress)
|
||||
|
||||
InitOffsetTable();
|
||||
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);
|
||||
|
||||
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
|
||||
if(io = Memory.RSXIOMem.Map(ea, size, 0))
|
||||
{
|
||||
// convert to offset
|
||||
io = io - Memory.RSXIOMem.GetStartAddr();
|
||||
|
||||
//fill the offset table
|
||||
for(u32 i=0; i<(size >> 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);
|
||||
}
|
||||
|
||||
offset = io;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u32 arg, int prio, u32
|
||||
|
||||
CPUThread& new_thread = Emu.GetCPU().AddThread(CPU_THREAD_PPU);
|
||||
|
||||
Memory.Write32(thread_id_addr, new_thread.GetId());
|
||||
Memory.Write64(thread_id_addr, new_thread.GetId());
|
||||
new_thread.SetEntry(entry);
|
||||
new_thread.SetArg(0, arg);
|
||||
new_thread.SetPrio(prio);
|
||||
@ -175,6 +175,6 @@ int sys_ppu_thread_get_id(const u32 id_addr)
|
||||
{
|
||||
sysPrxForUser.Log("sys_ppu_thread_get_id(id_addr=0x%x)", id_addr);
|
||||
|
||||
Memory.Write32(id_addr, GetCurrentPPUThread().GetId());
|
||||
Memory.Write64(id_addr, GetCurrentPPUThread().GetId());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user