Go Down

Topic: CP/M computer on Arduino Nano 3.0 (Read 4690 times) previous topic - next topic

FoxyLab

Mar 21, 2017, 04:51 pm Last Edit: Mar 21, 2017, 04:58 pm by FoxyLab
Greetings to all lovers of Arduino and old school computing! Nostalgia for the eight-bit computers of my youth led me to this project :-) - CP/M 2.2 computer from ... what would you think? ... Arduino Nano 3.0!

For weeks two or three I made the i8080 processor emulator for Arduino Nano (it passes the test from MICROCOSM) and adapted the CP / M.
The main problem - Arduino has only 2 (!) KB of RAM. But we also have an SD card - I made a 4-line cache (32 bytes) to this card, and the card itself emulated all 64 KB of RAM. Although I applied the most primitive cache management algorithm, the speed of work is not so bad.
At the same time, this card also emulates four floppy disks.

Here's the quick-and-dirty prototype of my work:


Yes, I did not use the adapter for the card, I inserted it into the connector of the cable from the five-inch drive. :-)

To communicate with a computer, I use a terminal program (in the future I plan a PS/2 keyboard and an LCD screen or connect to a TV).

Here is a screenshot of the memory check:


CP/M Download:


CPU Test:


DIR command:


My first program in BASIC for the past twenty (!)))) years:

(I launched TinyBASIC).

Are you interested in such a project?

Groove

Per Arduino ad Astra


Isaac96

That is great!
Another person (i think it was on here) used a Mega1284, which was probably easier relatively speaking. One thing-there is a VGAout library somewhere. You might be able to output to a vga screen and have a command line!
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

FoxyLab

That is great!
Another person (i think it was on here) used a Mega1284, which was probably easier relatively speaking. One thing-there is a VGAout library somewhere. You might be able to output to a vga screen and have a command line!
Many thanks! I plan to add PS/2 keyboard and LCD screen (or TV-out - but this required additional microcontroller as VGA-controller).

Isaac96

Awesome. That sounds amazing. Please post when that is complete.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

FoxyLab

I uploaded on YouTube realtime video of my project in action:
https://youtu.be/LHFmt3qWAuY

thomai

Simply awesome!!!

But why didn't you use a SPI RAM extension?

petersieg

Where is the source? ;-)
Would like to give it a try..
Very interesting to use a 64kb area on sd card to mimick ram memory.
I assume the 4 floppy images are dd-ed on 4 partitions of the sd card?

Please keep this code as a separate (version 1) project, before you introduce ps/2 kb und display.

thx,

Peter

FoxyLab

#9
Mar 23, 2017, 10:04 pm Last Edit: Mar 23, 2017, 10:22 pm by FoxyLab
Simply awesome!!!

But why didn't you use a SPI RAM extension?
Thanks!
In future probably as an option (Ferroelectric RAM).

FoxyLab

#10
Mar 23, 2017, 10:15 pm Last Edit: Mar 23, 2017, 11:00 pm by FoxyLab
Where is the source? ;-)
Would like to give it a try..
Very interesting to use a 64kb area on sd card to mimick ram memory.
I assume the 4 floppy images are dd-ed on 4 partitions of the sd card?

Please keep this code as a separate (version 1) project, before you introduce ps/2 kb und display.

thx,

Peter
1. I will uploaded source in my GitHub repository - I believe, by the beginning of next week.
2. I use 4 GB SDHC Card, so i trade free space for simplifying - i write one line cache at the beginning of each sector (64 bytes of 512 bytes)   (cache has 8 lines of 64 bytes)  ->  65536/64 sectors to all RAM.
3. No, i dont use partitions on SD Card - raw read/write only.

petersieg

Thx. Would be glad if you upload also your sd card image so that one can write it directly with dd on a card.

Peter

FoxyLab

Thx. Would be glad if you upload also your sd card image so that one can write it directly with dd on a card.

Peter
O.K.

pito

#13
Mar 24, 2017, 05:05 pm Last Edit: Mar 24, 2017, 05:22 pm by pito
I've got stm32duino (stm32F103zet6 board) with 64kB internal and 512kB of external sram (wired via FSMC). The 512kB of sram could be used for the heap. I can allocate the 64kB of CP/M's RAM with malloc() in that 512kB space easily.
So I may try to run your code on it, when available..
FYI:
External sram on stm32duino



FoxyLab

I've got stm32duino (stm32F103zet6 board) with 64kB internal and 512kB of external sram (wired via FSMC). The 512kB of sram could be used for the heap. I can allocate the 64kB of CP/M's RAM with malloc() in that 512kB space easily.
So I may try to run your code on it, when available..
FYI:
External sram on stm32duino
Thanks!
But my target was Nano. For fun i plan in future connect Nano to 32+32 KBytes Ferroelectric RAM (FRAM) (~1.2$ on eBay) as option.

Go Up