New CP/M-80 computer: Z80, SD cards, VGA, USB keyboard and power... Teensy 4.1

tomicdesu

Active member
Thanks to the wonderful culture of folks' here I was able to put together a fully functional standalone CP/M-80 version 2.2 machine using Teensy 4.1. None of the host teensy code is visible, it boots Z80/8080 code like a 1978 machine, with all of the BIOS, boot, ROM monitor, written in Digital Research's MAC and ASM. Utilities (FORMAT, SYSGEN, ROM and keyboard map uploaders, etc) were written in BDC C 1.6, on the machine. It has a nice workflow as a CP/M machine.

v2-kbd-screen.jpg

I'd done CP/M installs professionally in the 70's and 80's, and I wanted a machine as good or better than anything then. Intentional anachronisms: SD cards as removable media; a modern USB keyboard; USB-C power. The rest is pure Z80/8080, there's no way to tell it's NOT a Z80. With the Teensy 4.1 running at stock 600 MHz I crudely estimate CPU speed as about 60 MHz; fast enough to be a real improvement but not silly-fast. So far I've gathered only a small amount of CP/M abandonware, while developing the project, and customized two text editors for the machine ("H19 terminal"); WordStar rel 4, and PMate 3.21. WordStar fetches screen resolution from the VGA device at runtime. Should run anything you can download.

Provided utilities move files between CP/M and the SD card's FAT filesystem.

Full description of the project is here: https://www.bleeve.me/eZ80/index.html The web page is a work in progress.

I only wanted one (or two) for myself, but I may make in quantity if there's interest. I made 5 prototypes, those boards are about to go to friends for getting hours on them and chase down bugs. The code is on the website above, imperfectly, this is going on now, if something's wrong/missing I'll fix ASAP.

Thanks to everyone who answered my annoying questions in various threads this past 6 months, and to wwatson for VGA_4bit.
 
This is really cool as I have been recently been going through my old SB180 FX SBC. I have the adaptec 4000A SCSI add on board with an ancient 10MB winchester hard drive. I have several 5.25 and 3.25 floppy drives as well and still have the original Micromint CPM disks with lots of CPM software on floppys. I am very interested in what you have done with the Teensy 4.1. I would be willing to do some testing with one of the prototypes. Great work :)

I revisited my VGA_T4 repo. looks like somebody else is using it as well and found some bugs. Need to setup and test...
 
I'd be totally flattered if you had one of my boards. I have 10 version 3 boards, with repaired LPT ports, Im working on the last missing feature (keyboard scan code maps) likely needed for people using not-my-keyboard, no big deal, done in a day or two.

I've ordered 10 4.1's but they're back ordered. But I can set one up, and ship you a v3 without a teensy on it, if that works.

I've got a scheme for distribution CP/M media, its just not written up yet. But I will ship with bootable cards and oothers with utils and sources. Turnkey is the goal.

The only bug I found in vga4bit is reverse scroll is AFU in some way or I misunderstand it. I implemented H19/H89 terminal, more CPM than the contemporaneous VT100! My lazy workaround is to not use it.

Slow scroll has not been a problem in use; WordStar, PMate, etc repaint, which is fast.

The only missing feetch is maybe a margin of empty scan lines and bits left snd right, my=cheap LCDs dont display the top pixel rows. I am thinking of partitioning off a character line, and 0th and Nth columns. Then I could steal another and use top of bot line for "status".

Your vga4bit worked first try and has never failed or glitched. Its pretty damn awesome.

SB180, nice machine!! A Z180?! Wow. I used some of Ciarcia's stuff..

There's a device called the Grease Weazel, another approach to reading old floppies. I bought one, found a 50 pin to 34 pin adapter on eBay, have a half height 8" drive, and plan to "soon" to try to ectract some stuff off my reamining old floppies. Rather than try to connect floppies to eZ80.
 
Does it implement the undocumented IX/IY instructions? That might be one way.
Oh, I remember using those! Although they tended to be a bit slow (in terms of T states per instruction) so there was no real gan from using them.
This was on a Sinclair ZX Spectrum 48k (HiSoft Pascal, loaded from tape), and then an Amstrad PCW 8512 running CPM+(FTL Modula 2, loaded from 3" disk - such luxury)
 
Last edited:
Received the board today:D I have a fresh T41 in the package that I can solder the pins to tomorrow. Then start working with your board...
 
@tomicdesu - I have your board up and running now. Nice work man(y)
eZ80-3-1.jpg

Works with wireless keyboard and probably mouse. Kind of through me off at first after programming the T41 I plugged in the USB C power cable and things lit up but the T41 did not. Then I noticed the button by the green LED pressed that and it booted up. Have read the docs yet:D
Here is a better shot of the VGA screen (not so steady with the camera):
eZ80-3-2.jpg


Once I have read the manuals I will begin testing playing with things. I have not tried using a USB HUB yet but it looks like it will probably work.
Again very nice work...
 
Neato!! Thanks!

Lol I always fear I send one to someone-not-me and it catches on fire or runs out the door or something. I'm in the Great Middle of the project -- most things work as intended, but I'm whacking bugs daily. As you know, working on H19 terminal emulation. Of course it being 1975 in there there's no compatibility between keyboard features (arrow keys, DEL vs backspace) but I've got it working nicely between CCP, WordStar, Pmate and SuperCalc2. PMATE can be configured.

The manuals are at https://www.bleeve.me/eZ80/index.html, you probably know. DOCS has the operating and programming manuals. There's an ABOUT CPM section about the sorts of assumptions made in 1975 that are NOT OBVIOUS, lol.

The software distribution is klunky, and will be fixed in coming days.

Feel free to pile on with bug reports!
 
To address your mentioning of the SD card error in the VGA thread...

There is a sporadic problem when two SD cards are inserted at once. The mere presence of the second (on the SPI buss) card seems to cause problems with the first. I think I have a strategy to investigate, and I'll do so in the coming week. It's annoying as hell when it happens.

It appears no one is doing what I'm doing with SD cards, using them as removable media. I've got nearly all of it solved otherwise.

Either SdFat is maintaining some undocumented (or obscure) state, or there's an issue when rapidly selecting between "adjacent" disks. I have some ideas to pursue and I think there may be a hardware solution to isolating them better. OR of course, I'm making some stupid misteek! Which is most likely.
 
Last edited:
Back
Top