Commit Graph

139 Commits

Author SHA1 Message Date
Dan McCarthy 6b12ca5b39 CheatsSettings/PatchSettings: Add toggle for showing All CRCs
This used to be off by default, but was changed to show found patches/cheats for all CRCs for a game serial. However, this also clutters and shows cheats for CRCs that may not be applicable without a way to hide them.

This puts this setting behind a toggle to choose if this should be enabled/disabled so the user has choice. Still defaults to enabled to keep current behavior.
2024-01-04 23:29:19 +00:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Dan McCarthy f0bf525cf4 Qt: Addresses typo in duplicate Patch console log warning
Fixed unintentionally non-sensical wording in log warning to inform the user that a patch was skipped over since a patch with the same name had already been loaded.
2023-12-04 16:23:40 +10:00
Dan McCarthy 45758add5d Use consistent snake_case naming & don't pass string_view by ref
Addresses feedback to use consistent naming conventions as most variables are using snake_case. Also no longer passes string_view by reference as per feedback.
2023-12-04 16:23:40 +10:00
Dan McCarthy 57465b2892 Qt: Clarifies wording of Patch log for disabling duplicate patch
Adds a better worded log statement for informing the user that a patch with a duplicate name was found and not loaded to avoid conflict.

The common expected reason this can happen is a bundled patch having the same name as a /patches/ pnach patch having the same name. By default it will prioritize the folder patch over the bundled patch.

Makes it more clear/less confusing in phrasing.
2023-12-04 16:23:40 +10:00
Dan McCarthy 8a95eecf60 Qt: Use const patch lists for ContainsPatchName 2023-12-04 16:23:40 +10:00
Dan McCarthy 766b0ba9c8 Qt: Update to use string_view references & const
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
2023-12-04 16:23:40 +10:00
Dan McCarthy a6796fe80a Qt: Improves wording of patch skipping log 2023-12-04 16:23:40 +10:00
Dan McCarthy 5e450388f9 Qt: Fix final return condition for PatchStringHasUnlabelledPatch 2023-12-04 16:23:40 +10:00
Dan McCarthy cc62825081 Qt: Fix console warning about hiding bundled patches
Fixes syntax error with console write format to display warning when bundled patches are hidden due to unlabeled patches being loaded.
2023-12-04 16:23:40 +10:00
Dan McCarthy 96a9e8a090 Qt: Display patch folder patches & .zip patches if no name collision
Currently if one has patches from the patch folder, no bundled patches from the .zip file will be displayed.

This changes it so that we can display both the folder patches AND the .zip bundled patches as long as their names don't collide. If there's a collision, the folder patch will override the bundled patch.

Also, if an unlabeled patch is loaded from the folder then all bundled patches will be hidden (like they did prior) since we can't guarantee there's no collision.
2023-12-04 16:23:40 +10:00
Stenzek 606cbb3883 System: Simplify memory allocation 2023-10-10 18:01:30 +10:00
Stenzek 10ec91065e Achievements: Switch to rc_client 2023-09-24 11:22:22 +10:00
Stenzek 388e488bc1 Qt: Add Edit Cheats/Patches to Tools menu
Closes #4634.
2023-09-10 11:19:53 +10:00
Stenzek cd4daa115f Misc: Swap from gsl::span to std::span 2023-07-20 21:23:31 +10:00
Stenzek 296dcccd81 Misc: Fix a bunch of issues preventing C++20 compilation 2023-07-20 21:23:31 +10:00
Stenzek ba3b43c66c Qt: Show cheats/patches for all CRCs in game properties
Not just the primary/disc ELF.

Also get rid of duplicates from the list.
2023-07-15 12:08:53 +10:00
Stenzek ff23f87010 FullscreenUI: Add patches/cheats to game settings 2023-06-25 01:52:56 +10:00
RedPanda4552 0a58783a86 Translations: Fix missing context marker on Manual Hardware Fixes string
Fixes CTD when OSD messages print
2023-06-20 21:19:07 +01:00
Stenzek c06bc16b22 Misc: Mark core strings for translation 2023-06-20 22:46:00 +10:00
Stenzek 36c27188a4 VMManager: Refactor and improve boot process
[SAVEVERSION+] VM struct changes.

 - Serial/title is now linked to disc, instead of running ELF.
 - Save states can be created during BIOS boot.
 - Patches now apply based on the executing CRC, and only after the
   entry point starts executing (fixes multi-game discs).
 - Add "Fast Forward Boot" option.
 - Split achievements download and activation, downloads occur on
   initialization, but are not activated until after the ELF loads.
 - Prevent HostFS access while in PS1 mode.
 - Remove multiple sources of truth for ELF/CRC/etc.
 - Move ELF state from global scope to VMManager.
 - Prevent game fixes and hw fixes being active while booting game.
 - Simplify game update.
 - Flush recompilers after ELF loads. No point keeping boot code around
   which gets overwritten.
2023-06-17 17:38:43 +10:00
Silent 3e8e5216eb Patch: Always enumerate patches/cheats for UI 2023-06-10 15:17:46 +01:00
Stenzek 65374f50cf VMManager: Fix patches OSD not getting shown in some cases 2023-06-10 12:35:08 +10:00
Stenzek 642adffeb8 Revert "Patches: Don't reload GameDB when crc is 0."
This reverts commit 5b942f0508.

This was causing patches to not get removed when resetting.
2023-06-09 00:59:16 +10:00
lightningterror 5b942f0508 Patches: Don't reload GameDB when crc is 0.
Bios uses crc 0, spams useless log that bios serial is not in the gamedb.
2023-06-08 00:57:31 +01:00
Stenzek 9d3de8631c Patch: Add "bytes" type
Allows patching an arbitrary range of bytes.
2023-06-03 23:09:52 +01:00
Stenzek 940e211bb6 Patch: Improve logging 2023-06-03 23:09:52 +01:00
refractionpcsx2 bd6b529157 Patches: Allow duplicate lines with complex types 2023-06-01 16:08:22 +01:00
Stenzek 81da9fb5a4 Patch: Add new toggleable cheat and patch interface 2023-05-31 16:38:14 +01:00
Stenzek bfc3d2e1d4 Patch: Rename le{short,word,double} to be{short,word,double}
MIPS is little endian, not big endian. Having little endian commands
suggests to the reader that the "normal" format is big endian, which is
obviously incorrect.
2023-05-25 16:47:36 +01:00
refractionpcsx2 51165f6061 Patches: Fix parsing of double words. Expand error log. 2023-05-24 19:49:32 +01:00
Stenzek bba65b8a82 Patch: Discard patches with non-hex addresses/values 2023-05-24 12:24:47 +01:00
refractionpcsx2 7ee62b8222 GameDB/Patching: Add dynamic EE JIT patching 2022-12-28 13:55:26 +00:00
Connor McLaughlin ea051c6d5f Everything: Get rid of wx entirely from the Qt build 2022-05-22 13:58:56 +01:00
Connor McLaughlin 59531f005e Patch: Merge patch and patchHelper 2022-04-27 09:09:38 +01:00
Connor McLaughlin 4c8cba53ef Patch: Fix incorrect format string on patch error 2022-04-27 09:09:38 +01:00
Connor McLaughlin ecdbe17fba Wx: Fix widescreen patch loading 2022-04-15 19:44:05 +01:00
Connor McLaughlin 5fa9427323 Patch: Store gamedb patches as single string 2022-04-15 08:15:40 +01:00
Connor McLaughlin 29cea58471 Patch: Remove all wx usage 2022-04-15 08:15:40 +01:00
kenshen112 fdabc82342 Remove IopCommon.h added proper includes to files. Removing circle includes in several files that sometimes was several layers deep 2022-04-11 21:25:20 +01:00
C.W. Betts cae8e6ae79 Change a couple of includes from angle brackets to quotes:
This makes Xcode happy, as it interprets angled brackets as system headers or headers inside of frameworks.
2022-02-07 02:32:56 +00:00
Tyler Wilding 83e5aa6137 gamedb: migrate GameDB implementation to `rapidyaml` 2021-12-25 15:11:01 +00:00
Connor McLaughlin bcec38bd97 Patch: Make variables static 2021-12-12 03:27:43 +00:00
Connor McLaughlin 46912595ea GameDatabase: Move out of gui 2021-12-12 03:27:43 +00:00
TellowKrinkle 08b1b350db wx: Remove wxString implicit conversion to std::string on windows
Can be lossy, and no one likes a lossy implicit conversion
2021-11-13 18:44:26 -06:00
TellowKrinkle cbcd9b5004 wx: Remove wxString implicit constructor from std::string
On windows, it uses the current system's character encoding instead of utf-8, which breaks a lot of things.  We should avoid it.
2021-11-13 18:44:26 -06:00
Connor McLaughlin ca523edf0e Config: Move folders to their own namespace
Don't duplicate in EmuOptions.
2021-10-01 23:46:52 -04:00
Connor McLaughlin 77a890ff4a Config: Move Folders/BaseFilenames to base config 2021-10-01 23:46:52 -04:00
Tokman5 c3c15a95c4 Use GetCheatsFolder() to check the path correctly when non-default folder is set. 2021-09-30 10:00:56 +01:00
Tupelov e42d506a64
Patch System: Support Little Endian values for non-extended (#4255)
Allows users to use the leshort, leword, and ledouble datatypes inside their patches. Using these datatypes ensures that values in the memory view appear the same as the values in the patch.
This was made with easing patch development in mind as now developers can make patches without having to reverse endianness. This is especially useful when using programs like ghidra who display an instructions bytes in little endian.
2021-02-27 03:38:12 +00:00