CP/M computer on Arduino Nano 3.0

P.S. Ada compiler for CP/M - https://acdc.foxylab.com/ada.zip

Project news:

  • connected two FRAM chips (32 KBytes each), and made auto-configuration of chips (they can be up to 8) on banks, so that these two chips filled zero bank RAM
  • untied the hardware I2C from interrupts (by rejecting the use of Wire.h)
  • untied work with UART from interrupts
  • from interruptions I got off for good reason - timer 1 after these tweaks allowed to generate the horizontal line frequency for output on TV; I was able to select a set of assembler commands that would allow one pixel to be output in 7 cycles of the processor (where the characters are taken from the character generator - an array in flash memory, but not the screen buffer in RAM), and this at 56 μs of the active part of the line will give 128 pixels, e. Arduino Nano (one !!!) can both emulate and output to the screen through the composite TV input 24 chars in row with 5 x 8 font, although losing a few in performance (but still not to that the ZX80 of Sir Clive :-))
  • rewrote emulation code, saving a few kilobytes of flash
    To be continued (and a new version of the code on the GitHub, as well as a edited description (in russian) at Мой самодельный компьютер на Arduino Nano под управлением ОС CP/M | Мои увлекательные и опасные эксперименты)

I will boast :slight_smile:
I taught my "nanocomputer" to display on TV screen without jitter (!) 20 lines of text on 40 columns in each.
The "screenshot" of the TV screen shows the results of the DIR command and the CPU tests:

Currently one (!) Arduino Nano (!) in my "cpm4nano" project:

  • emulates the i8080 processor;
  • loads the OS CP M and runs its programs;
  • exchanges information on the serial port;
  • displays the image on the TV screen.
    P.S. Font, of course, i will correct, Spectrum compressed font looked better.

Current project circuit:


The minimum configuration requires:
Arduino Nano 3.0;
SD card with adapter;
USB-UART converter.

With the addition of the PS/2 interface for connecting the keyboard, my "nanocomputer" has become self-sufficient:

Project on Arduino Project Hub:

thank you for this post. I am 16yrs old and im just in love with assembly language and old simple microprocessors and IC. when I get a little bit more experience i will definetly give it a try I dont like newer higher level languages and it would be awesome to learn things on something I already have like an arduino. If you have any suggestions where I could learn more and how to get started I would appreciate your suggestions

CyberCube37:
thank you for this post. I am 16yrs old and im just in love with assembly language and old simple microprocessors and IC. when I get a little bit more experience i will definetly give it a try I dont like newer higher level languages and it would be awesome to learn things on something I already have like an arduino. If you have any suggestions where I could learn more and how to get started I would appreciate your suggestions

Thanks! I started programming on such a Soviet programmable micro calculator - Elektronika MK-61 - Wikipedia
Then there was ZX Spectrum... This project brings me back to my youth :slight_smile:
But enthusiasts do much more incredible things - a processor on TTL logic or even electromagnetic relays ("homebrew relay computers").

Displaying the font on the TV screen after the redesign and adding symbols of the pseudographics and Russian letters in the KOI-8 encoding:

"Hardware" underline cursor added:

I tested the BASIC compiler on my "nanocomputer":

compilation

link

run :slight_smile:

Huzza!
My simulator passed the test DIAGNOSTICS II V1.2 - CPU TEST by SUPERSOFT ASSOCIATES:

Epic game "Star Trek" running in my "nanocomputer":

I'm going to try this on:

I would like to make a compact portable CP/M computer.

Thank you for your work.

It is a really cool project.

The project is unfrozen :slight_smile:

Successful tests of connection the PS/2-keyboard via the STM8 adapter made my "nanocomputer" autonomous.

So cpm4nano Mk V:
Arduino Nano 3.0 - emulates the i8080, provides work with memory and disks, performs video output and serial communication
RAM - 2 x 32 KB FM24C256-G I2C-chips
FDD - SD-card
input - PS/2-keyboard via STM8S103F3P6 adapter
output - in parallel to the video output (20 lines x 45 columns, font 4 x 8) and serial port (USB-UART converter)


P.S. I tested the connection to the tube TV (the clarity of the image is worse than on the LCD, but the synchronization is not broken and the font is readable).

"Handmade" case for "nanocomputer":

Added the ability to enable the "turbo" mode "on the fly" using the jumper - disabling the rendering of pixels in the TV frame, an analog of FAST MODE in ZX81. The BASIC test execution time is reduced in this mode from 120 to 70 seconds.

Adding a read-ahead/write-through instruction cache (single-line, 16 bytes) between the emulation core and I2C-memory accelerated the work of CP/M, for example, the time it took to complete DIR on a floppy disk with system files and tests was reduced by one and a half times.

Very nice! I love seeing emulator projects on AVR. But aren't you going to wear out the SD very quickly by using it as RAM?

You should take a look at the Teensy line of boards if you are interested in more memory and speed. They are compatible with the Arduino environment. The T4.0 is especially nice (600 MHz Cortex-M7, 1 MB RAM), and only $20!

I did a similar project recently, but with 8086 on a Mega2560.

EDIT: Nevermind, I see you stopped using SD for RAM. (Or I misunderstood the original post)