If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Mario Kart: Double Dash!!/Debug Content

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Mario Kart: Double Dash!!.

Hmmm...
To do:
  • The screenshot feature returns something in the debug build. Verify this.
  • The debug camera header has some bad formatting.

While there aren't full fledged debug menus as seen within the debug build, a sizable amount of leftovers are still present across all retail versions.

General Debug Features

Debug Camera

MKDD DebugCamera.png

The debug camera can be controlled with a second controller plugged into port 2. To enable the debug camera, start a race and press Up on the D-Pad of the first controller plugged into port 1. To disable the camera, press Down.

Some variables will appear on screen when the debug camera is active. X, Y and Z under CAMERA display the current position of the camera, while X, Y and Z under LOOK display the current position that the camera is looking at. X_DIR and Y_DIR display the degrees that the camera is rotated to, and FOVY displays the field of view. X_DIR and FOVY are the only variables with a maximum, with X_DIR only being able to rotate the camera 80 degrees up and down, and FOVY being able to set the field of view between 1 and 180.

The controls are as follows:

  • B/A: Zoom In/Out.
  • Y/X: Move Up/Down.
  • L/R: Rotate Left/Right.
  • Z: Reset to a default position.
  • Stick Up/Down: Look Up/Down.
  • D-Pad Up/Down: Move Forward/Backward.
  • D-Pad Left/Right: Strafe Left/Right.
The default position
after letting go of
the Z button is as follows:
CAMERA:
X: 9000.0
Y: 3650.0
Z: 17000.0
Y_DIR: 135
X_DIR: 1
FOVY: 40.0
LOOK:
X: 9709.2
Y: 3665.3
Z: 16295.1
USA Europe / Australia Japan
Encrypted (AR)
T4Z0-BZCR-RDNNJ
C86V-J3JB-4GYCA
ZA4F-1RFF-JX5E9
5H6V-5HV6-RMR9X
7UV9-8QH5-KWH3N
ZN50-V07A-MNJ18
9WUJ-89HT-5WTJJ
C4HD-WXY9-7VB45
KPB3-GKFZ-0BEC6
CAWU-PCQW-WPZU6
C0CN-29UN-K18P9
CAYP-UGRP-AXPXN
U677-K5HY-DRPQQ
J58F-B7CT-4KFEB
W41H-RE3D-4EGQQ
Decrypted (Gecko)
3A3A4D6C 00000004
04361280 8029F1E4
3A3A4D6C 00000008
04361280 8029F248
3A3AEB8C 00000004
0436B0C0 8029F1C0
3A3AEB8C 00000008
0436B0C0 8029F224
3A3BF38C 00000004
0437B8A0 8029F20C
3A3BF38C 00000008
0437B8A0 8029F270

Debug Process Bar

MKDD ProgressBar.png

This function draws several colored bars on the bottom of the screen. This process bar works identical to the one found in the debug build, with an exception for the pink bar, which doesn't do anything, and it's unknown what it was meant to do.

USA Europe / Australia Japan
Encrypted (AR)
NJT3-9QB8-4CRQG
2UDU-XFM4-CZZQK
2YTE-VKKX-T878P
B9X1-FERX-KA911
TU00-BHX6-J5HTA
G11V-1CWM-P53HF
KT9H-TM08-7ZR0F
7TUX-AFE9-BRPYC
ZU71-3ACE-YR7ZW
Decrypted (Gecko)
403CAD28 00010C01
403CAD28 00013001
403D4B60 00010C01
403D4B60 00013001
403E5350 00010C01
403E5350 00013001
(Source: Ralf@GC-Forever)

Item Slot Table

MKDD-ItemSlotTableDebugDraw.png

This function prints the contents of the item slot table read from itemslotlist.dat that is currently used for the current race or battle. The function that prints this is called ItemObjMgr::draw, and is also present in the debug build.

USA Europe / Australia Japan
Encrypted (AR)
6N3C-5175-85VWG
CZPX-W2G1-9XBHW
KPF3-ZV8H-6PF4A
K1QJ-8X74-DBC8H
ZCEU-G0QE-Y68X6
72J3-6FV5-ANTZP
CEWE-P2KF-N96M7
0DGH-CMDK-4FMU9
AYJ7-V3YQ-6CUA6
ZRGP-GJR5-BFE66
MDZK-GEJH-WF2RE
KPF3-ZV8H-6PF4A
73U8-6KUA-X8XHV
TNKK-XCXM-VEE1W
72J3-6FV5-ANTZP
CEWE-P2KF-N96M7
0DGH-CMDK-4FMU9
AYJ7-V3YQ-6CUA6
FBD5-WXGV-BZ5YF
CZPX-W2G1-9XBHW
KPF3-ZV8H-6PF4A
K1QJ-8X74-DBC8H
JQF1-WUVB-PDYA9
72J3-6FV5-ANTZP
CEWE-P2KF-N96M7
0DGH-CMDK-4FMU9
AYJ7-V3YQ-6CUA6
Decrypted (Gecko)
c21892f0 00000007
9421fff0 7c0802a6
90010014 806dab20
3d808020 618cbfe0
7d8903a6 4e800421
80010014 7c0803a6
38210010 4e800020
60000000 00000000
c2188194 00000007
9421fff0 7c0802a6
90010014 806dab40
3d808020 618cbfb0
7d8903a6 4e800421
80010014 7c0803a6
38210010 4e800020
60000000 00000000
c21892f0 00000007
9421fff0 7c0802a6
90010014 806dab20
3d808020 618cc008
7d8903a6 4e800421
80010014 7c0803a6
38210010 4e800020
60000000 00000000

LAN Entry Screen Debug State

MKDD-LanEntryScreenDebugState.png

The LAN mode connection screen has an extra debug state (which calls SceneLanEntry::debug) used to cycle through the messages. The messages can be cycled by pressing Up or Down on a controller plugged into port 1. This screen can still exited by pressing the B button.

Europe / Australia Japan USA
Encrypted (AR)
07J4-Z85R-HXT98
RX7N-BUJY-QG8WD
BADJ-WQ5G-2640X
NNY6-CQTW-WZ7MW
KFAK-QW8U-BXN25
5VB1-V332-5MN3C
Decrypted (Gecko)
041718c4 3800000b
0417195c 3800000b
04172a20 3800000b
04172abc 3800000b

SceneTest Debug Menu

Gamecube-MKDD-Debug SceneTest-1.png

SceneTest brings up a debug menu that allows the player to select any menu present in the game. This menu was also present in the debug build and is the only functioning remnant of the debug menu, as the other submenus had most of their code removed.

The codes below will load the menu after pressing any button on the title screen.

USA Europe / Australia Japan
Encrypted (AR)
DX2Q-85MM-A6A8A
QR6U-KQYU-N02B6
8Z4C-KTED-TDTVX
W036-K1AH-6VRC8
UV9Y-XM33-E9X2N
CZ72-BG2N-5PT29
JGHB-DM1H-HW39D
A975-F6U7-4ANUY
GEEJ-JBJ3-Y27P7
3G33-BA47-ACU4V
2GZV-XZXC-0PFN5
W036-K1AH-6VRC8
9UGG-M20R-GG454
CZ72-BG2N-5PT29
ERUR-7RR8-U367J
A975-F6U7-4ANUY
8V89-J3E3-C9RR8
QR6U-KQYU-N02B6
8Z4C-KTED-TDTVX
W036-K1AH-6VRC8
6KY6-0D5G-E6T0T
CZ72-BG2N-5PT29
JGHB-DM1H-HW39D
A975-F6U7-4ANUY
Decrypted (Gecko)
c212d95c 00000002
38600002 808daa00
90640044 00000000
c21d9838 00000003
3860000e 3c80801d
60841d78 7c8903a6
4e800421 00000000
c212d980 00000002
38600002 808daa20
90640044 00000000
c21d981c 00000003
3860000e 3c80801d
60841d04 7c8903a6
4e800421 00000000
c212d95c 00000002
38600002 808daa00
90640044 00000000
c21d9860 00000003
3860000e 3c80801d
60841d78 7c8903a6
4e800421 00000000

Exception Handler

Gamecube-MKDD-ExceptionHandler-1.png

If the game crashes at any point, pressing A, B, X, Y, L, R, Z in order on any controller will bring up an exception handler. After the crash has been fully processed, the screen starts autoscrolling.

(Source: @UnclePunch_)

Debug Symbol Map

debugInfoS.MAP is a text file containing addresses and file names for some of the source files, which would have been resolved into function names if the game were to crash and the exception handler was triggered. This file is also included in the debug build, North American kiosk demo and European kiosk demo, but not present the Japanese kiosk demo. In all iterations of debugInfoS.MAP, the addresses do not align with the respective builds' executable .dol code. The debug build's debugInfoM.MAP file, however, does align with its game code.

Download.png Download debugInfoS.MAP Linker Address Map
File: MarioKartDD-DebugInfoS.7z (1.08mb) (info)


Course Debug Features

Debug Course Models

There is an unused halfword debugging variable with the symbol name Course::sDrawAreaModel. If bit 0 of this variable is set, the game will draw black cubes or cylinders in specific areas of specific courses. The function responsible for deciding when to draw the debug model and which area of the course in specific is called Course::drawModelForDebug. Debug models are present in one of nine of the following stages:

USA Europe Japan
Encrypted (AR)
45G8-G3TY-PKGRJ
A4U6-TN0G-ZWA3Z
N99N-C336-XNZ1B
DJT2-D1HT-D2VUE
83WT-NTYY-Z5FBN
W1ZH-Y1G4-0PET1
Decrypted (Gecko)
023cb7d0 00000001
023d5610 00000001
023e5df0 00000001

DK Mountain Bridge's Print Message

MKDD-BridgeParamNotFoundMsg.png

The bridge on DK Mountain just before the finish line (whose object name is StringBridge) loads an .lbd file (used to configure the bridge) depending on one of the object's setting values. This can only ever be 4501, so the file loaded is always in the course's archive at path Bridge/Bridge_4501.lbd.

In StringBridge's constructor object, there is a conditional block which is entered if the requested file does not exist, which can never happen during normal gameplay. It prints the error message (by calling JSystemM::JUTReport) using a format string, as seen in the screenshot ("BridgeParam Not Found. /Bridge/Bridge_4501.lbd") if the bridge's object's setting value is 4501.

The formatted string can be found in the following locations:

USA Virtual Address Europe / Australia Virtual Address Japan Virtual Address
0x80337b78 0x803419b8 0x80352198

Leftover Debug Features

Screenshot Feature

During development, a dedicated screenshot feature was implemented, presumably to take direct high quality captures for media purposes. This feature is mentioned by the game's debug symbol map, but otherwise no longer exists in the final game. The following functions are present in the debug symbol map:

ScrnShot::createScrnShot(int, int, _GXTexFmt)
ScrnShot::ScrnShot(int, int, _GXTexFmt)
ScrnShot::capture()
ScrnShot::saveFile()
ScrnShot::convTextureToBitmap()
ScrnShot::genMessage(JORMContext *)
ScrnShot::listenPropertyEvent(JORPropertyEvent const *)
ScrnShot::sScrnShot()

Despite this feature no longer being present in the final game, its code is present in the game's debug build.

Force Lap Functionality

In the debug build of the game, there is functionality to force the lap count to be either 1 or 2 via button combinations. The part of code that reads button combinations to set the RaceMgr::sForceTotalLapNum variable is not present in the retail builds, however this variable is still read and can overwrite the lap count if the variable is non-zero. Since RaceMgr::sForceTotalLapNum is never written to in the retail builds, it is impossible to see this unused functionality unless the variable is written to via cheating.

The following table represents the addresses of the RaceMgr::sForceTotalLapNum halfword variable:

USA Virtual Address Europe / Australia Virtual Address Japan Virtual Address
0x803cb7ec 0x803d562c 0x803e5e0c