schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
767 stars 63 forks source link

Strong Flickering in Catacomb Abbys #303

Open Glowing0rb opened 2 years ago

Glowing0rb commented 2 years ago

When using dosbox-pure in retroarch, Catacomb Abyss will start flickering when ingame (menus are fine). I've tested this both on Windowx x64 and Linux (on a Steam Deck) This does not happen in a standalone vanilla dosbox or when using dosbox core in retroarch. The sequel, Catacomb Armageddon looks fine.

schellingb commented 2 years ago

Original DOSBox runs games that don't support something called 'protected mode' at a fixed CPU speed that is similar to an Intel 286 CPU. Games like DOOM and most games made after it run in this mode for which DOSBox can somewhat safely assume these games are able to detect the CPU speed and not run too fast even if the CPU is faster than what was available when the game was made. Many older DOS games don't scale their speed and end up being unplayable fast if run on a Pentium CPU for example.

Running these games at the speed of a 286 is often not ideal. For example games made in 1993 like the Alone in the Dark games or Epic Pinball are unplayable slow with this default setting. So what DOSBox Pure does is, it detects the year of release of a game and sets the performance of the CPU to be similar to what a good Intel CPU of that year would have been. Which means for Catacomb Abyss, which was released in 1992, it becomes similar to a 486DX2 at 66 MHz.

The engine used for the Catacomb games has a problem that if the CPU is able to render the game faster than 70 frames per seconds it starts to flicker. And a 486DX2 is able to run that fast. At least in DOSBox, I have not verified this on real hardware.

So in vanilla DOSBox if one increases the cycles to 20000 or higher, the same flickering appears.

Catacomb Abyss seems to run best at the speed of 386DX from 1989, which makes sense because that's probably similar to the hardware that was used when making the original Catacomb game.

For now you'll need to open the core options and go to Performance Options > Emulated Performance and change it from AUTO to 386DX, 33 Mhz to get rid of the flickering.

As a fix for just this game series I think I can adjust the release date database to treat all games in the Catacomb series as if they were released in 1989.