Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 36 additions & 54 deletions core/libs/prx/libScePsml_debug/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1100(void* context, void*
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrCreateContext1300() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrCreateContext1300() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1300() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1300() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrGetSharedResourcesInitRequirement() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrGetSharedResourcesInitRequirement() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrInit() {
Expand All @@ -55,9 +52,8 @@ int APS5_VABI scePsmlMfsrGetDispatchMfsrPacketSizeInDwords() {
return 0;
}

int APS5_VABI scePsmlMfsrGetContextBufferRequirement800M3_2() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrGetContextBufferRequirement800M3_2() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrSelectConfig() {
Expand All @@ -70,84 +66,70 @@ int APS5_VABI scePsmlMfsrGetMipmapBias() {
return 0;
}

int APS5_VABI scePsmlMfsrRequestCapture() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrRequestCapture() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrReleaseContext() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrReleaseContext() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrIsCaptureInProgress() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1000() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1000() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrGetDispatchMfsrPacket900() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket900() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrCreateSharedResources() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrCreateSharedResources() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrCreateContext800M3_2() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrCreateContext800M3_2() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsrReleaseSharedResources() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsrReleaseSharedResources() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2ReleaseSharedResources() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2ReleaseSharedResources() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2GetSharedResourcesInitRequirement() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2GetSharedResourcesInitRequirement() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2GetContextInitRequirement() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2GetContextInitRequirement() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2ReleaseContext() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2ReleaseContext() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2GetDispatchPacketsSizeInDwords() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI scePsmlMfsr2CreateSharedResources() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2CreateSharedResources() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2GetDispatchPackets() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2GetDispatchPackets() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2CreateContext() {
NotImplemented_nid_no_patch(__func__);
return 0;
std::int32_t APS5_VABI scePsmlMfsr2CreateContext() {
return SCE_PSML_ERROR_NOT_INITIALIZED;
}

int APS5_VABI scePsmlMfsr2Init() {
Expand Down
16 changes: 16 additions & 0 deletions core/libs/tests/GuestPsml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
#include <array>
#include <cstdint>
#include <cstdlib>
#include <initializer_list>

extern "C" {
std::int32_t APS5_VABI scePsmlMfsrGetContextBufferRequirement1100(void* requirement, const void* param);
std::int32_t APS5_VABI scePsmlMfsrCreateContext1100(void** context, const void* param);
std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket1100(void* context, void* commandBuffer, const void* param);
std::int32_t APS5_VABI scePsmlMfsrCreateContext1300();
std::int32_t APS5_VABI scePsmlMfsrCreateContext800M3_2();
std::int32_t APS5_VABI scePsmlMfsrGetDispatchMfsrPacket900();
std::int32_t APS5_VABI scePsmlMfsrCreateSharedResources();
std::int32_t APS5_VABI scePsmlMfsrReleaseContext();
std::int32_t APS5_VABI scePsmlMfsrRequestCapture();
std::int32_t APS5_VABI scePsmlMfsr2CreateContext();
std::int32_t APS5_VABI scePsmlMfsr2GetDispatchPackets();
std::int32_t APS5_VABI scePsmlMfsr2ReleaseSharedResources();
}

namespace {
Expand Down Expand Up @@ -50,4 +60,10 @@ int main() {
Require(scePsmlMfsrGetDispatchMfsrPacket1100(nullptr, &commandBuffer, param.data()) == kErrNotInitialized);
Require(commandBuffer.cursor == dwords.data());
Require(dwords == untouchedDwords);
using Call = std::int32_t (APS5_VABI*)();
for (Call call : {scePsmlMfsrCreateContext1300, scePsmlMfsrCreateContext800M3_2, scePsmlMfsrGetDispatchMfsrPacket900, scePsmlMfsrCreateSharedResources,
scePsmlMfsrReleaseContext, scePsmlMfsrRequestCapture, scePsmlMfsr2CreateContext, scePsmlMfsr2GetDispatchPackets,
scePsmlMfsr2ReleaseSharedResources}) {
Require(call() == kErrNotInitialized);
}
}
2 changes: 1 addition & 1 deletion docs/dev/TechnicalDebt.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Throughout the project, every function at every stage either **does exactly what
- [sceAudioOut2PortCreate](../../core/libs/prx/libSceAudioOut/src/AudioOut2Port.cpp) (libSceAudioOut) - 12 channels are assumed to be L R C LFE Ls Rs Lb Rb Ltf Rtf Ltb Rtb as in KytyPS5's 12-to-8 fold, and 6 and 8 channels to be its first 6 and 8; no title or SDK header confirms the order
- [sceAudioOut2PortCreate](../../core/libs/prx/libSceAudioOut/src/AudioOut2Port.cpp) (libSceAudioOut) - the stereo fold is assumed, not the console's downmix: C at -3 dB into both sides, Ls/Rs, Lb/Rb and Ltf/Rtf at -3 dB and Ltb/Rtb at -6 dB into their own side, LFE dropped
- [sceAudioOut2PortSetAttributes](../../core/libs/prx/libSceAudioOut/src/AudioOut2Port.cpp) (libSceAudioOut) - each PCM buffer set (attribute 0) is taken as one grain: buffers set between two pushes are queued and played one per grain, at most 16 queued. A grain with no new buffer repeats the last one only when the port has always been given that same buffer (rewritten in place); a port whose buffers move on plays silence instead. Inferred from PPSA12544, whose object port (type 6) is given one grain of a 64-grain ring per set, often two or three between pushes and then none for a few; the console behaviour for several sets per push and for a push without a new buffer is not documented
- [scePsmlMfsrGetContextBufferRequirement1100, scePsmlMfsrCreateContext1100, scePsmlMfsrGetDispatchMfsrPacket1100](../../core/libs/prx/libScePsml_debug/Export.cpp) (libScePsml_debug) - argument layouts unknown; only 0x8A810001 (not initialized) is returned
- [scePsmlMfsrGetContextBufferRequirement1100, scePsmlMfsrCreateContext1100, scePsmlMfsrGetDispatchMfsrPacket1100](../../core/libs/prx/libScePsml_debug/Export.cpp) (libScePsml_debug) - argument layouts unknown; only 0x8A810001 (not initialized) is returned. `scePsmlMfsrInit` and `scePsmlMfsr2Init` throw, as no machine-learning upscaler exists, so the library is never initialized: the context, shared-resource, requirement, dispatch and capture calls of both versions (`scePsmlMfsrCreateContext1300`, `scePsmlMfsrCreateContext800M3_2`, `scePsmlMfsrGetContextBufferRequirement800M3_2`, `scePsmlMfsrGetDispatchMfsrPacket900`, `1000` and `1300`, `scePsmlMfsrCreateSharedResources`, `scePsmlMfsrGetSharedResourcesInitRequirement`, `scePsmlMfsrReleaseContext`, `scePsmlMfsrReleaseSharedResources`, `scePsmlMfsrRequestCapture` and the `scePsmlMfsr2` context, shared-resource, requirement and dispatch calls) return the same error without reading their arguments, which stay undeclared
- [scePsmlMfsrGetDispatchMfsrPacket1000](../../core/libs/prx/libScePsml_debug/Export.cpp) (libScePsml) - unknown signature, imported by PPSA25344; declared without parameters. libScePsml and libScePsml_debug are built from the same source
- [scePsmlMfsrCreateContext1300, scePsmlMfsrGetDispatchMfsrPacket1300](../../core/libs/prx/libScePsml_debug/Export.cpp) (libScePsml) - unknown signatures, imported by PPSA28416 next to `scePsmlMfsrGetContextBufferRequirement1100`; declared without parameters. The names are not in the aerolib NID list; they hash to the imported NIDs `kLF7WtQ1-Dg` and `DDVUyPyYHTA` (`tools/nid_names.py`)
- [scePngEncEncode](../../core/libs/prx/libScePngEnc/Export.cpp) (libScePngEnc) - whether rows may stay unfiltered when `filter_type` names a subset of the filters is unknown; as in shadPS4, they may only for 0 and for the all-filters mask
Expand Down
Loading