VOGONS


First post, by augnober

User metadata
Rank Member
Rank
Member

-Reposted here, since this thread seems more appropriate. I first posted it in a 'Screen tearing' thread in DOSBox General.

Here's an example of a demo that I think (I wish I had access to an old computer..) is timed much differently in DOSBox than in real DOS. It's the first publicly available thing I tried, since it makes massive use of scroll registers and was very smooth. It's Cronologia by Cascada. There are three download sites on this page:
http://www.mindcandydvd.com/demos

Or, here are three download links expanded (I bought the DVD, so it's okay for me to link, right? 😀):
http://www.mindcandydvd.com/demos/oldskool/Cronologia.zip
ftp://ftp.mindcandydvd.com/pub/MindCandy/Volu … /Cronologia.zip
ftp://ftp.gathering.org/Scene/MindCandy/Volum … /Cronologia.zip

The first site download site worked for me.

Anyway, I remember this as the most silky smooth thing on a 16MHz 386. You'll notice that in DOSBox, the main scroller part at the beginning runs like mad with no speed throttling. In a WinXP dosbox, though it has graphics artifacts and doesn't respond to the ESC key, it runs at the correct speed and you can generally see what's supposed to be happening. If it weren't for this, I'd have thought maybe the demo doesn't contain proper throttling. Strangely, the demo is speed-limited within DOSBox for the non-scroller parts of the demo.

The credits part (which begins with a bent loop of red vectorbobs) seems to use some horizontal and vertical scrolling for the credits, and is properly timed. It may be interesting to use this part for comparison.

I'm interested in why this runs super-fast in DOSBox. To perhaps save someone some time, I can share the following... I did some playing with the DOSBox debugger, and saw that the scroller-part I'm referring to does have a waitretrace loop (reading from port 0x3DA). I only saw a "je" loop, and no "jne" loop. I don't remember exactly it means when there's only that half of the check, but maybe this was chosen because of all the scanline timing done on the screen anyway for the raster bars.

Info:
DOSBox version, settings:
Version: From latest CVS, as of about Nov. 15, 2005. Built with MSVC++. Tried it with gulikoza's patch, and without (maintaining separate source trees). Also tried the direct3d-applied CVS-build from gulikoza's page.
Sound mode: SB and GUS enabled
Video mode: happens with both surface and direct3d
Cycles: Run at high cycles, it runs really fast.. Makes it perplexing that the retrace check doesn't seem to be throttling things. But, you'll also see it running somewhat fast even if you keep dosbox on normal core and 3000 cycles, as this thing ran fast on very slow computers.

System:
WinXP
Athlon X2 3800+
2GB RAM
nVidia 6600
onboard sound, enabled

Edit: I since found that this issue is noted on the PAiN DOSBox Demo Compatibility List (http://pain.scene.org/service_dosbox.php). So it's likely not specific to my build or settings.

Reply 3 of 3, by augnober

User metadata
Rank Member
Rank
Member

Ok, this is solved now (though the problem still exists). The sequences in Cronologia that use the horizontal retrace to synchronize effects don't use any vertical retrace timing. DOSBox emulates vertical retrace with timing.. but rather than emulate horizontal retrace with timing, it uses a hack to keep it moving along. Consequently, these sequences run really fast even though the drawn frames appear correct.

(I guess what I'd earlier thought was a waitretrace loop was just checking the horizontal retrace -- testing bit0 instead of bit3)

Fortunately, this is rarely (ever?) an issue in games.