Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
f6b6d79
fix(libkernel): return 0x80020000 | fflags from sceKernelGetEventErro…
frankea Oct 19, 2026
ca44747
fix(libScePad): report the DualSense touch pad and stick dead zones a…
frankea Oct 19, 2026
675c937
fix(libSceSystemService): refuse unknown sceSystemServiceParamGetInt …
frankea Oct 19, 2026
b95b9a4
docs(debt): record VideoOut, AGC driver and shader values measured on…
frankea Oct 19, 2026
fc46dd3
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 19, 2026
9a027c0
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 20, 2026
73bc20e
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 20, 2026
39e4679
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 20, 2026
23a8673
docs(libScePad): keep the touchpad entry under 1000 characters
frankea Oct 21, 2026
78926e2
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 21, 2026
62b29b6
docs(debt): say where the 13.40 values were measured without naming t…
frankea Oct 21, 2026
3205511
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 21, 2026
15ed39f
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 21, 2026
43e5ca6
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 21, 2026
41d551e
Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-…
frankea Oct 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/libs/prx/libScePad/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ int APS5_VABI scePadGetControllerInformation(int handle, PadControllerInformatio
info->touchPadInfo.pixelDensity = 44.86f;
info->touchPadInfo.resolution.x = kTouchPadWidth;
info->touchPadInfo.resolution.y = kTouchPadHeight;
info->stickInfo.deadZoneLeft = 2;
info->stickInfo.deadZoneRight = 2;
info->stickInfo.deadZoneLeft = 13;
info->stickInfo.deadZoneRight = 13;
info->connectionType = PAD_CONNECTION_TYPE_LOCAL;
info->connectedCount = 1;
info->connected = true;
Expand Down Expand Up @@ -231,8 +231,8 @@ int APS5_VABI scePadGetExtControllerInformation(int handle, void* info) {
base->touchPadInfo.pixelDensity = 44.86f;
base->touchPadInfo.resolution.x = kTouchPadWidth;
base->touchPadInfo.resolution.y = kTouchPadHeight;
base->stickInfo.deadZoneLeft = 2;
base->stickInfo.deadZoneRight = 2;
base->stickInfo.deadZoneLeft = 13;
base->stickInfo.deadZoneRight = 13;
base->connectionType = PAD_CONNECTION_TYPE_LOCAL;
base->connectedCount = 1;
base->connected = true;
Expand Down
5 changes: 2 additions & 3 deletions core/libs/prx/libSceSystemService/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,9 @@ int APS5_VABI sceSystemServiceParamGetInt(int paramId, int* value) {
case SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT: *value = SYSTEM_SERVICE_PARAM_TIME_FORMAT_24HOUR; break;
case SYSTEM_SERVICE_PARAM_ID_TIME_ZONE: *value = HostTimeZone().minutes; break;
case SYSTEM_SERVICE_PARAM_ID_SUMMERTIME: *value = HostTimeZone().summer ? 1 : 0; break;
case SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL: *value = SYSTEM_SERVICE_PARAM_GAME_PARENTAL_OFF; break;
case SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN: *value = SYSTEM_SERVICE_PARAM_ENTER_BUTTON_CROSS; break;
case SYSTEM_SERVICE_PARAM_ID_100: *value = 0; break;
default:
if ((paramId >= 100 && paramId <= 111) || (paramId >= 200 && paramId <= 213) || paramId == 300) {
if ((paramId >= 101 && paramId <= 111) || (paramId >= 200 && paramId <= 213) || paramId == 300) {
NotImplemented_nid_no_patch("sceSystemServiceParamGetInt: registry-backed parameter");
}
return SYSTEM_SERVICE_ERROR_PARAMETER;
Expand Down
3 changes: 1 addition & 2 deletions core/libs/prx/libSceSystemService/SystemService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ constexpr int SYSTEM_SERVICE_PARAM_ID_TIME_ZONE = 4;
constexpr int SYSTEM_SERVICE_PARAM_ID_SUMMERTIME = 5;
constexpr int SYSTEM_SERVICE_PARAM_ID_SYSTEM_NAME = 6;
constexpr int SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL = 7;
constexpr int SYSTEM_SERVICE_PARAM_ID_100 = 100;
constexpr int SYSTEM_SERVICE_PARAM_ID_400 = 400;
constexpr int SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN = 1000;

Expand All @@ -34,8 +35,6 @@ constexpr int SYSTEM_SERVICE_PARAM_LANG_ARABIC = 21;
constexpr int SYSTEM_SERVICE_PARAM_LANG_UKRAINIAN = 30;
constexpr int SYSTEM_SERVICE_PARAM_DATE_FORMAT_DDMMYYYY = 1;
constexpr int SYSTEM_SERVICE_PARAM_TIME_FORMAT_24HOUR = 1;
constexpr int SYSTEM_SERVICE_PARAM_GAME_PARENTAL_OFF = 0;
constexpr int SYSTEM_SERVICE_PARAM_ENTER_BUTTON_CROSS = 1;

inline int SystemServiceConsoleLanguage(std::string_view caller) {
const char* configured = std::getenv("ANYPS5_LANGUAGE");
Expand Down
8 changes: 7 additions & 1 deletion core/libs/prx/libkernel/Equeue/src/EventAccessors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ intptr_t APS5_VABI sceKernelGetEventData(const KernelEvent* ev) {

int APS5_VABI sceKernelGetEventError(const KernelEvent* ev) {
const KernelEvent& event = requireEvent(ev, __func__);
return (event.flags & EV_ERROR) != 0 ? static_cast<int>(event.data) : 0;
if (event.fflags == 0) {
return 0;
}
if (event.fflags > 0xFFFFu) {
throw std::runtime_error(std::string(__func__) + ": fflags " + std::to_string(event.fflags) + " above 0xFFFF");
}
return static_cast<int>(0x80020000u | event.fflags);
}

intptr_t APS5_VABI sceKernelGetEventFflags(const KernelEvent* ev) {
Expand Down
34 changes: 31 additions & 3 deletions core/libs/tests/GuestEqueueEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ static constexpr int EVFILT_USER = -11;
static constexpr int EVFILT_HRTIMER = -15;
static constexpr int EVFILT_AMPR = -25;
static constexpr std::uint16_t EV_ERROR = 0x4000;
static constexpr std::uint16_t EV_EOF = 0x8000;

static void Require(bool value) { if (!value) std::abort(); }

Expand All @@ -49,6 +50,15 @@ static bool RejectsNull(TResult (APS5_VABI *accessor)(const KernelEvent*)) {
return false;
}

static bool RejectsWideFflags(const KernelEvent* ev) {
try {
sceKernelGetEventError(ev);
} catch (const std::runtime_error&) {
return true;
}
return false;
}

static void SleepAtLeast(std::chrono::steady_clock::duration duration) {
const auto start = std::chrono::steady_clock::now();
while (std::chrono::steady_clock::now() - start < duration) {
Expand Down Expand Up @@ -291,12 +301,30 @@ int main() {
Require(sceKernelGetEventFflags(&rawEvent) == static_cast<intptr_t>(0x80000001LL));
Require(sceKernelGetEventData(&rawEvent) == -5);
Require(sceKernelGetEventUserData(&rawEvent) == nullptr);
Require(RejectsWideFflags(&rawEvent));
rawEvent.fflags = 0;
rawEvent.flags = EV_ERROR;
rawEvent.data = 22;
Require(sceKernelGetEventError(&rawEvent) == 0);
rawEvent.flags = static_cast<std::uint16_t>(~EV_ERROR);
rawEvent.data = -1;
Require(sceKernelGetEventError(&rawEvent) == 0);
rawEvent.flags = EV_ERROR;
rawEvent.data = 0x80020016;
Require(sceKernelGetEventError(&rawEvent) == 0);
rawEvent.fflags = 5;
rawEvent.data = 0;
Require(sceKernelGetEventError(&rawEvent) == static_cast<int>(0x80020005));
rawEvent.data = 22;
Require(sceKernelGetEventError(&rawEvent) == 22);
Require(sceKernelGetEventError(&rawEvent) == static_cast<int>(0x80020005));
rawEvent.flags = 0;
rawEvent.fflags = 7;
Require(sceKernelGetEventError(&rawEvent) == static_cast<int>(0x80020007));
rawEvent.flags = EV_EOF;
rawEvent.fflags = 3;
rawEvent.data = 9;
Require(sceKernelGetEventError(&rawEvent) == static_cast<int>(0x80020003));
rawEvent.flags = static_cast<std::uint16_t>(~EV_ERROR);
rawEvent.fflags = 0xFFFF;
Require(sceKernelGetEventError(&rawEvent) == static_cast<int>(0x8002FFFF));

Require(RejectsNull(sceKernelGetEventData));
Require(RejectsNull(sceKernelGetEventError));
Expand Down
12 changes: 12 additions & 0 deletions core/libs/tests/GuestPad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ static void CheckAngularVelocityDeadband(int handle) {
PadPublishInput_nid_postfix(PadInputState{});
}

static void CheckStickDeadZones(int handle) {
PadControllerInformation info{};
Require(scePadGetControllerInformation(handle, &info) == PAD_OK);
Require(info.stickInfo.deadZoneLeft == 13 && info.stickInfo.deadZoneRight == 13);
std::array<std::uint8_t, 0x2c> extended{};
Require(scePadGetExtControllerInformation(handle, extended.data()) == PAD_OK);
PadControllerInformation base{};
std::memcpy(&base, extended.data(), sizeof(base));
Require(base.stickInfo.deadZoneLeft == 13 && base.stickInfo.deadZoneRight == 13);
}

static void CheckTouchContact() {
PadInputState touch;
touch.buttons = static_cast<std::uint32_t>(Pad::PadButton::TouchPad);
Expand Down Expand Up @@ -442,6 +453,7 @@ int main() {
CheckTouchContact();
CheckVirtualTouchContact();
CheckTouchPadInformation(handle);
CheckStickDeadZones(handle);
CheckPartialTrigger();
CheckReadQueue(handle);
CheckTapBetweenReads();
Expand Down
17 changes: 12 additions & 5 deletions core/libs/tests/GuestSystemServiceLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ bool Rejected(const char* value) {
int main() {
for (int paramId = -1; paramId <= 1001; ++paramId) {
Require(sceSystemServiceParamGetInt(paramId, nullptr) == SYSTEM_SERVICE_ERROR_PARAMETER);
if ((paramId >= 1 && paramId <= 5) || paramId == 7 || paramId == 400 || paramId == 1000) continue;
if ((paramId >= 1 && paramId <= 5) || paramId == SYSTEM_SERVICE_PARAM_ID_100 || paramId == 400) continue;
int value = -12345;
if ((paramId >= 100 && paramId <= 111) || (paramId >= 200 && paramId <= 213) || paramId == 300) {
if ((paramId >= 101 && paramId <= 111) || (paramId >= 200 && paramId <= 213) || paramId == 300) {
bool threw = false;
try {
static_cast<void>(sceSystemServiceParamGetInt(paramId, &value));
Expand Down Expand Up @@ -85,7 +85,14 @@ int main() {
SetLanguage("arabic");
Require(sceSystemServiceParamGetInt(SYSTEM_SERVICE_PARAM_ID_LANG, nullptr) == SYSTEM_SERVICE_ERROR_PARAMETER);
Require(sceSystemServiceParamGetInt(SYSTEM_SERVICE_PARAM_ID_400, nullptr) == SYSTEM_SERVICE_ERROR_PARAMETER);
int enterButton = -1;
Require(sceSystemServiceParamGetInt(SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN, &enterButton) == SYSTEM_SERVICE_OK);
Require(enterButton == SYSTEM_SERVICE_PARAM_ENTER_BUTTON_CROSS);
for (int paramId : {0, SYSTEM_SERVICE_PARAM_ID_SYSTEM_NAME, SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL, 8, 20, 401, 999,
SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN, 1001, 1008}) {
int unknown = -1;
Require(sceSystemServiceParamGetInt(paramId, &unknown) == SYSTEM_SERVICE_ERROR_PARAMETER);
Require(unknown == -1);
Require(sceSystemServiceParamGetInt(paramId, nullptr) == SYSTEM_SERVICE_ERROR_PARAMETER);
}
int param100 = -1;
Require(sceSystemServiceParamGetInt(SYSTEM_SERVICE_PARAM_ID_100, &param100) == SYSTEM_SERVICE_OK);
Require(param100 == 0);
}
Loading
Loading