Z80, CP/M, And FAT File Formats

[Gary Kildall] and CP/M are the great ‘also ran’ of the computing world; CP/M could run on thousands of different 1980s computers, and [Gary] saw a few million in revenue each year thanks to CP/M’s popularity. Microsoft, DOS, and circumstances have relegated [Kildall] and CP/M to a rather long footnote in the history of microcomputers, but that doesn’t mean CP/M is completely dead yet. [Marcelo] wrote a Z80 emulator running CP/M inside an Arduino Due, and he did it in such a way that it’s actually convenient and useful to use.

Instead of using CP/M disk images, [Marcelo]’s emulator emulates CP/M disk drives on top of a regular FAT file system. Drives are mapped to folders in the FAT file system, so a folder named ‘A’ will show up as the A: disk in CP/M. Drives up to P: are supported, the maximum number of drives available under CP/M. The BIOS resides in the root directory of the SD card, and so far Microsoft Basic, Turbo Pascal, UCD Micromumps, and Wordstar work just fine.

The Arduino project was built upon one of [Marcelo]’s earlier projects that put the CP/M emulator on Windows. The version for the Due works exactly how you think it would, with a serial connection and terminal emulator providing the IO, and the huge amount of processing power and RAM available on the Due doing all the heavy lifting.

18 thoughts on “Z80, CP/M, And FAT File Formats

    1. Hi Pixster, unfortunately I wrote it on Windows (initially), and then migrated the C code to the Arduino framework, which is also pretty different from Linux.
      The code can be migrated to Linux, and definitely run on the Pi, but that would require adapting the C code. I wrote it modular on purpose, to facilitate portability, but so far I did not adventure on migrating it to Linux.

  1. hello folks, I have downloaded the github source and tried to compile under latest arduino.cc The sdfat lib is complaining. I believe I have the latest.

    ?? Can you give some insight to which version of sdfat I need? (error on findFirst and getFilename).

    In the end, I am going to try to compile it on a nodeMCU ESP8266 chip.

    Note: I also have a Arduino Due + shield to test before I try the ESP8266.
    I have successfully compiled and am running CPM under Linux.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.