flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.36k stars 167 forks source link

Overclocking the SH4 CPU does not do anything #1398

Closed PoloniumRain closed 6 months ago

PoloniumRain commented 6 months ago

OS / Hardware:

Windows 10 / AMD Threadripper 3960X + Nvidia RTX 3080

Description of the Issue

I'm not sure if this is a bug or not, but overclocking the SH4 CPU doesn't seem to do anything? I've tried this with both the RetroArch core and the latest February build of standalone Flycast with multiple games. 100MHz or 500MHz makes no difference (btw standalone Flycast only goes up to 300MHz, is this an oversight?). Everything runs fine even when set to 100MHz, so Quake III with a 60fps cheat applied will still hit a constant 60fps.

Obviously this is inaccurate compared to real hardware, but if it is intentional then what is the point of the overclocking option?

Tested with DX11 and Vulkan.

flyinghead commented 6 months ago

Underclocking Quake 3 (without 60 fps cheat) does reduce the frame rate from 30 to 24 (although it depends on the scene). However changes in over/underclocking do not take effect immediately if the game is already started. Loading a savestate will take the change into account. Another option is to switch to Interpreter then back to Dynarec.

PoloniumRain commented 6 months ago

Thanks, that's got it working in standalone Flycast. But i can't see any difference with RetroArch, although i can't get custom entered cheats to work on the Flycast core. The Quake III cheat for 60fps is simply:

010747A4 00000009

So on RetroArch i've tried making a .cht file like this:

cheats = 1

cheat0_desc = "60fps"
cheat0_code = "010747A4+00000009"
cheat0_enable = "true"

It wont work. What is the correct format? It would be great if 60fps cheats were added to the Dreamcast Libretro database. I'd do it myself if i knew how.

flyinghead commented 6 months ago

Flycast saves cheats in a retroarch-compatible .cht file format. So you can just use this file.