Skip to content

Track Rendering

RenaKunisaki edited this page Apr 21, 2016 · 2 revisions

Tracks are rendered by calling F3DEX display lists at each frame.

Display List Table

Each track has a table of RSP addresses pointing to the master display list for each section of the track. Each frame, the game calls the appropriate list based on the player's position and camera angle, and those lists call other lists to render everything that should be visible.

The location of this table is hardcoded for each track:

Track Table Loc. Code Loc.
0x00 Mario Raceway 09:0001F0 80292464
0x01 Choco Mountain 09:000150 80292C5C
0x02 Bowser's Castle 09:0001D0 80292F00
0x03 Banshee Boardwalk 09:000170 80293224
0x04 Yoshi Valley 06:0183F0 80295AEC
0x05 Frappe Snowland 06:007890 802935E8
0x06 Koopa Troopa Beach 06:019328 80293778
0x07 Royal Raceway 09:0002C0 802939C4
0x08 Luigi Raceway 09:000290 80293BE0
0x09 Moo Moo Farm 09:0001D0 8029413C
0x0A Toad's Turnpike 06:0239A0 80294648
0x0B Kalimari Desert 09:0001A0 80294890
0x0C Sherbet Land 09:0000B0 80294A6C
0x0D Rainbow Road 06:0164B8 80291ACC
0x0E Wario Stadium 09:000150 80294C74
0x0F Block Fort 06:000000 ?
0x10 Skyscraper 06:000000 ?
0x11 Double Deck 06:000000 ?
0x12 DK's Jungle Parkway 06:013D20 802954B4
0x13 Big Donut 06:000000 ?

Table Loc is the location of the table. Code Loc is the approximate location in RAM where the program sets the table location.

The table contains four pointers for each section: one for North, East, South and West respectively. The section index is specified by the Surface Map polygon that the player was most recently sitting on.

In theory, the table can be in any RSP segment, but all tracks place it in either segment 6 or 9. (XXX why two different segments?)

Hardcoded Display Lists

Several - probably all - tracks have a number of hardcoded display list addresses, which are called every frame regardless of the player's position. Mostly these draw objects that are visible from many places (such as Mario Raceway's giant mushroom).

Mario Raceway

  • 07:003508
  • 07:003240
  • 07:0014A0
  • 07:000450
  • 07:000240
  • 07:0000E0
  • 07:000160
  • 07:0008E8
  • 07:001140

XXX determine order, find where these are called from, and find them for the other tracks.

Clone this wiki locally