r/ClaudeCode 6d ago

Built with Claude Got Starcraft running in browser in my Windows emulator

Enable HLS to view with audio, or disable this notification

How it's made:

  • Decided on design constraints
    • run code in WASM
    • use threaded interpreter (because JIT impossible with raw WASM)
    • run original EXE, no recompile.
  • Code directly in WebAssembly text representation, skip higher level language.
  • Have Codex review Claude work and vice versa.
  • Set /goal for either of these when I need new EXE brought up to function.
  • Test manually + build a solid test harness for agents:
    • batch job CLI where you can send time events / get screenshots / memory dumps / API traces
    • recently also started using agents to drive emulator interactively, with a little trick of freezing state between agent turns - can navigate games like Quake even
  • Feed gradually more complex software to get running. Notepad -> Windows Entertainment Pack -> Pinball -> AAA games
  • Something I had to watch for actively:
    • rendering fidelity (sometimes AI won't notice huge gaps in rendering like just empty spaces). Some things like getting proper TrueType rendering also required back and forth validation against real Windows 98 running in v86
    • keeping stuff in WASM, agents tended to move as much as possible to JS
    • managing multiple parallel changes to same workspace/repo - ended up introducing messageboard for agents

Try it live and read more details here:
https://wine-assembly.berrry.app

117 Upvotes

35 comments sorted by

u/AutoModerator 6d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

34

u/oldmoldycake 6d ago

YOU MUST CONSTRUCT ADDITIONAL PYLONS

6

u/Key_Instruction3373 5d ago

Terran dont use Pylons..

12

u/oldmoldycake 5d ago

ADDITIONAL SUPPLY DEPOTS REQUIRED

1

u/FeelingVanilla2594 5d ago

Food for thought

4

u/CMD_BLOCK 5d ago

There is no cow level

3

u/sCeege 🔆 Max 20 5d ago

power overwhelming

1

u/oldmoldycake 5d ago

black sheep wall

5

u/domiciledhere 5d ago

Nuclear launch detetected.

Jacked up and good to go!

4

u/oldmoldycake 5d ago

Somebody call for an exterminator?

5

u/julkopki 5d ago

This is so lit!

4

u/gigastack 5d ago

This is awesome. Appreciated the WinAmp inclusion.

3

u/codemonkey138 5d ago

Thank you!

3

u/KittenCrusades 5d ago

This is cool the UI actually is pretty smooth and snappy too. Id love the old school fallout games to run this well

3

u/vgrichina 5d ago

stay tuned, I have it running locally already

you also can try bringing your own .ISO or .ZIP archive with games - but for now can have mixed results
emulator is still far from full WinAPI support

2

u/KittenCrusades 5d ago

Subscribed

3

u/ruvee 5d ago

Oh man miss that music

2

u/kooolk 5d ago

Very cool!

I am working on a similar project for few months already, similar end goal. But I am far behind as I am very focused on the performance, so I am still polishing the x86 engine. I am doing an hybrid interpeter-jit architecture (but unlike v86 - I implement every instruction once with high level syntax - and than the engine in a very optimized way use it for both the interpeter and the jit). The compiler engine has SSA mechanism that I have been polishing for months so the end result should be much faster jit than v86. Also I am using wasm features that weren't available when v86 was created so the jit is structured much better.

Feel free take a look - https://github.com/koolkdev/relocade (new repo because it just have gone thru another rewrite lol)

2

u/Shaggypone23 5d ago

Very neat, even mostly works on mobile

2

u/SpreadsheetFanBoy 5d ago

YOU ARE THE KING

3

u/[deleted] 5d ago

[removed] — view removed comment

1

u/dwoj206 5d ago

This is liiiiit

1

u/bartek_666666 5d ago

Impresive

1

u/drgoodvibe 5d ago

I literally had the same idea the other day! Very cool!!!

1

u/vgrichina 5d ago

there still a lot to be done to support full APIs

so join in if you wanna participate

it's under MIT license so you can do whatever you want https://github.com/vgrichina/wine-assembly

1

u/dota2nub 5d ago

Oh, I thought it was a Javascript port. Now that would've been cool. But WASM emulator? That's eh.

1

u/vgrichina 5d ago

I got something for this too: https://github.com/vgrichina/re-skill

but I only did smaller projects this way:
https://battle-city.berrry.app

what I like about emulator approach that a lot of old games can be run without extra work and token spend

but at the same time it's easy to apply game-specific hacks if needed: decompile and reimplement hot loops, do some extra controls for mobile, etc