VOGONS


First post, by wbc

User metadata
Rank Member
Rank
Member

Hello everyone, long time no see (busy with ZX and modern PC stuff :))

Recently I dusted off my archives and decided to release this small collection of tiny MS-DOS resident .COM applications made by me around 2015-2019 and up to today, mostly for fixing small quirks in VGA graphics cards implementation; aiming at simplicity and low runtime footprint (~128-256 bytes in memory). Some of them (like KEENFIX) were already posted here at VOGONS some time ago, others being unreleased for a quite long time :)

Link to GitHub repo: https://github.com/wbcbz7/dos-vga-tsr-goodies

Note: almost all TSRs are following the common command line switches concept. Notable common switches are:
/U releases TSR from memory if INT10 chain is not already hooked by another TSR

KEENFIX
The latest version of VGA mode 0xD (320x200 16 color) CRTC retrace fix, primarily made for fixing color tint issues in Commander Keen series games on Matrox graphics cards and certain LCD monitors. Also includes option to completely remove all (but left) borders for fixing display adjustment issues. Also Catacomb 3D issue is finally fixed :)

CLMCLK
Cirrus Logic CL-GD5420-5429 memory clock utility. Similar to MCLK/CIRMCLK but works around a quirk in GD542x Video BIOS, which resets memory clock to default every mode set (hence the TSR nature :)
Syntax is

CLMCLK.COM [dec]

, where dec is that so

MCLK frequency = (14.318 MHz * dec) / 8.

MGA15BPP
Fix issues with 15bit per pixel (RGB555) VESA modes incorrectly reported as 16 bpp, commonly occuring on Matrox and Tseng built-in VBE 2.0 Video BIOS interfaces; sources were lost :(

VGA60HZ
Force 60 Hz refresh rate and 4:3 letterboxed aspect ratio for certain VGA modes like mode 0x13 (320x200 256 color)

LCD640
VGA 400-lines mode tweak and LCD "fix". Sets negative vertical/positive horizontal polarity for 350 lines detection if 320/640 by 200/400 line mode requested, tricking some LCD displays in detecting mode as 640x350/400 instead of 720x400, improving pixel clarity.
For certain applications (like FastTracker 2.x or some Mode-X apps) whose reset VGA registers after mode change, an /T option is provided, which hooks IRQ0 timer interrupt and monitors VGA register changes every timer tick
Would be useful in combination with OSSC if 640/720-pixel mode detection for AV3 RGBHV input implemented, which is not the case today for official firmware, although I have WIP feature based on latest 0.89 firmware working now :)

DACFIX
Resets VGA RAMDAC Write/Read Index to 0 and Mask register (0x3C6) to 0xFF after each mode set; purpose unknown (as it also unlocks CRTC registers 0-7), sources were also lost.

Attachments

  • Filename
    dos-vga-tsr-goodies_08022022.zip
    File size
    16.78 KiB
    Downloads
    132 downloads
    File comment
    MS-DOS VGA TSR goodies (08.02.2022 snapshot)
    File license
    Public domain

--wbcbz7

Reply 1 of 3, by ahyeadude

User metadata
Rank Newbie
Rank
Newbie

These are awesome. I recently got an OSSC and have been using the "VGA60HZ" TSR to alleviate the frame dropping I was getting on my Samsung 204B in 320x200@70HZ. It works for most games, but did notice that Lemmings 2 must use VBLANK for timing and runs 1/7th slower using the 60HZ TSR. I'm not sure how common that practice was, I really only noticed because of the Adlib music.

Reply 2 of 3, by jbenam

User metadata
Rank Newbie
Rank
Newbie
wbc wrote on 2022-02-07, 19:36:

Would be useful in combination with OSSC if 640/720-pixel mode detection for AV3 RGBHV input implemented, which is not the case today for official firmware, although I have WIP feature based on latest 0.89 firmware working now 😀

Did you ever release that WIP feature firmware for OSSC? IIRC I have tested it recently with the latest firmware and didn’t seem to find many issues with it.

Anyway my main gripes with the OSSC with DOS PCs are with how slow resolution changes are - you can miss intro/outro screens quite frequently.

Nothing can fix that, sadly. I wonder how the RetroTink fares with old DOS PCs?

Reply 3 of 3, by wbc

User metadata
Rank Member
Rank
Member
jbenam wrote on 2023-01-08, 12:34:

Did you ever release that WIP feature firmware for OSSC? IIRC I have tested it recently with the latest firmware and didn’t seem to find many issues with it.

it's not officially reelased yet, plus sources/binaries are on another machine I don't have access to for now.

--wbcbz7