Version differences

Revision as of 18:44, 2 April 2019 by Nim (talk | contribs)

Version Differences are differences in Super Mario 64 between different releases. Most differences, like translated text, are obvious; however, there are some subtle differences in the game's logic that aren't as readily apparent. Thanks to the decompilation of Super Mario 64, version differences are easier to spot and make sense of. This page aims to be a complete list of all the version differences in the game's source code (i.e. not text, sounds, etc.) between the original Japanese version (NTSC-J) and the North American version (NTSC-U).

Background

The Japanese version of Super Mario 64 was released on June 23, 1996, and the North American version 3 months later, on September 29. Between finalization of the Japanese version and release of the North American version, over 200 changes were made to the game's main code. Some of these are simple bugfixes, some are additions to the game, and some are as yet undeciphered.

This article keeps track of the version differences in the currently decompiled source code. 2 audio library files are as yet undecompiled and still remain as mostly ASM; though they contain version differences, the fact that they are in ASM makes them too opaque to fully understand. They are not listed here.

Version differences are found in the audio library and in the main game code. There are no version differences in the game's core engine, nor in the Goddard subsystem (a separate area of the code written in C++ by Giles Goddard and responsible for the draggable Mario head).

Differences

This list is in the form of a color-coded table. Green differences are fully understood; red differences are completely opaque; and yellow differences are in-between, relatively simple but with unexplored effects on the game.

File Difference
audio/dac.c In func_80316928, D_80226D7C is (in the U version) set to 172,320 times what it would be set to in the J version.
audio/data.c D_80332190 has different data in J and U versions.
audio/dma.c In func_80317270, osInvalDCache isn't called on the J version.
audio/interface_2.c 32 separate numeric literals are doubles in J but floats in U.
audio/interface_2.c 15 separate numeric literals are different between J and U. One of these changes results in a sound difference in Dialog037 (todo: elaborate)
audio/interface_2.c D_U_8033323C only exists in the U version. (note: this is apparently unused)
audio/interface_2.c The typedefs Arg1T and Arg2T are equivalent to u16 and u8 respectively on J version and s32 (both) on U version.
audio/interface_2.c unused_8031E4F0 and unused_8031E568 are remnants of unused debug functions that only exist on U.
audio/interface_2.c In the U version, func_8031D630 has a check that increments its second argument if it's 0. This is because later on in the function, a value is divided by this argument. This check does not exist in the J version.
audio/interface_2.c In func_8031D924 in the J version, (&D_80226D9C->task.t)->yield_data_ptr is set to gAudioSPTaskYieldBuffer and (&D_80226D9C->task.t)->yield_data_size is set to 0x400. In the U version, yield_data_ptr is set to NULL and yield_data_size is set to 0.
audio/interface_2.c Under certain circumstances in func_8031E16C, func_8031E0E4 will be called only in the U version.
audio/interface_2.c In the U version of func_8031EB24, "div" is set to "listIndex < 3 ? 2 : 3".
audio/interface_2.c In the J version of func_8031EB24, f12 is set to 0 if D_80332028[gCurrLevelNum] < D_80360C48[listIndex][item].unkC, and 1.0 - D_80360C48[listIndex][item].unkC / f0 otherwise. In the U version, if D_80360C48[listIndex][item].unkC > 22000.0f, f12 is set to 0; otherwise, the J logic is run except instead of setting f12 to 0 it sets it to ((22000.0f - D_80360C48[listIndex][item].unkC) / (22000.0f - f0)) * (1.0f - arg2).
audio/interface_2.c In the J version of func_8031EB24, when the 0x2000000 flag of D_80360C48[listIndex][item].unk14 is set, (D_80226EB8 & 0xf) / 192.0 is subtracted from f12 unless f12 is 0. In the U version, when the flag is set, (f32) (D_80226EB8 & 0xf) / 192.0f; is subtracted from f12 unless f12 is less than 0.8.
audio/interface_2.c In the J version of func_8031ED70, "level" is set to "(gCurrLevelNum > LEVEL_MAX ? LEVEL_MAX : gCurrLevelNum)" and "area" is set to "gCurrAreaIndex - 1". "area" is then capped at 2. In the U version, if the 0x20 flag of D_80360C48[listIndex][item].unk14 is set, "level" and "area" will both be set to 0 instead.
audio/interface_2.c In the J version of func_8031EEF8, if D_80360C48[listIndex][index].unk14 & 0xF == 0, func_8031E0E4 and func_8031DFE8 will be called with D_80222A18[2].unk2C[k]->unk54 set to 0 in between. In the U version, if D_80222A18[2].unk2C[k]->unk44 == 0 the same code is run except setting D_80360C48[listIndex][index].unk18 to 0 instead; if D_80222A18[2].unk2C[k]->unk44 != 0, D_80222A18[2].unk2C[k]->unk44->unk0b40 == 0, D_80360C48[listIndex][index].unk14 & 0xF == 0, the same code as in the J version is run.
audio/interface_2.c When pressing a cap switch, the "Correct Solution" jingle (played by play_puzzle_jingle) isn't played on the J version.
audio/interface_2.c In the U version, func_80321368 will set both its argument arg0 and D_U_8033323C to 0 if arg0 is greater than 8.
audio/playback.c 8 separate numeric literals are doubles in J but floats in U.
audio/something.c 6 separate numeric literals are doubles in J but floats in U.
audio/something.c In the J version, v0 in func_803159EC is initialized to MIN((s32)(arg2 * 127.5), 127) immediately, while in the U version it's set to (s32)(arg2 * 127.5f) & 127 three times, each time right before it's used for something.
audio/something.c In func_803159EC, arg0->unk<3C/3E> are set to ((u16)(arg1 * <f0/f2>)) & -0x8100 in the J version, but in the U version they're set to (u16)((s32)(arg1 * <f0/f2>)) & -0x8100.
game/behavior_actions.c music_touch.c.inc is only included in the U version. This probably means the "Music Touch" object doesn't exist on the J version. The only thing the object does is call play_puzzle_jingle the first time Mario enters within 200 units of it. (todo: check if this object is unused)
game/behaviors/bbh_tilt_floor.c.inc (Nim is making a video on this)
game/behaviors/boo.c.inc In Go on a Ghost Hunt, there is a single boo upstairs which spawns in the Eye-to-Eye Secret Room. The premise of the star is that you must kill all of the boos, but since you aren't intended to go upstairs in that star the boo upstairs shouldn't count. Mario is required to kill 5 boos. In the U version, a check was added to make sure that killing the upstairs boo doesn't contribute to spawning the Big Boo. In the J version, you can kill 4 boos downstairs and 1 boo upstairs in any order and the Big Boo will spawn. If you kill the upstairs boo last, the text that normally appears when unlocking the Big Boo doesn't appear, nor does the "Correct Solution" jingle play.
game/behaviors/boo.c.inc In the J version, a part of an if statement's condition in ActionBooGivingStar0 is o->oUnk1AC_S32 >= 5 . On the U version, the debug parameter gDebugInfo[5][0] is added to 5.
game/behaviors/boo.c.inc boo_stop() is called in ActionBooGivingStar4 only on the U version.
game/behaviors/boo.c.inc On the J version, SetSound(0x806AA081, D_803320E0) is called when the Merry-Go-Round Big Boo is spawned. In the U version, play_puzzle_jingle() is called instead. The difference between the 2 sounds is shown in this video.
game/behaviors/bowser.c.inc Bowser's "body anchor"'s InteractType is set to 0x800000 whenever Bowser's action is 4 in the J version. In the U version, it's set to 0x800000 when Bowser's action is 4 and his subaction is not 11; if it is 11, the anchor's InteractType is set to 0.
game/behaviors/bowser.c.inc In the US version, Bowser checks if he's in a demo to prevent the typical 1/10 chance of dancing.
game/behaviors/bowser.c.inc func_u_802B4AF4() is only declared in the U version.
game/behaviors/bowser.c.inc In ActionBowser13, func_u_802B4AF4 is called only in the U version if Bowser's subaction is 1 and "o->oBehParams2ndByte == 2 && o->oUnknownUnkF4_S32 & 0x10000". (todo: can't find where 2nd byte of behavior params is set to 2 for bowser, is this code ever reached?)
game/behaviors/bowser.c.inc In ActionBowser2, when Bowser's subaction is 2, func_u_802B4AF4 is called in the U version.
game/behaviors/bowser_key.c.inc The sound of a Bowser key bouncing has higher priority in the U version, probably to stop it getting overriden by other sounds. It also has a flag set on the U version which seems to indicate that the sound is affected by distance (to/from something unknown) somehow.
game/behaviors/bully.c.inc The sound a bully makes when it spawns a coin after being killed in the U version has a flag set which seems to indicate that the sound is affected by distance (to/from something unknown) somehow.
game/behaviors/camera_lakitu.c.inc The "Lakitu's Message" music clip that plays when Lakitu comes near Mario to explain the camera controls at the start of the game isn't played or doesn't exist on J version.
game/behaviors/celebration_star.c.inc When you collect a Bowser key, the cutscene that plays will show a star instead of a key in the J version.
game/behaviors/celebration_star.c.inc On the J version, when a celebration star is turning to face the camera, it is scaled by 1/10 units per frame. On the U version, it checks if it's a key. If it's a key, it scales 1/30 units per frame; if it's the Grand Star, it scales 1/10 units per frame. (todo: check if the function is ever called by the grand star)
game/behaviors/coin.c.inc The sound a coin makes when it spawns (through beh_single_coin_gets_spawned) in the U version has a flag set which seems to indicate that the sound is affected by distance (to/from something unknown) somehow.
game/behaviors/coin.c.inc On the U version, coins will unload if they land on the death barrier. On the J version, they will continue to exist.
game/behaviors/coin.c.inc On the U version, if the coin has move flag 0x2000 set and has o->oUnk1B0 < 5, it will play a sound (namely, 0x30364081). Then it will increment o->oUnk1B0. On the J version, it will neither check nor increment o->oUnk1B0; it'll play the sound whenever the coin has the flag set.
game/behaviors/cruiser.c.inc On the U version, the wings on the RR cruiser will play a sound (namely, 0x30750081) every 64 frames. (It waits for the timer to become 64, then plays the sound and sets it to 0.) On the J version, it won't do any of this.
game/behaviors/dorrie.c.inc Two if-elseif statements swap places between the J and U versions (todo: elaborate on what effects this has). Also, in the J version, it will raise its head along with Mario if the forward distance to Mario is greater than 830 (i.e. Mario is greater than 830 units away from Dorrie's center) and if set_mario_npc_dialogue returns the expected result indicating a success. In the U version, 830 is changed to 780, and another condition is added: Dorrie's Y offset has to be equal to -17.
game/behaviors/hidden_star.c.inc As you collect more secrets, the sound played when collecting secrets gets higher in pitch on the U version. It doesn't change on the J version.
game/behaviors/king_bobomb.c.inc In ActionKingBobomb0, King Bob-omb's velocity is only set to 0 in the U version. It is not touched in the J version. This is the cause of this glitch.
game/behaviors/king_bobomb.c.inc When spawning the star in the J version, the invisible defeated King Bob-omb is raised by 100 units and CreateStar is called to spawn the star. In the U version, King Bob-omb is not raised directly but rather through obj_spawn_star_at_y_offset which is called instead of CreateStar. The Y-offset passed into obj_spawn_star_at_y_offset is 200. TODO: Figure out if the star actually spawns from 100 units higher in U
game/behaviors/mips.c.inc When MIPS has action 1 in the J version, his forward velocity is set to 45. In the U version, it's set to o->oUnk1AC_F32, which is 40 for the 1st MIPS and 45 for the 2nd MIPS. This was probably done to slow him down a bit.
game/behaviors/mips.c.inc In the J version, MIPS' gravity is 2.5. In the U version, it's 15.
game/behaviors/moneybag.c.inc When turning invisible, moneybags make a sound (namely, 0x30762081) in U but not in J.
game/behaviors/mr_i.c.inc In ActionMrI0, the Mr. I will set its MoveAngle's to 0 on the J version. On the U version, it calls set_object_angle(o, 0, 0, 0), which sets both its FaceAngle's and MoveAngle's to 0.
game/behaviors/piranha_plant.c.inc In ActionPiranhaPlant20, the piranha plant's size is set back to normal only on the U version.
game/behaviors/piranha_plant.c.inc In ActionPiranhaPlant21, o->oDamageOrCoinValue is set to 0 only on the U version.
game/behaviors/piranha_plant.c.inc In ActionPiranhaPlant23, o->oDamageOrCoinValue is set to 3 only on the U version.
game/behaviors/piranha_plant.c.inc func_u_802BE0B8 is only declared in the U version. It sets the piranha plant's action to 0 if it has active flag 0x2 set.
game/behaviors/piranha_plant.c.inc In ActionPiranhaPlant25, func_u_802BE0B8 is called only on the U version.
game/behaviors/piranha_plant.c.inc In ActionPiranhaPlant26, func_u_802BE0B8 is called only on the U version.
game/behaviors/racing_penguin.c.inc When the penguin is turning to face Mario at the end of the race (todo: confirm this), func_802BE3B4(1) is called but only on the U version.
game/behaviors/racing_penguin.c.inc On the U version, obj_spawn_star_at_y_offset is used to spawn the star instead of CreateStar. (todo: check if there are star height differences)
game/behaviors/red_coin.c.inc As you collect more red coins, the sound played when collecting secrets gets higher in pitch on the U version. It doesn't change on the J version.
game/behaviors/sparkle_spawn_star.c.inc In BehUnused080CLoop, when the object's action is 0, its Y-velocity is negative, it's under its home, and the bitmask o->oUnk190 has flag 0x400 set, the object will call func_803212A0(0) in the J version and func_803212A0(1) in the U version.
game/behaviors/tox_box.c.inc The sound the tox-box plays when slamming into the ground has flag 0x8000 set on the U version but not on the J version.
game/behaviors/tuxie.c.inc The Mother Penguin will spawn the star in a completely different location in the U version than in the J version.
game/behaviors/tuxie.c.inc The baby penguin's crying sound plays relative to Mario in the U version, but relative to the penguin in the J version. (todo: see if this difference can be heard or noticed through handsfree teleport)
game/behaviors/water_ring.c.inc As you go through more water rings, the sound played when collecting secrets gets higher in pitch on the U version. It doesn't change on the J version.
game/camera.c When func_80286C9C is called while in BitDW (todo: clarify, is this the entire level including the boss fight or just the boss fight?), func_8028BB3C(a, 144) will be called on the J version. On the U version, func_8028BB3C(a, 144) will be called if the demo is not being run; if it is, and the camera's secondary focus is set on an object, that object will have the first byte of its rawData set to 2.
game/camera.c In func_8028B3DC, under some circumstances the sound that normally plays when you press C-Down will not play on J, but will on U. (todo: document camera)
game/camera.c In func_8028B7A4, under some circumstances the sound that normally plays when you press C-Down will not play on J, but will on U. (todo: document camera)
game/camera.c In CameraHMC00() in the U version, when a->unk10[1] > -102.f, a->unk10[1] and D_8033B328.unk0[1][1] will both be set to D_8033B328.unk0[3][1]. In the J version, these values are not set.
game/camera.c CutsceneIntroPeach0_2 will run func_8031FFB4(0, 60, 40) on the U version but not on the J version. (todo: check what this actually is)
game/camera.c CutsceneIntroPeach2_1 will run func_80320040(0, 60) on the U version but not on the J version (todo: check what this actually is)
game/camera.c On the U version, if the camera preset is set to CAMERA_PRESET_BOWSER_FIGHT, a->unk4 will be copied into D_8033B4B8.unkC and a->unk10 will be copied into D_8033B4B8.unk0. If the camera preset isn't set to CAMERA_PRESET_BOWSER_FIGHT, func_80290224 will be run instead. On the J version, the if statement doesn't exist, and only func_80290224 is run every time.
game/camera.c On the J version, Peach doesn't read out the letter she sent to Mario in the intro.
game/camera.c On the U version, the click sound that usually plays when you change the camera mode with R also plays when the HUD turns on in the intro sequence. Here is an example. This click sound does not play in the J version, as can be seen here.
game/camera.c On the U version, when the camera lakitu flies under the bridge, out of the bridge, and near Mario's pipe in the intro cutscene, "whoosh" sounds are played. They aren't there on the J version.
game/file_select.c sSoundTextX is not declared in the J version.
game/file_select.c The sound clip that plays when you select a file in the file select has Mario saying "Okey Dokey!" in the U version.
game/file_select.c The "Select File" text has a different font and is in a slightly different position in the U version. (todo: confirm this)
game/file_select.c In the U version, sSoundTextX is used to center the name of the current sound setting on the main file select. In the J version, it remains uncentered.
game/file_select.c The "Check File" text in the score menu has a different font and is in a slightly different position in the U version.
game/file_select.c The "Return", "Copy", and "Erase" texts in the score menu are in slightly different positions in the U version.
game/file_select.c All the text in messages that appear when copying a file have a different font and are in slightly different positions in the U version.
game/file_select.c The "Return", "View Score", and "Erase" texts in the copy menu are in slightly different positions in the U version.
game/file_select.c TIMER_VAR1 and TIMER_VAR2 are set to 0xA4 and 0x91 respectively in the J version and 0xA9 and 0x8C respectively in the U version.
game/file_select.c In erase_menu_yes_no_prompt(s16 x, s16 y), sp2C is set to sCursorPos[0] + 160 in the J version and sCursorPos[0] + (x + 70) in the U version. The function is only ever called with x=90, and 90 + 70 = 160, so this results in no difference.
game/file_select.c In the U version of erase_menu_display_message, the positions of the "Erase File", "No Saved Data Exists", "Mario A Just Erased", and "Saved Data Exits [sic]" are slightly different. Also, the index into the "Mario A Just Erased" to modify A to match the letter of the file that was erased is different, since in English there are 6 characters before the A and in Japanese there are 3 ("マリオAをけしました").
game/file_select.c The "Return", "View Score", and "Copy File" texts in the erase menu are in slightly different positions in the U version.
game/file_select.c In draw_sound_mode_menu, textX is not declared in the J version.
game/file_select.c The "Sound Select" text is in a slightly different position in the U version.
game/file_select.c The names of the sound modes in the sound menu aren't centered correctly on the J version. This was corrected on the U version (using the textX variable from before).
game/file_select.c In score_file_print_course_coin_score, the length of the char arrays in fileNames are 5 in the J version and 8 in the U version. This is to account for the fact that on the J version, they are 4 characters (ex. "マリオA") while on the U version they are 7 (ex. "MARIO A").
game/file_select.c In score_file_print_course_coin_score, when showing high scores over all files, the position of the coin icon, coin count, and file name on the right side of the screen is slightly different in the U version.
game/file_select.c Some variable declarations are reorganized in the U version. This has no effect on the game.
game/file_select.c In the score menu, the position of the name of the file (ex. "マリオA"/"MARIO A") is slightly different in the U version.
game/file_select.c In the score menu, the position of the star symbols is slightly different on the U version. Also, the course names for courses 1-9 are padded to make up for the course numbers' entering into double digits.
game/file_select.c In the score menu, the position of the "Castle Secret Stars" text, the secret star counter, and the coin score mode in the top right are slightly different in the U version.
game/hud.c The HUD is 1 pixel lower in the U version than in the J version.
game/hud.c The star count in the HUD is shifted 5 pixels to the right in the U version from the J version.
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.c
game/ingame_menu.h
game/interaction.c
game/interaction.c
game/interaction.c
game/interaction.c
game/interaction.c
game/level_select_menu.c
game/level_select_menu.c
game/level_select_menu.c
game/level_select_menu.c
game/level_select_menu.c
game/level_update.c
game/level_update.c
game/level_update.c
game/level_update.c
game/level_update.c
game/main.c
game/main.c
game/mario.c
game/mario.c
game/mario.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_airborne.c
game/mario_actions_automatic.c
game/mario_actions_automatic.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_cutscene.c
game/mario_actions_moving.c
game/mario_actions_moving.c
game/mario_actions_moving.c
game/mario_actions_object.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_actions_stationary.c
game/mario_step.c
game/mario_step.c
game/object_helpers.c
game/object_helpers.c
game/object_helpers.c
game/object_helpers.c
game/object_helpers.c
game/object_helpers.c
game/object_helpers2.h
game/object_list_processor.c
game/platform_displacement.c
game/platform_displacement.h
game/star_select.c
game/star_select.c
game/star_select.c