For the server, we want to be able to run the game without graphics or sound. Instead of taking the working game and removing unneeded parts, we start with an empty main function and add the needed parts one by one, unbinding them from the rest through more or less hacky patches.
The initial goal is to replay a simple ghost, like, let's say, the rMC3 WR. More complex races (and battles) are much more likely to trigger breaking code paths and so will be added incrementally from the MVP.
The game contains many subsystems, with a manager for each one following the singleton pattern. All of them have a createInstance function, and some have an init and/or a calc function. There are a few functions that are responsible for calling theses, notably:
RkSystem::initialize (0x80009194 PAL) for dol subsystems creation.
Unnamed RootScene function (0x80542d8c PAL) for base rel subsystems creation.
Unnamed RaceScene function (0x80554208 PAL) for race subsystems creation.
Unnamed RaceScene function (0x8055472c PAL) for race subsystems initialization.
Unnamed RaceScene function (0x80554ad4 PAL) for race subsystems calculation.
For the server, we want to be able to run the game without graphics or sound. Instead of taking the working game and removing unneeded parts, we start with an empty main function and add the needed parts one by one, unbinding them from the rest through more or less hacky patches.
The initial goal is to replay a simple ghost, like, let's say, the rMC3 WR. More complex races (and battles) are much more likely to trigger breaking code paths and so will be added incrementally from the MVP.
The game contains many subsystems, with a manager for each one following the singleton pattern. All of them have a
createInstance
function, and some have aninit
and/or acalc
function. There are a few functions that are responsible for calling theses, notably:RkSystem::initialize
(0x80009194 PAL) for dol subsystems creation.RootScene
function (0x80542d8c PAL) for base rel subsystems creation.RaceScene
function (0x80554208 PAL) for race subsystems creation.RaceScene
function (0x8055472c PAL) for race subsystems initialization.RaceScene
function (0x80554ad4 PAL) for race subsystems calculation.