From 63138b7cc365a53af48e96b39f45ba5d6048a57c Mon Sep 17 00:00:00 2001 From: Mehran Date: Sun, 25 Oct 2026 03:51:59 +0300 Subject: [PATCH 01/23] perf(agc): track pending and borrowed texture units in 64-bit words --- .../Graphics/include/Texture.hpp | 83 ++++++++++++++++++- .../libSceAgcDriver/Graphics/src/Texture.cpp | 53 ++++++------ .../prx/libSceAgcDriver/tests/Graphics.cpp | 22 +++++ 3 files changed, 131 insertions(+), 27 deletions(-) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp b/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp index 85a45ae60e..0f20bbdef2 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp @@ -9,6 +9,7 @@ #include "prx/libSceAgcDriver/Graphics/include/UnitShadow.hpp" #include #include +#include #include #include #include @@ -168,6 +169,84 @@ private: VkFormat AttachmentProxyFormat(const Context& context, VkFormat format); VkFormat SrgbTwinFormat(const Context& context, VkFormat format); +class UnitFlags { +public: + class Reference { + public: + Reference(std::uint64_t& word, std::uint64_t bit) : word(word), bit(bit) {} + operator bool() const { return (word & bit) != 0u; } + Reference& operator=(bool flag) { + word = flag ? word | bit : word & ~bit; + return *this; + } + + private: + std::uint64_t& word; + std::uint64_t bit; + }; + + void assign(std::size_t size, bool flag) { + count = size; + words.assign((size + WordBits - 1u) / WordBits, flag ? ~std::uint64_t{0} : 0u); + if (flag && size % WordBits != 0u) words.back() &= (std::uint64_t{1} << (size % WordBits)) - 1u; + } + void clear() { + words.clear(); + count = 0; + } + std::size_t size() const { return count; } + bool empty() const { return count == 0; } + bool operator[](std::size_t index) const { return ((words[index / WordBits] >> (index % WordBits)) & 1u) != 0u; } + Reference operator[](std::size_t index) { return {words[index / WordBits], std::uint64_t{1} << (index % WordBits)}; } + bool Any() const { + for (const auto word : words) { + if (word != 0u) return true; + } + return false; + } + std::size_t Count() const { + std::size_t total = 0; + for (const auto word : words) total += static_cast(std::popcount(word)); + return total; + } + bool AnyIn(std::size_t first, std::size_t length) const { + return eachWord(first, length, [&](std::size_t word, std::uint64_t mask) { return (words[word] & mask) != 0u; }); + } + bool AllIn(std::size_t first, std::size_t length) const { + return !eachWord(first, length, [&](std::size_t word, std::uint64_t mask) { return (words[word] & mask) != mask; }); + } + void SetRange(std::size_t first, std::size_t length, bool flag) { + eachWord(first, length, [&](std::size_t word, std::uint64_t mask) { + words[word] = flag ? words[word] | mask : words[word] & ~mask; + return false; + }); + } + std::vector Bools() const { + std::vector flags(count, false); + for (std::size_t index = 0; index < count; ++index) flags[index] = (*this)[index]; + return flags; + } + +private: + static constexpr std::size_t WordBits = 64; + + template + static bool eachWord(std::size_t first, std::size_t length, Visit&& visit) { + if (length == 0) return false; + const auto last = first + length - 1u; + for (auto word = first / WordBits; word <= last / WordBits; ++word) { + const auto low = word == first / WordBits ? first % WordBits : 0u; + const auto high = word == last / WordBits ? last % WordBits : WordBits - 1u; + const auto mask = (~std::uint64_t{0} >> (WordBits - 1u - high)) & (~std::uint64_t{0} << low); + if (visit(word, mask)) return true; + } + return false; + } + + std::vector words; + std::size_t count = 0; +}; + // A guest texture a shader writes through a storage image. It is uploaded like a sampled texture; // after the GPU work completes its results are stored to guest memory (retiled, changed bytes only), // either at once (WriteBack) or deferred: MarkDirty keeps them on the GPU until something reads that @@ -629,7 +708,7 @@ private: std::uint64_t trackedLayerBytes = 0; std::vector layerGeneration; std::vector completionKept; - std::vector layerPending; + UnitFlags layerPending; std::vector layerBehind; bool blockUnits = false; // Write-back hysteresis (block units, see writeBack): partial stores in the current window of @@ -640,7 +719,7 @@ private: // Units holding the alias's results (see pendingAlias), at the alias's version then. std::weak_ptr borrowedFrom; std::uint64_t borrowedVersion = 0; - std::vector borrowedUnits; + UnitFlags borrowedUnits; std::vector, std::uint64_t>> handedOver; std::vector handedUnits; // Units of this image were borrowed since it was last written: the borrower's proofs diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp index ada06eab1e..d081153b55 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp @@ -3775,7 +3775,7 @@ void StorageTexture::MarkSliceDirty(std::uint32_t slice, std::uint32_t count) { } bool StorageTexture::anyLayerPending() const { - return std::any_of(layerPending.begin(), layerPending.end(), [](bool pending) { return pending; }); + return layerPending.Any(); } void StorageTexture::refreshGeneration() { @@ -3831,32 +3831,35 @@ void StorageTexture::markLayersPending(std::uint32_t first, std::uint32_t count) CaptureTrace::Log("image-write image=%llx first=%u count=%u generation=%llu", static_cast(descriptor.baseAddress), first, count, static_cast(generation)); ++writes; static const bool eager = std::getenv("APS5_EAGER_WRITEBACK") != nullptr || std::getenv("APS5_NO_TEXTURE_CACHE") != nullptr; - std::vector unsaved; - bool anyUnsaved = false; - const bool trims = CommitTrims(); - if (trims) { - for (std::uint32_t layer = first; layer < first + count && !anyUnsaved; ++layer) anyUnsaved = !layerPending[layer] && !layerOriginal[layer] && layerGeneration[layer] == 0; - } - if (!trims || anyUnsaved) { - unsaved.assign(trackedLayers, false); - anyUnsaved = false; - for (std::uint32_t layer = first; layer < first + count; ++layer) { - unsaved[layer] = !layerPending[layer] && !layerOriginal[layer] && layerGeneration[layer] == 0; - anyUnsaved = anyUnsaved || unsaved[layer]; + if (!layerPending.AllIn(first, count)) { + std::vector unsaved; + bool anyUnsaved = false; + const bool trims = CommitTrims(); + if (trims) { + for (std::uint32_t layer = first; layer < first + count && !anyUnsaved; ++layer) anyUnsaved = !layerPending[layer] && !layerOriginal[layer] && layerGeneration[layer] == 0; } - } - if (anyUnsaved && !GuestMemory::Watched(descriptor.baseAddress, static_cast(guestBytes))) captureGuestBytes(&unsaved); - for (std::uint32_t layer = first; layer < first + count; ++layer) { - if (!layerPending[layer] && !completionKept.empty()) { - const auto end = layerBegin(layer) + layerBytes(layer); - for (auto at = layerBegin(layer) & ~std::uint64_t{65535}; at < end; at += 65536) completionKept[static_cast(at / 65536 - descriptor.baseAddress / 65536)] = 0; + if (!trims || anyUnsaved) { + unsaved.assign(trackedLayers, false); + anyUnsaved = false; + for (std::uint32_t layer = first; layer < first + count; ++layer) { + unsaved[layer] = !layerPending[layer] && !layerOriginal[layer] && layerGeneration[layer] == 0; + anyUnsaved = anyUnsaved || unsaved[layer]; + } } - layerPending[layer] = true; + if (anyUnsaved && !GuestMemory::Watched(descriptor.baseAddress, static_cast(guestBytes))) captureGuestBytes(&unsaved); + if (!completionKept.empty()) { + for (std::uint32_t layer = first; layer < first + count; ++layer) { + if (layerPending[layer]) continue; + const auto end = layerBegin(layer) + layerBytes(layer); + for (auto at = layerBegin(layer) & ~std::uint64_t{65535}; at < end; at += 65536) completionKept[static_cast(at / 65536 - descriptor.baseAddress / 65536)] = 0; + } + } + layerPending.SetRange(first, count, true); } // Results of this image now cover the alias's results borrowed into these units: this image // stores them, the alias no longer has to (its results, unchanged since the borrow, are in // this image's content). An alias written since keeps its own newer results pending. - if (auto source = borrowedFrom.lock(); source != nullptr && borrowedUnits.size() == trackedLayers) { + if (auto source = borrowedUnits.size() == trackedLayers && borrowedUnits.AnyIn(first, count) ? borrowedFrom.lock() : nullptr; source != nullptr) { bool superseded = false; for (std::uint32_t unit = first; unit < first + count; ++unit) { if (!borrowedUnits[unit]) continue; @@ -5178,7 +5181,7 @@ bool StorageTexture::clearByKeysFill(DccKeys keys, std::uint8_t key) { { auto& pending = Pending(); std::lock_guard lock(pending.mutex); - droppedUnits = static_cast(std::count(layerPending.begin(), layerPending.end(), true)); + droppedUnits = layerPending.Count(); layerPending.assign(trackedLayers, false); if (dirty) { dirty = false; @@ -5738,8 +5741,8 @@ std::shared_ptr StorageTexture::pendingAlias() const { void StorageTexture::forgetBorrowed(std::uint32_t first, std::uint32_t count) { if (borrowedUnits.empty()) return; - for (auto unit = first; unit < first + count && unit < borrowedUnits.size(); ++unit) borrowedUnits[unit] = false; - if (std::none_of(borrowedUnits.begin(), borrowedUnits.end(), [](bool held) { return held; })) { + if (first < borrowedUnits.size()) borrowedUnits.SetRange(first, std::min(count, borrowedUnits.size() - first), false); + if (!borrowedUnits.Any()) { borrowedUnits.clear(); borrowedFrom.reset(); } @@ -5845,7 +5848,7 @@ void StorageTexture::writeBack(std::uint64_t address, std::size_t bytes) { } if (present < storeWholeUntil || ++partialStores > pieces) { storeWholeUntil = present + window; - layers = layerPending; + layers = layerPending.Bools(); coalescedWriteBacks.fetch_add(1, std::memory_order_relaxed); } } diff --git a/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp b/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp index e1896d291f..1748c3a328 100644 --- a/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp @@ -9438,6 +9438,27 @@ std::pair stencilReferenceOutcome(const AgcDriver::Graphics return {((stencil & ~writeMask) | (updated & writeMask)) & 0xffu, stencilPass && depthPass}; } +void unitFlagsTests() { + AgcDriver::Graphics::UnitFlags flags; + flags.assign(130, false); + Require(flags.size() == 130 && !flags.Any() && flags.Count() == 0, "unit flags: a cleared set holds flags"); + flags.SetRange(60, 10, true); + Require(flags.Count() == 10 && flags.AllIn(60, 10) && !flags.AllIn(59, 11) && !flags.AllIn(60, 11), "unit flags: a range across a word boundary was not set exactly"); + Require(flags.AnyIn(69, 1) && !flags.AnyIn(70, 60) && !flags.AnyIn(0, 60), "unit flags: AnyIn saw a flag outside its range"); + for (std::size_t unit = 0; unit < flags.size(); ++unit) Require(flags[unit] == (unit >= 60 && unit < 70), "unit flags: unit " + std::to_string(unit) + " reads wrong"); + flags[64] = false; + Require(!flags.AllIn(60, 10) && flags.AnyIn(60, 10) && flags.Count() == 9 && !flags[64] && flags[63] && flags[65], "unit flags: clearing one unit changed another"); + flags.SetRange(0, 130, true); + Require(flags.AllIn(0, 130) && flags.Count() == 130, "unit flags: setting every unit left one clear"); + flags.SetRange(64, 64, false); + Require(flags.Count() == 66 && flags.AllIn(0, 64) && !flags.AnyIn(64, 64) && flags.AllIn(128, 2), "unit flags: clearing one whole word touched its neighbours"); + Require(!flags.AnyIn(64, 0) && flags.AllIn(64, 0), "unit flags: an empty range was not empty"); + flags.assign(130, true); + Require(flags.Count() == 130 && flags.Bools() == std::vector(130, true), "unit flags: a set filled with true holds bits past its size or misses some"); + flags.clear(); + Require(flags.empty() && flags.size() == 0 && !flags.Any(), "unit flags: a cleared set is not empty"); +} + void stencilReferenceUnusedTests() { using AgcDriver::Graphics::StencilReferenceUnused; AgcDriver::Graphics::State state{}; @@ -12473,6 +12494,7 @@ int main(int argc, char** argv) { RunGuestLeaseWaitTests(); ResourceContentKeyTests(false); stateTests(); + unitFlagsTests(); pipelineStoreLazyBufferPoolTests(); retainedPixelStageTests(); pipelineLibrarySetTests(); From bbbe79fc38dc32175dbe0db6ca0f73e45087fac2 Mon Sep 17 00:00:00 2001 From: Mehran Date: Mon, 26 Oct 2026 20:44:14 +0300 Subject: [PATCH 02/23] fix(agc): keep unit flags intact when growing them fails --- core/libs/prx/libSceAgcDriver/CMakeLists.txt | 11 +++ .../Graphics/include/Texture.hpp | 2 +- .../tests/UnitFlagsAllocationFailure.cpp | 67 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 core/libs/prx/libSceAgcDriver/tests/UnitFlagsAllocationFailure.cpp diff --git a/core/libs/prx/libSceAgcDriver/CMakeLists.txt b/core/libs/prx/libSceAgcDriver/CMakeLists.txt index 9d27611288..2a8d0e5d55 100644 --- a/core/libs/prx/libSceAgcDriver/CMakeLists.txt +++ b/core/libs/prx/libSceAgcDriver/CMakeLists.txt @@ -2036,6 +2036,17 @@ add_test_executable(agc_driver_graphics_tests EXCLUDE_FROM_ALL ) if(BUILD_TESTING) + add_test_executable(agc_unit_flags_allocation_failure_tests + tests/UnitFlagsAllocationFailure.cpp tests/AllocationFailure.cpp) + target_include_directories(agc_unit_flags_allocation_failure_tests PRIVATE + $) + if(MINGW) + target_compile_options(agc_unit_flags_allocation_failure_tests PRIVATE -fasynchronous-unwind-tables) + endif() + configure_windows_unwind(agc_unit_flags_allocation_failure_tests) + add_test(NAME agc_unit_flags_allocation_failure_empty COMMAND agc_unit_flags_allocation_failure_tests empty) + add_test(NAME agc_unit_flags_allocation_failure_populated COMMAND agc_unit_flags_allocation_failure_tests populated) + set_tests_properties(agc_unit_flags_allocation_failure_empty agc_unit_flags_allocation_failure_populated PROPERTIES TIMEOUT 20) add_test_executable(agc_descriptor_cache_failure_tests tests/DescriptorCacheFailure.cpp Graphics/src/ShaderResources.cpp) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp b/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp index 0f20bbdef2..bb90bae546 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp @@ -186,9 +186,9 @@ public: }; void assign(std::size_t size, bool flag) { - count = size; words.assign((size + WordBits - 1u) / WordBits, flag ? ~std::uint64_t{0} : 0u); if (flag && size % WordBits != 0u) words.back() &= (std::uint64_t{1} << (size % WordBits)) - 1u; + count = size; } void clear() { words.clear(); diff --git a/core/libs/prx/libSceAgcDriver/tests/UnitFlagsAllocationFailure.cpp b/core/libs/prx/libSceAgcDriver/tests/UnitFlagsAllocationFailure.cpp new file mode 100644 index 0000000000..3d8001b733 --- /dev/null +++ b/core/libs/prx/libSceAgcDriver/tests/UnitFlagsAllocationFailure.cpp @@ -0,0 +1,67 @@ +#include "AllocationFailure.hpp" +#include "prx/libSceAgcDriver/Graphics/include/Texture.hpp" +#include +#include +#include +#include + +namespace { + +void require(bool condition, const char* message) { + if (!condition) throw std::runtime_error(message); +} + +void failAssign(AgcDriver::Graphics::UnitFlags& flags, std::size_t size) { + bool failed = false; + AgcDriver::Tests::SetAllocationFailureCountdown(0); + try { + flags.assign(size, true); + } catch (const std::bad_alloc&) { + failed = true; + } catch (...) { + AgcDriver::Tests::SetAllocationFailureCountdown(-1); + throw; + } + AgcDriver::Tests::SetAllocationFailureCountdown(-1); + require(failed, "unit flags assignment did not exercise allocation failure"); +} + +void emptySet() { + AgcDriver::Graphics::UnitFlags flags; + failAssign(flags, 65); + require(flags.empty() && flags.size() == 0 && !flags.Any(), "failed first allocation changed the unit flags size"); + flags.assign(65, true); + require(flags.size() == 65 && flags.Count() == 65 && flags.AllIn(0, 65), "unit flags did not recover after a failed first allocation"); + flags.SetRange(64, 1, false); + require(flags.Count() == 64 && !flags.AnyIn(64, 1), "recovered unit flags lost range access"); +} + +void populatedSet() { + AgcDriver::Graphics::UnitFlags flags; + flags.assign(65, false); + flags[3] = true; + flags[64] = true; + failAssign(flags, 129); + require(flags.size() == 65 && flags.Count() == 2 && flags[3] && flags[64], "failed growth changed the existing unit flags"); + flags.assign(130, true); + require(flags.size() == 130 && flags.Count() == 130 && flags.AllIn(0, 130), "unit flags did not recover after failed growth"); + flags.SetRange(0, 130, false); + require(!flags.Any(), "recovered unit flags retained bits after clearing"); +} + +} + +int main(int argc, char** argv) { + try { + require(argc == 2, "expected empty or populated case"); + const std::string_view mode(argv[1]); + if (mode == "empty") emptySet(); + else if (mode == "populated") populatedSet(); + else throw std::runtime_error("unknown unit flags allocation-failure case"); + return 0; + } catch (const std::exception& error) { + AgcDriver::Tests::SetAllocationFailureCountdown(-1); + std::fprintf(stderr, "%s\n", error.what()); + return 1; + } +} From 5d1e214ce3de525b07e5328cb87993fc91d46439 Mon Sep 17 00:00:00 2001 From: milescoviello Date: Thu, 22 Oct 2026 00:05:21 +0000 Subject: [PATCH 03/23] fix(agc): copy a linked pipeline's color sample counts only when it has color attachments Co-Authored-By: Claude Opus 5.5 --- .../libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp index 0ccd993ac2..f034f09428 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineLibrary.cpp @@ -260,7 +260,9 @@ VkPipeline LinkPipelineFromLibraries(const Context& context, const VkGraphicsPip for (auto* next = static_cast(rendering.pNext); next != nullptr; next = next->pNext) { if (next->sType != VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV) continue; const auto& counts = *reinterpret_cast(next); - sampleCounts.emplace(std::vector(counts.pColorAttachmentSamples, counts.pColorAttachmentSamples + counts.colorAttachmentCount), counts.depthStencilAttachmentSamples); + std::vector colors; + if (counts.colorAttachmentCount != 0) colors.assign(counts.pColorAttachmentSamples, counts.pColorAttachmentSamples + counts.colorAttachmentCount); + sampleCounts.emplace(std::move(colors), counts.depthStencilAttachmentSamples); } const auto attachmentSamples = [](const std::pair, VkSampleCountFlagBits>& counts) { return VkAttachmentSampleCountInfoNV{VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV, nullptr, static_cast(counts.first.size()), counts.first.empty() ? nullptr : counts.first.data(), counts.second}; From d42b8ae24966596f3b8513a26472119d504c4cb3 Mon Sep 17 00:00:00 2001 From: legendary cookie Date: Thu, 29 Oct 2026 21:28:05 +0800 Subject: [PATCH 04/23] test(libSceHmd2): cover the gaze device and calibration status queries before initialization Co-Authored-By: Claude Opus 5.5 --- core/libs/tests/GuestHmd2Gaze.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/core/libs/tests/GuestHmd2Gaze.cpp b/core/libs/tests/GuestHmd2Gaze.cpp index 7a9a674c36..5626d799fa 100644 --- a/core/libs/tests/GuestHmd2Gaze.cpp +++ b/core/libs/tests/GuestHmd2Gaze.cpp @@ -11,6 +11,7 @@ namespace { constexpr std::int32_t InvalidHandle = static_cast(0x8a720003); +constexpr std::int32_t Error0004 = static_cast(0x8a720004); constexpr std::int32_t ParameterNull = static_cast(0x8a720008); constexpr std::int32_t ParameterInvalid = static_cast(0x8a720009); @@ -85,12 +86,30 @@ void CheckFoveatedResult() { Require(Read(result, 0x14) == 0x5a5a5a5a, "foveated +0x14 untouched"); } +void CheckGazeStatus() { + alignas(std::int32_t) unsigned char deviceStatus[sizeof(std::int32_t)]; + alignas(Hmd2::GazeUserCalibrationStatus) unsigned char calibrationStatus[sizeof(Hmd2::GazeUserCalibrationStatus)]; + std::memset(deviceStatus, 0, sizeof(deviceStatus)); + std::memset(calibrationStatus, 0, sizeof(calibrationStatus)); + + Require(sceHmd2GazeGetDeviceStatus(nullptr) == ParameterNull, "device status null"); + Require(sceHmd2GazeGetDeviceStatus(reinterpret_cast(deviceStatus)) == Error0004, "device status uninitialized"); + for (std::size_t offset = 0; offset < sizeof(deviceStatus); ++offset) + Require(Read(deviceStatus, offset) == 0, "device status untouched"); + + Require(sceHmd2GazeGetUserCalibrationStatus(nullptr) == ParameterNull, "calibration status null"); + Require(sceHmd2GazeGetUserCalibrationStatus(reinterpret_cast(calibrationStatus)) == Error0004, "calibration status uninitialized"); + for (std::size_t offset = 0; offset < sizeof(calibrationStatus); ++offset) + Require(Read(calibrationStatus, offset) == 0, "calibration status untouched"); +} + } int main() { Require(sceHmd2Initialize(nullptr) != 0, "initialize reports no headset"); CheckGazeResult(); CheckFoveatedResult(); + CheckGazeStatus(); std::puts("guest Hmd2 gaze results without a headset: PASS"); return 0; } From 447d7f9c1f54beedb6c64965d731fe69277e389e Mon Sep 17 00:00:00 2001 From: Kyon Date: Thu, 29 Oct 2026 17:54:10 +0000 Subject: [PATCH 05/23] feat(libcairo): declare 161 callable exports --- core/libs/prx/libcairo/Export.cpp | 651 ++++++++++++++++++ .../prx/libcairo/include/InventoryExports.hpp | 169 +++++ core/libs/prx/libcairo/libcairo.hpp | 3 + docs/dev/debt/libcairo.md | 169 +++++ 4 files changed, 992 insertions(+) create mode 100644 core/libs/prx/libcairo/Export.cpp create mode 100644 core/libs/prx/libcairo/include/InventoryExports.hpp create mode 100644 core/libs/prx/libcairo/libcairo.hpp create mode 100644 docs/dev/debt/libcairo.md diff --git a/core/libs/prx/libcairo/Export.cpp b/core/libs/prx/libcairo/Export.cpp new file mode 100644 index 0000000000..db5ce4bbcd --- /dev/null +++ b/core/libs/prx/libcairo/Export.cpp @@ -0,0 +1,651 @@ +#include "prx/libcairo/include/InventoryExports.hpp" +#include "prx/libc/include/General.hpp" +#include "prx/libc/include/general/ExportMacros.hpp" + +extern "C" { + +int APS5_VABI cairo_scaled_font_get_font_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_paint() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_set_hint_metrics() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_font_options() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_device_to_user_distance() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_face_set_user_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_stroke_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_arc_negative() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_new_sub_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_get_stride() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_user_to_device() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_antialias() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_translate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_rotate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_create_from_png_stream() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_fill_rule() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_ft_scaled_font_lock_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_glyph_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_set_device_scale() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_dash() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_source_rgb() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_scale() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_invert() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_get_font_options() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_init_translate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_get_type() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_in_stroke() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_get_ctm() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_font_size() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_write_to_png_stream() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_restore() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_set_extend() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_source_rgba() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_ft_font_face_create_for_pattern() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_get_height() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mask() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_line_width() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_curve_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_copy_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_rectangle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_multiply() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_matrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_user_to_device_distance() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_show_glyphs() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_create_similar() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_curve_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_get_font_matrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_line_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_line_cap() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_get_rectangle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_set_hint_style() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_miter_limit() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_translate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_face_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_status() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_text_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_has_current_point() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_create_linear() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_clip_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_scaled_font() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_transform_point() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_get_format() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_fill() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_transform_distance() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_transform() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_line_join() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pop_group_to_source() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_set_corner_color_rgba() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_copy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_identity_matrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_save() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_clip() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_flush() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_create_for_surface() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_arc() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_stroke_preserve() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_path_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_ft_scaled_font_unlock_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_get_antialias() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_move_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_paint_with_alpha() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_fill_rule() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_miter_limit() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_antialias() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_get_device_scale() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_begin_patch() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_mesh_pattern_end_patch() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_target() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_mark_dirty_rectangle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_append_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_union_rectangle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_init_identity() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_status() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_in_fill() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_line_join() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_source() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_face_get_user_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_create_mesh() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_path_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_stroke() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_operator() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_fill_preserve() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_fill_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_ft_font_face_create_for_ft_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_dash_count() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_set_matrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_set_user_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_dash() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_set_filter() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_new_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_push_group() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_ft_font_options_substitute() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_get_width() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_device_to_user() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_set_antialias() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_glyph_free() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_select_font_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_line_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_matrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_face_reference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_line_cap() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_text_to_glyphs() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_glyph_extents() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_font_options_set_subpixel_order() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_show_text() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_font_face() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_close_path() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_format_stride_for_width() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_current_point() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_move_to() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scale() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_get_operator() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_matrix_rotate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_scaled_font_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_create_radial() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_get_content() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_source_surface() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_get_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_surface_create_for_rectangle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_device_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_image_surface_create_for_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_pattern_add_color_stop_rgba() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_region_num_rectangles() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI cairo_set_line_width() { + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libcairo/include/InventoryExports.hpp b/core/libs/prx/libcairo/include/InventoryExports.hpp new file mode 100644 index 0000000000..c5e5ee360e --- /dev/null +++ b/core/libs/prx/libcairo/include/InventoryExports.hpp @@ -0,0 +1,169 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI cairo_scaled_font_get_font_face(); +int APS5_VABI cairo_paint(); +int APS5_VABI cairo_font_options_set_hint_metrics(); +int APS5_VABI cairo_set_font_options(); +int APS5_VABI cairo_device_to_user_distance(); +int APS5_VABI cairo_font_face_set_user_data(); +int APS5_VABI cairo_stroke_extents(); +int APS5_VABI cairo_arc_negative(); +int APS5_VABI cairo_new_sub_path(); +int APS5_VABI cairo_image_surface_get_stride(); +int APS5_VABI cairo_user_to_device(); +int APS5_VABI cairo_reference(); +int APS5_VABI cairo_set_antialias(); +int APS5_VABI cairo_matrix_translate(); +int APS5_VABI cairo_rotate(); +int APS5_VABI cairo_image_surface_create_from_png_stream(); +int APS5_VABI cairo_get_fill_rule(); +int APS5_VABI cairo_ft_scaled_font_lock_face(); +int APS5_VABI cairo_surface_destroy(); +int APS5_VABI cairo_glyph_path(); +int APS5_VABI cairo_surface_set_device_scale(); +int APS5_VABI cairo_get_dash(); +int APS5_VABI cairo_set_source_rgb(); +int APS5_VABI cairo_scaled_font_destroy(); +int APS5_VABI cairo_pattern_reference(); +int APS5_VABI cairo_matrix_scale(); +int APS5_VABI cairo_matrix_invert(); +int APS5_VABI cairo_scaled_font_get_font_options(); +int APS5_VABI cairo_matrix_init_translate(); +int APS5_VABI cairo_surface_get_type(); +int APS5_VABI cairo_in_stroke(); +int APS5_VABI cairo_scaled_font_get_ctm(); +int APS5_VABI cairo_set_font_size(); +int APS5_VABI cairo_surface_write_to_png_stream(); +int APS5_VABI cairo_restore(); +int APS5_VABI cairo_pattern_set_extend(); +int APS5_VABI cairo_set_source_rgba(); +int APS5_VABI cairo_ft_font_face_create_for_pattern(); +int APS5_VABI cairo_image_surface_get_height(); +int APS5_VABI cairo_mask(); +int APS5_VABI cairo_get_line_width(); +int APS5_VABI cairo_curve_to(); +int APS5_VABI cairo_surface_reference(); +int APS5_VABI cairo_copy_path(); +int APS5_VABI cairo_rectangle(); +int APS5_VABI cairo_matrix_multiply(); +int APS5_VABI cairo_get_matrix(); +int APS5_VABI cairo_user_to_device_distance(); +int APS5_VABI cairo_scaled_font_extents(); +int APS5_VABI cairo_show_glyphs(); +int APS5_VABI cairo_surface_create_similar(); +int APS5_VABI cairo_mesh_pattern_curve_to(); +int APS5_VABI cairo_scaled_font_get_font_matrix(); +int APS5_VABI cairo_mesh_pattern_line_to(); +int APS5_VABI cairo_get_line_cap(); +int APS5_VABI cairo_region_get_rectangle(); +int APS5_VABI cairo_font_options_set_hint_style(); +int APS5_VABI cairo_set_miter_limit(); +int APS5_VABI cairo_translate(); +int APS5_VABI cairo_font_face_destroy(); +int APS5_VABI cairo_surface_status(); +int APS5_VABI cairo_scaled_font_text_extents(); +int APS5_VABI cairo_has_current_point(); +int APS5_VABI cairo_pattern_create_linear(); +int APS5_VABI cairo_destroy(); +int APS5_VABI cairo_matrix_init(); +int APS5_VABI cairo_clip_extents(); +int APS5_VABI cairo_set_scaled_font(); +int APS5_VABI cairo_matrix_transform_point(); +int APS5_VABI cairo_image_surface_get_format(); +int APS5_VABI cairo_region_create(); +int APS5_VABI cairo_fill(); +int APS5_VABI cairo_matrix_transform_distance(); +int APS5_VABI cairo_transform(); +int APS5_VABI cairo_set_line_join(); +int APS5_VABI cairo_pop_group_to_source(); +int APS5_VABI cairo_mesh_pattern_set_corner_color_rgba(); +int APS5_VABI cairo_font_options_copy(); +int APS5_VABI cairo_identity_matrix(); +int APS5_VABI cairo_save(); +int APS5_VABI cairo_clip(); +int APS5_VABI cairo_surface_flush(); +int APS5_VABI cairo_pattern_create_for_surface(); +int APS5_VABI cairo_arc(); +int APS5_VABI cairo_stroke_preserve(); +int APS5_VABI cairo_path_extents(); +int APS5_VABI cairo_ft_scaled_font_unlock_face(); +int APS5_VABI cairo_font_options_get_antialias(); +int APS5_VABI cairo_mesh_pattern_move_to(); +int APS5_VABI cairo_paint_with_alpha(); +int APS5_VABI cairo_set_fill_rule(); +int APS5_VABI cairo_get_miter_limit(); +int APS5_VABI cairo_get_antialias(); +int APS5_VABI cairo_surface_get_device_scale(); +int APS5_VABI cairo_mesh_pattern_begin_patch(); +int APS5_VABI cairo_mesh_pattern_end_patch(); +int APS5_VABI cairo_get_target(); +int APS5_VABI cairo_surface_mark_dirty_rectangle(); +int APS5_VABI cairo_append_path(); +int APS5_VABI cairo_region_union_rectangle(); +int APS5_VABI cairo_region_reference(); +int APS5_VABI cairo_matrix_init_identity(); +int APS5_VABI cairo_scaled_font_status(); +int APS5_VABI cairo_in_fill(); +int APS5_VABI cairo_get_line_join(); +int APS5_VABI cairo_set_source(); +int APS5_VABI cairo_font_face_get_user_data(); +int APS5_VABI cairo_pattern_create_mesh(); +int APS5_VABI cairo_path_destroy(); +int APS5_VABI cairo_stroke(); +int APS5_VABI cairo_set_operator(); +int APS5_VABI cairo_fill_preserve(); +int APS5_VABI cairo_fill_extents(); +int APS5_VABI cairo_ft_font_face_create_for_ft_face(); +int APS5_VABI cairo_get_dash_count(); +int APS5_VABI cairo_pattern_destroy(); +int APS5_VABI cairo_pattern_set_matrix(); +int APS5_VABI cairo_surface_set_user_data(); +int APS5_VABI cairo_set_dash(); +int APS5_VABI cairo_pattern_set_filter(); +int APS5_VABI cairo_new_path(); +int APS5_VABI cairo_push_group(); +int APS5_VABI cairo_font_options_destroy(); +int APS5_VABI cairo_ft_font_options_substitute(); +int APS5_VABI cairo_image_surface_get_width(); +int APS5_VABI cairo_font_options_create(); +int APS5_VABI cairo_device_to_user(); +int APS5_VABI cairo_font_options_set_antialias(); +int APS5_VABI cairo_glyph_free(); +int APS5_VABI cairo_select_font_face(); +int APS5_VABI cairo_line_to(); +int APS5_VABI cairo_scaled_font_reference(); +int APS5_VABI cairo_set_matrix(); +int APS5_VABI cairo_font_face_reference(); +int APS5_VABI cairo_set_line_cap(); +int APS5_VABI cairo_scaled_font_text_to_glyphs(); +int APS5_VABI cairo_scaled_font_glyph_extents(); +int APS5_VABI cairo_font_options_set_subpixel_order(); +int APS5_VABI cairo_show_text(); +int APS5_VABI cairo_set_font_face(); +int APS5_VABI cairo_close_path(); +int APS5_VABI cairo_image_surface_create(); +int APS5_VABI cairo_format_stride_for_width(); +int APS5_VABI cairo_create(); +int APS5_VABI cairo_get_current_point(); +int APS5_VABI cairo_move_to(); +int APS5_VABI cairo_scale(); +int APS5_VABI cairo_get_operator(); +int APS5_VABI cairo_matrix_rotate(); +int APS5_VABI cairo_scaled_font_create(); +int APS5_VABI cairo_pattern_create_radial(); +int APS5_VABI cairo_surface_get_content(); +int APS5_VABI cairo_set_source_surface(); +int APS5_VABI cairo_region_destroy(); +int APS5_VABI cairo_image_surface_get_data(); +int APS5_VABI cairo_surface_create_for_rectangle(); +int APS5_VABI cairo_device_destroy(); +int APS5_VABI cairo_image_surface_create_for_data(); +int APS5_VABI cairo_pattern_add_color_stop_rgba(); +int APS5_VABI cairo_region_num_rectangles(); +int APS5_VABI cairo_set_line_width(); + +} diff --git a/core/libs/prx/libcairo/libcairo.hpp b/core/libs/prx/libcairo/libcairo.hpp new file mode 100644 index 0000000000..d3d5da7295 --- /dev/null +++ b/core/libs/prx/libcairo/libcairo.hpp @@ -0,0 +1,3 @@ +#pragma once + +#include "prx/libcairo/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libcairo.md b/docs/dev/debt/libcairo.md new file mode 100644 index 0000000000..3f966504dc --- /dev/null +++ b/docs/dev/debt/libcairo.md @@ -0,0 +1,169 @@ +# libcairo technical debt + +### Callable exports + +- [Callable exports](../../../core/libs/prx/libcairo/Export.cpp) - 161 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). + +| Name | NID | +| --- | --- | +| `cairo_scaled_font_get_font_face` | `+BL3-h8zGDo` | +| `cairo_paint` | `+PEo5Z7DOlY` | +| `cairo_font_options_set_hint_metrics` | `+TktRPDfw0Y` | +| `cairo_set_font_options` | `-aqFIBn0h78` | +| `cairo_device_to_user_distance` | `-v5CZVGkN3k` | +| `cairo_font_face_set_user_data` | `1GGpdjyZslI` | +| `cairo_stroke_extents` | `1K5ly63m6fo` | +| `cairo_arc_negative` | `2w5H3b3yPqw` | +| `cairo_new_sub_path` | `36Wm5aIJUFY` | +| `cairo_image_surface_get_stride` | `3DtP-+fNq0c` | +| `cairo_user_to_device` | `3grQ1jCgta8` | +| `cairo_reference` | `3pmBdB-bl8w` | +| `cairo_set_antialias` | `3urTbaMTNyE` | +| `cairo_matrix_translate` | `4C5ObvulD3I` | +| `cairo_rotate` | `4FH5hyIXo9k` | +| `cairo_image_surface_create_from_png_stream` | `4dvdsqyLM8c` | +| `cairo_get_fill_rule` | `4e7O-m-JWVM` | +| `cairo_ft_scaled_font_lock_face` | `4gDTaBZH8lo` | +| `cairo_surface_destroy` | `4svUXLrNYXs` | +| `cairo_glyph_path` | `54HrgUIQHOk` | +| `cairo_surface_set_device_scale` | `5CJXb1X+okk` | +| `cairo_get_dash` | `5OZ1YwHyHd8` | +| `cairo_set_source_rgb` | `6DvK+OdIPW4` | +| `cairo_scaled_font_destroy` | `6Y3HHedGzlw` | +| `cairo_pattern_reference` | `6qRL52tLOII` | +| `cairo_matrix_scale` | `7DS-qtZoKjM` | +| `cairo_matrix_invert` | `8Aa+vkMrTB8` | +| `cairo_scaled_font_get_font_options` | `8SOxQrQ7AfQ` | +| `cairo_matrix_init_translate` | `8cDupwx3X+Y` | +| `cairo_surface_get_type` | `8viKdiZL7j4` | +| `cairo_in_stroke` | `8zMm0QOWZAA` | +| `cairo_scaled_font_get_ctm` | `A++pFuyxZPg` | +| `cairo_set_font_size` | `A-0StSi2AwA` | +| `cairo_surface_write_to_png_stream` | `A3FLVZ4FHbY` | +| `cairo_restore` | `AoAG2JE8GIo` | +| `cairo_pattern_set_extend` | `Ax867+0HUgA` | +| `cairo_set_source_rgba` | `BZFvjfb9xDk` | +| `cairo_ft_font_face_create_for_pattern` | `By6b1vjSVok` | +| `cairo_image_surface_get_height` | `CKmxM--7U88` | +| `cairo_mask` | `D1KYCZ80Sac` | +| `cairo_get_line_width` | `D45IcsszyQI` | +| `cairo_curve_to` | `DOCnSv1cXx8` | +| `cairo_surface_reference` | `Dv1FqxQxOkw` | +| `cairo_copy_path` | `E2E+DDLhCRg` | +| `cairo_rectangle` | `E5LkpnAY7po` | +| `cairo_matrix_multiply` | `E5rWAm1VaRM` | +| `cairo_get_matrix` | `EItmXRLen7w` | +| `cairo_user_to_device_distance` | `F2ZShEhLU8Y` | +| `cairo_scaled_font_extents` | `FbWFbLUQOys` | +| `cairo_show_glyphs` | `FnhwGKKZOjU` | +| `cairo_surface_create_similar` | `Gn3ZBaH2rK0` | +| `cairo_mesh_pattern_curve_to` | `H9bwCsWw7LA` | +| `cairo_scaled_font_get_font_matrix` | `HKjYBSCx3mY` | +| `cairo_mesh_pattern_line_to` | `HTB1uUwgSVQ` | +| `cairo_get_line_cap` | `Hkp7M+pJILk` | +| `cairo_region_get_rectangle` | `I5wa74016LQ` | +| `cairo_font_options_set_hint_style` | `IDmch1bKy34` | +| `cairo_set_miter_limit` | `IKnEk6g6ZV0` | +| `cairo_translate` | `IdKE2DrNBck` | +| `cairo_font_face_destroy` | `IgBFcd4cF28` | +| `cairo_surface_status` | `JBH18i-WCu0` | +| `cairo_scaled_font_text_extents` | `Jk9paxbMQsk` | +| `cairo_has_current_point` | `JwQxC4dA5DY` | +| `cairo_pattern_create_linear` | `K62jNcRGQdY` | +| `cairo_destroy` | `K6aayzvQMlE` | +| `cairo_matrix_init` | `KuArfZk6xEU` | +| `cairo_clip_extents` | `LJNqwiDWTm0` | +| `cairo_set_scaled_font` | `LUh-6rZhniA` | +| `cairo_matrix_transform_point` | `LdSTmOZ-KDs` | +| `cairo_image_surface_get_format` | `LrT15KUYBvc` | +| `cairo_region_create` | `MGMwq9DNMyE` | +| `cairo_fill` | `Ndvm8s28Gyc` | +| `cairo_matrix_transform_distance` | `NsFZqlmmZ9E` | +| `cairo_transform` | `OHgp1uE8P2c` | +| `cairo_set_line_join` | `Ori3CK8Sx6g` | +| `cairo_pop_group_to_source` | `Oyzf6kDk6Ns` | +| `cairo_mesh_pattern_set_corner_color_rgba` | `P+Hm5enx01Y` | +| `cairo_font_options_copy` | `P2IjaGD66NE` | +| `cairo_identity_matrix` | `PaSEtyxiC0o` | +| `cairo_save` | `Pj8asGd55jA` | +| `cairo_clip` | `PkGZZi1G2Gw` | +| `cairo_surface_flush` | `Pu24S09J+MQ` | +| `cairo_pattern_create_for_surface` | `Q6xyruheFCE` | +| `cairo_arc` | `R0TePTSHd2k` | +| `cairo_stroke_preserve` | `RzM4ZhlKzPg` | +| `cairo_path_extents` | `S6ieIssLpCA` | +| `cairo_ft_scaled_font_unlock_face` | `SJMLSxaYvWU` | +| `cairo_font_options_get_antialias` | `SNSLa0ggfpw` | +| `cairo_mesh_pattern_move_to` | `T0JOV6EajrA` | +| `cairo_paint_with_alpha` | `TAIhaLjmAlg` | +| `cairo_set_fill_rule` | `THcHgZElshs` | +| `cairo_get_miter_limit` | `TWtGBP-grBM` | +| `cairo_get_antialias` | `U4Ajvh3L57k` | +| `cairo_surface_get_device_scale` | `UKeNl8mVbsc` | +| `cairo_mesh_pattern_begin_patch` | `Ux6XxakVN+8` | +| `cairo_mesh_pattern_end_patch` | `VBA3H7mYG70` | +| `cairo_get_target` | `Wr3nsor1aNc` | +| `cairo_surface_mark_dirty_rectangle` | `X64Wjxgh1L4` | +| `cairo_append_path` | `XX9tocaUX+g` | +| `cairo_region_union_rectangle` | `Ya+vgrJjBQE` | +| `cairo_region_reference` | `Yarxt1LHaf0` | +| `cairo_matrix_init_identity` | `ZFmp0rD1F14` | +| `cairo_scaled_font_status` | `a5WkqZXnG2w` | +| `cairo_in_fill` | `akimK5gpdho` | +| `cairo_get_line_join` | `azNGOQLubLc` | +| `cairo_set_source` | `bU0QXekwNes` | +| `cairo_font_face_get_user_data` | `bXupa3+NYIs` | +| `cairo_pattern_create_mesh` | `bz5MfOeWZw4` | +| `cairo_path_destroy` | `cOkxYTuZQyU` | +| `cairo_stroke` | `cdr2T4SoIyU` | +| `cairo_set_operator` | `dc4bb-f5YEE` | +| `cairo_fill_preserve` | `dewyjTlk+u8` | +| `cairo_fill_extents` | `dkoQNd4kBlQ` | +| `cairo_ft_font_face_create_for_ft_face` | `dqEhIWRTjuo` | +| `cairo_get_dash_count` | `eSwGXlKHIas` | +| `cairo_pattern_destroy` | `eZpt6dzI9oo` | +| `cairo_pattern_set_matrix` | `fDNhBmmwSNs` | +| `cairo_surface_set_user_data` | `fFoWwCW2rDA` | +| `cairo_set_dash` | `fx5nS1yOp-I` | +| `cairo_pattern_set_filter` | `gsqESe70WD0` | +| `cairo_new_path` | `hhuvB3JXuMM` | +| `cairo_push_group` | `hlh15JjNtWg` | +| `cairo_font_options_destroy` | `huXPyr6A9to` | +| `cairo_ft_font_options_substitute` | `ii895dyBjMo` | +| `cairo_image_surface_get_width` | `inWumYPZgtw` | +| `cairo_font_options_create` | `j2xKmRzIV84` | +| `cairo_device_to_user` | `jyf32aEUoMs` | +| `cairo_font_options_set_antialias` | `kNua19l9-0I` | +| `cairo_glyph_free` | `lAEbTbSUTTo` | +| `cairo_select_font_face` | `ldk9m5h+-no` | +| `cairo_line_to` | `mSda1B-vfkM` | +| `cairo_scaled_font_reference` | `mb4bdMeFRs8` | +| `cairo_set_matrix` | `niIR3TU71Bg` | +| `cairo_font_face_reference` | `nqmUW6Z8xLE` | +| `cairo_set_line_cap` | `oFltTuV0f7Y` | +| `cairo_scaled_font_text_to_glyphs` | `ojbXRC0CmUo` | +| `cairo_scaled_font_glyph_extents` | `oy7NcAkex1I` | +| `cairo_font_options_set_subpixel_order` | `pk6gDcQRKxs` | +| `cairo_show_text` | `psdqLsaPnkk` | +| `cairo_set_font_face` | `qzEwpfbLVxI` | +| `cairo_close_path` | `rENdf2qgOE4` | +| `cairo_image_surface_create` | `ry52QkQeAWo` | +| `cairo_format_stride_for_width` | `s9BsLfgWTeM` | +| `cairo_create` | `sfmawT-nIUc` | +| `cairo_get_current_point` | `sinmW4Wm6OQ` | +| `cairo_move_to` | `smpeN8iWrcc` | +| `cairo_scale` | `suww6V0qqpU` | +| `cairo_get_operator` | `tYTJIi4s6t0` | +| `cairo_matrix_rotate` | `uIoYWKOA9yo` | +| `cairo_scaled_font_create` | `uKNPDudJTmo` | +| `cairo_pattern_create_radial` | `uYFjM3ReDRQ` | +| `cairo_surface_get_content` | `ut+atyIgpQw` | +| `cairo_set_source_surface` | `vcN1gg+gWRg` | +| `cairo_region_destroy` | `vnHq+jcDKBM` | +| `cairo_image_surface_get_data` | `wHTcu1PV-MU` | +| `cairo_surface_create_for_rectangle` | `wJzrbtZ7MOk` | +| `cairo_device_destroy` | `wO1D4B90k0k` | +| `cairo_image_surface_create_for_data` | `wlO4ljYI06M` | +| `cairo_pattern_add_color_stop_rgba` | `xXWrbaaPNNg` | +| `cairo_region_num_rectangles` | `xoe4ss9GmYc` | +| `cairo_set_line_width` | `zwMGP3ASKMI` | From 77206cb6ac6714f24c064530023558119c503586 Mon Sep 17 00:00:00 2001 From: Kyon Date: Thu, 29 Oct 2026 17:54:13 +0000 Subject: [PATCH 06/23] feat(libcurl): declare 85 callable exports --- core/libs/prx/libcurl/Export.cpp | 347 ++++++++++++++++++ .../prx/libcurl/include/InventoryExports.hpp | 93 +++++ core/libs/prx/libcurl/libcurl.hpp | 3 + docs/dev/debt/libcurl.md | 93 +++++ 4 files changed, 536 insertions(+) create mode 100644 core/libs/prx/libcurl/Export.cpp create mode 100644 core/libs/prx/libcurl/include/InventoryExports.hpp create mode 100644 core/libs/prx/libcurl/libcurl.hpp create mode 100644 docs/dev/debt/libcurl.md diff --git a/core/libs/prx/libcurl/Export.cpp b/core/libs/prx/libcurl/Export.cpp new file mode 100644 index 0000000000..ac41f59fe9 --- /dev/null +++ b/core/libs/prx/libcurl/Export.cpp @@ -0,0 +1,347 @@ +#include "prx/libcurl/include/InventoryExports.hpp" +#include "prx/libc/include/General.hpp" +#include "prx/libc/include/general/ExportMacros.hpp" + +extern "C" { + +int APS5_VABI curl_pushheader_bynum() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_formadd() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_socket_action() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_recv() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_free() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_escape() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_escape() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mvfprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_share_cleanup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_perform() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_remove_handle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mvsprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_global_sslset() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_perform() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_version() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_free() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mvsnprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_socket_all() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_strequal() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_url_get() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_strerror() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_setopt() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_data() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mfprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_poll() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_cleanup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_name() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_global_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_duphandle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_share_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_getenv() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_formget() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_type() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_slist_append() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_send() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_reset() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_strerror() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_strnequal() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_data_cb() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mvaprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_url() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_msnprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_socket() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_fdset() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_wakeup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_assign() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_share_strerror() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_wait() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_url_set() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_option_next() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_global_cleanup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_getinfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_share_setopt() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_info_read() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_upkeep() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_unescape() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_setopt() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_addpart() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_option_by_name() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_maprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_slist_free_all() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_url_cleanup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_getdate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_filedata() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_timeout() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_unescape() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_add_handle() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_option_by_id() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_formfree() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_subparts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_version_info() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_pushheader_byname() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_encoder() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mvprintf() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_global_init_mem() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_headers() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_url_dup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_init() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_multi_cleanup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_easy_pause() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_mime_filename() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI curl_msprintf() { + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libcurl/include/InventoryExports.hpp b/core/libs/prx/libcurl/include/InventoryExports.hpp new file mode 100644 index 0000000000..744f5ccd90 --- /dev/null +++ b/core/libs/prx/libcurl/include/InventoryExports.hpp @@ -0,0 +1,93 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI curl_pushheader_bynum(); +int APS5_VABI curl_formadd(); +int APS5_VABI curl_multi_socket_action(); +int APS5_VABI curl_easy_recv(); +int APS5_VABI curl_mime_free(); +int APS5_VABI curl_escape(); +int APS5_VABI curl_easy_escape(); +int APS5_VABI curl_mvfprintf(); +int APS5_VABI curl_share_cleanup(); +int APS5_VABI curl_easy_perform(); +int APS5_VABI curl_multi_remove_handle(); +int APS5_VABI curl_mvsprintf(); +int APS5_VABI curl_global_sslset(); +int APS5_VABI curl_multi_perform(); +int APS5_VABI curl_version(); +int APS5_VABI curl_free(); +int APS5_VABI curl_mvsnprintf(); +int APS5_VABI curl_multi_socket_all(); +int APS5_VABI curl_strequal(); +int APS5_VABI curl_url_get(); +int APS5_VABI curl_multi_strerror(); +int APS5_VABI curl_easy_setopt(); +int APS5_VABI curl_mime_data(); +int APS5_VABI curl_mfprintf(); +int APS5_VABI curl_multi_poll(); +int APS5_VABI curl_easy_cleanup(); +int APS5_VABI curl_mime_name(); +int APS5_VABI curl_global_init(); +int APS5_VABI curl_easy_duphandle(); +int APS5_VABI curl_share_init(); +int APS5_VABI curl_getenv(); +int APS5_VABI curl_formget(); +int APS5_VABI curl_mime_type(); +int APS5_VABI curl_mprintf(); +int APS5_VABI curl_slist_append(); +int APS5_VABI curl_easy_send(); +int APS5_VABI curl_easy_reset(); +int APS5_VABI curl_easy_strerror(); +int APS5_VABI curl_easy_init(); +int APS5_VABI curl_strnequal(); +int APS5_VABI curl_mime_data_cb(); +int APS5_VABI curl_mvaprintf(); +int APS5_VABI curl_url(); +int APS5_VABI curl_msnprintf(); +int APS5_VABI curl_multi_socket(); +int APS5_VABI curl_multi_fdset(); +int APS5_VABI curl_multi_wakeup(); +int APS5_VABI curl_multi_assign(); +int APS5_VABI curl_share_strerror(); +int APS5_VABI curl_multi_wait(); +int APS5_VABI curl_url_set(); +int APS5_VABI curl_easy_option_next(); +int APS5_VABI curl_global_cleanup(); +int APS5_VABI curl_easy_getinfo(); +int APS5_VABI curl_share_setopt(); +int APS5_VABI curl_multi_info_read(); +int APS5_VABI curl_easy_upkeep(); +int APS5_VABI curl_unescape(); +int APS5_VABI curl_multi_setopt(); +int APS5_VABI curl_mime_addpart(); +int APS5_VABI curl_easy_option_by_name(); +int APS5_VABI curl_maprintf(); +int APS5_VABI curl_slist_free_all(); +int APS5_VABI curl_url_cleanup(); +int APS5_VABI curl_getdate(); +int APS5_VABI curl_mime_filedata(); +int APS5_VABI curl_multi_timeout(); +int APS5_VABI curl_easy_unescape(); +int APS5_VABI curl_multi_add_handle(); +int APS5_VABI curl_mime_init(); +int APS5_VABI curl_easy_option_by_id(); +int APS5_VABI curl_formfree(); +int APS5_VABI curl_mime_subparts(); +int APS5_VABI curl_version_info(); +int APS5_VABI curl_pushheader_byname(); +int APS5_VABI curl_mime_encoder(); +int APS5_VABI curl_mvprintf(); +int APS5_VABI curl_global_init_mem(); +int APS5_VABI curl_mime_headers(); +int APS5_VABI curl_url_dup(); +int APS5_VABI curl_multi_init(); +int APS5_VABI curl_multi_cleanup(); +int APS5_VABI curl_easy_pause(); +int APS5_VABI curl_mime_filename(); +int APS5_VABI curl_msprintf(); + +} diff --git a/core/libs/prx/libcurl/libcurl.hpp b/core/libs/prx/libcurl/libcurl.hpp new file mode 100644 index 0000000000..9afe95b121 --- /dev/null +++ b/core/libs/prx/libcurl/libcurl.hpp @@ -0,0 +1,3 @@ +#pragma once + +#include "prx/libcurl/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libcurl.md b/docs/dev/debt/libcurl.md new file mode 100644 index 0000000000..be8f2d7b03 --- /dev/null +++ b/docs/dev/debt/libcurl.md @@ -0,0 +1,93 @@ +# libcurl technical debt + +### Callable exports + +- [Callable exports](../../../core/libs/prx/libcurl/Export.cpp) - 85 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). + +| Name | NID | +| --- | --- | +| `curl_pushheader_bynum` | `+0geDEimyvE` | +| `curl_formadd` | `-FwfB5G9ztg` | +| `curl_multi_socket_action` | `-WWyz1uPfx0` | +| `curl_easy_recv` | `0i8EaWOLjcY` | +| `curl_mime_free` | `1N7ft+SiHD0` | +| `curl_escape` | `3BKtV-ZgNGE` | +| `curl_easy_escape` | `3y2ysESiRFA` | +| `curl_mvfprintf` | `4zl-9Emcwhc` | +| `curl_share_cleanup` | `5b-D80m2TKc` | +| `curl_easy_perform` | `7KQckhaDi18` | +| `curl_multi_remove_handle` | `7ShPrvjazws` | +| `curl_mvsprintf` | `7h+e56B2oKs` | +| `curl_global_sslset` | `7ijxBuDNvHY` | +| `curl_multi_perform` | `9cpxUNV97mM` | +| `curl_version` | `A+rTLSeCJFQ` | +| `curl_free` | `AAHmHrXOtv4` | +| `curl_mvsnprintf` | `BAz8Ji7lJls` | +| `curl_multi_socket_all` | `BhNAR5P2VEg` | +| `curl_strequal` | `CDG6wR08Ntw` | +| `curl_url_get` | `Cc+Qhdd4ons` | +| `curl_multi_strerror` | `Dfdbc8trvZg` | +| `curl_easy_setopt` | `DiBmbfiH8J4` | +| `curl_mime_data` | `ENFUpkwnFM8` | +| `curl_mfprintf` | `GldGeV80-58` | +| `curl_multi_poll` | `H49qutQi9a0` | +| `curl_easy_cleanup` | `HD+IPUl76Hs` | +| `curl_mime_name` | `HgFRO6Upsg4` | +| `curl_global_init` | `I38s92i-Xjk` | +| `curl_easy_duphandle` | `JBHZ4wLpnx0` | +| `curl_share_init` | `KBTWh1VVa-8` | +| `curl_getenv` | `KK03u+6DkBU` | +| `curl_formget` | `KUolTh2gQ8k` | +| `curl_mime_type` | `KzSFgeUXy2E` | +| `curl_mprintf` | `Lr91kLn38uM` | +| `curl_slist_append` | `MDgMnL6At94` | +| `curl_easy_send` | `MhymOvp1NkU` | +| `curl_easy_reset` | `N5yPp5dHBQE` | +| `curl_easy_strerror` | `NGTkAHTkViY` | +| `curl_easy_init` | `NUbq2aNGojo` | +| `curl_strnequal` | `OJiHNjSOguc` | +| `curl_mime_data_cb` | `PoT9ByTU4ws` | +| `curl_mvaprintf` | `Pyz55DYmOrI` | +| `curl_url` | `QwbCXdumE84` | +| `curl_msnprintf` | `Rwe8bHavOL0` | +| `curl_multi_socket` | `SxPu8PZuHuU` | +| `curl_multi_fdset` | `SyLtMxQlS6M` | +| `curl_multi_wakeup` | `TdLam7xSzmY` | +| `curl_multi_assign` | `U2tir7V8tzw` | +| `curl_share_strerror` | `W+jyDVS+594` | +| `curl_multi_wait` | `WuFNFYQX3NA` | +| `curl_url_set` | `XKdprgRLQy4` | +| `curl_easy_option_next` | `YSi2PMczWE8` | +| `curl_global_cleanup` | `YkyOTEcu7vA` | +| `curl_easy_getinfo` | `ZhOwNq3lcpk` | +| `curl_share_setopt` | `b3SWcncY+A0` | +| `curl_multi_info_read` | `ea8LaHOKFDA` | +| `curl_easy_upkeep` | `govcxXDyzbw` | +| `curl_unescape` | `gtkTcnWCrkU` | +| `curl_multi_setopt` | `hGv08dyfsNQ` | +| `curl_mime_addpart` | `hXXC4BDL1gY` | +| `curl_easy_option_by_name` | `hdaJCex67Tg` | +| `curl_maprintf` | `hpQlqUYshFI` | +| `curl_slist_free_all` | `k76sC3mIVw4` | +| `curl_url_cleanup` | `kIbwtX5Mi6c` | +| `curl_getdate` | `kX88h1qQ7co` | +| `curl_mime_filedata` | `ln25S0X-S08` | +| `curl_multi_timeout` | `lxail8CxrHk` | +| `curl_easy_unescape` | `m-VsMMa8Mqo` | +| `curl_multi_add_handle` | `mQBD4RanvTc` | +| `curl_mime_init` | `mUQG6ux03z4` | +| `curl_easy_option_by_id` | `mmBX7M6ArkM` | +| `curl_formfree` | `oOckhjRxPps` | +| `curl_mime_subparts` | `orXjmpvkHuU` | +| `curl_version_info` | `pZvrLdhriNk` | +| `curl_pushheader_byname` | `qB5W5ljFCIk` | +| `curl_mime_encoder` | `rhqf6JmhtHg` | +| `curl_mvprintf` | `s5XKQo9CHyw` | +| `curl_global_init_mem` | `sbs5dzWn8cE` | +| `curl_mime_headers` | `tCOYIku29OE` | +| `curl_url_dup` | `txIPTHNsC1w` | +| `curl_multi_init` | `wXEc3+fNcO4` | +| `curl_multi_cleanup` | `xyRRwQMH5ug` | +| `curl_easy_pause` | `yQ7SgQu4L98` | +| `curl_mime_filename` | `yfNiwy8p5Ds` | +| `curl_msprintf` | `zMA017igJyk` | From e5d1dd270f391638a5424fdbd2d9d67856f1ada1 Mon Sep 17 00:00:00 2001 From: Kyon Date: Thu, 29 Oct 2026 17:54:17 +0000 Subject: [PATCH 07/23] feat(libfontconfig): declare 53 callable exports --- core/libs/prx/libfontconfig/Export.cpp | 219 ++++++++++++++++++ .../include/InventoryExports.hpp | 61 +++++ core/libs/prx/libfontconfig/libfontconfig.hpp | 3 + docs/dev/debt/libfontconfig.md | 61 +++++ 4 files changed, 344 insertions(+) create mode 100644 core/libs/prx/libfontconfig/Export.cpp create mode 100644 core/libs/prx/libfontconfig/include/InventoryExports.hpp create mode 100644 core/libs/prx/libfontconfig/libfontconfig.hpp create mode 100644 docs/dev/debt/libfontconfig.md diff --git a/core/libs/prx/libfontconfig/Export.cpp b/core/libs/prx/libfontconfig/Export.cpp new file mode 100644 index 0000000000..9a01607fef --- /dev/null +++ b/core/libs/prx/libfontconfig/Export.cpp @@ -0,0 +1,219 @@ +#include "prx/libfontconfig/include/InventoryExports.hpp" +#include "prx/libc/include/General.hpp" +#include "prx/libc/include/general/ExportMacros.hpp" + +extern "C" { + +int APS5_VABI FcLangSetDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternRemove() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetInteger() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcConfigGetCurrent() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetBool() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddBool() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontList() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontSetMatch() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcConfigSubstitute() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetMatrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcInit() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcInitBringUptoDate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetString() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontRenderPrepare() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddDouble() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternDuplicate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontMatch() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternFilter() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcConfigCreate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetFTFace() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternEqual() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcCharSetSubtractCount() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddInteger() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcLangSetAdd() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontSort() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcCharSetMerge() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetCharSet() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcCharSetDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternDel() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcConfigDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternReference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcObjectSetDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGet() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddMatrix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddString() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontSetCreate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcLangSetHasLang() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcCharSetCreate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcLangSetCreate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFreeTypeCharIndex() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontSetAdd() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcCharSetAddChar() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcMatrixMultiply() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddCharSet() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcDefaultSubstitute() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcObjectSetBuild() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternAddLangSet() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcFontSetDestroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternGetLangSet() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternCreate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcConfigReference() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FcPatternFormat() { + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libfontconfig/include/InventoryExports.hpp b/core/libs/prx/libfontconfig/include/InventoryExports.hpp new file mode 100644 index 0000000000..0dd2a2a535 --- /dev/null +++ b/core/libs/prx/libfontconfig/include/InventoryExports.hpp @@ -0,0 +1,61 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI FcLangSetDestroy(); +int APS5_VABI FcPatternRemove(); +int APS5_VABI FcPatternGetInteger(); +int APS5_VABI FcConfigGetCurrent(); +int APS5_VABI FcPatternGetBool(); +int APS5_VABI FcPatternAddBool(); +int APS5_VABI FcFontList(); +int APS5_VABI FcFontSetMatch(); +int APS5_VABI FcConfigSubstitute(); +int APS5_VABI FcPatternGetMatrix(); +int APS5_VABI FcInit(); +int APS5_VABI FcInitBringUptoDate(); +int APS5_VABI FcPatternGetString(); +int APS5_VABI FcFontRenderPrepare(); +int APS5_VABI FcPatternAddDouble(); +int APS5_VABI FcPatternDuplicate(); +int APS5_VABI FcFontMatch(); +int APS5_VABI FcPatternFilter(); +int APS5_VABI FcConfigCreate(); +int APS5_VABI FcPatternGetFTFace(); +int APS5_VABI FcPatternEqual(); +int APS5_VABI FcCharSetSubtractCount(); +int APS5_VABI FcPatternAddInteger(); +int APS5_VABI FcLangSetAdd(); +int APS5_VABI FcFontSort(); +int APS5_VABI FcCharSetMerge(); +int APS5_VABI FcPatternGetCharSet(); +int APS5_VABI FcCharSetDestroy(); +int APS5_VABI FcPatternDel(); +int APS5_VABI FcConfigDestroy(); +int APS5_VABI FcPatternReference(); +int APS5_VABI FcObjectSetDestroy(); +int APS5_VABI FcPatternGet(); +int APS5_VABI FcPatternAddMatrix(); +int APS5_VABI FcPatternAddString(); +int APS5_VABI FcFontSetCreate(); +int APS5_VABI FcLangSetHasLang(); +int APS5_VABI FcCharSetCreate(); +int APS5_VABI FcLangSetCreate(); +int APS5_VABI FcFreeTypeCharIndex(); +int APS5_VABI FcFontSetAdd(); +int APS5_VABI FcPatternDestroy(); +int APS5_VABI FcCharSetAddChar(); +int APS5_VABI FcMatrixMultiply(); +int APS5_VABI FcPatternAddCharSet(); +int APS5_VABI FcDefaultSubstitute(); +int APS5_VABI FcObjectSetBuild(); +int APS5_VABI FcPatternAddLangSet(); +int APS5_VABI FcFontSetDestroy(); +int APS5_VABI FcPatternGetLangSet(); +int APS5_VABI FcPatternCreate(); +int APS5_VABI FcConfigReference(); +int APS5_VABI FcPatternFormat(); + +} diff --git a/core/libs/prx/libfontconfig/libfontconfig.hpp b/core/libs/prx/libfontconfig/libfontconfig.hpp new file mode 100644 index 0000000000..01af138a04 --- /dev/null +++ b/core/libs/prx/libfontconfig/libfontconfig.hpp @@ -0,0 +1,3 @@ +#pragma once + +#include "prx/libfontconfig/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libfontconfig.md b/docs/dev/debt/libfontconfig.md new file mode 100644 index 0000000000..fc92c41aba --- /dev/null +++ b/docs/dev/debt/libfontconfig.md @@ -0,0 +1,61 @@ +# libfontconfig technical debt + +### Callable exports + +- [Callable exports](../../../core/libs/prx/libfontconfig/Export.cpp) - 53 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). + +| Name | NID | +| --- | --- | +| `FcLangSetDestroy` | `+6aV1q-CAIg` | +| `FcPatternRemove` | `+XnLLwt2q-Y` | +| `FcPatternGetInteger` | `2BFkLGmS+Ao` | +| `FcConfigGetCurrent` | `2M54M-SKV-k` | +| `FcPatternGetBool` | `3zWpyQga5N0` | +| `FcPatternAddBool` | `6LGRGSLdSdQ` | +| `FcFontList` | `7+Gq-0xFybo` | +| `FcFontSetMatch` | `8DLBHeMsS1k` | +| `FcConfigSubstitute` | `8v4Xk2b+C1k` | +| `FcPatternGetMatrix` | `9x04OJBX0J0` | +| `FcInit` | `AwGzFwnaitQ` | +| `FcInitBringUptoDate` | `Ck9k-L7rz-I` | +| `FcPatternGetString` | `CkZ778Hu6Ng` | +| `FcFontRenderPrepare` | `CvqQqWqcO-0` | +| `FcPatternAddDouble` | `D-WphAs+Lh8` | +| `FcPatternDuplicate` | `DPxdK61lRaE` | +| `FcFontMatch` | `FqneT2syjGE` | +| `FcPatternFilter` | `H9TOtqlqmHM` | +| `FcConfigCreate` | `HGtDYp4ddNE` | +| `FcPatternGetFTFace` | `HjlABSyLzNg` | +| `FcPatternEqual` | `HxFAszDPXuE` | +| `FcCharSetSubtractCount` | `J8GcxU03WkE` | +| `FcPatternAddInteger` | `LNzAovAnOd8` | +| `FcLangSetAdd` | `Lsu4XJJ3V2o` | +| `FcFontSort` | `MApHziT-St4` | +| `FcCharSetMerge` | `MafDsPXgY6k` | +| `FcPatternGetCharSet` | `NKrjlO4HBhg` | +| `FcCharSetDestroy` | `Nw0ilSm8FxY` | +| `FcPatternDel` | `Om2ww9GOmes` | +| `FcConfigDestroy` | `Oor7ukCXZOE` | +| `FcPatternReference` | `QZuEIDVT42s` | +| `FcObjectSetDestroy` | `WtTZKbENx4o` | +| `FcPatternGet` | `Xmsz9ffM-9g` | +| `FcPatternAddMatrix` | `Zqa5tqMhOrI` | +| `FcPatternAddString` | `bU30lh8YpkE` | +| `FcFontSetCreate` | `fJfx9D9g9W4` | +| `FcLangSetHasLang` | `gbtAblHLpQg` | +| `FcCharSetCreate` | `hNyN1seFzWY` | +| `FcLangSetCreate` | `jjz2C1StauM` | +| `FcFreeTypeCharIndex` | `l240XTbw2vk` | +| `FcFontSetAdd` | `lEIEcYhU2vE` | +| `FcPatternDestroy` | `nVkAFM4iCS4` | +| `FcCharSetAddChar` | `nXYd1oE9ZM0` | +| `FcMatrixMultiply` | `oM+8JNTrd24` | +| `FcPatternAddCharSet` | `paHcj4DoPQ4` | +| `FcDefaultSubstitute` | `sqEJZ2yMVNw` | +| `FcObjectSetBuild` | `v5-8NZmvyrA` | +| `FcPatternAddLangSet` | `vqX-PYS3MPc` | +| `FcFontSetDestroy` | `vrZNehbMgsU` | +| `FcPatternGetLangSet` | `x55q-bC-i+8` | +| `FcPatternCreate` | `xGAEbwA7FNo` | +| `FcConfigReference` | `yQed09jA3VA` | +| `FcPatternFormat` | `zqe0Dw9BCpc` | From eb0aebe8447946a5f754926baec078b5b60a5cbc Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 05:42:30 +0200 Subject: [PATCH 08/23] feat(jxr): add missing firmware inventory exports --- core/libs/prx/libSceJxr/Export.cpp | 528 ++++++++++++++++++++++++ core/libs/prx/libSceJxr/include/Api.hpp | 133 ++++++ docs/dev/debt/libSceJxr.md | 2 + 3 files changed, 663 insertions(+) diff --git a/core/libs/prx/libSceJxr/Export.cpp b/core/libs/prx/libSceJxr/Export.cpp index 904c46b1f8..50f91d2edc 100644 --- a/core/libs/prx/libSceJxr/Export.cpp +++ b/core/libs/prx/libSceJxr/Export.cpp @@ -60,4 +60,532 @@ std::int64_t APS5_VABI writeIS_nid_postfix(void*, Jxr::BitIo* io) { return result; } +int APS5_VABI AllocateCodingContextDec_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI CloseWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI CreateWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI CreateWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI EOSWS_File_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI EOSWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI FreeDescMetadata_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetImageDecodeIID_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetImageEncodeIID_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetPixelFormatFromHash_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetPosWS_File_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetPosWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI GetPosWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI IDPEmpty_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI InitZigzagScan_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKAllocAligned_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKAlloc_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCodecFactory_CreateCodec_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCodecFactory_CreateDecoderFromFile_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCodecFactory_CreateFormatConverter_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCreateCodecFactory_Release_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCreateCodecFactory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCreateFactory_CreateStream_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCreateFactory_Release_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKCreateFactory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_Convert_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_Copy_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_EnumConversions_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_GetPixelFormat_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_GetResolution_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_GetSize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_GetSourcePixelFormat_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_InitializeConvert_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_Initialize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFormatConverter_Release_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKFreeAligned_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_Copy_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_Create_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_Create_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetColorContext_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetDescriptiveMetadata_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetFrameCount_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetPixelFormat_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetResolution_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_GetSize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_Initialize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_Release_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageDecode_SelectFrame_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_CreateNewFrame_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Create_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Create_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Initialize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Release_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetColorContext_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetDescriptiveMetadata_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetEXIFMetadata_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetGPSInfoMetadata_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetIPTCNAAMetadata_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetPhotoshopMetadata_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetPixelFormat_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetResolution_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetSize_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_SetXMPMetadata_WMP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Terminate_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_Transcode_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_WritePixels_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI PKImageEncode_WriteSource_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI ReadWS_File_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI ReadWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI ReadWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI ResetCodingContext_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI SetPosWS_File_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI SetPosWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI SetPosWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI WMPAlloc_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI WMPFree_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI WriteWS_File_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI WriteWS_List_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI WriteWS_Memory_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI advanceMRPtr_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI advanceOneMBRow_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI allocateBitIOInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI allocatePredInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI allocateQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI allocateTileInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI attachISRead_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI attachISWrite_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI attach_SB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI checkImageBuffer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI detachISRead_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI detachISWrite_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI detach_SB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI dquantBits_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI fillToByte_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI flushBit16_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI flushToByte_SB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI flushToByte_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI formatQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI freePredInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI freeQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI freeTileInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getACPredMode_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBit16_S_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBit16_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBit16s_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBit32_SB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBit32_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getBool16_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getByteRead_SB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getDCACPredMode_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getPosRead_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getSizeRead_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getSizeWrite_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI getTilePos_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI initMRPtr_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI initPostProc_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI peekBit16_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI postProcBlock_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI postProcMB_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI putBit16_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI putBit16z_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI putBit32_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI remapQP_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI setBitIOPointers_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI setUniformQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI slideOneMBRow_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI swapMRPtr_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI termPostProc_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI updatePostProcInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI updatePredInfo_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI useDCQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI useLPQuantizer_nid_postfix() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceJxr/include/Api.hpp b/core/libs/prx/libSceJxr/include/Api.hpp index 51d874f9c5..b57921294e 100644 --- a/core/libs/prx/libSceJxr/include/Api.hpp +++ b/core/libs/prx/libSceJxr/include/Api.hpp @@ -11,4 +11,137 @@ std::int64_t APS5_VABI PixelFormatLookup_nid_postfix(JxrPixelInfo* value, std::u std::int64_t APS5_VABI readIS_nid_postfix(void* codec, Jxr::BitIo* io); std::int64_t APS5_VABI writeIS_nid_postfix(void* codec, Jxr::BitIo* io); +int APS5_VABI AllocateCodingContextDec_nid_postfix(); +int APS5_VABI CloseWS_List_nid_postfix(); +int APS5_VABI CreateWS_List_nid_postfix(); +int APS5_VABI CreateWS_Memory_nid_postfix(); +int APS5_VABI EOSWS_File_nid_postfix(); +int APS5_VABI EOSWS_Memory_nid_postfix(); +int APS5_VABI FreeDescMetadata_nid_postfix(); +int APS5_VABI GetImageDecodeIID_nid_postfix(); +int APS5_VABI GetImageEncodeIID_nid_postfix(); +int APS5_VABI GetPixelFormatFromHash_nid_postfix(); +int APS5_VABI GetPosWS_File_nid_postfix(); +int APS5_VABI GetPosWS_List_nid_postfix(); +int APS5_VABI GetPosWS_Memory_nid_postfix(); +int APS5_VABI IDPEmpty_nid_postfix(); +int APS5_VABI InitZigzagScan_nid_postfix(); +int APS5_VABI PKAllocAligned_nid_postfix(); +int APS5_VABI PKAlloc_nid_postfix(); +int APS5_VABI PKCodecFactory_CreateCodec_nid_postfix(); +int APS5_VABI PKCodecFactory_CreateDecoderFromFile_nid_postfix(); +int APS5_VABI PKCodecFactory_CreateFormatConverter_nid_postfix(); +int APS5_VABI PKCreateCodecFactory_Release_nid_postfix(); +int APS5_VABI PKCreateCodecFactory_nid_postfix(); +int APS5_VABI PKCreateFactory_CreateStream_nid_postfix(); +int APS5_VABI PKCreateFactory_Release_nid_postfix(); +int APS5_VABI PKCreateFactory_nid_postfix(); +int APS5_VABI PKFormatConverter_Convert_nid_postfix(); +int APS5_VABI PKFormatConverter_Copy_nid_postfix(); +int APS5_VABI PKFormatConverter_EnumConversions_nid_postfix(); +int APS5_VABI PKFormatConverter_GetPixelFormat_nid_postfix(); +int APS5_VABI PKFormatConverter_GetResolution_nid_postfix(); +int APS5_VABI PKFormatConverter_GetSize_nid_postfix(); +int APS5_VABI PKFormatConverter_GetSourcePixelFormat_nid_postfix(); +int APS5_VABI PKFormatConverter_InitializeConvert_nid_postfix(); +int APS5_VABI PKFormatConverter_Initialize_nid_postfix(); +int APS5_VABI PKFormatConverter_Release_nid_postfix(); +int APS5_VABI PKFreeAligned_nid_postfix(); +int APS5_VABI PKImageDecode_Copy_nid_postfix(); +int APS5_VABI PKImageDecode_Create_WMP_nid_postfix(); +int APS5_VABI PKImageDecode_Create_nid_postfix(); +int APS5_VABI PKImageDecode_GetColorContext_nid_postfix(); +int APS5_VABI PKImageDecode_GetDescriptiveMetadata_nid_postfix(); +int APS5_VABI PKImageDecode_GetFrameCount_nid_postfix(); +int APS5_VABI PKImageDecode_GetPixelFormat_nid_postfix(); +int APS5_VABI PKImageDecode_GetResolution_nid_postfix(); +int APS5_VABI PKImageDecode_GetSize_nid_postfix(); +int APS5_VABI PKImageDecode_Initialize_nid_postfix(); +int APS5_VABI PKImageDecode_Release_nid_postfix(); +int APS5_VABI PKImageDecode_SelectFrame_nid_postfix(); +int APS5_VABI PKImageEncode_CreateNewFrame_nid_postfix(); +int APS5_VABI PKImageEncode_Create_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_Create_nid_postfix(); +int APS5_VABI PKImageEncode_Initialize_nid_postfix(); +int APS5_VABI PKImageEncode_Release_nid_postfix(); +int APS5_VABI PKImageEncode_SetColorContext_nid_postfix(); +int APS5_VABI PKImageEncode_SetDescriptiveMetadata_nid_postfix(); +int APS5_VABI PKImageEncode_SetEXIFMetadata_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_SetGPSInfoMetadata_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_SetIPTCNAAMetadata_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_SetPhotoshopMetadata_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_SetPixelFormat_nid_postfix(); +int APS5_VABI PKImageEncode_SetResolution_nid_postfix(); +int APS5_VABI PKImageEncode_SetSize_nid_postfix(); +int APS5_VABI PKImageEncode_SetXMPMetadata_WMP_nid_postfix(); +int APS5_VABI PKImageEncode_Terminate_nid_postfix(); +int APS5_VABI PKImageEncode_Transcode_nid_postfix(); +int APS5_VABI PKImageEncode_WritePixels_nid_postfix(); +int APS5_VABI PKImageEncode_WriteSource_nid_postfix(); +int APS5_VABI ReadWS_File_nid_postfix(); +int APS5_VABI ReadWS_List_nid_postfix(); +int APS5_VABI ReadWS_Memory_nid_postfix(); +int APS5_VABI ResetCodingContext_nid_postfix(); +int APS5_VABI SetPosWS_File_nid_postfix(); +int APS5_VABI SetPosWS_List_nid_postfix(); +int APS5_VABI SetPosWS_Memory_nid_postfix(); +int APS5_VABI WMPAlloc_nid_postfix(); +int APS5_VABI WMPFree_nid_postfix(); +int APS5_VABI WriteWS_File_nid_postfix(); +int APS5_VABI WriteWS_List_nid_postfix(); +int APS5_VABI WriteWS_Memory_nid_postfix(); +int APS5_VABI advanceMRPtr_nid_postfix(); +int APS5_VABI advanceOneMBRow_nid_postfix(); +int APS5_VABI allocateBitIOInfo_nid_postfix(); +int APS5_VABI allocatePredInfo_nid_postfix(); +int APS5_VABI allocateQuantizer_nid_postfix(); +int APS5_VABI allocateTileInfo_nid_postfix(); +int APS5_VABI attachISRead_nid_postfix(); +int APS5_VABI attachISWrite_nid_postfix(); +int APS5_VABI attach_SB_nid_postfix(); +int APS5_VABI checkImageBuffer_nid_postfix(); +int APS5_VABI detachISRead_nid_postfix(); +int APS5_VABI detachISWrite_nid_postfix(); +int APS5_VABI detach_SB_nid_postfix(); +int APS5_VABI dquantBits_nid_postfix(); +int APS5_VABI fillToByte_nid_postfix(); +int APS5_VABI flushBit16_nid_postfix(); +int APS5_VABI flushToByte_SB_nid_postfix(); +int APS5_VABI flushToByte_nid_postfix(); +int APS5_VABI formatQuantizer_nid_postfix(); +int APS5_VABI freePredInfo_nid_postfix(); +int APS5_VABI freeQuantizer_nid_postfix(); +int APS5_VABI freeTileInfo_nid_postfix(); +int APS5_VABI getACPredMode_nid_postfix(); +int APS5_VABI getBit16_S_nid_postfix(); +int APS5_VABI getBit16_nid_postfix(); +int APS5_VABI getBit16s_nid_postfix(); +int APS5_VABI getBit32_SB_nid_postfix(); +int APS5_VABI getBit32_nid_postfix(); +int APS5_VABI getBool16_nid_postfix(); +int APS5_VABI getByteRead_SB_nid_postfix(); +int APS5_VABI getDCACPredMode_nid_postfix(); +int APS5_VABI getPosRead_nid_postfix(); +int APS5_VABI getSizeRead_nid_postfix(); +int APS5_VABI getSizeWrite_nid_postfix(); +int APS5_VABI getTilePos_nid_postfix(); +int APS5_VABI initMRPtr_nid_postfix(); +int APS5_VABI initPostProc_nid_postfix(); +int APS5_VABI peekBit16_nid_postfix(); +int APS5_VABI postProcBlock_nid_postfix(); +int APS5_VABI postProcMB_nid_postfix(); +int APS5_VABI putBit16_nid_postfix(); +int APS5_VABI putBit16z_nid_postfix(); +int APS5_VABI putBit32_nid_postfix(); +int APS5_VABI remapQP_nid_postfix(); +int APS5_VABI setBitIOPointers_nid_postfix(); +int APS5_VABI setUniformQuantizer_nid_postfix(); +int APS5_VABI slideOneMBRow_nid_postfix(); +int APS5_VABI swapMRPtr_nid_postfix(); +int APS5_VABI termPostProc_nid_postfix(); +int APS5_VABI updatePostProcInfo_nid_postfix(); +int APS5_VABI updatePredInfo_nid_postfix(); +int APS5_VABI useDCQuantizer_nid_postfix(); +int APS5_VABI useLPQuantizer_nid_postfix(); + } diff --git a/docs/dev/debt/libSceJxr.md b/docs/dev/debt/libSceJxr.md index e425528f86..0a044ca217 100644 --- a/docs/dev/debt/libSceJxr.md +++ b/docs/dev/debt/libSceJxr.md @@ -7,3 +7,5 @@ - [PKFree](../../../core/libs/prx/libSceJxr/Export.cpp) (libSceJxr) follows Microsoft's jxrlib [JXRGlue.c](https://github.com/4creators/jxrlib/blob/f7521879862b9085318e814c6157490dd9dbbdb4/jxrgluelib/JXRGlue.c#L53-L62), whose four exported names the module shares: a non-null `ppv` has `*ppv` released with the guest `free` and set to null, and the result is always `WMP_errSuccess` (0) as a 64-bit `ERR` (`long`). That the console's module is built from jxrlib, and that its `PKFree` releases through libc's `free`, is inferred from the export names and not checked against the console's code. Closes when: the console's `PKFree` is disassembled or measured on a PS5 - [readIS and writeIS](../../../core/libs/prx/libSceJxr/Export.cpp) use the non-ARM, LP64 `BitIOInfo` and `WMPStream` ABI and packet algorithm from [Microsoft's JPEG XR reference implementation](https://github.com/4creators/jxrlib/blob/f7521879862b9085318e814c6157490dd9dbbdb4/image/sys/strcodec.c#L1090-L1177). Console structure layouts and execution remain unverified. Profiling callbacks are omitted as in the reference Unix build with `DISABLE_PERF_MEASUREMENT`; the codec argument is unused. Where the reference uses an invalid pointer, `std::invalid_argument` is thrown instead: a null bit state, stream or callback, a read-only read packet, and a null packet when a read copies its shadow or a successful write offsets it; a null packet still reaches the callback first. No codec is instantiated by these helpers; callers must supply the reference ring buffer and guest-ABI stream callbacks. + +- The 132 additional exports in [Export.cpp](../../../core/libs/prx/libSceJxr/Export.cpp) are present in the pinned firmware 13.60 `libSceJxr` export inventory. Their parameter lists, return types and behavior are unverified. Parameterless `int` declarations are import-resolution placeholders, not verified ABI prototypes; every entry throws through `NotImplemented_nid_no_patch`. The `_nid_postfix` aliases keep the guest bindings distinct from private native helpers. No runtime functionality is implemented. From c763e01a95e8b3e13f7972bf9e1b83bb880e1a33 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 05:41:21 +0200 Subject: [PATCH 09/23] feat(npgameintent): add session service inventory exports --- core/libs/prx/libSceNpGameIntent/Export.cpp | 12 ++++++++++++ core/libs/prx/libSceNpGameIntent/include/Api.hpp | 3 +++ docs/dev/debt/libSceNpGameIntent.md | 1 + 3 files changed, 16 insertions(+) diff --git a/core/libs/prx/libSceNpGameIntent/Export.cpp b/core/libs/prx/libSceNpGameIntent/Export.cpp index 4e6e094e72..7d0ac8f3be 100644 --- a/core/libs/prx/libSceNpGameIntent/Export.cpp +++ b/core/libs/prx/libSceNpGameIntent/Export.cpp @@ -140,6 +140,10 @@ int APS5_VABI sceNpSessionServiceGetJoinedPartySession() { return 0; } +int APS5_VABI sceNpSessionServiceInitialize() { + NotImplemented_nid_no_patch(__func__); +} + int APS5_VABI sceNpSessionServiceGetRunningGamePlayerSession() { NotImplemented_nid_no_patch(__func__); return 0; @@ -150,4 +154,12 @@ int APS5_VABI sceNpSessionServiceSendPlayerSessionInvitations() { return 0; } +int APS5_VABI sceNpSessionServiceSendPlayerSessionRequestToJoin() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceNpSessionServiceTerminate() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceNpGameIntent/include/Api.hpp b/core/libs/prx/libSceNpGameIntent/include/Api.hpp index fbc2ef6e26..5a9c35a39d 100644 --- a/core/libs/prx/libSceNpGameIntent/include/Api.hpp +++ b/core/libs/prx/libSceNpGameIntent/include/Api.hpp @@ -21,6 +21,9 @@ int APS5_VABI sceNpGameIntentLaunchApp2(); int APS5_VABI sceNpGameIntentNotifyAppLaunched(); int APS5_VABI sceNpSessionServiceGetJoinedPartySession(); int APS5_VABI sceNpSessionServiceGetRunningGamePlayerSession(); +int APS5_VABI sceNpSessionServiceInitialize(); int APS5_VABI sceNpSessionServiceSendPlayerSessionInvitations(); +int APS5_VABI sceNpSessionServiceSendPlayerSessionRequestToJoin(); +int APS5_VABI sceNpSessionServiceTerminate(); } diff --git a/docs/dev/debt/libSceNpGameIntent.md b/docs/dev/debt/libSceNpGameIntent.md index 6291b2f110..ce2836c2a0 100644 --- a/docs/dev/debt/libSceNpGameIntent.md +++ b/docs/dev/debt/libSceNpGameIntent.md @@ -10,5 +10,6 @@ - [sceNpGameIntentReceiveIntent, sceNpGameIntentGetPropertyValueString](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - firmware 13.42 traces report `0x80553802` before `sceNpGameIntentInitialize` (precedence over argument validity), and `0x80553804` for invalid arguments (null pointer, empty key, or zero buffer size); `sceNpGameIntentTerminate` resetting initialized state is modeled lifecycle behavior rather than hardware-verified. `sceNpGameIntentReceiveIntent` reportedly requires `info->size == 0x4140` on firmware 13.42, while AnyPS5 `NpGameIntentInfo` is `0x560` bytes (matching fpPS4) and set by `sceNpGameIntentInfoInit`, so initialized objects are rejected by the receiver's measured size guard. Complete retail layout, output field offsets, and retail behavior of `sceNpGameIntentInfoInit` are unverified; expanding the type with unverified reserved bytes is not an evidence-backed solution. - [sceNpAppLauncherLaunchApp](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent, NID `GbayQ7DO8jA`) - its recovered signature is `(int32_t, const char*, const char*)`: an unhandled first argument, a required non-empty string and an optional string rejected past 0x2000 bytes, returning `0x80553A02` before `sceNpAppLauncherInitialize` and `0x80553A04` on invalid arguments. The launch itself is not implemented and throws; the firmware tail calls an internal launch through an extra library context and remaps its `0x805538xx` errors into `0x80553Axx` - [sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). They are declared without parameters solely to resolve known imports and make no ABI claim. +- [sceNpSessionServiceInitialize, sceNpSessionServiceSendPlayerSessionRequestToJoin and sceNpSessionServiceTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the PS5 13.60 export inventory. Their signatures and behavior are unknown; they are declared without parameters solely to resolve known imports, make no ABI claim, and throw on every call. - [sceNpGameIntentInitParamInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L17) `SceNpGameIntentInitParam`; setting `size`, zeroing reserved bytes, and throwing on null pointer follow Sony SDK `*ParamInit` conventions but are unverified on retail hardware - [sceNpGameIntentInfoInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L28) `SceNpGameIntentInfo`; setting `size = 0x560`, `user_id = -1`, zeroing fields, and throwing on null pointer follow fpPS4 defaults, but reported firmware 13.42 behavior requires `0x4140` for `sceNpGameIntentReceiveIntent`, so the helper's `0x560` size does not match retail receiver defaults; the complete retail structure layout and retail behavior of `sceNpGameIntentInfoInit` remain unverified. Title code disagrees with that layout: before their one `sceNpGameIntentReceiveIntent` call, PPSA01494, PPSA03984, PPSA21564, PPSA30839, PPSA31162 and PPSA34502 zero the 0x4138 bytes after an 8-byte size (five store size 0x4140); after it they read the type at 0xc but pass 0x134, not 0x153, as the intent data. None of them calls `sceNpGameIntentInfoInit` From bf0ff3b3ba58980d132c6fb289e85d43ef7a9323 Mon Sep 17 00:00:00 2001 From: Kyon Date: Fri, 30 Oct 2026 04:17:16 +0000 Subject: [PATCH 10/23] docs(libcairo): record export evidence --- docs/dev/debt/libcairo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libcairo.md b/docs/dev/debt/libcairo.md index 3f966504dc..796dae4746 100644 --- a/docs/dev/debt/libcairo.md +++ b/docs/dev/debt/libcairo.md @@ -2,7 +2,7 @@ ### Callable exports -- [Callable exports](../../../core/libs/prx/libcairo/Export.cpp) - 161 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). +- [Callable exports](../../../core/libs/prx/libcairo/Export.cpp) - 161 callable NIDs match the [public 3.20 catalogue](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libcairo.c) and the [selected export metadata](https://gist.github.com/kyon-eth/a0bb48f2b3070a5eac8a638810f195f2/a3838ac54ebcc0bbfeb3cc46002a9a2dcce4dbdc) from two version-labelled images (SHA-256 `ec2158e0c5875316d200037d7f4bc48861626451752523f6930d687307c75ef8`). The labels are not authenticated. Prototypes and behavior are unverified; these declarations throw through `NotImplemented_nid_no_patch` and implement no runtime functionality. | Name | NID | | --- | --- | From dcf06772c226915ba435c39100d68894e1e201ad Mon Sep 17 00:00:00 2001 From: Kyon Date: Fri, 30 Oct 2026 04:24:16 +0000 Subject: [PATCH 11/23] docs(libcurl): record export evidence --- docs/dev/debt/libcurl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libcurl.md b/docs/dev/debt/libcurl.md index be8f2d7b03..f5c3c3c376 100644 --- a/docs/dev/debt/libcurl.md +++ b/docs/dev/debt/libcurl.md @@ -2,7 +2,7 @@ ### Callable exports -- [Callable exports](../../../core/libs/prx/libcurl/Export.cpp) - 85 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). +- [Callable exports](../../../core/libs/prx/libcurl/Export.cpp) - 85 callable NIDs match the [public 3.20 catalogue](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libcurl.c) and the [selected export metadata](https://gist.github.com/kyon-eth/996975adc28d0d270d032fb47eb297a7/52f3b6179ff69fbc0725e02ba146279ecd451f49) from two version-labelled images (SHA-256 `69baa557f91eba487275aa1b8e0aecd8dde1caa261eb2dd04106f8fa00e65361`). The labels are not authenticated. Prototypes and behavior are unverified; these declarations throw through `NotImplemented_nid_no_patch` and implement no runtime functionality. | Name | NID | | --- | --- | From ae2af3eb287151b0fafdd1bc13e15ba04bc2a524 Mon Sep 17 00:00:00 2001 From: Kyon Date: Fri, 30 Oct 2026 04:29:13 +0000 Subject: [PATCH 12/23] docs(libfontconfig): record export evidence --- docs/dev/debt/libfontconfig.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libfontconfig.md b/docs/dev/debt/libfontconfig.md index fc92c41aba..07d2cdb6e6 100644 --- a/docs/dev/debt/libfontconfig.md +++ b/docs/dev/debt/libfontconfig.md @@ -2,7 +2,7 @@ ### Callable exports -- [Callable exports](../../../core/libs/prx/libfontconfig/Export.cpp) - 53 entries are import-resolution declarations only. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Data exports require separate layout and ownership analysis. Candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv). +- [Callable exports](../../../core/libs/prx/libfontconfig/Export.cpp) - 53 callable NIDs match the [public 3.20 catalogue](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libfontconfig.c) and the [selected export metadata](https://gist.github.com/kyon-eth/7c1e54e6851733f72dbb507fdfbf35f4/206d5ec1b74f677f61a1eda755b490537209a8e1) from two version-labelled images (SHA-256 `3694ba82b2fbff0d5d789f91938906ebc8ee45262aaaba2b333d490f7e0c24ab`). The labels are not authenticated. Prototypes and behavior are unverified; these declarations throw through `NotImplemented_nid_no_patch` and implement no runtime functionality. | Name | NID | | --- | --- | From 39749e16df2b8e4d801f64187120bc732c042ad4 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 06:29:23 +0200 Subject: [PATCH 13/23] feat(musiccore): add interface inventory exports --- .../prx/libSceMusicCoreInterface/Export.cpp | 29 +++++++++++++++++++ .../include/InventoryExports.hpp | 15 ++++++++++ .../libSceMusicCoreInterface.hpp | 2 ++ docs/dev/debt/libSceMusicCoreInterface.md | 5 ++++ 4 files changed, 51 insertions(+) create mode 100644 core/libs/prx/libSceMusicCoreInterface/include/InventoryExports.hpp create mode 100644 docs/dev/debt/libSceMusicCoreInterface.md diff --git a/core/libs/prx/libSceMusicCoreInterface/Export.cpp b/core/libs/prx/libSceMusicCoreInterface/Export.cpp index d81f4a5e32..94e32c6d0f 100644 --- a/core/libs/prx/libSceMusicCoreInterface/Export.cpp +++ b/core/libs/prx/libSceMusicCoreInterface/Export.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceMusicCoreInterface/include/InventoryExports.hpp" #include #include #include "SceTypes.hpp" @@ -7,4 +8,32 @@ extern "C" { APS5_DUMMY_FUN +int APS5_VABI sceMusicCoreIfInitializeInterface() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfSetFunctionTable() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfMainLoop() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfSetInternalFunctionTable() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfSetFunctionTableExt2() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfSetFunctionTableUnlimited() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMusicCoreIfInternalInitializeInterface() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceMusicCoreInterface/include/InventoryExports.hpp b/core/libs/prx/libSceMusicCoreInterface/include/InventoryExports.hpp new file mode 100644 index 0000000000..45dcff3582 --- /dev/null +++ b/core/libs/prx/libSceMusicCoreInterface/include/InventoryExports.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI sceMusicCoreIfInitializeInterface(); +int APS5_VABI sceMusicCoreIfSetFunctionTable(); +int APS5_VABI sceMusicCoreIfMainLoop(); +int APS5_VABI sceMusicCoreIfSetInternalFunctionTable(); +int APS5_VABI sceMusicCoreIfSetFunctionTableExt2(); +int APS5_VABI sceMusicCoreIfSetFunctionTableUnlimited(); +int APS5_VABI sceMusicCoreIfInternalInitializeInterface(); + +} diff --git a/core/libs/prx/libSceMusicCoreInterface/libSceMusicCoreInterface.hpp b/core/libs/prx/libSceMusicCoreInterface/libSceMusicCoreInterface.hpp index 6f70f09bee..d071d0060d 100644 --- a/core/libs/prx/libSceMusicCoreInterface/libSceMusicCoreInterface.hpp +++ b/core/libs/prx/libSceMusicCoreInterface/libSceMusicCoreInterface.hpp @@ -1 +1,3 @@ #pragma once + +#include "prx/libSceMusicCoreInterface/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libSceMusicCoreInterface.md b/docs/dev/debt/libSceMusicCoreInterface.md new file mode 100644 index 0000000000..89642b0f43 --- /dev/null +++ b/docs/dev/debt/libSceMusicCoreInterface.md @@ -0,0 +1,5 @@ +# libSceMusicCoreInterface technical debt + +### Unknown function info + +- [sceMusicCoreIfInitializeInterface, sceMusicCoreIfSetFunctionTable, sceMusicCoreIfMainLoop, sceMusicCoreIfSetInternalFunctionTable, sceMusicCoreIfSetFunctionTableExt2, sceMusicCoreIfSetFunctionTableUnlimited and sceMusicCoreIfInternalInitializeInterface](../../../core/libs/prx/libSceMusicCoreInterface/Export.cpp) - names and NIDs are present in the [PS5 13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscemusiccoreinterface-0263dcc276.jsonl). Parameter lists, return types and behavior are unverified; the parameterless `int` declarations are import-resolution placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. No MusicCore interface behavior is implemented. From 891d4761d9210e33ed530115d39744bc71d95809 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 06:33:32 +0200 Subject: [PATCH 14/23] feat(vcodec): add hardware budget inventory exports --- core/libs/prx/libSceVcodec/Export.cpp | 21 +++++++++++++++++++ .../libSceVcodec/include/InventoryExports.hpp | 13 ++++++++++++ core/libs/prx/libSceVcodec/libSceVcodec.hpp | 2 ++ docs/dev/debt/libSceVcodec.md | 5 +++++ 4 files changed, 41 insertions(+) create mode 100644 core/libs/prx/libSceVcodec/include/InventoryExports.hpp create mode 100644 docs/dev/debt/libSceVcodec.md diff --git a/core/libs/prx/libSceVcodec/Export.cpp b/core/libs/prx/libSceVcodec/Export.cpp index d81f4a5e32..07d6317b48 100644 --- a/core/libs/prx/libSceVcodec/Export.cpp +++ b/core/libs/prx/libSceVcodec/Export.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceVcodec/include/InventoryExports.hpp" #include #include #include "SceTypes.hpp" @@ -7,4 +8,24 @@ extern "C" { APS5_DUMMY_FUN +int APS5_VABI sceVcodecCloseHwBudget() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVcodecOpenHwBudgetByAppid() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVcodecSetHwBudgetSize() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVcodecOpenHwBudget() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVcodecSetHwBudgetType() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceVcodec/include/InventoryExports.hpp b/core/libs/prx/libSceVcodec/include/InventoryExports.hpp new file mode 100644 index 0000000000..b2f70484bc --- /dev/null +++ b/core/libs/prx/libSceVcodec/include/InventoryExports.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI sceVcodecCloseHwBudget(); +int APS5_VABI sceVcodecOpenHwBudgetByAppid(); +int APS5_VABI sceVcodecSetHwBudgetSize(); +int APS5_VABI sceVcodecOpenHwBudget(); +int APS5_VABI sceVcodecSetHwBudgetType(); + +} diff --git a/core/libs/prx/libSceVcodec/libSceVcodec.hpp b/core/libs/prx/libSceVcodec/libSceVcodec.hpp index 6f70f09bee..6fc48e737f 100644 --- a/core/libs/prx/libSceVcodec/libSceVcodec.hpp +++ b/core/libs/prx/libSceVcodec/libSceVcodec.hpp @@ -1 +1,3 @@ #pragma once + +#include "prx/libSceVcodec/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libSceVcodec.md b/docs/dev/debt/libSceVcodec.md new file mode 100644 index 0000000000..c807062d14 --- /dev/null +++ b/docs/dev/debt/libSceVcodec.md @@ -0,0 +1,5 @@ +# libSceVcodec technical debt + +### Unknown function info + +- [sceVcodecCloseHwBudget, sceVcodecOpenHwBudgetByAppid, sceVcodecSetHwBudgetSize, sceVcodecOpenHwBudget and sceVcodecSetHwBudgetType](../../../core/libs/prx/libSceVcodec/Export.cpp) - names and NIDs are present in the [PS5 13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscevcodec-942ad05a91.jsonl). Parameter lists, return types and behavior are unverified; the parameterless `int` declarations are import-resolution placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Three additional inventory NIDs remain unresolved and are not declared. No hardware-budget behavior is implemented. From 4e523ee18875aea81006ca40458c273199d2ab77 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 06:37:29 +0200 Subject: [PATCH 15/23] feat(mediafw): add utility inventory exports --- .../prx/libSceMediaFrameworkUtil/Export.cpp | 21 +++++++++++++++++++ .../include/InventoryExports.hpp | 13 ++++++++++++ .../libSceMediaFrameworkUtil.hpp | 2 ++ docs/dev/debt/libSceMediaFrameworkUtil.md | 5 +++++ 4 files changed, 41 insertions(+) create mode 100644 core/libs/prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp create mode 100644 docs/dev/debt/libSceMediaFrameworkUtil.md diff --git a/core/libs/prx/libSceMediaFrameworkUtil/Export.cpp b/core/libs/prx/libSceMediaFrameworkUtil/Export.cpp index d81f4a5e32..7da6045246 100644 --- a/core/libs/prx/libSceMediaFrameworkUtil/Export.cpp +++ b/core/libs/prx/libSceMediaFrameworkUtil/Export.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp" #include #include #include "SceTypes.hpp" @@ -7,4 +8,24 @@ extern "C" { APS5_DUMMY_FUN +int APS5_VABI sceMediaFwUtilUnregisterNotifySystemVolume() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMediaFwUtilRegisterNotifySystemVolume() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMediaFwUtilPreprocessToKillMediaApp() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMediaFwUtilKillCustomMusicCoreSynchronously() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceMediaFwUtilGetSystemVolume() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp b/core/libs/prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp new file mode 100644 index 0000000000..a487c4954b --- /dev/null +++ b/core/libs/prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI sceMediaFwUtilUnregisterNotifySystemVolume(); +int APS5_VABI sceMediaFwUtilRegisterNotifySystemVolume(); +int APS5_VABI sceMediaFwUtilPreprocessToKillMediaApp(); +int APS5_VABI sceMediaFwUtilKillCustomMusicCoreSynchronously(); +int APS5_VABI sceMediaFwUtilGetSystemVolume(); + +} diff --git a/core/libs/prx/libSceMediaFrameworkUtil/libSceMediaFrameworkUtil.hpp b/core/libs/prx/libSceMediaFrameworkUtil/libSceMediaFrameworkUtil.hpp index 6f70f09bee..fe5bea4ff0 100644 --- a/core/libs/prx/libSceMediaFrameworkUtil/libSceMediaFrameworkUtil.hpp +++ b/core/libs/prx/libSceMediaFrameworkUtil/libSceMediaFrameworkUtil.hpp @@ -1 +1,3 @@ #pragma once + +#include "prx/libSceMediaFrameworkUtil/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libSceMediaFrameworkUtil.md b/docs/dev/debt/libSceMediaFrameworkUtil.md new file mode 100644 index 0000000000..06bb1949c3 --- /dev/null +++ b/docs/dev/debt/libSceMediaFrameworkUtil.md @@ -0,0 +1,5 @@ +# libSceMediaFrameworkUtil technical debt + +### Unknown function info + +- [sceMediaFwUtilUnregisterNotifySystemVolume, sceMediaFwUtilRegisterNotifySystemVolume, sceMediaFwUtilPreprocessToKillMediaApp, sceMediaFwUtilKillCustomMusicCoreSynchronously and sceMediaFwUtilGetSystemVolume](../../../core/libs/prx/libSceMediaFrameworkUtil/Export.cpp) - names and NIDs are present in the [PS5 13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscemediaframeworkutil-c0af9aa86b.jsonl). Parameter lists, return types and behavior are unverified; the parameterless `int` declarations are import-resolution placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Six additional inventory NIDs remain unresolved and are not declared. No media-framework utility behavior is implemented. From 8bf3c704f7477e0a2b029a42e2303fe0d663ac22 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 06:43:12 +0200 Subject: [PATCH 16/23] feat(voicecommand): add named inventory exports --- core/libs/prx/libSceVoiceCommand/Export.cpp | 93 +++++++++++++++++++ .../include/InventoryExports.hpp | 31 +++++++ .../libSceVoiceCommand/libSceVoiceCommand.hpp | 2 + docs/dev/debt/libSceVoiceCommand.md | 5 + 4 files changed, 131 insertions(+) create mode 100644 core/libs/prx/libSceVoiceCommand/include/InventoryExports.hpp create mode 100644 docs/dev/debt/libSceVoiceCommand.md diff --git a/core/libs/prx/libSceVoiceCommand/Export.cpp b/core/libs/prx/libSceVoiceCommand/Export.cpp index d81f4a5e32..5699611ce5 100644 --- a/core/libs/prx/libSceVoiceCommand/Export.cpp +++ b/core/libs/prx/libSceVoiceCommand/Export.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceVoiceCommand/include/InventoryExports.hpp" #include #include #include "SceTypes.hpp" @@ -7,4 +8,96 @@ extern "C" { APS5_DUMMY_FUN +int APS5_VABI sceVoiceCommandGetKeywordParameter() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandGetKeywordLanguage() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandInit() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetInputID() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandGetSentenceInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetUnmuteSentence() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetUndefinedKeywordGroup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandStopRecognize() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetKeywordParameter() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandClearUndefinedSentence() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetMuteSentence() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandProcess() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandBindSubDictionary() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandClearUndefinedKeywordGroup() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandGetKeywordGroupInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandGetKeywordPortNum() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandSetUndefinedSentence() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandCreateMainDictionary() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandClosePort() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandStartRecognize() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandGetResultDetail() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandOpenMainDictionary() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVoiceCommandOpenMainDictionary_internal() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceVoiceCommand/include/InventoryExports.hpp b/core/libs/prx/libSceVoiceCommand/include/InventoryExports.hpp new file mode 100644 index 0000000000..5c91955999 --- /dev/null +++ b/core/libs/prx/libSceVoiceCommand/include/InventoryExports.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI sceVoiceCommandGetKeywordParameter(); +int APS5_VABI sceVoiceCommandGetKeywordLanguage(); +int APS5_VABI sceVoiceCommandInit(); +int APS5_VABI sceVoiceCommandSetInputID(); +int APS5_VABI sceVoiceCommandGetSentenceInfo(); +int APS5_VABI sceVoiceCommandSetUnmuteSentence(); +int APS5_VABI sceVoiceCommandSetUndefinedKeywordGroup(); +int APS5_VABI sceVoiceCommandStopRecognize(); +int APS5_VABI sceVoiceCommandSetKeywordParameter(); +int APS5_VABI sceVoiceCommandClearUndefinedSentence(); +int APS5_VABI sceVoiceCommandSetMuteSentence(); +int APS5_VABI sceVoiceCommandProcess(); +int APS5_VABI sceVoiceCommandBindSubDictionary(); +int APS5_VABI sceVoiceCommandClearUndefinedKeywordGroup(); +int APS5_VABI sceVoiceCommandGetKeywordGroupInfo(); +int APS5_VABI sceVoiceCommandGetKeywordPortNum(); +int APS5_VABI sceVoiceCommandSetUndefinedSentence(); +int APS5_VABI sceVoiceCommandCreateMainDictionary(); +int APS5_VABI sceVoiceCommandClosePort(); +int APS5_VABI sceVoiceCommandStartRecognize(); +int APS5_VABI sceVoiceCommandGetResultDetail(); +int APS5_VABI sceVoiceCommandOpenMainDictionary(); +int APS5_VABI sceVoiceCommandOpenMainDictionary_internal(); + +} diff --git a/core/libs/prx/libSceVoiceCommand/libSceVoiceCommand.hpp b/core/libs/prx/libSceVoiceCommand/libSceVoiceCommand.hpp index 6f70f09bee..6ed693abbe 100644 --- a/core/libs/prx/libSceVoiceCommand/libSceVoiceCommand.hpp +++ b/core/libs/prx/libSceVoiceCommand/libSceVoiceCommand.hpp @@ -1 +1,3 @@ #pragma once + +#include "prx/libSceVoiceCommand/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libSceVoiceCommand.md b/docs/dev/debt/libSceVoiceCommand.md new file mode 100644 index 0000000000..a1251090ad --- /dev/null +++ b/docs/dev/debt/libSceVoiceCommand.md @@ -0,0 +1,5 @@ +# libSceVoiceCommand technical debt + +### Unknown function info + +- [VoiceCommand inventory exports](../../../core/libs/prx/libSceVoiceCommand/Export.cpp) - 23 names and NIDs are present in the [PS5 13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscevoicecommand-e18b06a297.jsonl). Parameter lists, return types and behavior are unverified; the parameterless `int` declarations are import-resolution placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Six additional inventory NIDs remain unresolved and are not declared. No voice-command behavior is implemented. From 46b2281bbf07f053c52f2bbac117b8b66eef1b0d Mon Sep 17 00:00:00 2001 From: Kyon Date: Fri, 30 Oct 2026 04:48:59 +0000 Subject: [PATCH 17/23] feat(libharfbuzz): declare callable exports --- core/libs/prx/libharfbuzz/Export.cpp | 146 ++++++++++++++++++ .../libharfbuzz/include/InventoryExports.hpp | 43 ++++++ core/libs/prx/libharfbuzz/libharfbuzz.hpp | 3 + docs/dev/debt/libharfbuzz.md | 43 ++++++ 4 files changed, 235 insertions(+) create mode 100644 core/libs/prx/libharfbuzz/Export.cpp create mode 100644 core/libs/prx/libharfbuzz/include/InventoryExports.hpp create mode 100644 core/libs/prx/libharfbuzz/libharfbuzz.hpp create mode 100644 docs/dev/debt/libharfbuzz.md diff --git a/core/libs/prx/libharfbuzz/Export.cpp b/core/libs/prx/libharfbuzz/Export.cpp new file mode 100644 index 0000000000..a9c523b58e --- /dev/null +++ b/core/libs/prx/libharfbuzz/Export.cpp @@ -0,0 +1,146 @@ +#include "prx/libharfbuzz/include/InventoryExports.hpp" +#include "prx/libc/include/General.hpp" + +extern "C" { + +int APS5_VABI hb_blob_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_add_utf16() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_get_direction() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_get_glyph_infos() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_get_glyph_positions() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_get_length() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_guess_segment_properties() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_reset() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_set_direction() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_buffer_set_script() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_face_create_for_tables() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_face_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_destroy() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_create() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_make_immutable() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_glyph_extents_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_glyph_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_glyph_h_advance_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_glyph_h_origin_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_nominal_glyph_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_funcs_set_variation_glyph_func() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_make_immutable() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_set_funcs() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_set_ppem() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_font_set_scale() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_ft_face_create_cached() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_icu_script_to_script() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_ot_layout_language_find_feature() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_ot_layout_script_get_language_tags() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_ot_layout_table_get_script_tags() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_ot_tag_to_script() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI hb_shape() { + NotImplemented_nid_no_patch(__func__); +} + +} diff --git a/core/libs/prx/libharfbuzz/include/InventoryExports.hpp b/core/libs/prx/libharfbuzz/include/InventoryExports.hpp new file mode 100644 index 0000000000..9300f810e5 --- /dev/null +++ b/core/libs/prx/libharfbuzz/include/InventoryExports.hpp @@ -0,0 +1,43 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI hb_blob_create(); +int APS5_VABI hb_buffer_add_utf16(); +int APS5_VABI hb_buffer_create(); +int APS5_VABI hb_buffer_destroy(); +int APS5_VABI hb_buffer_get_direction(); +int APS5_VABI hb_buffer_get_glyph_infos(); +int APS5_VABI hb_buffer_get_glyph_positions(); +int APS5_VABI hb_buffer_get_length(); +int APS5_VABI hb_buffer_guess_segment_properties(); +int APS5_VABI hb_buffer_reset(); +int APS5_VABI hb_buffer_set_direction(); +int APS5_VABI hb_buffer_set_script(); +int APS5_VABI hb_face_create_for_tables(); +int APS5_VABI hb_face_destroy(); +int APS5_VABI hb_font_create(); +int APS5_VABI hb_font_destroy(); +int APS5_VABI hb_font_funcs_create(); +int APS5_VABI hb_font_funcs_make_immutable(); +int APS5_VABI hb_font_funcs_set_glyph_extents_func(); +int APS5_VABI hb_font_funcs_set_glyph_func(); +int APS5_VABI hb_font_funcs_set_glyph_h_advance_func(); +int APS5_VABI hb_font_funcs_set_glyph_h_origin_func(); +int APS5_VABI hb_font_funcs_set_nominal_glyph_func(); +int APS5_VABI hb_font_funcs_set_variation_glyph_func(); +int APS5_VABI hb_font_make_immutable(); +int APS5_VABI hb_font_set_funcs(); +int APS5_VABI hb_font_set_ppem(); +int APS5_VABI hb_font_set_scale(); +int APS5_VABI hb_ft_face_create_cached(); +int APS5_VABI hb_icu_script_to_script(); +int APS5_VABI hb_ot_layout_language_find_feature(); +int APS5_VABI hb_ot_layout_script_get_language_tags(); +int APS5_VABI hb_ot_layout_table_get_script_tags(); +int APS5_VABI hb_ot_tag_to_script(); +int APS5_VABI hb_shape(); + +} diff --git a/core/libs/prx/libharfbuzz/libharfbuzz.hpp b/core/libs/prx/libharfbuzz/libharfbuzz.hpp new file mode 100644 index 0000000000..cbad2f3663 --- /dev/null +++ b/core/libs/prx/libharfbuzz/libharfbuzz.hpp @@ -0,0 +1,3 @@ +#pragma once + +#include "prx/libharfbuzz/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libharfbuzz.md b/docs/dev/debt/libharfbuzz.md new file mode 100644 index 0000000000..ac79a11307 --- /dev/null +++ b/docs/dev/debt/libharfbuzz.md @@ -0,0 +1,43 @@ +# libharfbuzz technical debt + +### Callable exports + +- [Callable exports](../../../core/libs/prx/libharfbuzz/Export.cpp) - 35 callable NIDs match the [public 3.20 catalogue](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libharfbuzz.c) and the [selected export metadata](https://gist.github.com/kyon-eth/510aa3fcaf09cbe8b52048b44e4e67c0/b909f17c99ecd6323c085f70064548789062d57e) from an older `libharfbuzz` image and a later `libSceVshHarfBuzz` image (SHA-256 `25af97e02c1fa8d318ff3697eb8a79057ee9b8c5e5e4ec321f25114aceb05628`). The later image has a different module and library identity; matching NIDs do not establish forwarding or equivalent behavior. The version labels are not authenticated. Prototypes and behavior are unverified; these declarations throw through `NotImplemented_nid_no_patch` and implement no runtime functionality. + +| Name | NID | +| --- | --- | +| `hb_blob_create` | `hj1KIIN5D54` | +| `hb_buffer_add_utf16` | `P+hgu937lFs` | +| `hb_buffer_create` | `7f13XmbjTZo` | +| `hb_buffer_destroy` | `K-y1p7Z9THQ` | +| `hb_buffer_get_direction` | `0UafewjjWpM` | +| `hb_buffer_get_glyph_infos` | `ENsHmJCNG4Q` | +| `hb_buffer_get_glyph_positions` | `43mnfTQPCbw` | +| `hb_buffer_get_length` | `leHmVbjHyGw` | +| `hb_buffer_guess_segment_properties` | `DcrJr531A4w` | +| `hb_buffer_reset` | `PEggcTbDlfE` | +| `hb_buffer_set_direction` | `845S2XQdxhw` | +| `hb_buffer_set_script` | `eGbbvD8o7go` | +| `hb_face_create_for_tables` | `l7GEYs5PMVU` | +| `hb_face_destroy` | `ULNHQXciJ3s` | +| `hb_font_create` | `FVhYusaWqA4` | +| `hb_font_destroy` | `-8t2aEtFws4` | +| `hb_font_funcs_create` | `8ZddTpSAKIg` | +| `hb_font_funcs_make_immutable` | `LyOypNLMoz0` | +| `hb_font_funcs_set_glyph_extents_func` | `ReQKurupflQ` | +| `hb_font_funcs_set_glyph_func` | `Mh4YoQ4Y57s` | +| `hb_font_funcs_set_glyph_h_advance_func` | `SfmbF51JL1Y` | +| `hb_font_funcs_set_glyph_h_origin_func` | `qv9cZX3xWQo` | +| `hb_font_funcs_set_nominal_glyph_func` | `88WaPmXp6x8` | +| `hb_font_funcs_set_variation_glyph_func` | `ik7nXsVUdMw` | +| `hb_font_make_immutable` | `IThWGmihQUM` | +| `hb_font_set_funcs` | `WH6phgWx6TI` | +| `hb_font_set_ppem` | `ztxZdb1IY+M` | +| `hb_font_set_scale` | `eG5EI3x6twg` | +| `hb_ft_face_create_cached` | `RTxFQhlbF+U` | +| `hb_icu_script_to_script` | `u0E8Xi0easM` | +| `hb_ot_layout_language_find_feature` | `qos3JIrKrDg` | +| `hb_ot_layout_script_get_language_tags` | `HH-sRSNiSaU` | +| `hb_ot_layout_table_get_script_tags` | `wf6CfVJj9PQ` | +| `hb_ot_tag_to_script` | `uKjh3hI1npw` | +| `hb_shape` | `dM3hP4y99rM` | From 31ddc77010bcea83829655bff757155ecb0bf290 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 30 Oct 2026 07:08:07 +0200 Subject: [PATCH 18/23] feat(vnainternal): add named inventory exports --- core/libs/prx/libSceVnaInternal/Export.cpp | 337 ++++++++++++++++++ .../include/InventoryExports.hpp | 92 +++++ .../libSceVnaInternal/libSceVnaInternal.hpp | 2 + docs/dev/debt/libSceVnaInternal.md | 5 + 4 files changed, 436 insertions(+) create mode 100644 core/libs/prx/libSceVnaInternal/include/InventoryExports.hpp create mode 100644 docs/dev/debt/libSceVnaInternal.md diff --git a/core/libs/prx/libSceVnaInternal/Export.cpp b/core/libs/prx/libSceVnaInternal/Export.cpp index d81f4a5e32..441cf1d084 100644 --- a/core/libs/prx/libSceVnaInternal/Export.cpp +++ b/core/libs/prx/libSceVnaInternal/Export.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceVnaInternal/include/InventoryExports.hpp" #include #include #include "SceTypes.hpp" @@ -7,4 +8,340 @@ extern "C" { APS5_DUMMY_FUN +int APS5_VABI sceVnaGetMicStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetEnableWupSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetAgentSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetErrorSeverity() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetSessionTimeoutSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaStartAnalyzeInternal() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRequestTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaCancelTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetEnableAssistantLegalCheckStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUnregisterCallback() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetVadConfig() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilGetVoiceInputStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilTerminate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetDucking() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetAgentInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetEventData() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetKeyPhraseInfoCount() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetEnableFeedbackSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetWakeUpPhraseTelemetry() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaPlayTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetAgentIntentSessionTelemetry() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetAgentAvailabilityInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaCheckCallback() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetVoiceOskOptInStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetLanguageModelDirectoryPath() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetAsrExclusive() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaNotify() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetVoiceDataCollectionSettingsAsync() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaDisableAgentGui() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaStopAnalyze() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaStartAnalyze() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaNotifyStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetLanguageSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilGetSupportedLanguageList() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetSupportedLanguageInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetFeedbackStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetVoiceDataCollectionSettingsAsync() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetVoiceOskOptInStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilInitialize() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUnregisterSubscribeTarget() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetTtsSpeedSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaCancelDownloadTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetVoiceDataCollectionSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetKeyPhraseCategoryEnable() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaWaitReady() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRequestDialogTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetKeyPhrase() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetSupportedSpeakerType() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaStartKeyPhraseDetection() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaInitialize() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaInitializeForParty() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetVadState() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRequestDownloadTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaPlaySound() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetCurrentAudioInTelemetryInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSendAgentEvent() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRegisterSubscribeTarget() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetLocation() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetSessionInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetTtsVolumeSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetTtsDuckingLevel() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRegisterCallback() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetEnableAssistantSettings() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilUpdateVoiceInputStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetFeedbackTrigger() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRequestDownloadCahcedTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilIsLanguageSupported() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetVadVolumeThreshold() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetupKeyPhraseDetection() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetUmmStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaRequestPlayCachedTts() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaDevideAnalyze() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGenerateTelemetrySessionId() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetTtsVolume() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaCloseTtsStream() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaDisableWupRecording() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetTrimEndAudioFrame() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaGetKeyPhraseInfo() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaReadTtsStream() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaTerminate() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaSetClientStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaUtilRemoveVoiceInputStatus() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaStopKeyPhraseDetection() { + NotImplemented_nid_no_patch(__func__); +} + +int APS5_VABI sceVnaOpenTtsStream() { + NotImplemented_nid_no_patch(__func__); +} + } diff --git a/core/libs/prx/libSceVnaInternal/include/InventoryExports.hpp b/core/libs/prx/libSceVnaInternal/include/InventoryExports.hpp new file mode 100644 index 0000000000..b367c133c2 --- /dev/null +++ b/core/libs/prx/libSceVnaInternal/include/InventoryExports.hpp @@ -0,0 +1,92 @@ +#pragma once + +#include "SceTypes.hpp" + +extern "C" { + +int APS5_VABI sceVnaGetMicStatus(); +int APS5_VABI sceVnaSetEnableWupSettings(); +int APS5_VABI sceVnaGetAgentSettings(); +int APS5_VABI sceVnaGetErrorSeverity(); +int APS5_VABI sceVnaSetSessionTimeoutSettings(); +int APS5_VABI sceVnaStartAnalyzeInternal(); +int APS5_VABI sceVnaRequestTts(); +int APS5_VABI sceVnaCancelTts(); +int APS5_VABI sceVnaSetEnableAssistantLegalCheckStatus(); +int APS5_VABI sceVnaUnregisterCallback(); +int APS5_VABI sceVnaSetVadConfig(); +int APS5_VABI sceVnaUtilGetVoiceInputStatus(); +int APS5_VABI sceVnaUtilTerminate(); +int APS5_VABI sceVnaSetDucking(); +int APS5_VABI sceVnaSetAgentInfo(); +int APS5_VABI sceVnaGetEventData(); +int APS5_VABI sceVnaGetKeyPhraseInfoCount(); +int APS5_VABI sceVnaSetEnableFeedbackSettings(); +int APS5_VABI sceVnaSetWakeUpPhraseTelemetry(); +int APS5_VABI sceVnaPlayTts(); +int APS5_VABI sceVnaSetAgentIntentSessionTelemetry(); +int APS5_VABI sceVnaGetAgentAvailabilityInfo(); +int APS5_VABI sceVnaCheckCallback(); +int APS5_VABI sceVnaSetVoiceOskOptInStatus(); +int APS5_VABI sceVnaGetLanguageModelDirectoryPath(); +int APS5_VABI sceVnaSetAsrExclusive(); +int APS5_VABI sceVnaNotify(); +int APS5_VABI sceVnaGetVoiceDataCollectionSettingsAsync(); +int APS5_VABI sceVnaDisableAgentGui(); +int APS5_VABI sceVnaStopAnalyze(); +int APS5_VABI sceVnaStartAnalyze(); +int APS5_VABI sceVnaNotifyStatus(); +int APS5_VABI sceVnaSetLanguageSettings(); +int APS5_VABI sceVnaUtilGetSupportedLanguageList(); +int APS5_VABI sceVnaGetSupportedLanguageInfo(); +int APS5_VABI sceVnaGetFeedbackStatus(); +int APS5_VABI sceVnaSetVoiceDataCollectionSettingsAsync(); +int APS5_VABI sceVnaGetVoiceOskOptInStatus(); +int APS5_VABI sceVnaUtilInitialize(); +int APS5_VABI sceVnaUnregisterSubscribeTarget(); +int APS5_VABI sceVnaSetTtsSpeedSettings(); +int APS5_VABI sceVnaCancelDownloadTts(); +int APS5_VABI sceVnaGetVoiceDataCollectionSettings(); +int APS5_VABI sceVnaSetKeyPhraseCategoryEnable(); +int APS5_VABI sceVnaWaitReady(); +int APS5_VABI sceVnaRequestDialogTts(); +int APS5_VABI sceVnaSetKeyPhrase(); +int APS5_VABI sceVnaGetSupportedSpeakerType(); +int APS5_VABI sceVnaStartKeyPhraseDetection(); +int APS5_VABI sceVnaInitialize(); +int APS5_VABI sceVnaInitializeForParty(); +int APS5_VABI sceVnaGetVadState(); +int APS5_VABI sceVnaRequestDownloadTts(); +int APS5_VABI sceVnaPlaySound(); +int APS5_VABI sceVnaGetCurrentAudioInTelemetryInfo(); +int APS5_VABI sceVnaSendAgentEvent(); +int APS5_VABI sceVnaRegisterSubscribeTarget(); +int APS5_VABI sceVnaSetLocation(); +int APS5_VABI sceVnaSetSessionInfo(); +int APS5_VABI sceVnaSetTtsVolumeSettings(); +int APS5_VABI sceVnaSetTtsDuckingLevel(); +int APS5_VABI sceVnaRegisterCallback(); +int APS5_VABI sceVnaSetEnableAssistantSettings(); +int APS5_VABI sceVnaUtilUpdateVoiceInputStatus(); +int APS5_VABI sceVnaSetFeedbackTrigger(); +int APS5_VABI sceVnaRequestDownloadCahcedTts(); +int APS5_VABI sceVnaUtilIsLanguageSupported(); +int APS5_VABI sceVnaSetVadVolumeThreshold(); +int APS5_VABI sceVnaSetupKeyPhraseDetection(); +int APS5_VABI sceVnaSetUmmStatus(); +int APS5_VABI sceVnaRequestPlayCachedTts(); +int APS5_VABI sceVnaDevideAnalyze(); +int APS5_VABI sceVnaGenerateTelemetrySessionId(); +int APS5_VABI sceVnaGetTtsVolume(); +int APS5_VABI sceVnaCloseTtsStream(); +int APS5_VABI sceVnaDisableWupRecording(); +int APS5_VABI sceVnaSetTrimEndAudioFrame(); +int APS5_VABI sceVnaGetKeyPhraseInfo(); +int APS5_VABI sceVnaReadTtsStream(); +int APS5_VABI sceVnaTerminate(); +int APS5_VABI sceVnaSetClientStatus(); +int APS5_VABI sceVnaUtilRemoveVoiceInputStatus(); +int APS5_VABI sceVnaStopKeyPhraseDetection(); +int APS5_VABI sceVnaOpenTtsStream(); + +} diff --git a/core/libs/prx/libSceVnaInternal/libSceVnaInternal.hpp b/core/libs/prx/libSceVnaInternal/libSceVnaInternal.hpp index 6f70f09bee..a4a826be75 100644 --- a/core/libs/prx/libSceVnaInternal/libSceVnaInternal.hpp +++ b/core/libs/prx/libSceVnaInternal/libSceVnaInternal.hpp @@ -1 +1,3 @@ #pragma once + +#include "prx/libSceVnaInternal/include/InventoryExports.hpp" diff --git a/docs/dev/debt/libSceVnaInternal.md b/docs/dev/debt/libSceVnaInternal.md new file mode 100644 index 0000000000..7e17c565b8 --- /dev/null +++ b/docs/dev/debt/libSceVnaInternal.md @@ -0,0 +1,5 @@ +# libSceVnaInternal technical debt + +### Unknown function info + +- [VnaInternal inventory exports](../../../core/libs/prx/libSceVnaInternal/Export.cpp) - 84 names and NIDs are present in the [PS5 13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscevnainternal-b1ef6786a5.jsonl). Parameter lists, return types and behavior are unverified; the parameterless `int` declarations are import-resolution placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Four additional inventory NIDs remain unresolved and are not declared. No voice-network-agent behavior is implemented. Closed PR #10672 used a PS4-only source for 27 VnaInternal declarations; none of that source is evidence for this entry, and the 21 repeated identities here are independently present in the pinned PS5 13.60 records. From e9f09f54fabb6408d3e2711b8df10c10112ab00e Mon Sep 17 00:00:00 2001 From: Nicolas Gonzalez Date: Fri, 30 Oct 2026 03:48:50 -0300 Subject: [PATCH 19/23] test(libc): register the macOS write watch fault tests once Co-Authored-By: Claude Opus 5.5 --- core/libs/tests/write_watch/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/libs/tests/write_watch/CMakeLists.txt b/core/libs/tests/write_watch/CMakeLists.txt index 5686786df8..a912f98cc1 100644 --- a/core/libs/tests/write_watch/CMakeLists.txt +++ b/core/libs/tests/write_watch/CMakeLists.txt @@ -37,8 +37,3 @@ foreach(mode execute-fault read-fault) add_test(NAME write_watch_${mode} COMMAND write_watch_tests ${mode}) set_tests_properties(write_watch_${mode} PROPERTIES TIMEOUT 30) endforeach() - -foreach(mode execute-fault read-fault) - add_test(NAME write_watch_${mode} COMMAND write_watch_tests ${mode}) - set_tests_properties(write_watch_${mode} PROPERTIES TIMEOUT 30) -endforeach() From b258d8ed3aea0f6bf419585d97de69ca619d2288 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Sat, 31 Oct 2026 14:22:52 +0530 Subject: [PATCH 20/23] feat(libSceFont): implement drawup flat color and gradient record producers --- core/libs/prx/libSceFont/include/Api.hpp | 8 +- .../prx/libSceFont/include/FontGraphics.hpp | 3 + core/libs/prx/libSceFont/src/Graphics.cpp | 142 ++++++++++++++++-- .../libs/prx/libSceFont/src/Unimplemented.cpp | 14 +- core/libs/tests/GuestFontGraphics.cpp | 116 +++++++++++++- docs/dev/debt/libSceFont.md | 12 +- 6 files changed, 255 insertions(+), 40 deletions(-) diff --git a/core/libs/prx/libSceFont/include/Api.hpp b/core/libs/prx/libSceFont/include/Api.hpp index 8db5a3c899..d624a1144a 100644 --- a/core/libs/prx/libSceFont/include/Api.hpp +++ b/core/libs/prx/libSceFont/include/Api.hpp @@ -340,7 +340,7 @@ int APS5_VABI sceFontGraphicsProcessWaitAllSequences(); int APS5_VABI sceFontGraphicsStructureVertexesGlyph(); int APS5_VABI sceFontGraphicsTextureRefersSurface(); int APS5_VABI sceFontGraphicsUndefineIndexedVertexesGlyph(); -int APS5_VABI sceFontGraphicsAppendGradientSegment(); +int APS5_VABI sceFontGraphicsAppendGradientSegment(FontGraphicsFrame* graphicsObject, void* gradient, float position, const void* color); int APS5_VABI sceFontSupportSystemUpdation(); int APS5_VABI sceFontGraphicsCanvasRenewal(); int APS5_VABI sceFontGraphicsDesignStartDrawing(); @@ -357,11 +357,11 @@ int APS5_VABI sceFontGraphicsUndefineIndexedVertexesGlyphs(); int APS5_VABI sceFontGetCharVariationGlyphCode(); int APS5_VABI sceFontGraphicsSetupSlantShift(); int APS5_VABI sceFontGraphicsAdjustFillRadialGradient(); -int APS5_VABI sceFontGraphicsDrawupFillFlatColor(); -int APS5_VABI sceFontGraphicsDrawupFillLinearGradient(); +int APS5_VABI sceFontGraphicsDrawupFillFlatColor(FontGraphicsFrame* graphicsObject, const void* color, void** output); +int APS5_VABI sceFontGraphicsDrawupFillLinearGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1); int APS5_VABI sceFontGraphicsSetVertexesGlyphScale(); int APS5_VABI sceFontGlyphGetOutlineVertexes(); -int APS5_VABI sceFontGraphicsDrawupFillRadialGradient(); +int APS5_VABI sceFontGraphicsDrawupFillRadialGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1); int APS5_VABI sceFontGraphicsAdjustGradientSpread(); int APS5_VABI sceFontGraphicsCanvasSetSurfaceFillWithLayout(); int APS5_VABI sceFontGraphicsCanvasGetPreprocess(); diff --git a/core/libs/prx/libSceFont/include/FontGraphics.hpp b/core/libs/prx/libSceFont/include/FontGraphics.hpp index c5167c771e..6e3fccb6f5 100644 --- a/core/libs/prx/libSceFont/include/FontGraphics.hpp +++ b/core/libs/prx/libSceFont/include/FontGraphics.hpp @@ -19,6 +19,9 @@ int GraphicsFillRatesInit(FontGraphicsFillRates* rates, const FontGraphicsFill* int GraphicsFillRatesSetFillEffect(FontGraphicsFillRates* rates, const FontGraphicsFill* fill, std::uint32_t effect); int GraphicsFillRatesSetLayout(FontGraphicsFillRates* rates, std::int32_t first, std::int32_t second); int GraphicsFillRatesSetMapping(FontGraphicsFillRates* rates, float first, float second, float third, float fourth); +int GraphicsDrawupFillFlatColor(FontGraphicsFrame* graphicsObject, const void* color, void** output); +int GraphicsDrawupFillLinearGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1); +int GraphicsDrawupFillRadialGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1); int GraphicsDrawupFillTextureImageObject(FontGraphicsFrame* graphicsObject, const void* fillObject, std::uint32_t mode, void** output, float x, float y, float width, float height); int GraphicsDrawupFillTexturePatternObject(FontGraphicsFrame* graphicsObject, const void* fillObject, std::uint32_t mode, std::uint32_t format, std::uint32_t select, std::uint32_t dimension1, std::uint32_t option1, std::uint32_t option2, std::uint32_t dimension2, void** output); diff --git a/core/libs/prx/libSceFont/src/Graphics.cpp b/core/libs/prx/libSceFont/src/Graphics.cpp index cd05daf87c..eb4fb62a46 100644 --- a/core/libs/prx/libSceFont/src/Graphics.cpp +++ b/core/libs/prx/libSceFont/src/Graphics.cpp @@ -31,6 +31,9 @@ constexpr std::uint32_t FillEffects = 0x1033f; std::atomic g_errorCallback{nullptr}; constexpr std::uint16_t DrawupFrameTag = 0xf53; +constexpr std::uint8_t DrawupTypeFlatColor = 0x10; +constexpr std::uint8_t DrawupTypeLinearGradient = 0x20; +constexpr std::uint8_t DrawupTypeRadialGradient = 0x30; constexpr std::uint8_t DrawupTypeTextureImage = 0x40; constexpr std::uint8_t DrawupTypeTexturePattern = 0x50; constexpr std::uint32_t DrawupRecordHeader = 0x80; @@ -42,11 +45,28 @@ struct FontDrawupRecord { std::uint16_t flags; std::uint32_t sequence; FontDrawupRecord* next; - std::uint32_t state; - std::uint32_t mode; - void* payload; - float quad[4]; - std::uint8_t reserved[0x50]; + union { + struct { + std::uint32_t state; + std::uint32_t mode; + void* payload; + float quad[4]; + } texture; + struct { + std::uint32_t color; + } flat; + struct { + std::uint32_t color1; + std::uint32_t color2; + float extent0; + float extent1; + std::uint32_t mode; + std::uint32_t unused; + float values[4]; + std::uint64_t tail; + } gradient; + std::uint8_t raw[0x70]; + }; }; struct FontDrawupPoolEntry { @@ -379,16 +399,102 @@ FontDrawupRecord* DrawupAllocate(FontDrawupFrame* frame, std::uint32_t mode, int record->flags = 0; record->sequence = frame->sequence; record->next = nullptr; - record->state = 0; - record->mode = mode; - record->payload = reinterpret_cast(record) + DrawupRecordHeader; return record; } +std::uint32_t DrawupPackColor(const float* color) { + const auto channel = [](float value) { + return static_cast(static_cast(value * 255.0f + 0.5f)); + }; + return channel(color[0]) | (channel(color[1]) << 8) | (channel(color[2]) << 16) | (channel(color[3]) << 24); +} + +bool DrawupColorValid(const float* color) { + for (int i = 0; i < 4; ++i) { + if (0.0f > color[i] || color[i] > 1.0f) return false; + } + return true; +} + int DrawupFrameError(FontDrawupFrame* frame, int error) { return frame ? DrawupRecordError(frame, error) : Fail(error); } +int DrawupGradientRecord(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, + const void* color2, void** output, float extent0, float extent1, float x0, float y0, + float x1, float y1, std::uint8_t type) { + if (output) *output = nullptr; + auto* const frame = reinterpret_cast(graphicsObject); + if (!frame || frame->tag != DrawupFrameTag) + return DrawupFrameError(frame, FONT_GRAPHICS_ERROR_INVALID_OBJECT); + if (frame->error) + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_STICKY); + const auto* const c1 = static_cast(color1); + const auto* const c2 = static_cast(color2); + if (0.0f >= extent0 || 0.0f >= extent1 || mode > 2 || !c1 || !c2 || !DrawupColorValid(c1) || !DrawupColorValid(c2) || !output) + return DrawupRecordError(frame, SCE_FONT_ERROR_INVALID_PARAMETER); + if (!frame->object) + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_UNINITIALIZED); + if (frame->sequence == DrawupPoolSealed) + return FONT_GRAPHICS_ERROR_SEALED; + int error = 0; + FontDrawupRecord* const record = DrawupAllocate(frame, 0, &error); + if (!record) return error; + record->type = type; + record->gradient.color1 = DrawupPackColor(c1); + record->gradient.color2 = DrawupPackColor(c2); + record->gradient.extent0 = extent0; + record->gradient.extent1 = extent1; + record->gradient.mode = mode; + record->gradient.unused = 0; + record->gradient.values[0] = x0; + record->gradient.values[1] = y0; + record->gradient.values[2] = x1; + record->gradient.values[3] = y1; + if (type == DrawupTypeRadialGradient) record->gradient.tail = 0; + DrawupEnqueue(frame, record); + *output = record; + return SCE_FONT_OK; +} + +int GraphicsDrawupFillFlatColor(FontGraphicsFrame* graphicsObject, const void* color, void** output) { + if (output) *output = nullptr; + auto* const frame = reinterpret_cast(graphicsObject); + if (!frame || frame->tag != DrawupFrameTag) + return DrawupFrameError(frame, FONT_GRAPHICS_ERROR_INVALID_OBJECT); + if (frame->error) + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_STICKY); + const auto* const channels = static_cast(color); + if (!channels || !DrawupColorValid(channels) || !output) + return DrawupRecordError(frame, SCE_FONT_ERROR_INVALID_PARAMETER); + if (!frame->object) + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_UNINITIALIZED); + if (frame->sequence == DrawupPoolSealed) + return FONT_GRAPHICS_ERROR_SEALED; + int error = 0; + FontDrawupRecord* const record = DrawupAllocate(frame, 0, &error); + if (!record) return error; + record->type = DrawupTypeFlatColor; + record->flat.color = DrawupPackColor(channels); + DrawupEnqueue(frame, record); + *output = record; + return SCE_FONT_OK; +} + +int GraphicsDrawupFillLinearGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, + const void* color1, const void* color2, void** output, + float extent0, float extent1, float x0, float y0, float x1, float y1) { + return DrawupGradientRecord(graphicsObject, mode, color1, color2, output, + extent0, extent1, x0, y0, x1, y1, DrawupTypeLinearGradient); +} + +int GraphicsDrawupFillRadialGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, + const void* color1, const void* color2, void** output, + float extent0, float extent1, float x0, float y0, float x1, float y1) { + return DrawupGradientRecord(graphicsObject, mode, color1, color2, output, + extent0, extent1, x0, y0, x1, y1, DrawupTypeRadialGradient); +} + int GraphicsDrawupFillTextureImageObject(FontGraphicsFrame* graphicsObject, const void* fillObject, std::uint32_t mode, void** output, float x, float y, float width, float height) { if (output) *output = nullptr; @@ -407,11 +513,14 @@ int GraphicsDrawupFillTextureImageObject(FontGraphicsFrame* graphicsObject, cons FontDrawupRecord* const record = DrawupAllocate(frame, mode, &error); if (!record) return error; record->type = DrawupTypeTextureImage; - record->quad[0] = x; - record->quad[1] = y; - record->quad[2] = x + width; - record->quad[3] = y + height; - std::memcpy(record->payload, fillObject, mode); + record->texture.state = 0; + record->texture.mode = mode; + record->texture.payload = reinterpret_cast(record) + DrawupRecordHeader; + record->texture.quad[0] = x; + record->texture.quad[1] = y; + record->texture.quad[2] = x + width; + record->texture.quad[3] = y + height; + std::memcpy(record->texture.payload, fillObject, mode); DrawupEnqueue(frame, record); *output = record; return SCE_FONT_OK; @@ -444,13 +553,16 @@ int GraphicsDrawupFillTexturePatternObject(FontGraphicsFrame* graphicsObject, co FontDrawupRecord* const record = DrawupAllocate(frame, mode, &error); if (!record) return error; record->type = DrawupTypeTexturePattern; - auto* const params = reinterpret_cast(record->quad); + record->texture.state = 0; + record->texture.mode = mode; + record->texture.payload = reinterpret_cast(record) + DrawupRecordHeader; + auto* const params = reinterpret_cast(record->texture.quad); params[0] = formatWord; params[1] = selectWord; auto* const dims = reinterpret_cast(¶ms[2]); dims[0] = static_cast(dimension1 - 1); dims[1] = static_cast(dimension2 - 1); - std::memcpy(record->payload, fillObject, mode); + std::memcpy(record->texture.payload, fillObject, mode); DrawupEnqueue(frame, record); *output = record; return SCE_FONT_OK; diff --git a/core/libs/prx/libSceFont/src/Unimplemented.cpp b/core/libs/prx/libSceFont/src/Unimplemented.cpp index 47845dd8b9..f3c2d53400 100644 --- a/core/libs/prx/libSceFont/src/Unimplemented.cpp +++ b/core/libs/prx/libSceFont/src/Unimplemented.cpp @@ -394,7 +394,7 @@ int APS5_VABI sceFontGraphicsUndefineIndexedVertexesGlyph() { NotImplemented_nid_no_patch(__func__); } -int APS5_VABI sceFontGraphicsAppendGradientSegment() { +int APS5_VABI sceFontGraphicsAppendGradientSegment(FontGraphicsFrame* graphicsObject, void* gradient, float position, const void* color) { NotImplemented_nid_no_patch(__func__); } @@ -462,12 +462,12 @@ int APS5_VABI sceFontGraphicsAdjustFillRadialGradient() { NotImplemented_nid_no_patch(__func__); } -int APS5_VABI sceFontGraphicsDrawupFillFlatColor() { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceFontGraphicsDrawupFillFlatColor(FontGraphicsFrame* graphicsObject, const void* color, void** output) { + return Font::GraphicsDrawupFillFlatColor(graphicsObject, color, output); } -int APS5_VABI sceFontGraphicsDrawupFillLinearGradient() { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceFontGraphicsDrawupFillLinearGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1) { + return Font::GraphicsDrawupFillLinearGradient(graphicsObject, mode, color1, color2, output, extent0, extent1, x0, y0, x1, y1); } int APS5_VABI sceFontGraphicsSetVertexesGlyphScale() { @@ -478,8 +478,8 @@ int APS5_VABI sceFontGlyphGetOutlineVertexes() { NotImplemented_nid_no_patch(__func__); } -int APS5_VABI sceFontGraphicsDrawupFillRadialGradient() { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceFontGraphicsDrawupFillRadialGradient(FontGraphicsFrame* graphicsObject, std::uint32_t mode, const void* color1, const void* color2, void** output, float extent0, float extent1, float x0, float y0, float x1, float y1) { + return Font::GraphicsDrawupFillRadialGradient(graphicsObject, mode, color1, color2, output, extent0, extent1, x0, y0, x1, y1); } int APS5_VABI sceFontGraphicsAdjustGradientSpread() { diff --git a/core/libs/tests/GuestFontGraphics.cpp b/core/libs/tests/GuestFontGraphics.cpp index d47cb589e7..80241a44b0 100644 --- a/core/libs/tests/GuestFontGraphics.cpp +++ b/core/libs/tests/GuestFontGraphics.cpp @@ -13,8 +13,15 @@ namespace { using FontDrawupSignature = int (APS5_VABI *)(FontGraphicsFrame*, const void*, std::uint32_t, void**, float, float, float, float); using FontDrawupPatternSignature = int (APS5_VABI *)(FontGraphicsFrame*, const void*, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, void**); +using FontDrawupFlatSignature = int (APS5_VABI *)(FontGraphicsFrame*, const void*, void**); +using FontDrawupGradientSignature = int (APS5_VABI *)(FontGraphicsFrame*, std::uint32_t, const void*, const void*, void**, float, float, float, float, float, float); +using FontGradientSegmentSignature = int (APS5_VABI *)(FontGraphicsFrame*, void*, float, const void*); static_assert(std::is_same_v); static_assert(std::is_same_v); +static_assert(std::is_same_v); +static_assert(std::is_same_v); +static_assert(std::is_same_v); +static_assert(std::is_same_v); constexpr int Uninitialized = static_cast(0x80460001); constexpr int InvalidParameter = static_cast(0x80460002); @@ -428,21 +435,115 @@ void DrawupTextureRecords() { f.pool.entries[0].used = 2; f.pool.used = 2; f.pool.entries[0].scan = f.nodes + 2; - Require(sceFontGraphicsDrawupFillTexturePatternObject(frame, f.descriptor, 0, 0, 0, 1, 0, 0, 1, &out) == 0); + const float color[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + Require(sceFontGraphicsDrawupFillFlatColor(frame, color, &out) == 0); auto* record = static_cast(out); Require(record == reinterpret_cast(f.memory + 2 * 0x80)); - Require(record->type == 0x50 && record->mode == 0); - Require(record->params[0] == (0x100 | 0x1000) && record->params[1] == (4 | 0x40)); - auto* dims = reinterpret_cast(&record->params[2]); - Require(dims[0] == 0 && dims[1] == 0); - Require(AllBytes(*record, 0x2a, 0x80, 0)); + Require(record->type == 0x10 && record->state == 0xffffffff); + Require(AllBytes(*record, 0x14, 0x80, 0)); Require(f.memory[0] == 0xa5 && f.memory[0x7f] == 0xa5 && f.memory[0x80] == 0xa5 && f.memory[0xff] == 0xa5); Require(f.nodes[0] == ((2 << 1) | 1) && f.nodes[1] == 1); Require(f.nodes[2] == ((3 << 1) | 1) && f.nodes[3] == (TotalSlots << 1)); Require(f.pool.used == 3 && f.pool.entries[0].used == 3); f.pool.entries[0].scan = f.nodes + TotalSlots; f.frame.error = 0; - RequireError(sceFontGraphicsDrawupFillTexturePatternObject(frame, f.descriptor, 0, 0, 0, 1, 0, 0, 1, &out), NoRecordSpace); + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, color, &out), NoRecordSpace); + } +} + +void DrawupFillRecords() { + { + DrawupFixture f; + auto* frame = reinterpret_cast(&f.frame); + void* out = reinterpret_cast(0xdead); + std::memset(f.memory, 0xa5, sizeof(f.memory)); + const float color[4] = {1.0f, 0.5f, 0.0f, 1.0f}; + Require(sceFontGraphicsDrawupFillFlatColor(frame, color, &out) == 0); + auto* record = static_cast(out); + Require(record == reinterpret_cast(f.memory)); + Require(record->type == 0x10 && record->sizeTag == 0x80 && record->flags == 0); + Require(record->sequence == 0 && record->next == nullptr); + Require(record->state == 0xff0080ff); + Require(AllBytes(*record, 0x14, 0x80, 0xa5)); + Require(f.object.head == record && f.object.tail == record && f.frame.sequence == 1); + Require(f.pool.used == 1 && f.pool.entries[0].used == 1); + const float nanColor[4] = {NaN, 0.0f, 0.0f, 0.0f}; + Require(sceFontGraphicsDrawupFillFlatColor(frame, nanColor, &out) == 0); + Require(static_cast(out)->state == 0x80000000); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillFlatColor(nullptr, color, &out), InvalidObject); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, nullptr, &out), InvalidParameter); + f.frame.error = 0; + const float over[4] = {0.0f, 0.0f, 0.0f, 1.5f}; + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, over, &out), InvalidParameter); + f.frame.error = 0; + const float under[4] = {0.0f, -0.5f, 0.0f, 0.0f}; + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, under, &out), InvalidParameter); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, color, nullptr), InvalidParameter); + f.frame.error = 0; + f.frame.object = nullptr; + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, color, &out), Uninitialized); + f.frame.object = &f.object; + f.frame.error = 0; + f.frame.sequence = 0xffffffff; + Require(sceFontGraphicsDrawupFillFlatColor(frame, color, &out) == Sealed); + f.frame.sequence = 1; + } + { + DrawupFixture f; + auto* frame = reinterpret_cast(&f.frame); + void* out = nullptr; + std::memset(f.memory, 0xa5, sizeof(f.memory)); + const float c1[4] = {0.0f, 0.25f, 0.5f, 1.0f}; + const float c2[4] = {1.0f, 0.75f, 0.5f, 0.25f}; + Require(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, &out, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f) == 0); + auto* record = static_cast(out); + Require(record->type == 0x20 && record->sizeTag == 0x80 && record->flags == 0); + Require(record->sequence == 0 && record->next == nullptr); + Require(record->state == 0xff804000 && record->mode == 0x4080bfff); + const auto* extents = reinterpret_cast(&record->payload); + Require(extents[0] == 2.0f && extents[1] == 4.0f); + Require(record->params[0] == 2 && record->params[1] == 0); + const auto* values = reinterpret_cast(&record->params[2]); + Require(values[0] == 1.0f && values[1] == 2.0f && values[2] == 3.0f && values[3] == 4.0f); + Require(AllBytes(*record, 0x38, 0x80, 0xa5)); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 3, c1, c2, &out, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, &out, 0.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, &out, 2.0f, -1.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + Require(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, &out, NaN, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f) == 0); + record = static_cast(out); + extents = reinterpret_cast(&record->payload); + Require(std::isnan(extents[0]) && extents[1] == 4.0f); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, nullptr, c2, &out, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + const float bad[4] = {0.0f, 0.0f, 0.0f, 2.0f}; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, bad, c2, &out, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, nullptr, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); + f.frame.error = 0; + } + { + DrawupFixture f; + auto* frame = reinterpret_cast(&f.frame); + void* out = nullptr; + std::memset(f.memory, 0xa5, sizeof(f.memory)); + const float c1[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + const float c2[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + Require(sceFontGraphicsDrawupFillRadialGradient(frame, 0, c1, c2, &out, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f) == 0); + auto* record = static_cast(out); + Require(record->type == 0x30 && record->sizeTag == 0x80 && record->flags == 0); + Require(record->state == 0xffffffff && record->mode == 0); + const auto* values = reinterpret_cast(&record->params[2]); + Require(values[0] == 0.0f && values[1] == 0.0f && values[2] == 1.0f && values[3] == 1.0f); + Require(record->params[6] == 0 && record->params[7] == 0); + Require(AllBytes(*record, 0x40, 0x80, 0xa5)); } { DrawupFixture f; @@ -474,6 +575,7 @@ int main() { FillPlots(); FillRates(); DrawupTextureRecords(); + DrawupFillRecords(); Require(g_errorCount == g_expectedErrors); sceFontSetGraphicsErrorCallback(nullptr); const int before = g_errorCount; diff --git a/docs/dev/debt/libSceFont.md b/docs/dev/debt/libSceFont.md index f8c17c59dc..36b9bec45c 100644 --- a/docs/dev/debt/libSceFont.md +++ b/docs/dev/debt/libSceFont.md @@ -5,13 +5,13 @@ - [sceFontRenderCharGlyphImage, sceFontRenderCharGlyphImageHorizontal, sceFontRenderCharGlyphImageVertical](../../../core/libs/prx/libSceFont/src/Layout.cpp) (libSceFont) accept a surface whose width or height is 0, with any row stride, and return the glyph metrics and an empty update rectangle without writing to the surface. A negative width, height or stride, a zero stride on a surface with pixels, a null buffer and a pixel size other than 1 or 4 bytes still return `SCE_FONT_ERROR_NO_SUPPORT_SURFACE`; those cases and the exact console result for a zero-extent surface are not measured. The extent-0 behaviour is inferred from the Tekken Dark Resurrection PSP emulator which, to measure a string, initialises the surface with width 0 and height 31 and an unbound stride, renders each character and sums the returned advances. -The 44 additional exports below have unknown signatures and behavior. Their parameterless `int` declarations are import-resolution placeholders, not confirmed ABI signatures; every call throws through `NotImplemented_nid_no_patch`. Only names and NIDs are established by the [13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscefont-63ba420c2e.jsonl). They have not been measured on a console. +The 40 additional exports below have unknown signatures and behavior. Their parameterless `int` declarations are import-resolution placeholders, not confirmed ABI signatures; every call throws through `NotImplemented_nid_no_patch`. Only names and NIDs are established by the [13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscefont-63ba420c2e.jsonl). They have not been measured on a console. - [sceFontGraphicsCanvasStartDrawing, sceFontGraphicsGetDrawingFrameHandle, sceFontGraphicsGetIndexedVertexesGlyph, sceFontGraphicsProcessWaitAllSequences, sceFontGraphicsStructureVertexesGlyph, sceFontGraphicsTextureRefersSurface](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. -- [sceFontGraphicsUndefineIndexedVertexesGlyph, sceFontGraphicsAppendGradientSegment, sceFontSupportSystemUpdation, sceFontGraphicsCanvasRenewal, sceFontGraphicsDesignStartDrawing, sceFontGraphicsGetVertexesGlyphMetrics](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. +- [sceFontGraphicsUndefineIndexedVertexesGlyph, sceFontSupportSystemUpdation, sceFontGraphicsCanvasRenewal, sceFontGraphicsDesignStartDrawing, sceFontGraphicsGetVertexesGlyphMetrics](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. - [sceFontGraphicsUpdateSlantShift, sceFontGraphicsTextureMakeFillTexture, sceFontGraphicsTextureMakeFillTextureImage, sceFontGraphicsCanvasSetSurfaceFill, sceFontGraphicsDrawVertexesGlyph, sceFontGraphicsDrawRegionShape](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. - [sceFontGraphicsProcessWaitSequence, sceFontGraphicsTextureGetSurface, sceFontGraphicsUndefineIndexedVertexesGlyphs, sceFontGetCharVariationGlyphCode, sceFontGraphicsSetupSlantShift, sceFontGraphicsAdjustFillRadialGradient](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. -- [sceFontGraphicsDrawupFillFlatColor, sceFontGraphicsDrawupFillLinearGradient, sceFontGraphicsSetVertexesGlyphScale, sceFontGlyphGetOutlineVertexes, sceFontGraphicsDrawupFillRadialGradient, sceFontGraphicsAdjustGradientSpread](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. +- [sceFontGraphicsSetVertexesGlyphScale, sceFontGlyphGetOutlineVertexes, sceFontGraphicsAdjustGradientSpread](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. - [sceFontGraphicsCanvasSetSurfaceFillWithLayout, sceFontGraphicsCanvasGetPreprocess, sceFontGraphicsReportError, sceFontGraphicsDrawRectangleShape, sceFontGraphicsProcessSetSyncPolicy, sceFontGraphicsCanvasSetSurfaceFillWithMapping](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. - [sceFontGraphicsUndefineIndexedVertexesGlyphAll, sceFontGraphicsGetVertexesGlyphScale, sceFontGraphicsCanvasClearPreprocess, sceFontGraphicsFindIndexedVertexesGlyph, sceFontGraphicsDefineIndexedVertexesGlyph, sceFontGraphicsProcessRenderSequence](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. - [sceFontOutlineVertexesInterfaceInit, sceFontGraphicsSurfaceSetTargetView](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - unknown signatures and behavior; every call throws. @@ -32,10 +32,8 @@ The 44 additional exports below have unknown signatures and behavior. Their para - [sceFontCharacterGetSyllableStringState](../../../core/libs/prx/libSceFont/src/Text.cpp) (libSceFont) - the signature `(textCharacter, int* syllableStringState)` follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Font/SceFont.Engine.cs). Measured on PS4 firmware 11.00 `libSceFont.sprx` (not on a PS5): the state is 0 for Latin, CJK, Hangul, Arabic, Hebrew, Devanagari and the other scripts tried, and the library sets 1, 3 or 4 (never 2 on real text) for Thai while it creates the string; a null character or a null result returns `SCE_FONT_ERROR_INVALID_PARAMETER`, and a null character writes 0 to a non-null result. This returns 0 for every character outside the Thai block (U+0E00 to U+0E7F), as [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1805-L1815) does, and throws for Thai characters, whose cluster states are not modelled. SharpProspero's `SceFontSyllableString` names 0 NonDetection, 1 Starting, 2 Following, 3 Depending and 4 Connecting. PPSA06699 (Hot Shots Golf 2) calls it. - [sceFontCharactersRefersTextCodes, sceFontTextCodesStepNext and sceFontTextCodesStepBack](../../../core/libs/prx/libSceFont/src/Text.cpp) (libSceFont) - the signatures follow the [Orbital](https://github.com/AlexAltea/orbital/blob/cc408367da6a6ebbf5ac1ac559fefeadc73b2831/tools/ida/db_types.json#L679) IDA type database and [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Font/SceFont.Engine.cs#L395-L406), and the 64-byte `FontTextCodes` with the order pointer at 0 and the code at 8 follows SharpProspero's [SceFontTextCodes](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Font/SceFontStructs.cs#L216-L228). The traversal follows the PS4 11.00 `libSceFont.sprx` disassembly posted in [#4050](https://github.com/boykopovar/AnyPS5/pull/4050#issuecomment-6114504202), not a PS5 measurement: the cursor keeps the current, start and term characters at +0x28, +0x30 and +0x38; `Refers` never compares the character with the term and returns null for a clustered or synthetic character; `StepNext` returns null at the term after visiting it; `StepBack` returns null when the current character is the start; both steps skip synthetic characters. Assumed and not covered by the report, which says `StepNext` returns null only at the term: `StepNext` also returns null at the end of the chain (for example with a null term), and `StepBack` at the head of the chain. A null cursor or output returns null as in [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1696-L1740); a null text character throws, as its console result is unknown -- [sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject](../../../core/libs/prx/libSceFont/src/Graphics.cpp) (libSceFont) - disassembled from PS5 4.03 `libSceFont.sprx` (SHA-256 `3c67846f50ed3bf844efdc274f83c7f0043581b607154f3946499b72a3bfa086`): bodies `0x20cb0`/`0x20f50`, allocator `0x1bcc0`, pool init `0x1bc40` (sole `scan` write, `=nodes`), callers in PPSA20397 `libSceFontGsm.prx`; not console-measured. - - Disassembled: magic `0xf53`, errors `0x80460084`/`0x804600a9`/`0x80460002`/`0x80460001`/`0x8046005c`/`0x804600a2`, error paths storing at frame `+4` and invoking the registered callback (sealed included), pool/bitmap/queue mechanics, record layouts and tables, `mode` as `memcpy` size, `dimension-1` bytes, `option1` flags `{0x1000, 0x3000, 0x4000, 0x6000, 0x2000}` (jump table `0x37fcc`), allocator marking slots `start..start+count` but returning `memory + completingNodeIndex*slotSize`. - - Inferred: field names, the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). 13.42 report differences: internals, pool entries at `+0x20` (4.03: `+0x18`), error paths store at `+4` without invoking the callback. - - The mutex is released before record fill and enqueue, so it guards only the bitmap — frame counter and head/tail updates are unsynchronized, serialization is a caller contract. Not recovered: fields' downstream use, the seal's meaning. +- [sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject, sceFontGraphicsDrawupFillFlatColor, sceFontGraphicsDrawupFillLinearGradient, sceFontGraphicsDrawupFillRadialGradient](../../../core/libs/prx/libSceFont/src/Graphics.cpp) (libSceFont) - disassembled from a local PS5 4.03 `libSceFont.sprx` (SHA-256 `3c67846f50ed3bf844efdc274f83c7f0043581b607154f3946499b72a3bfa086`): bodies `0x1f940`/`0x1fc10`/`0x20080`/`0x20cb0`/`0x20f50`, allocator `0x1bcc0`, pool init `0x1bc40` (sole `scan` write, `=nodes`), texture callers in PPSA20397's `libSceFontGsm.prx` at relinked `0x392e`/`0x39b3`; not console-measured, and the 13.42 report's `0x22260`/`0x22530` bodies (706/824 bytes vs 670/871) show internals differ by firmware. Disassembled: magic `0xf53`, errors `0x80460084`/`0x804600a9`/`0x80460002`/`0x80460001`/`0x8046005c`/`0x804600a2`, sealed-path callback suppression, pool/bitmap/queue mechanics, record layouts and tables, `mode` as `memcpy` size, `dimension-1` bytes, the fills' packed-color and float fields. Inferred: field names, the fill signatures (no dump calls them; callee prologues only), the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). The mutex is released before record fill and enqueue, so it guards only the bitmap — frame counter and head/tail updates are unsynchronized, serialization is a caller contract. Not recovered: fields' downstream use, the seal's meaning. +- [sceFontGraphicsAppendGradientSegment](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - ABI `(frame, gradient, position, color)` recovered from the 4.03 body at `0x20500`; still throws. It sorted-inserts a color stop into gradient record types `0x20`/`0x30` (`0x80460086` otherwise) through a separate per-object arena allocator (`0x1b5e0`) whose storage and growth are not fully decoded. - [sceFontDefineAttribute, sceFontGetAttribute](../../../core/libs/prx/libSceFont/src/Style.cpp), [sceFontGlyphDefineAttribute, sceFontGlyphGetAttribute](../../../core/libs/prx/libSceFont/src/Render.cpp) (libSceFont) - the signatures `(handle, int attribute, int* oldAttribute)` and `(handle, int attribute, int* nowAttribute)`, and the same shape for a glyph, follow the [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Font/SceFont.Engine.cs) bindings, matching the IDA type database of [Orbital](https://github.com/AlexAltea/orbital/blob/master/tools/ida/db_types.json) and [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1249-L1264), not confirmed on a title. Every handle keeps one attribute, an opaque int whose meaning and valid values are unknown: define stores the new value and returns the previous one, and get returns the stored value with its `attribute` argument unused, as in KytyPS5. An attribute never set is 0. A glyph keeps one bit instead: its define accepts only 0x10 and 0x11, returning `SCE_FONT_ERROR_INVALID_PARAMETER` for any other value, stores the value and returns the previous 0x10 or 0x11, which is 0x10 when never set; its get returns 0x10 or 0x11 and ignores its `attribute` argument. The null checks and the invalid-object errors follow the other libSceFont functions and diverge from [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1251-L1265), which returns `OK` for a null handle or glyph after writing 0 to the old-attribute pointer: every other handle and glyph entry point in this library reports the invalid object instead, and a title that passes one is already failing. shadPS4 leaves both exports unimplemented, so there is no second implementation to compare. PPSA01325 calls the glyph define with 0x11 on a glyph from `sceFontGenerateCharGlyph` that it deletes unused and draws with `sceFontRenderCharGlyphImageHorizontal`; the three bindings all read the third argument as an out pointer, not a value, so this call sets the glyph's attribute to 0x11. The attribute changes neither shaping nor rendering. - [sceFontGlyphRenderImage, sceFontGlyphRenderImageHorizontal, sceFontGlyphRenderImageVertical](../../../core/libs/prx/libSceFont/src/Render.cpp) (libSceFont) - follow firmware 13.42's module as BunnyFl ran it natively ([comment](https://github.com/boykopovar/AnyPS5/pull/10892#issuecomment-6415399922); one font, 'A', one pixel format, not a console): the glyph's character is drawn as `sceFontRenderCharGlyphImage` and its directional forms draw it, at the glyph's generation scale; the surface's style frame wins over the argument, and a frame that sets no scale keeps that scale. A valid `sceFontGlyphRenderImageVertical` call, and `sceFontGlyphRenderImage` on a vertical font, throw: the module reports advance and stride 40/40 there where the char call gives 90/90 at 40 px, and one case doesn't name the rule. A pointer that isn't a renderer, and `SCE_FONT_ERROR_INVALID_FONT_HANDLE` for a closed owner font, are not measured From e215d6f0e0cfe3fe9887f0b42630e21ac7d59921 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Sat, 31 Oct 2026 16:10:00 +0530 Subject: [PATCH 21/23] fix(libSceFont): make drawup color packing use cvttss2si semantics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DrawupPackColor converted channel floats with static_cast, which is undefined for NaN — the same input DrawupColorValid admits. The firmware bodies pack with vcvttss2si into 64-bit registers, whose invalid-conversion result is 0x8000000000000000; the low dword the packing ORs in is 0, so an unrepresentable channel contributes a zero byte. Implement the conversion explicitly: in-range values truncate through int64_t, everything else contributes 0. The FlatColor NaN regression now checks the firmware-faithful packed word (0x00000000 instead of the int32-indefinite 0x80000000 the old codegen happened to emit). Verified under -fsanitize=float-cast-overflow -fno-sanitize-recover on Linux: clean run, test passes. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- core/libs/prx/libSceFont/src/Graphics.cpp | 4 +++- core/libs/tests/GuestFontGraphics.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/libs/prx/libSceFont/src/Graphics.cpp b/core/libs/prx/libSceFont/src/Graphics.cpp index eb4fb62a46..4d40ca7854 100644 --- a/core/libs/prx/libSceFont/src/Graphics.cpp +++ b/core/libs/prx/libSceFont/src/Graphics.cpp @@ -404,7 +404,9 @@ FontDrawupRecord* DrawupAllocate(FontDrawupFrame* frame, std::uint32_t mode, int std::uint32_t DrawupPackColor(const float* color) { const auto channel = [](float value) { - return static_cast(static_cast(value * 255.0f + 0.5f)); + const float scaled = value * 255.0f + 0.5f; + if (!(scaled >= -0x1p63f && scaled < 0x1p63f)) return std::uint32_t{0}; + return static_cast(static_cast(scaled)); }; return channel(color[0]) | (channel(color[1]) << 8) | (channel(color[2]) << 16) | (channel(color[3]) << 24); } diff --git a/core/libs/tests/GuestFontGraphics.cpp b/core/libs/tests/GuestFontGraphics.cpp index 80241a44b0..3d932e9bdc 100644 --- a/core/libs/tests/GuestFontGraphics.cpp +++ b/core/libs/tests/GuestFontGraphics.cpp @@ -469,7 +469,7 @@ void DrawupFillRecords() { Require(f.pool.used == 1 && f.pool.entries[0].used == 1); const float nanColor[4] = {NaN, 0.0f, 0.0f, 0.0f}; Require(sceFontGraphicsDrawupFillFlatColor(frame, nanColor, &out) == 0); - Require(static_cast(out)->state == 0x80000000); + Require(static_cast(out)->state == 0x00000000); f.frame.error = 0; RequireError(sceFontGraphicsDrawupFillFlatColor(nullptr, color, &out), InvalidObject); f.frame.error = 0; From fe6cd4504f536424373e536075c760fda63ae835 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Sat, 31 Oct 2026 16:38:11 +0000 Subject: [PATCH 22/23] fix(libSceFont): correct drawup option1, sealed error path, and pool return Firmware 4.03 re-disassembly of the drawup bodies fixes three transliteration errors: - Option1Flags[1] is 0x3000, not 0x2000: the option1 jump table at 0x37fcc routes index 1 to case code that ors 0x2000 then falls into or 0x1000. - Sealed paths run the shared error epilogue (store at frame+4 and invoke the registered callback), like every other error path; use DrawupRecordError instead of a bare return. - DrawupPoolAllocate returns memory + completingNodeIndex*slotSize (0x1bcc0 marks slots start..start+count but returns the node whose span finished the run), not the run's first slot. The 13.42 emulator report matches on all three; its callback suppression and +0x20 pool entries are firmware differences, not deviations here. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- core/libs/prx/libSceFont/src/Graphics.cpp | 4 ++-- core/libs/tests/GuestFontGraphics.cpp | 9 ++++++++- docs/dev/debt/libSceFont.md | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/libs/prx/libSceFont/src/Graphics.cpp b/core/libs/prx/libSceFont/src/Graphics.cpp index 4d40ca7854..76a82496a1 100644 --- a/core/libs/prx/libSceFont/src/Graphics.cpp +++ b/core/libs/prx/libSceFont/src/Graphics.cpp @@ -438,7 +438,7 @@ int DrawupGradientRecord(FontGraphicsFrame* graphicsObject, std::uint32_t mode, if (!frame->object) return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_UNINITIALIZED); if (frame->sequence == DrawupPoolSealed) - return FONT_GRAPHICS_ERROR_SEALED; + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_SEALED); int error = 0; FontDrawupRecord* const record = DrawupAllocate(frame, 0, &error); if (!record) return error; @@ -472,7 +472,7 @@ int GraphicsDrawupFillFlatColor(FontGraphicsFrame* graphicsObject, const void* c if (!frame->object) return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_UNINITIALIZED); if (frame->sequence == DrawupPoolSealed) - return FONT_GRAPHICS_ERROR_SEALED; + return DrawupRecordError(frame, FONT_GRAPHICS_ERROR_SEALED); int error = 0; FontDrawupRecord* const record = DrawupAllocate(frame, 0, &error); if (!record) return error; diff --git a/core/libs/tests/GuestFontGraphics.cpp b/core/libs/tests/GuestFontGraphics.cpp index 3d932e9bdc..89262af986 100644 --- a/core/libs/tests/GuestFontGraphics.cpp +++ b/core/libs/tests/GuestFontGraphics.cpp @@ -488,7 +488,9 @@ void DrawupFillRecords() { f.frame.object = &f.object; f.frame.error = 0; f.frame.sequence = 0xffffffff; - Require(sceFontGraphicsDrawupFillFlatColor(frame, color, &out) == Sealed); + RequireError(sceFontGraphicsDrawupFillFlatColor(frame, color, &out), Sealed); + Require(f.frame.error == Sealed); + f.frame.error = 0; f.frame.sequence = 1; } { @@ -528,6 +530,11 @@ void DrawupFillRecords() { f.frame.error = 0; RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, nullptr, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), InvalidParameter); f.frame.error = 0; + f.frame.sequence = 0xffffffff; + RequireError(sceFontGraphicsDrawupFillLinearGradient(frame, 2, c1, c2, &out, 2.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f), Sealed); + Require(f.frame.error == Sealed); + f.frame.error = 0; + f.frame.sequence = 2; } { DrawupFixture f; diff --git a/docs/dev/debt/libSceFont.md b/docs/dev/debt/libSceFont.md index 36b9bec45c..ffa713601a 100644 --- a/docs/dev/debt/libSceFont.md +++ b/docs/dev/debt/libSceFont.md @@ -32,7 +32,10 @@ The 40 additional exports below have unknown signatures and behavior. Their para - [sceFontCharacterGetSyllableStringState](../../../core/libs/prx/libSceFont/src/Text.cpp) (libSceFont) - the signature `(textCharacter, int* syllableStringState)` follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Font/SceFont.Engine.cs). Measured on PS4 firmware 11.00 `libSceFont.sprx` (not on a PS5): the state is 0 for Latin, CJK, Hangul, Arabic, Hebrew, Devanagari and the other scripts tried, and the library sets 1, 3 or 4 (never 2 on real text) for Thai while it creates the string; a null character or a null result returns `SCE_FONT_ERROR_INVALID_PARAMETER`, and a null character writes 0 to a non-null result. This returns 0 for every character outside the Thai block (U+0E00 to U+0E7F), as [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1805-L1815) does, and throws for Thai characters, whose cluster states are not modelled. SharpProspero's `SceFontSyllableString` names 0 NonDetection, 1 Starting, 2 Following, 3 Depending and 4 Connecting. PPSA06699 (Hot Shots Golf 2) calls it. - [sceFontCharactersRefersTextCodes, sceFontTextCodesStepNext and sceFontTextCodesStepBack](../../../core/libs/prx/libSceFont/src/Text.cpp) (libSceFont) - the signatures follow the [Orbital](https://github.com/AlexAltea/orbital/blob/cc408367da6a6ebbf5ac1ac559fefeadc73b2831/tools/ida/db_types.json#L679) IDA type database and [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Font/SceFont.Engine.cs#L395-L406), and the 64-byte `FontTextCodes` with the order pointer at 0 and the code at 8 follows SharpProspero's [SceFontTextCodes](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Font/SceFontStructs.cs#L216-L228). The traversal follows the PS4 11.00 `libSceFont.sprx` disassembly posted in [#4050](https://github.com/boykopovar/AnyPS5/pull/4050#issuecomment-6114504202), not a PS5 measurement: the cursor keeps the current, start and term characters at +0x28, +0x30 and +0x38; `Refers` never compares the character with the term and returns null for a clustered or synthetic character; `StepNext` returns null at the term after visiting it; `StepBack` returns null when the current character is the start; both steps skip synthetic characters. Assumed and not covered by the report, which says `StepNext` returns null only at the term: `StepNext` also returns null at the end of the chain (for example with a null term), and `StepBack` at the head of the chain. A null cursor or output returns null as in [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1696-L1740); a null text character throws, as its console result is unknown -- [sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject, sceFontGraphicsDrawupFillFlatColor, sceFontGraphicsDrawupFillLinearGradient, sceFontGraphicsDrawupFillRadialGradient](../../../core/libs/prx/libSceFont/src/Graphics.cpp) (libSceFont) - disassembled from a local PS5 4.03 `libSceFont.sprx` (SHA-256 `3c67846f50ed3bf844efdc274f83c7f0043581b607154f3946499b72a3bfa086`): bodies `0x1f940`/`0x1fc10`/`0x20080`/`0x20cb0`/`0x20f50`, allocator `0x1bcc0`, pool init `0x1bc40` (sole `scan` write, `=nodes`), texture callers in PPSA20397's `libSceFontGsm.prx` at relinked `0x392e`/`0x39b3`; not console-measured, and the 13.42 report's `0x22260`/`0x22530` bodies (706/824 bytes vs 670/871) show internals differ by firmware. Disassembled: magic `0xf53`, errors `0x80460084`/`0x804600a9`/`0x80460002`/`0x80460001`/`0x8046005c`/`0x804600a2`, sealed-path callback suppression, pool/bitmap/queue mechanics, record layouts and tables, `mode` as `memcpy` size, `dimension-1` bytes, the fills' packed-color and float fields. Inferred: field names, the fill signatures (no dump calls them; callee prologues only), the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). The mutex is released before record fill and enqueue, so it guards only the bitmap — frame counter and head/tail updates are unsynchronized, serialization is a caller contract. Not recovered: fields' downstream use, the seal's meaning. +- [sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject, sceFontGraphicsDrawupFillFlatColor, sceFontGraphicsDrawupFillLinearGradient, sceFontGraphicsDrawupFillRadialGradient](../../../core/libs/prx/libSceFont/src/Graphics.cpp) (libSceFont) - disassembled from PS5 4.03 `libSceFont.sprx` (SHA-256 `3c67846f50ed3bf844efdc274f83c7f0043581b607154f3946499b72a3bfa086`): bodies `0x1f940` (image), `0x20f50` (pattern), `0x20cb0` (flat), gradient producers `0x1fc10`/`0x20080`, allocator `0x1bcc0`, pool init `0x1bc40` (sole `scan` write, `=nodes`), texture callers in PPSA20397 `libSceFontGsm.prx`; not console-measured. + - Disassembled: magic `0xf53`, errors `0x80460084`/`0x804600a9`/`0x80460002`/`0x80460001`/`0x8046005c`/`0x804600a2`, error paths storing at frame `+4` and invoking the registered callback (sealed included), pool/bitmap/queue mechanics, record layouts and tables, `mode` as `memcpy` size, `dimension-1` bytes, `option1` flags `{0x1000, 0x3000, 0x4000, 0x6000, 0x2000}` (jump table `0x37fcc`), allocator marking slots `start..start+count` but returning `memory + completingNodeIndex*slotSize`, the fills' packed-color and float fields. + - Inferred: field names, the fill signatures (no dump calls them; callee prologues only), the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). 13.42 report differences: internals, pool entries at `+0x20` (4.03: `+0x18`), error paths store at `+4` without invoking the callback. + - The mutex is released before record fill and enqueue, so it guards only the bitmap — frame counter and head/tail updates are unsynchronized, serialization is a caller contract. Not recovered: fields' downstream use, the seal's meaning. - [sceFontGraphicsAppendGradientSegment](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - ABI `(frame, gradient, position, color)` recovered from the 4.03 body at `0x20500`; still throws. It sorted-inserts a color stop into gradient record types `0x20`/`0x30` (`0x80460086` otherwise) through a separate per-object arena allocator (`0x1b5e0`) whose storage and growth are not fully decoded. - [sceFontDefineAttribute, sceFontGetAttribute](../../../core/libs/prx/libSceFont/src/Style.cpp), [sceFontGlyphDefineAttribute, sceFontGlyphGetAttribute](../../../core/libs/prx/libSceFont/src/Render.cpp) (libSceFont) - the signatures `(handle, int attribute, int* oldAttribute)` and `(handle, int attribute, int* nowAttribute)`, and the same shape for a glyph, follow the [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Font/SceFont.Engine.cs) bindings, matching the IDA type database of [Orbital](https://github.com/AlexAltea/orbital/blob/master/tools/ida/db_types.json) and [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1249-L1264), not confirmed on a title. Every handle keeps one attribute, an opaque int whose meaning and valid values are unknown: define stores the new value and returns the previous one, and get returns the stored value with its `attribute` argument unused, as in KytyPS5. An attribute never set is 0. A glyph keeps one bit instead: its define accepts only 0x10 and 0x11, returning `SCE_FONT_ERROR_INVALID_PARAMETER` for any other value, stores the value and returns the previous 0x10 or 0x11, which is 0x10 when never set; its get returns 0x10 or 0x11 and ignores its `attribute` argument. The null checks and the invalid-object errors follow the other libSceFont functions and diverge from [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51/src/libs/libFont.cpp#L1251-L1265), which returns `OK` for a null handle or glyph after writing 0 to the old-attribute pointer: every other handle and glyph entry point in this library reports the invalid object instead, and a title that passes one is already failing. shadPS4 leaves both exports unimplemented, so there is no second implementation to compare. PPSA01325 calls the glyph define with 0x11 on a glyph from `sceFontGenerateCharGlyph` that it deletes unused and draws with `sceFontRenderCharGlyphImageHorizontal`; the three bindings all read the third argument as an out pointer, not a value, so this call sets the glyph's attribute to 0x11. The attribute changes neither shaping nor rendering. From af51d245f95069542926b79760ca4600433d5a56 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Sat, 31 Oct 2026 23:32:08 +0530 Subject: [PATCH 23/23] docs(libSceFont): scope the 13.42 callback difference per body The 13.42 runs report error paths storing at frame +4 without the registered callback on the image/pattern bodies, while the fills' sealed paths still invoke it. Scope the recorded difference accordingly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- docs/dev/debt/libSceFont.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libSceFont.md b/docs/dev/debt/libSceFont.md index ffa713601a..f319957b97 100644 --- a/docs/dev/debt/libSceFont.md +++ b/docs/dev/debt/libSceFont.md @@ -34,7 +34,7 @@ The 40 additional exports below have unknown signatures and behavior. Their para - [sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject, sceFontGraphicsDrawupFillFlatColor, sceFontGraphicsDrawupFillLinearGradient, sceFontGraphicsDrawupFillRadialGradient](../../../core/libs/prx/libSceFont/src/Graphics.cpp) (libSceFont) - disassembled from PS5 4.03 `libSceFont.sprx` (SHA-256 `3c67846f50ed3bf844efdc274f83c7f0043581b607154f3946499b72a3bfa086`): bodies `0x1f940` (image), `0x20f50` (pattern), `0x20cb0` (flat), gradient producers `0x1fc10`/`0x20080`, allocator `0x1bcc0`, pool init `0x1bc40` (sole `scan` write, `=nodes`), texture callers in PPSA20397 `libSceFontGsm.prx`; not console-measured. - Disassembled: magic `0xf53`, errors `0x80460084`/`0x804600a9`/`0x80460002`/`0x80460001`/`0x8046005c`/`0x804600a2`, error paths storing at frame `+4` and invoking the registered callback (sealed included), pool/bitmap/queue mechanics, record layouts and tables, `mode` as `memcpy` size, `dimension-1` bytes, `option1` flags `{0x1000, 0x3000, 0x4000, 0x6000, 0x2000}` (jump table `0x37fcc`), allocator marking slots `start..start+count` but returning `memory + completingNodeIndex*slotSize`, the fills' packed-color and float fields. - - Inferred: field names, the fill signatures (no dump calls them; callee prologues only), the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). 13.42 report differences: internals, pool entries at `+0x20` (4.03: `+0x18`), error paths store at `+4` without invoking the callback. + - Inferred: field names, the fill signatures (no dump calls them; callee prologues only), the `scan` head-at-index-0 invariant (non-base is unreachable; the host bounds-checks it). 13.42 report differences: internals, pool entries at `+0x20` (4.03: `+0x18`), error paths store at `+4` without invoking the callback on the image/pattern bodies; the fills' sealed paths invoke it. - The mutex is released before record fill and enqueue, so it guards only the bitmap — frame counter and head/tail updates are unsynchronized, serialization is a caller contract. Not recovered: fields' downstream use, the seal's meaning. - [sceFontGraphicsAppendGradientSegment](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp) - ABI `(frame, gradient, position, color)` recovered from the 4.03 body at `0x20500`; still throws. It sorted-inserts a color stop into gradient record types `0x20`/`0x30` (`0x80460086` otherwise) through a separate per-object arena allocator (`0x1b5e0`) whose storage and growth are not fully decoded.