Commit Graph

37 Commits

Author SHA1 Message Date
Dean 732fc01aaf
Merge pull request #3814 from xXPBSXx/fix/export-ppsa30601-imports
fix(exports): export the calls PPSA30601 imports
2026-10-12 21:36:02 +13:00
Dean 9231a08b00
Merge pull request #3737 from MarcZX100/codex/json2-init-parameter2-3348
feat(libSceJson2): implement InitParameter2 constructors
2026-10-12 20:01:34 +13:00
Dean 6253883dee
Merge pull request #3881 from gravelas/fix/libscejson2-object-find
feat(libSceJson2): implement Object::find, Object::iterator::operator-> and String::compare
2026-10-12 15:42:47 +13:00
xXPBSXx 35a6df818f Merge remote-tracking branch 'upstream/main' into fix/export-ppsa30601-imports
# Conflicts:
#	core/libs/prx/libSceJson2/Export.cpp
#	docs/dev/TechnicalDebt.md
2026-10-12 01:19:36 +02:00
MarcZX100 d004d11fa3 fix(libSceJson2): use signed special-float enum type 2026-10-11 22:19:14 +00:00
David 1d5f5eb6c8 feat(libSceJson2): implement the InitParameter2 constructors and setSpecialFloatFormatType
Resident Evil 4 (PPSA07411, #2776) and PRAGMATA (PPSA02530, #3043) stop
on the absent export with

  what():  _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE not implemented

Deathloop, Minecraft Legends and Cyberpunk import the base-object
constructor InitParameter2::InitParameter2(), InitParameterRtti2::
setAllocatorRtti and InitParameterRtti::InitParameterRtti(AllocParamRtti*,
void*, unsigned long), which were NotImplemented stubs.

InitParameter2 is the 40-byte object of SharpEmu and KytyPS5: the
allocator, its user data, the file buffer size and the 32-bit special
float format type at 0x18. Both constructors zero it, setAllocatorRtti
writes the allocation parameters and user data where setAllocator writes
the allocator, and setSpecialFloatFormatType stores the type.
InitParameterRtti's constructor writes its three arguments to the first
24 bytes. The NID WVZBP4IyM+E recomputes from the mangled name and is in
the aerolib database. The enum's values are unknown, so no value is
rejected; the inferred layouts are recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 258f2910808e5ef1636973aaefbdf51615873dcb)
2026-10-11 22:19:14 +00:00
Adrià f803854a5c
Merge pull request #3670 from SibteProf/fix/json2-initparameter2-base-constructor
fix(json2): implement InitParameter2 base constructor
2026-10-12 00:12:05 +02:00
Adrià 51e2c511e7
Merge pull request #3773 from xXPBSXx/fix/export-ppsa07411-imports-v4
fix(exports): export the calls PPSA07411 imports
2026-10-11 23:59:49 +02:00
Codex 3d8db7b5a8 fix(json2): implement InitParameter2 base constructor
Carry the implementation and regression from lucfx18's PR #2823, retaining
the original Git author. Extend the regression with a leading guard and
typed default-field checks, and record the unverified console layout.

Source: https://github.com/boykopovar/AnyPS5/pull/2823
2026-10-11 23:51:34 +02:00
Adrià ac1c340392
Merge pull request #3571 from EdouardSence/feat/json-parser-stream-parse
feat(libSceJson2): add sce::Json::Parser::parse with a read callback
2026-10-11 23:34:48 +02:00
Tyler Westerberg 565e8e9c4a feat(libSceJson2): implement Object::find, Object::iterator::operator-> and String::compare
Goat Simulator 3 (PPSA04159) imports sce::Json::Object::find(String const&)
const (ehN1Biw3tw8), Object::iterator::operator->() const (EnesV4gXDtE) and
String::compare(char const*) const (Yfw63FVJgtU); without them the Windows
entry stub stops before the game starts with "unresolved ELF import
ehN1Biw3tw8".

find returns an iterator to the first pair whose key equals the argument,
or end(), using the same key match as Object::operator[]. operator->
returns the pair like operator*. compare orders the string against a C
string as std::string::compare does; a null argument throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:11:39 -04:00
xXPBSXx d7bf16a054 fix(exports): export the calls PPSA30601 imports
PPSA30601 (Resonance: A Plague Tale Legacy) fails to load without these imports that no library exports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds a TechnicalDebt entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:02:18 +02:00
xXPBSXx a03afed4c3 fix(exports): export the calls PPSA07411 imports
PPSA07411 (Resident Evil 4) fails to load without these imports that no library exports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds one test and a TechnicalDebt entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 18:35:00 +02:00
EdouardSence 95a92f35e1 feat(libSceJson2): add sce::Json::Parser::parse with a read callback
PPSA04540 (Rise of the Ronin) imports it. The characters the callback
returns are parsed as by the (text, size) overload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:28:58 +02:00
EdouardSence 3faaa4b8f0 feat(libSceJson2): add the sce::Json::Array copy constructor, clear, front and iterator::operator->
PPSA04540 (Rise of the Ronin) imports all four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:28:30 +02:00
xXPBSXx c4d29f6a99 fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
Forwards _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate to the existing calls, like the other underscore Ult exports. Declares sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats, Json::Value::setNullAccessCallBack, kqueue, kevent and one pad call of unknown name without an implementation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
Pouare514 998016e789 fix(libs): drop stubs now owned by main after rebase 2026-10-09 20:13:56 +02:00
Pouare514 b6c70b1135 fix(libs): rename loader stubs to recomputed real names, drop clashing ones 2026-10-09 20:12:31 +02:00
Pouare514 e96ec6da7d feat(libs): Deathloop loading support (Ampr, NetCtlApDialog, Party + stubs) 2026-10-09 20:11:35 +02:00
Nahuel Genchi b9d7ff46d2 feat(libSceJson2): implement sce::Json::Object::empty
Sonic Origins (PPSA05324) imports sce::Json::Object::empty() const
(i2l3IYvQ9UE) and fails to load without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:33:58 -03:00
Adrià 3e32797cca
Merge pull request #1204 from CyanBook/feat/json2-value-clear
feat(libSceJson2): implement sce::Json::Value::clear
2026-10-08 11:17:57 +02:00
Adrià d549f76855
Merge pull request #1145 from AchrafReyani/refactor/name-resolved-unknown-stubs
refactor(libs): name the libc and Json2 stubs the NID database resolves
2026-10-08 10:16:20 +02:00
Lorenzo Delmonte cbc5b4cd5d feat(libSceJson2): implement sce::Json::Value::clear 2026-10-07 19:19:53 +02:00
eliasbruno124-dev 77becef75c fix(json2): support null-access callback spelling 2026-10-07 16:18:01 +02:00
Achraf Reyani 42b88bfe83 refactor(libs): name the libc and Json2 stubs the NID database resolves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:13:36 +09:00
Chad df98b8899e feat(libs): name the PPSA23566 stubs from the shadPS4 NID list and implement sleep
20 of the 31 NIDs have names in shadPS4's aerolib list. They are declared
under those names; POSIX sleep is implemented. The NpPartner001 and Psml
MFSR2 exports stay unnamed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:28:39 -05:00
Chad 7cbf45b660 feat(libs): declare the exports PPSA23566 imports that no library provides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:04:05 -05:00
Dean cfe926c0b0
Merge pull request #488 from arreina/pr/json-non-finite
fix(json2): throw on numbers that overflow a double
2026-10-07 10:06:47 +13:00
Alberto Ruiz bdeeb17326 fix(json2): throw on numbers that overflow a double
Whether the console's parser rejects 1e309 or stores an infinite real
is unknown, and RFC 8259 allows both. Following the exact-or-throw rule,
sce::Json::Parser::parse now throws with the number text and a note that
the behaviour is unverified, instead of returning JsonErrorParse. The
partially built tree is freed before the exception leaves the parser.
The case is listed under unknown function info in TechnicalDebt.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-06 18:37:38 +02:00
Alberto Ruiz be6c0cf3ec fix(json2): reject numbers that overflow to infinity
The parser stored strtod's result for 1e309 and similar numbers, so a
document with such a value parsed as an infinite real. Serializing it
then threw "cannot serialize a non-finite number", which escaped the
guest call and terminated the process. sce::Json::Parser::parse now
returns JsonErrorParse for a number that is not finite after conversion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-06 18:37:26 +02:00
Lexroid 82488a5665 feat(libSceJson2): implement typed construction, indexed and keyed value access, InitParameter2
Value(ValueType) constructs a value of the given type. getValue(index) and
getValue(String) return the element or member, or the null-access result when
it is missing, as operator[] does. referValue(index) returns the mutable array
element, or null when the value is not an array or the index is out of range,
as referValue(String) does for members. Object::size returns the member count.

InitParameter2 is the class form of InitParameter: its constructor zeroes it,
setAllocator and setFileBufferSize record their arguments, and
Initializer::initialize(InitParameter2) succeeds as
initialize(InitParameter) does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:54:37 +03:00
Alexey 67fd6385e7
Merge pull request #328 from arreina/pr/json-nesting-limit
fix(json2): reject documents nested deeper than 512 levels
2026-10-03 10:35:04 +03:00
Pouare514 1c724c0228 feat(libs): Cyberpunk 2077 loading support (REDGalaxy + stubs)
# Conflicts:
#	core/libs/prx/libSceContentExport/Export.cpp
#	core/libs/prx/libScePlayGoDialog/Export.cpp
2026-10-02 23:14:04 +03:00
Alberto Ruiz 1b2af06c92 fix(json2): reject documents nested deeper than 512 levels
The parser descends recursively into every array and object without a
limit, so deeply nested input exhausts the stack and crashes the
process: 50000 levels on an 8 MB main thread and 5000 levels (10 KB of
brackets) on a 256 KB thread. sce::Json::Parser::parse now returns
JsonErrorParse when a document opens more than 512 nested arrays or
objects, which bounds the recursion for any input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-02 08:08:37 +02:00
Dean Galvin 90855bbc18 fix(json2): referValue returns null for a missing member, getters return references
sce::Json::Value::getBoolean, getInteger, getUInteger and getReal return const references
(const bool&, const long&, const unsigned long&, const double&), so the guest reads the value
through the returned pointer. A value-returning implementation made callers dereference the value
itself. Cross-type conversions keep main's range rules and are stored on the node so the reference
stays valid.

Value::referValue(const String&) looks a member up without creating it: it returns null for a
missing key or a value that is not an object instead of inserting an entry or throwing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-29 13:02:54 +13:00
Dean Galvin 390e4cd800 feat(json2): implement sce::Json values, strings, arrays, objects, parser and null-access callback
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 16:42:29 +13:00
devilismyfriend 9c2a75601d feat(libs): agc packet builders, savedata memory, offline service stubs
- libSceAgc: SetIndexCount, SetBaseIndirectArgs, DispatchIndirect, wait
  and write-data patch functions, relaxed checks for what titles send,
  NOP fillers for LOD stats and wait-until-safe, NotImplemented stubs.
- libSceSaveData.native: short mount points, backup events, save-data
  memory slots.
- user/system service, store dialog, video-out flip modes and queue-full
  error, pad read, fibers, offline behaviour for network/NP modules, and
  new export-only modules Ampr, JpegEnc, Json2, MsgDialog.native,
  NpCppWebApi, NpUtility.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00