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

Wii Sports/Unused Code

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Wii Sports.

This cactus is UNDER CONSTRUCTION
This article is a work in progress.
...Well, all the articles here are, in a way. But this one moreso, and the article may contain incomplete information and editor's notes.
Notes: I'm still reverse engineering the game as I need to:
  • Look for more debug prints
  • Find a way to activate the functionality of the camera editor from the debug menu
  • Describe the purpose of all the options in the debug menu
  • Port the main.dol hex edits to Gecko codes
  • Find the offsets of these functions in the NTSC-J v1.01 release of the game
Cacti speak Japanese.
...But what does it mean?
This game has text or audio that needs to be translated. If you are fluent with this language, please read our translation guidelines and then submit a translation!

The debug prints with Shift-JIS strings containing Japanese characters do not display properly on the NTSC-U nor PAL versions of the game.

Loading Screen

There is a function which prints "Now Loading" to the screen when the game switches between scenes; however, this function never gets called because the flag for displaying the screen is always cleared by the scene constructor.

WiiSeries PackProject-NowLoading.png

NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
Gecko Code
C21853BC 00000002
38C00001 90DF003C
60000000 00000000
C2185450 00000002
38C00001 90DF003C
60000000 00000000
C2185614 00000002
38C00001 90DF003C
60000000 00000000
Virtual address
of the function
displaying the
loading screen
0x801836e4 0x80183778 -

The Gecko codes above re-enable the loading screen by modifying the scene constructor to always set the flag which determines if the loading screen is displayed.

Placeholder Strap Warning Screen

In some versions of the game, the function which displays the strap warning screen checks the pack ID:

  • If the pack ID is 0 or 1, the normal strap warning screen will be displayed.
  • Otherwise, the string "ストラップ警告画面" will be printed to the screen.

WiiSeries PackProject-StrapWarningScreen.png

The text simply means something along the lines of "Strap Warning Screen".

The valid pack ID values are:

  • 0 (Wii Sports)
  • 1 (Wii Play)
  • 2 (Wii Fit)
  • 3 (Wii Music)
JP Rev 1 US Rev 1 EU Rev 1
Gecko Code
041D2A44 60000000
041D2ADC 60000000
041D2CA8 60000000
Virtual address
of the function
displaying the
strap warning
screen
0x801d2a0c 0x801d2aa4 -

The Gecko codes above enable the placeholder strap warning screen.

(Source: xUniverse1/GibHaltmannKill)

Performance Meter

WS processBar.png

The game's code initializes an instance of the ProcessMeter from the EGG library, used by some first party Wii games. The green bar measures the CPU sending commands to the GPU, the blue one shows the GPU rendering from said commands, and the red one displays the total frame time.

In one of the initialization functions (RPSysSystem::setup0), the game deliberately hides the performance bar from the screen (at 0x80183b18 (US v1.1)). To show it, use the Gecko code below:

US v1.1
Gecko Code
04183B08 38800001

Exception Handler

WS exceptionhandler.png

The exception handler from the EGG library is present in the v1.0 versions of the game (i.e. the ones built prior to 2007). When the game crashes, press the following buttons (in order, from left to right) on the 1st Wii Remote (Vertical) to bring it up:

HOME, A, B, 1, 2, -, +

Use the D-Pad to scroll. The button data above is located at 0x8034ab00 (US v1.0)

Unused Dodging Ball Types

Overview

In one of the Boxing minigames, Dodging, the player has to avoid Tennis balls thrown by the trainer.
However, there is code and assets for more ball types the trainer can throw other than the Tennis ball... some of which have unique properties! Below is a list with all the supported types, alongside its ID and codename:

  • 0 = Tennis (box_ball_tns) (Used)
  • 1 = Baseball (box_ball_bbl)
  • 2 = Golf (box_ball_glf)
  • 3 = Bowling (box_ball_bwg): Every time a new ball is thrown, it changes to one of 4 colors (although the color of the tail is always blue). This ball type does not bounce in the floor.
  • 4 = Ping Pong (box_ball_pin): This ball type is recycled from one of the minigames in Wii Play.
  • 5 = Billiards (box_ball_bad): This ball type is recycled from one of the minigames in Wii Play. Every time a new ball is thrown, it changes to one of 10 colors and numbers (although the color of the tail is always white). This ball type does not bounce in the floor.

The hitbox for each ball type is correctly sized (so, for example, bowling balls have a big hitbox, unlike the ping pong ones). Also note that only the Tennis ball plays a sound effect when it hits the player.
The location for the models and textures of all the different ball types can be found at /Common/RPBoxScene/MainGame.carc/G3D/box_ball.brres. Their effects are located in common.carc/Effect/ in that same directory (v1.0)

Technical Explanation

NOTE: The following virtual addresses are for the US v1.1 version of the game.

The constructor of the Boxing ball object sets the type field of the object to 0 (Tennis ball), and although the object class supports other field types, because the initial state of the object forces the ball to be a Tennis ball, every ball is a Tennis ball.
Alternatively, the constructor may receive the type of the ball as an argument, but in practice the game only passes 0 (Tennis ball) as the argument value to the constructor.

The function at 0x802fc584 sets up the Dodging Training game. The function has a loop ("starting" at 0x802fc618, and "ending" at 0x802fc718) which allocates and constructs (the inlined constructor "starting" at 0x802fc62c and "ending" at 0x802fc700) 128 boxing ball objects, and each ball is constructed with the Tennis ball type (we can't tell whether this is because of the constructor itself or because of the arguments passed to the constructor). As such, normally every ball is of type 0 (Tennis ball).
(Note that "starting" and "ending" are in quotation marks because it's hard to unambiguously define the start and end points of the loop and the constructor.)

Codes

The following code forces all balls thrown to be of a specified ball type (with the X = the ball type ID, see above)

US v1.1 EU v1.1
Gecko Code
C22FC630 00000002
3800000X 90030004
60000000 00000000
C22FC7FC 00000002
3800000X 90030004
60000000 00000000

The code below makes every ball thrown cycle through each of the ball types supported.

NOTE: The intention of this code is to test each ball type easier. There is no evidence that each ball would have actually cycled through each of the ball types.

US v1.1 EU v1.1
Gecko Code
C22FC630 00000004
38000006 7F340396
7F3901D6 7F39A050
93230004 3B200000
60000000 00000000
C22FC7FC 00000004
38000006 7F340396
7F3901D6 7F39A050
93230004 3B200000
60000000 00000000


(Gecko Codes / Technical Explanation: xUniverse1/GibHaltmannKill)

Unused Boxing Energy Feature

Overview

In Boxing, there's an unused feature that seems similar to the energy mechanic from the Punch-Out!! games.

Each boxer has an energy value that depletes as their punches miss or get blocked, and as their energy depletes, their gloves will lose their color. The energy regenerates if the players properly connects their punches or simply idles, making the color of the gloves gradually return to normal.
When a boxer's punch is blocked while they have no energy, they enter a stunned state, where they can only move around while the other player can freely hit them. In this state, the camera will zoom out from the stunned player, and one of their gloves will rest on their hips. In the other hand, the camera will switch to first person for the other player. If the stunned player is a CPU, they will mimic the movements of the human player.

Once a player is stunned, their energy will be refilled completely when the player gets up after being knocked down or when the next round starts (as they don't regenerate their energy once stunned), becoming unstunned, and being able to fight once again.

This feature could be seen in footage of the post-E3 2006 demos of the game, although a few differences are present from that build. For instance, when a player got stunned, an exclamation mark graphic would have appeared in the other player's screen. In the final version, this was replaced with a yellow effect.

Codes

This feature is disabled by default. To enable it, the Boxing scene flag 0x01 must be set. By default, flag 0x08 is set, so changing that value to 0x09 is enough to enable the feature. This can be done with the following Gecko code:

US v1.1 EU v1.1
Gecko Code
043069dc 38000009
04306BA8 38000009

NOTE: Becoming stunned can be a bit difficult, given how the energy value mentioned above regenerates relatively quickly. In order to get stunned more easily, add the following line to the code above, which disables the energy regeneration:

US v1.1 EU v1.1
04305ca8 60000000
04305E74 60000000


(Discovery: kiwi)

Debugging Functions

Build Dates

Originally, Nintendo developed a prototype software which included several tech demos that tested the Wii Remote's capabilities. The tech demos were divided into 2 categories: sports games, which became part of Wii Sports, and family-oriented games, which became part of Wii Play.

(Source: Nintendo)

Included in the file timeStamp.txt at the root of the disc is a build date, alongside the internal name of the prototype software, "Pack Project". On the Wii Sports + Wii Sports Resort combo disc, this file is located with the rest of the game's files; e.g., on the European disc, in /EU/sys/sports.

JP JP Rev 1 NA NA Rev 1 EU EU Rev 1 KR TW NA (Sports + Resort)
2006/10/25
11:52
Pack Project
2007/07/05
19:14
Pack Project
2006/10/07 
04:53
Pack Project
2007/07/05 
19:15
Pack Project
2006/10/17 
15:26
Pack Project
2007/07/05
20:25
Pack Project
2008/03/11 
15:02
Pack Project
2008/03/14
15:17
Pack Project
2010/06/07
14:04
Pack Project
EU (Sports + Resort)
2010/06/07 
14:10
Pack Project

There are two different functions which were used to print the contents of timeStamp.txt to the screen on the title screen.

WiiSports-Debug-BuildDate-Rev0.png

The function used to print the build date in Revision 0 prints the region, build type and the date and time in different lines.


WiiSports-Debug-BuildDate.png

The function used to print the build date in Revision 1 only prints the date and time in a single line.


JP Rev 0 JP Rev 1 US Rev 0 US Rev 1 EU Rev 1
Gecko Code
041D0F54 60000000
041EB9AC 60000000
041D0B88 60000000
041EBA44 60000000
041EBC10 60000000
Virtual address
of the function
printing the
build date
to the screen
0x80158fcc 0x80186c98 0x80158edc 0x80186d30 -

To enable this on bootup, either use the Gecko codes above, or enter the key combo mentioned in Wii Fit Plus' internal docs, "A, Up (D-Pad), 2, Down (D-Pad), B, 1, 1, B, Left (D-Pad), A and Right (D-Pad)" on a Wii Remote.

Bowling

Pin Debug Displays

Located at the following virtual addresses:

JP Rev 1 US Rev 1
0x803295c0 0x80329658

There exists a function that, for a given pin, may display its axes, its collision spheres, its vertices, and/or spheres which represent the pin's state, depending on the arguments given.

(Source: xUniverse1/GibHaltmannKill)
Collision Spheres

WiiSports-BowlingDebugPin-Collision.png

If the first boolean argument given is true, then the function will render blue spheres representing the pin's collision. The function will also display the pin's axes.

JP Rev 1 US Rev 1 EU Rev 1
Standard,
Spin Control
and
Picking Up Spares
0049A0E8 00000001 004A9DE8 00000001 004C4368 00000001
Power Throws 004AD180 00000001 004BCE80 00000001 004D7400 00000001

To enable this, use the Gecko codes above.

Vertices

WiiSports-BowlingDebugPin-Vertices.png

If the second boolean argument given is true, then the function will render yellow spheres representing the pin's vertices. The function will also display the pin's axes.

JP Rev 1 US Rev 1 EU Rev 1
Standard,
Spin Control
and
Picking Up Spares
0049A0E9 00000001 004A9DE9 00000001 004C4369 00000001
Power Throws 004AD181 00000001 004BCE81 00000001 004D7401 00000001

To enable this, use the Gecko codes above.

Status Spheres

WiiSports-BowlingDebugPin-StatusFlags.png

If the third boolean argument given is true, then, after the ball has stopped moving, the function will render blue spheres above the pins which aren't moving. In every game mode except for Power Throws, the function will also render yellow spheres above the pins which have been knocked down.

JP Rev 1 US Rev 1 EU Rev 1
Standard,
Spin Control
and
Picking Up Spares
0049A0EA 00000001 004A9DEA 00000001 004C436A 00000001
Power Throws 004AD182 00000001 004BCE82 00000001 004D7402 00000001

To enable this, use the Gecko codes above.

Scene Status Displays

Located at the following virtual addresses:

NTSC-J v1.01 NTSC-U v1.01
0x8032f47c 0x8032f514

There exists a function that checks for three debug flags in the game's main bowling data structure, with each flag enabling a different part of the debug display.

"Try Again" Placeholder

The function checks for one of the debug flags, and if the flag is set, it prints the string "トライアゲイン" to the screen.

WiiSports-BowlingDebug-TryAgainPlaceholder.png

NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
0432F49C 60000000 0432F534 60000000 0432F700 60000000

To enable this, use the Gecko codes above.

Score Display

The other two debug flags checked by the function display the score for the minigames.

Gecko Code Screen
NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
Power Throws
C2337F68 00000002
38800001 9883000E
809B0028 00000000
C2338000 00000002
38800001 9883000E
809B0028 00000000
C23381CC 00000002
38800001 9883000E
809B0028 00000000
WiiSports-BowlingFitnessDebug-PowerThrows.png
Spin Control
and
Picking Up Spares
C2346254 00000002
38800001 98830015
8096002C 00000000
C23462EC 00000002
38800001 98830015
8096002C 00000000
C23464B8 00000002
38800001 98830015
8096002C 00000000
WiiSports-BowlingFitnessDebug-GateChallenge.png

The top score is used for the Training game mode, while the bottom score is used for the Wii Fitness game mode (albeit the bottom score is based on the top score). The top score is updated every frame, while the bottom score is only calculated when the game ends, and the calculation is based on the top score.

To enable the score display, use the Gecko codes above.

Debug Graphs

Hmmm...
To do:
  • Describe and explain all the graphs.
  • Figure out what triggers the green text (pressing/holding the D-Pad while throwing the ball seems to have an effect on the green text appearing)

There is a function which, when its debug flag is set, draws many graphs to the screen.

NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
Gecko Code
0432341C 38800001
043234B4 38800001
04323680 38800001
Virtual address
of the function
displaying the
graphs
0x80320e64 0x80320efc -

This display was developed with widescreen in mind, as attempting to view this with a 4:3 aspect ratio results in much of the right edge of the display getting obscured from view. Because of this, these images were captured with a widescreen (16:9) aspect ratio.

The Gecko codes above enable the graphs.

Phase 1 Display

WiiSports-BowlingDebugGraph-Phase1BeforeThrow.png

The graph is in its first phase when the Mii is still holding the ball.

Phase 2 Display

WiiSports-BowlingDebugGraph-Phase2ThrowStart.png

The graph transitions to its second phase when the Mii drops the ball, or at the start of a roll.

Phase 3 Display

WiiSports-BowlingDebugGraph-Phase3NoGreen.png

WiiSports-BowlingDebugGraph-Phase3Green.png

NPC Data Display

The 6 Miis bowling in the neighboring lanes are referred to internally as "NPCs", and the DOL function at 80331654 (US v1.01 offset) displays information about them on-screen, presuming the debug flag it checks is set.

The NPCs have 6 states they can be in at any time, which describe the actions they will take on the lane: IDLE, WAIT_PREPARE_LINE, PREPARE, RUN, SEE, and BACK.

WiiSports-BowNPCDebug.png


To enable this in the US v1.01 release of the game, change the byte at 0x32D717 in the DOL from 00 to 01.
To enable this in the EU v1.01 release of the game, change the byte at 0x32D8E3 in the DOL from 00 to 01.

Debug Menu

Hmmm...
To do:
Find the use of each of the menu options

Bowling has a debug menu; some of the options available on menu may be disabled depending on the current game mode of Bowling.

Gecko Code Menu
NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
Standard 04313FFC 3880FFFF 04314094 3880FFFF 04314260 3880FFFF WiiSports-DebugMenu-Standard.png
Power Throws 04313FDC 3880FFFF 04314074 3880FFFF 04314240 3880FFFF WiiSports-DebugMenu-Training.png
Spin Control 04313FEC 3880FFFF 04314084 3880FFFF 04314250 3880FFFF
Picking Up Spares 04313FCC 3880FFFF 04314064 3880FFFF 04314230 3880FFFF

To enable the debug menu, use the Gecko codes above.


(Source: xUniverse1/GibHaltmannKill)
Options
  • 試合: Starts the game with the given parameters (Only on Standard).
  • ナギタオシ: Starts the game (Power Throws) with the given parameters (Only in Training).
  • ゲートチャレンジ: Starts the game (Gate Challenge) with the given parameters (Only in Training).
  • トライアル: Starts the game (Trial) with the given parameters (Only in Training).
  • デモカメラエディター: Demo camera editor.
  • ステージ: Stage, used to force playing on a specified round in any of the training modes (Can be set to 1面から順に or 1-20面から順に).
  • モード: Mode, used on the training minigames (Can be set to トライアル (Training) or ゲートチャレンジ (Wii Fitness)).
  • プレーヤー数: Number of players, Number of players (Can be set to 1人, 2人, 3人 or 4人), all added players are randomly selected from the saved Miis in the player's console (unless the user has previously selected all the Mii characters before playing). If the user only has one Mii saved on their system, all the players are set the exact same as P1's Mii.
  • デバッグモード: Debug mode, (Can be set to 無効 or 有効). When enabled (set to 有効), replays are no longer skipped automatically.
  • 強制ステージクリア: Force Stage Clear, Forces perfect stage clears/strikes regardless if any pin is knocked over or not. (Can be set to 無効 or 絶対クリア/絶対ストライク)
  • チャレンジの最終面: How many innings it takes before ending the game (Can be set to デフォルト(クリアシーケンスのデバッグ用)or 1-30(クリアシーケンスのデバッグ用)).
  • パッドによるカーブ方向判定: Something with using the D-Pad for curve adjustment, unknown. (Can be set to 左 or 右)
  • 利き手1P: Dominant hand for player 1, sets the hand type of Player 1 (Can be set to 左 (right-handed) or 右 (left-handed)).
  • 利き手2P: Dominant hand for player 2, sets the hand type of Player 2 (Can be set to 左 (right-handed) or 右 (left-handed)).
  • 利き手3P: Dominant hand for player 3, sets the hand type of Player 3 (Can be set to 左 (right-handed) or 右 (left-handed)).
  • 利き手4P: Dominant hand for player 4, sets the hand type of Player 4 (Can be set to 左 (right-handed) or 右 (left-handed)).
  • 絶対スプリット: Absolute split. Setting the option to 有効 will, for each Bowling frame, make the game think that after the first ball the pins will be in a split configuration (i.e. the number representing the score for the first ball will be encircled and every spare would be considered as a split spare), regardless of which pins were knocked down in the first ball.

----------- Crashes the game.

Camera Editor

Hmmm...
To do:
If possible, find a way to activate the functionality of the camera editor using an existing function in the game (rather than a Gecko code which has a lot of custom code)

The fifth option in the menu is a camera editor; however the game doesn't have an interface that allows the player/user/debugger to change between the different cameras. It is only possible to open the camera editor in a minigame; attempting to open the camera editor in the standard main mode of Bowling causes the game to crash.

WiiSports-BowlingDebug-CameraEditor.png

The following Gecko codes provide the user an interface of switching between different cameras (by using the D-Pad):

NTSC-J v1.01 NTSC-U v1.01 PAL v1.01
Gecko Code
C234C174 0000000C
807D000C 80A30030
810D9968 8108001C
81080000 81080018
550607FE 5507FFFE
39200033 7C063851
41A20030 7CA02A15
40A0000C 38A00033
48000010 2C050033
40A10008 38A00000
38000000 900317C4
900317C8 900317CC
90A30030 00000000
C234C20C 0000000C
807D000C 80A30030
810D9968 8108001C
81080000 81080018
550607FE 5507FFFE
39200033 7C063851
41A20030 7CA02A15
40A0000C 38A00033
48000010 2C050033
40A10008 38A00000
38000000 900317C4
900317C8 900317CC
90A30030 00000000
C234C3D8 0000000C
807D000C 80A30030
810D9968 8108001C
81080000 81080018
550607FE 5507FFFE
39200033 7C063851
41A20030 7CA02A15
40A0000C 38A00033
48000010 2C050033
40A10008 38A00000
38000000 900317C4
900317C8 900317CC
90A30030 00000000


(Source: xUniverse1/GibHaltmannKill)