devkit ram support

This commit is contained in:
Mateico
2026-05-08 15:26:27 +02:00
parent dcb60beef2
commit 7a58386b98
7 changed files with 80 additions and 20 deletions

View File

@@ -6,6 +6,7 @@
#include <sys/param.h>
#include <sys/proc.h>
#include <unistd.h>
#include <sys/stat.h>
/* Global Variables */
offset_list env_offset;
@@ -247,4 +248,32 @@ void enter_rest_mode(void) {
sceKernelNotifySystemSuspendStart();
sceKernelSetEventFlag(event, 0x400);
sceKernelCloseEventFlag(&event);
}
// Kit type by EchoStretch
bool if_exists(const char* path) {
struct stat st;
return stat(path, &st) == 0;
}
bool sceKernelIsTestKit(void) {
return if_exists("/system/priv/lib/libSceDeci5Ttyp.sprx");
}
bool sceKernelIsDevKit(void) {
return if_exists("/system/priv/lib/libSceDeci5Dtracep.sprx");
}
enum kit_type get_kit_type(void) {
if (sceKernelIsDevKit()) {
notify("DevKit detected\n");
return KIT_DEVKIT;
}
if (sceKernelIsTestKit()) {
notify("TestKit detected\n");
return KIT_TESTKIT;
}
notify("Retail console detected\n");
return KIT_RETAIL;
}