From c8f5357689fd55ec9a8235923202eb2110e760e8 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Wed, 27 Jul 2016 12:03:12 -0700 Subject: [PATCH] More VT100 groundwork --- devices/pc8080/machine/README.md | 3 +- devices/pc8080/machine/vt100/README.md | 59 ++++++++++++++++++++++++ devices/pc8080/machine/vt100/machine.xml | 20 ++++++++ devices/pc8080/rom/README.md | 2 +- devices/pc8080/rom/vt100/README.md | 2 +- modules/pc8080/lib/video.js | 28 +++++++---- modules/shared/templates/components.xsl | 14 +++++- pubs/README.md | 8 +++- pubs/c1p/README.md | 11 +++++ pubs/dec/README.md | 10 ++++ pubs/dec/vt100/README.md | 19 ++++++++ 11 files changed, 162 insertions(+), 14 deletions(-) create mode 100644 devices/pc8080/machine/vt100/README.md create mode 100644 devices/pc8080/machine/vt100/machine.xml create mode 100644 pubs/c1p/README.md create mode 100644 pubs/dec/README.md create mode 100644 pubs/dec/vt100/README.md diff --git a/devices/pc8080/machine/README.md b/devices/pc8080/machine/README.md index f7e9a1079..1ad417684 100644 --- a/devices/pc8080/machine/README.md +++ b/devices/pc8080/machine/README.md @@ -9,5 +9,6 @@ PC8080 Machine Configurations The following 8080-based machines are currently available: +* [8080 Exerciser](exerciser/) * [Space Invaders (1978)](invaders/) -* [8080 Exerciser Test Machine](exerciser/) +* [DEC VT100 Terminal](vt100/) diff --git a/devices/pc8080/machine/vt100/README.md b/devices/pc8080/machine/vt100/README.md new file mode 100644 index 000000000..4da50c242 --- /dev/null +++ b/devices/pc8080/machine/vt100/README.md @@ -0,0 +1,59 @@ +--- +layout: page +title: VT100 Terminal +permalink: /devices/pc8080/machine/vt100/ +machines: + - type: pc8080 + id: vt100 + debugger: true +--- + +VT100 Terminal +-------------- + +This is where we'll be testing another 8080-based machine: a VT100 Terminal. Unlike other VT100 emulations, +this will simulate a VT100 by running the terminal's original firmware inside the [PC8080](/modules/pc8080/) CPU emulator. + +As described in the [Technical Manual (July 1982)](http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/terminal/vt100/EK-VT100-TM-003_VT100_Technical_Manual_Jul82.pdf), +p. 4-15, 8Kb (0x2000) of ROM is located at 0x0000, and 3Kb (0x0C00) of RAM immediately follows it at 0x2000. + +[vt100romhax](http://vt100romhax.tumblr.com/post/90697428973/the-vt100-memory-map-and-8080-disassembly) +(aka [phooky](https://github.com/phooky)) further explains VT100 memory usage: + + Start End Size Description + 0x0000 0x1fff 8K Basic ROM + 0x2000 0x2012 18B Blank lines for refresh (6 x 3B) + 0x2012 0x204f 61B Stack area (grows down from 0x204e) + 0x204f 0x22d0 641B Scratch Pad/Setup Area(?) + 0x22d0 0x2c00 2352B Screen RAM + +Normally, the PC8080 Video component allocates its own video buffer, based on the specified buffer address +(*bufferAddr*) and other dimensions (eg, *bufferCols* and *bufferRows*), but the VT100 is a little unusual: +it has a custom video processor that uses DMA to request character data from any region of RAM, one line at a time. +It always defaults to address 0x2000 for the first line of character data, but each line terminates with 3 bytes +containing line attributes and the address of the next line, so the location of subsequent lines will vary, +depending on the following line attributes: + +* Single-width characters (80 or 132 columns) +* Double-width characters (40 or 66 columns) + +In addition to single vs. double width, line attributes can also specify double height (along with whether the +top half or bottom half of the character should be displayed). + +The VT100 screen displays 800 dots per horizontal scan, and a total of 240 horizontal scans, +so for optimum scaling, we define our own screen using multiples of those dimensions (currently 1600x480), +and by default, it uses a 10x10 character cell, so the default display dimensions are 80 columns by 24 rows. + +In light of the above, the [machine XML file](machine.xml) must set the Video component's *bufferRAM* property +to "true", indicating that existing RAM should be used, and a new property, *bufferFormat* must be set to "vt100", +enabling support for the VT100's line data format; eg: + + +