Files
AnyPS5/core/libs/tests/GuestNpTrophySystemDebug.cpp
T
zaryabzip 161792da24 feat(libSceNpTrophy): return 0x80551692 from the system debug calls as firmware 13.42 does
Firmware 13.42's sceNpTrophySystemDbgCtl, GetDbgParam, GetDbgParamInt,
SetDbgParam and SetDbgParamInt each return 0x80551692 and do nothing else.
2026-10-29 21:53:23 +05:00

30 lines
996 B
C++

#include "prx/libSceNpTrophy/include/Api.hpp"
#include <cstdio>
#include <cstdlib>
int main() {
constexpr int DebugResult = static_cast<int>(0x80551692u);
struct Call {
const char* name;
int (APS5_VABI* function)();
};
const Call calls[] = {
{"sceNpTrophySystemDbgCtl", sceNpTrophySystemDbgCtl},
{"sceNpTrophySystemGetDbgParam", sceNpTrophySystemGetDbgParam},
{"sceNpTrophySystemGetDbgParamInt", sceNpTrophySystemGetDbgParamInt},
{"sceNpTrophySystemSetDbgParam", sceNpTrophySystemSetDbgParam},
{"sceNpTrophySystemSetDbgParamInt", sceNpTrophySystemSetDbgParamInt},
};
for (const Call& call : calls) {
for (int attempt = 0; attempt < 2; ++attempt) {
if (call.function() != DebugResult) {
std::fprintf(stderr, "%s did not return 0x80551692\n", call.name);
return 1;
}
}
}
std::puts("NpTrophy system debug tests passed");
return 0;
}