Commit Graph
176 Commits
Author SHA1 Message Date
J1coding 2f3f28faae Patch: stop cheats filed as patches applying under Hardcore
A skip cutscene cheat for God of War 2 keeps working with RetroAchievements
Hardcore active. It is not a user file. It ships in our own patches.zip:

  gametitle=God of War 2 (SCUS-97481)
  [Widescreen 16:9]  gsaspectratio=16:9  patch=1,EE,00234A48,word,46000406
  [Skip Cutscenes]   author=Ezedequias   patch=1,EE,202D8194,byte,01

Hardcore only ever gated the cheats side. ReloadEnabledLists empties the enabled
cheats list, the on-disk walk skips the cheats folder, and the cheat enable call
sits behind EnableCheats. The patches list gets none of that: it is re-read
verbatim and applied unconditionally, not even behind EnablePatches. Anything
filed as a patch has always been exempt, and place=1 reapplies it every vsync.

Neither of the obvious rules can separate those two groups. They live in the same
pnach, so file location cannot, and the widescreen one writes EE memory too, so
"block memory writes" would take widescreen with it. What does separate them is
whether the group says what it is for. gsaspectratio or gsinterlacemode means
widescreen or no-interlacing, which we deliberately keep working under Hardcore.
A group that declares nothing and only writes memory is a cheat whatever its
label says.

Measured against the shipped database before settling on it: 1284 groups declare
presentation and stay, 478 write memory with nothing declared and now stop. The
ones that stop read like Car select, Auto-activate analogs and Throttle/brake on
right stick. On the reported game, Widescreen 16:9 stays and Skip Cutscenes goes.

The check runs at group selection rather than against the enable list, because an
unlabelled group never consults that list and would have sailed through a filter
applied there.

GameDB patches are left alone on purpose. They are a curated compatibility layer,
and dropping them under Hardcore would break games instead of stopping cheating.

Worth knowing what this does not cover: a pnach author can still launder a cheat
by pasting a gsaspectratio line into the group. That stops shipped and accidental
content, not somebody determined to cheat themselves.
2026-07-29 23:57:58 +02:00
jpolo1224 41e91adf0b Android: hardcore patches, overscan crop, OSD colour, fast-forward, frontend launch
Patches under RetroAchievements hardcore: the gate dropped every on-disk pnach,
which is asymmetric with the fallback below it - the bundled patches.zip stays
enabled in hardcore, so a widescreen or bug-fix patch worked from the archive and
silently did nothing from disk, killing everything the in-app Patch Manager
writes. Gate cheats only; they remain blocked at enumeration and in
ReloadEnabledLists, and the two feed separate stores.

Overscan crop (issue #293): the core has always honoured GSConfig.Crop but
Android never exposed it. Four sliders in native PS2 pixels, so a value means the
same thing at any upscale multiplier.

Custom OSD colour: new GSOptions::OsdColor, with the ImGui overlay drawing from
it instead of a hardcoded white.

Fast-forward now uses Unlimited rather than Turbo. Turbo caps at
EmulationSpeed.TurboScalar (2.0x) and produced no visible speed-up on these
devices while "frame limit off" - the same Unlimited mode - demonstrably did.
Settings.applyTo() also forced the limiter back to 0/3 on every apply, cancelling
an active fast-forward while the UI still reported it on; it now preserves the
latch like the in-game overlay path already did.

Per-game settings when launching from a frontend: an external launch passed a
null GameInfo, so settingsKey was null and launchGame resolved global settings -
per-game settings, per-game memory cards and per-game orientation all ignored,
while the same title from our own library applied them. Build a GameInfo for the
incoming URI, probing the serial off the image the way the library scan does.

(cherry picked from commit 7c16cbfa13)
2026-07-19 21:04:34 -04:00
KamFretoZ f5524bab1b Qt/Patch: Cleanup Unused headers and formatting 2026-03-11 16:15:30 +01:00
chaoticgd 27e9accffa Patch: Check all the pointers in a chain for null values 2026-03-09 22:18:53 -04:00
chaoticgd 4f41366600 Patch: Properly skip past pointer write commands if pointer is null 2026-03-09 22:18:53 -04:00
chaoticgd d26701c004 Patch: Reset extended code state (e.g. skip counter) between groups 2026-03-09 22:18:53 -04:00
chaoticgd d7983d81e3 Patch: Use idempotent writes for extended codes 2026-03-09 22:18:53 -04:00
chaoticgd 2e122c3255 Patch: Add unit tests 2026-03-09 22:18:53 -04:00
chaoticgd eef1f837a2 Patch: Use the new MemoryInterface classes to apply patches 2026-03-09 22:18:53 -04:00
chaoticgd aeb1d500df Patch: Show correct place value when mixing labelled/unlabelled patches 2026-02-12 10:46:26 -05:00
SternXD d983b2b066 Copyright: Change year from 2002-2025 to 2002-2026 2026-01-15 00:22:32 +01:00
KamFretoZ 213569f3d7 Deps: Remove version number from fontawesome 2026-01-12 12:05:17 +01:00
chaoticgd 5c123f3183 Patch: Fix bug causing the UI to show the wrong place value 2025-12-15 14:20:58 -05:00
chaoticgd cd120c3cfd Patch: Restore original behaviour of PPT_ONCE_ON_LOAD, add new PPT_ON_LOAD_OR_WHEN_ENABLED place option, and display when a patch is applied in the GUI (#13698) 2025-12-14 09:09:53 -05:00
Ty Lamontagne 38a35043a8 GS/Patches: Explicitly cast non-trivially copyable types during memset / memcpy
Warning fixes
2025-11-21 18:20:58 -05:00
chaoticgd 906ac6a8ea Patch: Fix some incorrect format strings 2025-10-20 15:38:33 +02:00
KamFretoZ d34d2af849 OSD: Add ability to show the amount of activated patches 2025-10-04 01:59:41 +02:00
chaoticgd 1d068ffde9 Patch: Clear R5900 recompiler cache after updating dynamic patches 2025-09-25 11:08:01 -04:00
TheLastRarandKamFretoZ 888e024d0c 3rdparty: Update FontAwesome to 6.7.2
Co-Authored-By: KamFretoZ <14798312+kamfretoz@users.noreply.github.com>
2025-07-05 20:01:42 -05:00
Filoppi 01849d5305 GS: Allow for widescreen and ultrawide patches to specify their target aspect ratio.
This allows users with monitors of any aspect ratios to use patches made for any other aspect ratio.
For example, if on 32:9 one uses a 21:9 patch, pcsx2 will automatically size the presentation to 21:9 within 32:9.
This also removes some ugly or hardcoded stuff from the code :).
It also opens the door to add a "Custom" user aspect ratio, without the patch needing to specify the aspect ratio, so users could stretch the image to any AR they'd like, but for now there's no need to add that.

(cherry picked from commit 3ae2520aa19efe32d8d0c12b2b174dcd3d3bc745)
2025-04-22 21:36:50 -04:00
TheTechnician27 23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
Silent 534ddd80ae Patch: When serial is empty, don't match files on empty serial
Fixes a bug where _crc.pnach files matched the regex if serial
was not set. Also grey out "All CRCs" when serial is not set,
as the option is then meaningless.
2025-01-11 09:04:51 -05:00
Silent 3b5b3ffa91 Patch: Re-run PPT_ONCE_ON_LOAD patches when enabling them as the game is running 2025-01-08 18:30:51 -05:00
Silent f7ba355697 Qt/Patches: Make WS/NI patches tri-state in the Patches screen, so disabling them per-game is possible
This solves a long-standing issue where globally enabled
widescreen/no-interlace patches visually appeared as disabled
on the patches list, but they were in fact enabled and could NOT be
disabled per-game.
2024-12-29 14:03:56 -05:00
Silent c334040a96 Partially revert "Qt/Patches: Get rid of the global WS/NI toggle"
This reverts commit cc9f7e723a.
2024-12-29 14:03:56 -05:00