VOGONS


Best CGA & Hercules monochrome games

Topic actions

Reply 200 of 218, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
Benedikt wrote on 2021-09-03, 14:34:
mkarcher wrote on 2021-09-03, 13:46:

There were some emulators that (optionally) used different timings, but as I know little is known about their details.

It is not hard to figure out, though, because there are really only three timing variants that make sense, namely the 640x300 mode, the maximally compatible 720x348 mode and a mode that permits 640x400 pixels via interlacing.
The third one would need some kind of CRTC auto-detection, because different CRTC types handle interlacing differently or not at all.

That brings up the question of which CRTC models were used across the rather broad range of HGC and HGC-compatible boards. Any strictly 6845-compatible part should handle interlacing correctly, but of course that had zero importance for CGA and HGC support, so I wouldn't be surprised if some of them didn't bother.

I'm not sure how you could reliably auto-detect this however - very few 6845-type registers can be read for anything useful... and anything trickier (say, in combination with a display status register) may fry the monitor while getting you your result. 😉 Maybe a better approach would be a visual test, e.g. a Hercules version of the one in Trixter's CGA Compatibility Tester.

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

Reply 201 of 218, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
VileR wrote on 2021-09-03, 15:04:

I'm not sure how you could reliably auto-detect this however - very few 6845-type registers can be read for anything useful... and anything trickier (say, in combination with a display status register) may fry the monitor while getting you your result. 😉 Maybe a better approach would be a visual test, e.g. a Hercules version of the one in Trixter's CGA Compatibility Tester.

But wouldn't the presence or absence of interlacing support affect vertical synchronization, only? I thought that the worst possible outcome in this case would be screen rolling.

Reply 202 of 218, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
Benedikt wrote on 2021-09-03, 19:01:
VileR wrote on 2021-09-03, 15:04:

I'm not sure how you could reliably auto-detect this however - very few 6845-type registers can be read for anything useful... and anything trickier (say, in combination with a display status register) may fry the monitor while getting you your result. 😉 Maybe a better approach would be a visual test, e.g. a Hercules version of the one in Trixter's CGA Compatibility Tester.

But wouldn't the presence or absence of interlacing support affect vertical synchronization, only? I thought that the worst possible outcome in this case would be screen rolling.

Theoretically it shouldn't do even that, because the vsync frequency is constant whether interlace mode is on or off.

You mentioned auto-detecting the CRTC type, so I was thinking generally of telltale differences between models that you could somehow detect in software. For instance, some later 6845 models place additional sanity checks on certain register values - e.g. H/V sync position values are ignored unless they're greater than H/V Displayed respectively. Or, there area revisions which treat some zero values as zero, while others treat zero as the maximum value plus one (horizontal sync width is an example). If the difference affects the timing, this may be detectable by polling some readable register, e.g. the status register on the card itself (for the H/V blanking bits).

Problem is, the tolerance of most monochrome monitors is notoriously low, so any difference that might cause the timing to deviate enough to be detectable may not be safe. I do know that messing with the horizontal timings is a big no-no - vertical changes may not be as bad, but I'd triple-check that.

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

Reply 203 of 218, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
VileR wrote on 2021-09-03, 21:40:

Theoretically it shouldn't do even that, because the vsync frequency is constant whether interlace mode is on or off.

Now that I think about it, that's not quite right: when interlace mode is enabled in the CRTC, it delays vsync by half a scanline for the odd fields, in order to displace the scanlines vertically. *If* the Hercules card detects and respects this, you may be able to detect the change in the length of the vertical blanking period by polling the status register... but that's a big "if". Might be interesting to try and see if this actually yields a reliable auto-detection method. 😀

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

Reply 204 of 218, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I find this is very interesting! 😃
Makes me wonder how the original HD46505 CRTC behaves under such circumstances.
Provided, that it was ever used for Hercules compatible cards, too.

Edit: A Hercules Compatibility Tester would be cool, really!
Things like 640x400 mode, Half Mode and Full Mode could be tested, among other things.
It would be really neat if it also would detect an additional CGA card and could do some CGA-HGC compatibility testing for a dual monitor scenario.
The utility would also likely be helpful to find out incomplete HGC compatibility, as it was the case with DOSBox, see pictures below.

Edit: Ran the game on a real C64, too. Picture attached.

Attachments

  • c64_real_game.jpg
    Filename
    c64_real_game.jpg
    File size
    272.22 KiB
    Views
    276 views
    File comment
    Real C64 (early version, PAL)
    File license
    Fair use/fair dealing exception
  • c64hgc_crt_game.jpg
    Filename
    c64hgc_crt_game.jpg
    File size
    1.29 MiB
    Views
    545 views
    File comment
    Hercules hardware emulation (OAK OTI 037c / VGA card)
    File license
    Fair use/fair dealing exception
  • c64hgc_dbx_game.png
    Filename
    c64hgc_dbx_game.png
    File size
    4.39 KiB
    Views
    545 views
    File comment
    Hercules software emulation (DOSBox v0.7x)
    File license
    Fair use/fair dealing exception
Last edited by Jo22 on 2021-09-30, 03:25. Edited 1 time in total.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 205 of 218, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie
VileR wrote on 2021-09-03, 15:04:
Benedikt wrote on 2021-09-03, 14:34:
mkarcher wrote on 2021-09-03, 13:46:

There were some emulators that (optionally) used different timings, but as I know little is known about their details.

It is not hard to figure out, though, because there are really only three timing variants that make sense, namely the 640x300 mode, the maximally compatible 720x348 mode and a mode that permits 640x400 pixels via interlacing.
The third one would need some kind of CRTC auto-detection, because different CRTC types handle interlacing differently or not at all.

That brings up the question of which CRTC models were used across the rather broad range of HGC and HGC-compatible boards. Any strictly 6845-compatible part should handle interlacing correctly, but of course that had zero importance for CGA and HGC support, so I wouldn't be surprised if some of them didn't bother.

Looking at the HD6845S datasheet, which includes a comparison with the predecessor, the HD6845R, I finally understood how the 640x400 interlaced mode is supposed to work, and that it will fail and can not be adjusted to work on the newer HD6845S chip. Many late CGA/Hercules-on-a-chip clones seem to omit interlacing completely.

The main bottleneck in custom graphics modes on the 6845 is the row counter. This counter counts the current text row number, and it has only 7 bits. In text modes, it doesn't matter, no one seriously wants more than 100 lines of text on a typical 80s monitor. In graphics modes, on the other hand, IBM decided that the "character scan line" output becomes a "bank select" output. The CGA graphics mode runs at 100 rows of characters, each 2 pixels high, so the graphics mode has 2 banks. The standard HGC graphics mode runs at 87 rows of 4 scanlines per character. You can (and the bog standard CGA graphics emulator does) run the HGC in 3-bank mode. If you keep around 348 lines, you get 116 rows of 3 scanlines per character. This fits (including blanking) into the 128 row maximum. But you can't go down to 2 scanlines per character, because the maximum frame length will be around 256 scanlines, and even if the maximum vertical adjust of 31 can be applied, you just get 287 scan lines. The MDA/Hercules monitor won't sync to pictures with 287 lines.

So how does the interlaced 640x400 mode (which displays two 640x200 fields) work then, when we just discovered that we can't generate fields with 200 visible lines at 50Hz? It turns out that in interlace mode the row counter only counts every other text row! This means we can essentially count to 256 instead of 128, enabling us to program modes with just 2 banks per field. This quirk, i.e. counting of line-pairs has been "fixed" in the later HD6845S, so even in interlace modes, you are limited to counting 128 character rows, and you thus can't program a two-bank 640x200 field with correct MDA timings.

Reply 206 of 218, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
Jo22 wrote on 2021-09-03, 22:18:

The utility would also likely be helpful to find out incomplete HGC compatibility, as it was the case with DOSBox, see pictures below.

You're comparing the Hercules emulation of a VGA card with the Hercules emulation of DOSBox using a C64 emulation... 🤣

I'm not sure what's going on in those screenshots, but it looks like some kind of font issue -- not just the diagonal edge sections but the upper vs. lower case letters as well. In any case, I suspect some issue with the C64 emulator and not with Hercules graphics emulation.

Reply 207 of 218, by Fenix77

User metadata
Rank Newbie
Rank
Newbie

Here I found the article where it says the SIMCGA 4.2 was commercial and the earlier versions were public domain.
https://www.atarimagazines.com/compute/issue9 … /hints_tips.php
I'm not a programmer, but maybe SIMCGA 4.1 can be reverse engineered to know how it works. But it does not support the EGA monochrome like the commercial version.
Also, some games required a different emulator like Bubble Bobble and Qix.

Reply 208 of 218, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
mkarcher wrote on 2021-09-04, 00:02:

[...] But you can't go down to 2 scanlines per character, because the maximum frame length will be around 256 scanlines, and even if the maximum vertical adjust of 31 can be applied, you just get 287 scan lines. The MDA/Hercules monitor won't sync to pictures with 287 lines.

So how does the interlaced 640x400 mode (which displays two 640x200 fields) work then, when we just discovered that we can't generate fields with 200 visible lines at 50Hz? It turns out that in interlace mode the row counter only counts every other text row! This means we can essentially count to 256 instead of 128, enabling us to program modes with just 2 banks per field. This quirk, i.e. counting of line-pairs has been "fixed" in the later HD6845S, so even in interlace modes, you are limited to counting 128 character rows, and you thus can't program a two-bank 640x200 field with correct MDA timings.

Hmm... interesting. Row-count limitations on the (HD)6845 can be worked around (see 8088 MPH), but the tight timing requirements make it not really practical for a TSR supporting generic CGA software. And to get around that HD6845S "fix", you'd essentially have to resort to an emulation of 'correct' interlacing in software; even with no other roadblocks to that idea, you'd be tasking your interrupt service routine with yet more time-constrained work. So the bog-standard, non-interlaced 3-bank approach sounds like the only feasible solution.

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

Reply 209 of 218, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Alright! I just put my HGCGA TSR driver on Github.
There's probably still some copy pasta from my ETGA MCGA emulator in there, but that shouldn't really break anything.

Reply 210 of 218, by Jo22

User metadata
Rank l33t++
Rank
l33t++
ripsaw8080 wrote on 2021-09-04, 01:00:
Jo22 wrote on 2021-09-03, 22:18:

The utility would also likely be helpful to find out incomplete HGC compatibility, as it was the case with DOSBox, see pictures below.

You're comparing the Hercules emulation of a VGA card with the Hercules emulation of DOSBox using a C64 emulation... 🤣

I'm not sure what's going on in those screenshots, but it looks like some kind of font issue -- not just the diagonal edge sections but the upper vs. lower case letters as well. In any case, I suspect some issue with the C64 emulator and not with Hercules graphics emulation.

Yesss, I did. 😅 The C64 emulator uses 640x400 mode, so I couldn't use it with a real HGC compatible ISA board - my TTL monitor simply refused to sync to that frequency.
That's why when I had taken the photo, I used a late 90s multi-sync CRT monitor and a period-correct VGA card instead.
I must admit, though, I haven't done further testing with Hercules hardware because of this.
Releasing magic smoke by playing with the fly-back transformer (on TTL/MDA monitors) was a popular sports back then, or so I heard. 😉

In the future, I'll do some more tests in other emulators, maybe the error happens there, too.

If you guys wish, I can also provide the image file of that text-adventure. It seems to be public domain/freeware, but I will double check.
The font seems to be software-rendered by the emulator itself, but I'm speaking under correction.
Unfortunately, the C64 emulator is a mystery in itself. Not even the author is known.

Edit: C64 had an upper-case/lower-case mode that could be selected by a key combo.
Maybe I accidentally triggered it, can't remember anymore.
The TITLE was drawn with glyphs/symbols from the stock PETSCI character set, I assume.

outer-limits-intro-tv.gif

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 211 of 218, by Akuma

User metadata
Rank Member
Rank
Member

Well I sort of have a basic framework for loading all those emulators 😁

Its just a simple way to find out what the best emulator for each game is.
The goal: a list of every CGA game playable on HERCULES

This is what the tool looks like now:

hercmenu.gif
Filename
hercmenu.gif
File size
1.85 MiB
Views
353 views
File license
Fair use/fair dealing exception

I'm making progress, but its going to take a while.

Reply 212 of 218, by coolhaken

User metadata
Rank Newbie
Rank
Newbie
Fenix77 wrote on 2021-08-30, 15:55:
Calm down! […]
Show full quote

Calm down!

If anyone is interested send me a PM, and I send the software by e-mail. The files are, just, a few kilobytes in size.

PD: MagicKey 3 is already uploaded on archive.org. Just type "MagicKey" on the search box.

I'll try to upload there the collection of different versions of SIMCGA, MONO and three versions of CGA. I have other CGA emulators, but they are not properly sorted.

That's not "MagicKey 3", it's version is 1.0.
The big "3" is the trademark of "The Third Wave Publishing Corp."
And I guess nobody here knows how to use MKBOOT.EXE except ripsaw8080.

Reply 213 of 218, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
coolhaken wrote on 2021-10-02, 13:15:

And I guess nobody here knows how to use MKBOOT.EXE except ripsaw8080.

Well, I have a somewhat complicated procedure to load MKFILE.EXE into upper memory for booting in DOSBox, which is advantageous if all 640 kB of conventional memory is needed. However, MKBOOT.EXE is a different beast.

There appears to be a bug in MKBOOT.EXE where an invalid drive number is used for INT 13h/Ah=00h (reset), which returns an error and is retried in an endless loop. The bug can be fixed by modifying the bytes at offset 15E4 from CD 13 72 0F 33 D2 to 33 D2 CD 13 72 0D. After modification it will at least simulate booting from the A: drive, but I haven't really explored how well it works otherwise.

Note that many booter disks have no FAT filesystem, and in DOSBox must be mounted accordingly: imgmount 0 bootgame.img -t floppy -fs none

Reply 214 of 218, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
Akuma wrote on 2021-09-10, 16:18:
Well I sort of have a basic framework for loading all those emulators :D […]
Show full quote

Well I sort of have a basic framework for loading all those emulators 😁

Its just a simple way to find out what the best emulator for each game is.
The goal: a list of every CGA game playable on HERCULES

This is what the tool looks like now:
hercmenu.gif

I'm making progress, but its going to take a while.

Have you ever got winter/summer/world-games working on Hercules via cga emulation?
I never got them to work. Epyx must have done some crazy shit on cga. (On Int-Karatke too)

Retro-Gamer 😀PowerMac 6100-66/Houdini 486/66 - G4 Cube 450/Rage128pro OS9.0.1 - Macintosh LC/Apple IIe Card OS6.0.8 - Acorn A4000 Archimedes - Unisys CWD 486/66 + Aztech Washington

Reply 215 of 218, by coolhaken

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote on 2021-10-02, 16:44:

There appears to be a bug in MKBOOT.EXE where an invalid drive number is used for INT 13h/Ah=00h (reset), which returns an error and is retried in an endless loop. The bug can be fixed by modifying the bytes at offset 15E4 from CD 13 72 0F 33 D2 to 33 D2 CD 13 72 0D. After modification it will at least simulate booting from the A: drive, but I haven't really explored how well it works otherwise.

In that years, people use DOS 2.0 and MKBOOT works fine on real machines.
I think this is not a bug but a feature behind the times.

Reply 216 of 218, by Jo22

User metadata
Rank l33t++
Rank
l33t++
coolhaken wrote on 2021-10-02, 22:44:
ripsaw8080 wrote on 2021-10-02, 16:44:

There appears to be a bug in MKBOOT.EXE where an invalid drive number is used for INT 13h/Ah=00h (reset), which returns an error and is retried in an endless loop. The bug can be fixed by modifying the bytes at offset 15E4 from CD 13 72 0F 33 D2 to 33 D2 CD 13 72 0D. After modification it will at least simulate booting from the A: drive, but I haven't really explored how well it works otherwise.

In that years, people use DOS 2.0 and MKBOOT works fine on real machines.
I think this is not a bug but a feature behind the times.

That reminds me of Spiderman for DOS..
https://www.mobygames.com/game/dos/spider-man/trivia

The game fails to work properly on MS-DOS 2.11 onwards,
because it uses a feature that was removed in subsequent releases of DOS.

Unfortunately, this is one type of legacy which newer DOS systems and DOSBox can't be expected to support right from the start.

The DOSes that most of us used to know (DOS 5./6.x/7.x) do originate from DOS 3.x (DOS 3.2/3.3).

And DOS 2.x is somewhat of a relic, I think.
DOS programs from the late 80s /90s do run at DOS 2.11, at best, but that's hit and miss already.

On the bright side, though, Microsoft released the source code for prehistoric DOS 1 and 2.
Not MS-DOS 2.11, of course, since this one started to be useful in practice, after all. 😉

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 217 of 218, by Akuma

User metadata
Rank Member
Rank
Member
dr.zeissler wrote on 2021-10-02, 20:32:
Akuma wrote on 2021-09-10, 16:18:
Well I sort of have a basic framework for loading all those emulators :D […]
Show full quote

Well I sort of have a basic framework for loading all those emulators 😁

Its just a simple way to find out what the best emulator for each game is.
The goal: a list of every CGA game playable on HERCULES

This is what the tool looks like now:
hercmenu.gif

I'm making progress, but its going to take a while.

Have you ever got winter/summer/world-games working on Hercules via cga emulation?
I never got them to work. Epyx must have done some crazy shit on cga. (On Int-Karatke too)

** EXPECT BUGS** and **USE AT OWN RISK** apply here, it has only tested in DOSBox.
I still don't have a proper name, I just named it CGA.COM because it was short 😉

This is the first version of the emulator pack with menu, simple navigation and an INI file to edit. I need help making the INI sane, its just a bunch of options thrown in now.

Everything has been packed into one ZIP file, just unpack somewhere in your PATH and it'll find its way.

Attachments

Reply 218 of 218, by Thandor

User metadata
Rank Member
Rank
Member

This topic needs more screenshots! Let those CGA-colors shine!

Creative Contraptions: CGA all the way 😀. It also uses the blue background-color that is not always used in games.

Contrap.png
Filename
Contrap.png
File size
4.58 KiB
Views
87 views
File license
Public domain

thandor.net - hardware
And the rest of us would be carousing the aisles, stuffing baloney.