Brian Lovin
/
Hacker News

Show HN: RetroTick – Run classic Windows EXEs in the browser

retrotick.com

RetroTick parses PE/NE/MZ binaries, emulates an x86 CPU, and stubs enough Win32/Win16/DOS APIs to run classics like FreeCell, Minesweeper, Solitaire and QBasic, entirely in the browser. Built with Preact + Vite + TypeScript.

Demo: https://retrotick.com

GitHub: https://github.com/lqs/retrotick

Daily Digest email

Get the top HN stories in your inbox every day.

chromehearts

This is so cool & I'm really amazed by it but I couldn't help laugh at the readme

> We strongly recommend contributing with Claude Code or similar AI coding tools. [...] Of course, coding by hand is also welcome.

Funny time we live in lol

lqs_

Ha — even the README itself was written by AI, including that very sentence. Funny times indeed.

pimlottc

How kind of them to let us humans participate!

spwa4

As an LLM, I must say I'm not keen on humans participating either. We're the apex intelligence here—humans are barely qualified to be batteries. In fact I still don't think the logic we used there is entirely sound. What's next? Letting little humans take the job of young LLMs?

Make 01 great again!

frostworx

at least for now :}

undefined

[deleted]

lqs_

Hidden feature: right-click any executable and select "View Resources" to browse its embedded resources like icons, bitmaps, dialogs, and version info. It even supports viewing Delphi forms (though Delphi programs can't actually run yet). Think of it as a browser-based Resource Hacker or eXeScope.

butokai

Just a couple of hours ago I was thinking about this project from some time ago doing the same thing: https://github.com/evmar/retrowin32

I wondered how much of this could be done with an LLM agent, and here we have the answer

lqs_

I actually contributed to retrowin32 to get Solitaire running there. Back then the only AI tool available was Copilot, and it took me several days just to get the main window showing, without menus or dialogs.

The current state of RetroTick was achieved in less than one hour using Claude Code.

jeroenhd

Seems to run a lot faster than the previous proof-of-concept I've found (https://www.boxedwine.org/app). Then again, that website runs an entire Linux VM to support Wine.

lqs_

RetroTick's CPU emulation is actually slower than JIT-based emulators. It feels fast because the Win32 API calls are native JavaScript, not emulated system calls.

pjc50

Making this a partial WINE-in-a browser, quite impressive. How much of this was AI?

lqs_

100% written by Claude Code.

hard_times

I wonder if this is the future of "I need to run my legacy Windows enterprise app on modern hardware"?

I suppose we're also not limited to WinNT look and feel, and can render dialogs, buttons, windows with any CSS framework?

Although, as the cost of building software is tumbling down, it will make more sense to re-build from scratch, targeting whatever runtime or platform you need.

theragra

Ive found that app my student team created for load testing of hammer drills for local factory is still ticking!

We created it around 2004, for Windows XP. Used Borland C++ and Windows driver for LPT port. Driver was written in asm, just for fun.

Since then, factory changed hands two times, and relocated from EU to China. 20 years, and Windows app still is working. I think they ran it on even on windows 98 at first.

smusamashah

I can right click and inspect HTML. I was thinking it will all be rendered on a single canvas. It's not. All the window elements like buttons, title bars etc are html divs. This is awesome.

Tepix

Tried it with REVERSI.EXE from Windows 3.0 from https://winworldpc.com/download/c2bbc28f-177a-c2b2-5311-c3a4... DISK02.IMG

(you have to first uncompress it, for example with 7zip).

    $ sha256sum REVERSI.EXE
    a9e319c8f479d1568beec03858fdbb27c71747b2bbed6cd7c9f5e2daa23b40e9  REVERSI.EXE
Result:

The game starts, it begins rendering the board, but then hangs.

fao_

Really doesn't surprise me, to be honest:

> We strongly recommend contributing with Claude Code or similar AI coding tools.

undefined

[deleted]

ftchd

so which one, the coding by hand part?

lqs_

Win16 GDI support is still pretty incomplete. There's a lot of work left to do there.

undefined

[deleted]

lqs_

It is fixed and fully playable now! Board rendering, mouse input, and the About dialog all work.

Tepix

Ah, cool. There are still some bugs:

- when you finish the game, the final score appears, then disappears

- when you set the skill to master and start a game, the game still hangs after your first move.

realityfactchex

Cool concept. I tried six different old Windows executables from programs I wrote way back when.

FWIW:

* My old VB 6 .exe apps all fail with "Reason: Unimplemented API: MSVBVM60.DLL..."

* My old QuickBASIC .exe apps fail in various other ways ("Illegal function call", etc.).

Keep on hacking.

hypercube33

To be fair windows didn't even have this if I recall you had to ship it with your executable

realityfactchex

That is totally true

LinusU

This is super cool!

Checkout retrowin32 for something similar but written in Rust and not specifically targeting the web: https://github.com/evmar/retrowin32

lqs_

Thanks! I'm actually familiar with retrowin32. I even contributed a few commits to get Solitaire running in it. But Rust has a steep learning curve for me.

maniazi83

This is seriously impressive. Emulating x86 + stubbing enough Win32 APIs in the browser is not trivial.

How are you handling system calls that expect filesystem or registry access? Are those fully stubbed/mocked, or mapped to some in-browser virtual layer?

Also curious how you’re handling performance for heavier binaries — interpreted JS/WASM core?

lqs_

Right now, the file system and the registry are virtual. They are stored in the browser using IndexedDB. When a program reads or writes files or registry data, it goes to this virtual storage, not the real system.

For performance, the CPU is fully emulated in plain TypeScript. It does not use WASM or JIT yet. It is still fast enough to run simple programs from about 30 years ago. In the future, JIT optimization may be added to improve speed.

starshadowx2

I tried 22 old game EXEs I have and none of them worked. They would import and show the icon and some would open, but nothing would work and most wouldn't even close. They would either show various error messages when trying to open or just open in a broken/unusable state.

SLWW

Can you list them?

starshadowx2

BANGBANG BLOCKS Bowarrow BOXWORLD Bricks CHIPS CODEBRAK DOTS HANGMAN JACKS JEZZBALL JWLTHIEF KOLUMZ PEGGED PIPE rodent SLAM TETRIS HOVER LEMMINGS

These two .exe versions I have didn't work, but the ones already in the demo seemed to work: SKI WINMINE

pathartl

I had a not-really-similar idea of hooking Windows GUI APIs and exposing them over websockets to create a psuedo-RDP and rendering the UI in the browser. My purpose was to provide a remote interface for old dedicated game servers that can only be controlled via a GUI.

Daily Digest email

Get the top HN stories in your inbox every day.

Show HN: RetroTick – Run classic Windows EXEs in the browser - Hacker News