VOGONS


First post, by clb

User metadata
Rank Oldbie
Rank
Oldbie

I noticed that both the Aladdin and Lion King DOS games lack vsync support, and the games update the screen with nasty tearing effects taking place:

The attachment ALADDIN.png is no longer available
The attachment ALADDIN.png is no longer available
The attachment LIONKING.png is no longer available
The attachment LIONKING.png is no longer available

Anyone know if this is a PC speed thing? Like (random guessing) maybe the game uses a memcpy during vblank to flip double buffers, but on a slow PC isn't fast enough to do it? Or does the game just disregard vsync in general?

Anyone with a fast several hundred MHz Pentium/AMD system can verify if it's possible to get vsync-locked rendering?

The above screenshots were taken on a 80 MHz Cyrix 486 PC with a fast PCI graphics adapter Hercules Stingray Pro ARK1000PV.

I did notice that if I put a very slow ISA graphics card (Oak Oti 037C) on this PC, then Aladdin will start to play in slow motion, whereas Lion King will start to frameskip heavily. So the two games do at least have different handling of game time progression.

Reply 1 of 5, by ntalaec

User metadata
Rank Newbie
Rank
Newbie

In a Pentium 200 MMX Aladdin has the same terrible tearing as in DOSBox.

I use a 60 Hz LCD Monitor, I'm not sure about how it looks in a CRT.

Reply 2 of 5, by Joseph_Joestar

User metadata
Rank l33t++
Rank
l33t++

Aladdin tears on a CRT monitor as well.

A few years back, I've played it on a Pentium MMX 166 and a Celeron 466. The tearing was present on both systems.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Core 2 Duo E8600 / Foxconn P35AX-S / X800 / Audigy2 ZS
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 3 of 5, by MAZter

User metadata
Rank Oldbie
Rank
Oldbie

Maybe we weren't paying enough attention at the time, but when I played Aladdin on a 486DX2-66Mhz on a 14" Daewoo monitor I don't remember having a problem like that.

Doom is what you want (c) MAZter

Reply 4 of 5, by clb

User metadata
Rank Oldbie
Rank
Oldbie

Spent a few hours trying to decompile Aladdin.exe with Reko Decompiler to see what its logic might be.

I was able to identify a couple of functions based on their VGA I/O port access patterns:

The attachment aladdin_vsync_funcs.png is no longer available

and find what looks like could be the main loop:

The attachment maybe_main_loop.png is no longer available

The game does modify the VGA Display Start registers on each iteration (I think it uses it for double-buffering and not for hardware scrolling), and it looks to be unsynchronized with vblank, but after that I got kinda stuck trying to fight against the tool when attempting to figure out what the global data could be. These tools are really not my expertise area.. 😁

Also tried Ghidra, but for some reason it looks like it doesn't decompile all the functions in the executable, and I got lost trying to find the same functions with that tool.

It would be interesting to get to modify the code, e.g. to patch calling to set the Display Start function synchronized with the wait for vblank function.. but no idea if that would be even possible.

Reply 5 of 5, by auron

User metadata
Rank Oldbie
Rank
Oldbie

it seems to be a problem with rushed console ports of the time, as opposed to games purely built for PC, even gex as an early win95 title has tearing. but then there were cases like the raven games having tearing despite doom literally releasing before and showing how this is done properly, so i think some devs simply didn't care about this issue.