Clean up and multi firmware support.
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
#include <orbis/SystemService.h>
|
||||
#include <orbis/UserService.h>
|
||||
#include <orbis/Sysmodule.h>
|
||||
#include <orbis/AppInstUtil.h>
|
||||
#include <orbis/SysCore.h>
|
||||
|
||||
#include "SocketListener.h"
|
||||
#include "Utilities.h"
|
||||
@@ -36,3 +38,6 @@
|
||||
#include "LncUtil.h"
|
||||
#include "ShellCoreUtil.h"
|
||||
#include "SystemMonitor.h"
|
||||
|
||||
//#define FIRMWARE_505
|
||||
#define FIRMWARE_900
|
||||
@@ -7,6 +7,22 @@ int(*LncUtil::_sceLncUtilLaunchApp)(const char* titleId, char* args, LaunchAppPa
|
||||
int(*LncUtil::_sceLncUtilSuspendApp)(int AppId, int Flag);
|
||||
int(*LncUtil::_sceLncUtilResumeApp)(int AppId, int Flag);
|
||||
|
||||
#ifdef FIRMWARE_505
|
||||
#define sceLncUtilInitializeOffset 0x4BF0
|
||||
#define sceLncUtilGetAppIdOffset 0x4E10
|
||||
#define sceLncUtilLaunchAppOffset 0x4C10
|
||||
#define sceLncUtilSuspendAppOffset 0x4F20
|
||||
#define sceLncUtilResumeAppOffset 0x4F40
|
||||
#endif
|
||||
|
||||
#ifdef FIRMWARE_900
|
||||
#define sceLncUtilInitializeOffset 0x5580
|
||||
#define sceLncUtilGetAppIdOffset 0x5770
|
||||
#define sceLncUtilLaunchAppOffset 0x55A0
|
||||
#define sceLncUtilSuspendAppOffset 0x5880
|
||||
#define sceLncUtilResumeAppOffset 0x58A0
|
||||
#endif
|
||||
|
||||
int LncUtil::Init()
|
||||
{
|
||||
// Load the prx or get its module handle.
|
||||
@@ -35,7 +51,7 @@ int LncUtil::Init()
|
||||
}
|
||||
|
||||
// Init the lnc util library.
|
||||
auto sceLncUtilInitialize = (int(*)())(LibraryBaseAddress + 0x4BF0);
|
||||
auto sceLncUtilInitialize = (int(*)())(LibraryBaseAddress + sceLncUtilInitializeOffset);
|
||||
if (sceLncUtilInitialize() != 0)
|
||||
{
|
||||
klog("Failed to call sceLncUtilInitialize().\n");
|
||||
@@ -43,17 +59,17 @@ int LncUtil::Init()
|
||||
}
|
||||
|
||||
// Set up Functions.
|
||||
_sceLncUtilGetAppId = (decltype(_sceLncUtilGetAppId))(LibraryBaseAddress + 0x4E10);
|
||||
_sceLncUtilLaunchApp = (decltype(_sceLncUtilLaunchApp))(LibraryBaseAddress + 0x4C10);
|
||||
_sceLncUtilSuspendApp = (decltype(_sceLncUtilSuspendApp))(LibraryBaseAddress + 0x4F20);
|
||||
_sceLncUtilResumeApp = (decltype(_sceLncUtilResumeApp))(LibraryBaseAddress + 0x4F40);
|
||||
_sceLncUtilGetAppId = (decltype(_sceLncUtilGetAppId))(LibraryBaseAddress + sceLncUtilGetAppIdOffset);
|
||||
_sceLncUtilLaunchApp = (decltype(_sceLncUtilLaunchApp))(LibraryBaseAddress + sceLncUtilLaunchAppOffset);
|
||||
_sceLncUtilSuspendApp = (decltype(_sceLncUtilSuspendApp))(LibraryBaseAddress + sceLncUtilSuspendAppOffset);
|
||||
_sceLncUtilResumeApp = (decltype(_sceLncUtilResumeApp))(LibraryBaseAddress + sceLncUtilResumeAppOffset);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LncUtil::sceLncUtilGetAppId(const char* TitleId)
|
||||
{
|
||||
if ((uint64_t)_sceLncUtilGetAppId > 0x4E10)
|
||||
if ((uint64_t)_sceLncUtilGetAppId > sceLncUtilGetAppIdOffset)
|
||||
{
|
||||
return _sceLncUtilGetAppId(TitleId);
|
||||
}
|
||||
@@ -66,7 +82,7 @@ int LncUtil::sceLncUtilGetAppId(const char* TitleId)
|
||||
|
||||
int LncUtil::sceLncUtilLaunchApp(const char* titleId, char* args, LaunchAppParam* appParam)
|
||||
{
|
||||
if ((uint64_t)_sceLncUtilLaunchApp > 0x4C10)
|
||||
if ((uint64_t)_sceLncUtilLaunchApp > sceLncUtilLaunchAppOffset)
|
||||
{
|
||||
return _sceLncUtilLaunchApp(titleId, args, appParam);
|
||||
}
|
||||
@@ -79,7 +95,7 @@ int LncUtil::sceLncUtilLaunchApp(const char* titleId, char* args, LaunchAppParam
|
||||
|
||||
int LncUtil::sceLncUtilSuspendApp(int AppId, int Flag)
|
||||
{
|
||||
if ((uint64_t)_sceLncUtilSuspendApp > 0x4F20)
|
||||
if ((uint64_t)_sceLncUtilSuspendApp > sceLncUtilSuspendAppOffset)
|
||||
{
|
||||
return _sceLncUtilSuspendApp(AppId, Flag);
|
||||
}
|
||||
@@ -92,7 +108,7 @@ int LncUtil::sceLncUtilSuspendApp(int AppId, int Flag)
|
||||
|
||||
int LncUtil::sceLncUtilResumeApp(int AppId, int Flag)
|
||||
{
|
||||
if ((uint64_t)_sceLncUtilResumeApp > 0x4F40)
|
||||
if ((uint64_t)_sceLncUtilResumeApp > sceLncUtilResumeAppOffset)
|
||||
{
|
||||
return _sceLncUtilResumeApp(AppId, Flag);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
uint64_t ShellCoreUtil::LibraryBaseAddress = 0;
|
||||
int(*ShellCoreUtil::_sceShellCoreUtilGetFreeSizeOfUserPartition)(uint64_t* free, uint64_t* total);
|
||||
|
||||
#ifdef FIRMWARE_505
|
||||
#define sceShellCoreUtilGetFreeSizeOfUserPartitionOffset 0x105A0
|
||||
#endif
|
||||
|
||||
#ifdef FIRMWARE_900
|
||||
#define sceShellCoreUtilGetFreeSizeOfUserPartitionOffset 0x10B40
|
||||
#endif
|
||||
|
||||
int ShellCoreUtil::Init()
|
||||
{
|
||||
// Load the prx or get its module handle.
|
||||
@@ -32,14 +40,14 @@ int ShellCoreUtil::Init()
|
||||
}
|
||||
|
||||
// Set up Functions.
|
||||
_sceShellCoreUtilGetFreeSizeOfUserPartition = (decltype(_sceShellCoreUtilGetFreeSizeOfUserPartition))(LibraryBaseAddress + 0x105A0);
|
||||
_sceShellCoreUtilGetFreeSizeOfUserPartition = (decltype(_sceShellCoreUtilGetFreeSizeOfUserPartition))(LibraryBaseAddress + sceShellCoreUtilGetFreeSizeOfUserPartitionOffset);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ShellCoreUtil::sceShellCoreUtilGetFreeSizeOfUserPartition(uint64_t* free, uint64_t* total)
|
||||
{
|
||||
if ((uint64_t)_sceShellCoreUtilGetFreeSizeOfUserPartition > 0x105A0)
|
||||
if ((uint64_t)_sceShellCoreUtilGetFreeSizeOfUserPartition > sceShellCoreUtilGetFreeSizeOfUserPartitionOffset)
|
||||
{
|
||||
return _sceShellCoreUtilGetFreeSizeOfUserPartition(free, total);
|
||||
}
|
||||
|
||||
@@ -157,11 +157,11 @@ void* SystemMonitor::MonitorThread(void* args)
|
||||
sceKernelGetSocSensorTemperature(0, &SOC_Temp);
|
||||
|
||||
// Ram Usage.
|
||||
Get_Page_Table_Stats(1, 1, &RAM.Used, &RAM.Free, &RAM.Total);
|
||||
Get_Page_Table_Stats(-1, 1, &RAM.Used, &RAM.Free, &RAM.Total);
|
||||
RAM.Percentage = (((float)RAM.Used / (float)RAM.Total) * 100.0f);
|
||||
|
||||
// Video Ram Usage.
|
||||
Get_Page_Table_Stats(1, 2, &VRAM.Used, &VRAM.Free, &VRAM.Total);
|
||||
Get_Page_Table_Stats(-1, 2, &VRAM.Used, &VRAM.Free, &VRAM.Total);
|
||||
VRAM.Percentage = (((float)VRAM.Used / (float)VRAM.Total) * 100.0f);
|
||||
|
||||
sceKernelSleep(2);
|
||||
@@ -180,6 +180,7 @@ void SystemMonitor::Init()
|
||||
|
||||
OrbisPthread* id;
|
||||
scePthreadCreate(&id, nullptr, MonitorThread, NULL, "System Monitor Thread");
|
||||
scePthreadDetach(*id);
|
||||
}
|
||||
|
||||
void SystemMonitor::Term()
|
||||
|
||||
@@ -1,63 +1,119 @@
|
||||
#include "Common.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
#pragma region Modules
|
||||
|
||||
void(*_sceSysmoduleLoadModuleInternal)(uint32_t); //Import is broken for some reason
|
||||
int(*sceAppInstUtilInitialize)();
|
||||
int(*sceAppInstUtilAppUnInstall)(const char* TitleId);
|
||||
#pragma region Misc
|
||||
|
||||
bool LoadModules()
|
||||
{
|
||||
//Load the sysmodule library and import for sceSysmoduleLoadModuleInternal for some reason wouldnt auto import.
|
||||
int ModuleHandle = sceKernelLoadStartModule("/system/common/lib/libSceSysmodule.sprx", 0, nullptr, 0, nullptr, nullptr);
|
||||
if (ModuleHandle < 0) {
|
||||
klog("Failed to load libSceSysmodule Library.\n");
|
||||
auto res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_SYSTEM_SERVICE);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_SYSTEM_SERVICE (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
sceKernelDlsym(ModuleHandle, "sceSysmoduleLoadModuleInternal", (void**)&_sceSysmoduleLoadModuleInternal);
|
||||
if (_sceSysmoduleLoadModuleInternal == nullptr) {
|
||||
klog("Failed to load _sceSysmoduleLoadModuleInternal Import.\n");
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_APPINSTUTIL);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_APPINSTUTIL (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_SYSTEM_SERVICE);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_APPINSTUTIL);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_USER_SERVICE);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_SYS_CORE);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_PAD);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NETCTL);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NET);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_HTTP);
|
||||
_sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_BGFT);
|
||||
_sceSysmoduleLoadModuleInternal(0xA4);
|
||||
|
||||
int libSceAppInstUtil = sceKernelLoadStartModule("/system/common/lib/libSceAppInstUtil.sprx", 0, nullptr, 0, nullptr, nullptr);
|
||||
if (libSceAppInstUtil < 0) {
|
||||
klog("Failed to load libSceAppInstUtil Library.\n");
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_USER_SERVICE);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_USER_SERVICE (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
sceKernelDlsym(libSceAppInstUtil, "sceAppInstUtilInitialize", (void**)&sceAppInstUtilInitialize);
|
||||
if (sceAppInstUtilInitialize == nullptr) {
|
||||
klog("Failed to load sceAppInstUtilInitialize Import.\n");
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_SYS_CORE);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_SYS_CORE (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
sceKernelDlsym(libSceAppInstUtil, "sceAppInstUtilAppUnInstall", (void**)&sceAppInstUtilAppUnInstall);
|
||||
if (sceAppInstUtilAppUnInstall == nullptr) {
|
||||
klog("Failed to load sceAppInstUtilAppUnInstall Import.\n");
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NETCTL);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_NETCTL (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NET);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_NET (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_HTTP);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_HTTP (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_BGFT);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_BGFT (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start up networking interface
|
||||
res = sceNetInit();
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): sceNetInit failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start up user service.
|
||||
res = sceUserServiceInitialize(nullptr);
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): sceUserServiceInitialize failed (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Init temporary wrapper for lncutils.
|
||||
res = LncUtil::Init();
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): LncUtil::Init failed (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Init temporary wrapper for shellcoreutils.
|
||||
res = ShellCoreUtil::Init();
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): ShellCoreUtil::Init failed (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Init SysCoreUtils.
|
||||
res = sceApplicationInitialize();
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): sceApplicationInitialize failed (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Init App install utils.
|
||||
res = sceAppInstUtilInitialize();
|
||||
if (res != 0)
|
||||
{
|
||||
klog("LoadModules(): sceAppInstUtilInitialize failed (%llX)\n", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
klog("LoadModules(): Success!\n");
|
||||
return true;
|
||||
//res = sceSysmoduleLoadModuleInternal(0xA4);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Misc
|
||||
|
||||
void Notify(const char* MessageFMT, ...)
|
||||
{
|
||||
OrbisNotificationRequest Buffer;
|
||||
@@ -119,7 +175,7 @@ void klog(const char* fmt, ...)
|
||||
|
||||
bool Jailbreak()
|
||||
{
|
||||
jbc_cred cred;
|
||||
struct jbc_cred cred;
|
||||
if (jbc_get_cred(&cred) != 0)
|
||||
{
|
||||
klog("jbc failed to get cred.\n");
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
// Modules.
|
||||
extern void(*_sceSysmoduleLoadModuleInternal)(uint32_t); //Import is broken for some reason
|
||||
extern int(*sceAppInstUtilInitialize)();
|
||||
extern int(*sceAppInstUtilAppUnInstall)(const char* TitleId);
|
||||
|
||||
bool LoadModules();
|
||||
|
||||
// Misc
|
||||
bool LoadModules();
|
||||
void Notify(const char* MessageFMT, ...);
|
||||
void Notify_Custom(const char* IconURI, const char* MessageFMT, ...);
|
||||
void klog(const char* fmt, ...);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
#define ORBISLIB_MAJOR 3
|
||||
#define ORBISLIB_MINOR 0
|
||||
#define ORBISLIB_BUILDVERSION 717
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(_DEBUG)
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
#pragma once
|
||||
#define ORBISLIB_MAJOR 3
|
||||
#define ORBISLIB_MINOR 0
|
||||
#define ORBISLIB_BUILDVERSION 871
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(_DEBUG)
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
Rem Libraries to link in
|
||||
set libraries=-lc++ -lc -lSceSysModule -lkernel -lSceVideoOut -lSceSystemService -lSceSysCore -lSceSystemStateMgr -lSceNet -lScePad -lSceUserService -lSceRegMgr -lSceFreeType -lSceMsgDialog -lSceCommonDialog -lGoldHEN_Hook -lSQLite -lSceAppInstUtil
|
||||
set libraries=-lc++ -lc -lSceSysmodule -lkernel -lSceVideoOut -lSceSystemService -lSceSysCore -lSceSystemStateMgr -lSceNet -lScePad -lSceUserService -lSceRegMgr -lSceFreeType -lSceMsgDialog -lSceCommonDialog -lGoldHEN_Hook -lSQLite -lSceAppInstUtil
|
||||
|
||||
Rem Read the script arguments into local vars
|
||||
set intdir=%1
|
||||
@@ -24,14 +24,14 @@ Rem Link the input ELF
|
||||
ld.lld -m elf_x86_64 -pie --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\\lib" "-L..\\..\\External\\GoldHEN_Plugins_SDK" "-L..\\..\\External\\LibSQLite-ps4" %libraries% --verbose "%OO_PS4_TOOLCHAIN%\lib\crt1.o" %obj_files% "..\\..\\External\\ps4-libjbc\\jbc.o"
|
||||
|
||||
Rem Create the eboot
|
||||
%OO_PS4_TOOLCHAIN%\bin\windows\create-fself.exe -in "%outputElf%" --out "%outputOelf%" --eboot "eboot.bin" --paid 0x3800000000010003
|
||||
%OO_PS4_TOOLCHAIN%\bin\windows\create-fself.exe -in "%outputElf%" --out "%outputOelf%" --eboot "eboot.bin" --paid 0x3800000000000010 --authinfo 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
Rem Cleanup
|
||||
copy "eboot.bin" %outputPath%\Playstation\Build\pkg\Daemons\ORBS30000\eboot.bin
|
||||
del "eboot.bin"
|
||||
|
||||
REM Generate the script. Will overwrite any existing temp.txt
|
||||
echo open 1.1.0.13 2121> temp.txt
|
||||
echo open 1.1.0.79 2121> temp.txt
|
||||
echo anonymous>> temp.txt
|
||||
echo anonymous>> temp.txt
|
||||
echo cd "/system/vsh/app/ORBS30000/">> temp.txt
|
||||
|
||||
@@ -2,11 +2,25 @@
|
||||
#include "Version.h"
|
||||
#include "API.h"
|
||||
#include "GoldHEN.h"
|
||||
#include <orbis/SysCore.h>
|
||||
|
||||
#include "AppDatabase.h"
|
||||
|
||||
#include "GeneralIPC.h"
|
||||
|
||||
void exiting()
|
||||
{
|
||||
klog("Good bye friends! :)\n");
|
||||
|
||||
// Terminate System Monitor
|
||||
SystemMonitor::Term();
|
||||
|
||||
// Terminate API
|
||||
API::Term();
|
||||
|
||||
// Terminate Thread Pool
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// Jailbreak our current process.
|
||||
@@ -25,80 +39,20 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Start up networking interface
|
||||
if (sceNetInit() != 0)
|
||||
{
|
||||
Notify("Failed to init Networking...");
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Start up user service.
|
||||
if (sceUserServiceInitialize(nullptr) != 0)
|
||||
{
|
||||
Notify("Failed to init User Service...");
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Init temporary wrapper for lncutils.
|
||||
if (LncUtil::Init() != 0)
|
||||
{
|
||||
Notify("Failed to init LncUtil...");
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Init temporary wrapper for shellcoreutils.
|
||||
if (ShellCoreUtil::Init() != 0)
|
||||
{
|
||||
Notify("Failed to init ShellCoreUtil...");
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: Bug? This doesnt seem to work for some reason.
|
||||
// Check GoldHEN SDK Version make sure we can run!
|
||||
auto sdkVersion = sys_sdk_version();
|
||||
if (sdkVersion < GOLDHEN_SDK_VERSION)
|
||||
{
|
||||
Notify("Invalid GoldHEN SDK Version %d Orbis Toolbox supports %d+", sdkVersion, GOLDHEN_SDK_VERSION);
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Copy back up of sflash so we can read it and not break things :)
|
||||
CopySflash();
|
||||
|
||||
// Set the Name of this process so it shows up as something other than eboot.bin.
|
||||
sceKernelSetProcessName("OrbisLibAPI");
|
||||
|
||||
// Log the loaded version string.
|
||||
klog("\n%s\n\n", ORBISLIB_BUILDSTRING);
|
||||
|
||||
// Init a thread to monitor the system usage stats.
|
||||
// SystemMonitor::Init();
|
||||
|
||||
// Init SysCoreUtils.
|
||||
sceApplicationInitialize();
|
||||
|
||||
// Init App install utils.
|
||||
sceAppInstUtilInitialize();
|
||||
|
||||
// #define LOADTOOLBOX
|
||||
#ifdef LOADTOOLBOX
|
||||
auto handle = sys_sdk_proc_prx_load("SceShellUI", "/user/data/Orbis Toolbox/OrbisToolbox-2.0.sprx");
|
||||
if (handle > 0) {
|
||||
klog("Orbis Toolbox loaded! %d\n", handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
klog("error: %d\n", handle);
|
||||
Notify("Failed to load Orbis Toolbox!");
|
||||
}
|
||||
#endif
|
||||
//SystemMonitor::Init();
|
||||
|
||||
// start up the API. NOTE: this is blocking.
|
||||
API::Init();
|
||||
//API::Init();
|
||||
|
||||
sceSystemServiceLoadExec("exit", 0);
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ void ListenerClientThread(void* tdParam, OrbisNetId Sock)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void* InitThread(void* args)
|
||||
{
|
||||
klog("!! Hello World !!\n");
|
||||
@@ -70,6 +71,7 @@ extern "C"
|
||||
{
|
||||
OrbisPthread* hThread;
|
||||
scePthreadCreate(&hThread, nullptr, InitThread, nullptr, "Init");
|
||||
scePthreadJoin(*hThread, nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
#define ORBIS_TOOLBOX_MAJOR 2
|
||||
#define ORBIS_TOOLBOX_MINOR 0
|
||||
#define ORBIS_TOOLBOX_BUILDVERSION 291
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(ORBIS_TOOLBOX_DEBUG)
|
||||
#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
#pragma once
|
||||
#define ORBIS_TOOLBOX_MAJOR 2
|
||||
#define ORBIS_TOOLBOX_MINOR 0
|
||||
#define ORBIS_TOOLBOX_BUILDVERSION 324
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
#if defined(ORBIS_TOOLBOX_DEBUG)
|
||||
#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#else
|
||||
#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__)
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ copy "%outputPrx%" "%outputPath%\Playstation\Build\pkg\Orbis Toolbox\%targetname
|
||||
del "%outputPrx%"
|
||||
|
||||
REM Generate the script. Will overwrite any existing temp.txt
|
||||
echo open 1.1.0.13 2121> temp.txt
|
||||
echo open 1.1.0.79 2121> temp.txt
|
||||
echo anonymous>> temp.txt
|
||||
echo anonymous>> temp.txt
|
||||
echo cd "/data/Orbis Toolbox/">> temp.txt
|
||||
|
||||
@@ -1 +1 @@
|
||||
2183
|
||||
2199
|
||||
|
||||
@@ -1 +1 @@
|
||||
Version 3.0.2183 Debug Build Friday December 30 2022 12:59 AM
|
||||
Version 3.0.2199 Debug Build Friday December 30 2022 11:55 PM
|
||||
|
||||
Reference in New Issue
Block a user