VOGONS

Common searches


First post, by blinddarm

User metadata
Rank Newbie
Rank
Newbie

hi there,

i have an old Xt Computer with Hercules Monochrom Graphics
and CGA Emulation.
http://www.google.de/imgres?hl=de&client=fire … 29,r:0,s:0,i:73

Most CGA Games are working fine, except for Digger.
i tried many Emulators (my favourite is HGCIBM) but result is always the same. Screen goes blank and System freeze.
Even the Remastered Version of Digger won't work.

Btw. Moonbugs also dont work...may be because this
game use "special" graphic Mode...

Any suggestions?

Regards,
Norman

Think Kilobyte

Reply 1 of 29, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Some CGA games work on Hercules graphics with CGA simulator programs, but many do not; it depends on the extent to which they directly interact with the CGA hardware. A typical hangup is vertical retrace, but other issues are possible. In the case of Digger, it activates 320x200 graphics by writing to the CGA mode register, not by calling BIOS to set mode 4.

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.

Reply 2 of 29, by blinddarm

User metadata
Rank Newbie
Rank
Newbie

thanks ripsaw for yor reply.
Problem is, i have no experience in programming or hacking.
but i will try.
what kind of program do i need?
is it a Hex Editor?

regards,
Norman

Think Kilobyte

Reply 5 of 29, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

Wow that's a nice computer you have there!

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 7 of 29, by VileR

User metadata
Rank l33t
Rank
l33t

Nice! Always appreciate seeing older 8088-class systems on here, especially those extra-weird European ones. 😀

First time I hear of this HGCIBM emulator... how does it differ from SimCGA / Magic Key?

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 9 of 29, by blinddarm

User metadata
Rank Newbie
Rank
Newbie

@VileRancour
In my Opinion it is the fastest Emulator... Have a look to the attached Zip File.

@mr_bigmouth_502
a closer look to the keyboard...

svp1s4.jpg

Attachments

  • Filename
    HGCIBM.zip
    File size
    15.55 KiB
    Downloads
    353 downloads
    File comment
    CGA Emulator by Athena Digital
    File license
    Fair use/fair dealing exception

Think Kilobyte

Reply 10 of 29, by VileR

User metadata
Rank l33t
Rank
l33t

ah good, the Ctrl key is in its rightful place! To me that was the only thing that wasn't quite right about the Model M's layout. I've gotten used to it since it became the 'standard' placement in modern keyboards, but the XT/AT placement of Ctrl has always made more sense to me.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 11 of 29, by blinddarm

User metadata
Rank Newbie
Rank
Newbie

Sorry for digging out this old thread but i found an emulator,
which is able to handle the CGA Mode Register...
So you can play original Digger without hacking...

see attached ZIP File

regards,
Norman

Attachments

  • Filename
    UniCGA.zip
    File size
    6.62 KiB
    Downloads
    363 downloads
    File license
    Fair use/fair dealing exception

Think Kilobyte

Reply 12 of 29, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
blinddarm wrote:

i found an emulator which is able to handle the CGA Mode Register

It doesn't "handle" any registers; that's only possible with V86 mode on 386 or later. What it does is switch to graphics mode (so the game doesn't have to) when you load it, and switch back to text mode when you unload it. Apparently it's intended to be used in a batch file, unless you like to type commands blindly at a blank screen.

Reply 13 of 29, by kao

User metadata
Rank Member
Rank
Member
Most CGA Games are working fine, except for Digger. i tried many Emulators (my favourite is HGCIBM) but result is always the sa […]
Show full quote

Most CGA Games are working fine, except for Digger.
i tried many Emulators (my favourite is HGCIBM) but result is always the same. Screen goes blank and System freeze.
Even the Remastered Version of Digger won't work.

Btw. Moonbugs also dont work...may be because this
game use "special" graphic Mode...

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.

Last edited by kao on 2012-11-06, 23:10. Edited 1 time in total.

Reply 14 of 29, by kao

User metadata
Rank Member
Rank
Member

Some CGA games work on Hercules graphics with CGA simulator programs, but many do not; it depends on the extent to which they directly interact with the CGA hardware.

The general rule of thumb is: If a CGA game works on VGA, it usually also works on Hercules

A typical hangup is vertical retrace, but other issues are possible

Vertical retrace causes problems on VGA too because it's 70Hz on there while CGA is 60Hz. While this won't prevent games from running, a lot of them like Alley Cat and Sierra titles have choppy animation. In the case of Hercules, you have a bigger problem because the refresh on there is 50Hz (slower than CGA).

Yes, a hex editor is what you need. And keep a backup of the original file, so you can hack without fear.

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)

Reply 15 of 29, by blinddarm

User metadata
Rank Newbie
Rank
Newbie

Thanks Guys for your replys...

@kaO

so it is possible to play Moonbugs too on a Hercules Card?

i tried to hack it by changing code to B8 04 00 CD 10 90...
now the Title screen works but crashes by pressing a key

oh, and sorry for my bad english 😊

Think Kilobyte

Reply 16 of 29, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The 160x100x16 "graphics" used in Moonbugs is actually register-tweaked mode 3 text. Round 42 does the same thing. Even if you make similar tweaks for the character height (not sure if that works on a mono CRTC), there's really no effective way to represent 16 colors/shades with black and white text.

Reply 17 of 29, by kao

User metadata
Rank Member
Rank
Member

The 160x100x16 "graphics" used in Moonbugs is actually register-tweaked mode 3 text

Right. It's a trick done by turning blinking off, then setting the Maximum Scan Line register to half its normal value, after which you use ASCII character 219 (█) to form your "pixels". Since CGA text is 8x8, you'd set it to 4 and VGA is 9x16, thus 8. Hercules (plus EGA) create a problem because they use 8/9x14 text, which is not an even number.

I doubt it will work on MDA/Hercules (at least I've never heard of anyone trying it on there) and as you already pointed out, you couldn't really simulate 16 colors anyway.

Last edited by kao on 2012-11-06, 22:55. Edited 1 time in total.

Reply 18 of 29, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Using character 219 would only give you 80 columns, so horizontal half-cell character 221 or 222 is used with the foreground and background color to form the colors of the two "pixels" per character. Turning blinking off is done so the background color can be intense.

Reply 19 of 29, by kao

User metadata
Rank Member
Rank
Member

Turning blinking off is done so the background color can be intense.

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