DOSBox Pure Unleashed is a DOSBox port for running classic games on modern hardware. Originally only available as a RetroArch core, it's now available as a standalone application. https://www.tomshardware.com/video-games/retro-gaming/dosbox-pure-unleashed-is-ready-for-windows-mac-and-linux-computers-after-five-years-in-development-enhanced-standalone-release-no-longer-restricted-to-being-a-retroarch-core #DOSBox #DOSBoxPureUnleashed
Lately I've been working on trying to add some speed / performance hacks to #DOSBox. The idea is a bit similar to the old DOSIDLE.EXE / POWER.EXE TSRs: detect when the system is idle or busy-looping, and give up the rest of the CPU cycles until something interesting happens (next frame, next BIOS tick, whatever).
There are a bunch of timing sources on the IBM PC and it's tricky to get them all, but as a proof of concept - here's the delay loop from GORILLA.BAS:
'Rest:
' pauses the program
SUB Rest (t#)
s# = TIMER
t2# = MachSpeed * t# / SPEEDCONST
DO
LOOP UNTIL TIMER - s# > t2#
END SUB
So, it busy-loops until the timer tick. In DOSBox I modified the BIOS INT 1A handler so that if the emulated machine requests the time twice and the same tick comes up, it's probably spinning, so I take away all the remaining cycle budget and sleep instead. And it actually works! Host CPU usage drops significantly - or, if you put it in Turbo Mode, the game plays WAY faster!
Lately I've been working on trying to add some speed / performance hacks to #DOSBox. The idea is a bit similar to the old DOSIDLE.EXE / POWER.EXE TSRs: detect when the system is idle or busy-looping, and give up the rest of the CPU cycles until something interesting happens (next frame, next BIOS tick, whatever).
There are a bunch of timing sources on the IBM PC and it's tricky to get them all, but as a proof of concept - here's the delay loop from GORILLA.BAS:
'Rest:
' pauses the program
SUB Rest (t#)
s# = TIMER
t2# = MachSpeed * t# / SPEEDCONST
DO
LOOP UNTIL TIMER - s# > t2#
END SUB
So, it busy-loops until the timer tick. In DOSBox I modified the BIOS INT 1A handler so that if the emulated machine requests the time twice and the same tick comes up, it's probably spinning, so I take away all the remaining cycle budget and sleep instead. And it actually works! Host CPU usage drops significantly - or, if you put it in Turbo Mode, the game plays WAY faster!