Commit Graph

28 Commits

Author SHA1 Message Date
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
hugodearaujo 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
Alex f1af6683a1 fix(libSceSysmodule): open host modules only through libs/<name>.prx
Drop the retry on <name>.prx after libs/<name>.prx fails. The test now
runs from its own directory holding libs/libSceFiber.prx, copied from
the libSceFiber output, so the single path resolves in the test too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 03:28:05 -04:00
Claude 3bfb0445e5 fix(libSceSysmodule): link and run guest_sysmodule_tests like the other guest tests
Link libc, configure Windows unwinding for the test so its runtime_error
checks are caught, and run it from libSceFiber's output directory so
openHostModule finds the unpatched libSceFiber.prx next to the modules the
test already loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9MzdVqDf6wHUKzNymQSze
2026-10-11 03:27:59 -04:00
Alex 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
Gustavo Ariel Gamarra Rojas ad4add2b1a perf(libSceSysmodule): look up the mapping with PROCMAP_QUERY in sceSysmoduleGetModuleInfoForUnwind
It carried its own copy of the /proc/self/maps line scan and is called on the same Unity stack walks as sceKernelGetModuleInfoForUnwind. It now uses the shared HostMapping lookup.
2026-10-10 22:50:46 -03:00
Mohd Faour 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
Claude 121d9332b5
build(libs): strip the MinGW static runtime flags once for all libraries
Every library CMakeLists.txt ended with the same block removing -static,
-static-libgcc and -static-libstdc++ from CMAKE_EXE_LINKER_FLAGS on MinGW,
because core/libs/CMakeLists.txt only removed them after adding the library
directories. Remove them before the libc and library directories are added
so each directory inherits the stripped flags, and drop the 52 copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017pTZqAyVSZy2FZmaqakPHZ
2026-10-07 10:10:38 +00: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
Pacuka a2520aa071 fix(sysmodule): unload unknown module ids as no-ops
sceSysmoduleLoadModule and sceSysmoduleIsLoaded already accept ids the
project does not know and log them; unloading such an id threw, so a title
that loads and later unloads an unknown module aborted at the unload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:32:15 +02:00
owner 63209b584f fix: correct sscanf %x signedness and avoid a substr copy
libSceSysmodule/Export.cpp parsed /proc/self/maps device major/minor
numbers into signed int with a %x format, which is undefined behaviour
per the C standard even though it happened to work on this target;
switched to unsigned int to match the format specifier.

NidPatcherUtils.hpp's StripNidPostfix built a truncated copy with
substr(0, n) where the prefix is already the string itself; resize(n)
does the same truncation without the extra allocation and copy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 14:11:50 -06:00
boykopovar b4db9fdd69 chore(sceSysmodule): log unknown module id loading 2026-09-12 18:00:34 +03:00
boykopovar abc72da741 feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
boykopovar 7592031dc9 feat(libs): add windows branch for get sysmodule info 2026-09-07 11:21:44 +03:00
boykopovar 0bbf0923ef feat(sysmodule): add new modules mapping 2026-09-07 11:17:36 +03:00
boykopovar 1e0fc3f33a feat(libs): add libSysmodule impl 2026-09-07 10:55:32 +03:00
boykopovar 6123893998 feat(libs): throw not impl ex in every stub 2026-09-06 15:05:04 +03:00
boykopovar 59bee8d187 feat(libs): add libs function signatures 2026-08-20 23:18:16 +03:00