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.
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 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 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 Coords: Shows player coordinates.
- Camera Coords: Shows camera coordinates.
- Restart Point: Shows restart point coordinates.
- Memory Stats: Shows memory usage percent.
- Heap Details: Shows usage of each heap.
- 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.)
- Tricky: Enables a lot of debug text from Tricky.
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.
- R: Restart Point coords and map ID.
- Target: Object the player is currently interacting with.
- HEAP: Blocks used, blocks total, bytes used, bytes total.
This submenu contains functions relating to maps and objects.
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.
- 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.
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.
- 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.
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 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.
Allows you to edit environment-related variables (currently only the time of day).
This submenu contains camera functions.
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.
- Z: Hold to move faster.
- 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.
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.
- Sz: The number of (binary) bits this value is allocated.
- Value: The Bit's current value.
- Text: The associated hint text. (This doesn't show up in most maps.)
- 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.
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.
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.
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.
- 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.
The first line displays the current address. The following lines display data at that address.
- 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.