Star Fox Adventures: Amethyst Edition - Debug Functions
This page explains the debug functions added in Amethyst Edition.
The debug menu is one of the pages that can be accessed from the new PDA Menu, either by using the PDA item or by pressing L+Z+B.
This menu lets you turn on/off debug text displayed on screen.
- Master: Controls whether any debug text is displayed. Also, enables debug messages from the original game.
- Tricky: Enables a lot of debug text from Tricky.
- Player State: Shows a bunch of player state information.
- Seq State: Shows information about currently executing sequences.
Explanation of main texts:
- P: Player coordinates, and RAM address of player object.
- M: Current map cell coordinates and map ID.
- S: Current map state, flags, and internal name.
- C: Camera coordinates.
- Obj: Number of objects on the map.
- S: Player state ID and flags.
- A: Player animation ID and timers.
- Target: Object the player is currently interacting with.
- Text: Current text ID.
- Seq: Current sequence ID.
Enabling Master also enables 5 bars in the lower left corner:
- Previous frame render time
- Heap 0 free space
- Heap 1 free space
- Heap 2 free space
- Heap 3 free space
This submenu contains functions relating to maps and objects.
This feature lets you move the player character and other objects anywhere in the world.
- Analog stick: Move forward, backward, left, right.
- L/R: Move up/down.
- C stick: Turn.
- Z: Hold to move faster.
- B: Exit free move.
- In this state, the player is immune to damage and gravity, and can pass through most solid objects.
- This function affects the object that the camera is focused on, which may not necessarily be the player. Some objects will stop working or even crash the game when moved this way. (The player remains frozen while moving other objects.)
- This feature can also be toggled by pressing X on controller 3.
This option just resets the map, as if you'd just spawned into it when loading a save file.
This game's maps contain a lot of invisible triggers and scripts, so using this option can bypass them, leading to some glitches.
This feature lets you warp to most locations, including some unused maps.
This can be glitchy, since it allows you to bypass invisible triggers and access maps out of order, which can lead to maps not being properly set up. For example, you may end up in a map with no objects, or a broken cutscene that makes you fall through the ground. This is usually fixed by going into a different part of the map.
WARNING: You should turn off auto-save before using this, or else risk getting saved in a broken scene.
This list includes some special cutscene maps and unused maps, but warping to them will usually only crash/freeze the game. The unused maps are mostly empty voids.
This menu lets you view and manipulate all currently loaded objects in the map.
- Up/Down: Scroll.
- C Up/Down: Scroll fast.
- Z: Set the current object as the camera focus. (Some objects can't be set.)
- X: Delete the current object.
- Y: Move the player to the current object.
- Start: Select the player object.
At the right side, information about the object is shown:
- POS: Object's current position.
- ORIG: Object's original position when first loaded.
- ADDR: Object's memory address.
- ID: Object's unique ID.
- OBJDEF: Address of object's definition, shared among all instances of this object.
- FLAG: Flags, currently unknown purpose.
- SLOT: Object slot, currently unknown purpose.
- MAP: Object map ID and unknown map-related variable.
- SEQ: Address of object's romlist entry (parameters) and sequence data.
- EVENT: Unknown. (Name derived from debug messages.)
- MODEL: Address, index, and ID of object's current model.
- STATE: Address of state data, which has a different format for each type of object.
- HITBOX: Address of object's hitbox data.
- FUNCS: Address of a list of function pointers.
- PARENT: Address and name of parent object.
- CHILD: Addresses and names of object's children.
By setting the camera focus to an object, you can then use Free Move to move it around.
This menu lets you spawn any object into the map.
- Object: Object type. The leftmost number is the object ID. The next is the "real" ID from OBJINDEX.bin.
- Params: Number of parameters, 0 to 16.
- Flags: Object flags. Most are unknown. Displayed in binary and hex.
- 01: Do not immediately unload
- 02: Bypass OBJINDEX.bin
- 04: Unknown, used by eg staff, Tricky
- Param NN: Object parameters. These vary with the object. Some require correct parameters to function properly, or will even crash the game without them.
- Start: Spawn the selected object.
- B: Exit this menu.
- X: Increase selected digit.
- Y: Decrease selected digit.
Many objects will not behave as expected when spawned this way. In particular, the object may refuse to spawn, immediately disappear, crash the game, or appear as a large cube. Some reasons for this are:
- The object doesn't work in this map.
- The object's model isn't loaded on this map.
- The parameters are incorrect.
- The object is designed to be controlled by a script.
- There isn't enough free memory.
- The object ID is wrong. For example, Tricky can be spawned using ID 0004 or 0024, but only the latter works properly.
- Some objects do additional checks when spawned and immediately vanish if they aren't satisfied.
- Very large objects might fall through the ground. Try using Free Move to spawn them higher up.
The object spawns at the location of the player (or whichever object has camera focus). In some cases, this means it will end up underground.
This submenu contains items relating to game data and memory.
This menu lets you view and edit the "Game Bits", which store game state information.
- Bit: The bit ID.
- T: Which table this bit belongs to. Table 0 is temporary; the other 3 are stored in the save file.
- Offs: Offset of this bit (in binary bits) into the table.
- Sz: Size of this value, in (binary) bits.
- Unk: Unknown.
- L/R: Scroll by 0x100.
- Stick Left/Right: Adjust value.
- Z: Clear value to zero.
This menu displays some information about the current savegame.
- Game State:
- Chr: Player character.
- SaveName: Save file name.
- Krystal/Fox State:
- HP: Current/max hit points. Each heart is 4 HP.
- MP: Current/max magic.
- 1up: Current/max extra lives.
- Money: Current number of scarabs.
- X, Y, Z: Current coordinates.
- Rot: Current Z rotation. (X and Y are not saved.)
- Grid: Current map grid.
- Map: Current map name, if any.
- Unk: Unknown.
- Saved Objects: A list of (unique ID, X, Y, Z) that saves the positions of certain objects.
Note that Fox and Krystal each have their own saved state, and the Chr field tells which character is active. This is a remnant of the character swapping mechanic planned for Dinosaur Planet. In the final game, only one swap happens (from Krystal to Fox), so most of these fields aren't used.
This mod currently doesn't make use of this mechanic; instead it just swaps the model, voice, and properties of whichever character is active.
This menu displays the status and address of each of the game's heaps. You can select one to view the list of allocations.
The game tags allocations with arbitrary numbers. This mod changes the tags to the address of the function that made the allocation. However, allocations made very early in the startup process may still have their original tags.
Contains options relating to viewing and rendering things.
Allows you to view all loaded textures.
- Tex: Texture and subimage index.
- ID: Texture ID and address.
- Flags: Texture flags.
- Refcnt: Reference count.
- Fmt: Image data format and image dimensions.
- Stick Left/Right: Select texture.
- D-Pad Left/Right: Select subimage.
- L/R: Scroll quickly through textures.
Slots that aren't loaded appear as a placeholder colored square.
Some textures are stored upside-down in the game for unknown reasons.
Enables rendering of hit spheres. This is still a work in progress, and very unstable.
These options don't have their own submenus.
- Show Text: Display any text.
- Advance Frame: Let the game advance one frame while keeping the menu open. You can also hold L/R to advance continuously.