First post, by Hornpipe2
I'm working on a project to automate recording some DOSBox gameplay videos. To save time, I had the idea to start recording and then enable Turbo Mode, which should let me record a ~2 minute video in less than 2 minutes real-time. This has led me down a rabbit hole of Turbo Mode, because I cannot figure out at all how it works / what it's doing.
Some issues:
* Turbo Mode doesn't always do anything at all - it's not perceptibly doing anything different.
* Turbo Mode is linked with Cycles in a way that I don't quite understand. Cycles too low (I guess) means that even at high speed host, the emulated CPU isn't doing enough work in its timeslice, so it is still slow. Cycles too high means that the emulated CPU is eating too many cycles for the host to keep up, so it cannot be turbo'd. What's the sweet spot, and isn't it going to be host-speed dependent?
So my question is, what the heck is turbo mode even doing, and are there improvements to be made? One thing that struck me is that, for games with correct CPU-independent timing, they probably go into a HLT or busy-loop waiting for VSYNC. If that could be detected somehow, cycles remaining for that frame could be set to 0, immediately triggering the host to do VSYNC work and letting the game pick up right at that point. Any thoughts on this?