{"id":36836985,"url":"https://github.com/ivanizag/iz-cpm","last_synced_at":"2026-01-12T14:24:43.089Z","repository":{"id":54832139,"uuid":"256995402","full_name":"ivanizag/iz-cpm","owner":"ivanizag","description":"Portable CP/M emulation to run CP/M 2.2 binaries for Z80","archived":false,"fork":false,"pushed_at":"2025-05-11T17:26:02.000Z","size":2790,"stargazers_count":91,"open_issues_count":2,"forks_count":13,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-11T18:29:49.902Z","etag":null,"topics":["cpm","cpm22","z80"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanizag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-19T12:37:05.000Z","updated_at":"2025-05-11T17:26:05.000Z","dependencies_parsed_at":"2024-07-13T19:26:01.071Z","dependency_job_id":null,"html_url":"https://github.com/ivanizag/iz-cpm","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ivanizag/iz-cpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanizag%2Fiz-cpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanizag%2Fiz-cpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanizag%2Fiz-cpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanizag%2Fiz-cpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanizag","download_url":"https://codeload.github.com/ivanizag/iz-cpm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanizag%2Fiz-cpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpm","cpm22","z80"],"created_at":"2026-01-12T14:24:39.765Z","updated_at":"2026-01-12T14:24:43.077Z","avatar_url":"https://github.com/ivanizag.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iz-cpm -- CP/M 2.2 environment\n\n## What is this?\n\nThis is a CP/M 2.2 execution environment. It provides everything needed to run a standard CP/M for Z80 or 8080 binary.\n\nUses my [iz80](https://github.com/ivanizag/iz80) library for Zilog Z80 and Intel 8080 emulation.\n\nMade with Rust\n\nNote that iz-cpm is a very basic implementation, mostly for educational purposes. I recommend MockbaTheBorg's [RunCPM](https://github.com/MockbaTheBorg/RunCPM) or Udo Munk's [Z80pack](https://github.com/udo-munk/z80pack/blob/master/doc/README-cpm.txt) for a much more complete CP/M emulation. \n\n## Installation\nExtract the [latest zip](https://github.com/ivanizag/iz-cpm/releases) for Linux, MacOS or Windows. Optionally run `download.sh` or `download.bat`  to download the CP/M 2.2 system disk, Microsoft Basic, Turbo Pascal, Lisp and some games.\n\n## Build from source\nTo build from source, install the latest Rust compiler, clone the repo and run `cargo build --release`. To cross compile to Windows, install the target with `rustup` and run `cargo build --release --target x86_64-pc-windows-gnu`.\n\n## Usage examples\n\nExecute `iz-cpm` to open the CP/M command prompt (the CCP) on the current directory:\n```console\ncasa@servidor:~/software/cpm22$ ls\nASM.COM      CCSINIT.COM   DISKDEF.LIB  iz-cpm        STAT.COM\nCBIOS.ASM    CCSYSGEN.COM  DUMP.ASM     LOAD.COM      STDBIOS.ASM\nCCBIOS.ASM   CPM24CCS.COM  DUMP.COM     MOVCPM.COM    SUBMIT.COM\nCCBOOT.ASM   DDT.COM       ED.COM       PIP.COM       SYSGEN.COM\n-CCSCPM.251  DEBLOCK.ASM   GENMOD.COM   RLOCBIOS.COM\ncasa@servidor:~/software/cpm22$ ../../iz-cpm \niz-cpm https://github.com/ivanizag/iz-cpm\nCP/M 2.2 Copyright (c) 1979 by Digital Research\nPress ctrl-c ctrl-c to return to host\n\nA\u003edir\nA: CCSINIT  COM : MOVCPM   COM : CPM24CCS COM : STAT     COM\nA: SYSGEN   COM : STDBIOS  ASM : IZ-CPM       : LOAD     COM\nA: DISKDEF  LIB : ASM      COM : RLOCBIOS COM : DUMP     COM\nA: -CCSCPM  251 : CCBIOS   ASM : DUMP     ASM : CCSYSGEN COM\nA: DEBLOCK  ASM : ED       COM : SUBMIT   COM : DDT      COM\nA: PIP      COM : CBIOS    ASM : CCBOOT   ASM : GENMOD   COM\nA\u003e\n```\n\nExecute `iz-cpm` with a file to execute a CP/M binary directly, bypassing the CPP:\n```console\ncasa@servidor:~$ ./iz-cpm software/OBASIC.COM \n44531 Bytes free\nBASIC Rev. 4.51\n[CP/M Version]\nCopyright 1977 (C) by Microsoft\nOk\nprint \"hello\"\nhello\nOk\n\n```\n\nMap up to 16 directories as CP/M drives:\n```console\ncasa@servidor:~$ ./iz-cpm --disk-a software/cpm22 --disk-b software/zork --disk-e .\niz-cpm https://github.com/ivanizag/iz-cpm\nCP/M 2.2 Copyright (c) 1979 by Digital Research\nPress ctrl-c ctrl-c to return to host\n\nA\u003eb:\nB\u003edir\nB: ZORK2    DAT : ZORK1    COM : ZORK3    DAT : ZORK3    COM\nB: FILE_ID  DIZ : ZORK1    DAT : ZORK1    SAV : ZORK2    COM\nB\u003ezork1\nZORK I: The Great Underground Empire\nCopyright (c) 1981, 1982, 1983 Infocom, Inc. All rights\nreserved.\nZORK is a registered trademark of Infocom, Inc.\nRevision 88 / Serial number 840726\n\nWest of House\nYou are standing in an open field west of a white house, with\na boarded front door.\nThere is a small mailbox here.\n\n\u003e\n```\n\n## Usage\n```\niz-cpm https://github.com/ivanizag/iz-cpm\nCP/M 2.2 Copyright (c) 1979 by Digital Research\nPress ctrl-c ctrl-c to return to host \n\nUSAGE:\n    iz-cpm [FLAGS] [OPTIONS] [ARGS]\n\nFLAGS:\n    -t, --call-trace        Traces BDOS calls excluding screen I/O\n    -T, --call-trace-all    Traces BDOS and BIOS calls\n    -z, --cpu-trace         Traces Z80 instructions execution\n    -h, --help              Prints help information\n    -s, --slow              Runs slower\n    -V, --version           Prints version information\n\nOPTIONS:\n        --cpu \u003cmodel\u003e            cpu model z80 or 8080 [default: z80]\n    -a, --disk-a \u003cpath\u003e          directory to map disk A: [default: .]\n    -b, --disk-b \u003cpath\u003e          directory to map disk B:\n    -c, --disk-c \u003cpath\u003e          directory to map disk C:\n    -d, --disk-d \u003cpath\u003e          directory to map disk D:\n        --disk-e \u003cpath\u003e          directory to map disk E:\n        --disk-f \u003cpath\u003e          directory to map disk F:\n        --disk-g \u003cpath\u003e          directory to map disk G:\n        --disk-h \u003cpath\u003e          directory to map disk H:\n        --disk-i \u003cpath\u003e          directory to map disk I:\n        --disk-j \u003cpath\u003e          directory to map disk J:\n        --disk-k \u003cpath\u003e          directory to map disk K:\n        --disk-l \u003cpath\u003e          directory to map disk L:\n        --disk-m \u003cpath\u003e          directory to map disk M:\n        --disk-n \u003cpath\u003e          directory to map disk N:\n        --disk-o \u003cpath\u003e          directory to map disk O:\n        --disk-p \u003cpath\u003e          directory to map disk P:\n        --terminal \u003cterminal\u003e    Terminal emulation ADM-3A or ANSI [default: adm3a]\n\n\nARGS:\n    \u003cCMD\u003e     The binay image to run, \n    \u003cARGS\u003e    Parameters for the given command\n```\n\n## Features\n\n- Execution of 8080 and Z80 binaries on top of CP/M\n- Direct usage of the host computer filesystem\n- Terminal emulation of ADM-3A as used in the KAYPRO computers\n- Z80 emulation validated with ZEXALL\n- CPU execution tracing\n- BDOS and BIOS tracing\n- Portable, runs in Linux, MacOS and Windows. Mmm, not in CP/M.\n\n## How does it work\n\n[CP/M](https://en.wikipedia.org/wiki/CP/M) was designed to be portable to a variety of devices using Intel 8080, Intel 8085 or Zilog Z80 processors thanks to a tiered architecture. The main parts of CP/M are:\n\n- The BIOS: Basic Input/Output system. Interface with the hardware. CP/M defines a very small interface: 16 entrypoints to manage I/O and access to disk sectors. The hardware vendors provided the BIOS for their device based on source code available on the CP/M distribution.\n- The BDOS: Basic Disk Operating System. Main component of CP/M. Provided by Digital Research and common to all systems. Provides the high level entrypoints to be used by application developpers.\n- The CCP: Console Command Processor. The CP/M Command prompt.\n\nTo emulate this environment using the host filesystem, we have to provide a replacement BDOS translating as we don't want to relay on the physical disk sectors abstraction of the BIOS. The main components are:\n\n- Z80 emulator. It uses [iz80](https://github.com/ivanizag/iz80)\n- [BIOS](src/bios.rs) emulator. Only the I/O entrypoints. In theory, it shouldn't be necessary, but some programs use it directly, bypassing BDOS.\n- [BDOS](src/bdos.rs) emulator. Traps the calls and executes code on the  host.\n- CPP. Runs natively, no emulation needed. We use ZCPR1 an open source alternative. See [cpmish](http://cowlark.com/cpmish/) for other open source alternatives to the CP/M binaries. The CPP binary from CP/M 2.2 can be used optionally.\n- [Terminal](src/terminal.rs) emulator. CP/M does not define how the terminal should work. Applications needed to be aware and usually could be configured for several leading options, like ADM-3a, VT-52, Hazeltine 1500 and Osborne. This emulator supports ADM-3a used also on the very popular Kaypro computers.\n\n## Useful links:\n\n- [The Unoffcial CP/M Web site](http://www.cpm.z80.de/)\n- [CP/M Operating System Manual](http://www.gaby.de/cpm/manuals/archive/cpm22htm/)\n- [CP/M Software in retroarchive.org](http://www.retroarchive.org/cpm/)\n\n## TODO\n- Proper documentation\n- File level read-only option (I won't do that, the host can control that)\n- BIOS support for punch cards (Nope)\n- BIOS support for track/sector access to disks (Not needed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanizag%2Fiz-cpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanizag%2Fiz-cpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanizag%2Fiz-cpm/lists"}