Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overclocking features and improvements #138

Open
5 tasks
jsgroth opened this issue Nov 10, 2024 · 2 comments
Open
5 tasks

Overclocking features and improvements #138

jsgroth opened this issue Nov 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jsgroth
Copy link
Owner

jsgroth commented Nov 10, 2024

Related to #133, additional things that might be useful to implement or try:

  • SMS/Game Gear/Genesis overclocking via virtual scanlines rather than adjusting the master clock divider, which may have higher compatibility with some games (e.g. Sonic 2 and 3, where decreasing the clock divider screws up the music tempo)
  • Sega CD 68000 overclocking support
  • Not overclocking exactly, but increasing the read speed of the Sega CD's CD-ROM drive (actual hardware has a 1x drive which is extremely slow)
  • 32X SH-2 overclocking support (somewhat depends on improving SH-2 emulation performance)
  • Overclocking support for Nintendo consoles (NES, SNES, Game Boy, Game Boy Color)
@jsgroth
Copy link
Owner Author

jsgroth commented Jan 11, 2025

I've been experimenting with Sega CD, both overclocking the sub CPU and increasing the CD-ROM drive speed.

Sub CPU overclocking just changes the clock divider of the Sega CD's 50 MHz master clock rate. Actual hardware uses a divider of 4 (12.5 MHz clock speed) so there are only 4 options: 100% speed, 133%, 200%, and 400%. I could maybe add support for fractional divider steps as a future improvement - it would certainly be possible to support divider steps of 0.5 or 0.25.

Increased drive speed changes the rate at which the drive reads sectors when it is actively reading from a data track. Seek times and other delays are not affected, and neither is audio track playback speed.

Overclocking the sub CPU has minimal impact in most games, but it can slightly improve framerate in games that do significant work on the sub CPU. Some games have sloppy inter-CPU communication code that will cause the game to freeze if the sub CPU is overclocked without also overclocking the main CPU.

Increasing the CD-ROM drive speed has low compatibility (unsurprisingly), but when it doesn't break games it can noticeably shorten loading times. Some games require overclocking the sub CPU for it to be able to keep up with the faster data rate when reading from disc.

Increased drive speed primarily breaks games when they're playing FMVs or other cutscenes that require streaming both video and audio data from disc. Sometimes the cutscene audio will glitch out, sometimes the cutscene will stutter, and sometimes the game will just freeze. I haven't been able to figure out a reliable way to detect when a game is doing this (so that I could force the drive speed to 1x) - different games don't stream data from disc in the same ways, and some games don't even use FMVs for their animated cutscenes.

Still, these seem useful enough, so I'm going to go ahead and add these features with a warning in the help text for drive speed to note that it has fairly low compatibility.

@jsgroth
Copy link
Owner Author

jsgroth commented Jan 12, 2025

I'm going to add another new feature that kind of helps with Sega CD: a new hotkey to toggle whether overclocking settings are enabled, including Sega CD drive speed. This doesn't actually modify the config file - disabling overclocking simply forces all overclocking-related settings to default values in the emulator backend until overclocking is re-enabled or the app is restarted.

This is nice for games like Lunar 2: Eternal Blue where overclocking during gameplay can help with the annoyingly long load times, but increasing the disc drive speed or even overclocking the sub CPU almost always breaks video/audio sync during the animated cutscenes.

jsgroth added a commit that referenced this issue Jan 13, 2025
…138)

this is most useful for Sega CD where overclocking can help during gameplay but often breaks cutscenes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant