First post, by jokkebk
BACKGROUND: I've been using DOSBox for playing back oldskool PC demos. VBE 2.0 support in the version 0.65 finally made me able to play back some newer ones, which is totally awesome. I would like to capture some demos of mine into video format and burn to DVD to be able to watch them later with minimum hassle. Unfortunately, my machine isn't quite up to the task, as FPS tends to fall between 4 and 10.
CHALLENGE: What I would like to do is to "slow down" DOSBox emulation, so it would use for example 4 seconds of real processor time to perform actions happening in 1 second of emulated processor time. That way there would be 4 times as much cycles available for the demo (which wouldn't know it is being run in slow motion), and I could for example capture a 3-minute demo in 12 minutes, and later speed up the resulting video by 4x to get a decent fluidity of motion. I would think there are two possibilities:
1) Replace SDL function calls in DOSBox used for accessing real hardware to provide a "slowed down time" for DOSBox in the first place. For example, if SDL timer would proceed half as quickly as normally, DOSBox would have twice as much time for its chores. Of course, audio and video routines might need similar tweaking
2) Change the DOSBox "inner loop" to do this slowing down based on the value of some control variable - in addition to frameskip and cycle count, we would have "time scaling factor". This would probably have its uses outside of demo recording.
QUESTION: I would be willing to figure out how the actual changes need to be done to the source code and I could submit a patch once I get it working. But I would really appreciate if someone who understands how DOSBox is structured could point me into right direction. So what do you think, what would be the best way to introduce such a feature? I won't even mind if audio doesn't work, as it can be recorded separately (and I have the original soundtracks as module files).
Thanks!