Difference between revisions of "Entry point"

From Crash Bandicoot Hacking Wiki
Jump to navigation Jump to search
(links)
(start())
Line 13: Line 13:
  
 
In each game, the level id for the 'initial level' is passed as an argument to the [[Game Loop|game 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.
 
In each game, the level id for the 'initial level' is passed as an argument to the [[Game Loop|game 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.
 +
__FORCETOC__
 +
__NEWSECTIONLINK__

Revision as of 20:45, 10 November 2017

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 game loop. The third releases any resources allocated during hardware initialization. Prior to execution of these routines, the game 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 game 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.