The code has some 386 things implemented but not protected mode 286 stuff.

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

What's the likelihood that it's a hex dump one of these?

* 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:

* https://github.com/lgblgblgb/fake86/tree/master/bin/data

Bios is lightly modified https://github.com/virtualxt/pcxtbios (https://www.phatcode.net/downloads.php?id=101)

Does the source code still exist? Probably a good idea to have that in the repo + a tool to generate the constant byte array (or maybe use the new fangled C23 #embed feature).

I noticed this:

  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.

> Seems to be written by somebody who writes fairly neat and clean code, but hasn't discovered structs yet.

So Claude, given the CLAUDE.md file in the repo?

Pretty sure Claude knows about structs.

Well, then Xenix 286 is out of the question ...

Any code that treats the machine like an opponent in a full contact sport is out, not just code that relies on a 286. There should still be lots of tame code that kinda, sorta almost works.

It's useless as a real emulator, it's impressive as a hobby project.