More details on the Animal Crossing debug mode registers.
Debug register mapping
Almost all of the
debug_mode buffer maps to 16-bit debug registers that can be edited through the in-game debug menu.
This Python script plots out how the debug mode registers map to a memory offset in the
debug_mode buffer: https://gist.github.com/jamchamb/635b99bc561b4bc1adaf2216ef691945. For example, here are the some of the HREG value offsets:
$ ./plot_debug_mode.py -r HREG H(HREG) 0 @ offset 0x0fd4 H(HREG) 1 @ offset 0x0fd6 H(HREG) 2 @ offset 0x0fd8 H(HREG) 3 @ offset 0x0fda ...
Used to check the safe area of the display.
There are two ways to activate this:
- Set HREG 39 to -1
- Set HREG 80 to 41
- Set HREG 81 to a non-zero value
- Edit the four registers 82-85 to change boundaries
Finally revisited the debug mode. It turns out the buffer that enables various debug settings is editable via the REG menus in zuru mode 2, like these safety frame and panning features that can be set in HREG (used by the "hayakawa" debug functions, named after the programmer?) pic.twitter.com/TPUEBvFNCY— James Chambers (@jamchamb_) November 3, 2018
- Set HREG 80 to 42
- Pan the screen with HREGs 82-85 (very glitchy in Dolphin)
- Edit HREG 81 to reset (or toggle HREG 80 off 42 and then back)
- Set HREG 47 to a non-zero value
- Press buttons on any connected controller
- HREGs 40-43 passively reflect controller input
There are also settings for skipping/speeding up frames, disabling "think" functions for characters or game engines, etc., as well as this controller button display (set HREG 47 to 1). The editors are opened by holding L or R slightly and tapping another button on controller 2. pic.twitter.com/daZQR7cpT6— James Chambers (@jamchamb_) November 3, 2018
HREG 3 controls which game ID to launch:
- -1: Filer mode
- 0: Default ID set from furniture (e.g. “Golf NES” furniture will launch Golf)
- 1 or above: Override game ID (e.g. 2 = Balloon Fight, 3 = Donkey Kong)
HREG 3 overrides which NES game will start up (here I'm using the Excitebike console but booting Balloon Fight and Donkey Kong instead) pic.twitter.com/EGkP6ZiNFo— James Chambers (@jamchamb_) November 3, 2018
Set SREG 0 to a non-zero value.