• Stars
    star
    421
  • Rank 102,977 (Top 3 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

windows emulator

retrowin32

A still-early Windows emulator for web (and non-Windows native platforms).

Take a win32 .exe file and run it in a web browser or a Mac.

Status

Doesn't really work for much yet, but I'm still tinkering!

  • 2023/05: new blog post.
  • 2023/04: "monolife" demo now can sorta render first scene.
  • 2023/02: can now run natively via SDL. See blog post.
  • 2022/10: released. Barely runs a few console programs and one DirectDraw program. See blog post.

See some demos.

The idea

Software today is written in a world where the platform continually changes -- code you release today may stop working next year as the APIs and deprecations churn. You know what doesn't change? Dead platforms. Old video games written for a NES will work forever because the NES won't ever change again.

win32, the Windows 32-bit API, is such a platform. "win32 is the stable Linux userland ABI" is the observation that it might actually make sense for video game developers aiming for Linux to target the Windows API (which doesn't change) and rely on some translation layer to manage the Linux part (which always changes).

Today there are all these old .exe files lying around that are increasingly hard to run. Even on Windows itself, there's a 32-bit Windows translation layer when running on now standard x86-64 hardware. On non-Windows the best tool is Wine, but it requires x86 hardware. On a recent non-x86 Mac their x86 emulator dropped 32-bit support, so even Wine isn't sufficient there.

So my idea is this: what if you treated a win32 executable in the same way you treat a NES ROM -- as machine code for a CPU you no longer have, expecting hardware and an OS that doesn't exist? retrowin32 is an emulator that interprets the x86 instructions and implements the Windows OS API such that a win32 executable can run directly, without the Windows OS or an x86 beneath it.

See a comparison against other Windows emulator approaches (WINE, qemu, v86) for how this is similar but different.

Running it

See HACKING.md to get started on the code.

More Repositories

1

webtreemap

web-based treemap
TypeScript
347
star
2

n2

n2 ("into"), a ninja compatible build system
Rust
268
star
3

c-repl

a C read-eval-print loop (abandoned)
Haskell
201
star
4

weave

wasm viewer
TypeScript
136
star
5

bloat

analyze code size via nm/objdump output
Python
78
star
6

go-imap

golang IMAP client library
Go
73
star
7

pocket-mini

Save to Pocket (mini), a Chrome extension for https://getpocket.com
JavaScript
44
star
8

jelly

jelly no puzzle in html5
JavaScript
39
star
9

smash

a new kind of terminal
TypeScript
38
star
10

gocairo

autogenerated full golang bindings for cairo
Go
37
star
11

js-min-bench

benchmarking js minifiers
HTML
30
star
12

git-cl

a git-command for integrating reviews on Rietveld
Python
26
star
13

cms

tiny content management system I use for my website, unlikely of interest to anyone else
Go
18
star
14

j8t

javascript minifier
Rust
14
star
15

hp

generate graphs from google-perftools heap profiles
Go
13
star
16

envelope

python script to generate envelopes
Python
13
star
17

webkit-who

webkit committers analysis
JavaScript
12
star
18

sfpng

straightforward minimal PNG decoder
C
12
star
19

config

dotfiles, not interesting to anyone but me
Emacs Lisp
11
star
20

lmnopuz

web-based crosswords (stagnant)
JavaScript
10
star
21

maddr

simple addr2line reimplementation
C++
10
star
22

lines-spent

datavis of commit changes
JavaScript
9
star
23

gat

git clone in haskell
Haskell
9
star
24

v8c

C bindings for V8 (abandoned)
C++
9
star
25

gen

golang basic lexer + lr parser generator
Go
9
star
26

sclang

header into s-expressions via clang
C++
8
star
27

fin

financial analysis
TypeScript
8
star
28

goblizzard

golang parsers for blizzard data formats
Go
6
star
29

goodbye-lj

scripts to archive and delete livejournal posts
Python
6
star
30

picasync

download picasa (google+) albums
Go
6
star
31

buildbot-error

Chrome extension to add a "next error" link to Chromium buildbot output
JavaScript
6
star
32

devhelp-index

command line (emacs) interface into devhelp
Python
6
star
33

proximo

Android app for public transit arrival times
Java
5
star
34

muni

SF muni arrival time server and Android app
Python
4
star
35

keyring-dump

quick script to dump gnome keyring
Python
4
star
36

edit-locally

quick hack to edit chrome codesearch results in local emacs
Python
4
star
37

snapz

simple screenshooting app
C
4
star
38

whisper

playing around with OpenAI Whisper
C
4
star
39

HarfBuzz-ng

Patches for the HarfBuzz rewrite
C
4
star
40

lytics

analytics without the ad network
TypeScript
3
star
41

route

simple golang url router
Go
3
star
42

h8

Haskell bindings for v8
Haskell
3
star
43

pony-express

chrome extension to prettify online mailing list archives
CoffeeScript
3
star
44

terminfo

terminfo parser for go
Go
3
star
45

python-sourcemap

python module for parsing javascript source maps
Python
3
star
46

pjs

paren js
JavaScript
3
star
47

focus

script to block time-wasting sites (news.yc, reddit, techmeme, etc.)
Shell
3
star
48

chrome-textfix-ext

A Chrome extension to add a context menu item to make body text readable.
JavaScript
3
star
49

onscreen

image cycler for wall displays
Python
2
star
50

flatzip

create mtime-equivalent directory mirror with files filled with zeros
Go
2
star
51

states

compare US states and EU countries
TypeScript
2
star
52

git-ffwd

script to forward-port old branches
Shell
2
star
53

cute-sideload

cute overload feed without the creepy babytalk
Ruby
2
star
54

diff

crostini diff tool
Go
1
star
55

hscairo

Cabalized version of gtk2hs's Cairo bindings
Haskell
1
star
56

evmar.github.io

github pages
HTML
1
star
57

tjs

Just screwing around with unification, nothing interesting to see.
JavaScript
1
star
58

tsparse

dump TypeScript lexical AST
JavaScript
1
star
59

evanhacks

random hacks on app engine
Go
1
star
60

peek

TypeScript
1
star
61

rietveld

Mirror of Rietveld, the App Engine code review site
1
star
62

rust-toys

toy apps to play with the rust language
Rust
1
star
63

HarfBuzz

Chrome-specific Harfbuzz patches
1
star
64

discord-clean

delete entries on discord
Go
1
star
65

martine.github.io

github web pages
HTML
1
star
66

chrome-readability

arc90's Readability bookmarklet as a Chrome extension
1
star