Z80 CP/M Computer (using an Arduino)

A low-cost CP/M 2.2 compatible personal computer that anyone can make! Uses an Arduino as a 'host'.

*** A RunCPM Project***

Similar projects worth following
I've been wanting a CP/M compatible computer for years, not just a PC emulator but an actual physical machine.

I had looked at some amazing Z80 projects online, to build a machine and be able to hack CP/M onto it, but I wanted something -ANYONE- could build, with a tight budget with easily obtainable parts.

Then I came across the CPMDuino project by Marcelo Dantas (now RunCPM). This allowed me to use an Arduino to realise the goal.

(ADDENDUM: The micro now starts a customised version of Tiny BASIC on power-on, CP/M can be launched via 'cpm' keyword.)

Completed project!  CP/M for all!

A Z80 CPM 2.2 compatible microcomputer that is low cost and anyone can make!

Run WordStar or Dbase, play Zork or program in C or MBASIC!

Uses the magnificent 'RunCPM' by Marcello Dantas!  (Thankyou!)

Original CPMDuino

Current RunCPM Project


Font used in terminal application (Putty etc.)

TrueType Font - 86.16 kB - 01/23/2017 at 18:01


  • 1 × Arduino DUE (32bit board with 96K) Approx £10-15 for a clone board
  • 1 × MicroSD SPI adaptor Approx £2
  • 1 × Project case Your choice, I had a project enclosure called a KE26 that I previously bought from eBay. Any plastic box or tub or enclosure of sufficient size will do.
  • 2 × Red LEDs Wired with resistor (for Power and disk activity). They can be bought in packs off eBay.
  • 1 × MicroUSB to USB cable

View all 6 components

  • Tiny update - Sept. 26th

    Martian09/26/2017 at 19:29 0 comments

    As noted previously, within the Arduino's 96K of RAM, CP/M occupies 64K and BASIC uses a separate 24K.  So when in CP/M, the last BASIC program should still be resident.


    Now, as well as being able to launch CP/M from BASIC with the 'CPM' command, from CP/M 'exit' will drop back to the calling BASIC interpreter.

    This makes switching a lot easier, eventually I may be able to implement a task switcher, keeping CP/M's RAM contents intact in BASIC and vice versa.

  • Adding an 'Extended Color Basic'

    Martian02/19/2017 at 16:37 0 comments

    I took Tiny BASIC Plus and RunCPM and squished them rather inelegantly together! Both projects could compile on other hardware, I've broken that! (oops!)

    I figured out how to expand Tiny BASIC Plus and added a 'CPM' command. This then calls the setup and loop functions of RunCPM, in effect leaving native BASIC and booting Z80 CP/M like the C128.

    It then occurred to me that BASIC was LOADing and SAVEing to the root of the SD card, so I adjusted those routines to prefix filenames with "/B/0/", this makes BASIC files available to CP/M's drive B, user 0. The 'TE' editor is much nicer for writing code.

    Finally, I decided to add some ANSI spice!

    • CLS - Clears the screen
    • COLOR - Changes the text color, 9 resets to default
    • PLOT - Plots and lovely BLOCK graphic at co-ordinates X, Y

    In future, I may make BASIC and CP/M switchable, BASIC programs use 24K RAM and CP/M sits in a separate 64K.

    Power on display:

    FILES defaults to CP/M drive B:, user 0. Chaining a color graphics demo:

    Spectacular ANSI graphics:

    From BASIC, type 'CPM' to boot the OS:

    The BASIC graphics demo, now loaded into 'TE' in CP/M:

  • Upgrades Jan 27th, 2016

    Martian01/27/2017 at 12:28 0 comments

    I added a hardware reset button to the back of the unit, handy! One quick press and CP/M will reboot.

    Added a second LED

    Now there is a power-on LED

    ..and a disk activity LED

    When CP/M exits, they blink alternately until the USB plug is pulled or the Reset button is pressed.

View all 3 project logs

  • 1
    Step 1

    Marcello Dantas' RunCPM was flashed onto the Arduino Due. The MicroSD adaptor is connected via SPI. The good thing about RunCPM is that the SD card uses a standard PC filesystem, CP/M drives A to P are implemented as directories. This makes copying software and data over nice and easy. No arcane disk images.

    I tweaked RunCPM to my own tastes, minor things really like the displayed text on startup etc.

  • 2
    Step 2

    I bought a nice project case off eBay. I put some spacers in to mount a 3mm piece of plasticard that I would attach the Arduino and MicroSD adapter.I then drilled the appropriate holes.

  • 3
    Step 3

    Ready for the PCBs

View all 7 instructions

Enjoy this project?



Arawn Davies wrote 01/18/2018 at 19:57 point

Hi, great project! I've just put RunCP/M on an Arduino Due after waiting months for my Micro SD card adapter to arrive. Do you plan on making this open-source at any point? If it was hosted on GitHub or something like the main RunCP/M project is, more people can contribute to it if you wanted. I respect your decision not to, just in the event that you don't :)

  Are you sure? yes | no

Martian wrote 01/26/2018 at 10:10 point

I could do.  The project was originally to run vanilla RunCPM following Marcello's work.  I've just extended it with a custom TinyBASIC for my own use, it's really a messy hack.  I'm focussing everything on my custom CPU project right now, but I do come back to this every now and then.

I'm not sure I want to get into a forked RunCPM project as such, because I don't understand all of the code and I have too much respect for Marcello's work.  I would have to make time to tidy everything up, but essentially I'd probably share stuff and explain how to modify vanilla RunCPM, it's essentially renaming loop and setup to cpmloop and cpmsetup so they can be manually called by an customised TinyBASIC keyword.

And all of this is affected by whether I make further hardware changes, I am -considering- making the machine standalone by adding a "$5 graphics card", ie. Pi Zero:

It also opens up possibilities for remote wireless connection and maybe connecting to the outside world.

  Are you sure? yes | no

guido.lehwalder wrote 09/26/2017 at 10:17 point

Hi, whats the name of the blue terminal-font in the banner pictures (its not the glass-tty-vt200). It looks like a OCR A font, but OCR A hasnt the point inside the number zero.
I did built myself a RunCPM, but I didnt see files for your project (only the vt220-ttf).
Are there any - anywhere? :)

  Are you sure? yes | no

Martian wrote 09/26/2017 at 14:40 point

The font I was using is here:

It's based on the IBM 3270 terminal font.

RunCPM comes from the wonderful work by Marcello Dantas:

The BASIC thing is still very much a work-in-progress and I'm not planning on sharing files until the project is -complete-.   It's a messy kludge of TinyBASIC Plus (heavily customised) and a slightly altered version of Marcello's RunCPM.  I'm still changing a lot of stuff - frequently, I may even change the BASIC interpreter if I can find a better one that is easily modifiable.  I am also looking into adding more software features and hardware.

  Are you sure? yes | no

FloppySoftware wrote 06/29/2017 at 20:19 point

Very nice project!

I'm glad to see that my humble TE text editor for CP/M is useful for somebody!

  Are you sure? yes | no

Martian wrote 09/14/2017 at 14:23 point

My apologies for not replying before.  My sincerest thanks to you for TE, it's a very useful program and it's great to see new software on the venerable CP/M OS.

  Are you sure? yes | no

Marcelo Dantas wrote 01/25/2017 at 00:18 point

This is simply AWESOME!!! Looks like the real thing, I just had a trip down memory lane right now.

Honored that RunCPM is behind such a beautiful machine.

  Are you sure? yes | no

Martian wrote 01/25/2017 at 06:54 point

Thanks, and thanks to you for RunCPM.  The machine is a joy to use, I'm gonna get many years out of it.  I've been doing some distraction-free writing on it.  I've also to look into the Lua aspect of it, but that sounds really interesting.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates