TRS-80 Model 4


The TRS-80 Model 4 is the last Z80-based home computer family by Radio Shack, sold from April 1983 through autumn 1991.

Model 4

introduced the TRS-80 Model 4 in April 1983 as the successor to the TRS-80 Model III. The Model 4 has a faster Z80A 4 MHz CPU, larger video display of 80 columns by 24 rows, bigger keyboard, and can be upgraded to 128KB of RAM. It is compatible with Model III software and CP/M application software.
A diskless Model 4 with 16KB RAM cost $999; with 64KB RAM and one single-sided 180K disk drive it cost $1699; with 64KB RAM and two drives it cost $1999. An upgrade for Model III owners cost $799 and provided a new motherboard and keyboard.
The Model 4's first appearance in the RadioShack catalog stated: "Yes, it looks like a Model III, but it's much much more. Compare the price and features of our amazing new Model 4 to any other computer in its class. You'll find that for power, versatility, and convenience it is a true breakthrough. To add the same features to other computers, you'd have to pay a whole lot more." Commenting on its unexpected longevity as a RadioShack product and object of aftermarket support by third-party companies, in May 1987 80 Micro magazine remarked, "Even when it was introduced in 1983, the Model 4 was seen as a last gasp for the TRS-80 line."

Hardware and Software

The computer has the same all-in-one cabinet as the Model III, adopting a more contemporary-looking beige color scheme instead of the black and gray used on the Models I/III. The Model 4's case also switched from spray-painted translucent plastic to molded plastic, ensuring that the coloring is not vulnerable to peeling or rubbing.
The Model 4 uses WD1770/1773 floppy controllers instead of the WD1791, which allows for a larger gap between the index hole and first sector; later releases of TRSDOS and LDOS were modified for compatibility with the controller.
The Model 4 shipped with TRSDOS 6, identical to Logical Systems's LDOS 6.00 third-party operating system. When the Model 4 boots into TRSDOS 6, the video display switches into 80×24 mode and the entire 64KB address space is mapped as RAM.
When booted from a Model III operating system disk, the Model 4 enters 64×16 video mode and maps Model III ROMs from address zero, making it capable of running Model III software. Model 4 features can be accessed in Model III mode by manipulating the computer's hardware ports. The LDOS 5.3 update supports SYSTEM to enable the Model 4's 4 MHz clock speed. Misosys Inc. sold a Model 4 Hardware Interface Kit which enables the extra keys on the Model 4 keyboard, and in a 128 KB Model 4, the banked memory. Another company called Intellitech sold a program called Supermod4 that allows Model III programs running on a Model 4 to activate the 4 megahertz CPU clock, larger video display, the speaker and the function keys. In August 1985 80 Micro magazine published a DoubleDuty-like task switching program that activates the external RAM banks on an 128 KB Model 4 from within Model III mode.
The Model 4 can run CP/M without modification, unlike the Model I and III. Digital Research produced a version of CP/M 3.0 for the Model 4, but it is buggy and actually provides a smaller Transient Program Area than the non-banked CP/M 2.2. Montezuma Micro sold a version of CP/M 2.2 that was customized for the Model 4's hardware: banked RAM, reverse video and assignable codes for the function keys. It has a utility for reading and writing CP/M disk formats of many other brands of computer. Montezuma sold a terminate-stay-resident program they called Monte's Window, which provided functionality similar to Borland Sidekick. Its code resided entirely in the banked RAM of a 128K Model 4; no user memory was occupied.
One notable program available only for the Model 4 was marketed by Radio Shack as DoubleDuty. This is one of the first task-switching programs available for any microcomputer. It uses the upper 64KB of a 128KB machine to keep resident a second TRSDOS application, which can be switched instantly with another application loaded into the main 64KB. A third partition is available for TRSDOS library commands, such as DIR. DoubleDuty first appeared in Radio Shack's 1985 Computer Catalog, the same year that IBM's Topview, Apple's Switcher, and Quarterdeck's DESQview first became available. DoubleDuty was written by Randy Cook, the author of the first version of TRSDOS for the original Model I.
The Model 4's memory mapping and OS more closely resemble the TRS-80 Model II than it does the Model III. Like the Model II, there is no ROM-based OS and all OS software was RAM-resident and loaded from disk at bootup. There is only a small boot loader ROM which checks for the presence of a Model 4 OS disk and if one is not detected, it defaults to Model III mode. Also like the Model II, the OS uses vectored API calls instead of absolute addresses, and software developers were encouraged to use the API calls rather than low-level hardware access to ensure compatibility with future iterations of TRSDOS 6.
Rather than accessing the memory-mapped keyboard and video directly as on the Models I and III, TRSDOS SVCs are used. This method permits I/O redirection over all the computer's devices, including the disk drives. This makes possible, for example, to "print" a document to a disk file so it can be printed at a later time. Another frequent use of I/O redirection is redirecting video output to the printer for permanent hardcopy of a program run. TRSDOS supplies the,, and commands to enable these capabilities. This method also ensures consistent communication between memory resident modules attached to the OS's logical devices. Some applications programmers, however, circumvent this device-independent approach by physically accessing the computer hardware, such as Radio Shack's SuperScripsit word processor; its programmers insisted on having the CTL255 routine built into the keyboard driver expressly for this purpose. Another offender was Anitek Software's Lescript. These two applications ignore any filter programs attached to the keyboard device, depriving the user of some terminate and stay resident programs, such as Misosys' Sidekick-like Pro-WAM Window Application Manager, as well as the TRSDOS KSM/FLT keystroke multiplier macro facility.
The disk drives are identical to the Model III, consisting of one or two single-sided full-height 5.25" drives, providing 180KB of storage with TRSDOS. An additional two drives can connect via the external floppy port. Any floppy drive with the Shugart-style 34-pin interface can be used; thus it is possible to upgrade a Model 4 to use double-sided, 80 track, or even 3.5" 720 KB floppies. Drive select is implemented via the card edge connectors for the drives; the connector for each drive bay has certain conductors missing that identify the lower drive as system drive zero, and the upper drive as system drive one. Thus the drives do not have drive select jumpers, and are identical. This makes the drives in a dual drive Model 4 interchangeable. Replacement with third-party double-sided drives requires use of a new drive cable and connectors with all conductors present; in this case drive select is made with jumpers on the drives.
External hard disks were available using the computer's 50 pin expansion card-edge, which also permit other external hardware requiring direct access to the Z80 buses. These include Atari style joystick adapters or the line of data acquisition devices marketed by Alpha Products. A parallel printer can be added using another card-edge connector provided for this purpose. An RS-232 serial port was optional on the original versions of the Model 4.
The baseline Model 4 uses a 16kx1 DRAM known as the 8040517. This chip, also used in 16k TRS-80 CoCo 2s, is functionally identical to a 4116 DRAM, but only uses +5V power instead of the 4116's tri-voltage power. 64k and 128k models use standard 4164 DRAMs. Unlike previous machines, the RS-232 port is standard equipment rather than an extra cost option. The RS-232 and printer ports are also moved to the back instead of the underside of the computer, making them more easily accessible.
The Model 4 was announced in the same press release as was the TRS-80 Model 100 laptop. The two computers were often marketed by Tandy/Radio Shack as a complementary pair. Model 100 cassette tapes are readable on the Model 4 with its cassette interface and a TRSDOS 6 utility called TAPE100/CMD, which store Model 100 programs and data as TRSDOS disk files. Programs and files can be transferred back and forth via an RS-232 serial null modem cable, or over a telephone line using a modem on the Model 4 end. Both the Model 4 and the Model 100 came with terminal software as a built-in feature.
Early versions of the Model 4 mainboard were designed to accept a Zilog Z800 16 bit CPU upgrade board to replace the Z80 8 bit CPU but this option was never released. In 1987 H.I. Tech produced an enhanced CPU board, the XLR8er, using the Hitachi HD64180 Z80-compatible processor. It runs with a 6.144 MHz clock rate and adds 256KB of memory that could be used as a RAM disk. When combined with the upper 64KB of Model 4 banked RAM, a ramdisk of up to 384KB can be mounted. Later, software was developed that can access XLR8er RAM as standard TRSDOS 32KB banks through the @BANK supervisor call. This makes the extra memory accessible to standard TRSDOS applications coded to use banked RAM. The Hitachi CPU also executes many Z80 instructions in fewer clock cycles than the Zilog chip; 8Mhz performance was claimed but in reality most software realize a performance improvement of only 25 to 30 percent.
The Model 4 include a sound generator, a first for the TRS-80 line as the Model I/III require the user to output sounds to the cassette port, which is then connected to a stereo amplifier for sound output. However its sound capabilities are extremely limited, with just seven tones that can be produced, ranging from C to G♭ on the musical scale, and there is no E. Each tone had 32 different durations it can be sounded for. TRSDOS includes a filter program,, that beeps the speaker each time a key was pressed, to provide audible feedback for the typist. One Radio Shack spokesman described the Model 4's sound generator as "being intended for business alerts".
TRSDOS 6 Features
TRSDOS 6 provides utilities and filters for the Model 4's new hardware features.
, a print spooler that runs as a background task while other applications are in use, can use the extra 64KB RAM, base 64KB, or disk as its buffer.
, a RAM disk, can use either or both RAM banks, or the base 64KB. The extra 64K can hold TRSDOS, freeing all floppy drives for data diskettes. Installing the system on RAM disk also speeds the computer's operation greatly, as system overlays load from memory rather than from disk. Space on a system Memdisk can be saved by omitting the file SYS0/SYS, which contains the portion of TRSDOS which is resident in RAM once the computer is booted. Users not using an Extended Command Interpreter may also omit SYS13/SYS, which is a dummy file if an ECI is not installed. A command is also provided which specifies overlay modules resident in the main 64KB, permitting more free disk space on the system diskette in drive zero, which also enlarges the free space available on a system Memdisk.
The utility is versatile, if sometimes confusing for beginners because of its many parameters. This is eased somewhat since its parameter structure is the same as that supported by the ectory command, which will show the files that would be selected by. It is especially capable of efficiently backing up diskettes with single-drive Model 4s, prompting the user when to switch disks in the drive. A fast mirror-image copy function is supported when the source and destination diskettes share like formats. This occurs automatically if the disks are alike, but a backup-by-files operation can be forced using the file wildcard character. This has the advantage of defragmenting files that are scattered over the disk's surface in multiple extents. respects the TRSDOS Allocation Flag, which specifies the starting cylinder to be used for file copying. This capability permits the user to advantageously place frequently-accessed files close to the directory cylinder, thus speeding disk I/O and reducing physical wear and tear..
One disadvantage to is the disk space it occupies: two granules, or three kilobytes on a standard floppy disk. The built-in library command resident in SYS6/SYS provides the most frequently used capabilities, and has the advantage of supporting TRSDOS's data redirection capabilities.
A FORMS filter makes tailored printouts possible for applications lacking capability for formatted printing. A keyboard filter, Keystroke Multiplier, lets the user define macro strings to the and keys. A simple machine language debugger resides in SYS5/SYS, and an extended command set for this resides in SYS9/SYS. TRSDOS has an available, which a programmer can insert or patch into a program to invoke the debugger under programmed control. Job Control Language serves as the equivalent to MS-DOS's batch processor. A facility records all TRSDOS commands issued. A capable terminal program, COMM/CMD, services the RS-232 serial port. TRSDOS 6, like previous versions, is supplied with a utility which allows non-programmers to install machine code program modifications.

Video and Keyboard

The video display RAM and keyboard matrix are not memory-mapped as on the previous Models I and III. Rather, whenever a program called functions requiring video RAM to be modified, or the keyboard matrix to be read, TRSDOS executes code that switches out the uppermost three kilobytes from the Z80 address space. This is replaced with the keyboard matrix from the address range F400 - F7FF, and the 2 KB static RAM of video memory from F800 - FFFF. The video display requires only 1920 bytes to render the 80×24 text screen; the remaining memory holds the typeahead buffer and the code that accessed it. While this frees 3 KB of Z80 address space for programs, it is marginally slower than writing directly into video RAM. This banked keyboard/video address space is compatible with the external 32 KB memory banks; it is not necessary to switch in Bank 0, the Z80's upper 32KB of base memory, to access the keyboard or video memory. However, some third-party memory expansion kits do not allow this.
The monitor is significantly dimmer in 80×24 mode than in 64×16, as fewer scan lines draw each character. The video hardware supports characters in reverse video and Model I/III style block graphics. Due to the different screen resolution, the block graphics characters are not of uniform height. The ten vertical pixels in each character cell are divided into three graphic blocks, the upper two of which were four pixels high, and the bottom graphics block takes the remaining two vertical pixels. These irregular graphic blocks make video games in Model 4 mode unattractive; game programmers prefer running in Model III video mode. A 40 character wide display mode is available using a double-width raster image. By manipulating the video hardware in machine code, the Model III video modes are available as well. An alternate character set is available which included the entire Greek alphabet and special symbols. The TRSDOS 6 video driver supports scroll protection up to seven video rows, and space compression codes. The user can change the system cursor character with the SYSTEM command, and user programs can change it dynamically. The system video driver provides a supervisor call, @VDCTL, that permits direct manipulation of video RAM. The entire video screen, or any single row, can be copied into a buffer supplied by the caller, or the buffer can be transferred to video RAM. Though this bypasses the display output device chain, the calling routine can fetch the SVC's address out of the SVC table and re-vector it to supply data to the display driver.
One peculiarity of the Model 4 video driver is the way ASCII carriage return characters are handled. When this character code is sent to the driver the system cursor is both returned to column zero and a linefeed is issued, which advances the cursor to the next line. This is contrary to other Z80 computers running the CP/M OS, and the industry-standard IBM PC DOS and MS-DOS OSes. These do not issue automatic linefeeds, which must be supplied by the software application separately. The result of this peculiarity of the Model 4 video driver is that files imported from these other OSes with single-spaced text will appear double-spaced on the Model 4 display. Many users processed text files like these with a utility that would strip out the redundant ASCII linefeed characters. In large text files this may save thousands of bytes, the reason LSI chose to handle carriage returns this way. This peculiarity also affects the way TRS-80 printers output single-spaced text imported from the other OSes. One convenience that Tandy/Radio Shack built into their own printers was a DIP switch to handle carriage returns either as standard TRS-80 CR+LF characters, or IBM standard carriage returns without the automatic linefeeds. Yet another effect is the display of text files with discrete CR+LF pairs received through the RS-232 serial port, usually from a remote host connected via a modem and a telephone line. Most Model 4 terminal programs have a provision for screening out redundant linefeeds before the text is sent to the driver; for those that don't a simple filter program can be attached to the device chain to perform this task.
An optional expansion board permits the Model 4 to display 640×240 or 512×192 high-resolution monochrome graphics. The Radio Shack Model 4 hi-res graphics board sold for $249 and include a modified version of Microsoft BASIC with commands for drawing basic geometric shapes and manipulating arrays in graphics RAM. The graphics screen memory is separate from the usual character screen, and the two can be displayed together or separately. Micro Labs of Richardson, Texas sold a popular compatible graphics board for $199. It comes with GBasic, its own BASIC with graphics commands. Whereas the Radio Shack board has 32KB of graphics RAM, the Micro Labs board has 20KB. Since only 19,200 bytes are required to render a 640 x 240 pixel screen, the additional RAM on the Radio Shack board is available for windowing the viewable screen around a larger virtual area. The graphics RAM is accessible through four Z80 I/O ports and is especially easy to access using the Z80 block I/O instructions for uses other than graphics. For example, the public domain utility Grafdisk adds the graphics memory to regular banked memory to create a larger TRSDOS ramdisk.
The keyboard adds,, and three function keys to the Model III keyboard. The system keyboard driver produces character codes for all the alphanumeric keys and function keys pressed in combination with the and keys. Though the keyboard lacks a key, tabbing is performed with. Pausing a display, such as with or, is done with. As with previous TRS-80s, there is no key, but rather there is a dedicated key which performs the same function. Special punctuation symbols such as or
BASIC Programming
Both Model 4 BASIC and Model III BASIC are provided. Model 4 BASIC is largely compatible with the older language. All functions were removed; most, not all, are available with different syntax. New features support variable names longer than two characters, loop structures, program chaining, and user defined functions. Some features from the Model III BASIC were dropped such as the ability to compress BASIC statements by omitting spaces. It also lacks the commands for setting, resetting, and testing graphics blocks on the display.
For Model III BASIC programmers Model 4 BASIC has two disadvantages. First, variable names have to be separated from BASIC keywords with spaces, unlike Model III Disk BASIC which permits them to be run together; the Model 4 interpreter's variable names can be up to 40 characters in length, and the Model III interpreter's variable names have to be one or two characters. The Model 4 version of BASIC therefore has to search for the delimiting space to find the end of the variable name. What this means for the programmer converting old Model III program into Model 4 BASIC is tedious editing, because Model III programmers, to save memory and speed execution, typically compact their code by using two-character variable names and eliminating spaces separating variables and keywords. The second disadvantage is that Model 4 BASIC lacks the command available in Model III BASIC for sorting arrays. This is a problem for programmers maintaining code for business applications, and caused many BASIC coders to write a replacement capability or purchase third-party software. Another solution preferred by some is to continue running their programs in Model III mode under Model III BASIC, but activating the Model 4's faster speed, larger video display, and extra keys by manipulating its hardware with machine code. For those programming in languages never updated for the Model 4, this is their only option for accessing the new Model 4 features.

Reception

Tandy sold 71,000 Model 4 computers in 1984. BYTE in October 1983 noted the lack of native software, but praised the Model 4's backwards compatibility and TRSDOS 6's new features. The magazine concluded that the Model 4 "provides a lot of flexible computing power... Radio Shack has a guaranteed winner". Creative Computing chose the Model 4 as the best desktop computer under $2000 for 1984, stating that the $1299 price for a system with two disk drives was "a real bargain".

Gate Array Model 4

The original version of the Model 4 does not use gate array logic chips on its CPU board, but rather Programmable Array Logic chips. Starting from late 1984, a revised version was produced which came to be known as the Gate Array Model 4. This change greatly reduced the chip count and allows the circuitry for the Floppy Disk Controller and the RS-232 serial port to be included on the CPU board. The upgrade to 128K does not require the special PAL chip available only from Radio Shack, allowing users to expand the memory themselves with third-party RAM chips. The Gate Array shipped with a green video screen instead of the black-and-white screen, and the arrow keys on the keyboard are grouped together into a single cluster. Veteran TRS-80 game players were quite unhappy with the new arrangement of arrow keys.
The position of the RS-232C port's DB-25 connector was improved. On the non-gate version this points straight down at the surface on which the computer rested. The gate array's connector points directly to the computer's rear, making the cable connection much easier and reliable.
An improvement was made in the computer's speed of execution. The original Model 4, though advertised as a 4 MHz machine, actually performs at an effective speed of approximately 3.5 MHz because Z80 wait states are inserted for bus transactions with the slower PAL support circuitry. The Gate Array CPU board allows the Tandy engineers to clock the Z80 at 4 MHz without wait states. These make some third-party hardware modifications, particularly speedup kits, troublesome to install on the older Model 4. The support circuitry in the Gate Array version will run properly at up to 7 MHz; however the hardware component most affected by a faster clock rate was the keyboard. Some speedups like the XLR8er include a filter for the system ✶KI device that inserts wait states for keyboard access only.

Model 4P

The Model 4P, is a self-contained luggable unit. It has all the features of the desktop Model 4 except for the ability to add two outboard floppy disk drives and the interface for cassette tape storage. It was sold with the two internal single-sided 180KB drives. It was later made with the Gate Array technology. 80 Micro published an article describing a simple motherboard modification to enable the installation of two external floppy drives.
The 4P's CPU board lacks the Model III ROM chips containing the Model III Microsoft BASIC interpreter. Instead the computer is furnished with a floppy disk labelled "Model III/A". This is called the "Model III ROM Image" disk. If the operator wants to boot a Model III DOS, he inserts this disk into the boot drive after powering up. Once it is loaded, he replaces the ROM Image disk with his Model III DOS boot disk and presses reset. From then on the computer behaves exactly like a Model III.
The 4P's video monitor is 9" in size compared to the Model 4's 12". The smaller size, and sharper dots, produce better video output. The computer is compatible with popular internal Model 4 peripherals, and has a slot for an internal modem board. The Radio Shack modem uses its own proprietary command set and only supports communications at 300 baud. Teletrends produced a 1200 baud that uses the Hayes command set.
The computer has an internal fan; its compact design does not permit it to use the Model 4's passive cooling.
Tandy discontinued the 4P by Spring 1985, stating that "even though you won't find a more enthusiastic and devoted group of owners than our Model 4P folks, transportables just weren't moving well for any company that also sold a desktop version".

Reception

InfoWorld in 1983 predicted that the 4P would be a "smashing success" as a "substantial improvement" on the Model 4's video and keyboard. The magazine said that it was "truly a transportable computer" and approved of the "carefully thought-out mechanical design", not too large or small. Although criticizing the computer's lack of advanced documentation or double-sided drives, InfoWorld concluded that the 4P "is an outstanding product at an excellent price".

Model 4D

The final version of the Model 4 is the Model 4D, first sold in 1985. It is a Gate Array desktop machine featuring dual TEC FB-503 disk drives with a capacity of 360KB each. Rather than using a lever-style latch as had previous Model 4 drives, these drives use a twist-style latch that provides for more reliable clamping. They are half-height drives mounted with full-height faceplates.
An undocumented feature of these drives is that they can format 42 tracks. This technique increases the available storage on each disk to 378KB. To create such a floppy disk, the user specifies the parameter on the command line when invoking.
The DeskMate productivity suite was bundled with the 4D. It supplies simple applications including a word processor, filer, spreadsheet, calendar, and mail manager.
Model 4Ds sold during 1987 and later shipped with an updated version of its operating system, now called LS-DOS 6.3 after its third-party developer Logical Systems. It provides many enhanced features, the most important of which is the ability to handle file dates through December 31, 1999. The original TRSDOS 6 licensed to Radio Shack can only handle dates through December 31, 1987. Files are now time-stamped as well. Another useful feature modifies the BASIC interpreter to access LS-DOS Supervisor Calls using integer variables, without having to resort to high memory subroutines coded in Z80 assembler. BASIC commands like,, and are accessible via single keystrokes. Also added in LS-DOS 6.3 is the simple text editor. The TRSDOS non-interactive command had previously been the only method of creating plain text files. occupies only 3KB of disk space while offering full-screen cursor movement and block capabilities, as well as search-and-replace.
Later Misosys, Inc. updated LS-DOS 6.3 to support dates through December 31, 2011. The Model III LDOS 5.1.4 was also updated to version 5.3, supporting the same feature set as LS-DOS 6.3.
The Model 4D is the last computer descended from Radio Shack's original Model I from 1977. It is not branded as a Radio Shack product, however. The badge mounted on its front cover brands it as the "Tandy TRS-80 Model 4D". This change in marketing resulted from Tandy corporation's desire to enhance its stature in the marketplace, because it was perceived by some in the computer press that the old "Radio Shack" moniker connoted an image of inferior quality. The Model 4D is the last computer to bear the "TRS-80" name. It retailed for $1199 at its introduction in 1985. During 1987–1988 the retail stores removed the Model 4Ds from display but they were kept in the yearly computer catalog and were available by special order through 1991, when they were closed out for $599. Parts and repair service remained available for several years longer.