• Please review our updated Terms and Rules here

The XT-Hercules Graphics Thread :)

dr.zeissler

Experienced Member
Joined
Jan 4, 2014
Messages
417
Location
Germany
Hi,

I am currently using my old and first PC again. It's the only PC that was called "kind of homecomputer-style-machine" because of it's design. In the past I hated it, because I got it with a CGA Monitor that has the ugly CGA colors/palettes in gfx-mode and no real high resolution (above 640x200) while my friends had C128D, A500, MegaST1. So no chance for me and my 8088/CGA/Beeper Machine :(

Now I am looking different to that machine. It's a really nice one, quiet and with great design.

I could have use CGA again, but currently Hercules is the better choice in my opinion. Games look better in Hercules then in CGA, even if thy are emulated through software. And the High-Res Mode of Hercules is quite usefull in Windows, Gem, Geoworks etc. So I startet to collect software for the machine and there is lot's of stuff for it :)

Even in 2016 someone released a very nice Hercules-Demo that is also shown in my video.

Games with native Hercules-Support according to trixter's mobygames: http://www.mobygames.com/browse/games/dos/tic,2/ti,4/
Games with native CGA-Support according to trixter's mobygames: http://www.mobygames.com/browse/games/dos/tic,2/ti,1/

Currently I am at the point to search for the best CGA-Emulator for a CGA-Only game. Most games do work with my favorite CGA-Emulator "EMU", but If the game uses or falls back to textmode, then this emulator is useless, because it can do no fallback in textmode. Therefore quitting a game leads to a reboot. The main Problem of CGA-Emulation on Hercules with an XT-Class Computer is getting a good picture with a propper animation speed. Mainly this means using an CGA-Emulator that does some kind of Scanlines (but there are no real scanlines, to me it looks like two lines drawn and then a black line) and a sharp animation. Using no black-lines means getting "ghosting" on the animation.

A have collected a bunch of CGA-Emulators but mustly I use "EMU" because it's fast and delivers a centered Picture on my machine. But as I wrote before, some games do not work with it and some CGA-Titles do not work with any CGA-Emulator I have collected so far. I am pretty sure that Hercules Gaming can be optimized by finding the best CGA-Emulator for each Game. Tweaking to get the best result should be the goal.

Thx Doc :)

Some pictures of my machine: https://www.flickr.com/photos/94839221@N05/albums/72157665135854734
 
Last edited:
Some CGA-Titles do not work and perhaps they need to be "modified" in order to run with a CGA-Emulator.

-WORLDKARATE > starts but freezes before gameplay (gfx is visable but not correctly displayed)
-WINTERGAMES > starts but freezes before the animation of the Intro. (Gfx is visable)
-WORLDGAMES > same as above
-SUMMERGAMES > same as above
-BRUCELEE > freezes with the first tone, gfx is visable and corretcly displayed

I think there should be special versions of CGA-Emulators for games, but I did not find them yet.
Some CGA-Titles do a direct call on cga-hardware and do not work either. I tested 8088mph :) and cga-demo by codeblasters. Both do not work as expected. CGA-Dots does work with "EMU".

I also started to do some painting on the machine. PCPAINT and Deluxepaint support Hercules-GFX native and both have patterns too.

It's quite stunning what you can do if using patterns on pictures. The only problem is, finding suiteable source-material that does not loose all of it's details while reducing the colors to two. Material created with less or equal 16 colors often uses patterns, therefore these are possible good choices. I think a real Gfx-Artist can do fantastic things with Hercules gfx. Because I am no gfx-artist, things I can do is adding detail to the picture again, by re-drawing corruptes lines that come from the color reduction.

I stole some b/w art from the early macs. They are not displayed in the correct aspect. Doing aspection correction means editing the picture in a way that details get lost, so displaying the high detailed image in the wrong aspection is the better choice in my opinion.

If someone has collected some old hercules-software I am really interested in this. Cdtextfiles do perhaps have some, but looking through every CD takes a very long time. I did not find a complete contend-index for every CD at cdtextfiles.

I am interested in textmode-stuff as well. I got a "rapper/dancer" for textmode. Really fun to watch this. I got a starfield for CGA that does not work with CGA-Emulation correctly, but the ASM-Code is included. Perhaps some could give me an advice to "change" the code to native hercules.

Starfield code download:
http://forum.classic-computing.de/i...37&h=a3808fe79c28fab4135079335041ade5ccd7009d

Some Informations on Hercules Hardware:
Code:
                Textmodus      Grafikmodus
Adresse	        0x000B0000     0x000B0000
Speicher	4 KByte	       64 KByte
Seiten	        1	       2
Controller	CRTC 6845      CRTC  6845
CRTC Ports	0x03B0-0x03BF  0x03B0-0x03BF
Zeichenmatrix	9x14	       9x14
effektiv	7x9	       7x9
max. Auflösung	720x350	       720x348
max. Zeichen	80x25	       80x25
max. Farben	mono	       mono
Monitor	        digital	       digital
Bildfrequenz	50 Hz	       50 Hz
Zeilenfrequenz	18,432 kHz     18,432 kHz
Punktfrequenz	16,257 MHz     16,257 MHz

Code:
AKA: Hercules, HercMono, HGC 

An extension to the ancient MGA, it provided two video modes: text at 80x25 and graphics at 720x348. An HGC (or a clone) will be an 8-bit ISA card with a female DB9 connector for the monitor, and usually a DB25 for a parallel port. 

In text mode, the characters were defined by a ROM set that was 9x14 pixels. Actually, in ROM it was 8x14 and the 8th column was duplicated for the high-ASCII line drawing glyphs. Text attributes (instead of color) available were: blink, underline, inverse, and high-intensity (on some monitors). 

The HGC sported 64k of RAM, enough to support 8 pages in text mode, or 2 in graphics mode. This memory was mapped to B0000h-BFFFFh in the main processor's address space, with B8000h-BFFFFh able to be turned off to allow simultaneous use of the HGC and a color video card. In graphics mode, memory is laid out in four banks per page, each holding every fourth scan line. 

BIOS support for the HGC was nonexistant. Text mode operations were the same as for the MGA, but graphics was completely unsupported. Most programs that supported it used a TSR to do the low-level mucking about. There were also TSRs that would do a basic emulation of a CGA card. 

I wouldn't know where to find such drivers anymore, so here's some code to do the mucking that I managed to swipe from a few places and bring together:
 (pure C, flat 32-bit addressing) 

/* 6485 controller mode data */
char hgcdat[2][12] = {
    { 0x61, 0x50, 0x52, 0x0f, 0x19, 0x06,
      0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c  },
    { 0x35, 0x2d, 0x2e, 0x07, 0x5b, 0x02,
      0x57, 0x57, 0x02, 0x03, 0x00 ,0x00  }
};

/* set mode:  0 = text,  1 = graphics */
void hgcmode(int ctrlmode)
{
   unsigned int reg,ctrl;
   ctrl = (ctrlmode) ? 0x82 : 0x20;
   outp(0x3bf,3);     /* allow graphics enable page 1 */
   outp(0x3b8,ctrl);  /* disable video and set mode   */
   for (reg = 0; reg <= 11; reg++) {
                      /* program the crt parameters   */
        outp(0x3b4,reg);
        outp(0x3b5,hgcdat[ctrlmode][reg]);
        }
   outp(0x3b8,ctrl+8);  /* re-enable the video        */
}

/* plot a pixel:  0 = off,  1 = on */
void hgcplot(unsigned short x, unsigned short y,int c)
{
  unsigned char mem=(unsigned char *)0xB0000;
  if (c) mem[((y&3)<<13)+(y>>2)*90+(x>>3)]|=128>>(x&7);
  else mem[((y&3)<<13)+(y>>2)*90+(x>>3)]&=~(128>>(x&7));
}

Mode switching code is from http://www.escape.ca/~bbuckels/kidstuff/ever.txt, should it still be around.

Some Hercules-Tools I have collected so far:
Code:
cs.zip		Use CGA programs with Hercules card
h43emu10.zip	EGA 43 line mode emulator for Hercules cards
herc-eps.pas	Print Hercules screen on Epson printer. TP src
hercap10.zip	30K  Capture Hercules graphic screens to disk
hercb21.zip	BIOS & CGA emulator for Hercules graphics card
hercsv20.zip	Screen blanker for Hercules Graphics card
hercules.zip	Hercules Mono Graphics utilities
hergreek.zip	Greek characters for Hercules, no chip needed
herkules.zip	HiRes 90x45 text mode driver for Hercules disp
hgc-view.zip	Display txt file 180x43 char on Herc mono card
hgcib202.zip	Run CGA programs on Hercules card. v2.02
hi-hgc.zip	Hercules 640/400 mono mode description
simcga40.zip	Use CGA pgms in monochrome with Hercules board
ucga10.zip	CGA simulator for the Hercules Graphics card
 
Last edited:
My first computer had a HGC so I'm kinda interested in the topic. I wonder what I could've do if I knew more about computers (in general) at the time. Unfortunately that PC is long gone and I ocassionaly feel nostalgic.

Anyways, I have a small collection of CGA sims. Maybe there is something you haven't tried yet? It would be nice if you could also upload your archive somewhere.

http://s000.tinyupload.com/index.php?file_id=09073893209228835510

P.S. That's a nice looking machine. :)
 
Last edited:
Is this also yours?


If not, there are some tips on CGA emulation here by the same guy. Also, a tip how to hack digger to work with CGA emulation. :)

Windows 3.0/3.1 should support Hercules too. Although I don't know if it would be slow on that machine. What I remember, Simcity and the original Monkey Island should support Hercules natively.
 
"3 shades of gray"...
So, there finally *is* a demo for HGC!
Too bad only the beginning is in graphics mode, as text mode isn't really impressive since "BB", still, a good start!
Also, the kefrens-like part is corrupt when running on a 286, works fine on a 8088.
 
The main CGA-Emulator I use is this one here=> http://www.sorgonet.com/8086/CGA_emulation/ The advantage is that it's fast, has no ghosting and delivers a centered image on the monitor.
Two problems occur when using it. First it has some kind of scanlines, so the image is not fully sharp, but quite OK, and secondly it cannot display native textmode.

Interesting things copied from the other thread:

Digger:
As with vertical retrace, it is possible to work around the mode change by hacking. In DIGGER.COM search for the byte pattern BA D8 03 B0 02 EE and change it to B8 04 00 CD 10 90; in the program file I have here the pattern starts at offset 38F. The hack changes the mode register write to a call to INT 10h to set mode 4. It seems to work OK in my tests in DOSBox, but please reply with how you fare on your real system.

Windmill Software:
Windmill Software (which was really just a guy and his wife working out of their living room) loved doing low-level CGA tricks. As already mentioned here, Digger uses the normal 320x200x4 mode, but sets the registers directly to do it. They did it for performance reasons mostly as BIOS calls are not exactly fast on an 8088 machine. I never got around to trying Digger on my XT, but I have run Moonbugs on it. This uses the hacked 160x100 mode for the in-game graphics, but the title screen is 320x200 via direct register writes. The speed difference vs using the BIOS is quite noticeable too. On most games, there's a pause of about half a second when setting graphics mode, but on Moonbugs it happens almost in the blink of an eye. AFAIK, only Digger, Styx, and Moonbugs set the 320x200 mode this way, with Windmill's other games just using INT 10h. Edit: I just remembered now that Exterminator uses the same game engine as Moonbugs and Styx (320x200 title screen and 160x100 in-game graphics) and I'd also modified it for VGA.

Moonbugs:
I've hacked Moonbugs before to work on VGA. Simply insert MOV AX,4 INT 10h to take care of the title screen and then go to the table where it has the CGA register values and adjust the one for character size (which would be 4 on CGA and 8 on VGA). Finally, before running the game, execute the VGA BIOS function to disable text mode blinking as Moonbugs turns this off so it can get high intensity colors (I don't remember what function that is; you can look it up)

Blinking on screen:
Yes. On EGA/VGA, you would do this with:
MOV AX,1003h
MOV BL,1 (0 to enable blinking)
INT 10h

CGA however doesn't have any BIOS function for that, so there you would:
IN AL,19h (39h to enable blinking)
OUT 3D8h,AL
IN AL,7
OUT 3D9h,Al

The second line is only necessary on true blue IBM CGA cards since you must set the border to a nonblack color in 80-column text mode or you'll get a B&W picture (a hardware bug that does not occur on the PCjr, Tandy, and all CGA clones)

In 40-column mode, you would do this
IN AL,8 (28h to enable blinking)
OUT 3D8h,AL
 
Why using anything above 1.03! ? I got pagemaker, inavision, paintbrush and perhaps there are more titles for it :)
 
"3 shades of gray"...
So, there finally *is* a demo for HGC!
Too bad only the beginning is in graphics mode, as text mode isn't really impressive since "BB", still, a good start!
Also, the kefrens-like part is corrupt when running on a 286, works fine on a 8088.

sorry, what is "BB" ?
 
Ah ok, does not look like that "BB" runs on an XT with hercules, but I have the Textmode-Rapper/Dancer instead :)
 
3.1 needs a 286.
3.0 may work, but indeed, don't expect much from 512 KB RAM.

You are right. Sorry. Wasn't sure. :)

Why using anything above 1.03! ? I got pagemaker, inavision, paintbrush and perhaps there are more titles for it :)

Because of this?


Anyways, what about PC-GEM? It should be light on requirements and there is probably more software for it then for Windows 1.0.x. :) OpenGEM used to include a bunch of formerly commercial GEM programs in some of the earlier versions. That's probably still available somwhere on the web. And some might be found in Tandy archives around the net. I think some Tandys came with GEM pre-installed.

There are also alternative desktop components from OpenGEM/FreeGEM community (including uncrippled one). Projects are pretty much abandoned over a decade, but files are still available.
 
I don't think any of that was pirated. I know for fact that Artline was released as freeware. And GEM got released as open source by Caldera, almost two decades ago. Not sure about status of other apps, though. They were readily downloable on the net at some time or another from multiple "legal" sites.
 
Last edited:
Ah, ok. :) If you get time, it would be nice if you could make a note of every game/program you test. It would be interesting to have at least a partial list what runs natively or emulated.

Waiting for the next video. :)
 
Thx! All native Hercules-Games are well known due to the fantastic mobygames-site. The only thing left for the native ones are if they do work on an XT.
Interesting are the CGA Titles that need to be emulated in order to run on a hercules-gfx-card.

Currently I am using GRASP but I could not find out why "mandy" is displayed all over the screen and not centered...
 
I find thread interesting since I have system with Hercules/CGA/CGA emulation which is hardware selectable. I have not understood what is happening hardware-wise, but it seems to behave in same manner as ATI VGA XL in CGA/EGA mono (if only could maintain setting through the VGA port as well!)

I am not too well in understanding of software-based CGA emulation, but would like to know more.

Here is screenshot of system jumpered in CGA emulation (I have not tried setting with actual CGA display but am curious)

IMG_1312.jpg

IMG_1313.jpg
 
Back
Top