26 Commits
Author SHA1 Message Date
Nithishvelan M 76c0882646 test(libSceSysmodule): use kAgcDriverModuleId in unload internal with arg test 2026-10-19 22:06:36 +05:30
Nithishvelan M f677163eec feat(libSceSysmodule): implement sceSysmoduleUnloadModuleInternalWithArg
Add sceSysmoduleUnloadModuleInternalWithArg to match the existing
sceSysmoduleLoadModuleInternalWithArg export. Decrement the module load
count on valid internal IDs, check module existence in kModuleTable,
and set the return pointer when provided.

Add unit test coverage in GuestSysmodule for invalid values, unloaded
modules, successful argument unload, and unknown IDs. Update technical
debt documentation.
2026-10-19 17:57:40 +05:30
Nithishvelan M de1d73c50d feat(libSceSysmodule): implement sceSysmoduleIsLoadedInternal 2026-10-19 12:05:34 +02:00
fogydes fcdf046855 feat(libSceSysmodule): register missing user and internal sysmodule IDs 2026-10-19 10:51:17 +05:30
pushkarreddyy 16df3d1536 feat(libSceSysmodule): register libSceProprietaryVoiceChatHelperPrx module id 0x132 2026-10-19 01:22:53 +02:00
mattogepetoandClaude Sonnet 5.5 941fd4e11e Merge remote-tracking branch 'origin/main' into fix/sysmodule-unknown-id-coverage
Keep both sides in GuestSysmodule.cpp (the unknown id check and the Windows
unwind region checks) and in libSceSysmodule.md (Silent stubs and Functional).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 06:55:51 +02:00
mattogepetoandClaude Sonnet 5.5 3f8337e730 fix(libSceSysmodule): test and document unknown module ids
sceSysmoduleIsLoaded, sceSysmoduleLoadModule and sceSysmoduleUnloadModule
return success for an id missing from the module table, because titles that
load or unload such an id aborted otherwise (b4db9fdd6, a2520aa07). Nothing
tested or recorded it, and two commented-out throws were left in the code.

Remove the commented-out throws, list the three functions under Silent stubs
in the library's technical debt file, and test that unknown ids succeed
without changing state while the internal variants still throw.

Written with AI assistance (Claude).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 22:33:13 +02:00
JAB-devandClaude Sonnet 5.5 fbe49d6a68 test(libSceSysmodule): look up an earlier page of a cached unwind region after a later one
The backward lookup added with the region fix compared the address with a page it could not reach and never ran. The test now queries an ntdll address three pages in, then the first page, then the pages between, and compares each with VirtualQuery. The lookups after the first fail on the cache before the region fix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 22:22:20 +02:00
JAB-devandClaude Sonnet 5.5 a63e77e9fc fix(libSceSysmodule): report the region of the queried page from a cached unwind region
VirtualQuery describes the pages from the queried address to the end of the run of equal pages, so the reported seg0 begins at the queried page. The cached entry returned the first lookup's page for every later address in the run. It now returns the queried page and the bytes up to the end of the cached run, which is what VirtualQuery returns.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 22:08:20 +02:00
JAB-devandClaude Sonnet 5.5 cd95f1a426 perf(libSceSysmodule): cache the unwind region of loaded images on Windows
sceSysmoduleGetModuleInfoForUnwind called VirtualQuery and GetMappedFileNameA on every call. VirtualQuery on a large image section costs time proportional to the section (2 us for 16 KiB, 51 us for 8 MiB, 167 us for 32 MiB), and a title that unwinds exceptions while loading calls it for every frame of every throw.

The region and file name of an address inside an image of the Windows loader's module list are kept per region and used while the loader still reports the same image (base, time stamp and size). Other addresses are queried every time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 22:57:08 +02:00
Kikoarl 94f06cee6f feat(libSceSysmodule): register libSceAcm (0x10B) and libScePsml (0x137) module IDs 2026-10-12 16:22:34 +02:00
Dean c5675762a2 Merge pull request #4069 from Kikoarl/feat/sysmodule-voicechat-module-id
feat(libSceSysmodule): register libSceVoiceChat module ID (0x114)
2026-10-13 01:26:25 +13:00
Dean 286d133a03 Merge pull request #3981 from Kikoarl/feat/sysmodule-audiopropagation-module-id
feat(libSceSysmodule): register libSceAudioPropagation module ID (0x120)
2026-10-12 21:36:45 +13:00
Dean 62bd3c9e68 Merge pull request #3841 from Kikoarl/feat/sysmodule-share-module-id
feat(libSceSysmodule): register libSceShare module ID (0x10F)
2026-10-12 17:31:46 +13:00
Kikoarl 567898cd58 feat(libSceSysmodule): register libSceVoiceChat module ID (0x114) 2026-10-12 00:39:28 +02:00
Adrià 11d9c00cf6 Merge pull request #3884 from hansjm10/fix/sysmodule-agc-internal-id
fix(libSceSysmodule): recognize the libSceAgc internal module id
2026-10-12 00:13:05 +02:00
Kikoarl 7cf2ee844a test(libSceSysmodule): verify handle and symbol resolution for libSceAudioPropagation 2026-10-12 00:08:15 +02:00
Kikoarl 5d298b6d95 feat(libSceSysmodule): register libSceAudioPropagation module ID (0x120) 2026-10-11 22:33:22 +02:00
Jordan Hans b1104a2c65 fix(libSceSysmodule): recognize the libSceAgc internal module id 2026-10-11 18:33:48 +00:00
Kikoarl 7714a5c2db feat(libSceSysmodule): register libSceShare module ID (0x10F) 2026-10-11 19:45:25 +02:00
hugodearaujoandClaude Opus 5.5 a61e2d35dd fix(libSceSysmodule): return INVALID_VALUE for module id 0
Measured on a PS5 (firmware 13.60): sceSysmoduleIsLoaded,
sceSysmoduleLoadModule and sceSysmoduleUnloadModule with id 0, and the
Internal and InternalWithArg calls with id 0 or 0x80000000, return
0x805A1000 and leave the WithArg result untouched. They threw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:51:00 -03:00
maoxin1234 5ee3ef8cb8 fix(libSceSysmodule): recognize Trophy2 module id 2026-10-11 11:35:37 +02:00
19dc22b010 feat(libSceSysmodule): implement sceSysmoduleGetModuleHandleInternal
Return a host module handle for a loaded sysmodule id so callers can
sceKernelDlsym after sceSysmoduleLoadModule. Unknown or null inputs
throw like neighbouring internal load paths; unloaded ids return
0x805A1001. Unblocks Prospero Win past NID D8cuU4d72xM at load.

Co-Authored-By: Composer <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 03:27:52 -04:00
Gustavo Ariel Gamarra Rojas 869d73e4d8 test(libSceSysmodule): compare sceSysmoduleGetModuleInfoForUnwind with /proc/self/maps
Covers code, stack and an anonymous page, and an unmapped address. On Linux the test runs again with APS5_NO_PROCMAP_QUERY so the line scan stays covered.
2026-10-10 22:50:46 -03:00
Mohd FaourandClaude Fable 5.1 ce5a2136a8 fix(sysmodule): report a module that is not loaded as SCE_SYSMODULE_ERROR_UNLOADED
sceSysmoduleIsLoaded returned 0x80A90002 and the unload calls 0x80A90003
for a module that is not loaded. Neither value exists in the SDK: the
sysmodule facility is 0x5A and the error is 0x805A1001, which titles
compare against (GTA V PPSA04263: cmp eax,0x805a1001 after IsLoaded) to
decide whether to load and initialise the module themselves. Return that
value from all three places and cover it in guest_sysmodule.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 17:13:02 +02:00
Phi1ow 75c2ea8548 feat(sysmodule): implement sceSysmoduleLoadModuleInternal and sceSysmoduleUnloadModuleInternal
Two exports were missing. System modules are linked statically, so load and unload are
reference counts over the known module table, exactly like the existing
sceSysmoduleLoadModuleInternalWithArg and sceSysmoduleUnloadModule:

- sceSysmoduleLoadModuleInternal(uint32_t) -> increments the module's load count, returns 0
- sceSysmoduleUnloadModuleInternal(uint32_t) -> decrements it, or 0x80A90003 when the module
  was not loaded

Unknown or zero ids throw, like the sibling internal loader. Adds a CMakeLists.txt so the
library can carry its guest test. Signatures follow the public OpenOrbis SDK headers.

New test core/libs/tests/GuestSysmodule.cpp loads a module twice, unloads it twice and checks
the not-loaded error on a third unload; it fails without the change (the symbols are
undefined) and passes with it.
2026-10-04 21:56:29 +02:00