Farcall is an x86 emulator written in Rust that models the original IBM PC and its 8088 CPU. Its author started it after a visit to the Vintage Computer Festival Midwest, beginning with a single COM file that printed “Hello World” and adding one instruction at a time until MS-DOS 2.0’s MORE.COM ran in a macOS terminal window. Booting a PC-DOS floppy image took about 200 more instructions, plus BIOS services for the keyboard, video and floppy drive.
Swapping the hand-written BIOS for GLaBIOS, an open-source BIOS that runs on real IBM PCs, meant emulating the hardware the BIOS expects: the peripheral interface chip, the interval timer and the DMA controller. CGA graphics came next, including the odd layout where the odd-numbered scanlines start 8 KiB into video memory.
Graphics are drawn in the terminal with the Kitty graphics protocol, as 4-bit indexed PNG frames, which cut frame preparation time by more than 70 percent.…