VOGONS


CGA, EGA, VGA vs SVGA

Topic actions

First post, by alexb3d

User metadata
Rank Newbie
Rank
Newbie

Hello community, I'm new to the forum.
I'm a DOSBox-PURE user, I have a question and I think this is the right place.

SVGA can run CGA, EGA and VGA, but when VGA is activated the vertical resolution is doubled and with CGA you can use artifact. What would be the main difference between SVGA and the other modes?

Reply 1 of 19, by leileilol

User metadata
Rank l33t++
Rank
l33t++

The "VGA only" machine is intended to emulate the full scanlines of a VGA card so certain games using exotic VGA register tricks can work better (As well as demoscene stuff). VGA is double-scanned for 200/240 height modes.

Also VGA/SVGA cards can't fully run CGA games either (i.e. can't set palettes in some cases, and there's that special low res hack mode used by Round 42)

apsosig.png
long live PCem

Reply 2 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
leileilol wrote on 2024-08-20, 14:24:

Also VGA/SVGA cards can't fully run CGA games either (i.e. can't set palettes in some cases, and there's that special low res hack mode used by Round 42)

EGA/VGA only provides very basic register compatiblity to the CGA card. Basically, every register that's not required for everyday software is incompatible between these cards. This includes

  • Setting the color palette / border color / background color via direct port access: The "color select register" of the CGA card at 3D9h does not exist at all on EGA/VGA
  • Toggling between blinking or bright background colors in text mode: The "mode select register" of the CGA card at 3D8h does not exist at all on EGA/VGA
  • Selecting the "grayscale composite graphics mode" to get the cyan/red/white palette on the RGBI output
  • Programming custom video modes: The timing registers of the CRTC at port 3D4/3D5 work slightly to entirely different. To prevent issues with CGA software that tries to set custom timings, EGA/VGA sets these registers to write protected by default, and CGA software does not include the code to remove the write protection. On the other hand, the BIOS does temporarily remove the write protection duing video mode setup.

This is mostly no issue for standard software, because the BIOS function to select the CGA color palette works the same way on EGA/VGA cards (but it is implemented entirely different), as does setting the different standard CGA graphics modes. Most software does not bypass the BIOS for these functionalities. On the other hand, the cyan/red/white mode and the low-res pseudo-graphics mode are not supported by the CGA BIOS and the only way to set them is direct port access using ports that are not available on EGA/VGA cards.

These register-level functionalities are (mostly) compatible between CGA and EGA/VGA cards:

  • Setting (and reading!) the text-mode cursor position. This is one of the few configuration registers that is not write-only on MDA/CGA/EGA.
  • Setting the video memory start address to select a text mode page or provide hardware-assisted text scrolling
  • Polling for horizontal and vertical synchronization pulses (although the sync frequencies are different: CGA has 15.6kHz/60Hz. EGA has 15.6kHz/60Hz in 200 line modes and 21.somehting kHz/60Hz in 350 mode. VGA has 31.5kHz/70Hz in 350 line and 400 line modes (this includes scan-doubled 200-line modes), and 31.5kHz/60Hz in 480 line modes). Software that uses the horizontal frequency for timing will behave differently on different video cards.

Reply 3 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie

Lots of information, lots to learn.
Updating the database. THX!

leileilol wrote on 2024-08-20, 14:24:

The "VGA only" machine is intended to emulate the full scanlines of a VGA card...

Also VGA/SVGA cards can't fully run CGA games either (i.e. can't set palettes in some cases, and there's that special low res hack mode used by Round 42)

Yes, I know this effect in VGA, it doubles everything below 240p, it's called pixel-doubling and line-doubling. This generates in the VGA monitors the famous double scanline.

I understand, for some games I will need the specific adaptor, a curiosity, Round 42 works on Tandy and PCjr as well.

mkarcher wrote on 2024-08-20, 14:40:

This includes...
Setting the color palette / border color / background color via direct port access: The "color select register" of the CGA card at 3D9h does not exist at all on EGA/VGA

Ok, very interesting this, I was testing a few CGA games, I only got a Robocop (1989, Erbe) it has the border option and to select the background color. The other things I'm going to look for and try one by one.

I have noticed a couple of things.
The Commander Keen 4 game has an official CGA version and a composite CGA hack, in neither case does it produce edges on the CGA adapter but does on EGA, VGA.
With others (such as Prince of Persia), if I activate the border a black border is created, and if I activate 'composite mode on' an additional border is created, that is two. I understand that this could be a bug in DB-Pure, in which case I will report it instead.

So, CGA games on EGA/VGA will be limited or will not work.
But do they generate the same double scanline effect as an CGA game on VGA?
I have the same doubt with Hercules and the other adapters, although I suspect that PCjr and Tandy could only use one monitor at 15kHz.

These doubts are because I intend to create shaders and some overlays to simulate the different modes, to create a more retro, more nostalgic environment. And I am very surprised with the immense amount of graphical modes that can be generated on the IBM-PC. I think I will be asking a lot of questions in the near future.

The shaders generate 200 lines with the content at 200p but it is somewhat easy to fake double lines, there are even some that do it, but, the VGA adapter at 400p generates double lines and you can use any shader, more variety, recently in the github of Pure is looking at the possibility of activating the dualscan option in all modes to take advantage of this feature.

Reply 4 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
alexb3d wrote on 2024-08-21, 11:37:

Yes, I know this effect in VGA, it doubles everything below 240p, it's called pixel-doubling and line-doubling. This generates in the VGA monitors the famous double scanline.

That's likely just an imprecise way you say it, but to make it explicit: 240p is also line-doubled on VGA, although no standard mode uses it. The active lowest line count on VGA is 350. Of course you can letterbox a 240p image in a 350p frame to not have line doubling, but this will have black borders at the top and bottom. 240p on VGA (used by some games as custom mode) is line-doubled to 480p and thus displayed at only 60Hz.

alexb3d wrote on 2024-08-21, 11:37:

I understand, for some games I will need the specific adaptor, a curiosity, Round 42 works on Tandy and PCjr as well.

That's not really a curiosity, but quite expected. The PCjr video subsystem is an enhanced CGA design which is intended to be very much compatible to the original CGA. Furthermore Tandy is just a clone of the PCjr. So both PCjr and Tandy are best seen as "super-CGA".

alexb3d wrote on 2024-08-21, 11:37:
mkarcher wrote on 2024-08-20, 14:40:

This includes...
Setting the color palette / border color / background color via direct port access: The "color select register" of the CGA card at 3D9h does not exist at all on EGA/VGA

Ok, very interesting this, I was testing a few CGA games, I only got a Robocop (1989, Erbe) it has the border option and to select the background color. The other things I'm going to look for and try one by one.

You might want to take a look at Alley Cat for example. In the fish tank scene, the black cat changes color to show the player how much time is left before the cat drowns. IIRC that game uses the BIOS call to change the color. The effect of that BIOS call was somehow different in CGA emulation mode of the VGA card we had at that time than in VGA mode.

alexb3d wrote on 2024-08-21, 11:37:

The Commander Keen 4 game has an official CGA version and a composite CGA hack, in neither case does it produce edges on the CGA adapter but does on EGA, VGA.

The EGA/VGA card actually supports 17 colors in most modes: 16 colors for the image contents and an independently configurable overscan color. The same is true in CGA text mode. As the CGA color monitor only supports 16 colors, the overscan color is always the same as one of the 16 text mode colors, but it can be configured to be any of them. On the other hand, the low four bits of the color select register that configure the overscan color in text mode serve a different purpose in graphics modes: In 4-color graphics modes, this color defaults to black and can be changed to any other color. This register selects what color is used as "color number 0" for image content, not the overscan area. This means that "black" in the typical CGA palettes "black/cyan/magenta/white" and "black/red/green/yellow" can be replaced by any other color of your choice, that's why I don't mention "black" when referring to the CGA color palettes. In the 640x200 2-color, the color select register determines the color used for non-black pixels, while black is fixed as color 0. In both kind of graphics mode, the CGA hardware is unable to generate non-black overscan areas ("border", "edge"). That's why Commander Keen for CGA can not replicate the cyan border used by the EGA/VGA version of that game.

alexb3d wrote on 2024-08-21, 11:37:

But do they generate the same double scanline effect as an CGA game on VGA?
I have the same doubt with Hercules and the other adapters, although I suspect that PCjr and Tandy could only use one monitor at 15kHz.

I don't get the context of the first question you posted, but in context with the next sentence, I guess it is also about PCjr/Tandy. As PCjr/Tandy also generate "NTSC" timing (Nerd note: the timing parameters of "NTSC" are actually called "System M"), which can display somewhere between 200 and 240 lines. So CGA games on PCjr/Tandy machines will not be double-scanned, but look exactly as they look on CGA hardware.

Hercules is not compatible to anything except Hercules, and it uses the same frequencies as the original IBM MDA card, which is 350 visible lines at 18.4kHz and a refresh rate of 50Hz. There are some EGA/VGA/SVGA cards that provide a Hercules emulation mode on VGA monitors. This mode will not be line-doubled, but it will be the same timing VGA uses for 350-line EGA modes, which is 350 visible lines, a lot of vertical blanking, a horizontal frequency of 31.5kHz and a vertical refresh rate of 70Hz, which is quite different from the MDA/Hercules timing.

The 350-line VGA mode is technically 350 lines letterboxed into a 400 line frame. The 350-line mode and the 400-line mode use exactly the same horizontal and vertical timing, the only difference is that more scanlines are allocated to blanking in the 350 line mode. The VGA monitor uses the polarity of the sync signal (which is different in 350-line mode and 400-line mode) to adjust the image height, so that both the 350 line mode and the 400 line mode have approximately the same height for the visible part.

Reply 5 of 19, by leileilol

User metadata
Rank l33t++
Rank
l33t++

When I mean all lines, I do mean the possibility of double-scan lines being split into half because that does happen for some games that have hardware scrolling, i.e. Shinobi. It's not just simply a doubling effect.

apsosig.png
long live PCem

Reply 6 of 19, by Jo22

User metadata
Rank l33t++
Rank
l33t++
alexb3d wrote on 2024-08-21, 11:37:

So, CGA games on EGA/VGA will be limited or will not work.
But do they generate the same double scanline effect as an CGA game on VGA?
I have the same doubt with Hercules and the other adapters, although I suspect that PCjr and Tandy could only use one monitor at 15kHz.

Ok, first off I think I know very little about the DOSBox-Pure or the shaders.

But speaking of real hardware, then it's merely half the truth that VGA compatibles can't display CGA graphics properly.
The limitations might be true for the IBM VGA ("the VGA"), but not the many many VGA compatibles out there that made VGA popular.
Because actually, they can display CGA properly. They can't do Composite CGA, but the other things, like showing alternate palettes or blocky fonts.
However, this usually requires to switch them to emulation modes.

Back in the days of ISA VGA cards, almost all VGA cards included a "mode utility" on floppy disk that enabled some sort of Hercules or CGA emulation.
In that "emulation mode", the graphics chip would understand register writes meant for the Motorola 6845 CRTC (used by both CGA and Hercules).

This was made that way so that VGA compatible cards could claim 100% IBM VGA compatibility on the box.
Being compatible to IBM VGA meant to also include all its flaws and restrictions.

And since the original IBM VGA card wasn't 6845 CRTC compatible,
the CGA/Hercules compatibility had to be hidden away in VGA native mode of VGA compatible cards.
It's a form of bureaucracy, if you will.

A few companies like Chips&Technologies did relax on these restrictions and allowed CGA port writes while in VGA mode, without need for entering CGA emulation.
The 82C451 VGA chip seems to be one of them, it can be set to allow CGA/MGA writes in all modes.
It's being mentioned in the datasheet on page 24.

Scan lines.. It's possible to tell the VGA do disable line doubling.
The DOS utility VERDE makes use of this to provide a better CGA experience when running CGA games in VGA native mode.
That requires s a compatible monitor, however.

Speaking under correction.

Edited.

PS: This might be useless information at first glance, but it also affects emulation.
There are emulators which emulate an ET-4000, PVGA1A or OAK-67 [and many more] as far as VGA and SVGA are concerned,
but the built-in emulation modes for legacy graphics modes are not being emulated.

"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 7 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie

Sorry for the delay.

mkarcher wrote on 2024-08-21, 15:19:

That's likely just an imprecise way you say it

I got this definition from wikipedia, but I did some research and found that in the original IBM VGA Technical Reference they call it "Double Scan and Border Support" and in the VGA/XGA "Double Scanning".
I have seen in other VGA manuals that call it line-doubling, maybe this is why the confusion.
line doubler is a technology for converting interlaced video to progressive.

look at Alley Cat for exampl

OMG! Alley of Cat, this game was made by a person with many cats.
I tried it in CGA and the cat changes color in the fishbowl, but it also changes color in EGA/VGA/SVGA.

I don't get the context of the first question you posted...

I missed contextualizing, but I didn't think it was going to be that long. Experimenting with the shaders I realized that VGA doubles the vertical resolution and that greatly affects how the lines and mask look. Then I was curious to know what were the differences between SVGA and standalone adapters. Now I have many things clear, but also new doubts.

If I'm understanding correctly. 350p in EGA is drawn full screen because of the 21kHz of the monitor and 350p in VGA is drawn on the frame 400 lines and stretched to fill the screen, and adds some vertical blur.

My question was if PCjr/Tandy connected to a VGA monitor produces double lines,although I suspect it is not possible to connect it.
The point is that VGA doesn't duplicate CGA, So, what uses VGA to play CGA? polarity of the sync signa?

leileilol wrote on 2024-08-21, 18:31:

When I mean all lines, I do mean the possibility of double-scan lines being split into half because that does happen for some games that have hardware scrolling, i.e. Shinobi. It's not just simply a doubling effect.

I do not understand this.

Jo22 wrote on 2024-08-22, 15:47:

Ok, first off I think I know very little about the DOSBox-Pure or the shaders.

But speaking of real hardware...

Don't worry about this, I'm not going to create any technical feats, I don't know I'm a designer, I'm going to copy and paste and then on the RetroArch forum ask for lots of help to make it work right.

The problem with the shaders is that they are very TV focused, but they have some Monitor stuff and I would like to create some basic ones to represent the original look of the PC modes, and decorate them with some image to try to create a better feel to create a more natural feel, like these shaders from kokoko3k.

For now, to start with I will create the ones supported by DOSBox, then I will add others or include the parameters in the configuration, to have all possibilities, like hercules emulated in VGA or (as I saw in this forum) EGA on a hercules monitor with single and double scan lines.

Reply 8 of 19, by Jo22

User metadata
Rank l33t++
Rank
l33t++
alexb3d wrote on 2024-08-27, 17:28:
Don't worry about this, I'm not going to create any technical feats, I don't know I'm a designer, I'm going to copy and paste an […]
Show full quote
Jo22 wrote on 2024-08-22, 15:47:

Ok, first off I think I know very little about the DOSBox-Pure or the shaders.

But speaking of real hardware...

Don't worry about this, I'm not going to create any technical feats, I don't know I'm a designer, I'm going to copy and paste and then on the RetroArch forum ask for lots of help to make it work right.

The problem with the shaders is that they are very TV focused, but they have some Monitor stuff
and I would like to create some basic ones to represent the original look of the PC modes, and decorate them with some image to try
to create a better feel to create a more natural feel, like these shaders from kokoko3k.

For now, to start with I will create the ones supported by DOSBox, then I will add others or include the parameters in the configuration, to have all possibilities,
like hercules emulated in VGA or (as I saw in this forum) EGA on a hercules monitor with single and double scan lines.

Ah, I see. ^^

In another thread, I did take a few CRT screenshots of what are mostly of 320x200 games (a few VGA and EGA games, too).
They were made with a little CRT TV, however, rather than a true vintage VGA monitor.

I've chosen this little TV because it has a lower resolution screen tube, which I believe is closer to early VGA monitors from the 80s (0.41mm dot pitch).
It's interfaced via an VGA-SCART converter box, which has its own electronics but doesn't have a filter.

The original idea was to see how MCGA titles (320x200 256c) would have looked like if IBM had made the 15KHz output of the PS/2 Model 30 official
and if IBM had sold ordinary 15KHz video monitors for it. Because, some of the famous 15 KHz PAL/NTSC video monitor models of the time had a poor dot pitch, too.
Commodore 1702 had 0.64mm, Commodore 1084s had 0.42mm. Amdek Color 500 14" had 0.51mm.

So all in all, it's not an 100% valid take on authenticity maybe.
Some people do disagree with my perception of the past, rightfully perhaps. An 31KHz VGA monitor simply isn't same as an 15 KHz TV.
However, I think the screenshots might be an approximation, at least. Most games I tested do look cleaner, more natural on such a lo-fi CRT.

Also, the really old VGA monitors, the cheap consumer models, simply had a higher dot pitch.
Poorer than what was common in the 90s (0.21 to 0.28mm).

Too bad most of them had been recycled by the mid-late 90s already, so it's hard to prove.

The remaining 15" models we consider being small nowadays can do 800x600 and up and support high refresh rates,
because I assume that's what people in the Windows 95 days wanted to have.

Normal VGA in 640x480 in 60 Hz was "okay" in the Windows 3 days still, but SVGA soon became standard.
That's when the early VGA monitors got replaced by better models with better dot pitch.

That being said, this is simply my explanation here. So I'm speaking under correction.
Because according to my memories, back in the 90s these simple 14" VGA monitors with a knob each for contrast, brightness and power were still around.
But by early 2000s, they had almost all disappeared and 15" and 17" monitors with buttons had taken their place.

By old VGA monitors, I'm thinking of the "IBM PS/2 Color Display 8512", in particular.
It's a role model for the many no-name VGA monitors of the time, maybe.

Other IBM models of same era had existed with an better dot pitch (8514, 8515 etc), as well.
They weren't meant for the entry class PCs, however, but rather for CAD/CAM and users of XGA and 8514/A graphics adapters.

8512 Color Monitor - Technical Specifications
IBM Personal System/2 Color Display 8512 (PDF)
IBM PS/2 Model 77i with a blurry IBM PS/2 monitor
Secret of Monkey Island on a PS/2 monitor

Pros of blurry CRT TV
Scan lines, for example, are barely visible on the CRT TV, no matter if video is interlaced or not.
Even with a normal video source, the little CRT TV will blur the neighboring pixels.

The site DOS Days has some more information about old monitors, I think.
CRT Monitors Introduction

Edited.

Edit: I've found a picture of an 8512 showing MS Paintbrush and attached it.
It has moire effect due to the camera, but maybe gives an idea how VGA monitors used to looked.
And it's better than this model, at least. 😉

Last edited by Jo22 on 2024-08-27, 21:33. 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 9 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
alexb3d wrote on 2024-08-27, 17:28:
mkarcher wrote on 2024-08-21, 15:19:

That's likely just an imprecise way you say it

I got this definition from wikipedia, but I did some research and found that in the original IBM VGA Technical Reference they call it "Double Scan and Border Support" and in the VGA/XGA "Double Scanning".
I have seen in other VGA manuals that call it line-doubling, maybe this is why the confusion.

I my "imprecise" was about you writing "everything below 240p" is double-scanned (or line-doubled), but the correct statement would be "everything up to and including 240p".

alexb3d wrote on 2024-08-27, 17:28:

I missed contextualizing, but I didn't think it was going to be that long. Experimenting with the shaders I realized that VGA doubles the vertical resolution and that greatly affects how the lines and mask look. Then I was curious to know what were the differences between SVGA and standalone adapters. Now I have many things clear, but also new doubts.

If I'm understanding correctly. 350p in EGA is drawn full screen because of the 21kHz of the monitor and 350p in VGA is drawn on the frame 400 lines and stretched to fill the screen, and adds some vertical blur.

I suspect you are confused by the way stuff works on modern LCD displays, in which stretching causes blur. That's not how 350 line modes in VGA work. Both EGA and VGA produce an image with 350 non-blank lines (I assume the overscan/border color is black). EGA produces lines at 21kHz and only a minimal amount of vertical blanking, to hit 60Hz. On the other hand, VGA always scans at 31.5kHz (while EGA monitors are dual-scan and can scan at 21kHz for 350-line modes and at 15.6kHz for 200 line modes, the horizontal scan frequency of VGA is fixed). The vertical refresh rate of VGA in 350 line modes and in 400 line modes is 70Hz, so the number of total lines (active lines + blanking) is identical in both modes. In fact, the 350 line mode is stretched compared to the 400 line mode, but not by digital image processing (the hardware at that time did not do any real-time scaling), but by the monitor drawing the lines further apart. Depending on the sharpness of the monitor, you might be able to see dark stripes between the lines in 350-line mode. VGA monitors should be able to draw 480 lines without noticable blur between the lines, so focus is supposed to be sharp enough that individual scanlines get visible at 350. On the other hand, focuse on EGA monitors should be adjusted that there are no noticeable gaps between the scan lines at 350 pixels.

The clear visibility of individual scan lines on VGA at 350 lines, will create a different image feel than the solid picture displayed on EGA monitors at 350 lines, but the result is not what I would call "blurriness".

alexb3d wrote on 2024-08-27, 17:28:

My question was if PCjr/Tandy connected to a VGA monitor produces double lines,although I suspect it is not possible to connect it.
The point is that VGA doesn't duplicate CGA, So, what uses VGA to play CGA? polarity of the sync signa?

PCjr/Tandy scans at 15.6kHz (like CGA and "NTSC" aka "TV system M"). VGA monitors only sync to 31.5kHz, so it's indeed not possible to a VGA monitor to a PCjr/Tandy system, even if you translate the digital PCjr/Tandy output to analog VGA levels. As you already know, VGA uses double-scanning in all 200-line modes. This includes CGA compatible graphics modes. This also applies to VGA cards in "CGA emulation mode". A standard VGA monitor can not display 200 lines modes using the whole CRT height. In CGA emulation mode, which is provided by most early 3rd-party VGA and SVGA cards, most CGA programs that directly program the CGA CRTC registers will work, but the output image will still be a double-scanned image, resulting in 400 lines at 31.5 kHz to the VGA monitor.

alexb3d wrote on 2024-08-27, 17:28:
leileilol wrote on 2024-08-21, 18:31:

When I mean all lines, I do mean the possibility of double-scan lines being split into half because that does happen for some games that have hardware scrolling, i.e. Shinobi. It's not just simply a doubling effect.

I do not understand this.

VGA does not "memorize" a full line for double scanning, but the same line is generated twice from the contents of the video memory. If something changes between the first time the line is scanned and the second time the line is scanned, the second "copy" of the line is not identical to the first copy. This "something" that could change are video memory contents (obviously), but also CRTC settings affecting the scan-out process, or palette values. At the moment, I don't see how "hardware scrolling" can change the second line copy in respect to the first copy, as the screen start address register is only sampled once per frame, and mid-frame changes to this register do not take effect until the next frame. Also, the "split screen" effect that resets the current scanout address to zero after the scan-line counter reaches a certain number can not trigger between the two copies of a scan-line (if "true double-scanning", a term I just made up to describe the double scanning enabled by setting bit 7 of CRTC register 9) is used. The trigger point for the reset of the scanout address is given as value of the row counter, which is not incremented between the two copies of a line in double-scanned modes.

On the other hand, there is another way to trigger multi-scanning in many EGA/VGA modes, which is independent of the "true double-scanning": If you tell the EGA/VGA CRTC that the 400-line image consists of (text) rows with a height of two pixels each (by setting the "maximum scanline register" to 1, causing one scan as "scan line 0" and a second scan of the same source data as "scan line 1"), this will result in a double-scanned picture if "scanning as line 0" and "scanning as line 1" produces identical results, for example because the in-character scan-line counter is ignored. Obviously, in text modes, that counter is not ignored, because it selects which row from the character bitmap data is used for a certain scan line. Also in CGA graphics mode, the scan-line counter is not ignored, because that counter selects between bank 0 (at B800) and bank 1 (at BA00). In EGA/VGA graphics mdoe, that counter is ignored, so a "fake double-scanning" effect is achievable using the maximum scanline number. VGA actually uses "fake double-scanning" in mode 13h (the 256-color mode), and the 16-color modes 320x200 and 640x200 can be reprogrammed from "true double-scanning" to "fake double-scanning". In fake double-scanning modes, the split screen functionality can hit between the two copies of a single scanline.

alexb3d wrote on 2024-08-27, 17:28:

For now, to start with I will create the ones supported by DOSBox, then I will add others or include the parameters in the configuration, to have all possibilities, like hercules emulated in VGA or (as I saw in this forum) EGA on a hercules monitor with single and double scan lines.

Hercules emulated on (S)VGA cards in emulation mode is "just another 350-line mode", and can be treated the same way as EGA 350-line modes.

EGA with hercules/MDA monitor is something very unique: EGA with an MDA monitor in text mode is very much just like MDA at the monitor side: It produces the same 720x350 image with 25 lines of 9x14 characters, yet providing many EGA capabilities on the computer interface side like 8 pages of text, soft scrolling, software-programmable fonts. As the video timing is identical to MDA, you will get 18kHz/50Hz in this configuration, which is never generated by EGA if a color monitor is connected. EGA does not provide a BIOS method to enable a Hercules-compatible 720x348 mode, and as it is not register compatible to the Hercules card, Hercules software will not be able to set that mode. On the other hand, the EGA hardware is perfectly able to generate that mode if programmed in a way that only works for EGA cards with an MDA monitor. That's why these emulation modes work: You just need to adapt the register interface, but the image display logic is already there.

Instead of the 720x348 Hercules mode, IBM decided to provide a 640x350 EGA-proprietary graphics mode (mode 0Fh) instead. That mode also uses MDA scan rates, and thus can not be displayed on an EGA color monitor. The video memory organization of that mode resembles the 640x350 EGA color mode (mode 10h), probably to make it easier to write software that supports both monochrom (0Fh) and color (10h) monitors in high resolution.

Reply 10 of 19, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Yay! EGA is really fascinating as a topic. EGA compatible cards (Super EGA, EGA+, PEGA etc) often supported extended features,
just like most VGA compatible cards did later on (they were really SVGA from the start, I haven't seen a plain VGA compatible yet).
They could do 800x600 resolution, handle VGA modes 11h/12h, display Hercules graphics on various monitors, do simulate CGA grayscale graphics on an MDA monitor, do EGA via Composite etc.
Very interesting. The ATI EGA Wonder VIP was a strange beast, too, I remember. Somehow between EGA and VGA in terms of capabilities..

"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 11 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2024-08-27, 21:02:
Ah, I see. ^^ […]
Show full quote

Ah, I see. ^^

In another thread, I did take a few CRT screenshots of what are mostly of 320x200 games (a few VGA and EGA games, too).
They were made with a little CRT TV, however, rather than a true vintage VGA monitor.

So all in all, it's not an 100% valid take on authenticity maybe.
Some people do disagree with my perception of the past, rightfully perhaps. An 31KHz VGA monitor simply isn't same as an 15 KHz TV.

I don't know the SCART connector but if it is compatible with VGA it doesn't change the colors, with component it does.

References I have a few pages (literally hundreds 🤣), crtdatabase is a good one and on flickr, professional photos can be obtained by searching well.
But the older modes do not abound in images with high level of detail. For example the monitor IBM PS/2 Color Display 8512, I just found it and had no idea it was a slot mask.

Edit: I've found a picture of an 8512 showing MS Paintbrush and attached it.
It has moire effect due to the camera, but maybe gives an idea how VGA monitors used to looked.
And it's better than this model, at least.

Tandy was also slotmask? O Then CGA and Hercules possibly too,and now I have doubts about EGA.

Obviously there were monitors and TVs for professionals, but for gaming, which is what we care about for now, these are great.
A SVGA monitor is very different from a VGA monitor, and it is different from slot to shadown. Shadown mask and scanlines are difficult to apply to a flat screen at 1080 but with a little patience everything can be achieved.

Pros of blurry CRT TV
Scan lines, for example, are barely visible on the CRT TV, no matter if video is interlaced or not.

This is one of the discussions I have had since ancient times, there are many TVs that do not produce scanlines, some because of blurry, others because they are old and others because they are high end.

mkarcher wrote on 2024-08-27, 21:16:

I my "imprecise" was about you writing "everything below 240p" is double-scanned (or line-doubled), but the correct statement would be "everything up to and including 240p".

I understand, if 240p (480i) is the NTSC standard, although I wanted to share this discovery because there is a lot of confusion on that term, many people confuse it with DualScan or even Double Strike.

I suspect you are confused by the way stuff works on modern LCD displays, in which stretching causes blur.

Actually it's not this, I understand how horizontal resolution works, and I'm beginning to understand how vertical works.

My question is whether 350p in VGA produces letterbox.
I have read on some sites (but the internet is not reliable) that 350p in VGA produces 50 black lines to fill the 400 lines?
Because if 31.5kHz/60Hz produces 400 lines and fills the screen.
How can the same 31.5kHz/60Hz produce 350 lines and fill the screen without vertically stretching the image?

And why does the VGAonly adapter duplicate EGA from 100 to 400, but not CGA?

I have some memories of CRT SVGA and I don't remember ever seeing letterbox. Although VGA and earlier is very different.

About image quality, I have found some good references, this video from PhilsComputerLabs compares EGA to VGA with high detail (although the monitor is SVGA). And this one, by RetroSpector78, is possibly the best reference of an IBM EGA I've seen.

Reply 12 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie

CRT DataBase is a good site to get references, it has many monitors, although only "modern". In this HP you can see how it scales various resolutions.

Reply 13 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
alexb3d wrote on 2024-08-28, 17:02:
mkarcher wrote on 2024-08-27, 21:16:

I my "imprecise" was about you writing "everything below 240p" is double-scanned (or line-doubled), but the correct statement would be "everything up to and including 240p".

I understand, if 240p (480i) is the NTSC standard, although I wanted to share this discovery because there is a lot of confusion on that term, many people confuse it with DualScan or even Double Strike.

While CGA is designed to kind-of conform to 480i (actually, it produces 200p letterboxed in what would be called 240p nowadays), VGA is not designed to conform to any specific TV standard, because VGA monitors and TV sets are different devices, and usually had their horizontal deflection circuit designed quite differently. The 480 scanline resolution might be inspired by the 480i resolution of NTSC, but in contrast to NTSC, the 480 scanlines of VGA are defined to be fully visible, whereas 480i NTSC has lines that may be hidden in the "overscan area" outside of the CRT frame. The key point about the VGA resolution is that it is the first mainstream PC video card that offers square pixels, which is especially useful for CAD tools, because rotating an bitmap image by 90 degrees is easily performed losslessly, and 45° lines look perfect.

I suggest you do not think about the NTSC standard at all when discussing VGA, although the horizontal frequency is approximately twice the NTSC frequency, so interpreting it as the "progressive version" of NTSC 480i is a valid way to explain that mode.

alexb3d wrote on 2024-08-28, 17:02:
Actually it's not this, I understand how horizontal resolution works, and I'm beginning to understand how vertical works. […]
Show full quote

I suspect you are confused by the way stuff works on modern LCD displays, in which stretching causes blur.

Actually it's not this, I understand how horizontal resolution works, and I'm beginning to understand how vertical works.

My question is whether 350p in VGA produces letterbox.
I have read on some sites (but the internet is not reliable) that 350p in VGA produces 50 black lines to fill the 400 lines?
Because if 31.5kHz/60Hz produces 400 lines and fills the screen.
How can the same 31.5kHz/60Hz produce 350 lines and fill the screen without vertically stretching the image?

I never intended to say that the image is not vertically stretched. The image is stretched, you are totally correct. But you implied

alexb3d wrote on 2024-08-27, 17:28:

350p in VGA is drawn on the frame 400 lines and stretched to fill the screen, and adds some vertical blur.

that this stretching "adds some vertical blur". This is not true. If you scale an image from 350 pixels height to 400 pixels height, you will get some vertical blur. But the VGA monitor stretches the
image by drawing the lines at a bigger distance, but it is still 350 lines, so no interpolation from 350 scan lines to 400 scan lines happens. The 350 line mode is "letterboxed into 400", but at the same time, the monitor's image height is readjusted, such that 350 lines fill the screen instead of 400 lines filling the screen. Actually, VGA monitors have three different line counts: 350 to fill the screen, 400 to fill the screen and 480 to fill the screen. These three modes are chosen by adjusting the vertical deflection, and the vertical deflection is adjusted in response to the polarity of the sync signals. Switching from 400 line mode to 350 line mode is like changing an analog "image height" adjustment to undo the letterboxing.

alexb3d wrote on 2024-08-28, 17:02:

And why does the VGAonly adapter duplicate EGA from 100 to 400, but not CGA?

If your question is: "Why does VGA use double-scanning from 200 to 400 for 200-line EGA modes, but not for 200-line CGA modes?", the answer is: Your premise is wrong. All 200-line mode are double-scanned on VGA monitors. This applies to the CGA graphics modes (mode 4&5 at 320x200, mode 6 at 640x200) as well as to the EGA low-res modes (0Dh at 320x200 and 0Eh at 640x200). It also applies to the CGA-compatible 8x8-character-cell variant of the text modes 0,1,2 and 3.

This kind of double-scanning applies both with the VGA in "native mode" as well as a VGA in "CGA emulation mode", as long as a VGA monitor is connected. Some early EGA/VGA cards might have had an option to interface with an EGA or CGA monitor. In that case, 200-line modes would not be double-scanned.

alexb3d wrote on 2024-08-28, 17:02:

Tandy was also slotmask? O Then CGA and Hercules possibly too,and now I have doubts about EGA.

You can't say "tandy is slotmask". Tandy computers produced a CGA-compatible RGBI signal at NTSC frequencies, and there were a lot of monitors that could display that signal. Some of them were slot mask, some of them were dot mask. For EGA, you might argue that "the one and only actual EGA monitor" is the IBM 5154, and thus "EGA is slotmask", but there also were third-party multi-sync monitors that could sync to both EGA frequencies, i.e. the CGA-compatible 15.6kHz scan rate and the EGA native 21kHz scan rate used in 350 line modes. NEC and EIZO are companies that made EGA-compatible multi-sync (which actually is an NEC trademark, at least some spelling of it) monitors.

MDA/Hercules monitors are monochrome. They do not have a mask at all.

Reply 14 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie
mkarcher wrote on 2024-08-28, 21:24:
VGA is not designed to conform to any specific TV standard, because VGA monitors and TV sets are different devices, and usually […]
Show full quote

VGA is not designed to conform to any specific TV standard, because VGA monitors and TV sets are different devices, and usually had their horizontal deflection circuit designed quite differently.


The 480 scanline resolution might be inspired by the 480i resolution of NTSC, but in contrast to NTSC, the 480 scanlines of VGA are defined to be fully visible, whereas 480i NTSC has lines that may be hidden in the "overscan area" outside of the CRT frame. The key point about the VGA resolution is that it is the first mainstream PC video card that offers square pixels, which is especially useful for CAD tools, because rotating an bitmap image by 90 degrees is easily performed losslessly, and 45° lines look perfect.

I suggest you do not think about the NTSC standard at all when discussing VGA, although the horizontal frequency is approximately twice the NTSC frequency, so interpreting it as the "progressive version" of NTSC 480i is a valid way to explain that mode.

I am aware that they are totally different engineering but VGA seeks to be compatible in its format and color space, I guess it is to have better support for audiovisual content. The reference is because the VGA limit for line doubling is precisely the NTSC 240p resolution.

But the VGA monitor stretches the image by drawing the lines at a bigger distance

I got it! Yes, I know what you mean. I have seen this when repairing a monitor, with the internal knobs you can separate or merge the scan lines, the lines did not change in size, they just left more black spaces.

So by logic, 200p in EGA produces thick lines and 350p a fine lines, while 200p in VGA doubles and produces thin lines and 350p expands the lines using polarity of the sync signal, and draws thick lines.

If your question is: "Why does VGA use double-scanning from 200 to 400 for 200-line EGA modes, but not for 200-line CGA modes?"


, the answer is: Your premise is wrong. All 200-line mode are double-scanned on VGA monitors. This applies to the CGA graphics modes (mode 4&5 at 320x200, mode 6 at 640x200) as well as to the EGA low-res modes (0Dh at 320x200 and 0Eh at 640x200). It also applies to the CGA-compatible 8x8-character-cell variant of the text modes 0,1,2 and 3.

I am referring to the emulator and the vgaonly adapter, it duplicates EGA 200p, but does not duplicate CGA 200p.

You can't say "tandy is slotmask".

I'm watching it. A review of the Tandy VGM-225 monitor.

MDA/Hercules monitors are monochrome. They do not have a mask at all.

Straight to the phosphor. Now I'm finding out.
Penśe that the pattern seen in SIERRA, was some kind of mask.
20160704_151713.jpg

Reply 15 of 19, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
alexb3d wrote on 2024-08-29, 10:02:

VGA seeks to be compatible in its format and color space

Not at all. VGA is RGB all the way while TVs use various forms of luminance/chroma signalling (depending on the region and with the exception of SCART RGB).

Reply 16 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
alexb3d wrote on 2024-08-29, 10:02:

You can't say "tandy is slotmask".

I'm watching it. A review of the Tandy VGM-225 monitor.

That's definitely a good indication that there slot-mask monitors were common at that time. But please don't confuse this Tandy branded VGA monitor with the enhanced CGA video in early Tandy 1000 series computers. The 15kHz Tandy monitors that went along with the "tandy video" were CM-2, CM-10 and CM-II according to https://gunkies.org/wiki/Radio_Shack_Monitors , you could also use the less sharp CM-4 and CM-5 monitors. You can't connect a VGM-225 to the Tandy 1000 video, which provides the mode typically called "tandy mode", which is a clone of the PCjr mode.

Reply 17 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie
jmarsh wrote on 2024-08-29, 10:39:

Not at all. VGA is RGB all the way while TVs use various forms of luminance/chroma signalling (depending on the region and with the exception of SCART RGB).

All TVs are based on NTSC or some variant, unless it is a very rare specific case.

Almost all consumer TVs, and most professional TVs use the 72% NTSC/99% RGB color space reduction.
The colors are not identical in many cases, but there is parity. This is known from the sRGB standardization and the intention to obtain better compatibility.

When I say that VGA is trying to be compatible I am referring to the usability, not the technical side.

mkarcher wrote on 2024-08-29, 10:50:

That's definitely a good indication that there slot-mask monitors were common at that time. But please don't confuse this Tandy branded VGA monitor with the enhanced CGA video in early Tandy 1000 series computers...

I looked them up and it turns out they are all Slot Mask.
The CGA RGBI is based on the Motorola 6845 and according to wikipedia is NTSC.
But just because it is a slot mask does not mean it is bad, if it has good Dot pitch and TVL, it can have a very sharp image.

CM-2
https://www.storagegumbo.com/2021/02/repairin … gb-monitor.html

CM-5
https://www.worthpoint.com/worthopedia/tandy- … andy-4564567682

https://www.reddit.com/r/crtgaming/comments/9 … _ebay_asis_for/

https://www.ebay.com/itm/386793909795

CM-II (a video at the exact second)
https://youtu.be/malgCK7qHQA?t=608

Reply 18 of 19, by mkarcher

User metadata
Rank l33t
Rank
l33t
alexb3d wrote on 2024-08-29, 12:59:

The CGA RGBI is based on the Motorola 6845 and according to wikipedia is NTSC.

The Motorola 6845 is able to create a lot of different video timings, but you are correct that the IBM CGA programs it in a way that is sufficiently similar to NTSC that it can be displayed on NTSC-type monitors. "Real NTSC" is always 480i, while CGA is 240p. The Motorola 6845 is also used on the MDA, which does not resemble NTSC timing at all.

Reply 19 of 19, by alexb3d

User metadata
Rank Newbie
Rank
Newbie
mkarcher wrote on 2024-08-29, 14:14:

"Real NTSC" is always 480i, while CGA is 240p...

If it is based on NTSC it makes sense, the Standard Definition limit is 480i, or in this case 240 progressive lines.

I really appreciate everyone's help, it has been very abundant and I have learned a lot of things, and I have also gotten some good references. I will be around soon.