Star Fox Adventures: Amethyst Edition - Debug Functions
This page explains the debug functions added in Amethyst Edition.
Note that these are likely to be unstable, and to change between versions.
Global Controls
At any time, press:
- B, while holding L+Z, on Controller 1 to open the PDA menu.
- Start on Controller 3 to toggle time stop.
- Y on Controller 3 to advance one tick while time is stopped.
- D-pad Up on Controller 3 to cycle through displaying heap stats.
- D-pad Down on Controller 3 to dump heap stats to the console.
- Start on Controller 4 to abort the current cutscene. This is very glitchy; some scenes will just restart or crash, and you can make the game unwinnable by skipping important events.
Also, as with all GameCube games, hold X+B and press Start to reset, the same as pressing the Reset button.
Main Menu
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.
Free Move
This feature lets you move the player character and other objects anywhere in the world.
Controls:
- Analog stick: Move forward, backward, left, right.
- L/R: Move up/down.
- C stick: Turn.
- Z: Hold to move faster.
- B: Exit free move.
Notes:
- 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.
Debug Text
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.
- Player State: Shows various state variables in Player object.
- Tricky: Enables a lot of debug text from Tricky. This is part of the original game.
- Player Coords: Shows player coordinates.
- Camera Coords: Shows camera coordinates.
- Restart Point: Shows restart point coordinates.
- Interact Obj: Shows the object the player is targeting.
- GameBit Changes: Shows when GameBits are changed. (Some will stay because they're being set every frame.)
- Memory Stats: Shows memory usage percent.
- Heap Details: Shows usage of each heap.
Explanation of main texts:
- P: Player coordinates, and RAM address of player object.
- M: Current map cell coordinates and map ID.
- T: Current map act number and object group states.
- L: Loaded map IDs, and locked IDs.
- C: Camera coordinates.
- Obj: Number of objects on the map.
- Mem: Percent of used heap bytes, percent of used heap entries.
- RST: Restart Point coords and map ID.
- LSV: "Last Save" coords and map ID; used if no Restart Point exists.
- CSV: "Current Save" coords and map ID; the location you'll respawn at if you save and reset.
- Target: Object the player is currently interacting with. (That which has a heart/C/A button over it.)
- HEAP: Blocks used, blocks total, bytes used, bytes total.
- MODE: Part of a leftover lighting debug function in the original game.
Map
This submenu contains functions relating to maps and objects.
Warp
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.
Object List
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.
- FILE: Address of object's file entry, shared among all instances of this object.
- DEFNO: Object def ID.
- CATID: Object category ID.
- OBJNO: Index in the map's romlist.
- FLAG: Flags, currently unknown purpose.
- SLOT: Object slot, currently unknown purpose.
- MAP: Object map ID and unknown map-related variable.
- OBJDEF: 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.
- MSGS: Address and used capacity of object's message queue.
- 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.
Spawn Object
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.
Controls:
- Start: Spawn the selected object.
- B: Exit this menu.
- X: Increase selected digit.
- Y: Decrease selected digit.
- Z: Set the spawn coords to the player's current position.
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 coordinates are far away.
- 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 when spawned at the player position.
Reload Map
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.
Set/Clear/Goto Restart Point
Allows you to set the player's current location as the restart point, clear it, or return to it. This is the point the player returns to after loading a save game, falling into a void, etc.
Goto Last Save
Go back to the respawn point of the last saved game.
Environment
Allows you to edit environment-related variables (currently only the time of day).
Camera
This submenu contains camera functions.
Free Camera
The camera can be set to three modes:
- Normal: no debug controls.
- Stay: camera does not move on its own, but turns to look toward the player.
- Free: camera does not move or turn on its own.
- Analog stick: Move forward/backward/left/right.
- C stick: Tilt up/down/left/right.
- L/R: Move up/down.
- A: Return to player (override Stay and Free modes).
- Y: Turn to look at player (override Free mode).
- Z: Hold to move faster.
Bugs:
- Some cutscenes will still move the camera in Free mode.
- In Stay mode, the camera doesn't follow the player correctly if it's below them.
Game State
This submenu contains items relating to game data and memory.
GameBits
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.
- Sz: The number of (binary) bits this value is allocated.
- Value: The Bit's current value.
- Text: A name for this Bit, if known.
Controls:
- L/R: Scroll by 0x100.
- Stick Left/Right: Move cursor.
- X: Increment selected digit.
- Y: Decrement selected digit.
- Z: Cycle through tables.
Edit Player State
This menu lets you quickly edit some player state variables.
- Cur HP: Current hit points, in quarter-hearts.
- Max HP: Max hit points, in quarter-hearts.
- Cur MP: Current magic power.
- Max MP: Max magic power.
- Cur Lives: Current Bafomdad count.
- Max Lives: Max Bafomdad count.
- Money: Current scarab count.
- Tricky Food: Current Tricky food count, in quarter-mushrooms.
Pressing A will reset Cur HP/MP/Money/Lives to their maximum.
Cheats
Some cheat options useful for testing.
- Infinite HP: Health always at maximum.
- Infinite MP: Magic always at maximum.
- Infinite Money: Always have 255 scarabs.
- Infinite Lives: Bafomdad count always at maximum.
- Infinite Tricky Energy: Tricky food meter always at maximum.
- Frozen Baddies: Badguys are always frozen (as if hit by ice spell). This also affects bomb plants (they will not detonate). After turning this off you may need to reload the area to thaw them.
- Unlock Everything: Unlock all spells, Tricky commands, maps, Arwing levels, max out collectibles, and mark "got item" scenes as already seen.
Render
Contains options relating to viewing and rendering things.
- Blur Filter: Toggle a general blur effect.
- Motion Blur: Adjust intensity of motion blur effect.
- Heat Effect: Adjust intensity of heat wave effect.
- Monochrome: Toggle monochrome filter, used for some scenes.
- Spirit Vision: Toggle spirit vision color filter.
- Color Filters: Adjust some color filter settings.
- Color Filter: Toggle the filter (used for Sepia Mode cheat).
- Filter R/G/B: Adjust the filter's color.
- Color Scale: Adjust the saturation of the scene.
- View Textures: See below.
- Map Grid: Render the global map grid.
- Debug Objects: Toggle visibility of triggers, control objects, etc.
- The models are already present in the game. Most are simple cubes, which may not accurately convey the objects' size.
- This feature may cause some bugs with invisible control objects which don't work correctly when made visible.
- A few normally-hidden objects use the default cube model and rainbow texture. Some also use the same model as the CloudRunner Fortress crystals.
- Since some of these objects fade away at a very low distance, this function limits their opacity to ensure they're always visible, but not completely opaque.
View Textures
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.
Controls:
- 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.
Misc
- Edit Memory: View/edit all RAM.
- Kill Player: Instant death. (Setting HP to zero does not cause death; it will revert to 1.)
- Crash Game: Test thre exception handler.
Edit Memory
The first line displays the current address. The following lines display data at that address.
Controls:
- Analog stick: move cursor
- C stick: scroll
- X: increment selected digit
- Y: decrement selected digit
- Start: jump to the address at the cursor
- Z: go back to the previous address after jumping
- B: exit
The address can be edited directly as well. Going to an invalid address will probably crash the game.