wavelength 1.0.0
Loading...
Searching...
No Matches
System.h File Reference
#include "utl/Data.h"
#include "utl/OptionProcessor.h"
#include "utl/Str.h"
Include dependency graph for System.h:

Go to the source code of this file.

Functions

void SystemInit (const char *commandLine, const char *configFile)
 Split a command line into arguments and start the systems, as the argument form of SystemInit() does.
void SystemInit (int argc, char **argv, const char *configFile)
 Start the systems: options, timer, strings, archive, configuration, memory, joypads, and cheats.
void SystemTerminate ()
 Stop the systems SystemInit() started and release the configuration.
bool UsingCD ()
 Report whether files are read from the disc rather than the host.
void SetUsingCD (bool usingCD)
 Choose whether files are read from the disc.
void SystemProcessOptions (int argc, char **argv)
 Register the system options (host_config and file_order) and process the arguments.
void SystemConfigInit (const char *path, const char *file)
 Read the configuration file into SystemConfig().
DataArray * SystemConfig ()
 Report the configuration SystemConfigInit() read.
OptionProcessor * SystemOptions ()
 Report the option processor that SystemInit() runs over the arguments.
void TimerInit ()
 Measure the cycle counter against the performance counter and reset the clock.
void TimerConfigInit ()
 Create the named timers the timer array of the configuration lists.
void TimerPoll ()
 Advance the clock by the cycles since the last call and poll the input.
void TimerTerminate ()
 Stop the input polling the clock drives.
void PadMapInit ()
 Map players to controller ports for a single controller.
void PadMapSet (bool multitap, bool secondPort)
 Map players to controller ports and slots.
void PadMapTerminate ()
 Release the controller map.
void EmptyRoutine ()
 Do nothing.
int ReturnZero ()
 Return zero.

Variables

String gFileOrder
 Value of the file_order option, also the name of the file log.
float gSystemTime
 Seconds of cycles counted since TimerInit().

Function Documentation

◆ SystemInit() [1/2]

void SystemInit ( const char * commandLine,
const char * configFile )

Split a command line into arguments and start the systems, as the argument form of SystemInit() does.

Parameters
commandLineThe command line.
configFileThe configuration file in the program's directory, or null for default_config.txt.
Ghidra address:
0x1000a680

◆ SystemInit() [2/2]

void SystemInit ( int argc,
char ** argv,
const char * configFile )

Start the systems: options, timer, strings, archive, configuration, memory, joypads, and cheats.

Parameters
argcThe number of arguments.
argvThe arguments.
configFileThe configuration file in the program's directory, or null for default_config.txt.
Ghidra address:
0x1000a6d0

◆ SystemTerminate()

void SystemTerminate ( )

Stop the systems SystemInit() started and release the configuration.

Ghidra address:
0x1000a7d0

◆ UsingCD()

bool UsingCD ( )

Report whether files are read from the disc rather than the host.

Returns
Whether the cd option is set.
Ghidra address:
0x1000b640

◆ SetUsingCD()

void SetUsingCD ( bool usingCD)

Choose whether files are read from the disc.

Parameters
usingCDWhether files come from the disc.
Ghidra address:
0x1000b650

◆ SystemProcessOptions()

void SystemProcessOptions ( int argc,
char ** argv )

Register the system options (host_config and file_order) and process the arguments.

Parameters
argcThe number of arguments.
argvThe arguments.
Ghidra address:
0x1000b600

◆ SystemConfigInit()

void SystemConfigInit ( const char * path,
const char * file )

Read the configuration file into SystemConfig().

Parameters
pathThe directory of the file.
fileThe file, or null for default_config.txt.
Ghidra address:
0x1000b660

◆ SystemConfig()

DataArray * SystemConfig ( )

Report the configuration SystemConfigInit() read.

Returns
The configuration.
Ghidra address:
0x1000b760

◆ SystemOptions()

OptionProcessor * SystemOptions ( )

Report the option processor that SystemInit() runs over the arguments.

Returns
The option processor.
Ghidra address:
0x1000b750

◆ TimerInit()

void TimerInit ( )

Measure the cycle counter against the performance counter and reset the clock.

Ghidra address:
0x1000cce0

◆ TimerConfigInit()

void TimerConfigInit ( )

Create the named timers the timer array of the configuration lists.

Ghidra address:
0x1000cde0

◆ TimerPoll()

void TimerPoll ( )

Advance the clock by the cycles since the last call and poll the input.

Ghidra address:
0x1000cb90

◆ TimerTerminate()

void TimerTerminate ( )

Stop the input polling the clock drives.

Ghidra address:
0x1000cc30

◆ PadMapInit()

void PadMapInit ( )

Map players to controller ports for a single controller.

Ghidra address:
0x1000b7b0

◆ PadMapSet()

void PadMapSet ( bool multitap,
bool secondPort )

Map players to controller ports and slots.

Parameters
multitapWhether the four players share port 0 through a multitap, one slot each.
secondPortWithout a multitap, whether the second player uses port 1.
Ghidra address:
0x1000b7e0

◆ PadMapTerminate()

void PadMapTerminate ( )

Release the controller map.

The body is empty.

Ghidra address:
0x1000b7d0

◆ EmptyRoutine()

void EmptyRoutine ( )

Do nothing.

The linker merged every empty routine of the program into this one, and several start-up and shut-down steps call it.

Ghidra address:
0x1000eec0

◆ ReturnZero()

int ReturnZero ( )

Return zero.

The linker merged every routine that only returns zero into this one. The input and disc polling of this build call it.

Returns
Zero.
Ghidra address:
0x1000eed0

Variable Documentation

◆ gFileOrder

String gFileOrder
extern

Value of the file_order option, also the name of the file log.

Ghidra address:
0x1003fdc0

◆ gSystemTime

float gSystemTime
extern

Seconds of cycles counted since TimerInit().

Ghidra address:
0x10040c80