Close
0%
0%

Arduino Due CP/M Personal Computer

An affordable computer that anyone can make! CP/M for all!
*** A RunCPM Project***

Similar projects worth following
A CP/M Z80 compatible personal computer that anyone can build for a minimal cost.

Uses an Arduino Due, a SPI MicroSD adaptor and 'RunCPM' by Marcelo Dantas.

COMPLETED PROJECT - CP/M FOR ALL!


Run classic software like Wordstar or Dbase, play Zork or code in Microsoft BASIC, or run new software like MESCC C compiler or the TE editor.

A Z80 CP/M Compatible microcomputer that costs little and anyone can make!


Inspired by projects like the Altair clone kits and the RC2014 computer, I wanted to create an option for those who want a new CP/M computer for a minimal cost that was easy to build.


This build uses an Arduino Due and an SPI MicroSD card adaptor, I found both on eBay and together they cost less than £17.  The magic comes from Marcelo Dantas' brilliant RunCPM.  This allows Z80 compatible CP/M 2.2 programs to run from a native FAT filesystem on the MicroSD card.  This dispenses with the need to use disk images, files can be copied directly to the card.  Different drives are stored on the card in different directories, user spaces are stored as subdirectories.

I am honoured that Marcelo joined this project as a team member, I recommend that anyone with an interest in CP/M, downloads RunCPM and compile it for their PC (Windows, Linux) or Mac, as well as the Arduino Due, of course!

RunCPM Hackaday Project Page:
https://hackaday.io/project/18291-runcpm

RunCPM GitHub:
https://github.com/MockbaTheBorg/RunCPM/

  • 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

  • Updated Wiring Diagram

    Martian03/07/2019 at 20:00 0 comments

    For the sake of completeness, I've created a new wiring diagram.  It's neater and includes the LEDs and reset switch.

  • New Enclosure - Feb 2019

    Martian02/23/2019 at 16:08 0 comments

    As per the last project log, I've moved the internals to a larger enclosure.

    Inside...    plenty of room for future projects...

    Connected up to a Pi acting as a terminal via minicom...

    That's all folks!

  • Going further...

    Martian01/29/2019 at 03:21 0 comments

    This project for an Arduino Due CP/M Personal Computer is complete.  People should be able to follow what I've done to make a low-cost CP/M computer without too much effort, which was the goal.

    ..but I have some ideas for the future..

    Software:

    For a while I also added a fork of Tiny BASIC and I shared the code with a few interested people.  This meant the computer started up in BASIC and CP/M could be booted with a 'cpm' keyword.  But any further development of that idea is beyond the original goal for -this- project, so I will create a separate project for that in due course.  The BASIC allowed saving files into CP/M's drive B: and provided an autoexec function via a autorun.bas file.  It also featured some ANSI colour and block graphic support.

    I've also experimented with a menu system to provide some simple organisation tools, such as a calendar, address book, card file, calculator, editor etc.  I'm looking at how the text versions of DeskMate worked on the TRS-80 Model III, the UI on the TRS-80 Model 100/200 and the Locoscript software on the Amstrad PCW8256.


    Hardware:
    I now have a larger spare project enclosure.  Something I may consider is relocating the internals (Arduino, SD card etc on the mounting board) to the new case.  This will would provide a much larger area for future expansion.

    At present the computer is a black box with a USB cable, requiring another machine with USB to power it and communicate through a terminal.  I am interested in developing it into a standalone computer, again this would be a new project beyond the scope of this one.

    The RC2014 Z80 computer can use a Pi Zero as a £5 graphics card.  It boots pigfx - a bare metal solution to drive a HDMI display and USB keyboard.  It supports an ANSI terminal and has some support for colour graphics.

    https://hackaday.io/project/9567-5-graphics-card-for-homebrew-z80

    https://github.com/fbergama/pigfx


  • RunCPM Modifications

    Martian01/25/2019 at 07:01 0 comments

    There are a few changes I made to the standard RunCPM.  It is easier for me to describe them than fork a copy of Marcelo's code.

    Since the Power LED connected to Pin 12, I added the following define:

    #define POWLED 12

    In setup() I added the following to light the Power LED:

    pinMode(POWLED, OUTPUT);
    digitalWrite(POWLED, HIGH);

    I also set the serial speed to 115,200:

     Serial.begin(115200);
    
    
    

    I altered loop() so the LEDs blink alternately after CP/M exits:

    void loop(void) {
     digitalWrite(POWLED, HIGH);
     delay(500);
     digitalWrite(POWLED, LOW);
     delay(1000);
     digitalWrite(LED, HIGH);
     delay(500);
     digitalWrite(LED, LOW);
     delay(1000);
    }

  • LEDs Working

    Martian01/24/2019 at 22:03 0 comments

    Power LED:


    Disk LED:

View all 5 project logs

  • 1
    Prepare to connect the MicroSD card adaptor to the Arduino

    Arduino Due:


    SPI MicroSD Adaptor:

    Wiring Diagram:

  • 2
    Connect the Arduino and MicroSD adaptor

    Wired up:



  • 3
    Prepare the case

    The Arduino and MicroSD adaptor will be mounted on a small piece of Plasticard, that will be fixed to the case.

    Measure, drill and use spacers.

View all 5 instructions

Enjoy this project?

Share

Discussions

guido.lehwalder wrote 10/26/2018 at 19:18 point

How can we get/compile RunCPM 3.1 - ADCPC R2.0 with TinyBASIC?
"The underlying code (RunCPM and Tiny BASIC Plus) has been updated to the latest upstream versions (3.1 and 0.15 respectively)."

  Are you sure? yes | no

Martian wrote 10/26/2018 at 19:47 point

If building a pure CP/M system, just use Marcelo's latest RunCPM build as he supplies it for the Due with a MicroSD SPI interface, that is my primary recommendation to everyone.

The additional stuff I'm doing with TinyBASIC Plus is VERY experimental, subject to MAJOR revisions.  I may even scrap TinyBASIC, if I can find something better or make hardware changes, it's a work in progress.  I don't have time to provide support or fix bugs for people at this point.

  Are you sure? yes | no

guido.lehwalder wrote 10/28/2018 at 15:37 point

I did compile the actual v3.3  from github for my Arduino DUE.
After some problems with "BDOS Error" i also got the Windows-Version working again (magic self healing?) - but cant compile it myself with TDM-GCC or MinGW32 :(
[EDIT] compile with TDM-GCC-32 does work for me now:
https://forum.classic-computing.de/forum/index.php?thread/22688-runcpm-v4-8-win32-shell-starterpacket/&postID=273444&highlight=Starterpaket#post273444

  Are you sure? yes | no

Martian wrote 10/28/2018 at 16:15 point

Hi. I can't reply directly to your last comment, instead send me a message and we'll see what we can do.

  Are you sure? yes | no

villaromba wrote 10/12/2018 at 15:18 point

BTW How did you get TinyBasicPlus to run on Due? I get avr/io.h error - i.e Due not an AVR

  Are you sure? yes | no

Martian wrote 10/12/2018 at 16:20 point

Contact me via the message system and we'll see what we can do.  :)

  Are you sure? yes | no

villaromba wrote 10/12/2018 at 13:17 point

This is a really interesting project running on my Due and I look forward to seeing the integration of the colour graphics side. Will now play with the tiny basic ......

  Are you sure? yes | no

fabian wrote 07/19/2018 at 15:20 point

Meybe zx spectrum version?

  Are you sure? yes | no

joseluis.collado wrote 06/04/2018 at 02:15 point

Hi Martian, very nice project, specially for the added TinyBasic functionality and color support. I'll appreciate if you could share this modified code.

Regards, JL

  Are you sure? yes | no

Peabody1929 wrote 05/29/2018 at 22:09 point

The ISP connector has the pins needed for the SD Card interface except Card Select.

  Are you sure? yes | no

jharre wrote 04/22/2018 at 17:48 point

This is cool! I've got the parts, but can't figure out how you wired the SD card board. Can you share which pins on the Due go to which pins on the SD adapter board?

  Are you sure? yes | no

Martian wrote 05/15/2018 at 22:20 point

I'm SO sorry I failed to see this post, did you get it working or do you still need help?

  Are you sure? yes | no

jharre wrote 05/29/2018 at 16:09 point

Yes, I did eventually get this to work with a Sparkfun SD adapter board. (With the Due, you have to bend out pins D11, D12, D13 before plugging in the adapter and use pin 8 for CS.) But, it would be nice to see how you wired the SD card board to the Due with the jumper wires.

  Are you sure? yes | no

Martian wrote 05/30/2018 at 21:15 point

I've added a couple of project logs to show how I connected mine up.

  Are you sure? yes | no

jharre wrote 05/30/2018 at 23:27 point

Ah! That looks good - easy to follow how you did the connections now. Thanks!

  Are you sure? yes | no

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:

https://hackaday.io/project/9567-5-graphics-card-for-homebrew-z80

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

  Are you sure? yes | no

Arawn Davies wrote 05/17/2018 at 23:30 point

Thanks for the tip, I'll give it a go and dabble more into it. I'm also considering moving onto a real Z80-based microcomputer that cna run at least MBASIC - bought the RC2014 Starter Kit without realising that it only came with the PCBs, a few headers and the MBASIC ROM, so I might be able to do something with what I've got already.

  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:

https://github.com/rbanffy/3270font

It's based on the IBM 3270 terminal font.

RunCPM comes from the wonderful work by Marcello Dantas:

https://hackaday.io/hacker/42223-marcelo-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