mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-01 12:45:56 +00:00
Follows firmware 13.42's libSceSocialScreen.sprx, read from its disassembly and run natively on x86-64: a null pointer returns 0x81440003; otherwise the block gets 1 at offset 0 and zeros in bytes 4 to 31, and it returns 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
25 lines
789 B
C++
25 lines
789 B
C++
#include "prx/libSceSocialScreen/include/Api.hpp"
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
|
|
namespace {
|
|
|
|
void Require(bool value) { if (!value) std::abort(); }
|
|
|
|
constexpr int kErrInvalidArg = static_cast<int>(0x81440003);
|
|
|
|
}
|
|
|
|
int main() {
|
|
Require(sceSocialScreenInitializeSeparateModeParameter(nullptr) == kErrInvalidArg);
|
|
std::array<std::uint8_t, 0x40> parameter{};
|
|
parameter.fill(0xaa);
|
|
Require(sceSocialScreenInitializeSeparateModeParameter(parameter.data()) == 0);
|
|
Require(parameter[0] == 1 && parameter[1] == 0 && parameter[2] == 0 && parameter[3] == 0);
|
|
for (std::size_t i = 4; i < 0x20; ++i) Require(parameter[i] == 0);
|
|
for (std::size_t i = 0x20; i < parameter.size(); ++i) Require(parameter[i] == 0xaa);
|
|
return 0;
|
|
}
|