VOGONS

Common searches


First post, by videogamer555

User metadata
Rank Member
Rank
Member

Here's a list of all the video modes that DOS is supposed to support (found on webpage http://stanislavs.org/helppc/int_10-0.html).

AL = 00  40x25 B/W text (CGA,EGA,MCGA,VGA)
= 01 40x25 16 color text (CGA,EGA,MCGA,VGA)
= 02 80x25 16 shades of gray text (CGA,EGA,MCGA,VGA)
= 03 80x25 16 color text (CGA,EGA,MCGA,VGA)
= 04 320x200 4 color graphics (CGA,EGA,MCGA,VGA)
= 05 320x200 4 color graphics (CGA,EGA,MCGA,VGA)
= 06 640x200 B/W graphics (CGA,EGA,MCGA,VGA)
= 07 80x25 Monochrome text (MDA,HERC,EGA,VGA)
= 08 160x200 16 color graphics (PCjr)
= 09 320x200 16 color graphics (PCjr)
= 0A 640x200 4 color graphics (PCjr)
= 0D 320x200 16 color graphics (EGA,VGA)
= 0E 640x200 16 color graphics (EGA,VGA)
= 0F 640x350 Monochrome graphics (EGA,VGA)
= 10 640x350 16 color graphics (EGA or VGA with 128K)
640x350 4 color graphics (64K EGA)
= 11 640x480 B/W graphics (MCGA,VGA)
= 12 640x480 16 color graphics (VGA)
= 13 320x200 256 color graphics (MCGA,VGA)
= 8x EGA, MCGA or VGA ignore bit 7, see below
= 9x EGA, MCGA or VGA ignore bit 7, see below

One of the first things I noticed when testing out these graphics modes (using some software I wrote myself using NASM assembler) is that mode 0E is not saving screencaps properly in DosBox. It is a 640x200 video mode. The real hardware monitor that receives the signal would be a specially designed monitor meant for this mode, and would have rectangular (not square) pixels and so would APPEAR to be displaying a 640x400 image, but the actual pixels are 640x200. DosBox's display mimics the appearance on a real monitor, and that's fine. However the screenshot you take with Ctrl+F5 is SUPPOSED TO save the actual pixels, meaning that it should be saving a 640x200 image. This will look distorted, but for accuracy of the image format, it should be saving the ACTUAL PIXELS. So imagine my dismay when I looked at the screencap it took and saw that it was a 640x400 image!

And that's not all. Mode 00 is supposed to be a text mode, just like Mode 01, except with black and white instead of 16 colors. But DosBox shows BOTH modes in color. Same thing with Mode 02 and 03. Mode 03 is supposed to be color, while Mode 02 is supposed to be 16 shades of gray grayscale. Again, DosBox makes the mistake of showing BOTH modes in color. There's several other problems like this in DosBox (one of them even has one of modes that is supposed to be a graphics mode, but DosBox is handling it as a text mode).

I highly encourage the developers of DosBox to go back over their code for emulating graphics modes, and use the list I've posted here as a reference for how the modes are SUPPOSED TO BE handled, and then correct any errors in their code for DosBox's display emulation, to make it so that from now on (whenever the next version of DosBox is released) DosBox will correctly render (and save screencaps from) each and every single one of these modes.

Reply 1 of 11, by idspispopd

User metadata
Rank Oldbie
Rank
Oldbie

It's not DOS that support these video modes, but the BIOS, either the mainboard's BIOS or the BIOS on the EGA/VGA card.
All modes with 200 lines would be displayed with 400 scan lines on a VGA screen. Having the option to save the raw pixels as opposed to the displayed image would be nice, but not actually necessary.
Mode 00 and 02 wouldn't display as 16 shades of gray on a CGA/EGA screen. A CGA screen or an EGA screen in a 200 lines mode can only display 16 colours so you'd get black, white and two grays. EGA has 64 colours but there are still only those four shades of gray. To get more you'd need a monochrome screen, or a VGA card + monitor. Did you check what happens on a real system?

Reply 2 of 11, by videogamer555

User metadata
Rank Member
Rank
Member
idspispopd wrote:

It's not DOS that support these video modes, but the BIOS, either the mainboard's BIOS or the BIOS on the EGA/VGA card.
All modes with 200 lines would be displayed with 400 scan lines on a VGA screen. Having the option to save the raw pixels as opposed to the displayed image would be nice, but not actually necessary.
Mode 00 and 02 wouldn't display as 16 shades of gray on a CGA/EGA screen. A CGA screen or an EGA screen in a 200 lines mode can only display 16 colours so you'd get black, white and two grays. EGA has 64 colours but there are still only those four shades of gray. To get more you'd need a monochrome screen, or a VGA card + monitor. Did you check what happens on a real system?

I don't have any of that hardware. So I have no way of testing these for real. I'm just going by the descriptions of the modes provided in the document in question.

Reply 3 of 11, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
videogamer555 wrote:

However the screenshot you take with Ctrl+F5 is SUPPOSED TO save the actual pixels,

Says who?

videogamer555 wrote:

And that's not all. Mode 00 is supposed to be a text mode, just like Mode 01, except with black and white instead of 16 colors. But DosBox shows BOTH modes in color.

On real CGA hardware, this bit has no effect on RGBI monitors - the "black and white" modes just disable the color burst for composite monitors. DOSBox doesn't support composite colour for text modes (at least not yet - it's something I hope to add at some point, but it's difficult because doing so requires a palette of more than 8 bits).

Reply 4 of 11, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
videogamer555 wrote:

One of the first things I noticed when testing out these graphics modes (using some software I wrote myself using NASM assembler) is that mode 0E is not saving screencaps properly in DosBox. It is a 640x200 video mode. The real hardware monitor that receives the signal would be a specially designed monitor meant for this mode, and would have rectangular (not square) pixels and so would APPEAR to be displaying a 640x400 image, but the actual pixels are 640x200. DosBox's display mimics the appearance on a real monitor, and that's fine. However the screenshot you take with Ctrl+F5 is SUPPOSED TO save the actual pixels, meaning that it should be saving a 640x200 image. This will look distorted, but for accuracy of the image format, it should be saving the ACTUAL PIXELS. So imagine my dismay when I looked at the screencap it took and saw that it was a 640x400 image!

And that's not all. Mode 00 is supposed to be a text mode, just like Mode 01, except with black and white instead of 16 colors. But DosBox shows BOTH modes in color. Same thing with Mode 02 and 03. Mode 03 is supposed to be color, while Mode 02 is supposed to be 16 shades of gray grayscale. Again, DosBox makes the mistake of showing BOTH modes in color. There's several other problems like this in DosBox (one of them even has one of modes that is supposed to be a graphics mode, but DosBox is handling it as a text mode).

I highly encourage the developers of DosBox to go back over their code for emulating graphics modes, and use the list I've posted here as a reference for how the modes are SUPPOSED TO BE handled, and then correct any errors in their code for DosBox's display emulation, to make it so that from now on (whenever the next version of DosBox is released) DosBox will correctly render (and save screencaps from) each and every single one of these modes.

Your mode list is too simplistic. 640x200 always should look like 640x400 except on early laptops which had very wide screens. If you don't like it, find a program that will resize the screenshot by deleting every other line. Irfanview works well.

As reengine stated, Mode 00 is identical to Mode 01 and Mode 02 is identical to Mode 03 unless you are displaying these modes on a genuine CGA, PCjr. or Tandy 1000 by a composite video monitor.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 5 of 11, by videogamer555

User metadata
Rank Member
Rank
Member

Of the above list of modes, there's also this subset of modes that appears black and white in DosBox, even though they should be in color according to the specs.

= 0D 320x200 16 color graphics (EGA,VGA) = 0E 640x200 16 color graphics (EGA,VGA) = 10 640x350 16 color graphics […]
Show full quote

= 0D 320x200 16 color graphics (EGA,VGA)
= 0E 640x200 16 color graphics (EGA,VGA)
= 10 640x350 16 color graphics (EGA or VGA with 128K)
640x350 4 color graphics (64K EGA)
= 12 640x480 16 color graphics (VGA)

Reply 6 of 11, by videogamer555

User metadata
Rank Member
Rank
Member
reenigne wrote:
videogamer555 wrote:

However the screenshot you take with Ctrl+F5 is SUPPOSED TO save the actual pixels,

Says who?

That's what I've observed it do with all other modes. For example, mode 0x13 is 320x200 with 256 colors. Now the DosBox main window shows it at 640x400 for ease of viewing. But the screencap saves it at its true 320x200 size. However, this doesn't happen with the 640x200 mode. It incorrectly saves the screencap at 640x400.

Reply 7 of 11, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

I guess that's because the screenshot function follows these requirements, in this order:
1) Preserve all the information on the main window
2) Keep the same aspect ratio as the main window
3) Make the image as small as possible

Reply 8 of 11, by videogamer555

User metadata
Rank Member
Rank
Member

There's still this problem though.

Of the above list of modes, there's also this subset of modes that appears black and white in DosBox, even though they should be in color according to the specs.

= 0D 320x200 16 color graphics (EGA,VGA) = 0E 640x200 16 color graphics (EGA,VGA) = 10 640x350 16 color graphics […]
Show full quote

= 0D 320x200 16 color graphics (EGA,VGA)
= 0E 640x200 16 color graphics (EGA,VGA)
= 10 640x350 16 color graphics (EGA or VGA with 128K)
640x350 4 color graphics (64K EGA)
= 12 640x480 16 color graphics (VGA)

Reply 10 of 11, by videogamer555

User metadata
Rank Member
Rank
Member
ripsaw8080 wrote:

They're definitely color modes, but note that they are planar, so what color planes are you enabling/selecting before writing to video memory?

What do you mean enabling? Isn't each plane enabled on a per-pixel basis, based on the data that you feed to them? And don't all the planes have to fit within that 64000 byte window? Or in planar mode does each plane have its own separate segment?