F-Zero RAM Map
Here is a RAM Map for F-Zero that aims to be fairly comprehensible.
Data Types
Name | Accepted Values | Size | Description |
---|---|---|---|
Angle16 | 0x0000 - 0xBFFF | 16-bit | An angle with extra fractional precision. 0x0000 = 0 degrees |
Angle8 | 0x00 - 0xBF | 8-bit | An angle without the fractional precision. 0x00 = 0 degrees |
CoordX | 0x0000 - 0x1FFF | 16-bit | X coordinate value. |
CoordY | 0x0000 - 0x0FFF | 16-bit | Y coordinate value. |
Zero Page (Direct Page)
The Direct Page register (DP) is fixed to #$0000 all the time.
Address | Length | Type | Description |
---|---|---|---|
$7E0000 | ?? bytes | Misc. | Scratchpad RAM. Used for various purposes, including: temporary storage, subroutine parameters, etc. |
$7E0034 | 1 byte | Sprites | Used in the AI car graphics routine. How many sprite tiles were needed to draw the AI car. |
$7E003E | 2 bytes | Misc. | Relevant value picked from the table at 7E:1076. |
$7E0040 | 1 byte | Flag | "Frame done" flag. Set to zero at the start of the main loop. When NMI happens, it's decremented to #$FF, unless the value was already non-zero (i.e. a lag frame occurred.) |
$7E0041 | 2 bytes | Pointer | IRQ code pointer. $8612 - Do nothing; |
$7E0043 | 2 bytes | IRQ | Scanline where the Mode7 BG starts. Used only for IRQ pointer $8691, on the race intro sequence. |
$7E0045 | 1 byte | Flag | When the MSB is set, sound effects won't play. This is used to keep playing the "player wreckage" sounds when $7E0048 >= #$80. |
$7E0046 | 4 bytes | I/O | SPC700 I/O ports. Various values can be written to play music or sound effects. |
$7E004A | 1 byte | Misc. | Number of cars currently on screen, multiplied by two. (A bit of a mystery still, but seems to be used in a loop that assigns sprite priorities based on their Y position) |
$7E004B | 2 bytes | Sprites | Index to OAM Table #1 ($7E0200) for routines that print characters/strings on screen. |
$7E004D | 1 byte | Sprites | Index to OAM Table #2 ($7E0420) for routines that print characters/strings on screen. |
$7E004E | 1 byte | Sprites | Used for bit-fiddling on OAM Table #2. Used in conjunction with $7E004D. |
$7E004F | 1 byte | Hardware mirror | Mirror of SNES register $2101. |
$7E0050 | 1 byte | Flag | "Is the game drawing cars" flag. Non-zero = Yes. This is used to correctly handle OAM DMA. |
$7E0051 | 1 byte | Counter | Frame counter. Always increments every frame (except lag frames), no matter what. See also: $7E009A ("in-race" frame counter) |
$7E0052 | 1 byte | Misc. | Player car type. #$00 = Blue Falcon; #$01 = Wild Goose; #$02 = Golden Fox; #$03 = Fire Stingray. |
$7E0053 | 1 byte | Misc. | Current race number. From #$00 to #$04 in Grand Prix mode. |
$7E0054 | 3 bytes | Misc. | Current gamestate (game mode). The first byte is the "main" gamestate, the second byte is the "sub" gamestate and the third byte is the "sub-sub" gamestate. |
$7E0057 | 1 byte | Misc. | Current difficulty setting. #$00 = Beginner; #$01 = Standard; #$02 = Expert/Master (for Master, the flag at $7E0F3D is set) |
$7E0058 | 1 byte | Misc. | Practice mode flag. #$00 = Grand Prix mode; #$01 = Practice Mode |
$7E0059 | 1 byte | Misc. | Number of spare machines (extra lives). |
$7E005A | 1 byte | Misc. | Used by most menus as current selected option. |
$7E005B | 1 byte | Misc. | "Is running pre-recorded race" flag. #$00 = Player is in control; Other = Pre-recorded race is running. |
$7E005C | 1 byte | Flag | A flag related to color math effects. When == #$00:
When == #$01:
When > #$01:
|
$7E005D | 1 byte | Hardware mirror | Screen brightness and F-Blank flag. Mirror of SNES register $2100 |
$7E005E | 1 byte | Hardware mirror | Enabled HDMA channels. Mirror of SNES register $420C |
$7E005F | 1 byte | Flag | Flags related to shown layers and HUD updating. Format: u--s4321 1 = Hide BG1; 2 = Hide BG2; 3 = Show BG3; 4 = Hide BG4 (unused, F-Zero never uses BG4); s = Hide sprites; - = Unused bit u = Stop updating HUD (rank, timer, score and speedometer) |
$7E0060 | 1 byte | Misc. | Screen fade type. #$00 = Not fading; #$01 = Fade-in; Other = Fade-out. |
$7E0061 | 1 byte | Misc. | Screen fade delay. How many frames it takes to increment/decrement the screen brightness. |
$7E0062 | 1 byte | Misc. | Screen fade timer. How many frames until the screen brightness is incremented/decremented. |
$7E0063 | 1 byte | I/O | Controller 1 data (held buttons). Format: axlr---- a = A; x = X; l = L; r = R; - = Unused bits |
$7E0064 | 1 byte | I/O | Controller 1 data (held buttons). Format: byetUDLR b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right. |
$7E0065 | 1 byte | I/O | (Seems to be the exact same as $7E0063?) Used more often than $7E0063 |
$7E0066 | 1 byte | I/O | (Seems to be the exact same as $7E0064?) Used more often than $7E0064 |
$7E0067 | 1 byte | I/O | Controller 1 data (pressed buttons on current frame). Format: axlr---- a = A; x = X; l = L; r = R; - = Unused bits |
$7E0068 | 1 byte | I/O | Controller 1 data (pressed buttons on current frame). Format: byetUDLR b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right. |
$7E0069 | 1 byte | I/O | Controller 1 data (released buttons on current frame). Format: axlr---- a = A; x = X; l = L; r = R; - = Unused bits |
$7E006A | 1 byte | I/O | Controller 1 data (released buttons on current frame). Format: byetUDLR b = B; y = Y; e = Select; t = Start; U = Up; D = Down; L = Left; R = Right. |
$7E006B | 1 byte | Flag | A flag related to windowing effects. When == #$00:
When == #$01:
When > #$01:
|
$7E006C | 2 bytes | Pointer | Pointer to data for windowing effects (HDMA channel 2). Points to $7E0DD0 while racing, and to $7E0DF0 while showing the big rank number after finishing a race. |
$7E006E | 1 byte | Hardware mirror | Mirror of SNES register $212E. |
$7E006F | 1 byte | Hardware mirror | Mirror of SNES register $212F. |
$7E0070 | 1 byte | Hardware mirror | Mirror of SNES register $2130. |
$7E0071 | 1 byte | Hardware mirror | Mirror of SNES register $2123. |
$7E0072 | 1 byte | Hardware mirror | Mirror of SNES register $2124. |
$7E0073 | 1 byte | Hardware mirror | Mirror of SNES register $2125. |
$7E0074 | 1 byte | Misc. | Index to $7E0EA0. Alternates between #$00 and #$10 every frame, to compensate for slowdowns (if it didn't alternate, the Mode7 layer would look jiterry when updating while the game was lagging). |
$7E0075 | 2 bytes | Hardware mirror | BG1 horizontal scroll. Mirror of SNES register $210D. |
$7E0077 | 2 bytes | Hardware mirror | BG1 vertical scroll. Mirror of SNES register $210E. |
$7E0079 | 2 bytes | Hardware mirror | BG2 horizontal scroll. Mirror of SNES register $210F. |
$7E007B | 2 bytes | Hardware mirror | BG2 vertical scroll. Mirror of SNES register $2110. |
$7E007D | 2 bytes | Hardware mirror | Mode7 X center. Mirror of SNES register $211F. |
$7E007F | 2 bytes | Hardware mirror | Mode7 Y center. Mirror of SNES register $2120. |
$7E0081 | 1 byte | Misc. | Mode7 rendering type. #$00 = No Mode7; #$01 = Perspective effect; Other = Top-down view. |
$7E0082 | 1 byte | Misc. | This value + #$80 is written to $4342 and $4372. Similarly, this value + #$A0 is written to $4352 and $4362. This updates the Mode 7 rotation through HDMA. Similar to $7E0074, this address also alternates between #$00 and #$10 every frame to compensate for slowdowns. |
$7E0083 | 1 byte | Misc. | Used after the "track zoom-in" on the race intro. This value is incremented every frame to raise the viewpoint pitch angle. When it reaches #$10, it stops increasing and the cars appear. |
$7E0084 | 1 byte | Hardware mirror | Written to $4347. Only used if 7E:0081 == #$01. |
$7E0085 | 1 byte | Hardware mirror | Written to $4357. Only used if 7E:0081 == #$01. |
$7E0086 | 1 byte | Hardware mirror | Written to $4367. Only used if 7E:0081 == #$01. |
$7E0087 | 1 byte | Hardware mirror | Written to $4377. Only used if 7E:0081 == #$01. |
$7E0088 | 2 bytes | Hardware mirror | Mode7 matrix A and D. Mirror of SNES registers $211B and $211E |
$7E008A | 2 bytes | Hardware mirror | Mode7 matrix B. Mirror of SNES register $211C |
$7E008C | 2 bytes | Hardware mirror | Mode7 matrix C. Mirror of SNES register $211D |
$7E008E | 2 bytes | Misc. | Mode7 scaling. The Mode7 layer shrinks as this value increases. Only used if $7E0081 > #$01 (top-down view) |
$7E0090 | 1 byte | Misc. | Current league. #$00 = Knight League; #$01 = Queen League; #$02 = King League. |
$7E0091 | 1 byte | Empty | Empty. Cleared on reset |
This is still a work-in-progress! More will be added later.