Skip to content

Commit

Permalink
builtin cheat for f355 network race. enable builtin cheats when online
Browse files Browse the repository at this point in the history
Increase the datapump timeout from 500 to 1000 to avoid an error when
posting network race results.
Enable built in cheats when online
  • Loading branch information
flyinghead committed Dec 3, 2023
1 parent fd2a87f commit 5fde889
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions core/cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,18 @@ void CheatManager::reset(const std::string& gameId)
cheats.emplace_back(Cheat::Type::setValue, "fix main loop time", true, 32, 0x003011cc, 0x42200000); // 40.0 ms
cheats.back().builtIn = true;
}

else if (gameId == "MK-0100") // F355 US
{
setActive(true);
cheats.emplace_back(Cheat::Type::setValue, "increase datapump timeout", true, 16, 0x00131668, 1000);
cheats.back().builtIn = true;
}
else if (gameId == "T8118D 50") // F355 EU
{
setActive(true);
cheats.emplace_back(Cheat::Type::setValue, "increase datapump timeout", true, 16, 0x00135588, 1000);
cheats.back().builtIn = true;
}
}
if (config::WidescreenGameHacks)
{
Expand Down Expand Up @@ -579,11 +590,13 @@ void CheatManager::apply()
writeRam(address, widescreen_cheat->values[i], 32);
}
}
if (active && !settings.network.online)
if (active)
{
bool skipCheat = false;
for (const Cheat& cheat : cheats)
{
if (!cheat.builtIn && settings.network.online)
continue;
if (skipCheat) {
skipCheat = false;
continue;
Expand Down

0 comments on commit 5fde889

Please sign in to comment.