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!)
A low-cost CP/M 2.2 compatible personal computer that anyone can make! Uses an Arduino as a 'host'.
*** A RunCPM Project***
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!)
Glass_TTY_VT220.ttfFont used in terminal application (Putty etc.)TrueType Font - 86.16 kB - 01/23/2017 at 18:01 |
|
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.
So..
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.
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!
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:

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.
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.
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.
Ready for the PCBs
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.
Very nice project!
I'm glad to see that my humble TE text editor for CP/M is useful for somebody!
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.
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.
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.
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? :)