Page 1 of 1

CGA / Hercules refresh rates

Posted: Sun 18 Aug, 2019 10:41 pm
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: . I've tested it on a system with real CGA and Hercules cards fitted, and I usually get results like:

Code: Select all

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?

Re: CGA / Hercules refresh rates

Posted: Mon 19 Aug, 2019 1:41 pm
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?

Re: CGA / Hercules refresh rates

Posted: Mon 19 Aug, 2019 6:44 pm
by JohnElliott
Here are the configs I'm using. Tested on a stock build of the latest commit (91640c0) built from source under Linux.