kr580 2.0.0

Desktop KR580VM80 / Intel 8080 emulator.
Documentation

[!TIP] Russian version: README.md

KR580 is a modern desktop emulator for a KR580 / Intel 8080-style microprocessor system. It keeps the CPU core deterministic, models external devices through typed I/O ports, and presents the machine through a native multi-window GUI.

The project focuses on inspectable execution: edit RAM and registers, step by instruction or by tact, watch the control panels update live, open device windows, save snapshots, and export state without scraping UI widgets.

[!NOTE] KR580 features:

  • Deterministic KR580 / Intel 8080 CPU state: registers, flags, PC, SP, 64 KiB RAM, interrupts, halt state, cycles, and tact phase.
  • Documented 8080 opcode execution with tests for opcode families, flags, conditionals, stack operations, interrupts, and I/O routing.
  • Instruction stepping, tact-level stepping, paced run, and burst run modes.
  • Native iced desktop UI with RAM list, register editor, status register, machine-cycle view, control schematic, and localized Russian/English installer text.
  • External device windows for monitor, floppy, HDD, network adapter, and printer.
  • Versioned .580 snapshots, raw .krs subprogram loading, direct .txt / .xlsx import and export, and native printing with driver settings.
  • Graphical installer, uninstaller, terminal launcher, optional .580 and .krs file associations, and portable or system install layouts.

Screenshots

External devices

IoBus routes the low byte of I/O port addresses to five modeled devices:

Port Device What it does
00h Monitor 64×20 text framebuffer plus 256×256 graphics layer.
01h Floppy File-backed or debug-buffer storage window.
02h HDD Append-backed hdd.kpd storage with visible buffer inspection.
03h Network adapter TCP client/server worker with RX/TX counters and explicit connection state.
04h Printer CP866 spool, buffered output, and asynchronous system printing.

Device operations return typed statuses and errors. The CPU core talks to them only through IN / OUT, so emulator state stays serializable and testable.

Installation

Requirements

  • Rust 1.95.0 or newer.
  • A desktop environment capable of running native iced windows.

Install from crates.io

cargo install kr580

This path is for the published crates.io release. Until the package is published, use the source build or the standalone setup artifact.

Install on NixOS

nix run github:WhoSowSee/KR580
nix profile install github:WhoSowSee/KR580

The NixOS package installs ready-to-run k580 and kr binaries, the desktop entry, icons, and the .580 / .krs MIME types directly through the Nix store. The standalone setup wizard is not used for this path.

Run from source

git clone https://github.com/WhoSowSee/KR580.git
cd KR580
cargo run -p kr580

Build the GUI and launcher

cargo build --release -p kr580 --bin k580 --bin kr

The built binaries are placed under target/release/ as k580 / kr or k580.exe / kr.exe.

Build the standalone setup artifact

Windows:

powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build_installer.ps1

Unix/macOS:

bash scripts/build_installer.sh

The setup artifact is written to dist/.

Usage

# Launch the emulator from source
cargo run -p kr580

# Open a snapshot or subprogram through the launcher
cargo run -p kr580 --bin kr -- path/to/program.580

# Show launcher help
cargo run -p kr580 --bin kr -- --help

After installation, kr can open .580 snapshots and .krs subprograms from the terminal and can register or remove their file associations when the platform supports it.

File formats

Format Purpose
.580 Versioned little-endian emulator snapshot with magic K580.
.krs Raw subprogram bytes loaded at a caller-provided base address.
.txt Plain-text register, flag, and memory exports; also importable.
.xlsx Workbook export/import through rust_xlsxwriter and calamine.

Workspace layout

Crate Responsibility
k580-core Public CPU core: state, opcode decode/execute, timing, interrupts, and PortBus.
kr580 Public installable crate: desktop UI, launcher, installer, uninstaller, platform shims, and internal backend, devices, and persistence modules.

Development

cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Useful reference docs:

Star History