VOGONS


Reply 40 of 53, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2024-12-24, 16:14:
MatchesMalone wrote on 2024-12-24, 16:07:

Prince of Persia I think it run natively on Hercules also?

Yes, but not really XD
Re: CGA/MDA/HGC test program

Hey, I remember this thread! Also do agree.
Just wished Hercules aka MGA wasn't being used as a second class citizen all time back then.
I mean, let's just look at Apple Lisa, Macintosh or Atari ST (hires mode).
They knew how to utilize monochrome graphics. ^^
Also, Hercules can be made to look like 640x400 with a bit of tweaking (doesn't work with all monitors).

Edit: Hi-res monochrome graphics can be beautiful.
These threads come mind..
Re: Best CGA & Hercules monochrome games
Re: Best CGA & Hercules monochrome games
Howto convert old gfx-formats and standards with the best quality possible.

Btw, I've seen some HGC/CGA combo cards on eBay that have an 640x400 jumper setting.
It was meant for DCGA, scan-doubled CGA. These cards do support the AT&T/Olivetti monochrome mode on a multisync monitor.
If only there were more games support it, besides "The Colony".

Last edited by Jo22 on 2024-12-24, 18:44. 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 41 of 53, by mkarcher

User metadata
Rank l33t
Rank
l33t
MatchesMalone wrote on 2024-12-24, 16:07:

So yeah, probably there are a small number of games that were natively for monochrome, perhaps most games I played on an Hercules I did so by emulating CGA with utilities like SIMCGA.

Also, a lot of games at that time had the CGA simulation code built into the game, so you didn't need to deal with a separate emulation utility. Selecting "Hercules" just changed the way initializing the graphics mode works: Instead of using the video BIOS to select CGA mode 4/5/6, the game executed the code a CGA emulator would execute. Returning to text mode "should" be done using "set mode 7", but as the IBM BIOS knows that the MDA card only has a single mode, it ignores the mode number as long as the video card type in the system configuration word is set to MDA, and setting mode 3 at shutdown time works on CGA (actually setting mode 3, i.e. color text 80x25) as well as on Hercules (setting mode 7, i.e. mono text 80x25)- yet I would consider relying on that behaviour an ugly hack.

Reply 42 of 53, by Jo22

User metadata
Rank l33t++
Rank
l33t++
mkarcher wrote on 2024-12-24, 18:42:
MatchesMalone wrote on 2024-12-24, 16:07:

So yeah, probably there are a small number of games that were natively for monochrome, perhaps most games I played on an Hercules I did so by emulating CGA with utilities like SIMCGA.

Also, a lot of games at that time had the CGA simulation code built into the game, so you didn't need to deal with a separate emulation utility. Selecting "Hercules" just changed the way initializing the graphics mode works: Instead of using the video BIOS to select CGA mode 4/5/6, the game executed the code a CGA emulator would execute. Returning to text mode "should" be done using "set mode 7", but as the IBM BIOS knows that the MDA card only has a single mode, it ignores the mode number as long as the video card type in the system configuration word is set to MDA, and setting mode 3 at shutdown time works on CGA (actually setting mode 3, i.e. color text 80x25) as well as on Hercules (setting mode 7, i.e. mono text 80x25)- yet I would consider relying on that behaviour an ugly hack.

Very bad, I think! When we think about the fact that Hercules (MDA successor) was the actual graphics standard of the IBM PC, the industry standard, then that's more than just pathetic. It's basically a shame.
CGA was cra.. modest in comparison - it was a joke, like the cassette recorder port on the 5150 (which would have been better off as an primitive audio card/digitizer).
A leftover from PC's failed home computer personality side, really. Like ROM BASIC was, as well.

CGA was just as cra.. err, humble as the graphics on the ZX Spectrum. Sigh.
Merely the 640x200 monochrome mode was still tolerable with a little forbearance (though 640x200 in 4 grayscales would have been more practical).
When I think about what the equally old Sirius 1 aka Victor 9000 had offered back then...
800x400 pels vs 720x348 pels vs 640x200 pels.

Edit: On a second thought this reminds of the situation of floating point support.
The proper way of supporting floating point would have been to
a) check for presence of an x87 unit and then use x87 instructions
b) if that failed would use a math library with floating point functions (non x87).

In reality though, many applications with floating point math either didn't support x87 at all or simply did require it.
In latter case, the applications would either a) depend on x87 or an external x87 emulator or b) execute an internal x87 emulator (needs 80186 up).

I can understand the technical reasons (NOPs and self patching involved) but it's still not a clean approach.
It's like writing Basic code with lots of IF..THEN and GOTO lines.

Edit: Some programs like AutoSketch went a third way and had two disks with separate binaries.
One 8086 binary with a math library and a second one with 8086+8087. That was a professional approach.

Why were game designers so lazy and couldn’t do same?
Separate CGA and Hercules versions, each with their own graphics set?
I don’t believe Hercules had a low marketshare.

Edit: What I realy disliked about CGA simulators was missing aspect ratio correction.
It was like playing NES games with PAL boarders, but worse.
That way, the superior graphics standard was made look worse than the inferior one.

"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 43 of 53, by mkarcher

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2024-12-24, 19:52:

Very bad, I think! When we think about the fact that Hercules (MDA successor) was the actual graphics standard of the IBM PC, the industry standard,

Hercules never was "the standard". If it had been, we would have seen less of enhanced CGA solutions (Plantronics, PCjr/Tandy) and more Hercules stuff. Maybe the Hercules InColor card would have stood a chance in a world in which Hercules was "the standard". Furthermore, color is king for games. While the CGA colors were admittedly ugly, they were at least colorful.

While I get your rant about the CGA image quality, CGA has one more thing to offer that is very attractive for games: Low resolution (yeah, really!). The IBM PC was not fast at modifying video memory contents (which is both due to the limited bandwidth of the 8088 and the memory timing design of both the CGA and the Hercules card), so if you want fast moving scenes in games, having to move less data around (less colors, less pixels) was very attractive. I guess this is the reason why 320x200 still kept popular in EGA games. EGA games could easily go 640x200, and even 640x350 if you require an EGA monitor, but most action-type games just used 320x200. "Dumbing down" Hercules to 640x200 mono (sometimes used as equivalent to 320x200 color) meant that the amount of video data to be shuffled around is still less than 16K per frame.

Furthermore, lower resolution does not just mean higher performance, but also smaller executables / loading times from floppy.

Hercules clearly was a good solution for business graphics, at least if you don't require color, but can get away with different fill patterns, but I don't think the 720x348 mode ever was attractive to action games - especially since Hercules monitors had longer persistence to not flicker at 50Hz, which made moving graphics smear out.

Jo22 wrote on 2024-12-24, 19:52:

In reality though, many applications with floating point math either didn't support x87 at all or simply did require it.

I just remember just one game that required a x87. This was because this game was built using a BASIC runtime (don't ask me which one) that used the x87 for all calculations, and the FAQ stated that a version with x87 emulation would not make sense, because it would be unplayable slow.

Jo22 wrote on 2024-12-24, 19:52:

Separate CGA and Hercules versions, each with their own graphics set?

Because this would mean the game authors need to create a second graphics set. And as game logic was based a lot on pixel numbers, also create a second implementation of the game logic.

Jo22 wrote on 2024-12-24, 19:52:

I don’t believe Hercules had a low marketshare.

Clearly true for office computers. Less so for recreational computers. CGA+composite color monitor was the solution of the choice at that time.

Jo22 wrote on 2024-12-24, 19:52:

Edit: What I realy disliked about CGA simulators was missing aspect ratio correction.

Let's check the facts here. CGA simulator displayed the 4:3 CGA image as 640x200 stretched to 640x300, padded into a 720x350 frame, which is 4:3 again. 640 is 89% of 720 and 300 is 86% of 350. That's actually not that far off. The "prince of persia" approach to omit the padding was the exception, not the norm.

Reply 44 of 53, by Grzyb

User metadata
Rank l33t
Rank
l33t

Well, it *was* a mistake that IBM didn't provide a graphics option for the 5151 monitor already in 1981.

Yes, in 1984 came the EGA mode F option, but...
1. too late - the Hercules was already there
2. overkill - rarity of software with mode F support is the best proof that hardly anybody was willing to pay for the expensive EGA card only to drive the monochrome monitor

Can't complain about CGA - in 1981, good color graphics wasn't feasible.
Good monochrome graphics - I'm pretty sure was.
32 KB of video RAM should have been enough - hardly anything uses both video pages on the Hercules anyway, and I think *nothing* uses the 4-"color" feature of mode F.

High-res monochrome graphics as the official IBM standard would've certainly made it more convenient to use, and it would still be a part of the VGA standard in modern cards.
But would that make it more attractive for game developers?
Well, probably not much...
In games, color is important, TV output is important, and fps is important - the 16 KB of CGA frame buffer allows for twice the fps than the 32 KB of high-res monochrome.

Kiełbasa smakuje najlepiej, gdy przysmażysz ją laserem!

Reply 45 of 53, by Jo22

User metadata
Rank l33t++
Rank
l33t++

@grzyb @mkarcher Hi, I understand what you're referring to,
but then same time I think IBM was essentially a typewriter company (that had "just" entered mainframe business a few years earlier).

People who bought IBM PCs in the early years were business people. Companies/authorities, not end users.
The latter rather had bought the clones.
In mid-80s, affordable PC motherboard clones from Taiwan showed up (merely required a BIOS/BASIC ROM set).
Then the Turbo XTs followed in late 80s, I think.

They're the only sane excuses for playing games on PC w/ CGA, I think.
Because buying an office machine (from a reputable company!) especially to play low-res games makes zero sense.
Other systems were better choices. And much more affordable as a complete system.

It makes only sense, I think, if
a) the PC was already there for other reasons or
b) was in home computer price category

Edit: In the case of the US, I admit, there also was the video game crash of 1983 which took the home computer market with it.
That's a special case, though, and shouldn't have had affected the rest of the world.
That would explain, however, why the PC (and Mac) had been so dominant over there.
That's also assuming that home users in the US had bought PCs because they were the only platform they knew from work place.
That's a social/political explanation to the success of PC/ CGA, maybe, rather than a technological.

Edit: Here in Europe (or Germany, at least) there was at least one other reason to buy a cheap IBM PC or CP/M computer in the 80s: Turbo Pascal.
Apparently, it had been a big thing in schools and at university. Students needed a PC to process the given learning material.
Version 3 was entirely text based and could have been run on a teletype or terminal, probably.
Here, video quality didn't matter. CGA, MDA, CTTY device. It all didn't really matter, I assume.
Though MDA/Hercules did flicker at 50 Hz, which was compatible with our 50 Hz frequency of the lighting/AC mains.

Besides other things, that Charlie Chaplin mascot of IBM made it clear quite often who IBM wanted to attract, I think.
It was the personification of that young, dynamic gentleman. Something both IBM and its clients wanted to be.

I tend to think that CGA was just a desperate try to offer an graphics alternative to MDA, so I still think that Hercules was the successor here.
It remained 99,9% hardware-level compatible with MDA, including monitors, while it also was offering a printer port.
Something that was a must-have feature in business world. Without a printer, the IBM PC was no complete typewriter.
MDA compatibility surely was a bonus when working with OSes like PC/IX and Venix and Xenix.

Of course, by IBM's point-of-view, Hercules Monochrome wasn't an official thing.
The company hated it, because it wasn't theirs. Support in OS/2 was simply not available, for example.
Hercules (company) in turn blamed IBM for not having installed a filter in the original MDA monitors
(it was possible to damage the fly-back transformer with bad timings).

Anyway, I think that doesn't change the situation that the IBM PC in serious fields primarily used MDA (or Hercules).
Or EGA, but then with an EGA monitor (or MDA monitor sometimes).

CGA simply wasn't usable without getting an eye strain, too. I mean, let's just look at it! :(
Imagine an IBM PC in a bank, at the doctors or at hotel reception had used CGA.
They could been using a ViC 20 just as well. Or an ZX81.
Any serial terminal of the 1970s was of higher text quality.

Of course, if we merely look at games magazines then CGA was the dominating standard.
It could be connected to grandma's old chippendale TV, after all.
Just like many C64s of the time. Which by the way, was the better choice for toying around.

Another factor that shouldn't be forgotten is that both MDA (& Hercules) and CGA could co-exist.
So even if some PCs shipped with on-board CGA doesn't automatically mean
that this was the video system that was used by the user, as well. It simply was just there.
(Later PC clones from mid-80s could switch between Hercules and CGA/Plantronics mode via dip switches.)

Hercules and Hercules+CGA combo cards were sold for years in the 1980s.
They could be configured for either type, also because of the technical similarities.
Some claimed auto detection, even.

If it was me, then I would rather have bought an Hercules card than a CGA card.
Also because this meant that the LPT port was replaceable in case of damage.
"Wasting" money on what essentially was just had become a toy would have had bothered me more.

So I'm rather grateful that the cheaper CGA (=less RAM than HGC) was already on-board on certain PC compatible models.
It was useful for testing purposes and for getting to the DOS prompt. Like using a C64 with a small portable TV.

A video monitor could be easily attached to the CGA's Cinch/RCA connector any time.
And if no video monitor was available, a black/white TV could be hacked (tuner bypass) to accept VBS.
That was commonly done in the 1970s by electronic enthusiasts, I read.

That being said, I don’t mean to be unfair towards CGA.
I think it's clear that it was a quickly made interim solution. A hack, if we will. EGA rather was IBM's true favored MDA successor.
The broken address decoder of CGA speaks volumes, I think. That's not a well designed piece of hardware.
On the bright side, CGA was usable as an auxiliary graphics card, too, for displaying educational games for kids. On an NTSC TV set.
(IBM didn't want to sell the PC outside the US initially, I read).

Also, the Plantronics Color Plus (fully expanded) and the M24 video board are basically fixed versions of IBM CGA.
They have 32KB and can do 640x200 4c and 640x400 mono, respectively. Both usable for GUIs like GEM and Auto CAD.
Both video boards had some market-share (in terms of circuit support), albeit they never had been noticed much by the software world.

Edit: I think this video gives an good overview about use cases of different computers at the time
(with IBM PC being in "professional systems" category) - and yes, there's an 5153 monitor. :D

https://www.youtube.com/watch?v=ZMVedYif3wM

The episode is from 1984 and MDA didn’t show graphics, making it less "sexy" for demonstration purposes on TV.
But to my defense, the video also says than 320x200 is clearly low-res, while 768x512 is considered hi-res.
And that's more than I would have had demanded for at the time, even!

Also, as an explanation for the CGA setup n the video: Germany is always behind the times.
In Europe, also, the IBM PC had just arrived a year earlier, in 1983.
So market of PC expansion cards must have been similarly behind schedule.
The home-brew scene was building c't 86 PC at the time (Jan 1984 onwards), without CGA.

Edit: In mid-80s, there had been "word processor" PCs
like the Amstrad PCW/Joyce which did feature Hercules-like resolution, as well (720x256 pels).
Let's imagine they have had used CGA instead. Not a pleasant though. :(

Edited.

Edit: About the 320x200 resolution. True, but it's sad. Vintage game consoles such as the Nintendo NES had used 240p (NTSC) or 288p (PAL).
Compared to this, even MCGA/VGA's mode 13h was rather humble. Something like 256 lines should have been possible with a conventional video monitor.

No offense, but I spent many years with shareware titles that had used VGA mode 12h (640x480) and that made me realize how inferior PC graphics of games had been for so long.
It's really sad that the 80286 and full EGA hadn't been supported more, at least. It has 350 lines, like Hercules.

Playing FS 4, EGA Trek or CD Man from the 80s is both fun and sad same time.
Because it gives an impression about how capable the PC could have been if developers had really cared.

If for example the 80286 instruction set had been utilized all time, then performance loss could have been compensated a bit.
XT and Turbo XT users had the option to install a NEC V20/V30 chip, any time. By mid-late 80s it did cost about $20 or so?
Not much in comparison to a single game, which did cost more than this.

Edit: Another justification for CGA is the filthy industry sector, I think.
A production hall with lots of dust and greasy control panels.

CGA had used ordinary video signals, so it could be interfaced
with bog standard monochrome monitors in a 19" steel rack or in an embedded system
(or used in portable maintenance computer, akin to SX-64 portable).

Especially the monochrome VBS output could be used very well over BNC or PL259/SO239 connection (aka PL or UHF connector).
For such environments, were graphics fidelity didn't matter, the IBM CGA was alright.

The support for light-pen made it even better, I think. Workers could have typed on an on-screen keyboard.
Yes, that doesn't sound very flattering. But that would be an area of ​​application in which CGA could be honestly respected.

"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 46 of 53, by Grzyb

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2024-12-25, 01:54:

Edit: In mid-80s, there had been "word processor" PCs
like the Amstrad PCW/Joyce which did feature Hercules-like resolution, as well (720x256 pels).
Let's imagine they have had used CGA instead. Not a pleasant though. 🙁

But that's closer to CGA than to Hercules!
I guess they use normal 15 kHz monitors, only in the PAL standard.
CGA is NTSC-based, therefore 200 *fully usable* scanlines, while PAL allows for 240 or 256.

Edit: About the 320x200 resolution. True, but it's sad. Vintage game consoles such as the Nintendo NES had used 240p (NTSC) or 288p (PAL).
Compared to this, even MCGA/VGA's mode 13h was rather humble. Something like 256 lines should have been possible with a conventional video monitor.

Don't take those numbers seriously.
How many of those 240/288 scanlines is actually visible?
How many of the visible scanlines is distortion-free?
It's 200+/240+, of course!

Edit:
Also, have you ever tried any graphics programming in 16-bit environment, ie. 64 KB segments?
320 x 200 x 8bpp is about the max for a single segment - anything higher makes coding harder by an order of magnitude!

Kiełbasa smakuje najlepiej, gdy przysmażysz ją laserem!

Reply 47 of 53, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2024-12-25, 07:40:

Edit:
Also, have you ever tried any graphics programming in 16-bit environment, ie. 64 KB segments?
320 x 200 x 8bpp is about the max for a single segment - anything higher makes coding harder by an order of magnitude!

Hi, yes, I did tinker a bit with it in QB45..
And planar modes are a bit harder to work with than byte mode. 🙁

But it's sad that EGA in 640x350 16c or at least 640x200 16c wasn't used more often.
They were the highest quality modes before MCGA/VGA (and mode 13h 320x200 256c)
and the last stand for hi-res graphics - due to the 16c limit (64c limit) of TTL monitors and RAMDAC-less graphics cards.

A very popular and affordable Turbo XT of the mid-80s, the Amstrad/Schneider PC1640, did have EGA graphics and an EGA monitor (ECD monitor).

All 640x350 16c games I've tried on it (emulation) ran at playable speeds.
And that was without the V30 processor upgrade and without DOS games using 80286 instructions, even.

Edit: 640x200 16c did require 64KB of video RAM and could have been used with a basic IBM EGA card w/o memory expansion.
640x350 16c did require 112 KB of video RAM. Normal EGA clones had 256KB, just like early VGA cards.

Which means that 640x350 16c (mode 10h) had allowed for two video pages and double buffering out-of-box on a normal 256KB model (STS Orbit Plus supported that for earth animation).
That's something VGA in 640x480 16c (mode 12h) couldn't do without an memory expansion to 512KB or 1MB of video RAM.

Edit: I'm primarily mention this to point out that the resolution alone wasn't a show stopper, even if colour was involved.
Fast XTs and 10 MHz ATs were powerful enough to handle the games.
CD-Man runs a bit slower but still smooth even on an 4,77 MHz XT with 8088 CPU.

So full resolution Hercules games in monochrome were feasible, too.
A single page is 32 KB of data, Hercules has two of them.
It can even switch between them (set active page for display).
A form of double-buffering was possible, thus. Like with Commander Keen series on EGA/VGA. Flight Simulator used it for Hercules, I think.
On other hand, some one could argue that Hercules was rather slow. But so was CGA, maybe.

I really wished there was a graphics benchmark especially for Hercules cards.
Would be interesting to find out how Hercules, Hercules Plus and Hercules InColor would compare to each others.
And the clones, too. Or EGA/VGA cards acting as Hercules Monochrome.
Especially read/write times of video memory would be interesting.

"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 48 of 53, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
mkarcher wrote on 2024-12-24, 13:11:
Benedikt wrote on 2024-12-23, 21:51:

I have a CGA emulator for Hercules, too: HGCGA.
It patches the video BIOS to enable a customized 640x300 pixel Hercules mode with a framebuffer at segment b800h.
It does not do any transformation, but merely keeps the CGA pixel data and leaves every third line black.

That's exactly what the CGA emulator I got "bundled" with Sokoban also did. Other emulators also installed a timer handler that copied the second line to the third line, which removed the black stripes, at the same time adding artifacts similar to bad deinterlacing as soon as anything moved. What's the deal with mode 13h/93h in your emulator on the hooked "get video mode" function?

That appears to be some delicious copy pasta from an earlier TSR driver of mine, namely one for MCGA/VGA mode 13h emulation (minus all palette-related stuff) on a Tandy Graphics Adapter II, using the 640x200 16-color mode and pixel pairs.

Jo22 wrote on 2024-12-26, 00:38:

640x200 16c did require 64KB of video RAM and could have been used with a basic IBM EGA card w/o memory expansion.
640x350 16c did require 112 KB of video RAM. Normal EGA clones had 256KB, just like early VGA cards.

While that is true, you can hardly use any EGA acceleration without spare video RAM, because the bitplane parallelism for copy operations can only be used if the source is in video RAM, too.
If you have a game with e.g. 64 KiB of tileset data, that means that you effectively already need an EGA with 128 KiB of video RAM for an accelerated game with 640x200 16-color framebuffer.

Reply 49 of 53, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Benedikt wrote on 2024-12-27, 18:23:
Jo22 wrote on 2024-12-26, 00:38:

640x200 16c did require 64KB of video RAM and could have been used with a basic IBM EGA card w/o memory expansion.
640x350 16c did require 112 KB of video RAM. Normal EGA clones had 256KB, just like early VGA cards.

While that is true, you can hardly use any EGA acceleration without spare video RAM, because the bitplane parallelism for copy operations can only be used if the source is in video RAM, too.
If you have a game with e.g. 64 KiB of tileset data, that means that you effectively already need an EGA with 128 KiB of video RAM for an accelerated game with 640x200 16-color framebuffer.

Thank you. I'm just a layman of PC graphics, but I'm trying my best to understand the concepts, at least. ^^;
EGA/VGA and Hercules+ are interesting in several ways, I think.

The soft font feature was used to draw TUIs (text-mode GUIs), for example. PC-Tools 7 uses it a lot, I remember. NSSI, too.
I often wondered if the glyphs could be used like tiles on the Nintendo (NES), for example.
Minus the collision detection used by sprites, of course.
Just to draw an over-world map of a game or a Pokemon-like JRPG.

But that's just another topic, I suppose. Still, I wonder: How flexible is the Hercules mode on a VGA?
Can it support custom fonts and code pages past CP437, for example?
Sorry, I'm just thinking out loud here. I don't mean to go off-topic. ^^;
My first "PC" was an MZ-700 and it had a character generator with lots of characters/glyphs. ^^

@MatchesMalone It perhaps had been mentioned already, but if you mainly want to have Hercules graphics on a VGA monitor,
then you could consider getting a "Graphics Gremlin" card in the future. It's open source and has output to VGA and Composite video.
Some HDMI versions exist, too. They're all using ISA slot, though, rather than PCI.
Unfortunately, as of today the card doesn't support Hercules yet (aka HGC or MGA) - merely the predecessor IBM MDA.
Hercules support is being mentioned as a possible feature in the future at least, so far:
"Other people have requested support for Hercules, Tandy, and PCjr graphics, which I might get around to implementing someday."
https://github.com/schlae/graphics-gremlin

Edit: Hercules support is being worked on, it seems.
https://github.com/schlae/graphics-gremlin/issues/15

"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 50 of 53, by Grzyb

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2024-12-28, 11:58:

Still, I wonder: How flexible is the Hercules mode on a VGA?
Can it support custom fonts and code pages past CP437, for example?

You're comparing text mode of HGC+ and VGA, right?

HGC+ supports modes other than 80 x 25, eg. 80 x 43 - and so does VGA.
HGC+ supports 90-column text - and so does VGA.
HGC+ supports downloadable font ("4k RAMfont mode") - and so does VGA.

BUT!

HGC+ supports 12 downloadable fonts ("48k RAMfont mode") - while VGA is limited to 2 fonts.

Kiełbasa smakuje najlepiej, gdy przysmażysz ją laserem!

Reply 51 of 53, by mkarcher

User metadata
Rank l33t
Rank
l33t
Benedikt wrote on 2024-12-27, 18:23:
Jo22 wrote on 2024-12-26, 00:38:

640x200 16c did require 64KB of video RAM and could have been used with a basic IBM EGA card w/o memory expansion.
640x350 16c did require 112 KB of video RAM. Normal EGA clones had 256KB, just like early VGA cards.

While that is true, you can hardly use any EGA acceleration without spare video RAM, because the bitplane parallelism for copy operations can only be used if the source is in video RAM, too.
If you have a game with e.g. 64 KiB of tileset data, that means that you effectively already need an EGA with 128 KiB of video RAM for an accelerated game with 640x200 16-color framebuffer.

The EGA architecture has much more to offer than just fast screen-to-screen copies, although they are clearly an interesting feature. And IMHO the EGA architecture was obsolete as soon as IBM introduced the 16-bit AT bus. The EGA architecture relies on two premises:

  • The processor only issues 8-bit cycles
  • OUT instructions and memory write instructions offer similar performance

If these premises are true, the EGA architecture is a quite capable solutions for a lot of typical drawing problems at the time. The key feature of the EGA card is that every ISA address is backed by 32 bit of video RAM instead of just 8 bits. The EGA card has a 32-bit latch that is filled with the whole 32-bit word from EGA RAM on every read issued on the ISA bus. The fast screen-to-screen copy mode is one of the dumbest write modes the EGA provides: If an (8-bit) ISA write arrives at the EGA card, the EGA card just ignores the data from the host processor and writes the contents of the 32-bit latch at the destination address. This allows transferring 8 Pixels (32 bits) with a single iteration of REP MOVSB. This does not work with the 16-bit operations generated by REP MOVSW. If you issue REP MOVSW on an 8088 processor, it will read the data byte from an even address (putting those 32 bits into the EGA latch), then read the data byte from the subsequent odd address (overwriting the 32 bit in the EGA latch with the subsequent 32 bits from video RAM), then write the byte obtained from the even source address (which is ignored by the EGA) to the even target address (writing the content of the latch that contains the data at the subsequent odd source address) to the even target address and then write the data obtained from the odd source address to the odd target address (writing the same 8 pixels again).

Smart combinations of OUT instructions to graphics controller registers and advanced write modes allow acceleration of drawing lines, outputting monochrome text, drawing mouse cursors and other things. You can't overlay old and new data in the screen-to-screen copy mode, so that mode is only useful for bulk copies, but not for drawing a mouse cursor. With the AT that allows 0-waitstate read/writes for 16-bit memory cycles, the 8-bit-centered interface of the EGA card became a burden. While the EGA itself had not that much bandwidth to spare at all to saturate the 16-bit ISA bus, later 16-bit EGA and VGA cards had to stick to that interface.

There clearly were a lot of games that relied on fast screen-to-screen copies, for example for tile-based games, if the tiles can be drawn at pixel positions divisible by 8. As sprites with transparent pixels needed to be drawn from the CPU anyway, games with static screen and a small amount of moving sprites (e.g. something like Pac-Man) did not require a notable amount of off-screen memory.

Reply 52 of 53, by mkarcher

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2024-12-28, 11:58:

I often wondered if the glyphs could be used like tiles on the Nintendo (NES), for example.

Text mode with custom tiles is in fact similar to tile-based images on consoles like the gameboy or the NES, but text-mode characters only have two colors each, the foreground and background color. I don't know for sure for the NES, on the game boy, a tile can have 4 "colors", i.e. shades of gray/green. Furthermore, in text mode you can have nothing but tiles. No sprites drawn over them at all.

Jo22 wrote on 2024-12-28, 11:58:

But that's just another topic, I suppose. Still, I wonder: How flexible is the Hercules mode on a VGA?
Can it support custom fonts and code pages past CP437, for example?

The text mode on the VGA card supports up to two sets of 256 characters (one set used for "bright" and one set used for "normal" characters). You can load any code page you want, and that's exactly what EGA.SYS is doing. If you install German MS-DOS 5.0 or newer on a computer with an EGA card or "better", DOS automatically reprograms the character generator to CP850, which was deemed to be the "better font for western Europe", because it included more accentuated capital letters than CP437, which only has É.