From cbecbc264e391adda09b7c620c3e29a7f038d8a1 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sun, 20 Oct 2019 13:54:42 +0300 Subject: [PATCH] cellGcm: Fix driver_info->memory_size based hw test --- rpcs3/Emu/Cell/lv2/sys_rsx.cpp | 5 +++-- rpcs3/Emu/Cell/lv2/sys_rsx.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp index 1c73fbc6c1..22246f10ac 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp @@ -58,7 +58,7 @@ error_code sys_rsx_device_close() * lv2 SysCall 668 (0x29C): sys_rsx_memory_allocate * @param mem_handle (OUT): Context / ID, which is used by sys_rsx_memory_free to free allocated memory. * @param mem_addr (OUT): Returns the local memory base address, usually 0xC0000000. - * @param size (IN): Local memory size. E.g. 0x0F900000 (249 MB). + * @param size (IN): Local memory size. E.g. 0x0F900000 (249 MB). (changes with sdk version) * @param flags (IN): E.g. Immediate value passed in cellGcmSys is 8. * @param a5 (IN): E.g. Immediate value passed in cellGcmSys is 0x00300000 (3 MB?). * @param a6 (IN): E.g. Immediate value passed in cellGcmSys is 16. @@ -70,6 +70,7 @@ error_code sys_rsx_memory_allocate(vm::ptr mem_handle, vm::ptr mem_add if (u32 addr = vm::falloc(rsx::constants::local_mem_base, size, vm::video)) { + g_fxo->get()->memory_size = size; *mem_addr = addr; *mem_handle = 0x5a5a5a5b; return CELL_OK; @@ -171,7 +172,7 @@ error_code sys_rsx_context_allocate(vm::ptr context_id, vm::ptr lpar_d driverInfo.version_driver = 0x211; driverInfo.version_gpu = 0x5c; - driverInfo.memory_size = 0xFE00000; + driverInfo.memory_size = rsx_cfg->memory_size; driverInfo.nvcore_frequency = 500000000; // 0x1DCD6500 driverInfo.memory_frequency = 650000000; // 0x26BE3680 driverInfo.reportsNotifyOffset = 0x1000; diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.h b/rpcs3/Emu/Cell/lv2/sys_rsx.h index dd844c804c..a9710e0c62 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.h +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.h @@ -103,6 +103,7 @@ struct RsxDisplayInfo struct lv2_rsx_config { + u32 memory_size{}; u32 rsx_event_port{}; u32 context_base{}; u32 device_addr{};