Commit Graph
116 Commits
Author SHA1 Message Date
Megamouse 83b1e07299 Fix some log messages 2026-10-01 12:42:01 +02:00
Elad a70f698569 vm: Fix confusing enum flags naming 2026-09-26 13:17:00 +03:00
Antonino Di GuardoandClaude Opus 5 0c382f4fc9 patch_engine: don't emit path-typed patch addresses as hex
save_patches always emitted the address element as fmt::format("0x%.8x"),
but for move_file and hide_file that element is a VFS path: load() keeps the
text in original_offset and skips u32 validation for those two types.
Round-tripping such a patch through save_patches replaced the source path
with 0x00000000.

The entry stays syntactically valid and keeps loading, so the patch is still
listed and can still be toggled in the Patch Manager while silently matching
no file. Re-downloading does not repair it either, since append_patches
discards an incoming patch whose Patch Version is not strictly greater.

Gate the emit on patch_type_uses_hex_offset, the predicate that already
existed for this and was used only on the load side. The numeric branch
keeps using offset rather than original_offset on purpose: an address
modifier is folded into offset at load time and the flat form emitted here
has nowhere to put it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Antonino Di GuardoandClaude Opus 5 dc3c7327d8 patch_engine: make save_patches write atomically
save_patches opened the target with fs::rewrite (write + create + trunc),
then discarded the result of file.write() and returned true unconditionally.
A write that fails part way leaves a truncated file, load() rejects the
whole file on a parse error, and import_patches refuses to write when
load() fails, so every later import returns -1 with no in-app recovery.

75e66ab5e made the patch config and the pad config atomic but missed this
function; save_config, 70 lines up in the same file, already writes through
fs::pending_file and checks the result. Do the same here.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Megamouse be509deda0 Move emu callbacks to own file
Reduces some System.h includes
2026-09-15 22:01:55 +02:00
Megamouse ca522cf84c fix cctype usage
According to the documentation, we should cast to unsigned char.
Anything negative is undefined behavior.
2026-09-15 17:38:26 +02:00
RipleyTom 5ca19eabd5 NP code review
sceNpTrophy fixes

- sceNpTrophyGetTrophyUnlockState: signed 1 was potentially shifted by 31(UB)
- sceNpTrophyUnlockTrophy: used a reader_lock and was missing check for read only context

cellGame fixes

- cellHddGameCheck: missing log parameters
- cellGameDataCheckCreate2: missing log parameter
- cellGameThemeInstall: condition inverted checking for extension + added tolower just in case
- cellGameThemeInstallFromBuffer: OOB access, buf is always filled from the start and then used as a parameter to the CB

sceNp fixes

- sceNpManagerGetTicket: Made accurate from RE
- sceNpDrmGetTimelimit: Fix msec calculation

sceNp2 fixes

-sceNpMatching2ContextStartAsync: avoid capturing ctx
-sceNpMatching2ContextStop: Minor error value swap

rpcn_client fixes

-add_friend: missing log parameter
-handle_friend_notification: misc validation issue

np_handler fixes
-ticket: Missing move in move constructor
-ticket::parse: Misc validation fix
-get_player_history_entry: potential UB fix

np_requests fixes

-Wrong CB event_type set for get_room_member_data_external_list!
-reply_tus_get_data was not copying status data!
-Order of error check in reply_get_room_member_data_external_list was wrong
-Improved logging

np_requests_gui:

-Added missing guards for gui_notifications

upnp_handler fixes

-Highest density of bugs per line of code in the west, let's pretend I never wrote this

signaling_handler fixes

-Swapped to multimap to avoid collisions on timestamps

Misc fixes
2026-03-01 09:20:32 +02:00
Megamouse 1960b5a605 hotfix: fix parentheses when saving some files 2025-04-23 16:27:17 +02:00
Megamouse 22c184bf75 cellMusic: improve logging 2025-04-23 08:14:59 +02:00
Megamouse faef63e8a7 patches: fix c_utf8 validation 2025-03-24 21:44:23 +01:00
Megamouse 451e953d26 windows: move config.yml and games.yml to /config/ 2025-01-16 21:33:33 +01:00
Elad c6f3737c2a PPU LLVM: Fixup patches enlisting in analyzer 2025-01-07 20:42:45 +02:00
Elad 0b784ff2c1 PPU LLVM: Function table dependent resolver hashing 2025-01-07 15:43:41 +02:00
oltolm 2b0f786b2d Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
kd-11 c80342e8d4 aarch64: Support calloc patch blocks 2024-08-31 13:55:58 +03:00
Megamouse 456ff10f02 Qt/patches: don't allow duplicate app versions 2024-08-15 09:35:58 +02:00
Megamouse 8371c445ce Qt/patches: check if app version is 5 characters long and like 01.00 2024-08-15 09:35:58 +02:00
Megamouse 93424d1adc Qt/patches: check if serial is 9 characters long and alphanumeric 2024-08-15 09:35:58 +02:00
Megamouse d05d803f5e patches: use more std::move 2024-08-15 09:35:58 +02:00
Megamouse 76c0df849a patches: improve error logging: add file paths to all errors 2024-08-14 20:21:55 +02:00
Megamouse 4051988403 Qt/patches: improve value validation 2024-08-14 20:21:55 +02:00
Megamouse 59c58aa3cf fix some warnings 2023-12-30 19:07:35 +01:00
Eladash e79fc867c5 Patches: Add savable breakpoints patch type 2023-09-26 11:06:01 +03:00
Megamouse f199ad7a42 patches: Improve location logging for invalid note sequence 2023-08-12 14:43:47 +02:00
Megamouse d119cf6e96 Qt6 port 2023-07-31 20:03:24 +03:00
oltolm bc40b61ef1 rename fs::stat to fs::get_stat 2023-07-25 12:15:08 +03:00
Eladash 95fb7859d2 Fixup patches 2023-07-24 17:07:15 +03:00
Megamouse 3381144d2e Patches: improve location logging of some invalid nodes 2023-07-13 08:40:19 +02:00
Megamouse a19883f875 Patches: do not allow empty patch names 2023-07-13 08:40:19 +02:00
Megamouse 02bac61c9c Patches: validate yml patch offset values 2023-07-13 08:40:19 +02:00
Eladash 083b4f0d3b Patches: Fix potential RPCS3 crashes due to invalid patches 2023-07-13 07:38:46 +03:00
Eladash 554b27a82a PPU LLVM: Implement SELF precompilation
Do not use PS3 memory for precompilation.
2023-06-28 18:34:33 +03:00
Megamouse cc145eaf2e patches: fix move_file/hide_file error 2023-03-04 19:18:36 +01:00
Eladash 382a7c94a2 Patches: Virtual move/remove game files patches 2023-03-03 20:56:11 +01:00
Megamouse f0c8f6d47b patch_manager: check config values before applying them 2023-02-22 01:17:36 +01:00
Megamouse a29dc3893f patch_manager: change wording 2023-02-22 01:17:36 +01:00
Megamouse c6f392bf6c patch_manager: allow multiple dynamic values 2023-02-22 01:17:36 +01:00
Megamouse f2ded2fdb7 patch_manager: Add dropdown labels 2023-02-22 01:17:36 +01:00
Megamouse 080737fd1f patch_manager: add more dynamic to dynamic patches 2023-02-22 01:17:36 +01:00
Megamouse 1040757556 patch_manager: add ability to add dynamic patches 2023-02-22 01:17:36 +01:00
Margen67 5bb89328d0 Remove whitespace 2023-02-15 08:58:02 +01:00
Megamouse 9b7eaf5117 Improve error logging 2023-01-09 21:06:51 +01:00
Eladash 7df093c94b Make it work with LLVM
Allow multiple entries for a single code.
2022-12-09 21:16:05 +03:00
Eladash f572e29a13 PPU: Add new patch function for SONIC 06 2022-12-09 21:16:05 +03:00
Nekotekina 6ff6a4989a Implement at32() util
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
Eladash 64399d45c1 vm: Make falloc return value bool
Allow to check properly for the success of 0 address allocation.
2022-06-22 21:01:37 +03:00
Timo654 afae58b231 Interpret negative values in game patches 2022-04-18 17:01:19 +03:00
Megamouse b04bd5fa74 patch_manager: check if address has hex format 2022-04-12 10:21:21 +02:00
Megamouse 4dfb47cdd9 Patch manager: check for invalid value node 2022-04-09 21:26:06 +02:00
Megamouse 499fe3e218 Patch manager: add node location to patch errors 2022-04-09 21:26:06 +02:00