xemu-project / xemu

Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
https://xemu.app
Other
2.72k stars 271 forks source link

[Feature Request] virtual cpu clock control #1429

Open Spidy123222 opened 1 year ago

Spidy123222 commented 1 year ago

Feature Request

I was tweaking with xemu’s cpu clock speed and it acts like how other emulators do for games. Was able to gain performance lowering clock speed of virtual cpu on some games and worse on others and also caused more instability fps which is expected. It’s not ideal but would be interesting feature to add to ui or in the toml to change the clock speed of cpu (by percentage like 100% is default and above and lower is different) for variable refresh rate games by raising the clock speed and or games that might benefit from lowering cpu clock.

It’s more of a hack but there is definitely people that would use it. If it was added I would not accept issue reports if it’s not default clock as it could have bugs on some games but also could activate frame skip for some games to run full speed for some.

this is how dolphin explains it. (Goes from 5% to 400% as a example which 400% would be 4x default essentially) IMG_6937

Alternatives

No response

Additional Context

Using my steamdeck I am able to get 4x performance on menus (4fps before and getting 18 fps after) and 2x certain areas by lowering the cpu clock by 50%. Certain races it makes it playable. This is where I changed it. https://github.com/xemu-project/xemu/blob/9e1f5f2f19a8b0e880e034d455b359d426f6d386/hw/i386/x86.c#L526

And this is what I did to get 50% (I was testing beforehand to 200% so that why it’s not the same as default but if you do 366666666.5 x 2. It will equal default.) https://github.com/Spidy123222/xemu/pull/3/commits/a1a7c813c98cc443dba64327ee7be9817e55a065

LeRutY commented 1 year ago

Would love to have that function

Spidy123222 commented 1 year ago

Would love to have that function

You can also do gpu but I don't see any benefit it could do. Should test that too. I do know other emulators only have that one specifically for setting file.

Spidy123222 commented 1 year ago

Example of 50% cpu https://cdn.discordapp.com/attachments/680488810429153315/1105292018625814598/20230508163639_1.jpg

Default https://cdn.discordapp.com/attachments/680488810429153315/1105292267939430410/20230508164436_1.jpg

On the 50% it also made menus actually usable fps from 4 fps to 23fps.

Adding clock speed usually works fine. But in some games like conker the animation speeds are faster. Which I'm told a patch to conker fixes it like Xbox replacement CPU's do it.