CGA / Hercules refresh rates

Support and general discussion.
Post Reply
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

CGA / Hercules refresh rates

Post by JohnElliott »

The software provided with the ATI Graphics Solution attempts to detect what monitor type is in use by counting how many vertical retraces there are in 18 ticks of the system timer. For a CGA-type display, this would normally be a little under 60; for a Hercules-type, just under 50. The ATI software accepts 45-54 for a Herc, 55-64 for a CGA.

I've written a little utility to display the refresh figures: http://www.seasip.info/DOS/rfsh.zip . I've tested it on a system with real CGA and Hercules cards fitted, and I usually get results like:

Code: Select all

A>rfsh
CGA  refreshes: 58
Herc refreshes: 47
When I try it on PCem, I get results on an emulated Hercules that are slightly high (values in the range 53-55) and only about half the expected refresh rate on a CGA (values in the range 28-30). Does anyone know why?
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: CGA / Hercules refresh rates

Post by SarahWalker »

Hercules could either be that the emulated 6845 clock is a bit off, or that there's some bug in the 6845 emulation resulting in horizontal or vertical timings being too short. Or that the PIT is running slightly slow, maybe an one-by-one bug somewhere. Hercules software generally isn't timing critical so I've never looked too closely at this.

The CGA result is more worrying though. What's the exact configuration you're using to run this?
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

Re: CGA / Hercules refresh rates

Post by JohnElliott »

Here are the configs I'm using. Tested on a stock build of the latest commit (91640c0) built from source under Linux.
Attachments
Hercules.cfg
(1.4 KiB) Downloaded 313 times
IBM CGA.cfg
(1.36 KiB) Downloaded 310 times
Post Reply