Skip to content

jscrane/cpm80

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 21, 2025
0fabbc5 · Mar 21, 2025

History

82 Commits
Mar 7, 2025
Aug 26, 2024
Mar 21, 2025
Sep 13, 2024
Dec 11, 2014
Mar 14, 2025
Oct 17, 2024
Mar 14, 2025
Mar 7, 2025
Jan 4, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Aug 29, 2024

Repository files navigation

CP/M-80

CP/M 8080 hardware emulator on Stellarpad, ESP8266 and ESP32, using r65emu.

Creating disks

Install cpmtools:

$ sudo apt install cpmtools

Create a disk image:

$ mkfs.cpm foo

Copy files into it:

$ cpmcp foo bar baz 0:

Put it into disks/:

$ mv foo disks

Edit disks/drivemap.txt to assign the new disk to a drive.

Use of SD card storage is recommended where possible.

CP/M in ROM

A previous system was a "CP/M in ROM".

This consisted of two files (see the directory system):

  • CBIOS.ASM the "skeletal CBIOS" from Appendix B of the CP/M 2.2 manual
  • CPM22.ASM CP/M 2.2 itself, from here

Each of these was assembled to its corresponding .bin file by asm8080 and from there to .h by makerom:

$ asm8080 CPM22.ASM
$ makerom -bp CPM22.h cpm22 > cpm22.h

The ROMs were loaded at addresses 0xe400 (cpm22) and 0xfa00 (cbios), leaving 57kB free.

Booting CP/M from disk

The next system loads CP/M from disk, as nature intended. The boot disk cpma.cpm comes from the excellent emu8080.

A modified 8080 port-mapping supports the BIOS found on this disk (see io.cpp). The file system/bios8080.asm (from z80pack) is compatible with this port-mapping scheme --- it's a near ancestor of the BIOS in emu8080.

The system tracks for this are broken out into system/system.bin. This can be used to create bootable disk-images as follows:

$ mkfs.cpm -b system.bin foo.cpm

z80pack

A later implementation used a bootable system image produced by putsys from z80pack in conjunction with mkfs.cpm from cpmtools.

This BIOS has support for hard-disk images (4MB).