Farcall is a Rust-based emulator for the original IBM PC and its 8088 processor, built as a hands-on way to learn how vintage computers work. It can be tried over SSH, where users reach DOS and can run programs including Zork, NetHack, GW-BASIC, Sopwith, and Digger Remastered. The project began with a small goal - running a COM program that prints “Hello World” - but that required implementing CPU instructions as well as DOS and BIOS services. From there, the emulator grew to boot PC-DOS from a floppy image, run applications such as Multiplan, and support keyboard, disk, and text-video functions. The longer-term ambition is to run Windows 3.1.
The development illustrates how accurately emulating a PC means reproducing more than its CPU. Farcall first handled BIOS calls directly, then added hardware components such as the programmable timer, DMA controller, and floppy controller so it could run a real BIOS and support more systems, including FreeDOS. The work also exposed non-obvious details of IBM PC hardware: CGA’s 320-by-200 graphics store alternating scanlines in separate 8 KiB memory banks, rather than in simple sequential order. That layout initially rendered the game Sopwith incorrectly, and understanding the video circuitry was necessary to display it properly. Farcall remains an evolving educational emulator, built incrementally by implementing what real software needs and observing where execution fails.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.