diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.cpp b/rpcs3/Emu/Cell/lv2/sys_memory.cpp index b11c70b44d..77c7d77145 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_memory.cpp @@ -284,9 +284,14 @@ error_code sys_memory_container_create(vm::ptr cid, u32 size) } // Create the memory container - *cid = idm::make(size); + if (const u32 id = idm::make(size)) + { + *cid = id; + return CELL_OK; + } - return CELL_OK; + dct->used -= size; + return CELL_EAGAIN; } error_code sys_memory_container_destroy(u32 cid) diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.h b/rpcs3/Emu/Cell/lv2/sys_memory.h index 64ae6eef5e..29cd5d7bb8 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.h +++ b/rpcs3/Emu/Cell/lv2/sys_memory.h @@ -46,7 +46,7 @@ struct sys_page_attr_t struct lv2_memory_container { - static const u32 id_base = 0x1; // Wrong? + static const u32 id_base = 0x3F000000; static const u32 id_step = 0x1; static const u32 id_count = 16; diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index b039739838..9c03369eb2 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -342,6 +342,7 @@ error_code _sys_ppu_thread_create(vm::ptr thread_id, vm::ptr