Added CGA information

This commit is contained in:
Jeff Parsons 2016-03-21 15:50:39 -07:00
commit 496f9ce31a
5 changed files with 133 additions and 12 deletions

View file

@ -13,12 +13,13 @@ configuration file. See one of the following video adapters for examples of ho
PCjs supports the following IBM PC video adapters:
* Monochrome Display Adapter (MDA)
* Color Graphics Adapter (CGA)
* [Color Graphics Adapter (CGA)](ibm/cga/)
* [Enhanced Graphics Adapter (EGA)](ibm/ega/)
* [Video Graphics Array (VGA)](ibm/vga/)
More detailed information is available for the following IBM-compatible video adapters:
* [CDP CGA](/devices/pc/video/cdp/cga/)
* [ATI VGA](/devices/pc/video/ati/vga/)
* [COMPAQ EGA](/devices/pc/video/compaq/ega/)
* [COMPAQ VGA](/devices/pc/video/compaq/vga/)

View file

@ -0,0 +1,52 @@
---
layout: page
title: "Columbia Data Products Color Graphics Adapter (CGA)"
permalink: /devices/pc/video/cdp/cga/
---
Columbia Data Products Color Graphics Adapter (CGA)
---
We don't have a Columbia Data Products CGA card, so we cannot say to what extent it may differ from
an IBM CGA card (if at all). All we have is what's believed to be a copy of their CGA character ROM,
and it is *identical* the CGA portion of the [IBM CGA](/devices/pc/video/ibm/cga/) character ROM.
### Columbia Data Products CGA Configurations
The easiest way for a machine to include an CGA *[Video](/docs/pcjs/video/)* component in its XML configuration file
is to reference the project's predefined CGA configuration file, using the *ref* attribute; eg:
<video ref="/devices/pc/video/cdp/cga/cdp-cga.xml"/>
The referenced XML file automatically defines visual elements (eg, dimensions of the display window and other
visual indicators), display behaviors (eg, touchscreen support, mouse pointer locking), and the character ROM to load.
Here's what *cdp-cga.xml* currently looks like:
<video id="videoCGA" model="cga" screenwidth="960" screenheight="480" scale="true" charset="/devices/pc/video/cdp/cga/MPC_VID-1.0.json" pos="center" padding="8px">
<menu>
<title>Color Display</title>
<control type="container" pos="right">
<control type="led" label="Caps" binding="caps-lock" padleft="8px"/>
<control type="led" label="Num" binding="num-lock" padleft="8px"/>
<control type="led" label="Scroll" binding="scroll-lock" padleft="8px"/>
</control>
</menu>
</video>
### Columbia Data Products CGA Character ROM
There is only one known Columbia Data Products CGA Character ROM ([MDP_VID-10.json](MDP_VID-1.0.json)), and it is
*identical* to the CGA portion of the [IBM CGA](/devices/pc/video/ibm/cga/) character ROM.
For reference, here are the first 0x80 bytes at offset 0x0000 from this ROM, which contain the font data for the first
16 8x8 characters:
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0xA5,0x81,0xBD,0x99,0x81,0x7E, // 0x00000000 ........~......~
0x7E,0xFF,0xDB,0xFF,0xC3,0xE7,0xFF,0x7E,0x6C,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00, // 0x00000010 ~......~l...|8..
0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x38,0x7C,0x38,0xFE,0xFE,0xD6,0x10,0x38, // 0x00000020 .8|.|8..8|8....8
0x10,0x10,0x38,0x7C,0xFE,0x7C,0x10,0x38,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00, // 0x00000030 ..8|.|.8........
0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00, // 0x00000040 ..........fBBf..
0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0x0F,0x07,0x0F,0x7D,0xCC,0xCC,0xCC,0x78, // 0x00000050 ...........}...x
0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x3F,0x33,0x3F,0x30,0x30,0x70,0xF0,0xE0, // 0x00000060 .fff..~.?3?00p..
0x7F,0x63,0x7F,0x63,0x63,0x67,0xE6,0xC0,0x18,0xDB,0x3C,0xE7,0xE7,0x3C,0xDB,0x18, // 0x00000070 .c.ccg..........

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<video id="videoCGA" model="cga" screenwidth="960" screenheight="480" scale="true" charset="/devices/pc/video/cdp/cga/MPC_VID-1.0.json" pos="center" padding="8px">
<menu>
<title>Columbia Data Products Color Display</title>
<title>Color Display</title>
<control type="container" pos="right">
<control type="led" label="Caps" binding="caps-lock" padleft="8px"/>
<control type="led" label="Num" binding="num-lock" padleft="8px"/>

View file

@ -0,0 +1,62 @@
---
layout: page
title: "IBM Color Graphics Adapter (CGA)"
permalink: /devices/pc/video/ibm/cga/
---
IBM Color Graphics Adapter (CGA)
---
### IBM CGA Configurations
The easiest way for a machine to include an CGA *[Video](/docs/pcjs/video/)* component in its XML configuration file
is to reference one of the project's predefined CGA configuration files, using the *ref* attribute; eg:
<video ref="/devices/pc/video/ibm/cga/ibm-cga.xml"/>
The referenced XML file automatically defines visual elements (eg, dimensions of the display window and other
visual indicators), display behaviors (eg, touchscreen support, mouse pointer locking), and the character ROM to load.
Here's what *ibm-cga.xml* currently looks like:
<video id="videoCGA" screenwidth="960" screenheight="480" scale="true" charset="/devices/pc/video/ibm/cga/ibm-cga.json" pos="center" padding="8px">
<menu>
<title>Color Display</title>
<control type="container" pos="right">
<control type="led" label="Caps" binding="caps-lock" padleft="8px"/>
<control type="led" label="Num" binding="num-lock" padleft="8px"/>
<control type="led" label="Scroll" binding="scroll-lock" padleft="8px"/>
</control>
</menu>
</video>
The following IBM CGA configuration files are currently available:
- [ibm-cga.xml](ibm-cga.xml)
- [ibm-cga-dual.xml](ibm-cga-dual.xml)
- [ibm-cga-keygrid.xml](ibm-cga-keygrid.xml)
- [ibm-cga-lock.xml](ibm-cga-lock.xml)
### IBM CGA Character ROM
There is only one known CGA Character ROM ([ibm-cga.json](ibm-cga.json)), and it is identical to the MDA Character ROM,
because the ROM contains both the 8x14 MDA and 8x8 CGA fonts.
As documented in [Video.doneLoad()](/modules/pcjs/lib/video.js):
[T]here are TWO CGA fonts in the ROM: a thin 5x7 "single dot" font located at offset 0x1000, and a thick 7x7
"double dot" font at offset 0x1800. The latter is the default font, unless overridden by a jumper setting on
the CGA card, so it is our default CGA font as well (although someday we may provide a virtual jumper setting
that allows you to select the thinner font).
For reference, here are the first 0x80 bytes at offset 0x1800 from this ROM, which contain the font data for the first
16 8x8 characters:
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0xA5,0x81,0xBD,0x99,0x81,0x7E, // 0x00001800 ........~......~
0x7E,0xFF,0xDB,0xFF,0xC3,0xE7,0xFF,0x7E,0x6C,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00, // 0x00001810 ~......~l...|8..
0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x38,0x7C,0x38,0xFE,0xFE,0xD6,0x10,0x38, // 0x00001820 .8|.|8..8|8....8
0x10,0x10,0x38,0x7C,0xFE,0x7C,0x10,0x38,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00, // 0x00001830 ..8|.|.8........
0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00, // 0x00001840 ..........fBBf..
0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0x0F,0x07,0x0F,0x7D,0xCC,0xCC,0xCC,0x78, // 0x00001850 ...........}...x
0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x3F,0x33,0x3F,0x30,0x30,0x70,0xF0,0xE0, // 0x00001860 .fff..~.?3?00p..
0x7F,0x63,0x7F,0x63,0x63,0x67,0xE6,0xC0,0x18,0xDB,0x3C,0xE7,0xE7,0x3C,0xDB,0x18, // 0x00001870 .c.ccg..........

View file

@ -57,6 +57,11 @@ if (NODE) {
* monitor: none|tv|color|mono|ega|vga (if no sw1 value provided, default is "ega" for 5170, "mono" otherwise)
* rtcDate: optional RTC date/time (in GMT) to use on reset; use the ISO 8601 format; eg: "2014-10-01T08:00:00"
*
* As support for IBM-compatible machines grows, we should refrain from adding new model strings (eg, "deskpro386")
* and make the individual ChipSet components more configurable; eg:
*
* pit1: set to 0x48 to enable PIT1 at base port 0x48 (as used by DESKPRO386); default is undefined
*
* The conventions used for the sw1 and sw2 strings are that the left-most character represents DIP switch [1],
* the right-most character represents DIP switch [8], and "1" means the DIP switch is ON and "0" means it is OFF.
*
@ -154,8 +159,8 @@ function ChipSet(parmsChipSet)
var model = parmsChipSet['model'];
/*
* this.model is a numeric version of the 'model' string; when comparing this.model to assorted
* model values, you should generally compare (this.model|0) to the target value, which truncates it.
* this.model is a numeric version of the 'model' string; when comparing this.model to standard IBM
* model numbers, you should generally compare (this.model|0) to the target value, which truncates it.
*
if (model && !ChipSet.MODELS[model]) {
Component.notice("Unrecognized ChipSet model: " + model);
@ -279,23 +284,26 @@ Component.subclass(ChipSet);
ChipSet.MODEL_5150 = 5150; // used in reference to the 1st 5150 BIOS, dated Apr 24, 1981
ChipSet.MODEL_5150_REV2 = 5150.2; // used in reference to the 2nd 5150 BIOS, dated Oct 19, 1981
ChipSet.MODEL_5150_REV3 = 5150.3; // used in reference to the 3rd 5150 BIOS, dated Oct 27, 1982
ChipSet.MODEL_5150_OTHER = 5150.9;
ChipSet.MODEL_5160 = 5160; // used in reference to the 1st 5160 BIOS, dated Nov 08, 1982
ChipSet.MODEL_5160_REV2 = 5160.2; // used in reference to the 1st 5160 BIOS, dated Jan 10, 1986
ChipSet.MODEL_5160_REV3 = 5160.3; // used in reference to the 1st 5160 BIOS, dated May 09, 1986
ChipSet.MODEL_5160_OTHER = 5160.9;
ChipSet.MODEL_5170 = 5170; // used in reference to the 1st 5170 BIOS, dated Jan 10, 1984
ChipSet.MODEL_5170_REV2 = 5170.2; // used in reference to the 2nd 5170 BIOS, dated Jun 10, 1985
ChipSet.MODEL_5170_REV3 = 5170.3; // used in reference to the 3rd 5170 BIOS, dated Nov 15, 1985
ChipSet.MODEL_5170_OTHER = 5170.9;
/*
* Assorted non-IBM models (we don't put "IBM" in the IBM models, but non-IBM models should include the company name).
*/
ChipSet.MODEL_ATT_6300 = 5150.800; // AT&T Personal Computer 6300/Olivetti M24 ("COPYRIGHT (C) OLIVETTI 1984","04/03/86",v1.43)
ChipSet.MODEL_CDP_MPC1600 = 5150.810; // Columbia Data Products MPC 1600 ("Copyright Columbia Data Products 1983, ROM/BIOS Ver 4.34")
ChipSet.MODEL_ZENITH_Z150 = 5150.820; // Zenith Data Systems Z-150 ("08/11/88 (C)ZDS CORP")
ChipSet.MODEL_COMPAQ_PORTABLE = 5150.900; // COMPAQ Portable (COMPAQ's first PC)
ChipSet.MODEL_COMPAQ_DESKPRO386 = 5180; // COMPAQ DeskPro 386 (COMPAQ's first 80386-based PC); should be > MODEL_5170
ChipSet.MODEL_ATT_6300 = ChipSet.MODEL_5150_OTHER; // AT&T Personal Computer 6300/Olivetti M24 ("COPYRIGHT (C) OLIVETTI 1984","04/03/86",v1.43)
ChipSet.MODEL_CDP_MPC1600 = ChipSet.MODEL_5150_OTHER; // Columbia Data Products MPC 1600 ("Copyright Columbia Data Products 1983, ROM/BIOS Ver 4.34")
ChipSet.MODEL_ZENITH_Z150 = ChipSet.MODEL_5150_OTHER; // Zenith Data Systems Z-150 ("08/11/88 (C)ZDS CORP")
ChipSet.MODEL_COMPAQ_PORTABLE = ChipSet.MODEL_5150_OTHER; // COMPAQ Portable (COMPAQ's first PC)
ChipSet.MODEL_COMPAQ_DESKPRO386 = 5180; // COMPAQ DeskPro 386 (COMPAQ's first 80386-based PC); should be > MODEL_5170
/*
* Last but not least, a complete list of supported model strings, and corresponding internal model numbers.
@ -304,9 +312,7 @@ ChipSet.MODELS = {
"5150": ChipSet.MODEL_5150,
"5160": ChipSet.MODEL_5160,
"5170": ChipSet.MODEL_5170,
"att6300": ChipSet.MODEL_ATT_6300,
"mpc1600": ChipSet.MODEL_CDP_MPC1600,
"z150": ChipSet.MODEL_ZENITH_Z150,
"other": ChipSet.MODEL_5150_OTHER,
"deskpro386": ChipSet.MODEL_COMPAQ_DESKPRO386
};