Fix cellGcm HLE regression

Also correct flags.
This commit is contained in:
Eladash 2019-10-21 23:07:50 +03:00 committed by kd-11
parent 945abcc6cd
commit 586fe11e22
3 changed files with 9 additions and 4 deletions

View File

@ -969,8 +969,7 @@ s32 gcmMapEaIoAddress(u32 ea, u32 io, u32 size, bool is_strict)
return CELL_GCM_ERROR_FAILURE;
}
// TODO: Pass correct flags and context
if (s32 error = sys_rsx_context_iomap(0, io, ea, size, 0))
if (s32 error = sys_rsx_context_iomap(0x55555555, io, ea, size, 0xe000000000000800ull | (u64{is_strict} << 60)))
{
return error;
}
@ -1035,7 +1034,7 @@ s32 cellGcmMapMainMemory(u32 ea, u32 size, vm::ptr<u32> offset)
{
if (unmap_count >= (size >> 20))
{
if (s32 error = sys_rsx_context_iomap(0, io << 20, ea, size, 0))
if (s32 error = sys_rsx_context_iomap(0x55555555, io << 20, ea, size, 0xe000000000000800ull))
{
return error;
}

View File

@ -56,6 +56,12 @@ struct RsxDriverInfo
static_assert(sizeof(RsxDriverInfo) == 0x12F8, "rsxSizeTest");
static_assert(sizeof(RsxDriverInfo::Head) == 0x40, "rsxHeadSizeTest");
enum : u64
{
// Unused
SYS_RSX_IO_MAP_IS_STRICT = 1ull << 60
};
struct RsxDmaControl
{
u8 resv[0x40];

View File

@ -50,7 +50,7 @@ namespace rsx
get_current_renderer()->main_mem_size = buffer_size;
if (sys_rsx_context_iomap(contextInfo->context_id, 0, user_mem_addr, buffer_size, 0) != CELL_OK)
if (sys_rsx_context_iomap(contextInfo->context_id, 0, user_mem_addr, buffer_size, 0xf000000000000800ull) != CELL_OK)
fmt::throw_exception("Capture Replay: rsx io mapping failed!");
return contextInfo->context_id;