Skip to content
Open
Show file tree
Hide file tree
Changes from 179 commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
c51a719
fix(relinker): accept omitted empty array sizes in strict filtering
simonbronk Oct 16, 2026
efe4c01
fix(relinker): trap guest GS accesses in macOS output instead of refu…
DavidSamir Oct 15, 2026
7645b17
fix(build): keep bundled SPIRV validator tables valid at exit
JJenkx Oct 15, 2026
1c7a156
fix(relinker): accept section-relative guest module relocations
Oct 13, 2026
3544191
feat(libc): implement the __std vectorized algorithm helpers
Oct 15, 2026
ec5f7d7
feat(libc): add exact long double and BSD math exports
Oct 15, 2026
bb5aabf
feat(libkernel_sys): implement fchown
Nixitov Oct 13, 2026
9513950
feat(libSceFontFt): implement the font format support exports
Capmare Oct 15, 2026
388925d
fix(agc): preserve registered array slices on CPU write-back
Zenodeon Oct 15, 2026
27e7a13
fix(agc): stamp the watched blocks of a partly watched store
EagleBearerYS Oct 15, 2026
a9d746c
fix(relinker): list converted modules correctly for a relative output…
thuanquang Oct 12, 2026
71ff265
test(agc): check the stamps of a store into partly watched memory
EagleBearerYS Oct 15, 2026
2561b5f
fix(relinker): accept executables without a RELA table
jweidenh Oct 15, 2026
b752928
test(relinker): page-align the optional RELA guest fixture
jweidenh Oct 15, 2026
bde52c2
fix(shader): flush f64 min and max inputs by float mode
Ondra97 Oct 16, 2026
6ca5388
fix(shader): store through DIM 2D image_store to a cube T#'s BASE_ARR…
milescoviello Oct 16, 2026
e1eb85d
fix(libSceNet): inherit nonblocking mode on accepted sockets
Ondra97 Oct 15, 2026
5e66fcc
fix(relinker): exclude trailing PS4 relative jump tables
MarcZX10 Oct 15, 2026
8247d1a
fix(nid): report failed library writes
Zinebyte Oct 16, 2026
197b9e5
feat(libc): implement overlap-safe bcopy
ArjenS-LA Oct 15, 2026
c655cf9
feat(libSceRtc): implement the remaining firmware exports
ymatrix1 Oct 15, 2026
7037c08
test(relinker): cover GS loads, stores and ALU reads trapped in macOS…
DavidSamir Oct 15, 2026
d1cccb8
test(relinker): trap a GS access in a macOS module without a TLS segment
DavidSamir Oct 15, 2026
e69b431
fix(relinker): guard PLT compactor against displacement underflow and…
fogydes Oct 18, 2026
9243a0f
fix(agc): store pending image results after the range's writers finish
SleglJan Oct 15, 2026
3fc8b2b
feat(libScePad): export missing firmware pad interfaces
ymatrix1 Oct 15, 2026
06668df
fix(libSceNetCtl): read the default route from the routing table on m…
DavidSamir Oct 16, 2026
3d33227
test(libSceNetCtl): check which macOS routing messages give a default…
DavidSamir Oct 16, 2026
67f6026
fix(agc): leave a stage the title's pipeline ABI cannot prepare to it…
EagleBearerYS Oct 15, 2026
e88ce12
fix(shader): ballot each predicate once per block
Oct 16, 2026
3a159ee
perf(agc): tell the flush hook that no image is pending over a range …
EagleBearerYS Oct 15, 2026
2d6ef68
test(libSceRtc): cover microseconds, minutes, hours and weeks tick ad…
xXPBSXx Oct 16, 2026
c1329f8
feat(libc): implement qsort_s
karimibrahim07 Oct 16, 2026
eae4b53
test(agc): resolve the pipeline ABI of stages that only their use can…
EagleBearerYS Oct 15, 2026
2eb2a50
fix(agc): check GPU-side indirect dispatch group counts against the d…
hypermoist Oct 10, 2026
f25fbe2
fix(relinker): detect output aliases with a filesystem probe outside …
jotitadev Oct 14, 2026
4c36cb3
fix(shader): give a selection a merge when one arm returns through ne…
fdfawef324 Oct 15, 2026
32284da
fix(relinker): guard base relocations against page boundary overflow …
fogydes Oct 18, 2026
d11d027
fix(relinker): resolve EIP-relative GOT accesses and guard target ove…
fogydes Oct 17, 2026
74b31c5
fix(relinker): validate relative relocation table bounds, dynamic tag…
fogydes Oct 18, 2026
82d0c4e
fix(relinker): reject program header table overlapping the extra block
fogydes Oct 18, 2026
1a4f3cb
fix(relinker): validate section header table bounds and reject overla…
fogydes Oct 18, 2026
52e3c04
refactor(relinker): take the macOS image base from the load image
DavidSamir Oct 16, 2026
2dafd86
fix(relinker): validate syscall scanner code section bounds and offse…
fogydes Oct 13, 2026
6823f82
perf(agc): skip the staging and write-back leading barriers a trailin…
AlxcBTW Oct 18, 2026
58bf9a0
perf(agc): skip the label run's leading barrier right after a render …
AlxcBTW Oct 18, 2026
c3587b7
fix(shader): plan image tables through invariant descriptor phis
UnhealthyKraken Oct 15, 2026
45c23dd
perf(agc): wait only for the key bytes' writers when reading DCC keys…
parl0v Oct 18, 2026
8239463
fix(agc): overestimate single-sample draws with centroid inputs
claude Oct 15, 2026
ed072f7
fix(shader): write a mesh shader's layer through a per-primitive block
thuanquang Oct 18, 2026
d1827c1
fix(libSceAgcDriver): zero the overhanging record of a vertex fetch
xXPBSXx Oct 19, 2026
1307d35
fix(agc): leave the stages of a pipeline ABI whose state does not dec…
EagleBearerYS Oct 15, 2026
1027738
feat(libSceAgc): implement CB memory semaphore and unversioned payloa…
fogydes Oct 16, 2026
ca6676c
fix(agc): resolve sparse indirect index ranges per record
Oct 15, 2026
2fcd277
test(agc): defer the stage of a pipeline ABI whose geometry state doe…
EagleBearerYS Oct 15, 2026
039d0d9
fix(libSceAgc): align CB memory semaphore with console oracle and doc…
fogydes Oct 19, 2026
e0d5847
fix(agc): leave a stage whose registration preparation failed to its …
EagleBearerYS Oct 16, 2026
b13f634
fix(agc): leave a pipeline ABI stage whose vertex inputs do not decod…
EagleBearerYS Oct 16, 2026
18bda40
fix(agc): leave the rect-list pairs a pipeline ABI cannot build to th…
EagleBearerYS Oct 16, 2026
57466a0
test(agc): reproduce fixed FMASK image results
Oct 16, 2026
0f4f41b
feat(shader): read hull inputs at a control point chosen by a select …
yash27git Oct 15, 2026
f413d18
fix(agc): return slab slots without allocating host memory
Ondra97 Oct 16, 2026
85d03c0
fix(agc): ignore failed fence creation outputs
Ondra97 Oct 17, 2026
e03dee5
test(agc): isolate command batch fence failure probes
Ondra97 Oct 17, 2026
b02f6ab
test(agc): keep fence test registration independent
Ondra97 Oct 17, 2026
75b2836
perf(shader): declare the read-only descriptor tables NonWritable
milescoviello Oct 16, 2026
7cdb5ae
test(agc): cover incomplete GPU timing batch completion
JJenkx Oct 15, 2026
d392366
perf(shader): convert one f16 value instead of an (x, 0.0) pair
tibzejoker Oct 19, 2026
e91f3fb
fix(shader): emit nothing for a vertex s_barrier that precedes every …
milescoviello Oct 15, 2026
80e40b0
fix(libc): share the constraint handler across libc source files
karimibrahim07 Oct 16, 2026
056d52a
feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in…
ErenYeager1836 Oct 16, 2026
264467d
feat(libSceAudioPropagation): export missing firmware functions from …
al3w0f205 Oct 16, 2026
db82e13
feat(libkernel): return getrlimit soft limit for _SC_OPEN_MAX in sysconf
ErenYeager1836 Oct 16, 2026
4b464f4
feat(libSceJson2): implement Value::setTypeMismatchHandler and store …
fdfawef324 Oct 14, 2026
9069f45
feat(libs): restore libSceNpCppWebApi for dumps that ship no copy
Oct 17, 2026
2ba0d66
fix(libkernel): keep the cached host stack range in two scalar thread…
EagleBearerYS Oct 17, 2026
b4a8c13
feat(ajm): resample interleaved s16 PCM through codec 23
Sevthered Oct 16, 2026
bed9808
fix(libkernel): share guest rename semantics with sceKernelRename
Ondra97 Oct 15, 2026
58f8635
fix(ngs2): return PS5 errors for invalid voice handles
JJenkx Oct 15, 2026
8dd0b5d
fix(libc): give the scripting heap hooks blocks from libc's own heap
milescoviello Oct 16, 2026
231f96a
feat(libkernel): accept a kevent read event on descriptor 0
klosixgaming-arch Oct 15, 2026
68eb5da
fix(libSceSaveData.native): return error for uninitialized sceSaveDat…
ErenYeager1836 Oct 16, 2026
514284b
fix(audio): route legacy vibration PCM with per-port timing
Amoenus Oct 18, 2026
e3c37ac
test(libkernel): cover direct replacement flexible budget
Ondra97 Oct 15, 2026
84b9d95
fix(libkernel): account for fixed flexible memory replacements
Ondra97 Oct 15, 2026
d4043de
feat(libc): implement std::__throw_bad_variant_access
cadenasynyster Oct 18, 2026
7c21928
fix(libkernel): reject alarm seconds beyond the itimer range
husseinkad Oct 16, 2026
d53070a
fix(libkernel): answer sysarch I386_GET_FSBASE, I386_GET_GSBASE and u…
ionut27001 Oct 18, 2026
6e089fe
test(libkernel): time blocking waits from before the writer thread st…
thuanquang Oct 18, 2026
b2d0a6c
fix(libkernel_sys): reject root names in symlink targets and test tar…
valenciana-nc Oct 18, 2026
413fe91
feat(tools): warn when a pull request adds a technical debt entry ove…
LeandroLP23 Oct 16, 2026
36f03f7
fix(libc): read /dev/random and /dev/urandom through fopen
wachi35676 Oct 14, 2026
fa1517c
test(audio): cover repeated legacy vibration grains
Amoenus Oct 18, 2026
5e45c8d
feat(libc): implement the remaining Dinkumware _Atomic helpers
Oct 15, 2026
7157c98
feat(libc): implement ceill and floorl
BIGFERRY999 Oct 15, 2026
f0a05a6
feat(libSceSysmodule): register libSceProprietaryVoiceChatHelperPrx m…
pushkarreddyy Oct 15, 2026
34e8e93
fix(libkernel): validate getdirentries output buffers in the guest arena
valenciana-nc Oct 18, 2026
54b4a5b
fix(libkernel): keep the getdirentries base guard open through its wr…
valenciana-nc Oct 19, 2026
02213b9
feat(libkernel): declare physhm_open and physhm_unlink
Nixitov Oct 16, 2026
7661c21
test(libkernel_sys): read accepted symlink targets back through readl…
valenciana-nc Oct 19, 2026
43036ab
fix(libkernel): check the AIO Multiple batch limit before reading the…
valenciana-nc Oct 19, 2026
cb0952a
test(audioin): skip the silent blocks a late capture device leaves
jotitadev Oct 19, 2026
08d5aa0
fix(recompiler): key shader caches on compiled sources
fdfawef324 Oct 15, 2026
3a5d7f6
test(libSceNetCtl): cover the plain callback registration in guest_sc…
xXPBSXx Oct 19, 2026
07934e9
feat(libSceSysmodule): register missing user and internal sysmodule IDs
fogydes Oct 15, 2026
f46e948
feat(libSceContentDelete): export missing firmware content delete int…
fogydes Oct 15, 2026
8a91c7d
fix(libc): walk program headers outside the unwind cache lock
Oct 19, 2026
a73a38a
feat(libSceVideoRecordingP): export missing firmware 3.20 video recor…
fogydes Oct 15, 2026
086a63e
fix(libc): keep exact math results independent of the host libm
Oct 19, 2026
39ed31a
feat(prx): declare NetCtlAp exports
xdCloudy Oct 19, 2026
75e5354
feat(prx): declare notification exports
xdCloudy Oct 19, 2026
a15ad78
feat(prx): declare charset and VDECSW exports
xdCloudy Oct 19, 2026
8000d86
feat(libSceVoiceChat): export missing firmware voice chat interfaces
fogydes Oct 15, 2026
4bf4556
feat(np-tus): add libSceNpTus with offline title user storage
LuisAguilarDev Oct 15, 2026
5bd175d
fix(libSceNgs2): keep CalcListener basis when front and up are parallel
notaxeltv Oct 15, 2026
2ce07c0
fix(libc): reject oversized secure string destinations
realshinmalphur Oct 19, 2026
21cb5a1
test(libc): cover oversized secure string destinations
realshinmalphur Oct 19, 2026
22fbbbe
feat(libSceNet): export missing firmware network interfaces
ymatrix1 Oct 15, 2026
70e2461
fix(libSceHttp): add authentication and cookie cache flush exports
Oct 19, 2026
114604f
feat(libSceNpGameIntent): export missing firmware game intent interfaces
fogydes Oct 15, 2026
caaf71e
feat(prx): inventory confirmed PS5 system libraries
xdCloudy Oct 19, 2026
b3efb78
fix(prx): omit title-shipped face modules from inventory
xdCloudy Oct 19, 2026
47a4c29
feat(prx): declare verified PS5 pending exports
xdCloudy Oct 19, 2026
049418b
fix(prx): mark unsupported export prototypes as unknown
xdCloudy Oct 19, 2026
dd3acd4
fix(prx): drop rebased invitation duplicates
xdCloudy Oct 19, 2026
ec5ca9e
fix(prx): retain RegMgr debt and avoid SaveData overlap
xdCloudy Oct 19, 2026
672aeb3
feat(netctl): implement Wi-Fi info codes in sceNetCtlGetInfo
AdvaitPalve11 Oct 17, 2026
f061364
fix(libkernel): increase pipe buffer size to match FreeBSD BIG_PIPE_SIZE
fogydes Oct 19, 2026
20f7599
test(libSceGameLiveStreaming): add guest game live streaming test cov…
al3w0f205 Oct 16, 2026
d977bb5
feat(libSceNet): implement sceNetUsleep and sceNetInetPtonEx
Chikimaro Oct 19, 2026
fd9cd07
fix(libkernel): prevent use-after-free on event flag deletion and mul…
fogydes Oct 19, 2026
8ccd6ce
feat(libSceSysmodule): implement sceSysmoduleIsLoadedInternal
ErenYeager1836 Oct 16, 2026
2200656
fix(libkernel): report the read bit of every write bit in a mapping's…
hugodearaujo Oct 16, 2026
c48b9f9
feat(libSceHmd2): export missing firmware functions from database
al3w0f205 Oct 16, 2026
6207305
fix(libc): keep errno when strtol converts nothing on macOS
DavidSamir Oct 16, 2026
07ca6c6
feat(libSceRtc): implement component getters and setters with range v…
ErenYeager1836 Oct 16, 2026
1f94d08
fix(libkernel): pass the descriptor to Load in directory SEEK_END
adriadam10 Oct 19, 2026
ea3f0b8
fix(libc): apply the guest TZ to tzset, localtime, mktime and strftime
husseinkad Oct 13, 2026
ed3c49d
fix(libc): serialise guest TZ changes with time conversions
husseinkad Oct 13, 2026
909913b
fix(libc): read the guest TZ once per outermost time conversion
husseinkad Oct 13, 2026
094e5bc
fix(libc): refresh tzname after implicit TZ changes
Oct 16, 2026
5e4b2ac
test(libc): set the zone through the guest environment in tzname and …
adriadam10 Oct 19, 2026
7075c6e
fix(prx): correct the offline NP WebAPI error code and list silent stubs
Oct 19, 2026
87a0e0b
test(libkernel): check the macOS open file limit against EMFILE
DavidSamir Oct 16, 2026
ed13897
test(agc): exceed the device's own indirect dispatch limit
Oct 19, 2026
7c343ab
feat(libSceAgcDriver): implement command buffer submission
fogydes Oct 15, 2026
138fadc
fix(agc): initialize point size and limits from SDK defaults
JJenkx Oct 16, 2026
0791e53
test(agc): give the flip store test the deadline its siblings use
ionut27001 Oct 19, 2026
b417138
fix(agc): normalize unused viewport depth ranges
gguerra26 Oct 15, 2026
954c4cb
fix(agc): drop depth remap lines from the unused viewport depth test
RINNECODER Oct 19, 2026
dfce915
test(agc): check integer interpolation against the hardware rows
DavidSamir Oct 16, 2026
4344dd6
test(agc): compare 16-bit interpolation with a CPU reference on rando…
DavidSamir Oct 16, 2026
6996ed1
test(agc): run the mix precision test without Float64
DavidSamir Oct 16, 2026
01da0dc
fix(libSceAgcDriver): mask WAIT_REG_MEM addresses and elide non-overl…
al3w0f205 Oct 16, 2026
2db8dbc
fix(agc): drop unused wide flag after the WAIT_REG_MEM address maskin…
RINNECODER Oct 19, 2026
e094fb9
fix(metal): keep the position export layout when the vertex program t…
RINNECODER Oct 19, 2026
c725e74
fix(agc): include optional and string in the shader registry
RINNECODER Oct 19, 2026
a6c4dd1
merge team/u42-0 (upstream Batch 42 slice 0)
RINNECODER Oct 19, 2026
2b5afe3
merge team/u42-1 (upstream Batch 42 slice 1)
RINNECODER Oct 19, 2026
8a10b73
merge team/u42-2 (upstream Batch 42 slice 2)
RINNECODER Oct 19, 2026
f199041
merge team/u42-3 (upstream Batch 42 slice 3)
RINNECODER Oct 19, 2026
bcdc19f
merge team/u42-4 (upstream Batch 42 slice 4)
RINNECODER Oct 19, 2026
f4bf267
fix(sync): resolve Batch 42 cross-slice duplicates
RINNECODER Oct 19, 2026
6ab37b1
revert(libScePad): drop duplicate firmware pad interface stubs
RINNECODER Oct 19, 2026
ee1c211
fix(libc): keep one __fpclassifyl export
RINNECODER Oct 19, 2026
a8f49e7
fix(libkernel_sys): define GuestEbadf once
RINNECODER Oct 19, 2026
ab86088
revert(libSceAudioPropagation): drop duplicate firmware function stubs
RINNECODER Oct 19, 2026
fd34025
revert(relinker): keep the fork's macOS image base source
RINNECODER Oct 19, 2026
c19ae35
fix(agc): match fork PreparedGraphicsStage fields in deferred stage p…
RINNECODER Oct 23, 2026
448fb30
fix(relinker): accept section-symbol RELATIVE relocations in the fork…
RINNECODER Oct 23, 2026
b0709e1
fix(agc): mask WAIT_REG_MEM address at every reader
RINNECODER Oct 23, 2026
ef0985b
fix(agc): normalize unused viewport depth in the Metal draw decode
RINNECODER Oct 23, 2026
16b9c6a
revert(agc): drop the FMASK image read reproduction test
RINNECODER Oct 23, 2026
76e1813
fix(agc): remove the duplicate LiveCounter in the graphics tests
RINNECODER Oct 23, 2026
dc2d641
test(relinker): add upstream's guest_import_fixtures helper
RINNECODER Oct 23, 2026
3bf808b
fix(agc): wait for address-based writers before reading indirect disp…
RINNECODER Oct 23, 2026
f0c4a27
fix(build): drop duplicate test target definitions
RINNECODER Oct 23, 2026
25405c3
fix(libc): restore Backtrace.cpp to the libc sources
RINNECODER Oct 23, 2026
51a5d97
fix(agc): restore Windows unwind setup for the graphics tests
RINNECODER Oct 23, 2026
25119fb
fix(libc): register the application_heap_scripting test
RINNECODER Oct 23, 2026
85b180d
fix(tests): let the shader cache fake compiler answer CMake's linker …
RINNECODER Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/core/shader/recompiler/tests/test_shader_cache_native_paths.py
${CMAKE_CURRENT_SOURCE_DIR}/core/shader/recompiler/ShaderCacheVersion.cmake ${CMAKE_COMMAND})
set_tests_properties(shader_cache_native_paths PROPERTIES TIMEOUT 20)
add_test(NAME shader_cache_runtime_sources COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_shader_cache_runtime_sources.py
${CMAKE_CURRENT_SOURCE_DIR}/core/shader/recompiler ${CMAKE_COMMAND})
set_tests_properties(shader_cache_runtime_sources PROPERTIES TIMEOUT 180)
add_test(NAME pr_overlap_encoding COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_pr_overlap_encoding.py)
add_test(NAME pr_overlap_dependencies COMMAND ${Python3_EXECUTABLE}
Expand All @@ -117,6 +121,8 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_unwrap_self.py)
add_test(NAME conventions_function_bodies COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_comments.py)
add_test(NAME conventions_debt_length COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_debt_length.py)
add_test(NAME test_registration COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_test_registration.py)
add_test(NAME check_skips COMMAND ${Python3_EXECUTABLE}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- A silent stub is allowed only when it unblocks a title and only affects the UI; add it to [silent stubs](docs/dev/TechnicalDebt.md#silent-stubs).
- Missing imports fail at startup with a clear error; don't replace them with fallbacks that keep running.
- Implement the general behaviour of a function, not what one title happens to need.
- Don't add replacements for modules that titles ship themselves in `sce_module/`, `sce_modules/` or `prx/`: engine or middleware modules (Cohtml, FMOD, GOG Galaxy) and SDK libraries that only wrap other system libraries (NpCppWebApi over NpWebApi2). The relinker converts and loads the title's own module, and a host library with the same name is left out of `DT_NEEDED`. Only system libraries, which reach the kernel or the hardware, are reimplemented in [core/libs/prx](core/libs/prx).
- Don't add replacements for modules that titles ship themselves in `sce_module/`, `sce_modules/` or `prx/`: engine or middleware modules (Cohtml, FMOD, GOG Galaxy) and SDK libraries that only wrap other system libraries. The relinker converts and loads the title's own module, and a host library with the same name is left out of `DT_NEEDED`. Only system libraries, which reach the kernel or the hardware, are reimplemented in [core/libs/prx](core/libs/prx). A host copy may still exist for a wrapped library that some dumps lack entirely, like libSceNpCppWebApi: the title's own module wins whenever one is shipped, so it is only ever consulted by titles that ship nothing.
- Avoid non-standard extensions (`__attribute__`, etc.) where standard C++ is enough. Helper symbols that must not become NIDs use the `_nid_no_patch` or `_nid_no_patch_cut` suffix.
- The relinker uses only the C++20 standard library.
- Third-party code is added as a submodule under `3rdparty/` and built from source, not found on the system. With `ANYPS5_USE_SYSTEM_DEPS=ON` the packages packaged by the distributions (SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and SPIRV-Tools) come from the system instead; that resolution lives in [cmake/SystemDeps.cmake](cmake/SystemDeps.cmake) and the default build never reads the system.
Expand Down
30 changes: 30 additions & 0 deletions core/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,16 @@ if(BUILD_TESTING)
add_test(NAME host_thread_local COMMAND host_thread_local_tests)
set_tests_properties(host_thread_local PROPERTIES TIMEOUT 15)

add_test_executable(guest_np_cpp_web_api_intrusive_ptr_tests tests/GuestNpCppWebApiIntrusivePtr.cpp)
target_include_directories(guest_np_cpp_web_api_intrusive_ptr_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(guest_np_cpp_web_api_intrusive_ptr_tests PRIVATE libSceNpCppWebApi libc)
configure_windows_unwind(guest_np_cpp_web_api_intrusive_ptr_tests)
add_test(NAME guest_np_cpp_web_api_intrusive_ptr COMMAND guest_np_cpp_web_api_intrusive_ptr_tests)
if(WIN32)
set_tests_properties(guest_np_cpp_web_api_intrusive_ptr PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceNpCppWebApi>")
endif()

add_test_executable(savedata_core_write_replacement_tests tests/SaveDataWriteReplacement.cpp)
target_include_directories(savedata_core_write_replacement_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(savedata_core_write_replacement_tests PRIVATE libSceSaveData)
Expand Down Expand Up @@ -498,4 +508,24 @@ if(BUILD_TESTING)
set_tests_properties(guest_acm PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceAcm>")
endif()

add_test_executable(guest_voice_chat_tests tests/GuestVoiceChat.cpp)
target_include_directories(guest_voice_chat_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(guest_voice_chat_tests PRIVATE libSceVoiceChat libc)
configure_windows_unwind(guest_voice_chat_tests)
add_test(NAME guest_voice_chat COMMAND guest_voice_chat_tests)
if(WIN32)
set_tests_properties(guest_voice_chat PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceVoiceChat>")
endif()

add_test_executable(guest_np_game_intent_tests tests/GuestNpGameIntent.cpp)
target_include_directories(guest_np_game_intent_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(guest_np_game_intent_tests PRIVATE libSceNpGameIntent libc)
configure_windows_unwind(guest_np_game_intent_tests)
add_test(NAME guest_np_game_intent COMMAND guest_np_game_intent_tests)
if(WIN32)
set_tests_properties(guest_np_game_intent PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceNpGameIntent>")
endif()
endif()
5 changes: 5 additions & 0 deletions core/libs/SceTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,11 @@ struct NpGameIntentData {
std::uint8_t padding[7];
};

struct NpGameIntentInitParam {
std::size_t size;
std::uint8_t reserved[32];
};

struct NpGameIntentInfo {
std::size_t size;
std::int32_t user_id;
Expand Down
2 changes: 2 additions & 0 deletions core/libs/nid/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ void _writeFile(const std::string& path, const std::vector<std::uint8_t>& data)
std::ofstream f(path, std::ios::binary);
if (!f) throw std::runtime_error("cannot write: " + path);
f.write(reinterpret_cast<const char*>(data.data()), static_cast<std::streamsize>(data.size()));
f.close();
if (!f) throw std::runtime_error("cannot write: " + path);
}

}
Expand Down
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAbstractLocal/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstddef>
#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAbstractStorage/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstddef>
#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAbstractTcs/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstddef>
#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAbstractTwitter/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstddef>
#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAbstractYoutube/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstddef>
#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
10 changes: 10 additions & 0 deletions core/libs/prx/libSceAc3Enc/Export.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cstdint>
#include <cstddef>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

extern "C" {

APS5_DUMMY_FUN

}
2 changes: 1 addition & 1 deletion core/libs/prx/libSceAgc/Cb/include/Sync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
struct CommandBuffer;

extern "C" {
std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, std::uint8_t action, std::uint8_t clientCode, const volatile void* address);
std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint32_t operation, std::uint32_t modifier, std::uint32_t value);
}

#endif
13 changes: 7 additions & 6 deletions core/libs/prx/libSceAgc/Cb/src/Sync.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "prx/libSceAgc/Cb/include/Sync.hpp"

#include "prx/libSceAgc/Command/include/Control.hpp"
#include "prx/libSceAgc/Command/include/Packet.hpp"
#include <cstdio>
#include <cstdlib>
Expand Down Expand Up @@ -59,11 +58,13 @@ std::uint32_t* APS5_VABI sceAgcCbReleaseMem(CommandBuffer* buf, std::uint8_t act
return packet;
}

std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, std::uint8_t action, std::uint8_t clientCode, const volatile void* address) {
const std::uint8_t operation = action != 0 ? 7u : 6u;
const std::uint8_t signalType = clientCode & 1u;
const std::uint8_t waitForMailbox = (clientCode >> 1u) & 1u;
return Agc::Command::WriteMemSemaphore(buf, address, waitForMailbox, signalType, operation, __func__);
std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint32_t operation, std::uint32_t modifier, std::uint32_t value) {
(void)operation;
(void)modifier;
(void)value;
const auto guestAddress = static_cast<std::uint64_t>(reinterpret_cast<std::uintptr_t>(address));
const auto maskedAddress = guestAddress & ~0xfULL;
return Agc::Command::Emit(buf, 0x39u, {static_cast<std::uint32_t>(maskedAddress), static_cast<std::uint32_t>(maskedAddress >> 32u), 0x80100000u}, __func__);
}

}
69 changes: 42 additions & 27 deletions core/libs/prx/libSceAgc/tests/Semaphore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

extern "C" int APS5_VABI sceAgcSetAmmSemaphoreMemory(void* memory, std::uint64_t sizeInBytes);
extern "C" int APS5_VABI sceAgcGetSemaphoreLabel(std::uint32_t index, void** label);
extern "C" std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, std::uint8_t action, std::uint8_t clientCode, const volatile void* address);
extern "C" std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint32_t operation, std::uint32_t modifier, std::uint32_t value);

namespace {

Expand Down Expand Up @@ -145,34 +145,49 @@ void testMemSemaphore() {
check(sceAgcGetSemaphoreLabel(0, &label) == 0 && label != nullptr, "failed to get label for memory semaphore test");
const auto guestAddress = reinterpret_cast<std::uintptr_t>(label);

for (std::uint8_t action = 0; action <= 1; ++action) {
for (std::uint8_t clientCode = 0; clientCode <= 3; ++clientCode) {
std::array<std::uint32_t, 16> words{};
words.fill(0xdeadbeefu);
CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0};

auto* packet = sceAgcCbMemSemaphore(&buffer, action, clientCode, label);
check(packet == words.data(), "packet address mismatch");
check(packet[0] == 0xc0023900u, "MEM_SEMAPHORE header opcode mismatch");
check(packet[1] == static_cast<std::uint32_t>(guestAddress), "MEM_SEMAPHORE address low mismatch");
check(packet[2] == static_cast<std::uint32_t>(guestAddress >> 32u), "MEM_SEMAPHORE address high mismatch");

const std::uint32_t expectedOp = action != 0 ? 7u : 6u;
const std::uint32_t expectedSignal = clientCode & 1u;
const std::uint32_t expectedMailbox = (clientCode >> 1u) & 1u;
const std::uint32_t expectedControl = (expectedOp << 29u) | (expectedSignal << 20u) | (expectedMailbox << 16u);
check(packet[3] == expectedControl, "MEM_SEMAPHORE control word mismatch");
check(buffer.cursor_up == words.data() + 4, "cursor did not advance by 4 words");
check(words[4] == 0xdeadbeefu, "words past packet modified");
}
{
std::array<std::uint32_t, 16> words{};
words.fill(0xdeadbeefu);
CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0};
const auto* packet = sceAgcCbMemSemaphore(&buffer, reinterpret_cast<const volatile void*>(0x1111111122222222ull), 0x33333333u, 0x44444444u, 0);
check(packet == words.data(), "packet address mismatch");
check(packet[0] == 0xc0023900u, "MEM_SEMAPHORE header opcode mismatch");
check(packet[1] == 0x22222220u, "MEM_SEMAPHORE address low mismatch");
check(packet[2] == 0x11111111u, "MEM_SEMAPHORE address high mismatch");
check(packet[3] == 0x80100000u, "MEM_SEMAPHORE control word mismatch");
check(buffer.cursor_up == words.data() + 4, "cursor did not advance by 4 words");
check(words[4] == 0xdeadbeefu, "words past packet modified");
}

std::array<std::uint32_t, 16> words{};
CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0};
expectFailure([&] { sceAgcCbMemSemaphore(nullptr, 0, 0, label); });
expectFailure([&] { sceAgcCbMemSemaphore(&buffer, 0, 0, nullptr); });
auto* unalignedLabel = reinterpret_cast<void*>(guestAddress + 1);
expectFailure([&] { sceAgcCbMemSemaphore(&buffer, 0, 0, unalignedLabel); });
{
std::array<std::uint32_t, 16> words{};
words.fill(0xdeadbeefu);
CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0};
const auto* packet = sceAgcCbMemSemaphore(&buffer, reinterpret_cast<const volatile void*>(1ull), 2, 3, 4);
check(packet == words.data(), "packet address mismatch");
check(packet[0] == 0xc0023900u, "MEM_SEMAPHORE header opcode mismatch");
check(packet[1] == 0u, "MEM_SEMAPHORE address low mismatch");
check(packet[2] == 0u, "MEM_SEMAPHORE address high mismatch");
check(packet[3] == 0x80100000u, "MEM_SEMAPHORE control word mismatch");
check(buffer.cursor_up == words.data() + 4, "cursor did not advance by 4 words");
check(words[4] == 0xdeadbeefu, "words past packet modified");
}

{
std::array<std::uint32_t, 16> words{};
words.fill(0xdeadbeefu);
CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0};
const auto* packet = sceAgcCbMemSemaphore(&buffer, label, 0x12345678u, 0x9abcdef0u, 0x55aa55aau);
check(packet == words.data(), "packet address mismatch");
check(packet[0] == 0xc0023900u, "MEM_SEMAPHORE header opcode mismatch");
check(packet[1] == static_cast<std::uint32_t>(guestAddress & ~static_cast<std::uintptr_t>(0xfu)), "MEM_SEMAPHORE address low mismatch");
check(packet[2] == static_cast<std::uint32_t>(guestAddress >> 32u), "MEM_SEMAPHORE address high mismatch");
check(packet[3] == 0x80100000u, "MEM_SEMAPHORE control word mismatch");
check(buffer.cursor_up == words.data() + 4, "cursor did not advance by 4 words");
check(words[4] == 0xdeadbeefu, "words past packet modified");
}

expectFailure([&] { sceAgcCbMemSemaphore(nullptr, label, 0, 0, 0); });
}

}
Expand Down
Loading