Scali
Veteran Member
I am currently playing around with Hercules graphics programming.
I don't have a real Hercules card. I do however have two clones. One is an ATi Small Wonder, the other is a Paradise PVC4 (two very similar cards, perhaps even a shared design?).
What I noticed is that these cards use a 16.257 MHz crystal. This is the same frequency as the crystal on an IBM MDA card (and on an EGA card).
However, on actual Hercules cards, you find a 16.000 MHz crystal instead.
Studying the CRTC registers for Hercules, it appears that it uses the exact same settings as IBM's MDA card in textmode. This would imply that the refresh rate of a real Hercules is slightly lower than MDA in textmode.
However, for the graphics mode, the CRTC registers appear to be programmed to the same number of scanlines, but a slightly narrower horizontal width.
That would mean that the graphics mode on a real Hercules card would be closer to the 50 Hz of textmode on a real MDA card.
For completeness, here are the values I distilled from the INIT.ASM file that comes on the Hercules Graphics Plus disks (http://minuszerodegrees.net/software/hercplus.zip):
So my first question is:
Could people with Hercules cards or other clones with MDA-compatible output check what kind of crystal is on there?
Even better would be if someone could measure the frame timings with an actual scope, both for text and graphics modes.
Second question is:
If anyone has any additional resources for programming Hercules, or anything related, I'm all ears (original manuals/reference documents etc would be very welcome).
I don't have a real Hercules card. I do however have two clones. One is an ATi Small Wonder, the other is a Paradise PVC4 (two very similar cards, perhaps even a shared design?).
What I noticed is that these cards use a 16.257 MHz crystal. This is the same frequency as the crystal on an IBM MDA card (and on an EGA card).
However, on actual Hercules cards, you find a 16.000 MHz crystal instead.
Studying the CRTC registers for Hercules, it appears that it uses the exact same settings as IBM's MDA card in textmode. This would imply that the refresh rate of a real Hercules is slightly lower than MDA in textmode.
However, for the graphics mode, the CRTC registers appear to be programmed to the same number of scanlines, but a slightly narrower horizontal width.
That would mean that the graphics mode on a real Hercules card would be closer to the 50 Hz of textmode on a real MDA card.
For completeness, here are the values I distilled from the INIT.ASM file that comes on the Hercules Graphics Plus disks (http://minuszerodegrees.net/software/hercplus.zip):
Code:
/* 6485 controller mode data */
char hgcdat[2][12] = {
{
/* Text mode (MDA) */
// Each character is 9 pixels
// Each row is 14 scanlines
0x61, // Horizontal total: 97 characters ('minus one', 98*9 = 882 pixels)
0x50, // Horizontal displayed: 80 characters (80*9 = 720 pixels)
0x52, // Horizontal sync position: 82 characters (82*9 = 738 pixels)
0x0f, // Horizontal sync width: 15 characters (15*9 = 135 pixels)
0x19, // Vertical total: 25 rows ('minus one': 26*14 = 364 scanlines)
0x06, // Vertical total adjust: 6 scanlines (364+6 = 370)
0x19, // Vertical displayed: 25 rows (25*14 = 350 scanlines)
0x19, // Vertical sync position: 25 rows (25*14 = 350 scanlines)
0x02, // Interlace mode: 2
0x0d, // Maximum scan line address: 13 scanlines ('minus one', set character height to 14)
0x0b, // Cursor start: 11 scanlines
0x0c // Cursor end: 12 scanlines
},
{
/* Graphics mode (HGC) */
// Each character is 2 bytes, each byte is 8 pixels
// Each row is 4 scanlines
0x35, // Horizontal total: 53 characters ('minus one': 54*2*8 = 864 pixels)
0x2d, // Horizontal displayed: 45 characters (45*2*8 = 720 pixels)
0x2e, // Horizontal sync position: 46 characters (46*2*8 = 736 pixels)
0x07, // Horizontal sync width: 7 characters (7*2*8 = 112 pixels)
0x5b, // Vertical total: 91 rows ('minus one': 92*4 = 368 scanlines)
0x02, // Vertical total adjust: 2 scanlines (368+2 = 370)
0x57, // Vertical displayed: 87 rows (87*4 = 348 scanlines)
0x57, // Vertical sync position: 87 rows (87*4 = 348 scanlines)
0x02, // Interlace mode: 2
0x03, // Maximum scan line address: 3 scanlines ('minus one', set 'character' height to 4, to get 4-way interleaved graphics mode)
0x00, // Cursor start: 0 scanlines
0x00 // Cursor end: 0 scanlines
}
};
So my first question is:
Could people with Hercules cards or other clones with MDA-compatible output check what kind of crystal is on there?
Even better would be if someone could measure the frame timings with an actual scope, both for text and graphics modes.
Second question is:
If anyone has any additional resources for programming Hercules, or anything related, I'm all ears (original manuals/reference documents etc would be very welcome).
Last edited: