$ IMSAI 8080 Emulator

View on GitHub →

A Rust emulator for the IMSAI 8080, the 1975 S-100 bus computer made famous in the movie WarGames. Emulates the Intel 8080 CPU, 64KB RAM, Tarbell FD1771 floppy disk controller, and IMSAI SIO-2 dual serial board with 8251A UARTs. Two front ends: a raylib interactive front panel GUI with toggle switches, LEDs, and a live hex memory editor, and a CLI terminal mode.

IMSAI 8080 Emulator front panel GUI

### hardware emulated

  • - Intel 8080 CPU - Full instruction set emulation (opcode table, programmer's manual)
  • - 64KB RAM - Initialized to 0xFF on power-up (floating bus)
  • - Tarbell 1011 FDC - WD FD1771, 8" SSSD format (ports 0x48-0x4B)
  • - IMSAI SIO-2 - Dual 8251A UART serial board (ports 0x00-0x03)
  • - Video Display - 80x24 CRT terminal (Channel A UART output)
  • - S-100 Bus - Port-mapped I/O dispatch to inline cards (no dynamic dispatch)
  • - Front Panel - Toggle switches, LEDs, EXAMINE/DEPOSIT/RUN/STOP

### hardware reference

memory map

The full 64K address space is RAM. There is no ROM, no BIOS, no firmware. Memory initializes to 0xFF (floating bus). Programs should not assume memory is zeroed.

Address Range Contents
0x0000-0xFFFF 64K RAM (0xFF on power-up)

i/o port map

Unclaimed ports return 0xFF on read and ignore writes.

Port(s) Card Register
0x00SIO-2Channel A data (console in/out)
0x01SIO-2Channel A status/command
0x02SIO-2Channel B data
0x03SIO-2Channel B command/status
0x48TarbellFD1771 status (read) / command (write)
0x49TarbellFD1771 track register
0x4ATarbellFD1771 sector register
0x4BTarbellFD1771 data register
0x79SIO-2Channel A status alias
0x7BSIO-2Channel A data alias
0xF8-0xFBTarbellFD1771 register aliases
0xFCTarbellDRQ/wait status (bit 7)
0xFDTarbellFixed 0x00
0xFFTarbellFixed 0x03

console uart (intel 8251a)

The console is an Intel 8251A UART at ports 0x00 and 0x01. It must be initialized before use. TxRDY is bit 0 (0x01), not bit 1. Using ANI 0x02 when you mean ANI 0x01 checks the wrong flag and hangs.

port 0x01 status bits

Bit Value Meaning
00x01TxRDY - transmitter ready
10x02RxRDY - character available to read

initialization sequence

MVI A, 0x4E    ; mode: 8N1, 16x baud
OUT  0x01      ;
MVI A, 0x05    ; command: enable TX and RX
OUT  0x01      ;

video display (80x24 crt terminal)

Characters written to UART Channel A (OUT port 0x00) appear on the video display. The display is an 80-column by 24-row CRT terminal — it is the output side of the console UART, not a separate I/O device.

Feature Value
Columns80
Rows24
InputChannel A TX output (port 0x00 writes)
Control charactersCR (0x0D), LF (0x0A), BS (0x08)
ScrollingAutomatic when cursor passes the last row

floppy controller (wd fd1771)

The Tarbell 1011 board wraps the FD1771 at ports 0x48-0x4B (aliases at 0xF8-0xFB). Disk format: 8" SSSD, 77 tracks, 26 sectors/track, 128 bytes/sector. Sectors numbered 1-26. Tracks 0-1 reserved for system.

Offset Read Write
+0 (0x48)StatusCommand
+1 (0x49)Track registerTrack register
+2 (0x4A)Sector registerSector register
+3 (0x4B)Data registerData register

front panel

The front panel is not on the I/O bus. It directly accesses the address bus, data bus, and CPU control lines. It works even with no software loaded.

status leds

LED Meaning
ADDRESS (16)Current address bus value
DATA (8)Current data bus value
PROG OUT (8)Latched from data bus on every OUT instruction (active-low on real hardware, inverted in emulator: 1 = LED on)
RUNCPU is executing
WAITCPU in wait state
M1Instruction fetch cycle
HLTACPU halted (HLT instruction)
INTInterrupt pending
HLDAHold acknowledge
MEMRMemory read active
WOWrite-output (lit when NOT writing)
IORI/O read active
IOWI/O write active
POWERSystem powered on

### downloads

Pre-built binaries from the latest release. Each archive contains both imsai-cli (terminal) and imsai-gui (front panel).

Linux (x86_64) - imsai-8080-emulator-x86_64-unknown-linux-gnu.tar.gz
macOS (Apple Silicon) - imsai-8080-emulator-aarch64-apple-darwin.tar.gz
Windows (x86_64) - imsai-8080-emulator-x86_64-pc-windows-msvc.zip

### building from source

Rust toolchain (1.80+)
raylib development libraries (for GUI)

ubuntu/debian

sudo apt install libraylib-dev

arch linux

sudo pacman -S raylib

macos

brew install raylib

### running

From a release binary, just extract and run. From source, use cargo.

front panel gui (binary)

./imsai-gui

terminal mode (binary)

./imsai-cli --program programs/hello-world.json

front panel gui (source)

cargo run --bin imsai-gui

terminal mode (source)

cargo run --bin imsai-cli -- --program programs/hello-world.json

### controls

Mouse on switches - Toggle address/data bits
RUN/STOP or F5 - Start/stop CPU
STEP - Single instruction
EXAMINE / DEPOSIT - Read/write memory at address switches
F2 - Load program (.json picker)
F3 - Save memory to file
F4 - Mount disk image into drive A (.img/.dsk picker)
F6 - Toggle CONSOLE / live memory editor (read-only while running)
Ctrl+Enter - Run from cursor address in memory editor
R - Cold reset (when stopped)
Ctrl+K - Command mode (CLI: load, mount, reset, quit)
Ctrl+D - Exit (CLI)