Skip to content

Commit

Permalink
GameDB: Add eeCycleRate option
Browse files Browse the repository at this point in the history
For those pesky games with cache/DMA issues only!
  • Loading branch information
stenzek committed Jul 8, 2023
1 parent 48cfe9c commit a2c9069
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ enum class SpeedHack
MVUFlag,
InstantVU1,
MTVU,
EECycleRate,
MaxCount,
};

Expand Down
5 changes: 5 additions & 0 deletions pcsx2/Docs/gamedb-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@
"type": "integer",
"minimum": 0,
"maximum": 1
},
"eeCycleRate": {
"type": "integer",
"minimum": -3,
"maximum": 3
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ static constexpr const char* s_speed_hack_names[] = {
"mvuFlag",
"instantVU1",
"mtvu",
"eeCycleRate",
};

const char* Pcsx2Config::SpeedhackOptions::GetSpeedHackName(SpeedHack id)
Expand Down Expand Up @@ -215,6 +216,9 @@ void Pcsx2Config::SpeedhackOptions::Set(SpeedHack id, int value)
case SpeedHack::MTVU:
vuThread = (value != 0);
break;
case SpeedHack::EECycleRate:
EECycleRate = static_cast<int>(std::clamp<int>(value, MIN_EE_CYCLE_RATE, MAX_EE_CYCLE_RATE));
break;
jNO_DEFAULT
}
}
Expand Down

0 comments on commit a2c9069

Please sign in to comment.