From 8f8d4687741d39bc9e2adb3d2d722f9f5f87e08b Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Tue, 13 Jan 2026 05:44:50 +0200 Subject: [PATCH] rsx/gcm: Fix cellGcmGetTimeStampLocation --- rpcs3/Emu/Cell/Modules/cellGcmSys.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp index ac8183b689..d9fc8be3d3 100644 --- a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp @@ -230,6 +230,7 @@ u32 cellGcmGetReportDataLocation(u32 index, u32 location) cellGcmSys.warning("cellGcmGetReportDataLocation(index=%d, location=%d)", index, location); vm::ptr report = cellGcmGetReportDataAddressLocation(index, location); + ensure(!!report); return report->value; } @@ -237,18 +238,9 @@ u64 cellGcmGetTimeStampLocation(u32 index, u32 location) { cellGcmSys.trace("cellGcmGetTimeStampLocation(index=%d, location=%d)", index, location); - if (location == CELL_GCM_LOCATION_LOCAL) - { - return cellGcmGetTimeStamp(index); - } - - if (index >= 1024 * 1024) - { - cellGcmSys.error("cellGcmGetTimeStampLocation: Wrong main index (%d)", index); - } - - const auto address = gcmIoOffsetToAddress(0x0e000000 + index * 0x10); - return *vm::get_super_ptr(address); + vm::ptr report = cellGcmGetReportDataAddressLocation(index, location); + ensure(!!report); + return vm::get_super_ptr(report.addr())->timer; } //----------------------------------------------------------------------------