The Teensy Board/Z80 is a Teensy 4.0 computer running a ZCPR3.3/ZSDOS variant of RunCPM.
Features:
- 100-140MHz equivalent Z80 (RunCPM doesn't emulate cycle times - it just goes fast).
- SDIO connected uSD card (about 2.5x faster than SPI) with a standard FAT file system.
- ANSI colour terminal emulator with GSX graphics support. Runs on a first generation Raspberry Pi, so HDMI video and USB keyboards are natively supported.
- Battery backed up real time clock.
- Centronics compatible parallel port (DB-25F).
- RS-232 serial port (DE-9M) with RTS/CTS hardware flow control.
The PCB for the Teensy Board/Z80 fits on a VESA mount along with an original Raspberry Pi 1 B (rev 2). The Pi is the ANSI console used by the Teensy Board/Z80.
Along with the internal connection to the ANSI terminal, the Teensy Board/Z80 has two vintage I/O ports: an RS-232 port with a DE-9 connector, with RTS/CTS handshaking, and a Centronics parallel port. The RS-232 port is the TTY: device in the Teensy Board/Z80's BIOS. The parallel port is, quite naturally, the LPT: device.
In my setup, the RS-232 port is hooked up to a Retro WiFi modem, complete with Hayes Smartmodem style LED indicators.
The Teensy 4's real time clock is used in ZSDOS to support file timestamps via the normal ZSDOS calls. A CR2032 coin cell provides the battery back up.
The Ampro Little Board/Z80 mounted on the bottom of a 5.25" floppy drive. The Teensy Board/Z80 mounts on a VESA mount on the back on an LCD monitor.
The case was designed in OpenSCAD. Although it's 3D printed, it's designed like a laser cut case, with separate sides, top and bottom. This allowed a quicker "getting it to fit" cycle than if the bottom and sides had been printed as one piece; this way, individual sides could by reprinted.
The base is printed with integrated standoffs. The hole are sized to accept a #4/40 tap so that no nuts are required. It took a bit of care to get the holes tapped without snapping the standoffs. Both the Teensy Board PCB and the Raspberry Pi will take 1/2" 4/40 screws in lieu of the M2.5s normally specified for the Pi.
The sides bolt together with 3/8" #4-40 screws. The filament was plain old PLA.
When I bought my first Teensy 4.0 last autumn, I'd thought about looking around for a Z80 emulator written in C and implementing a BIOS in Z80 assembler that would talk to the Teensy hardware... somehow. Luckily, I came across RunCPM first. It had already solved the problem of communicating with the Teensy hardware, and had done it with a FAT file system. I stopped looking! I had the first system up and running within an hour of getting home with the Teensy.
Over the winter I helped to get RunCPM's BDOS emulation much closer to how CP/M operated. I'd done my fair share of BIOS development back in the day, and had even done some work with a BDOS replacement called NovaDOS, but all that was long ago and far away. But like riding a bicycle, it all started coming back.
While all that was happening, I was also working on getting ZCPR3.3 working with RunCPM. Then, after adding proper serial and parallel port support to RunCPM's BDOS and BIOS, I, well, started to get a little carried away.
A couple of decades of having all those extra cursor and function keys on my keyboard meant that I kept reaching for them. So I added the equivalent a ZCPR3 IOP to RunCPM's console input handling. It handled translating the ANSI style arrow, cursor and function keys to their WordStar(tm) equivalents. Suddenly, everything that used the ZCPR TCAP knew about all those extra keys. That was incredibly handy. Also, it took no space at in the Z80's 64K.
The Teensy Board/Z80 also implements the GSX (Graphics System Extension) BDOS call, but without the overhead of having GSX.SYS and a device driver loaded in the TPA. No more GSX.SYS or GENGRAF.COM! Instead, everything is handled in the Teensy Board/Z80's BDOS code. Most of the heavy lifting actually occurs in my modified PiGFX code running on the Raspberry Pi. Fast as a 115.2K serial connection is, it's way faster sending the start and end point of a line and letting PiGFX draw it than it would be to send a "set this pixel" command for each pixel in the line.
Then, no longer satisfied with what NovaDOS did, I added ZSDOS capabilities to RunCPM's BDOS. One of the most useful things to get working was file datestamps. My favourite editor (ZDE16) was already ZSDOS-aware and capable of maintaining the actual creation date of a file; and its backup.
Newest working: ZMP has been re-compiled with Hi Tech C v3.09 and is working. Baud rates above 19.2K now display properly (as do send/receive times with at those speeds). Timestamps are working with Ymodem and Zmodem. Keyboard macros now send CR for ! rather than CR/LF. Automatic CR on connection has been removed. ! and ~ can be escaped with \ in keyboard macros so those characters can be sent.
- RunCPM: the original inspiration for this whole project. While RunCPM may not have been intended to emulate a complete CP/M computer, as the Teensy Board/Z80 shows there's no reason that it can't be expanded into one.
- PiGFX: a fork of https://github.com/dhansel/pigfx (which is a fork of https://github.com/fbergama/pigfx) with all kinds of additions, including native GSX support.
- SdFat-beta: a fork of https://github.com/greiman/SdFat-beta with support for file attributes.
- Retro WiFi Modem: a WiFi modem in the style of an old Hayes Smartmodem. True RS-232 interface and LED status indicators.