We used Claude to get a full PS2 emulator running in a browser tab: TabStationToo

1

My buddy u/aegyptiacus11 and I have been working on fun side project, TabStationToo, a PS2 emulator that runs right in your browser. It's built on PCSX2 (GPL-3.0). We took its core, made it run inside the browser, and built a new page around it. You open the page, pick your BIOS and a folder of your own disc images, and play! You can try it: tabstationtoo.github.io/TabStationToo (works best in Chrome) We've tested it on Guitar Hero, GTA San Andreas, Final Fantasy XII, DBZ Budokai Tenkaichi 3, Naruto Shippuden: Ultimate Ninja 5 and Resident Evil 4. Mainly tested on an M1 max mac and a Linux system with a Ryzen 7 7840u. Your files stay on your computer. Nothing gets uploaded. The game is read straight from your own disc image. Most of the code was written with Opus5.5. We decided what to build, tested the games and reported what was wrong, and Claude did most of the programming: A rulebook for Claude. The repo has a CLAUDE.md / AGENTS.md file that Claude reads at the start of every session. It explains the project, the browser's limits, how to build and test, and our rules: credit PCSX2, never claim something works without testing it. Testing without us. we used Claude to build a version of the emulator that runs without a browser, so it could boot the PS2 BIOS, benchmark it for us without taking screen space so we can work on something else at the same time. It runs a few hundred frames and take a screenshot on its own after every change. The hard parts. On a PC, PCSX2 is fast because it translates PS2 code into the PC's own machine code, and a browser doesn't allow that. With Claude we wrote replacements that translate PS2 code into WebAssembly while the game runs, tests them against PCSX2's original code to make sure the results match exactly. PCSX2's graphics renderer were also ported to WebGPU. Optimizing. Getting an emulated PS2 to run smoothly in a browser tab took most of our time. For each idea we tested, we made Claude check if the picture stayed pixel identical, and keep a log of every attempt, including the many that didn't help and were dropped. Many games now run at or near full speed (at least on our machines), though the heaviest scenes are still slower. None of this would exist without the PCSX2 team's 20+ years of work, so huge thanks to them. TabStationToo is an independent project and isn't affiliated with Sony or the PCSX2 project, so please don't send our bugs to PCSX2. It's still early and experimental. We'd love to hear which games work for you! Github repo: github.com/TabStationToo/TabStationToo

参与讨论