Menu

SSH into DOS: I wrote an x86 emulator in Rust
📰

SSH into DOS: I wrote an x86 emulator in Rust

Adafruit Industries – Makers, hackers, artists, designers and engineers!·Anne Barela·1 day ago
#oa5RsQZ2
#adafruit#bios#graphics#written#time
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.