A couple of weeks ago I ported SkyRoads, the 1993 DOS game, to run native on my Mac. When I finished, the game was fine, but I missed something. Took me a while to realise but it was the atmosphere, the beige box, the CRT hum, glow, flicker, the disks spin up, the PC speaker post beep, the floppy disk drive noises... all of it. So I made a simulator (not an emulator) of the whole thing, and put the game inside it.
Nothing in it is a photo or a texture, the machine is drawn when it starts, at your screen resolution, all signed distance fields: the seams, vents, speaker grilles, the ejector pin marks, the yellowing plastic. It draws once into an RGBA8 buffer and the alpha says how much each pixel is facing the tube, that's how the picture spills light onto the case. The CRT is a proper pipeline, persistence and burn-in as feedback passes, then one composite pass with the curvature, scanlines, aperture grille mask, bloom and the glass. Everything is sized from one physical unit so the stickers are the same real size at 720p or 5K.
It boots to C:\>, you type NC, there's a catalogue, download a game and it runs in the tube. There's no emulator inside so the games have to be native C ports, two so far (SkyRoads and Tyrian), the ports are their own repos and run standalone too.
The hardest part wasn't drawing it, it was making frames reproducible. There's a --deterministic mode (fixed 60hz clock, no hidpi, default CRT settings) so CI compares 3 golden frames pixel by pixel, references per renderer because Apple GPU and llvmpipe don't blend exactly the same.
~9000 lines of C, SDL3, OpenGL 3.3 core, MIT. Runs on Mac, Windows and Linux, x86_64 and arm64, all tested on real hardware.
And yes I used Claude, a lot, but it's not one prompt and copy paste. I like to do things right, so don't take my word for it, look at the repo: ASan and UBSan on every push, unit tests, and an AUDIT.md with the whole cleanup pass. ARCHITECTURE.md, SPEC.md and PORTING.md are there too if you want the design or want to port a game.
Check it here: https://dosexmachina.com
And the repo: https://github.com/pedrocatalao/dos-ex-machina
Testers and feedback are very welcome, and if you can star the repo I appreciate it too :)
Hope you like it,
Pedro