---
layout: page
title: DEC VT100 Terminal with Debugger
permalink: /devices/pc8080/machine/vt100/debugger/
machines:
- id: vt100
type: pc8080
debugger: true
---
DEC VT100 Terminal with Debugger
--------------------------------
The [PC8080](/modules/pc8080/) machine below is configured to simulate a [VT100 Terminal](/devices/pc8080/machine/vt100/)
with a Control Panel and Debugger. When you press the "Run" button, it will start running the original
[VT100 Firmware](/devices/pc8080/rom/vt100/) inside the [PC8080](/modules/pc8080/) CPU emulator.
Information about [VT100 Keys](#vt100-keys) and assorted [Hardware Notes](#vt100-memory-usage) are provided below,
followed by some [VT100 Technical Manual](/pubs/dec/vt100/) excerpts regarding the [VT100 Initialization Process](#vt100-initialization-process).
[Non-Debugger Configuration](../) is available, along with demos of [Dual VT100 Terminals](../dual/) and an
[IBM PC AT connected to a VT100](/devices/pcx86/machine/5170/ega/2048kb/rev3/vt100/).
{% include machine.html id="vt100" %}
VT100 Keys
----------
The VT100 KEYMAP table in [keyboard.js](/modules/pc8080/lib/keyboard.js)
maps modern keys to VT100 key addresses, and most of the mappings are 1-1. Function keys are mapped as follows:
- F1: PF1
- F2: PF2
- F3: PF3
- F4: PF4
- F6: BREAK
- F7: LINE FEED
- F8: NO SCROLL
- F9: SET-UP
Factory defaults are shown below in parentheses. Our VT100 configurations use slightly different defaults:
- ONLINE instead of LOCAL
- ANSI ON
### SET-UP Mode Keys
- 0: RESET
- 2: SET/CLEAR TAB
- 3: CLEAR ALL TABS
- 4: ONLINE/LOCAL (LOCAL)
- 5: SET-UP A/B
- 6: TOGGLE FEATURE
- 7: TRANSMIT SPEED (9600)
- 8: RECEIVE SPEED (9600)
- 9: 80/132 COLUMNS (80)
- SHIFT-S: Save SET-UP Features
- SHIFT-R: Restore SET-UP Features
To access the SET-UP B screen, press **5**. To change SET-UP B options, move the cursor over the corresponding binary digit
and press **6** to toggle.
### SET-UP B Options
#### Block 1
- 1---: Smooth scroll (ON)
- -1--: Auto-Repeat (ON)
- --1-: Light Screen Background (OFF)
- ---1: Block Cursor (ON)
#### Block 2
- 1---: Margin Bell (OFF)
- -1--: Key-click (ON)
- --1-: ANSI (OFF)
- ---1: Auto-XON/XOFF (ON)
#### Block 3
- 1---: UK Pound Symbol (OFF)
- -1--: Wrap-Around (OFF)
- --1-: New Line (OFF)
- ---1: Interlace (OFF)
#### Block 4
- 1---: Even Parity (OFF)
- -1--: Parity Enable (OFF)
- --1-: 8 Data Bits (ON)
- ---1: 50Hz Power (OFF)
VT100 Memory Usage
------------------
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. The ROM at
0x0000 contains all the VT100's 8080 code. The VT100 also contains a 2Kb character generator ROM, but that ROM is not
addressable by the CPU; it is used directly by the Video Processor.
See [DEC VT100 ROMs](/devices/pc8080/rom/vt100/) for more information about the ROMs.
[vt100romhax](http://vt100romhax.tumblr.com/post/90697428973/the-vt100-memory-map-and-8080-disassembly)
(aka [phooky](https://github.com/phooky) aka Adam Mayer) further explains VT100 memory usage:
Start End Size Description
0x0000 0x1fff 8K Basic ROM
0x2000 0x2012 18 Blank lines for refresh (6 x 3B)
0x2012 0x204f 61 Stack area (grows down from 0x204e)
0x204f 0x22d0 641 Scratch Pad/Setup Area(?)
0x22d0 0x2c00 2352 Screen RAM
Note: 0x22bb through 0x22d0 appear to be unused
In his [Platform Notes](https://github.com/phooky/VT100-Hax/blob/master/Platform%20Notes.md), he further describes
portions of the "Scratch Pad" area:
Start End Size Description
0x2052 0x2054 2 0x2004 during init?
0x2068 0x2069 1 Keys flag buffer
0x206a 0x206e 3 New keys pressed buffer
0x20f6 0x20f8 2 0x22d0 during init?
0x2014 0x2015 1 0xff during init? [Typo or reference to a byte in the Stack area? -JP]
and the "Setup" area:
Start End Size Description
0x217b 22 Answerback message (20chars+2delim)
0x2191 17 Tabs (bit encoding) (first bit always set)
0x21a2 1 80/132 col mode (00 = 80 col, 01 = 132 col)
0x21a3 1 intensity (00 = brightest, 0x1f = dimmest)
0x21a4 1 Mode byte for PUSART
0x21a5 1 Online/local
0x21a6 1 Switches 1
0x21a7 1 Switches 2
0x21a8 1 Switches 3
0x21a9 1 Switches 4
0x21aa 1 Switches 5
0x21ab 1 TX baud rate
0x21ac 1 RX baud rate
0x21ad 1 parity
0x21ae 1 nvr checksum
VT100 I/O Ports
---------------
From p. 4-17 of the Technical Manual:
READ OR WRITE
00H PUSART data bus
01H PUSART command port
WRITE ONLY (Decoded with I/O WR L)
02H Baud rate generator
42H Brightness D/A latch
62H NVR latch
82H Keyboard UART data input
A2H Video processor DC012
C2H Video processor DC011
E2H Graphics port
READ ONLY (Decoded with I/O RD L)
22H Modem buffer
42H Flags buffer
82H Keyboard UART data output
The PC8080 ChipSet component deals with the ER1400's Non-Volatile RAM (NVR) ports, the Flags buffer, and the
DC011 and DC012 circuits, while the Keyboard component deals with the Keyboard UART.
You might wonder why the PC8080 Video component doesn't manage the DC011 and DC012. In fact, the above labels are misleading.
If you look at the Functional Diagram on p. 4-53 of the Technical Manual, you'll see that DC011 and DC012 are really
peripheral components providing inputs to the Video Processor. Moreover, they are not exclusive to the Video Processor.
For example, the LBA7 output of the DC011 is also used to clock the NVR chip.
In most respects, the VT100 Technical Manual provides a phenomenal amount of detail.
However, documentation for some of the above ports is almost non-existent. It's only thanks to
[third parties](https://github.com/phooky/VT100-Hax/blob/master/Platform%20Notes.md) that we have, for example, the following
information about the Flags buffer (port 0x42):
Bit Active? Description
7 H KBD Transmit Buffer Empty
6 H NVR CLOCK, driven by LBA7 (line buffer address)
5 H NVR DATA
4 L EVEN FIELD (comes out of the video timing generator)
3 H OPTION PRESENT (terminal output option???)
2 L GRAPHICS FLAG (is VT125 graphics card present)
1 L ADVANCED VIDEO (is AVO present)
0 H XMIT FLAG
VT100 Video Processor
---------------------
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 the attributes and address of the next line, so the location of subsequent lines will vary, depending
on the type of line:
- Single-wide characters (80 or 132 columns)
- Double-wide characters (40 or 66 columns)
In addition to single-wide vs. double-wide, line attributes can also specify double-high, along with whether the
top or bottom halves of the double-high characters should be displayed, because double-high always implies double-wide
(ie, there is no support for double-high, single-wide characters).
Consequently, a VT100 [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: