#include <cstring>
#include "os/timer.h"
#include "script/dataarray.h"
Go to the source code of this file.
|
| void | SystemInit (int argc, char **argv, const char *pszConfigFile) |
| | Bring up the operating layer from the command line and the configuration file.
|
| void | SystemTerminate () |
| | Shut down what SystemInit() started, in reverse order, and release the configuration.
|
| void | SystemPoll () |
| | Service the operating layer once per frame, controllers included.
|
| void | SystemSetPadCheck (bool bEnabled) |
| | Turn the periodic controller connection check of SystemPoll() on or off.
|
| DataArray * | SystemConfig () |
| | Report the configuration SystemInit() read.
|
| bool | UsingCD () |
| | Report whether files are read from the disc rather than from the host.
|
| void | SetUsingCD (bool bUsingCD) |
| | Choose whether files are read from the disc rather than from the host.
|
| const char * | GetSystemLanguage () |
| | Report the language the console is set to.
|
| float | SystemMs () |
| | Report the milliseconds the system clock has measured since it was last reset.
|
| unsigned long long | SystemCycles () |
| | Report the cycles the system clock has measured since it was last reset.
|
◆ SystemInit()
| void SystemInit |
( |
int | argc, |
|
|
char ** | argv, |
|
|
const char * | pszConfigFile ) |
Bring up the operating layer from the command line and the configuration file.
The configuration file is read before every other subsystem starts, and the system clock is reset along the way.
- Parameters
-
| argc | The argument count main() received. |
| argv | The argument vector main() received. |
| pszConfigFile | The configuration file to read, relative to the disc root. |
- Ghidra address:
- NTSC-U/C: 0x0028cb38
- Ghidra address:
- PAL: 0x002964e8
◆ SystemTerminate()
Shut down what SystemInit() started, in reverse order, and release the configuration.
- Ghidra address:
- NTSC-U/C: 0x0028ccc8
- Ghidra address:
- PAL: 0x00296678
◆ SystemPoll()
Service the operating layer once per frame, controllers included.
- Ghidra address:
- NTSC-U/C: 0x0028c560
- Ghidra address:
- PAL: 0x00295ed0
◆ SystemSetPadCheck()
| void SystemSetPadCheck |
( |
bool | bEnabled | ) |
|
Turn the periodic controller connection check of SystemPoll() on or off.
The name is inferred.
- Parameters
-
| bEnabled | Whether SystemPoll() checks which controllers are connected. |
- Ghidra address:
- NTSC-U/C: 0x0028c4c0
- Ghidra address:
- PAL: 0x00295e10
◆ SystemConfig()
Report the configuration SystemInit() read.
- Returns
- The root of the configuration.
- Ghidra address:
- NTSC-U/C: 0x0028c6a0
- Ghidra address:
- PAL: 0x00296028
◆ UsingCD()
Report whether files are read from the disc rather than from the host.
In the PAL build the ignore_cd command line option has the host reported.
- Returns
- Whether files come from the disc.
- Ghidra address:
- NTSC-U/C: 0x0028c5a8
- Ghidra address:
- PAL: 0x00295f18
◆ SetUsingCD()
| void SetUsingCD |
( |
bool | bUsingCD | ) |
|
Choose whether files are read from the disc rather than from the host.
- Parameters
-
| bUsingCD | Whether files come from the disc. |
- Ghidra address:
- NTSC-U/C: 0x0028c5b8
- Ghidra address:
- PAL: 0x00295f40
◆ GetSystemLanguage()
| const char * GetSystemLanguage |
( |
| ) |
|
Report the language the console is set to.
- Returns
- The language key, for example "english".
- Ghidra address:
- NTSC-U/C: 0x0028caf8
- Ghidra address:
- PAL: 0x002964a8
◆ SystemMs()
Report the milliseconds the system clock has measured since it was last reset.
The body is here rather than in a source file because the engine expands it inline at most call sites. The address is the one out-of-line copy.
- Returns
- The elapsed milliseconds.
- Ghidra address:
- NTSC-U/C: 0x001afae0
- Ghidra address:
- PAL: 0x001b8880
◆ SystemCycles()
| unsigned long long SystemCycles |
( |
| ) |
|
|
inline |
Report the cycles the system clock has measured since it was last reset.
Every caller expands the body inline, so the image has no out-of-line copy. The name is inferred.
- Returns
- The elapsed cycles.
◆ g_bHostConfig
Non-zero when the host_config command-line option asked for the script files to come from the host.
- Ghidra address:
- NTSC-U/C: 0x003b2234
- Ghidra address:
- PAL: 0x00431108
◆ gSystemTimer
The clock SystemMs() reads.
- Ghidra address:
- NTSC-U/C: 0x00491a10
◆ gSystemCycles
| unsigned long long gSystemCycles |
|
extern |
Cycles accumulated across every SystemMs() call since the clock was last reset.
- Ghidra address:
- NTSC-U/C: 0x003b2260
- Ghidra address:
- PAL: 0x00431140