VOGONS


First post, by jh3141

User metadata
Rank Newbie
Rank
Newbie

I'd like to be able to make games run slower than real time, in order to help learn to play them better. Is there any way of doing this with currently available emulators? I'm using the standard build of DOSBox-X at the moment, but have no real aversion to either switching to another system or even applying a non-standard patch.

What I want in more depth, in case it isn't clear:

A way to effectively slow down time, so that the emulated program runs slower, whatever method it uses to determine how fast to run:

* Obviously I can currently slow the CPU itself down by changing the 'cycles' setting, but this doesn't do what I want for most games made from the late 80s onwards: it drops the effective frame rate, but each frame includes larger changes that make it harder, not easier to play.
* So I need to change the speed of other timing sources, too: timer interrupts, vertical retrace interrupts, real-time clock value, and so on.

How can I do this? Preferably, I'd like to be able to turn it on/off easily while emulation is running.

Reply 1 of 6, by superfury

User metadata
Rank l33t
Rank
l33t

Afaik this isn't directly possible with most emulators without changing source code and recompilation(and even then there's the problem of the system clock used for CMOS time).

So, in general, it's at least 5 possible sources:
- CPU clock(Hz or IPS).
- Timer(PIT).
- CMOS(Maybe Windows/Linux clock, if used).
- Video rendering(framerate/line rate/pixel rate).
- Audio rendering(samplerate).

All of those sources might be used, depending on the application running.

If the emulator has a base BUS clock(e.g. UniPCemu) you can change it manually in the code(currently locked to 14MHz). Other sources (CMOS) would require a custom Windows/Linux driver to apply, since that's it's source.

Most clocks are usually based on those kinds of clocks(e.g. gettimeofday or OS-specific equivalent, see UniPCemu's support/highrestimer.c source code of gettimeofday in universal format, used throughout emulation). Such a function, and/or SDL_Delay() function is usually the clock source(together with Windows/Linux time for RTC).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 2 of 6, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, you would think such a simple thing as slowing down (or even speeding up) would be a no brainer once you have emulators. But in our quests as emulator writers to pursue perfection we did not have time to add such a feature.

To answer your question, Superfury put it all right. However for most of the games, you might be fine only slowing down PIT or CMOS for example.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 3 of 6, by superfury

User metadata
Rank l33t
Rank
l33t

In some cases it might even require some or all of those five devices to slowdown relatively to the base clock. Like audio processing(non-PIT, e.g. Sound Blaster, Game Blaster) and video processing(VGA/CGA/MDA) combined with the CPU clock. Like in 8088 MPH, which uses both the PIT, CPU and Video combined to not produce errors. Or 8088 corruption, which adds the Sound Blaster to the 8088 MPH mix(afaik using all those sources except the CMOS). I don't know any program using more, except if you want to display the current CMOS time while running 8088 corruption, which it currently doesn't support 🤣

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 4 of 6, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

Another idea (to think outside the box so to speak) is rather than slow down the emulator, slow down the host machine. This way the emulator will not be able to keep up. It is inconvenient as it requires a reboot but it can work.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 5 of 6, by superfury

User metadata
Rank l33t
Rank
l33t

Theoretically, only slowing down the reported time reported TO windows will solve all cases? But it requires a custom driver and control software to direct the driver to do so(although slowing down all other software as well?)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io

Reply 6 of 6, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

I actually made such a version of Dosbox that allows adjusting the emulated video refresh rate, which works for speeding up and slowing down many games.
Re: DOSBox over S-Video TV-Out stuttering/jerkiness

I might have had a version where refresh rate could be adjusted on the fly with some keyboard shortcut instead of having to adjust the config file...