mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
AstroBot's import log (issue #4720) names sceRegMgrNonSysGetInt as the only libSceRegMgr export it needs; no other RegMgr export appears in its 1909 unique imports. The signature and NID are sourced from a community dump of PS5 3.20 firmware, cross-checked against the open-source ChonkyStation4 emulator, not from Sony documentation, so the export throws per the project's unknown-behavior convention instead of guessing a return value. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
846 B
C++
28 lines
846 B
C++
#include "prx/libc/include/general/VabiMacros.hpp"
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
extern "C" {
|
|
std::int32_t APS5_VABI sceRegMgrNonSysGetInt(std::int64_t key, std::int32_t unk, std::int32_t* data);
|
|
}
|
|
|
|
static void Require(bool value) { if (!value) std::abort(); }
|
|
|
|
template <typename TCall>
|
|
static bool ReportsNotImplemented(const char* name, TCall call) {
|
|
try {
|
|
call();
|
|
} catch (const std::runtime_error& error) {
|
|
return std::string(error.what()) == std::string(name) + " not implemented";
|
|
}
|
|
return false;
|
|
}
|
|
|
|
int main() {
|
|
std::int32_t value = 0;
|
|
Require(ReportsNotImplemented("sceRegMgrNonSysGetInt", [&] { sceRegMgrNonSysGetInt(0, 0, &value); }));
|
|
Require(ReportsNotImplemented("sceRegMgrNonSysGetInt", [&] { sceRegMgrNonSysGetInt(-1, 1, nullptr); }));
|
|
}
|