$ Rust PET Emulator
A Commodore PET 4032 emulator written in Rust. The PET was Commodore's first full-featured computer (1977), featuring a 1 MHz MOS 6502 CPU, 32KB RAM, and a distinctive built-in cassette tape drive. This emulator faithfully recreates the hardware for running classic PET software with keyboard input, file loading, and authentic 40-column display rendering.
quick start
cargo run --release ### features
- - MOS 6502 CPU — Complete emulation with official opcodes at 1 MHz speed
- - BASIC 4.0 — Full Commodore BASIC interpreter with ROM support
- - Keyboard Input — Type on virtual PET keyboard using your physical keyboard
- - .prg File Loader — Load and run Commodore PET programs with file browser
- - 40-Column Display — Authentic character-based video output with SDL2
- - 32KB RAM — Accurate memory layout with ROM bank switching
### controls
Keyboard — Type on the virtual PET keyboard F2 — Open file browser to load .prg files ↑/↓ — Navigate files in file browser Enter — Select and load a file Backspace — Navigate to parent directory Escape — Exit the emulator ### requirements
Rust toolchain (1.80+)
SDL2 development libraries
MOS 6502 emulator crate
ubuntu/debian
sudo apt install libsdl2-dev libsdl2-ttf-dev arch linux
sudo pacman -S sdl2 sdl2_ttf macos
brew install sdl2 sdl2_ttf ### running
cargo build --release — Build optimized binary cargo run --release — Build and run Software for the PET is available at: zimmers.net
### learn more
Experience computing history by running classic PET software. The emulator includes all necessary ROM files and provides an authentic 8-bit computing experience.