Portable CP/M Runs The Classics Anywhere

If you want to run an old CP/M program — maybe you want to run WordStar or play StarTrek — you have several options. One is to acquire some classic hardware. You can also build a new computer using a Z80 or some other processor that will emulate a Z80. Finally, you can emulate old hardware on your current computer. The iz-cpm project from [ivanizag] takes this last approach. Unlike some emulators, iz-cpm doesn’t try to emulate everything in one simulated environment. Instead, it directly accesses your file system so it allows CP/M executables to run more as though they were a native program.

You can think of it as Wine for CP/M. The code is portable to Linux, Windows, or MacOS. The author mentions, though, that it won’t run on CP/M itself! The program can run an executable standalone which means you could set .COM files up to execute automatically if you wanted to.

The machine looks like a Kaypro and emulates an ADM-3A. There is a script to download interesting CP/M software, for instance WordStar, Basic, and Zork. You can trace calls and even CPU instructions if you want to debug things. Speaking of debugging, though, you might actually need to do that.

When trying out the program, we noticed that WordStar had some odd behavior. Saving files to drive A works, but if you save anywhere else, the file winds up on drive A, anyway. This confuses WordStar because it tries to reread the file from the other disk so it blanks out the text you were working on. We reported the problem on GitHub and in a couple of hours the author had it fixed. You have to love the open source community.

The program is written in Rust which seems to be gaining traction lately. The program is a great way to get into CP/M hacking, especially if you are interested in Rust programming.

If you want real hardware, it is hard to beat the price for this Z80 computer. However, pick up the PCB and check out our updates to it, as well.

17 thoughts on “Portable CP/M Runs The Classics Anywhere

  1. My parents were moving at the end of 2018 so all my crap in their attic had to come out. In there was my old Kaypro 2, plugged it in and it still works fine, booted and wordstar loaded. Not bad sitting for 20 years. Have no idea what I will do with it now, lol.

    1. Hi, the vintage computing scene is great (in either way) and thriving.
      I’m pretty sure you can do a lot with still.
      If you manage to build a simple null-modem cable, you can transfer programs via Kermit/XModem/ZModem etc.
      Alternatively, some floppy emulators like the Gotek could be used. Or maybe some hobbyists have made an HDD interface using CF/SD cards..
      Good luck and have fun! ๐Ÿ™‚

    2. That is an incredible gem. Also shows what to expect when solder contains a bit of lead. “Modern” computers will be landfill-ready well before the age of that Kaypro.

      1. The days of lead-free solder being less reliable than leaded is long over. Any extra weakness in lead-free joints is because devices today have 10x the number of joints which are all 10x smaller than the average leaded joint was before RoHS became law.

        Also, old hardware is only “more robust” because all the cheap crap stuff died decades ago and it’s been forgotten. Whatever is left is going to be tough more by definition than by design.

        1. Keep repeating that enough and you might even believe it.

          Yes, it is possible for lead-free solder to be as reliable as leaded. However, to get there everything has to work out just right. Any process problems, supplier problems, storage problems, etc. and it’s no longer the case. One usually doesn’t know something is wrong until there’s a quality problem in the field (hopefully outside the warranty window).

          And with lead-free one has to *always* make materials trade-offs that simply wouldn’t be needed for SnPb.

          All of that translates into overall lower reliability, which provides electronics makers with built-in obsolescence similar to that of the big-3 automakers when they made sure new cars would be rust-heaps within a few years. And in this case it’s even law-mandated, which takes care of potential competition that might do it right.

          1. “Any process problems, supplier problems, storage problems, etc. and itโ€™s no longer the case.”

            Which has *always* been true. Just as much stuff then as now died soon after manufacture. Warranties aren’t exactly a recent thing, and neither is planned obsolescence (which was invented for the *incandescent light bulb*). The past was never the golden age that survivorship bias makes it look.

      2. Good, I hope so! Maybe we can get rid of all these awful modern computers and go back to the kaypros if they’re still working. But seriously, can we find some way to make solder degrade even quicker?

    3. Swipe off t he dust and take a shitload of photos (including hardware details) and post them on a blog. You won’t appreciate it, many people will, for many years to come.

      1. +1 this. The Kaypro series was pretty common in its day, so you’d think there would be lots of detailed photos on the internet, but there really aren’t. As far as the hardware details go, Kaypro made an excellent technical manual, which doesn’t have photos but *does* include the full schematics. You certainly don’t see that these days! And of course, some kind soul has uploaded it to archive.org.

        That said, the technical manual doesn’t cover physical design and omits a lot of interesting detail (for example, the early motherboards were clearly based on a hand-drawn stencil with nice curvy traces; later iterations were either done with CAD or someone who really liked straight lines).

        The early Kaypro 2’s were built with all off-the-shelf parts, so you could theoretically build a “new” one from scratch as long as you had a copy of the BIOS, the schematics, and good photos. Later models used an ASIC to handle part of the video subsystem.

        If nothing else, they make an excellent teaching tool for basic microcomputer design – all the concepts of a modern computer are in there, but it’s simple enough that you can actually *see* how they’re hooked together and work.

  2. CP/M-80 is fun. It was perhaps the most emulated system of all time.
    And the first real, portable OS for microcomputer, too.
    It even had a standard floppy format, albeit only for 8″ disks (!)
    My father and me used to Z80MU (the old PD release) on DOS..
    Other people likely used 22NICE and similar,
    which sometimes can use i8080 Emulation Mode on NEC V20/V30 based machines.
    However, the Z80 or higher CPU is highly recommended, since the very popular Turbo Pascal required it.

    Also amusing is the ability to run CPM-80 emulators on CP/M-86.
    Or old DOS Plus, which is CP/M-86 based, but has an internal DOS 2.x emulator.
    That way it technically could run DOS-based CP/M-80 emulators, too.
    I could be wrong, but I think that qualifies as “emulation inside emulation”. ๐Ÿ˜Ž

    1. At one point I had a PCjr with a V20, a 12 Mhz 80286 with 12 megabytes RAM (512K on motherboard in DIPs with the rest on ISA cards, split between backfilling low RAM to 640K, and hardware XMS and EMS), and a Xerox 820-II Information Processor.

      Running 22-NICE using the V20, the PCjr was the fastest of the three running CP/M. 22-NICE in Z-80 emulation mode on the 286 was pretty slow. I was surprised that the PCjr could run CP/M so much faster than the native CP/M Xerox computer.

      I used 22-DISK quite a bit, fortunately the Xerox 5.25″ format was supported by the free version. Very helpful in getting WordStar files off the Xerox disks.

      1. Stahhhp, y’all gonna make me dig out the Sharp PC-4600 and waste all day getting CP/M going on it.

        Can’t remember if I tried 22Nice on it before, but dimly remembering that I tried something that was V20 required and it error-ed and said something like “No can do, buckaroo” Because the dumb thing read the ID string and got V40 not V20…. perchance I will peruse the parameters pertaining to perocessor ID strings and perform some prestidigitation upon them.

  3. So how much is this like MockbaTheBorg’s RunCPM? That’s a Windows program that turns a Windows folder into a CP/M floppy: copy the CP/M .com files right into the folder, run the console program, and all changes made by the CP/M progam to the files can be seen directly in the folder, rather than through a virtual floppy image. Great for making changes in Windows Notepad and re-running the CP/M program without exiting the emulator.


  4. A promising new CP/M emulator (also for Windows, but not only). But.

    Saving a WordStar file on a “current drive” does not work, instead it will be saved always in A:
    Using a keyboard without US-Key-Layout will not work because a lot of keys differing from the US layout are not working.
    Using the cursor keys will result sooner or later in a random behaviour, if a program which uses control sequences for a full screen display, like WordStar, is used.
    You can’t use Ctrl-C to leave DDT (instead, use ‘g0’).
    You can’t leave the emulation with a command or with a ctrl key, you have to close the program window.
    The proper function depends on the size of the cmd/program window – if you have more than 80 chars per line, or more than 25 lines per screen, screen output from programs like WordStar is garbled/randomly mixed with former output.
    Programs with direct disk access do not work.
    You cannot slow down the emulation / you can’t use a specific emulation speed, this is annoying when playing games like LADDER.

    Still a great idea, and I hope it will still be improved.

  5. Sorta late picking up the conversation but wondering if anyone knows of CP/M for the Osborne One or the Osborne Executive. I have one of each operational and have always been fasicnated by it. My sister used CP/M for transcription business in the day on a Commodore 128 but moving it is a lot of work. Thanks

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.