Skip to content

Commit

Permalink
4 new ModPacks (some per popular request)
Browse files Browse the repository at this point in the history
minor fix to reservesmeter and retro-fueled source code
  • Loading branch information
Superstarxalien committed Sep 11, 2022
1 parent bc9a96b commit 6d56060
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python ../../../../../tools/mod-builder/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Include anti-anti-piracy patches for PAL and NTSC-J //
1006, exe, 0x80012534, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1111, exe, 0x80012570, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s

// OxideFix //

// Import SaveRAM
// common, exe, LOAD_DriverMPK, 0x0, ../../../decompile/General/LOAD_DriverMPK.c
// ^ Commented out as OverrideMPK's modification of the LOAD_DriverMPK function will be used instead
common, exe, AllocateAllPools, 0x0, ../../Patches/SaveRAM/src/Mem_AllocateAllPools.c
common, exe, Camera110_InitStructs, 0x0, ../../../decompile/General/Camera110_InitStructs.c ../../Patches/SaveRAM/src/Mem_DriverPool.c, Mem_DriverPool.bin
common, exe, ClearAllMemPools, 0x0, ../../Patches/SaveRAM/src/Mem_hookClearAllPools.s
common, exe, DrawRaceClock, 0x0, ../../../decompile/General/DrawRaceClock.c ../../Patches/SaveRAM/src/Mem_ThreadPool.c, Mem_ThreadPool.bin

// Custom version of AdvBosses
common, 233, CS_Garage_GetMenuBox, -0x8, ../../Modules/OxideFix/src/AdvBosses_hook233.s
common, 233, CS_EndOfFile, 0x0, ../../Modules/OxideFix/src/AdvBosses_main.c

// Modify the Main Menu to show Oxide
common, exe, LOAD_Callback_Overlay_231, -0x8, ../../Modules/OxideFix/src/MM_hookCallback230.s
common, 230, MM_Characters_GetModelByName, 0x0, ../../Modules/OxideFix/src/MM_NewModelSearch.c
common, 230, MM_EndOfFile, 0x0, ../../Modules/OxideFix/src/MM_End230_IconArrays.c ../../Modules/OxideFix/src/MM_End230_OxideModel.c ../../Modules/OxideFix/src/MM_End230_Callback230.c, MM_End230.bin

// Fix Podium
common, exe, LOAD_CDRequestCallback, -0x8, ../../Modules/OxideFix/src/PodiumFix_hookAppendQueue.s
926, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1006, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1020, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1111, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c

// CharacterRandomizer //

// Include OverrideMPK
926, exe, 0x80033f3c, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1006, exe, 0x80035520, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1020, exe, 0x800342f8, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1111, exe, 0x80035b5C, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
common, exe, LOAD_AppendQueue, 0x8, ../../Modules/OverrideMPK/src/numDriversPlusOne.s
common, exe, Driver_GetModelByName, 0x0, ../../Modules/OverrideMPK/src/OvMPK_StringSearch.c
common, exe, LOAD_DriverMPK, 0x0, ../../Modules/OverrideMPK/src/OvMPK_LoadMPK.c

common, exe, LOAD_Robots1P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook1P.s
common, exe, LOAD_Robots2P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook2P.s

// ReservesMeter //

// Compile the ASM injection that will load our code
926, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1006, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1020, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1111, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
common, exe, Turbo_Increment, 0x0, ../../Modules/ReservesMeter/src/Turbo_Increment_Hook.s

common, exe, rdata_free, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_main.c ../../Modules/ReservesMeter/src/main.c ../../Modules/ReservesMeter/src/Turbo_Increment.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python ../../../../../tools/mod-builder/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Include anti-anti-piracy patches for PAL and NTSC-J //
1006, exe, 0x80012534, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1111, exe, 0x80012570, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s

// OxideFix //

// Import SaveRAM
common, exe, LOAD_DriverMPK, 0x0, ../../../decompile/General/LOAD_DriverMPK.c
common, exe, AllocateAllPools, 0x0, ../../Patches/SaveRAM/src/Mem_AllocateAllPools.c
common, exe, Camera110_InitStructs, 0x0, ../../../decompile/General/Camera110_InitStructs.c ../../Patches/SaveRAM/src/Mem_DriverPool.c, Mem_DriverPool.bin
common, exe, ClearAllMemPools, 0x0, ../../Patches/SaveRAM/src/Mem_hookClearAllPools.s
common, exe, DrawRaceClock, 0x0, ../../../decompile/General/DrawRaceClock.c ../../Patches/SaveRAM/src/Mem_ThreadPool.c, Mem_ThreadPool.bin

// Modify the Main Menu to show Oxide
common, exe, LOAD_Callback_Overlay_231, -0x8, ../../Modules/OxideFix/src/MM_hookCallback230.s
common, 230, MM_Characters_GetModelByName, 0x0, ../../Modules/OxideFix/src/MM_NewModelSearch.c
common, 230, MM_EndOfFile, 0x0, ../../Modules/OxideFix/src/MM_End230_IconArrays.c ../../Modules/OxideFix/src/MM_End230_OxideModel.c ../../Modules/OxideFix/src/MM_End230_Callback230.c ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_main.c, MM_End230.bin

// Fix Podium
common, exe, LOAD_CDRequestCallback, -0x8, ../../Modules/OxideFix/src/PodiumFix_hookAppendQueue.s
926, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1006, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1020, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1111, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c

// USAMaxStatsPenta //

// Inject compiled code for Penta's stats into the executable
926, exe, 0x80088A0C, 0x0, ../../Patches/USAMaxStatsPenta/assets/stats.bin

// Compile modified Driver_SetConsts
926, exe, Driver_SetConsts, 0x0, ../../Patches/USAMaxStatsPenta/src/USAMaxStatsPenta.c

// FixAdventureModeCharacterSelectArrows //
// the same bug is also present here of course

// Replace the DecalHUD_Arrow2D function
common, exe, DecalHUD_Arrow2D, 0x0, ../../Patches/FixAdventureModeCharacterSelectArrows/src/DecalHUD_Arrow2D.c

// EngineSelect //

926, 233, 0x800b8544, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_hook233.s
926, 233, 0x800b7ae4, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_JALhook233.s
common, 233, CS_EndOfFile, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_233.c

// EngineSelectEdit //

common, 230, MM_TrackSelect_Video_SetDefaults, -0x8, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_hook230.s
926, 230, 0x800aefe4, 0x0, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_nop.s
926, 230, 0x800af6a8, 0x0, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_hookCharacterName.s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python ../../../../../tools/mod-builder/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Include anti-anti-piracy patches for PAL and NTSC-J //
1006, exe, 0x80012534, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1111, exe, 0x80012570, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s

// OxideFix //

// Import SaveRAM
// common, exe, LOAD_DriverMPK, 0x0, ../../../decompile/General/LOAD_DriverMPK.c
// ^ Commented out as OverrideMPK's modification of the LOAD_DriverMPK function will be used instead
common, exe, AllocateAllPools, 0x0, ../../Patches/SaveRAM/src/Mem_AllocateAllPools.c
common, exe, Camera110_InitStructs, 0x0, ../../../decompile/General/Camera110_InitStructs.c ../../Patches/SaveRAM/src/Mem_DriverPool.c, Mem_DriverPool.bin
common, exe, ClearAllMemPools, 0x0, ../../Patches/SaveRAM/src/Mem_hookClearAllPools.s
common, exe, DrawRaceClock, 0x0, ../../../decompile/General/DrawRaceClock.c ../../Patches/SaveRAM/src/Mem_ThreadPool.c, Mem_ThreadPool.bin

// Modify the Main Menu to show Oxide
common, exe, LOAD_Callback_Overlay_231, -0x8, ../../Modules/OxideFix/src/MM_hookCallback230.s
common, 230, MM_Characters_GetModelByName, 0x0, ../../Modules/OxideFix/src/MM_NewModelSearch.c
common, 230, MM_EndOfFile, 0x0, ../../Modules/OxideFix/src/MM_End230_IconArrays.c ../../Modules/OxideFix/src/MM_End230_OxideModel.c ../../Modules/OxideFix/src/MM_End230_Callback230.c ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_main.c, MM_End230.bin

// Fix Podium
common, exe, LOAD_CDRequestCallback, -0x8, ../../Modules/OxideFix/src/PodiumFix_hookAppendQueue.s
926, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1006, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1020, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1111, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c

// CharacterRandomizer //

// Include OverrideMPK
926, exe, 0x80033f3c, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1006, exe, 0x80035520, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1020, exe, 0x800342f8, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1111, exe, 0x80035b5C, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
common, exe, LOAD_AppendQueue, 0x8, ../../Modules/OverrideMPK/src/numDriversPlusOne.s
common, exe, Driver_GetModelByName, 0x0, ../../Modules/OverrideMPK/src/OvMPK_StringSearch.c
common, exe, LOAD_DriverMPK, 0x0, ../../Modules/OverrideMPK/src/OvMPK_LoadMPK.c

common, exe, LOAD_Robots1P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook1P.s
common, exe, LOAD_Robots2P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook2P.s

// ReservesMeter //

// Compile the ASM injection that will load our code
926, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1006, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1020, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
1111, exe, DrawHUD_AdvStrings, -0x8, ../../Modules/ReservesMeter/src/reserveshook.s
common, exe, Turbo_Increment, 0x0, ../../Modules/ReservesMeter/src/Turbo_Increment_Hook.s

// USAMaxStatsPenta //

// Inject compiled code for Penta's stats into the executable
926, exe, 0x80088A0C, 0x0, ../../Patches/USAMaxStatsPenta/assets/stats.bin

// Compile modified Driver_SetConsts
926, exe, Driver_SetConsts, 0x0, ../../Patches/USAMaxStatsPenta/src/USAMaxStatsPenta.c

// FixAdventureModeCharacterSelectArrows //
// the same bug is also present here of course

// Replace the DecalHUD_Arrow2D function
common, exe, DecalHUD_Arrow2D, 0x0, ../../Patches/FixAdventureModeCharacterSelectArrows/src/DecalHUD_Arrow2D.c

// EngineSelect //

926, 233, 0x800b8544, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_hook233.s
926, 233, 0x800b7ae4, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_JALhook233.s
common, 233, CS_EndOfFile, 0x0, ../../Modules/EngineSelect_OnlyUSA/src/ES_233.c

// EngineSelectEdit //

common, 230, MM_TrackSelect_Video_SetDefaults, -0x8, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_hook230.s
926, 230, 0x800aefe4, 0x0, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_nop.s
926, 230, 0x800af6a8, 0x0, ../../Modules/EngineSelectEdit_OnlyUSA/src/ES_hookCharacterName.s

common, exe, rdata_free, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_main.c ../../Modules/ReservesMeter/src/main.c ../../Modules/ReservesMeter/src/Turbo_Increment.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OxideFix and CharacterRandomizer and ReservesMeter and EngineSelectEdit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python ../../../../../tools/mod-builder/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Include anti-anti-piracy patches for PAL and NTSC-J //
1111, exe, 0x80012570, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s

// OxideFix //

// Import SaveRAM
// common, exe, LOAD_DriverMPK, 0x0, ../../../decompile/General/LOAD_DriverMPK.c
// ^ Commented out as OverrideMPK's modification of the LOAD_DriverMPK function will be used instead
common, exe, AllocateAllPools, 0x0, ../../Patches/SaveRAM/src/Mem_AllocateAllPools.c
common, exe, Camera110_InitStructs, 0x0, ../../../decompile/General/Camera110_InitStructs.c ../../Patches/SaveRAM/src/Mem_DriverPool.c, Mem_DriverPool.bin
common, exe, ClearAllMemPools, 0x0, ../../Patches/SaveRAM/src/Mem_hookClearAllPools.s
common, exe, DrawRaceClock, 0x0, ../../../decompile/General/DrawRaceClock.c ../../Patches/SaveRAM/src/Mem_ThreadPool.c, Mem_ThreadPool.bin

// Custom version of AdvBosses
common, 233, CS_Garage_GetMenuBox, -0x8, ../../Modules/OxideFix/src/AdvBosses_hook233.s
common, 233, CS_EndOfFile, 0x0, ../../Modules/OxideFix/src/AdvBosses_main.c

// Modify the Main Menu to show Oxide
common, exe, LOAD_Callback_Overlay_231, -0x8, ../../Modules/OxideFix/src/MM_hookCallback230.s
common, 230, MM_Characters_GetModelByName, 0x0, ../../Modules/OxideFix/src/MM_NewModelSearch.c
common, 230, MM_EndOfFile, 0x0, ../../Modules/OxideFix/src/MM_End230_IconArrays.c ../../Modules/OxideFix/src/MM_End230_OxideModel.c ../../Modules/OxideFix/src/MM_End230_Callback230.c, MM_End230.bin

// Fix Podium
common, exe, LOAD_CDRequestCallback, -0x8, ../../Modules/OxideFix/src/PodiumFix_hookAppendQueue.s
926, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1020, exe, 0x80011380, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c
1111, exe, 0x80011468, 0x0, ../../Modules/OxideFix/src/PodiumFix_AppendQueue.c

// Retro-Fueled //

// Hooks
// 926, exe, GAMEPROG_GetPtrHighScoreTrack, -0x8, ../../Modules/Retro-Fueled/src/hookNewGame.s
// 1020, exe, GAMEPROG_GetPtrHighScoreTrack, -0x8, ../../Modules/Retro-Fueled/src/hookNewGame.s
// Disable texture replacements as OxideFix will need the kernel space instead
common, exe, BOTS_SetRotation, -0x8, ../../Modules/Retro-Fueled/src/hookUpdate.s
// 926, exe, LOAD_VramFile, -0x8, ../../Modules/Retro-Fueled/src/hookVRAM.s
// 1020, exe, LOAD_VramFile, -0x8, ../../Modules/Retro-Fueled/src/hookVRAM.s
// Disable texture replacements as OxideFix will need the kernel space instead
common, exe, __main, 0x68, ../../Modules/Retro-Fueled/src/hookEntry.s

// Don't compile texture replacements for reasons stated above

// Modify Turbo_Increment function to allow for USF stacking
common, exe, Turbo_Increment, 0x0, ../../Modules/Retro-Fueled/src/Turbo_Increment_AllowUSFStacking.c

// CharacterRandomizer //

// Include OverrideMPK
926, exe, 0x80033f3c, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1006, exe, 0x80035520, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1020, exe, 0x800342f8, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
1111, exe, 0x80035b5C, 0x0, ../../Modules/OverrideMPK/src/numDrivers.s
common, exe, LOAD_AppendQueue, 0x8, ../../Modules/OverrideMPK/src/numDriversPlusOne.s
common, exe, Driver_GetModelByName, 0x0, ../../Modules/OverrideMPK/src/OvMPK_StringSearch.c
common, exe, LOAD_DriverMPK, 0x0, ../../Modules/OverrideMPK/src/OvMPK_LoadMPK.c

common, exe, LOAD_Robots1P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook1P.s
common, exe, LOAD_Robots2P, 0x0, ../../Modules/CharacterRandomizer/src/ChRand_hook2P.s

// Compile code to empty spaces in RDATA //
common, exe, rdata_free, 0x0, ../../Modules/Retro-Fueled/src/main.c ../../Modules/CharacterRandomizer/src/ChRand_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
if (driver->japanTurboUnknown == 0)
{
driver->numTurbos = 1;
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode & 0x200000) == 0))
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
{
driver->numTurbosBackup = 1;
}
}
else
{
driver->numTurbos++;
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode & 0x200000) == 0))
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
{
driver->numTurbosBackup = driver->numTurbos;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int

#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}
}
Expand All @@ -230,7 +230,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
driver->numTurbos++;
#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
if (driver->japanTurboUnknown == 0)
{
driver->numTurbos = 1;
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode & 0x200000) == 0))
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
{
driver->numTurbosBackup = 1;
}
}
else
{
driver->numTurbos++;
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode & 0x200000) == 0))
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
{
driver->numTurbosBackup = driver->numTurbos;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int

#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}
}
Expand All @@ -230,7 +230,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
driver->numTurbos++;
#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
if (driver->japanTurboUnknown == 0)
{
driver->numTurbos = 1;
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
if ((driver->numTurbosBackup < 1) && ((sdata.gGT->gameMode11 & 0x200000) == 0))
{
driver->numTurbosBackup = 1;
}
}
else
{
driver->numTurbos++;
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode1 & 0x200000) == 0))
if ((driver->numTurbosBackup < driver->numTurbos) && ((sdata.gGT->gameMode11 & 0x200000) == 0))
{
driver->numTurbosBackup = driver->numTurbos;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int

#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode11 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}
}
Expand All @@ -226,7 +226,7 @@ void DECOMP_Turbo_Increment(struct Driver* driver, int reserves, u_int type, int
driver->numTurbos++;
#if BUILD == JpnRetail
// probably some sort of overflow safety check
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode1 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
if (driver->numTurbosBackup < driver->numTurbos && (sdata.gGT->gameMode11 & 0x200000) == 0) driver->numTurbosBackup = driver->numTurbos;
#endif
}

Expand Down

0 comments on commit 6d56060

Please sign in to comment.