Show HN: Sfotty Pie – A browser-based Atari 8-bit emulator in TypeScript
a8.aygun.meHi HN! This is my little tribute to the machine that started it all for me. I first shared it publicly some five years ago when it was only able to run Atari BASIC. Today it's in a much more usable state where most games work with highly accurate video and audio, even on a phone.
Highlights:
* Almost every component is cycle-exact. The CPU passes the SingleStepTests/65x02 suite with a perfect score and the emulator scores 53/57 on Altirra's Acid800 suite. The biggest gap is serial I/O, which is currently emulated by trapping calls to the OS. Other than that, the emulation is pretty "literal", favoring code clarity over performance.
* It ships with open-source replacement ROMs from the Altirra and Atari++ projects, so it boots to a working machine without copyrighted Atari firmware. You can drop your own ROMs and disk images into the library. They stay entirely in your browser (IndexedDB), nothing is uploaded anywhere. It's a completely static site.
* It emulates the entire Atari 8-bit family (400/800, XL/XE, XEGS, but not 5200) with configurable RAM size. All the components (ANTIC, GTIA, POKEY, PIA) are emulated and cycle-exact. You can select between NTSC and PAL with customizable palettes for each. False colors (artifacting) are not emulated yet.
* Emulates the keyboard (BEWARE, it steals a lot of browser shortcuts), joysticks (via keyboard, gamepad, or an on-screen touch joystick for mobile), most types of cartridges, and non-copy-protected disk images (.atr, only disk 1 for now). It can also directly boot executables (.xex) by generating a boot disk on the fly.
* The UI is still rough and largely vibe-coded. It includes a command palette, custom shortcuts, and a "couch picker" to launch games from your library with a gamepad without leaving the couch.
It's MIT-licensed with all source available on GitHub.
Getting started: https://a8.aygun.me/a8/docs GitHub: https://github.com/cyco130/sfotty-pie