| Crates.io | kz80_ws |
| lib.rs | kz80_ws |
| version | 0.1.1 |
| created_at | 2025-12-21 04:31:31.527221+00 |
| updated_at | 2025-12-21 04:31:31.527221+00 |
| description | WordStar clone for Z80 - Retro word processor on the RetroShield |
| homepage | https://github.com/ajokela/kz80_ws |
| repository | https://github.com/ajokela/kz80_ws |
| max_upload_size | |
| id | 1997375 |
| size | 108,146 |
A WordStar-compatible text editor for the RetroShield Z80. This project generates a Z80 ROM binary that implements a classic WordStar-style text editor with VT100 terminal output.
retroshield-z80-workbench crate (automatically fetched from crates.io)cargo build --release
./target/release/kz80_ws output.bin
Or simply:
cargo run -- output.bin
This generates a Z80 ROM binary file (~4KB) that can be loaded into a RetroShield Z80 or compatible emulator.
# Using the RetroShield emulator
../emulator/rust/target/release/retroshield output.bin
# Or with the TUI debugger (recommended)
../emulator/rust/target/release/retroshield_tui --vt220 output.bin
# Or with the C emulator
../emulator/retroshield output.bin
| Key | Action |
|---|---|
| ^E | Cursor up |
| ^X | Cursor down |
| ^S | Cursor left |
| ^D | Cursor right |
| ^A | Word left |
| ^F | Word right |
| ^QS | Beginning of line |
| ^QD | End of line |
| ^QR | Top of file |
| ^QC | End of file |
Arrow keys are also supported via VT100 escape sequences.
| Key | Action |
|---|---|
| ^G | Delete character right |
| DEL/^H | Delete character left (backspace) |
| ^Y | Delete entire line |
| ^N | Insert new line |
| ^V | Toggle insert/overwrite mode |
| Enter | New line |
| Key | Action |
|---|---|
| ^KB | Mark block begin |
| ^KK | Mark block end |
| ^KC | Copy block to cursor position |
| ^KV | Move block to cursor position |
| ^KY | Delete marked block |
| Key | Action |
|---|---|
| ^KS | Save file |
| ^KD | Save and exit |
| ^KQ | Quit without saving |
| Key | Action |
|---|---|
| ^QR | Go to top of file |
| ^QC | Go to end of file |
| ^QS | Go to start of line |
| ^QD | Go to end of line |
| ^QF | Find text |
| Key | Action |
|---|---|
| ^J | Show help screen |
| ESC | Escape key prefix (for arrow keys) |
+------------------------------------------------------------------+
| Status: filename | L:nnn C:nnn Ins/Ovr [*] | <- Row 1
+------------------------------------------------------------------+
| ^K=Block ^Q=Quick ^S=Left ^D=Right ^E=Up ^X=Down ^Y=DelLn ^J=Help | <- Row 2
+------------------------------------------------------------------+
| (separator line) | <- Row 3
+------------------------------------------------------------------+
| |
| Text editing area | <- Rows 4-22
| (19 lines) |
| |
+------------------------------------------------------------------+
| (separator line) | <- Row 23
+------------------------------------------------------------------+
| Messages appear here | <- Row 24
+------------------------------------------------------------------+
| Address Range | Size | Usage |
|---|---|---|
| 0x0000-0x1FFF | 8KB | ROM (generated code and data) |
| 0x2000-0x20FF | 256B | System variables |
| 0x2100-0x21FF | 256B | Input buffer |
| 0x2200-0x22FF | 256B | Filename buffer |
| 0x2300-0x23FF | 256B | Search/replace strings |
| 0x2800-0x3BFF | 5KB | Text buffer |
| 0x3C00-0x3DFF | 512B | Line index table |
| 0x3E00-0x3FFF | 512B | Stack |
The editor requires a VT100-compatible terminal with:
| Port | Usage |
|---|---|
| 0x80 | MC6850 ACIA status register |
| 0x81 | MC6850 ACIA data register |
| 0x10-0x1F | SD card storage interface |
Files are saved in authentic WordStar format:
kz80_ws/
├── Cargo.toml # Rust package configuration
├── LICENSE # BSD 3-Clause license
├── README.md # This file
└── src/
├── main.rs # Entry point - generates ROM file
├── lib.rs # Library exports
└── codegen.rs # Z80 code generation (~2800 lines)
The project uses a code generation approach rather than cross-compilation:
WordStarCodeGen struct builds Z80 machine code by emitting raw bytesretroshield-z80-workbench for I/O and terminal controlThis approach provides:
Contributions are welcome! Please feel free to submit issues or pull requests.
BSD 3-Clause License - see LICENSE for details.