[!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.
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
.580snapshots, raw.krssubprogram loading, direct.txt/.xlsximport and export, and printer PDF generation. - Graphical installer, uninstaller, terminal launcher, optional
.580file association, 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 A4 PDF export. |
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.0or newer. - A desktop environment capable of running native iced windows.
Install from crates.io
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
The NixOS package installs ready-to-run k580 and kr binaries, the desktop entry, icons, and the .580 MIME type directly through the Nix store. The standalone setup wizard is not used for this path.
Run from source
Build the GUI binary
The built application is placed under target/release/ as k580 or k580.exe.
Build the standalone setup artifact
Windows:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build_installer.ps1
Unix/macOS:
The setup artifact is written to dist/.
Usage
# Launch the emulator from source
# Open a snapshot through the launcher
# Show launcher help
After installation, kr can open .580 snapshots from the terminal and can register or remove the file association 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. |
.pdf |
Printer output rendered as A4 text with bundled Roboto Mono. |
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
Useful reference docs: