diff --git a/common/include/ark.h b/common/include/ark.h index 7a36e76b..6c6120e5 100644 --- a/common/include/ark.h +++ b/common/include/ark.h @@ -20,6 +20,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + // Generic Offsets #define USER_BASE 0x08800000 #define KERNEL_BASE 0x88000000 @@ -105,23 +109,6 @@ typedef enum{ DEV_MASK = 0b1100, }ExecMode; -// Different PSP models -enum { - PSP_1000 = 0, // 01g - PSP_2000 = 1, // 02g - PSP_3000 = 2, // 03g - PSP_4000 = 3, // 04g - PSP_GO = 4, // 05g - PSP_7000 = 6, // 07g - PSP_9000 = 8, // 09g - PSP_11000 = 10, // 11g -}; - -// Different firmware versions -#define FW_661 0x06060110 -#define FW_660 0x06060010 -#define FW_150 0x01050003 - // These settings should be global and constant during the entire execution of ARK. // It should not be possible to change these (except for recovery flag). typedef struct ARKConfig{ @@ -151,5 +138,12 @@ typedef struct ARKConfig{ #define IS_VITA_ADR(ark_config) (ark_config->exec_mode==PSV_ADR) #define IS_VITA_POPS(ark_config) (ark_config->exec_mode==PSV_POPS) +// Get ARK's execution environment configuration +void* sctrlHENGetArkConfig(ARKConfig* conf); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/common/include/functions.h b/common/include/functions.h index 2ca11bba..0f48afee 100644 --- a/common/include/functions.h +++ b/common/include/functions.h @@ -21,7 +21,7 @@ #include #include #include "module2.h" -#include "ark.h" +#include struct minZipHeader { char pk[2]; diff --git a/common/include/rebootconfig.h b/common/include/rebootconfig.h index b40c7cb9..a9583512 100644 --- a/common/include/rebootconfig.h +++ b/common/include/rebootconfig.h @@ -23,7 +23,7 @@ #include #include #include "ansi_c_functions.h" -#include "ark.h" +#include #define REBOOTEX_MAX_SIZE 0x5000 #define BTCNF_MAGIC 0x0F803001 diff --git a/common/include/systemctrl.h b/common/include/systemctrl.h index 68271152..bc482131 100644 --- a/common/include/systemctrl.h +++ b/common/include/systemctrl.h @@ -27,13 +27,29 @@ extern "C"{ #include #include #include -#include #include #include -#include "module2.h" +#include #define GAME_ID_MINIMUM_BUFFER_SIZE 10 +// Different PSP models +enum { + PSP_1000 = 0, // 01g + PSP_2000 = 1, // 02g + PSP_3000 = 2, // 03g + PSP_4000 = 3, // 04g + PSP_GO = 4, // 05g + PSP_7000 = 6, // 07g + PSP_9000 = 8, // 09g + PSP_11000 = 10, // 11g +}; + +// Different firmware versions +#define FW_661 0x06060110 +#define FW_660 0x06060010 +#define FW_150 0x01050003 + enum BootLoadFlags { BOOTLOAD_VSH = 1, @@ -108,9 +124,6 @@ void flushCache(void); // Missing PSPSDK Functions u32 sceKernelQuerySystemCall(void * function); -// Get ARK's execution environment configuration -void* sctrlHENGetArkConfig(ARKConfig* conf); - // Register the default VRAM handler for PSX exploit, returns the previous handler void* sctrlHENSetPSXVramHandler(void (*handler)(u32* psp_vram, u16* ps1_vram)); diff --git a/common/include/systemctrl_private.h b/common/include/systemctrl_private.h index c00c0e78..e8cb88c1 100644 --- a/common/include/systemctrl_private.h +++ b/common/include/systemctrl_private.h @@ -23,7 +23,7 @@ extern "C"{ #endif #include "module2.h" -#include "ark.h" +#include /* * This File contains the required headers for exported, but internally used diff --git a/core/compat/pentazemin/vitamem.c b/core/compat/pentazemin/vitamem.c index dc33d23b..5294c50a 100644 --- a/core/compat/pentazemin/vitamem.c +++ b/core/compat/pentazemin/vitamem.c @@ -6,7 +6,7 @@ #include #include #include -#include "ark.h" +#include #include #include "sysmem.h" diff --git a/core/compat/psp/high_mem.c b/core/compat/psp/high_mem.c index 7752a25b..1ddfa777 100644 --- a/core/compat/psp/high_mem.c +++ b/core/compat/psp/high_mem.c @@ -23,7 +23,7 @@ #include #include #include -#include "ark.h" +#include #include #include "sysmem.h" diff --git a/core/compat/psp/libertas.c b/core/compat/psp/libertas.c index cd091493..36d8d6e7 100644 --- a/core/compat/psp/libertas.c +++ b/core/compat/psp/libertas.c @@ -18,8 +18,9 @@ #include #include #include "libertas.h" -#include "ark.h" +#include #include "macros.h" +#include #include "systemctrl_se.h" extern int psp_model; diff --git a/core/compat/psp/rebootex/patches.c b/core/compat/psp/rebootex/patches.c index e49bbbb9..0cdfda00 100644 --- a/core/compat/psp/rebootex/patches.c +++ b/core/compat/psp/rebootex/patches.c @@ -1,3 +1,4 @@ +#include "systemctrl.h" #include "rebootex.h" #include "pspbtcnf.h" diff --git a/core/compat/psp/region_free.c b/core/compat/psp/region_free.c index 6c9b0a4a..325a1391 100644 --- a/core/compat/psp/region_free.c +++ b/core/compat/psp/region_free.c @@ -21,10 +21,11 @@ #include #include #include +#include #include #include #include -#include "ark.h" +#include #include "macros.h" #include "module2.h" #include "region_free.h" diff --git a/core/compat/vita/gameinfo.c b/core/compat/vita/gameinfo.c index c7ec0a89..38135930 100644 --- a/core/compat/vita/gameinfo.c +++ b/core/compat/vita/gameinfo.c @@ -5,7 +5,7 @@ #include #include -#include "ark.h" +#include #include "macros.h" #include "module2.h" diff --git a/core/inferno/iodrv_funcs.c b/core/inferno/iodrv_funcs.c index bd66eb61..6bb0674f 100644 --- a/core/inferno/iodrv_funcs.c +++ b/core/inferno/iodrv_funcs.c @@ -28,7 +28,7 @@ #include #include "systemctrl_private.h" #include "inferno.h" -#include "ark.h" +#include #include "macros.h" /* diff --git a/core/inferno/isocache.c b/core/inferno/isocache.c index 9cb30143..bbecea43 100644 --- a/core/inferno/isocache.c +++ b/core/inferno/isocache.c @@ -10,7 +10,7 @@ #include #include #include "systemctrl_private.h" -#include "ark.h" +#include #include "macros.h" static u32 read_call = 0; diff --git a/core/inferno/isoread.c b/core/inferno/isoread.c index 2fa3f8ad..8520698f 100644 --- a/core/inferno/isoread.c +++ b/core/inferno/isoread.c @@ -28,7 +28,7 @@ #include "systemctrl_private.h" #include "inferno.h" #include "lz4.h" -#include "ark.h" +#include #include "macros.h" #define CSO_MAGIC 0x4F534943 // CISO diff --git a/core/inferno/main.c b/core/inferno/main.c index b1686f11..55057571 100644 --- a/core/inferno/main.c +++ b/core/inferno/main.c @@ -28,7 +28,7 @@ #include #include "systemctrl_private.h" #include "inferno.h" -#include "ark.h" +#include #include "macros.h" PSP_MODULE_INFO("PRO_Inferno_Driver", 0x1000, 2, 1); diff --git a/core/inferno/umd.c b/core/inferno/umd.c index 098c011e..83646476 100644 --- a/core/inferno/umd.c +++ b/core/inferno/umd.c @@ -27,7 +27,7 @@ #include #include "systemctrl_private.h" #include "inferno.h" -#include "ark.h" +#include #include "macros.h" extern int sceKernelGetCompiledSdkVersion(void); diff --git a/core/stargate/chn_iso.c b/core/stargate/chn_iso.c index 2502d3e3..a9d20144 100644 --- a/core/stargate/chn_iso.c +++ b/core/stargate/chn_iso.c @@ -29,7 +29,7 @@ #include "systemctrl_private.h" #include "kubridge.h" #include "strsafe.h" -#include "ark.h" +#include #include "macros.h" typedef struct _pspMsPrivateDirent { diff --git a/core/systemctrl/src/gameinfo.c b/core/systemctrl/src/gameinfo.c index 8d77a4ac..d81b2587 100644 --- a/core/systemctrl/src/gameinfo.c +++ b/core/systemctrl/src/gameinfo.c @@ -5,7 +5,7 @@ #include #include -#include "ark.h" +#include #include "macros.h" #include "module2.h" diff --git a/core/systemctrl/src/leda.c b/core/systemctrl/src/leda.c index 8937c3aa..3fa18570 100644 --- a/core/systemctrl/src/leda.c +++ b/core/systemctrl/src/leda.c @@ -7,10 +7,11 @@ #include #include #include -#include "ark.h" -#include "macros.h" +#include +#include #include + int leda_running = 0; SceUID (* KernelLoadModuleMs2_hook)() = NULL; SceUID (* KernelLoadModuleMs2_orig)() = NULL; diff --git a/core/vshctrl/custom_update.c b/core/vshctrl/custom_update.c index d45c3bcc..e4e560ca 100644 --- a/core/vshctrl/custom_update.c +++ b/core/vshctrl/custom_update.c @@ -26,7 +26,7 @@ #include #include #include -#include "ark.h" +#include #include "macros.h" extern ARKConfig* ark_config; diff --git a/core/vshctrl/main.c b/core/vshctrl/main.c index 2c16d927..34e863b4 100644 --- a/core/vshctrl/main.c +++ b/core/vshctrl/main.c @@ -28,7 +28,7 @@ #include #include #include "macros.h" -#include "ark.h" +#include #include "functions.h" PSP_MODULE_INFO("VshCtrl", 0x1007, 1, 2); diff --git a/core/vshctrl/usbdevice.c b/core/vshctrl/usbdevice.c index eb4f1c32..72e91599 100644 --- a/core/vshctrl/usbdevice.c +++ b/core/vshctrl/usbdevice.c @@ -26,7 +26,7 @@ #include #include -#include "ark.h" +#include #include "macros.h" #include #include diff --git a/core/vshctrl/vshmenu.c b/core/vshctrl/vshmenu.c index dc0ae77f..6ab6f564 100644 --- a/core/vshctrl/vshmenu.c +++ b/core/vshctrl/vshmenu.c @@ -24,7 +24,7 @@ #include #include #include -#include "ark.h" +#include #include #include #include "systemctrl_private.h" diff --git a/core/vshctrl/vshpatch.c b/core/vshctrl/vshpatch.c index 93bc6053..e4ce9f48 100644 --- a/core/vshctrl/vshpatch.c +++ b/core/vshctrl/vshpatch.c @@ -33,7 +33,7 @@ #include "virtual_pbp.h" #include "macros.h" #include "strsafe.h" -#include "ark.h" +#include extern int _sceCtrlReadBufferPositive(SceCtrlData *ctrl, int count); extern void patch_sceUSB_Driver(void); diff --git a/extras/apps/installer/main.c b/extras/apps/installer/main.c index 02770c8c..63b7cd46 100644 --- a/extras/apps/installer/main.c +++ b/extras/apps/installer/main.c @@ -8,7 +8,7 @@ #include #include #include -#include "ark.h" +#include #include "macros.h" PSP_MODULE_INFO("ARKInstaller", 0x800, 1, 0); diff --git a/extras/apps/updater/main.c b/extras/apps/updater/main.c index 107a4559..dcb6c2af 100644 --- a/extras/apps/updater/main.c +++ b/extras/apps/updater/main.c @@ -10,7 +10,7 @@ #include #include #include -#include "ark.h" +#include #include #include diff --git a/extras/menus/recovery/main.c b/extras/menus/recovery/main.c index 75b09751..3f4ebbb2 100644 --- a/extras/menus/recovery/main.c +++ b/extras/menus/recovery/main.c @@ -4,6 +4,7 @@ #include #include #include +#include #include diff --git a/extras/menus/recovery/submenu.c b/extras/menus/recovery/submenu.c index 981d056e..dea561a2 100644 --- a/extras/menus/recovery/submenu.c +++ b/extras/menus/recovery/submenu.c @@ -9,7 +9,7 @@ #include #include -#include "ark.h" +#include extern ARKConfig* ark_config; extern CFWConfig config; diff --git a/extras/menus/recovery/usb.c b/extras/menus/recovery/usb.c index f6ac4f0b..cc8c9473 100644 --- a/extras/menus/recovery/usb.c +++ b/extras/menus/recovery/usb.c @@ -3,7 +3,7 @@ #include #include #include -#include "ark.h" +#include #define PSP_USBSTOR_EF_DRIVERNAME "USBStorEFlash_Driver" diff --git a/extras/menus/vshmenu/include/vsh.h b/extras/menus/vshmenu/include/vsh.h index 898d826f..6ba8a829 100644 --- a/extras/menus/vshmenu/include/vsh.h +++ b/extras/menus/vshmenu/include/vsh.h @@ -6,7 +6,8 @@ #include #include -#include "ark.h" +#include +#include #include #include "umdvideo_list.h" diff --git a/extras/modules/xmbctrl/config.c b/extras/modules/xmbctrl/config.c index e26bf1b8..bfa07875 100644 --- a/extras/modules/xmbctrl/config.c +++ b/extras/modules/xmbctrl/config.c @@ -5,7 +5,7 @@ #include #include -#include "ark.h" +#include #include "main.h" #include "list.h" diff --git a/extras/modules/xmbctrl/main.c b/extras/modules/xmbctrl/main.c index 8ab33336..d683e5a2 100644 --- a/extras/modules/xmbctrl/main.c +++ b/extras/modules/xmbctrl/main.c @@ -28,7 +28,7 @@ #include #include -#include "ark.h" +#include #include "macros.h" #include "include/main.h" diff --git a/extras/modules/xmbctrl/plugins.c b/extras/modules/xmbctrl/plugins.c index b1f7c276..68e8b73d 100644 --- a/extras/modules/xmbctrl/plugins.c +++ b/extras/modules/xmbctrl/plugins.c @@ -1,4 +1,4 @@ -#include "ark.h" +#include #include "list.h" #include "settings.h" diff --git a/libs/libsploit/freemem.c b/libs/libsploit/freemem.c index bfb0bb93..7aad38ae 100644 --- a/libs/libsploit/freemem.c +++ b/libs/libsploit/freemem.c @@ -10,7 +10,7 @@ #include #include #include -#include "ark.h" +#include #include "functions.h" // attempt to free as much memory as possible, some kernel/user exploits need this, others don't diff --git a/libs/libsploit/functions.c b/libs/libsploit/functions.c index b19d5ed1..dab8c7e7 100644 --- a/libs/libsploit/functions.c +++ b/libs/libsploit/functions.c @@ -27,7 +27,7 @@ #include #include #include -#include "ark.h" +#include #include "functions.h" static UserFunctions _g_tbl; diff --git a/libs/libsploit/imports.c b/libs/libsploit/imports.c index a927bca9..e426ebc7 100644 --- a/libs/libsploit/imports.c +++ b/libs/libsploit/imports.c @@ -10,7 +10,7 @@ #include #include #include -#include "ark.h" +#include #include "functions.h" void _flush_cache(){ diff --git a/libs/libsploit/patches.c b/libs/libsploit/patches.c index 6bd90ea8..05e3de8b 100644 --- a/libs/libsploit/patches.c +++ b/libs/libsploit/patches.c @@ -10,7 +10,7 @@ #include #include #include -#include "ark.h" +#include #include "functions.h" u32 _findJAL(u32 addr, int reversed, int skip){ diff --git a/libs/libsploit/scanner.c b/libs/libsploit/scanner.c index 68b307b5..892281d0 100644 --- a/libs/libsploit/scanner.c +++ b/libs/libsploit/scanner.c @@ -10,7 +10,7 @@ #include #include #include -#include "ark.h" +#include #include "functions.h" // counter for relocated stubs diff --git a/loader/dc/vunbricker/install.c b/loader/dc/vunbricker/install.c index 2d24d15d..a519380c 100644 --- a/loader/dc/vunbricker/install.c +++ b/loader/dc/vunbricker/install.c @@ -21,6 +21,7 @@ #include #include +#include #include "dcman.h" #include "main.h" #include "install.h" diff --git a/loader/live/kernel/chain_loader/main.c b/loader/live/kernel/chain_loader/main.c index ffc14d27..10b246e7 100644 --- a/loader/live/kernel/chain_loader/main.c +++ b/loader/live/kernel/chain_loader/main.c @@ -18,7 +18,7 @@ #include #include #include "graphics.h" -#include "ark.h" +#include #include "functions.h" #define ARK_LOADADDR 0x08D30000 diff --git a/loader/live/kernel/kernel_loader/reboot.c b/loader/live/kernel/kernel_loader/reboot.c index 26c90a77..31376897 100644 --- a/loader/live/kernel/kernel_loader/reboot.c +++ b/loader/live/kernel/kernel_loader/reboot.c @@ -16,7 +16,7 @@ */ #include "reboot.h" -#include "ark.h" +#include #include "main.h" u8* rebootbuffer = NULL; diff --git a/loader/live/kernel/kxploit/sceUID/kxploit.c b/loader/live/kernel/kxploit/sceUID/kxploit.c index 2298867e..9a318b7e 100644 --- a/loader/live/kernel/kxploit/sceUID/kxploit.c +++ b/loader/live/kernel/kxploit/sceUID/kxploit.c @@ -21,7 +21,7 @@ Made to work on OFW and CFW. #include #include "macros.h" -#include "ark.h" +#include #include "functions.h" #include "kxploit.h" diff --git a/loader/live/user/psxloader/main.c b/loader/live/user/psxloader/main.c index 0078821d..99722a67 100644 --- a/loader/live/user/psxloader/main.c +++ b/loader/live/user/psxloader/main.c @@ -13,7 +13,7 @@ #include #include -#include "ark.h" +#include PSP_MODULE_INFO("ARK VitaPOPS Loader", 0, 1, 0); diff --git a/loader/live/user/signed_eboot/eboot/main.c b/loader/live/user/signed_eboot/eboot/main.c index 2baa654d..6416e1c9 100644 --- a/loader/live/user/signed_eboot/eboot/main.c +++ b/loader/live/user/signed_eboot/eboot/main.c @@ -14,7 +14,7 @@ #include #include -#include "ark.h" +#include #include "rebootconfig.h" #include "functions.h" #include "graphics.h"