VOGONS


First post, by n0p

User metadata
Rank Member
Rank
Member

Finalizing the thing i wanted to do about three decades ago 😀

As you might noticed, CGA colors in graphics 320x200x4 modes are not always correct. Sometimes Cyan/Magenta/White is displayed instead of Green/Red/Yellow, Mode 5, that usually displays Cyan/Red/White, ignored completely.
As i got my Book8088 with VGA card fixed - CL-GD5429 is no exclusion, so i decided to fix that.

GCA4VGA sits on INT 10h, and if mode 4 or 5 is set, puts correct values to VGA palette registers. More, it supports custom values for every palette, so you can make a CGA game black and white, or change colors completely for your liking.
Tested in DOSBox vgaonly, on CL-GD5459 (Book8088) and Voodoo Banshee.

Usage is simple: run w/o parameters to install or to reset CGA palettes to default. Run with some config file name as parameter - it will install with those or update handler with new values.
Look at full.cfg for help on setting values. Parser is very simple (it might take too much time to write good one in assembly).

Source: https://github.com/jinshin/Book8088/blob/main/CGA4VGA.ASM

Attachments

  • cat_001.png
    Filename
    cat_001.png
    File size
    7.66 KiB
    Views
    401 views
    File license
    Fair use/fair dealing exception
  • cat_000.png
    Filename
    cat_000.png
    File size
    6.43 KiB
    Views
    401 views
    File license
    Fair use/fair dealing exception
  • av_000.png
    Filename
    av_000.png
    File size
    3.02 KiB
    Views
    401 views
    File license
    Fair use/fair dealing exception
  • Filename
    CGA4VGA.zip
    File size
    2.02 KiB
    Downloads
    18 downloads
    File comment
    CGA4VGA
    File license
    GPL-2.0-or-later
Last edited by n0p on 2024-02-25, 10:19. Edited 2 times in total.

Reply 1 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

Yes, works as expected.

Of course, palette changes via direct register access can't work, so no palette effects in J-Bird when catching the "Time sphere".

The only way to provide register-level CGA compatibility would be using V86 mode.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 2 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Cirrus CL-GD5459? I can't find much information about it, but for CL-GD5429.

Interestingly, the manual for CL-GD542x series doesn't mention any (D)CGA/Hercules register compatibility.
I find this to surprising, considering that this is an ISA compatible VGA chip.

"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 3 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2024-02-22, 13:38:

Interestingly, the manual for CL-GD542x series doesn't mention any (D)CGA/Hercules register compatibility.
I find this to surprising, considering that this is an ISA compatible VGA chip.

The Acumos AVGA/Cirrus Logic 54xx series was designed from scratch in 1991 - too late to bother including the legacy stuff.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 4 of 14, by n0p

User metadata
Rank Member
Rank
Member
Jo22 wrote on 2024-02-22, 13:38:

Cirrus CL-GD5459? I can't find much information about it, but for CL-GD5429.

Interestingly, the manual for CL-GD542x series doesn't mention any (D)CGA/Hercules register compatibility.
I find this to surprising, considering that this is an ISA compatible VGA chip.

Sorry, yes it's CL-GD5429. Book8088 guys seem to have found a box of those 😀 Photo attached.

Grzyb wrote on 2024-02-22, 13:21:

Yes, works as expected.

Of course, palette changes via direct register access can't work, so no palette effects in J-Bird when catching the "Time sphere".

The only way to provide register-level CGA compatibility would be using V86 mode.

My main target is 8088 CPU, but i like the idea of making full register emulation, thanks! Will get to it when possible.

Attachments

  • P_20240202_093725.jpg
    Filename
    P_20240202_093725.jpg
    File size
    1.72 MiB
    Views
    652 views
    File comment
    CL-GD5429
    File license
    Fair use/fair dealing exception

Reply 5 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

8088 and CL-GD5429 with 1 MB of video RAM?
Now that looks like overkill... is it possible use all video modes, including True Color?

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 6 of 14, by n0p

User metadata
Rank Member
Rank
Member
Grzyb wrote on 2024-02-22, 14:34:

8088 and CL-GD5429 with 1 MB of video RAM?
Now that looks like overkill... is it possible use all video modes, including True Color?

That's exactly my thought 😀
I didn't test for VESA modes or Windows drivers so far, but i think that amount of data will be too much for V20 CPU, even with Windows bitblt compiler.

Reply 7 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2024-02-22, 14:03:
Jo22 wrote on 2024-02-22, 13:38:

Interestingly, the manual for CL-GD542x series doesn't mention any (D)CGA/Hercules register compatibility.
I find this to surprising, considering that this is an ISA compatible VGA chip.

The Acumos AVGA/Cirrus Logic 54xx series was designed from scratch in 1991 - too late to bother including the legacy stuff.

The ET4000AX is barely older and has it (chip '89 released, actual cards widely produced in early 1990).

The ET4000AX did even feature DCGA (AT&T/Olivetti mode).
That mode was also being used in XTs on a chip and in Japan.

Even more so, the ET4000AX driver diskette has a driver for IBM 8514/A support.

To be honest, I think that Cirrus didn't really target DOS platform, but rather specific applications.

The manual I've found lists support for MS Windows, AutoCAD, OS/2 2.x and so on.
As if these were specific applications, rather than DOS as a platform.

I don't mean to judge here, each to his own.
It's just that it seems the chip or thatAcumos/Cirrus didn't focus on industry standards, but rather popular applications.

As far as compatibility goes, the manual is all about "EGA 640x350 16c and VGA 640x480 16c and beyond".

Edit: It's this one here .
Page 2-13, "Hardware/Software Compatibility"

Edit: The ET4000 perhaps wasn't entirely built from scratch, but it wasn't directly based on previous design, either.
Both the ET2000 and ET3000 had advanced windowing, zooming and panning features.
None of them survived into the ET4000AX.

Btw, why was the obscure Cirrus chip being chosen for the Book8088 in first place?
Why not a Trident 9000? Or good old 8900 (DOSemu emulates one) ?

It's no complaint (well it is, but just a little one). But I'd be interested to know. Was it price or availability, maybe?
I mean, I could understand if, err, there was a surplus of those Cirrus chips in China. 😉

Edit:

The Acumos AVGA/Cirrus Logic 54xx series was designed from scratch in 1991 - too late to bother including the legacy stuff.

I mean, that's technically right. In fact, VGA was in my books since 1988 or so.

But here in my place there were still Turbo XTs in use in early 90s, simultaneously. Aka the dinosaurs.

Which still ran existing Hercules or MDA compatible software at the time (no software upgrade).

And especially for users of those systems, an upgrade to VGA was a warm welcome.

I mean, by 1990 about everyone with a basic knowledge about PC hardware knew about how important VGA as the "new kid in town" would be.

Well, almost all of then.
Except for those enternal backwards fellow citizens of mine at the time who still had thought that a C64 was so much better than an KIM-1..🙄
They didn't realize anything, of course. Still don't. *sigh*

But back to PC.. Even XT owners did think about the VGA upgrade in the early 90s.
Most then-current DOS software simply assumed it (gratefully).

But in practice, how to do this upgrade, if not through excellent backwards compatibility of your shiny new VGA card?

By 1990, an XT with VGA upgrade was an old PC, but no longer a relic.
On the other hand, existing XT-specific software couldn't be sacrificed in favor of having VGA.

And last but not least, what about those DOS games from morning lands that used Hercules in the 90s? 🙂

There are at least 5 popular Hercules games I've seen, besides the usual VGA titles (which some of are great conversion from PC-98, btw).

There's Korean Dungeon Boy, of course, but also a Monopoly type of game. Have to check how it was called. 😅

Edit: Sorry, I forgot to explain. I did mention XTs here because Book8088 is an XT level hardware platform, too.
So that's why these thoughts came to be in my mind. Sorry for the long post, too. 😅

Edit: I forgot a second thing to mention.
Hercules wasn't an XT exclusive thing by any means.
Developers and offices had gotten *new" Hercules card/monitor, still. For 286/386 based systems.

My father had used a Hercules setup in his PC/AT in 1989/1990.
It simply was a common graphics standard at the time, not necessarily a relic as such.

So I don't think that the decision of not including Hercules support in a VGA chip was a sign of progress, whatsoever.

Hercules was aged, yes, but so was DOS.
Certain fields still had a need for MDA or Hercules.

I mean, the Hercules compatibility mode wasn't just about graphics, but also about IBM MDA support. IBM text-mode support.

On a text-based system like DOS, that makes Hercules register compatibility even more important than VGA.
Because it's an 100% compatible super set of IBM MDA.

"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 8 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2024-02-22, 15:02:

The ET4000 perhaps wasn't entirely built from scratch, but it wasn't directly based on previous design, either.
Both the ET2000 and ET3000 had advanced windowing, zooming and panning features.
None of them survived into the ET4000AX.

I suspect there's a lot of ET3000 in ET4000.
Note that both use the same technique for CGA/Hercules emulation: optional translation ROM.

On the other hand, there's probably *nothing* from CL-GD410/420/510/520/610/620 in the 54xx - the latter was designed by Acumos, not Cirrus Logic.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 9 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2024-02-22, 16:05:
I suspect there's a lot of ET3000 in ET4000. Note that both use the same technique for CGA/Hercules emulation: optional translat […]
Show full quote
Jo22 wrote on 2024-02-22, 15:02:

The ET4000 perhaps wasn't entirely built from scratch, but it wasn't directly based on previous design, either.
Both the ET2000 and ET3000 had advanced windowing, zooming and panning features.
None of them survived into the ET4000AX.

I suspect there's a lot of ET3000 in ET4000.
Note that both use the same technique for CGA/Hercules emulation: optional translation ROM.

On the other hand, there's probably *nothing* from CL-GD410/420/510/520/610/620 in the 54xx - the latter was designed by Acumos, not Cirrus Logic.

Thanks you, I didn't know that about Acumos.

Still, I can't understand how MGA (Hercules) support had been omitted.

CGA and EGA, okay. But MGA was a professional's standard, not a toy.

Text based DOS productivity not seldomly did write directly to screen memory etc.

That's like omitting PC Speaker support, or something.

"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 10 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2024-02-22, 16:12:

Still, I can't understand how MGA (Hercules) support had been omitted.
CGA and EGA, okay. But MGA was a professional's standard, not a toy.
Text based DOS productivity not seldomly did write directly to screen memory etc.

Direct writes to video memory in text modes are perfectly compatible with VGA.
VGA cards support modes 0, 1, 2, 3 at B8000h, and mode 7 at B0000h.

And have you ever seen a Hercules-only application, or a game?
I can't really recall anything like that...
At certain point I did upgrade from Hercules to a VGA card without Hercules emulation - yes, at the beginning it was painful, but eventually I reconfigured all the software, or aquired VGA-compatible versions.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 11 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2024-02-22, 16:29:
Direct writes to video memory in text modes are perfectly compatible with VGA. VGA cards support modes 0, 1, 2, 3 at B8000h, and […]
Show full quote

Direct writes to video memory in text modes are perfectly compatible with VGA.
VGA cards support modes 0, 1, 2, 3 at B8000h, and mode 7 at B0000h.

And have you ever seen a Hercules-only application, or a game?I can't really recall anything like that...
At certain point I did upgrade from Hercules to a VGA card without Hercules emulation -
yes, at the beginning it was painful, but eventually I reconfigured all the software, or aquired VGA-compatible versions.

That's no the point (the one I mean). It's about the principle.
There might be exotic reasons to be in plain MDA mode that I don't know of. 🤷
Be it applications that depend on the standard MDA font (CP437).

Or BIOS support. The PC BIOS knows two settings Mono/Color, two types of adapter.
Mono is MDA or Hercules (aka MGA); Color is CGA/EGA/VGA.
Some applications might check the BIOS bit for mono or color and what not.

The Atari ST had a similar basic concept, I think.
It differentiated between mono and colour monitor, by checking a pin on the monitor connector.
So on the software side, there was mono (hi-res 640x400) and colour (320x200 and 640x200).
And most Atari ST programs would never run in that high-res mode, *if* they had detected a colour graphics adapter.
Even if the ST in question was being upgraded with an ET4000AX graphics card that was fully supported by GEM/TOS.

Anyway, it's just my point of view here.
I was just a bit irritated about the existence of an ISA VGA without hardware emulation mode.
The only types that came to mind were some early Windows Accelerator cards,
which primarily were being made with VLB in mind (but could be used on ISA bus, too).

Edit:

Grzyb wrote on 2024-02-22, 16:29:

And have you ever seen a Hercules-only application, or a game?I can't really recall anything like that...

Yes, a few. That C64 emulator and a few games from the morning lands.
Dr Halo and certain graphics programs were storing drawings as binary images, too.
So they could merely be showed with same hardware as they were being drawn on.
Though I agree that these were rather rare cases.

Edit: There's another one. Both VGA and MDA/MGA (textmode) can co-exist.

Having hardware MDA support was useful for debuggers. Like SoftICE.
These could display debug information on a TTL monitor.

So if a secondary VGA card could be locked into MDA mode, it could co-exist with a primary VGA card.

Edit: That being said, I'm afraid I've overdid a bit. I was to chatty. Sorry about that.
While Hercules and CGA are related, I guess it's better to go back to CGA.
Again, I was just irritated/puzzled about the lack of CGA/Hercules support via mode utility.

"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 12 of 14, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2024-02-22, 17:11:

I was just a bit irritated about the existence of an ISA VGA without hardware emulation mode.

Keep in mind that the original IBM VGA had no emulation mode.

CGA, EGA, VGA were all *IBM* standards, so it was obvious that all programs targetted at the *IBM* PC platform supported those standards.
Hercules was third-party, consistently ignored by IBM.

Grzyb wrote on 2024-02-22, 16:29:

And have you ever seen a Hercules-only application, or a game?I can't really recall anything like that...

Yes, a few. That C64 emulator and a few games from the morning lands.

If you mean Korean Dungeon Boy, then no - it supports both CGA and Hercules.
Sure, there may have been some Hercules-only shareware stuff, but I can't believe there was anything valuable.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 13 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++

The original IBM VGA is irrelevant, I think. Puzzles me why the emulator guys even bother with it.
Virtually no one used it in practice, it was a paper tiger.
Some users had MCGA in their IBM PS/2s, the rest used SVGA cards. Like Paradise or Tsengs etc. They are the real original VGAs in practice, not IBM's "prototype".

MDA was an IBM standard, also. Hercules merely was a super set built upon that.
Industry had adopted it, too. The generic term was Monochrome Graphics Adapter (MGA), a play on Monochrome Display Adapter (MDA).

Without user invention, the Hercules cards had all its super set being dissabled.
It even limited video RAM to 8KB, just like MDA. That's why it can be used by debuggers so nicely.

That's also why using MSHERC or MSHERC /HALF was useful, even if no Microsoft software was being run.
It was a graphics library, but also did set the appropriate registers, to turn on the Hercules native mode. Otherwise, it was plain IBM MDA.

Anyway, I'm afraid this discussion leads to nowhere. 😥
I suppose I've simply have a different point of view here and you're not wrong, either.

I mean, I for one also think that Hercules and CGA are two faces of same thing (same graphics controller, but different concepts and memory models).

Speaking of, I think it would be interesting to run SIMCGA on a Hercules emulation of a VGA card.
It would span a bridge between CGA and Hercules. 🙂

But again, it's a bit off-topic now.
The original poster probably is being sad or disappointed by this discussion, also.
If he reads this: I'm sorry about starting this discussion. I didn't mean to derail this topic and I'll be quiet now.

"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 14 of 14, by n0p

User metadata
Rank Member
Rank
Member

Absolutely not disappointed :)That's quite niche stuff, so it's normal to get derailed.
As a side note - looks like i made me a fun toy 😀

Attachments

  • Filename
    AV.CFG
    File size
    129 Bytes
    Downloads
    9 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    CAT.CFG
    File size
    295 Bytes
    Downloads
    8 downloads
    File license
    Fair use/fair dealing exception
  • cat_001.png
    Filename
    cat_001.png
    File size
    7.66 KiB
    Views
    404 views
    File license
    Fair use/fair dealing exception
  • cat_000.png
    Filename
    cat_000.png
    File size
    6.43 KiB
    Views
    404 views
    File license
    Fair use/fair dealing exception
  • av_000.png
    Filename
    av_000.png
    File size
    3.02 KiB
    Views
    404 views
    File license
    Fair use/fair dealing exception