# Port a console emulator to the browser with a rulebook, a headless test build and pixel checks

PaperChase agent use case (free feed entry), version 1.0. Source: [u/yousriii and u/aegyptiacus11](https://www.reddit.com/r/ClaudeAI/comments/1xigpgr/we_used_claude_to_get_a_full_ps2_emulator_running/), 2026-10-28.

## What they did

The rulebook explains the project, browser limits, how to build and test, and two rules: credit PCSX2, and never claim something works without testing it. Because browsers do not allow the usual native code translation, Claude wrote replacements that translate PS2 code into WebAssembly at runtime and tested them against the original code for matching results. Each performance idea was checked for a pixel-identical picture and logged, including the many that were dropped. Players load their own BIOS and disc images, and nothing is uploaded.

## Worth knowing

Three habits carry over: a rulebook the agent reads every session, a test build the agent can run without you, and an exact-match check before any optimisation is kept. Keeping a log of failed attempts stops the agent retrying them. Users must supply their own BIOS and games, which keeps the legal side clean.

## Workflow template

```text
Apply this workflow to [your project]:
1. Write CLAUDE.md or AGENTS.md with the project, limits, build and test steps, and a rule never to claim untested work.
2. Have the agent build a headless runner that boots, runs and screenshots after every change.
3. Require exact-match output before keeping any optimisation.
4. Log every attempt, including the ones you drop.
5. Keep users' files on their own machine.
Stop and ask me before anything irreversible: deploys, payments, sends or deletes.
```

## Steps

1. **Write CLAUDE.md or AGENTS.md with the project, limits, build and test .** Write CLAUDE.md or AGENTS.md with the project, limits, build and test steps, and a rule never to claim untested work.
2. **Have the agent build a headless runner that boots, runs and screenshot.** Have the agent build a headless runner that boots, runs and screenshots after every change.
3. **Require exact-match output before keeping any optimisation.** Require exact-match output before keeping any optimisation.
4. **Log every attempt, including the ones you drop.** Log every attempt, including the ones you drop.
5. **Keep users' files on their own machine.** Keep users' files on their own machine.

## Credit

Workflow reported by u/yousriii and u/aegyptiacus11: https://www.reddit.com/r/ClaudeAI/comments/1xigpgr/we_used_claude_to_get_a_full_ps2_emulator_running/
Related: https://tabstationtoo.github.io/TabStationToo/

Summary and template written by PaperChaseWebb in our own words. Questions: mgmt@paperchasewebb.com
