Entry point
An entry point locates the first section of code (subroutine) executed by a CPU after its source executable is loaded into main memory. A common symbolic name for the entry point routine is start
.
Entry point locations
The following lists the location of the entry point for each of the Crash games:
- Crash 1 - 0x3E018
start()
The start
routine sets the location of the global pointer, initializes the heap, and calls the main
routine.
main()
The main
routine calls 3 subroutines. The first of these routines performs hardware initialization. The second contains the main game loop. The third releases any resources allocated during hardware initialization. Prior to execution of these routines, the main loop condition at 0x56410
is set to true/1.
In each game, the level id for the 'initial level' is passed as an argument to the main loop routine. The initial level isn't actually a 'level' per-se, but rather a game state, which includes the title sequence, options menu, password menu (Crash 1), map (Crash 1), and game over screen.