Files
juanpimg 2f0ed638dc feat(prx): declare the missing PS5 3.20 system exports
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function no library provides fails to load with an unresolved import. The
PS5 3.20 export inventory lists 193 such exports across 37 PS5 system
libraries AnyPS5 implements but does not provide.

Declare them as throwing stubs so those titles load and reach their next
blocker. Each declaration calls NotImplemented_nid_no_patch and returns 0;
none of them implements the function. Declarations with a credible
prototype use it and cite the source with a pinned commit, and the rest
are declared without parameters, which resolves the import without making
an ABI claim. The technical-debt files record the limitation per library.

libSceMbus and libSceSystemService are left out because pull request #7821
declares them. libSceAgc is left out because its exports are versioned, so
the 3.20 NID names a different symbol from the one AnyPS5 ships.
libSceAvPlayer.native is left out because it compiles libSceAvPlayer's
Export.cpp.

Names and NIDs come from the PS5 3.20 export inventory at
https://github.com/DNNDHH/PS5-3.20_Libs/tree/b2a77c09cd71c01f34c790cfbe98c751a13262ad
2026-10-19 23:16:55 +02:00

71 lines
1.8 KiB
C++

#include "prx/libc/include/general/VabiMacros.hpp"
#include "prx/libSceOpusDec/include/OpusDecoder.hpp"
#include <cstdint>
#include "prx/libc/include/General.hpp"
namespace {
OpusDecoderLibrary library("OpusDec", false);
} // namespace
extern "C" {
int APS5_VABI sceOpusDecInitialize(std::uint32_t* context) { return library.Initialize(context); }
int APS5_VABI sceOpusDecTerminate(std::uint32_t* context) { return library.Terminate(context); }
int APS5_VABI sceOpusDecGetSize(int channels) { return library.GetSize(channels); }
int APS5_VABI sceOpusDecCreateEx(std::uint32_t* context, void* state, int sampleRate, int channels) {
return library.CreateEx(context, state, sampleRate, channels);
}
int APS5_VABI sceOpusDecDecode(void* state, const std::uint8_t* data, int bytes, std::int16_t* pcm, int capacity) {
return library.Decode(state, data, bytes, pcm, capacity);
}
int APS5_VABI sceOpusDecDestroy(void* state) { return library.Destroy(state); }
int APS5_VABI sceOpusDecCancel() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecCreate() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecCtl() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecDecodeFloat() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecDecodeFloatWithPriority() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecDecodeFloatWithPriorityAndTimeout() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecDecodeWithPriority() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceOpusDecDecodeWithPriorityAndTimeout() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
}