VOGONS


Keen 4-5-6 choppy scrolling on EGA card

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by keropi

User metadata
Rank l33t++
Rank
l33t++

Hiya!

I've been testing my new 286/EGA setup and I noticed that Commander Keen 4,5 and 6 games are plagued with scrolling issues, have a look at this video: https://youtu.be/DfUJjNkNdI0
I tried the "Fix Jerky Motion" option but it did not help.
Keen Dreams, Keen 1~3 and Biomenace games are fine though. The EGA card uses the Paradise PEGA2 chipset , tried to search for a workaround but found nothing... Any ideas how to fix this? Maybe there is some command-line option I am missing?

TIA for any help/tips! 😎

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 1 of 68, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, keropi!

Sorry, have no idea what's going wrong there. I would like to help you and test Keen on my EGA-equipped 286..
..but I don't have any EGA monitor, sorry. 😢

Maybe you find some helpful stuff at Shikadi.net, though.

They have lots of pieces of information and different Keen 4 binaries: http://www.shikadi.net/keenwiki/Keen_4

Good Luck!

Best regards,
Jo22

(PS: Nice YT channel you've got!)

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 2 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++

thanks, I could not find something helpful there either... maybe it's just the way these Paradise chipsets are - I also have an olivetti pc with an onboard PEG2A ega and it behaves the same...
My yt "channel" is just dumping grounds for when I want to show something , no context whatsoever 🤣

edit:
There is some Keen scrolling-related discussion here: http://www.vcfed.org/forum/showthread.php?430 … rruption/page13 , did anything ever came out of it?

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 4 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++

Already tested that , it was meant for SVGA cards and does nothing to help me.
I will get another EGA with the CHIPS chipset as Plasma on VCF replied that it works fine. Fingers crossed!

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 6 of 68, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I know Keen 4-6 is very speed sensitive with EGA games and highly compatible EGA cards, including IBM's. There seems to be an ideal speed where the scrolling is correct, at least in DOSBox (2200 cycles is good). Too fast or too slow and you get scrolling issues. It doesn't have the same speed-sensitivity issues with VGA cards.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 7 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++

Well I got a CHIPS 82C435 card, I will report back when I receive it.
Some VGA cards still have issues so the game isn't perfect apparently... 🤣

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 9 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++

all that speed talk made me realize I didn't try my 286 with the low setting... at 8mhz it still haves the same scrolling issues - just loading takes longer 🤣
Secret Agent and Crystal Caves run OK , these are using the Keen1-3 engine right?

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 12 of 68, by elianda

User metadata
Rank l33t
Rank
l33t

Wasn't it the case that the super-ega mode used in Keen 4-5-6 basically uses VGA features for the soft scrolling of the EGA screen?
At least I have seen the same that when on the same machine the graphics card is changed from VGA to EGA Keen starts stuttering.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 13 of 68, by K1n9_Duk3

User metadata
Rank Member
Rank
Member
elianda wrote:

Wasn't it the case that the super-ega mode used in Keen 4-5-6 basically uses VGA features for the soft scrolling of the EGA screen?
At least I have seen the same that when on the same machine the graphics card is changed from VGA to EGA Keen starts stuttering.

No. the engine uses the panning register to do the smooth scrolling ("smooth" as in "in multiple of 2 pixels"), which should be a standard EGA feature. The issues caused by switching from a VGA to an EGA card might be related to the fact that apparently EGA cards run 320x200 at 60 Hz while VGA card run it at 70 Hz. The Keen 4-6 engine uses multiples of 70 Hz for the internal timers, which means the delays don't align properly with the EGA refresh rate.

I think the jerky motion as seen in the video is caused by the CRT start address and the panning registers being updated at a bad time. From what I've seen in a disassembly, the update code tests the video status register to find the best moment to update the screen (address and panning). The code allows a maximum delay of 3 tics in the 70 Hz counter (about 0.043 seconds) and if the status doesn't line up properly during that time, the code ignores the status bits and updates the screen anyway. The thing is, there will be interrupts (otherwise the 70 Hz counter wouldn't be updated), which means there is a chance that the code misses the perfect moment to update the screen. From what I've seen, the "Fix jerky motion" option is even more likely to update the screen disregarding the state of the status bits.

I would suggest turning sound and music off, but as the choppy scrolling is also present during the terminator intro (when there's no sound or music playing), this probably won't help either.

I thought there was a "/latchpel" switch that might have helped, but that doesn't seem to be present in Keen 4-6 (or at least not in the latest version of the games). It seems that the "/jerk" switch replaced it. There is also a "/nopan" switch, but that will make the scrolling even more choppy.

If Keen Dreams and BioMenace work fine on your system, maybe you should try earlier versions of Keen 4. Tell me if one of them works better. If it does, it should be possible to patch its screen update code into the other games.

Reply 14 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++

Well I'll be damned: the "Special Demo Version v1.0 (538,631 bytes)" does have smooth scrolling 😁 , have a look: https://www.youtube.com/watch?v=WO51m7lWODI

I have tested all other versions as well, they all have the same problematic scrolling as shown in the video at the 1st post... I have no idea how to inject the old code to the new versions but if something comes up I'll be glad to test it 😀

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 16 of 68, by CkRtech

User metadata
Rank Oldbie
Rank
Oldbie

Interesting. I just ran "Special Demo Version 1.0" on my Matrox Mystique, and the scrolling was also smooth.

Displaced Gamers (YouTube) - DOS Gaming Aspect Ratio - 320x200 || The History of 240p || Dithering on the Sega Genesis with Composite Video

Reply 17 of 68, by keropi

User metadata
Rank l33t++
Rank
l33t++
K1n9_Duk3 wrote:

There are patching utilities that can modify the Keen 4-6 executables (in memory, the EXE files aren't modified). I'll need to know which versions of the games you have, so I where in the executable the screen update code will be.

Awesome, Keen4+5 are v1.4 and Keen6 is 1.5
thanks a bunch in advance 😊

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 19 of 68, by K1n9_Duk3

User metadata
Rank Member
Rank
Member

I've finished the patches for keropi. See attached files.

Please note that these patches only work for one specific version of each game. That's version 1.4 (Apogee release) for Keen 4 and 5, and version 1.5 for Keen 6.

First of all, download CKPatch v0.11.3 here.

Download my patch scripts, then extract my patch scripts (PATCH?.TXT and CK?.BAT) into the game's directory. Also copy the corresponding CK?PATCH.EXE into that directory. To play the game, simply run the CK?.BAT file.

I'm not sure what happens when you try to run these patches on the wrong game version, so make sure you're using the correct version of the game when trying to run these patches. If I understand the syntax correctly, the patch scripts should only modify the code of the correct EXE, so if you try to run it on version 1.0, it should not change anything, but I haven't actually tested this.

By the way, I added the original assembly code as comments in the patch file, so you can see what's going on in the screen update code. If you know a bit about programming in assembly, you should be able to modify the patch for better results on your system.

Edit: If CKPatch shows an "unrecognized version" error, try unpacking the executable with UNP or UNLZEXE.

Attachments

  • Filename
    keen4-5-6.zip
    File size
    2.39 KiB
    Downloads
    495 downloads
    File comment
    patch files for CKPatch
    File license
    Fair use/fair dealing exception
Last edited by K1n9_Duk3 on 2017-06-13, 22:53. Edited 1 time in total.