Several PsyQ compatibility entry points are unavailable in the linked PsyZ library
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c, wasm
- Domain
- backend, build-system
Research direction
Start by checking the PsyZ Emscripten library’s defined symbols at revision 35c673ecf1c4ba799a812d701918c2c52935475b and comparing them with the listed Matrix/GTE, SPU, Kernel, and GPU entry points. The issue provides repro.c and CMake instructions to reproduce the SPU linker failure. Done means the requested entry points are available in the portable library; validate each subsystem’s behavior with focused tests for the concerns listed in the issue.
Written by the indexing model from the issue text.
Description
PsyZ 35c673ecf1c4ba799a812d701918c2c52935475b declares several useful PsyQ
entry points without providing them in its Emscripten library. Existing game
code using those APIs needs local replacements before it can link.
Minimal reproduction
repro.c takes the address of the declared SpuSetCommonMasterVolume.
No audio initialization or game code is involved. Save the attachment as repro.c and build using the instructions below. Tested with Emscripten 6.0.13.
Actual linker result:
undefined symbol: SpuSetCommonMasterVolume
Expected: the declared compatibility entry point links successfully.
Scope found while porting
The following names are absent from the defined-symbol list of the built library:
| Area | Entry points |
|---|---|
| Matrix / GTE | ApplyMatrixSV, Square0, RotTransSV, MulMatrix0, ApplyRotMatrixLV, Lzc |
| SPU | SpuSetKeyOnWithAttr, SpuSetCommonMasterVolume, SpuSetCommonCDVolume, SpuSetCommonCDMix |
| Kernel | SwEnterCriticalSection, SwExitCriticalSection |
| GPU | SetDrawStp |
Some names occur in the repository's decompilation tree as assembly placeholders;
that is different from being available in the portable library. This is an
inventory of names we needed, not a claim that all have identical implementation
complexity or that our replacements are complete PsyQ specifications.
The SPU link failure was reproduced directly. The rest were checked against the
built archive and source. Matrix saturation/flags, aliasing, kernel locking and
GPU command lengths need their own focused tests when implemented. This can be
split into subsystem issues if preferred; no graphics attachment is needed.
Building the standalone example
Save the attached file as repro.c, and place this CMakeLists.txt beside it:
cmake_minimum_required(VERSION 3.21)
project(sdk_link_repro C CXX)
set(CMAKE_C_STANDARD 11)
add_compile_options(-pthread)
add_link_options(-pthread)
set(SDL_PTHREADS ON CACHE BOOL "" FORCE)
add_subdirectory("${PSYZ_ROOT}/psyz" psyz EXCLUDE_FROM_ALL)
add_executable(repro repro.c)
target_link_libraries(repro PRIVATE psyz)
target_link_options(repro PRIVATE -sASSERTIONS=1 -sPTHREAD_POOL_SIZE=2)
psyz_web_configure_target(repro OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/site")
Use a PsyZ checkout at the revision above, with its SDL submodule initialized:
emcmake cmake -S . -B build -DPSYZ_ROOT=/path/to/psyz -DCMAKE_BUILD_TYPE=Release
cmake --build build -j8
This example is expected to fail at the link step on the recorded baseline; it does not need to be opened in a browser.
- Dominant language
- C
- Stars
- 107
- Forks
- 26
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Xeeynamo/psyz
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
Similar issues
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JulianKemmerer/PipelineC#409 ·
-
Linux build fails without libspeechd-dev, which INSTALL.md doesn't list and CMake reports as foundOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
GXF: heap buffer overflow in parse_ad_cdp() — unbounded cc_count in CDP cc data sectionPossibly taken @pranayr710 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CCExtractor/ccextractor#2498 ·
Maintainers usually reply within 1 day