• Please review our updated Terms and Rules here

True CGA vs VGA card in CGA mode

Okay, the final version 0.4 of the CGA compatibility tester is here:

http://www.oldskool.org/pc/cgacomp

I updated the webpage to include a link to the reference video, as well as a streaming version. The video doesn't go over every single test, only the most demanding/incompatible ones, but it should be sufficient for those wondering what the "strikethrough" cursor, CGA snow, the horizontal retrace tests, etc. should look like.

I patched it to work on any speed machine, so you can run it on Pentiums if you so desire :) And it no longer requires a mathcoprocessor.

The buggy mouse support will be removed in a future version if I get around to it (it's not my GUI library and I don't want to troubleshoot mouse support if I don't have a mouse on the dev machine).
 
Found a couple more CGA-esque machines:

Amstrad PPC640 (8MHz V30):
This can display on its internal LCD or on a CGA monitor, so I tested on both. It also has a mechanism whereby attempts to reprogram the CRTC cause a non-maskable interrupt and the BIOS gets to tinker with the values written, so it's possible that some tests failed not because of hardware issues but because the BIOS is getting in on the act.
  • Read: 349 KB/s
  • Write: 355 Kb/s
  • Interleaved read: 303 Kb/s
  • Interleaved write: 305 Kb/s
  • Colour tests, obviously, only work on the colour monitor.
  • Different font.
  • Retrace is 44.72Hz for LCD, 60.41Hz for CRT.
  • The 90x30 mode does not work. LCD goes blank, CRT has scrambled display.
  • No interlaced mode
  • The positioning test does nothing.
HP 200LX (6MHz 80186):
(This has an LCD and no apparent provision for an external monitor).
  • Read: 957 KB/s
  • Write: 1168 KB/s
  • Interleaved read: 329 KB/s
  • Interleaved write: 376 KB/s
  • No colour, so couldn't do the colour tests.
  • The dual-line and strikethrough cursors do not appear.
  • Different font.
  • Contrast: Some colour combinations not readable on the LCD, but there's no provision to adjust it.
  • Retrace is 91.09Hz
  • No 90x30 mode, interlace or positioning.
 
That is really fascinating stuff (the clones triggering an NMI for writing to the m6845, and the LCD having a 45Hz refresh)! I'm also surprised the hp palmtop had video memory nearly three times faster than CGA -- yet interleaving memory reads with CPU instructions is almost totally crippling... and a 90Hz (!!) refresh rate? That's insane. Really amazing what you can learn 25+ years after the fact.

Now I'm thinking it's time for me to pull out my GRiD 1520 (internal LCD) and my AT&T PC 6300 (used 25KHz horiz. 400-line mode) to see what they do...
 
That is really fascinating stuff (the clones triggering an NMI for writing to the m6845, and the LCD having a 45Hz refresh)! I'm also surprised the hp palmtop had video memory nearly three times faster than CGA -- yet interleaving memory reads with CPU instructions is almost totally crippling... and a 90Hz (!!) refresh rate? That's insane. Really amazing what you can learn 25+ years after the fact.
With its 8086 running at 9.54 MHz, my Tandy 1000RL scored block read 761 kb/s, block write 1006 kb/s, interleaved read 360 kb/s, and block write 362 kb/s. Setting the onboard 16-bit video to either 0 or 1 wait state(s) did not change these scores. As you'd expect from a member of the Tandy 1000 family, it system RAM for the video (it has 768K RAM installed: 640K for DOS and 128K for video).

Even at the same clock speed (NEC V20 @ 9.54 MHz), my CompuAdd 810's 8-bit onboard CGA video didn't do nearly as well: block read 512 kb/s, block write 714 kb/s, interleaved read 338 kb/s, and interleaved write 341 kb/s. I guess the 8086's 16-bit external data path really makes the improvement on the Tandy. The HP 200LX uses an 80186, so it probably has 16-bit video, as well.
 
Okay, the final version 0.4 of the CGA compatibility tester is here:

http://www.oldskool.org/pc/cgacomp

I updated the webpage to include a link to the reference video, as well as a streaming version. The video doesn't go over every single test, only the most demanding/incompatible ones, but it should be sufficient for those wondering what the "strikethrough" cursor, CGA snow, the horizontal retrace tests, etc. should look like.

I patched it to work on any speed machine, so you can run it on Pentiums if you so desire :) And it no longer requires a mathcoprocessor.

The buggy mouse support will be removed in a future version if I get around to it (it's not my GUI library and I don't want to troubleshoot mouse support if I don't have a mouse on the dev machine).

Ok. Interlached text mode works for me then.
 
Ok. Interlached text mode works for me then.

No, that's worng.
A detail I didn't see was that the original text before Interlached mode turned on got compressed and only the upper parts are visible. This doesn't happen with my card, however, big letters does appear, but only the upper left part is vissible because of the size of the letters.

Another funny thing is the Horizontal retrace bit test. The bars does appear, but they goes up and down on only the upper half of the display (only behind the texted area to be spesiffic), not the whole display pattern as in the video!

---

Talking of IBM character sets, the CGA/MDA got "Æ", "æ", "Å" and "å", however, "Ø" and "ø" is missing! How the @ did my IBM MDA card manage to produce that letter??? (Not that the letter is almost never used since I operate the computer in english, but it's kind of weird when I'm thinking of it. It got an IBM Character ROM, so it isn't re-fonted.)

It is also funny that the keyboard got the modern Norwegian layout, but the english (Shift-)layout avalible by pressing 'AltGr+(Shift+)key'. The english layout is also printed to the right of the keys where it differ from the norwegian. I have honnestly never seen that on Norwegian post-AT keyboards, and that's a shame since it is 10 times easier to use if you don't got the ability to force the PC to the Norwegian keyboard layout (example: clean-boot).
 
Last edited:
NTalking of IBM character sets, the CGA/MDA got "Æ", "æ", "Å" and "å", however, "Ø" and "ø" is missing! How the @ did my IBM MDA card manage to produce that letter??? (Not that the letter is almost never used since I operate the computer in english, but it's kind of weird when I'm thinking of it. It got an IBM Character ROM, so it isn't re-fonted.)

I don't know what's done for lower-case "ø", but the uppercase variety is probably the code for the number 0 (zero). Now, if the ROM had a code for "Щ", I'd be surprised...
 
Talking of IBM character sets, the CGA/MDA got "Æ", "æ", "Å" and "å", however, "Ø" and "ø" is missing! How the @ did my IBM MDA card manage to produce that letter??? (Not that the letter is almost never used since I operate the computer in english, but it's kind of weird when I'm thinking of it. It got an IBM Character ROM, so it isn't re-fonted.)
Different countries got different character sets in ROM depending on their local language. When in doubt of what character set you're using, consult a standard U.S. character set table and see if it matches up.
 
Here are some of my snapshots of running CGA_Comp on a true-blue original IBM 5150 PC with the IBM CGA board, hooked up to a Tandy CM-11 RGB monitor and a trusty old Amdek Color-I composite monitor.

The PC's Intel 8088 chip (1983 revision date) is incorrectly shown as an "80C88".
9jekqa.jpg


Maximum snow.
11ah2xt.jpg


Bouncing color bars on the RGB monitor.
2s1w58h.jpg


Bouncing color bars on the composite monitor (too bright for the camera; the colors in real life are fine, not washed-out).
8x8lti.jpg


Interlaced mode on the composite monitor is not any more readable than on the RGB monitor. Still, I'm amazed that pseudo-80x50 text is intelligible at all on a color composite monitor (glorified tunerless TV set) with 240 lines of resolution (manufacturer's spec).
205ylh.jpg
 
The PC's Intel 8088 chip (1983 revision date) is incorrectly shown as an "80C88".

If it's made after 1981, it actually is an 80c88, marked or not. They fixed the bug I test for when they went to the new manufacturing process. I believe the bug I test for is on all CPUs marked 1978 to 1981. Here's the code:

Code:
        mov     cx,2            ; test if following instruction will be
                                ; repeated twice.
        db      0F3h,26h,0ACh   ; rep es: lodsb
        jcxz    Yes             ; intel non-CMOS chips do not care of rep
        jmp     Nope            ; before segment prefix override, NEC and
                                ; CMOS-tech ones does.

I have a couple of friends I can ask from that time period; I'll ask and see if I can lock down specific dates and manufacturing processes.

Interlaced mode on the composite monitor is not any more readable than on the RGB monitor. Still, I'm amazed that pseudo-80x50 text is intelligible at all on a color composite monitor (glorified tunerless TV set) with 240 lines of resolution (manufacturer's spec).

Warms my heart that you tested this and provided a screenshot :) Thanks!

I did eventually find the code that used an 8087 and removed it; doing so removed the 8087 emulator I needed to use and reduces memory requirements by 10K. Which means it should run on a 128K machine a little more comfortably. When I release the source, I'll update the binary as well.
 
If it's made after 1981, it actually is an 80c88, marked or not. They fixed the bug I test for when they went to the new manufacturing process.
As far as I can tell from some quick research, the 8088 did not switch to the fully static CMOS design except in the specifically designated 80C88 version, which also featured reduced power consumption and the ability to clock down to zero MHz for sleep mode. The standard 8088 used NMOS, while the faster 8088-2 and 8088-1 used HMOS and later HMOS-II ("N-channel depletion load silicon gate technology," as they explained it). HMOS-III was used for the 8086 series.
 
OK, at the risk of sounding extremely st00pit...what's HMOS (& HMOS-II)? I know, google's s'pozed to be my friend, but it's been quite uncooperative for me lately...

--T
 
As far as I can tell from some quick research, the 8088 did not switch to the fully static CMOS design except in the specifically designated 80C88 version, which also featured reduced power consumption and the ability to clock down to zero MHz for sleep mode. The standard 8088 used NMOS, while the faster 8088-2 and 8088-1 used HMOS and later HMOS-II ("N-channel depletion load silicon gate technology," as they explained it). HMOS-III was used for the 8086 series.

Were you able to find out what year they switched to the CMOS static design?

I've also got some feelers out for more info; if I find something definitive, I'll post here and/or change my detection routines :)
 
Were you able to find out what year they switched to the CMOS static design?

I've also got some feelers out for more info; if I find something definitive, I'll post here and/or change my detection routines :)

Maybe we could manually toggle the 8284A clock generator to see if it single-steps! The non-static version doesn't work quite well below 2 MHz.
 
I think that would be a tad difficult to do in software :)
yeah, unless your CPU got superpowers, but the problability for that is one to infinity (or zero) :D .


I was thinking of more to confirm if '83 dated 8088's does or does not use the all static design or not...
 
Were you able to find out what year they switched to the CMOS static design?

I've also got some feelers out for more info; if I find something definitive, I'll post here and/or change my detection routines :)

It's me, I screwed up! But in my defense, my information was wrong. I have learned that the earlier 8088s only exhibit the REP bug if an interrupt fires off during the REP. The earlier CPUs don't resume; the later ones do. So I need to change this:

Code:
mov     cx,2            ; test if following instruction will be
                        ; repeated twice.
db      0F3h,26h,0ACh   ; rep es: lodsb
jcxz    Yes             ; intel non-CMOS chips do not care of rep
jmp     Nope            ; before segment prefix override, NEC and
                        ; CMOS-tech ones does.

...to this:

Code:
mov     cx,f000          ; need a longer count to
                         ; guarantee it will be interrupted
db      0F3h,26h,0ACh    ; rep es: lodsb
jcxz    Yes
jmp     Nope

I will make the change tonight, recompile (no more 8087 code, finally), and update the binary on the website and let you know. I would love for you to test to see if you get a different answer.

(BTW, here is a wealth of detection information, for anyone who hits this post in a google search looking for code to detect CPU type: http://groups.google.com/group/comp.lang.asm.x86/msg/f23bbe43c62df209?hl=en Those guys have really helped me out in the past, they're great.)
 
Back
Top