2020-09-13 21:32:55 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-08-22 22:30:12 -04:00
|
|
|
/*!
|
|
|
|
* @file kboot.h
|
|
|
|
* GOAL Boot. Contains the "main" function to launch GOAL runtime.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2021-09-06 20:35:03 -04:00
|
|
|
#define GAME_TERRITORY_SCEA 0 // sony america
|
|
|
|
#define GAME_TERRITORY_SCEE 1 // sony europe
|
|
|
|
#define GAME_TERRITORY_SCEI 2 // sony inc. (japan)
|
|
|
|
|
2020-08-22 22:30:12 -04:00
|
|
|
struct MasterConfig {
|
|
|
|
u16 language; //! GOAL language 0
|
|
|
|
u16 aspect; //! SCE_ASPECT 2
|
|
|
|
u16 disable_game; // 4
|
|
|
|
u16 inactive_timeout; // todo 6
|
|
|
|
u16 timeout; // todo 8
|
|
|
|
u16 volume; // todo 12
|
2021-09-06 20:35:03 -04:00
|
|
|
|
2022-05-21 20:55:29 -04:00
|
|
|
u16 territory; // added. this is normally burnt onto the disc executable.
|
|
|
|
u16 disable_sound = 0; // added. disables all sound code.
|
2020-08-22 22:30:12 -04:00
|
|
|
};
|
|
|
|
|
2022-04-30 14:55:13 -04:00
|
|
|
enum class RuntimeExitStatus {
|
|
|
|
RUNNING = 0,
|
|
|
|
RESTART_RUNTIME = 1,
|
|
|
|
EXIT = 2,
|
|
|
|
RESTART_IN_DEBUG = 3,
|
|
|
|
};
|
|
|
|
|
2020-08-22 22:30:12 -04:00
|
|
|
// Level to load on boot
|
|
|
|
extern char DebugBootLevel[64];
|
|
|
|
|
|
|
|
// Pass to GOAL kernel on boot
|
|
|
|
extern char DebugBootMessage[64];
|
|
|
|
|
|
|
|
// Set to 1 to kill GOAL kernel
|
2022-04-30 14:55:13 -04:00
|
|
|
extern RuntimeExitStatus MasterExit;
|
2020-08-22 22:30:12 -04:00
|
|
|
|
|
|
|
// Set to 1 to enable debug heap
|
|
|
|
extern u32 MasterDebug;
|
|
|
|
|
|
|
|
// Set to 1 to load debug code
|
|
|
|
extern u32 DebugSegment;
|
|
|
|
|
|
|
|
// Set to 1 to load game engine after boot automatically
|
|
|
|
extern u32 DiskBoot;
|
|
|
|
|
|
|
|
extern MasterConfig masterConfig;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Initialize global variables for kboot
|
|
|
|
*/
|
|
|
|
void kboot_init_globals();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Launch the GOAL Kernel (EE).
|
|
|
|
* See InitParms for launch argument details.
|
|
|
|
* @param argc : argument count
|
|
|
|
* @param argv : argument list
|
|
|
|
* @return 0 on success, otherwise failure.
|
|
|
|
*/
|
|
|
|
s32 goal_main(int argc, const char* const* argv);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Run the GOAL Kernel.
|
|
|
|
*/
|
|
|
|
void KernelCheckAndDispatch();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Stop running the GOAL Kernel.
|
|
|
|
*/
|
|
|
|
void KernelShutdown();
|
|
|
|
|
2020-09-25 21:11:27 -04:00
|
|
|
extern u32 MasterUseKernel;
|