Skip to content

eneilson-zz/izkaypro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

182 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Ultimate Kaypro Emulator

Latest Release

What is this?

This is a Kaypro emulator that runs either in a terminal window on Linux, OSX, FreeBSD, and Windows or natively rendered using the original Kaypro chargen ROMs. The emulator supports multiple Kaypro models including Kaypro II, 4-84, Kaypro 10 with hard disk, TurboROM with or without hard disk, KayPLUS ROM variants, and the Micro Cornucopia PRO 884-MAX ROM. The emulator also supports SSDD and DSDD disk images where ROM-appropriate.

  • For best display results in terminal-only mode, set your terminal window to 86 x 28. You can also pass the --no-border parameter and use an 80x26 terminal window.
  • For the best native Kaypro experience, add the --chargen parameter and the emulator will render a Kaypro-native display, including graphics capability. You will lose copy/paste functionality in this mode.

This emulator is a fork of Ivan Izag's Kaypro II emulator. It extends Ivan's work and adds support for more Kaypro models and hardware components.

How to build and run

To build from source, install Rust 1.87 or later for your platform.

From the main directory:

  • Clone the repo and run cargo build --release
  • To run ./target/release/izkaypro

Other examples of running the emulator

  • ./target/release/izkaypro --model kaypro10 (launch with Kaypro 10 emulation in terminal mode)
  • ./target/release/izkaypro --model ultimate --chargen (launch a 4-84 Kaypro with TurboROM, HD, RTC and NZ-COM support using native rendering through the chargen ROMS)
  • ./target/release/izkapro --serial /dev/tty.usbserial-A60288TV --driveb ./disks/comm/k4-84-qterm.img (launch the 4-84 Kaypro with serial port attached to a USB serial cable and the QTerm terminal program disk inserted in drive B)

Run ./target/release/izkaypro -h to see all of the parameter options available.

Linux build dependencies

On Ubuntu/Debian, install the following packages before building:

sudo apt install libxkbcommon-dev libx11-dev libxcursor-dev libwayland-dev libgtk-3-dev

The Ulimate Kaypro

A Kaypro 4-84 with a TurboROM BIOS plus hard disk support is now working. Run ./izkaypro --model turbo_rom_hd to boot from a TurboROM hard disk image. Drives A and B are 5MB hard disk partitions. Drives C and D are DSDD floppy drives. RTC and serial port are also part of this machine.

But wait, there's more!

Add NZ-COM and ZSDOS to your Ultimate Kaypro

Now you can run the ultimate CP/M system on top of your ultimate Kaypro (the penultimate Kaypro?)! The CP/M replacement NZ-COM is loaded onto the turborom_nz.hd disk image. I also added the ZSDOS BDOS replacement that supports date/time stamping support in conjunction with the Kaypro real-time clock. Run ./izkaypro --model ultimate --chargen (--chargen is optional). Once booted, type nzcom. You will see the time displayed next to the system prompt. Type zxd to see a directory listing with time/date/modified columns.

One of the reasons the TurboROM-enabled Kaypro was so cool is that it allowed you to attach a hard drive yet still maintain a TPA size of 62.5k (about 8k better than what you can get with the standard Kaypro 10 HD BIOS). I also filled the turborom_nz.hd image (the image used with the ulimate Kaypro model) with useful applications and utilities. You can check these out in the different user directories

Welcome to peak 80's CP/M computing!

Kaypro Ultimate Screen

Authentic rendering using the CHARGEN ROMs and phosphor display**

Kaypro screen rendering using the original character generator ROMs is now available. Launch with --chargen to open a native window that renders any of the emulated machines using the actual Kaypro chargen ROM. Supports all video attributes (reverse, dim, blink, underline), cursor rendering via SY6545 CRTC, and full keyboard input including function keys and Ctrl/Shift modifiers. Chargen support is included in the default build.

Phosphor color options are available via --phosphor:

  • green (default) — P1 green phosphor: fg=#33FF33, bg=#002200, dim=#1A801A
  • amber — P3 amber phosphor: fg=#FFB833, bg=#221100, dim=#805C1A
  • white — P4 white phosphor: fg=#E0E0E0, bg=#181818, dim=#707070
  • blue — Cool blue phosphor: fg=#66BBFF, bg=#001122, dim=#335E80

Individual colors can be overridden with --phosphor-fg, --phosphor-bg, and --phosphor-dim using hex values:

./izkaypro --chargen --phosphor amber
./izkaypro --chargen --phosphor-fg "#FF6600" --phosphor-bg "#110500" --phosphor-dim "#803300"
./izkaypro --chargen --phosphor white --phosphor-dim "#909090"

Kaypro with Chargen ROM Support and Phosphor Screen

What is/was a Kaypro computer?

The Kaypro computer was a luggable computer first released in 1982 with further models released through the 1980s that was capable of running CP/M 2.2. It was considered "a rugged, functional and practical computer system marketed at a reasonable price." (From Wikipedia)

It's a typical CP/M computer of the early 80s, built on a metal case with standard components, a 9" green monochrome CRT, a detachable keyboard and two disk drives. Main features:

  • Zilog Z80 at 2.5 MHz or 4 MHz
  • 64 KB of main RAM
  • 2 - 8 KB of ROM
  • 2 - 4 KB of video RAM
  • 80*24 text mode (no graphics capabilities) with a 25th line for status displays, such as clock
  • Two single or double side double density drives with 200kb/400kb capacity (or hard disk + floppy on Kaypro 10)
  • One or more serial ports (SIO-1, Channel A is emulated for serial port connections on K4-84 models)
  • One parallel port (not emulated by izkaypro)

Supported Models

This version of the emulator supports the Kaypro II, 4/83, 2X/4-84, TurboROM, TurboROM+HD, KayPLUS ROM-enabled 4-84s, the Kaypro 10 with WD1002-05 hard disk controller, and the Micro Cornucopia PRO 884-MAX ROM. The emulator will probably work with other Kaypro ROMs, I just haven't tested them yet.

Model --model ROM Disk Format Video Mode
Kaypro II kaypro_ii 81-149c SSDD (200KB) Memory-mapped
Kaypro 4/83 kaypro4_83 81-232 DSDD (400KB) Memory-mapped
Kaypro 2X/4/84 kaypro4_84 81-292a DSDD (400KB) SY6545 CRTC
TurboROM 3.4 turbo_rom trom34 DSDD (400KB) SY6545 CRTC
TurboROM 3.4 + HD turbo_rom_hd trom34 DSDD floppies + HD SY6545 CRTC
KayPLUS 84 kayplus_84 kplus84 DSDD (400KB) SY6545 CRTC
Kaypro 10 kaypro10 81-478c 10MB HD + DSDD floppy SY6545 CRTC
Ultimate (NZ-COM/ZSDOS) ultimate trom34 DSDD floppies + HD SY6545 CRTC
PRO 884-MAX (Micro Cornucopia) pro884mx pro884_smx DSDD (400KB) SY6545 CRTC

TurboROM Non-Kaypro Floppy Format Support

The TurboROM machine variants (turbo_rom, turbo_rom_hd, and ultimate) now support several non-Kaypro floppy formats directly from raw .img files. This mirrors TurboROM's native foreign-format read capability.

Format Geometry Raw image size Notes
Osborne SSSD 40T x 1S x 10 x 256B 102,400 bytes Single-density (FM), sector IDs 1-10
Osborne SSDD (Advent 1K) 40T x 1S x 5 x 1024B 204,800 bytes Double-density (MFM), sector IDs 1-5
Xerox 820-1 SSSD 40T x 1S x 18 x 128B 92,160 bytes Single-density (FM), sector IDs 1-18
Epson QX-10 DSDD 40T x 2S x 16 x 256B 327,680 bytes Double-density (MFM), sector IDs 1-16 on both sides

Notes:

  • These are raw sector images (.img). If you start from flux/container formats like HFE/IMD, convert to raw IMG first.

Configuration

Edit izkaypro.toml to select the default Kaypro model by uncommenting the desired configuration:

# --- Kaypro II ---
# model = "kaypro_ii"

# --- Kaypro 4/83 ---
# model = "kaypro4_83"

# --- Kaypro 4/84 (default) ---
model = "kaypro4_84"

# --- TurboROM 3.4 ---
# model = "turbo_rom"

# --- TurboROM 3.4 + WD Hard Disk ---
# model = "turbo_rom_hd"

# --- KayPLUS 84 ---
# model = "kayplus_84"

# --- Kaypro 10 ---
# model = "kaypro10"

# --- Ultimate Kaypro ---
# model = "ultimate"

Optional: override default disk images in the .toml file by adding:

disk_a = "disks/my_boot_disk.img"
disk_b = "disks/my_data_disk.img"

More usage examples

izkaypro does not require installation, you just need the executable. It has the default ROM embedded as well as the boot CP/M disk and a blank disk in the second drive (if applicable). You can provide additional disk images as separate files. There are lots of disk images to play with in the ./disks directory.

Run using internal defaults (currently set to the Kaypro 4-84 machine)

  • ./target/release/izkaypro

Run using a different machine and disk images

  • ./target/release/izkaypro --model turbo_rom --driveb ./disks/games/Games.img

Run connecting to a serial device

  • ./target/release/izkapro --serial /dev/tty.usbserial-A60288TV --driveb ./disks/comm/k4-84-qterm.img

What the emulator looks like

By default, the emulator boots a Kaypro 4-84 machine with the CP/M 2.2g boot disk in drive A and a blank boot disk in drive B. You can type DIR to see a directory listing and B: to change drives.

Kaypro 4-84 Screen

Using and inserting different disk images

The ./disks/ directory contains a number of Kaypro disk images to try. When starting the emulator, you can provide disk images on the command with the --drivea path.to.disk.img or --driveb path.to.disk.img parameters.

While using the emulator, press F5 or F6 to insert a new disk image into drives A or B respectively (Note: CP/M likes to have the boot disk stay in drive A). Press F4 to exit the emulator.

If using the Kaypro II configuration, the images have to be raw binary images of single-sided, double-density disks. The size must be 204800 bytes. See disk images.

If using the Kaypro IV, 4-84, or 4-84 TurboROM/KayPLUS configurations, images can be either SSDD or DSDD disk images. Sample images of both sizes are provided in the disks directory. If you swap disks, some BIOS versions require you to warm boot (Ctrl-C) in order to re-load the new disk so that the BIOS will properly detect SSDD or DSDD format.

Note: KayPLUS-formatted disks use sector IDs 0-9 on both sides (side selected via port 0x14 bit 2), unlike standard Kaypro DSDD disks which use sector IDs 10-19 on side 1. The kayplus_84 model preset handles this automatically.

Kaypro II Screen

In-Program help

Press F1 to get additional help:

Kaypro Help Screen

To launch with Kaypro 10 support

The Kaypro 10 is a nice Kaypro machine to start with because it has DSDD disk drive (drive C) and a 10 MB hard disk partitioned into two 5 MB drives (A and B). From the main directory:

  • ./target/release/izkaypro --model=kaypro10 or run in native rending:
  • ./target/release/izkaypro --model=kaypro10 --chargen

Kaypro 10

Micro Cornucopia PRO 884-MAX ROM support

The PRO 884-MAX (also called "Max") was a third-party ROM replacement for the Kaypro 4-84, produced by Micro Cornucopia in the mid-1980s. It added a configurable status line with real-time clock display, enhanced BIOS features, and custom key remapping. The ROM was distributed with its own configuration utility (MCONFIG) and a disk full of utilities.

To launch:

  • ./target/release/izkaypro --model pro884mx
  • ./target/release/izkaypro --model pro884mx --chargen

Run MCONFIG from the boot disk to enable the status line, clock display, and other ROM features. The clock is driven by the Kaypro MM58167A RTC and displays live time in the status bar.

Command line usage

izkaypro [OPTIONS]

OPTIONS:
    -m, --model <MODEL>      Kaypro model preset
                             [models: kaypro_ii, kaypro4_83, kaypro4_84,
                              turbo_rom, turbo_rom_hd, ultimate, kayplus_84,
                              kaypro10, pro884mx, custom]
    -a, --drivea <FILE>      Disk image file for drive A
    -b, --driveb <FILE>      Disk image file for drive B
        --hd <FILE>          Hard disk image file for WD1002 models
        --rom <FILE>         Custom ROM file (implies --model=custom)
        --speed <MHZ>        CPU clock speed in MHz (1-100, default: unlimited)
        --serial <DEVICE>    Connect SIO-1 Port A to a serial device
        --chargen            Launch chargen rendering window
        --phosphor <COLOR>   Phosphor color: green (default), amber, white, blue
        --phosphor-fg <HEX>  Override foreground color (e.g. "#33FF33")
        --phosphor-bg <HEX>  Override background color (e.g. "#002200")
        --phosphor-dim <HEX> Override dim/half-intensity color (e.g. "#1A801A")
        --no-border          Run without screen border (fits in 80x26 terminal)
    -d, --diagnostics        Run ROM and RAM diagnostics then exit
        --boot-test          Run headless boot tests for all models then exit
    -h, --help               Print help information
    -V, --version            Print version information

TRACE OPTIONS:
    -c, --cpu-trace          Trace CPU instruction execution
    -i, --io-trace           Trace I/O port access
    -f, --fdc-trace          Trace floppy disk controller commands
    -w, --fdc-trace-rw       Trace floppy disk controller read/write data
    -s, --system-bits        Trace system bit changes
    -r, --rom-trace          Trace ROM entry point calls
        --bdos-trace         Trace CP/M BDOS calls
    -v, --crtc-trace         Trace SY6545 CRTC VRAM writes
        --sio-trace          Trace SIO-1 Channel A serial port
        --rtc-trace          Trace MM58167A real-time clock register access
        --hdc-trace          Trace WD1002-05 hard disk controller
        --trace-all          Enable all trace options

Resources

About

"Kaypro CP/M computer emulator. Supports Kaypro II, 4/83, 4-84, TurboROM, KayPLUS, and Kaypro 10 models with serial port and RTC emulation."

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 99.8%
  • Other 0.2%