Using the VGA display

The MISE's VGA controller produces 800x600 @ 60Hz SVGA output. The screen is organized as a 768x576 VGA pixel display area which captures and shows the contents of the TRS-80 screen memory, with an improved character set that includes lower case and full descenders (g, p, etc.) and punctuation that extends above and below the alphanumeric character baseline. A border area of 12 VGA pixels top and bottom, and 16 pixels left and right, surrounds the TRS-80 display. The Model I problem of small, horizontal black lines appearing briefly on the monitor while accessing the screen memory has been eliminated.

Note that using the MISE with a wide-screen (16:9 aspect ratio) VGA monitor may cause the video to be stretched horizontally, appearing differently than it would on an original Model I CRT monitor. However, most such monitors have a mode for displaying a 4:3 image in its original format.


Lowercase Letters

Support for lowercase letters is limited for Model I keyboard units without lowercase modification. This is because the 7-bit display memory in the keyboard doesn't store bit 6 of character codes without such a mod. Instead, the generated bit 6 is set only when both bits 5 and 7 are 0. This has the effect of changing lowercase letters to digits and punctuation on the original Model I video monitor.

MISE stores all eight bits of characters written to video memory. Reads of video memory come from the Model I keyboard, and will therefore vary depending on whether a lowercase mod is installed. While MISE is capable of displaying lowercase characters on VGA whether or not a lowercase mod is installed, it's unlikely that any existing software uses this capability since without a mod lowercase letters written to screen memory are converted to digits and punctuation on the original Model I video monitor.

MISE is shipped with LDOS's lowercase driver disabled. In order to enable the lowercase driver, run the LOCASE utility. To disable the driver, run UPCASE. After running either utility, enter the command SYSTEM (SYSGEN) to store the changes to disk.

When the lowercase driver is enabled, caps lock is on by default. This is consistent with what you'll see on the Model I CRT monitor, and is meant to provide maximum compatibility with non-lowercase systems. You can type <SHIFT>0 (zero) to switch caps lock mode off or back on. LDOS also provides an advanced keyboard driver with additional features:

	SET *KI KI

This driver allows entry of nearly all 256 possible binary character codes. See the LDOS manual for details. You can SYSTEM (SYSGEN) to save the driver setup to disk so that it will be reloaded on every boot, or alternately you can set up KI/DVR in your AUTOEXEC/JCL script. To disable this driver,

	RESET *KI

and then SYSTEM (SYSGEN) again. Note (using the MEMORY command) that this does not remove the KI/DVR driver code from high memory; it just sets the current keyboard driver to the LDOS default. If you wish to remove the driver from high memory,

	COPY CONFORIG/SYS.CCC:0 CONFIG/SYS:0

then reboot, reload any other high-memory drivers you had installed before, then SYSTEM (SYSGEN) again.

See the manuals page for the LDOS manual, which describes KI/DVR in detail.


Changing Colors

After powerup or reset, MISE's VGA controller defaults to white characters on a black background with a black border. The easiest way to change these colors is with the SETCOLOR/CMD utility:

	SETCOLOR (FOREGROUND="color",BACKGROUND="color",BORDER="color")

See the table below for the color names, which can be abbreviated to three or more letters. Any color specification that is omitted is not changed.

FOREGROUND can be abbreviated as FORE or FG. BACKGROUND can be abbreviated as BACK or BG. BORDER can be abbreviated as BORD or BD.

The colors can also be changed by accessing two I/O ports:

	Port 0xF1 (R/W):
		 Bit  7  - Use border color
		Bits 6:4 - Background color
		Bits 2:0 - Foreground color
				 
	Port 0xF2 (R/W):
		Bits 2:0 - Border color
Setting a border color in port 0xF2 does not immediately change the screen's border color. Setting bit 7 in port 0xF1 causes the border color to take effect. This allows all three colors to be changed simultaneously. Writing port 0xF1 with bit 7 cleared sets the border color the same as the background color. This eliminates the need to write to port 0xF2 if you want the border and background colors to be the same. The following table shows the values to use for each color:

Color Foreground Background Border
White077
Yellow166
Magenta255
Red344
Cyan433
Green522
Blue611
Black700

A BASIC program, COLORS/BAS is included which cycles through all the foreground and background color combinations.


80-Column Mode

Note: 80-column display mode is only available in MISE units shipped with or updated to FPGA firmware dated June 8, 2015 or later. 48KB memory is required.

The MISE's VGA output is capable of displaying characters as an 80x25 array instead of the native TRS-80's 64 columns by 16 lines.

To enter 80-column mode:

	SET *DO C80

To exit 80-column mode:

	DO C64

which runs the commands RESET *DO and OUT 0XF0 0. See the description of register 0XF0 below. Note that leaving 80-column mode does not remove the driver from memory.

This mode was primarily developed to enhance the usefulness of the Telnet client. Many LDOS commands assume 64 columns, and their output is not readable in 80-column mode. Such commands include DIR, FREE and HELP. Some BASIC features like PRINT @ do not work in 80-column mode.

The 80-column driver, C80/DVR, installs itself as three drivers starting at a fixed memory location, &HE7F7, as can be seen using the MEMORY command:

The set of 127 display characters does not include six-cell graphics like native TRS-80. To see the entire character set, enter this BASIC program:

	10 CLS
	20 FOR X = 0 to 127 : POKE &HE800+X, X : NEXT
	30 GOTO 30

Do not save your configuration using SYSTEM (SYGEN) while the 80-column driver is in memory. If you mistakenly do so, you will not be able to see the LDOS prompt after rebooting if 80-column mode was active at the time. Blindly enter DO C64 to get your prompt back, then restore the original driver configuration as described regarding KI/DVR above.


VGA Test Mode and Interrupt

The VGA controller contains a third register with some additional functions:

	Port 0xF0 (R/W):
		 Bit  7  - 80-column mode, see above
		 Bit  5  - VGA test mode
		 Bit  4  - Vertical blanking status (read only)
		 Bit  1  - Interrupt status/clear
		 Bit  0  - Interrupt enable

VGA Test Mode

Setting bit 5 in port 0xF0 causes the VGA controller to enter a test mode in which foreground and background colors on the display are set to a specific test pattern. The utility program VGATEST/CMD enters this test mode with a repeating pattern of all 256 characters shown. Hit <BREAK> to exit VGATEST.

Vertical Blanking Interrupt

A vertical blanking interrupt and status bit allow applications to restrict their screen updates to times when the display isn't being drawn. The actual VGA vertical blanking duration is 739.2 microseconds. However, the interrupt and status bit are asserted sooner--when the bottom border region is reached--providing an additional 316.8 microseconds at both the bottom and the top of the screen during which CPU writes to screen memory will not be seen.

Before enabling the vertical blanking interrupt by setting bit 0, you must set up an interrupt service routine. Since the vertical blanking interrupt appears as bit 4 in the Interrupt Status Register at memory address 37E0H, the interrupt vector should be placed at address 4055H. The service routine must clear bit 1 in port 0xF0 to reset the interrupt.

Instead of using the interrupt, bit 4 of the register can be polled to determine when vertical blanking is in effect.


High Resolution Display

The VGA controller emulates the vintage PCG-80 and 80-Grafix devices for the Model I, which provided high-resolution graphics (384x192 pixels) by using programmable character sets. For both devices, the characters are programmed by entering special modes that capture writes to screen memory, 3C00H-3FFFH. Programming is done in banks of 64 characters at a time. The first 16 bytes of screen memory correspond to the first character, the second 16 bytes to the second character, and so on. Only the first 12 bytes of each character's screen memory are actually used, corresponding to the 12 vertical rows of TRS-80 pixels in a character. Bits 6:1 of each byte correspond to the horizontal pixels in a row, with bit 6 leftmost and bit 1 rightmost.

Orcim Systems PCG-80 Mode

Up to the entire 256 characters can be programmed, and displayed in 128-character banks.
	Port 0xFE (WO)
		 Bit  7  - Display programmable characters 128-255 (if 0, display normal TRS-80 characters 128-255)
		 Bit  6  - Enter programming mode
		 Bit  5  - PCG operation
		 Bit  3  - Display programmable characters 0-127 (if 0, display normal TRS-80 characters 0-127)
		Bits 1:0 - Programming bank select

Writes to this register have no effect on PCG-80 emulation unless bit 5 is set.

Programma International 80-Grafix Mode

Up to 64 characters can be programmed, and displayed in a single bank.
	Port 0xFF (WO)
		 Bit  7  - Display programmable characters 128-191 (if 0, display normal TRS-80 characters 128-191)
		 Bit  6  - Enter programming mode
		 Bit  5  - 80-Grafix operation
		 Bit  3  - 32 characters per line "wide" display mode

Writes to bits 7:6 of this register have no effect on 80-Grafix emulation unless bit 5 is set. This I/O port is shared with the control register inside the Model I keyboard unit, which controls the cassette recorder and "wide" character display mode on the regular TRS-80 monitor.


Back to the main page