Farcall x86 emulator written in Rust implements DOS and GLaBIOS support
Farcall is a new Rust-based x86 emulator that models the IBM PC architecture and supports running MS-DOS via an open-source BIOS.
Summary
Farcall is a newly developed x86 emulator written in the Rust programming language, designed to model the original IBM PC and its 8088 CPU. The project progressed from executing simple COM files to successfully booting MS-DOS 2.0 by incrementally implementing CPU instructions and essential BIOS services.
To achieve compatibility with GLaBIOS, an open-source BIOS used on real IBM hardware, the emulator provides hardware modeling for the DMA controller, interval timer, and peripheral interface chips. The project currently supports terminal-based graphics via the Kitty graphics protocol and is being hosted on a public SSH server for remote access to classic software like NetHack and GW-BASIC.
Technical implementation of Farcall
- CPU and Instruction Modeling: The emulator implements the 8088 instruction set, building up from basic execution to support complex MS-DOS environments.
- Hardware Emulation: To support the GLaBIOS open-source BIOS, the project emulates critical legacy components including the DMA controller, interval timer, and peripheral interface chips.
- Graphics Rendering: CGA graphics are rendered in terminal windows using 4-bit indexed PNG frames via the Kitty graphics protocol, which reportedly reduces frame preparation time by over 70 percent.
- Memory Mapping: The implementation accounts for specific legacy hardware quirks, such as the CGA video memory layout where odd-numbered scanlines begin at an 8 KiB offset.
Why it matters
This project demonstrates the utility of Rust for low-level systems emulation and hardware modeling. By supporting open-source BIOS like GLaBIOS and modern terminal protocols like Kitty, it bridges the gap between vintage computing architecture and contemporary Linux/macOS terminal environments.
Original reference: blog.adafruit.com →