B800 Text

From ModdingWiki
Jump to: navigation, search
B800 Text
B800 Text.png
Format typeImage
HardwareCGA, EGA, VGA
Colour depth4-bit
Minimum size (pixels)80×25 cells
Maximum size (pixels)80×25 cells
PaletteUnknown
Plane count2
Transparent pixels?No
Hitmap pixels?No
GamesUnknown


B800 Text is a text-mode screen dump, and under x86 real mode (such as used by DOS) can be copied byte for byte into video memory starting at B800:0000, causing the data to appear on the screen when the video card is in text mode. It is most often used to display the final text screen after quitting a game, with the DOS prompt appearing on the last line once the game has terminated.

File format

Full CGA 16-color palette
0 — black
#000000
8 — (dark) gray
#555555
1 — blue
#0000AA
9 — bright blue
#5555FF
2 — green
#00AA00
10 — bright green
#55FF55
3 — cyan
#00AAAA
11 — bright cyan
#55FFFF
4 — red
#AA0000
12 — bright red
#FF5555
5 — magenta
#AA00AA
13 — bright magenta
#FF55FF
6 — brown
#AA5500
14 — yellow
#FFFF55
7 — white (light gray)
#AAAAAA
15 — bright white
#FFFFFF

Since the file format is just a direct dump of video memory, this would more accurately be termed the "CGA text mode format." The file is almost always 4000 bytes long, as this is the exact amount of space required to store a standard 80x25 text screen (80 columns * 25 rows * two bytes per cell == 4000 bytes.)

The data is arranged in cells, with each cell being two bytes long (one byte for the ASCII character to display, followed by an attribute byte indicating the colour of the character.) The data appears starting at the top-left of the screen (1,1) and works its way across to the right (80,1) and then wraps down to the next line (1,2).

The attribute byte contains two nybbles of data. The most significant four bits are the background colour, and the least significant bits are the foreground colour. This means the background and foreground colours can each be assigned a colour value between zero (black) and 15 (white) - see the table on the right for the full list of colours.

The background colour is slightly different however. By default, the intensity bit is used to cause the text to flash instead. This means setting the background colour to 14 won't produce a bright-yellow background, but instead will produce a normal yellow background (colour #6) with blinking text. The CGA standard includes a toggle bit that allows this flashing to be switched off, thus allowing the full 16 background colours to be used (without any flashing of course.)

Example

As a demonstration, these bytes:

48 1E  65 2E  6C 3E  6C 4E  6F 5E        H.e.l.l.o.

Would appear like this:

 Hello

Tools

The following tools are known to work with this format:

  • TheDraw - DOS-based text animation/screen editor, which does support B800 text and many other DOS formats. TheDraw also runs under DOSBox.
  • TextPaint - DOS-based text screen editor, which unfortunately doesn't support B800 text but is still very powerful, and useful enough to warrant a mention.
  • Shmansi - Another DOS-based text screen editor, which can import and export B800 text.
  • ENDOOMER- Yet another DOS-based text screen editor, which can import and export B800 text, and can be used with the mouse as well.

See also