mDoMain::developmentMode (developmentMode__7mDoMain) If this variable is set to 1, all the debug info is shown. The game sets it when you change the disc version! This isn't the only way to enable it though... See "Exceptions" below debug() function: This function does nothing at all if developmentMode is set to zero. Otherwise... Controller 3: Hold down R and press Z Toggles mDisplayHeapSize If mDisplayHeapSize is set to 1, then: - Controller 3: Hold down L and press Z - Cycles mHeapBriefType between 1, 2, 3, 4 and 5. It starts at 4. These features were already listed in the TP thread, but they exist in WW too. It's for the text that shows up on the right side of the screen with RAM info. If mDisplayHeapSize is set to 0, then Debug_console(JUTGamePad *) is called. I think I'll just decompile it instead of trying to explain everything... bool Debug_console(JUTGamePad *pad) { JUTConsole *console = JFWSystem::systemConsole; if (console == 0) return false; static float console_position_x = 20.0f, console_position_y = 30.0f; static float console_scroll = 0.0f; // Not sure exactly what this does?? // If you press Z and no other buttons are pressed... if ((pad->pressedNow & 0x10) && !(pad->held & ~0x10)) { console->boolfield_0x64 = !console->boolfield_0x64; JUTAssertion::setMessageCount(0); } if (console->boolfield_0x64 == 0) return 0; // If L and R are pressed if (((pad->held & 0x40) && (pad->held & 0x20)) || (pad->button.triggerLeft != 0 && pad->button.triggerRight != 0)) { float scrollX = pad->stick.x, scrollY = pad->stick.y; // If X, Y and Start are pressed if ((pad->held & 0x400) && (pad->held & 0x800) && (pad->held & 0x1000)) { console->clear(); } // If neither X or Y are pressed if (!(pad->held & 0x400) && !(pad->held & 0x800)) { // Scroll the thing // Not sure if this code is 100% correct or not console_scroll -= scrollY; int newValue; if (console_scroll > 1.0f) { newValue = (int)console_scroll; } else if (console_scroll < -1.0f) { newValue = -((int)(-console_scroll)); } else { newValue = 0; } if (newValue != 0) { console_scroll -= newValue; console->scroll(newValue); } } else { // If X is pressed if (pad->held & 0x400) console_position_x += scrollX; // ... and Y if (pad->held & 0x800) console_position_y += scrollY; } // If A is pressed if (pad->pressedNow & 0x100) { console->dumpToTerminal(0xFFFFFFFF); console->field_0x58 = 3; } JUTReport(30, 390, 1, "Press X+Y+START to CLEAR console."); JUTReport(30, 400, 1, "3DStick UP/Down to scroll"); JUTReport(30, 410, 1, "Press A to output terminal from console."); JUTReport(30, 420, 1, "SCROLL:%3d %3d %3d Output=%1x", console->getLineOffset(), console->field_0x40, console->field_0x44, console->field_0x58); } else { // If D-pad Down is pressed if (pad->pressedNow & 4) { // what's this?! // Controls something related to drawing g_HIO->bfield_0x6 ^= 1; } // If D-pad Left is pressed if (pad->pressedNow & 1) { JKRAramHeap *heap = JKRAram::sAramObject->field_0x80; if (heap) heap->dump(); DynamicModuleControlBase::dump(); g_dComIfG_gameInfo.resControl.dump(); } // If D-pad Right is pressed // dump_sort does nothing :( if (pad->pressedNow & 2) { JKRHeap::sSystemHeap->dump_sort(); } // If D-pad Up is pressed if (pad->pressedNow & 8) { zeldaHeap->dump_sort(); gameHeap->dump_sort(); archiveHeap->dump_sort(); } JUTReport(30, 440, 1, "Press L+R trigger to control console."); JUTReport(30, 450, 1, "Press [Z] trigger to close this window."); } console->field_0x40 = (int)console_position_x; console->field_0x44 = (int)console_position_y; return true; } Unfortunately I can't find anything else debug related :( -- EXCEPTIONS -- When the game crashes, an exception is triggered. This is handled by the JUTException class. When the game is starting up, it assigns two callbacks: void myExceptionCallback(ushort, OSContext *, ulong, ulong); void fault_callback_scroll(ushort, OSContext *, ulong, ulong); // In mDoMch_Create() JUTException::setPreUserCallback(&myExceptionCallback); JUTException::setPostUserCallback(&fault_callback_scroll); myExceptionCallback is the interesting bit here. It lets you press a specific key combination to activate the development mode! Here's the code behind this: void myExceptionCallback(ushort, OSContext *, ulong, ulong) { mDoMain::sHungUpTime = OSGetTime(); JUTGamePad::clearForReset(); OSReport("振動停止&原点復帰\n"); JUTException *excMgr = JUTException::sErrorManager; if (excMgr == 0) { // This code should never be triggered! OSReport("例外マネージャがありません\n"); PPCHalt(); } if (!mDoMain::developmentMode) { JUTGamePad gamepad(0); excMgr->field_0x70 = &gamepad; excMgr->field_0x74 = -1; if (excMgr != 0) { OSEnableInterrupts(); OSReport("キー入力を受け付けています\n"); while (!mDoMain::developmentMode) { u32 pressedNow, held; // Note: pressedNow == Field 0x1C in JUTGamePad // held == Field 0x18 in JUTGamePad // pressedNow contains the buttons that were pressed this tick. // So, if the player presses A, it will be returned once in // pressedNow, but it will be zero the next time. // held contains all the buttons that are currently held. excMgr->readPad(&pressedNow, &held); developKeyCheck(pressedNow, held); JUTException::waitTime(30); if (JUTGamePad::C3ButtonReset::sResetOccurred) { OSReport("リセット受け付けています\n"); OSResetSystem(1, 0, 0); } } OSReport("JUTAssertionを可視化しました\n"); JUTAssertion::setVisible(true); JUTDbPrint::sDebugPrint->bfield_0xC = true; JFWSystem::systemConsole->field_0x58 = 3; } else { PPCHalt(); } } else { OSReport("3秒間停止\n"); JUTException::waitTime(3000); } } Keys: 0001 = D-pad Left 0002 = D-pad Right 0004 = D-pad Down 0008 = D-pad Up 0010 = Z 0020 = R 0040 = L 0100 = A 0200 = B 0400 = X 0800 = Y 1000 = Start u32 developKeyCheck(u32 pressedNow, u32 held) { static char key_link, key_ganon, key_zelda; // Hold down Z, R and L; then press D-pad down if (held == 0x74 && pressedNow == 4) { if (key_link == 3 && key_ganon == 6 && key_zelda == 5) { mDoMain::developmentMode = true; } else { key_link = 0; key_ganon = 0; key_zelda = 0; } } // Hold down D-pad right, then press L if (held == 0x42 && pressedNow == 0x40) key_link++; // Hold down D-pad up, then press R if (held == 0x28 && pressedNow == 0x20) key_ganon++; // Hold down D-pad left, then press Z if (held == 0x11 && pressedNow == 0x10) key_zelda++; return mDoMain::developmentMode; }