by peterfirefly · 1y ago · 0 comments
Seems to be written by somebody who writes fairly neat and clean code, but hasn't discovered structs yet.
Definitely not cycle accurate. Video emulation only covers simple standard modes, not the undocumented ones, not proper hardware programming.
Does have a decent handling of (real-mode) interrupts. The AT keyboard interface (+ keyboard itself) is handled poorly on Windows/Linux -- the code for handling bytes sent to the keyboard is missing + there is no emulation of the receive queue in the keyboard controller. The code for the Raspberry Pi PICO is different: it actually bit bangs some pins to support a PS/2 interface (basically an AT interface). Still doesn't handle any buffering as far as I can see.
There is an 8K PC XT(?) BIOS included with no mention of where it comes from. The code there handles hardware interrupts. The software interrupt BIOS API is handled in C code (intcall86() in src/emulator/cpu.c).
* https://github.com/virtualxt/virtualxt/tree/develop/bios
Because if you look back far enough you'll find that this is based upon something called fake86 written by a Mike Chambers in 2010, of which there are many half-written derivatives including this:
* https://github.com/lgblgblgb/fake86/tree/master
obviously replicated here:
* https://github.com/xrip/pico-286/blob/0d2c76ba51572addaeed8a...
and which loads a pcxtbios.bin file in several flavours, including but not limited to:
320×200×256 Colors: Mode 13h - the famous "Mode X" used by many DOS games
Mode 13h and Mode X are very different things. Glancing at the code, I see lots of stuff apparently cobbled together from various parts of the web, which kind of says to me "LLM data set". I'm going to guess that this was vibe-coded.So Claude, given the CLAUDE.md file in the repo?
It's useless as a real emulator, it's impressive as a hobby project.