Madeira README

The project's README from github.com/willfaust/Madeira. As one markdown file: README.md.

Madeira — Bringing PC gaming to your iPhone.

Join the Madeira Discord     Latest release     License: GPL-3.0-or-later

Madeira runs Windows PC games on an iPhone, with no jailbreak. Games run as they are, unmodified, inside a single iOS app.

[!NOTE] Madeira is an active research project. Many games start and some play well, but performance and compatibility vary from game to game, and things change quickly. Expect rough edges.

How it works

Layer What it does
FEX-Emu Translates the game's x86 and x86-64 code to ARM64 as it runs.
Wine 11.4 Provides Windows. It is built for ARM64EC, so Wine itself runs natively and only the game's own code is translated. 32-bit games run through WoW64.
DXMT Draws Direct3D 9, 10 and 11 with Metal.
madeira-d3d12 Madeira's own Direct3D 12 implementation on Metal, converting DXIL shaders at run time with Apple's Metal Shader Converter.

iOS apps cannot start other programs, so everything runs in one process: even Wine's server runs as a thread instead of a separate program.

Features

Requirements

Because JIT needs a debugger, Madeira cannot be offered on the App Store.

Installing

  1. Download the IPA from the latest release.
  2. Sideload it with your own Apple ID using SideStore, AltStore, Sideloadly, Plume or a similar tool.
  3. Open Madeira and enable JIT. Automatic mode uses StikDebug when installed, otherwise it guides you through the built-in setup; see JIT setup.
  4. In Settings, check that JIT and Memory+ both show a green check: Madeira then says Ready to play.
  5. Add a game. Steam games come from Sign in to Steam in the library. For a Windows game you already have, copy its whole folder into Madeira › wine › drive_c with the Files app, then tap + in the library and choose its .exe, .bat or .cmd; see Adding games.

Some 64-bit games need Microsoft's Visual C++ runtime, which is not included (see Licensing).

Building from source

git clone --recurse-submodules https://github.com/willfaust/Madeira.git

FEX, wine, dxmt and madeira-dock are submodules that point at Madeira's own forks; upstream checkouts will not build here. The build has several parts (the Wine unix libraries, the ARM64EC Windows modules, FEX, DXMT and the app) and some inputs that are not in the repository, such as the toolchains. docs/BUILDING.md walks through all of it. git clone --recurse-submodules cd Madeira ./tools/build-ipa.sh # produces dist/Madeira.ipa

See BUILDING.md for prerequisites, timing, and re-run notes.

Note that FEX, wine and research/dxmt are submodules pointing at forks containing the iOS work; upstream clones will not build here.

Repository layout

Path Contents
app/ The iOS app: SwiftUI front end, Wine bridge and bundled resources
wine/, FEX/, dxmt/, madeira-dock/ Madeira's forks and the Steam client launcher (submodules)
madeira-d3d12/ The native Direct3D 12 runtime
build/ Build scripts and iOS-side sources, one folder per component
tests/ Host checks and x86, x86-64 and DXMT test programs
tools/ Helper scripts
docs/ Documentation
research/ Experiments that are not part of the app

Documentation

Topic Document
Building from a clean checkout docs/BUILDING.md
StikDebug and built-in JIT setup docs/JIT.md
The game library docs/LIBRARY.md
Steam sign-in, library and downloads docs/STEAM_SIGNIN.md, docs/STEAM_LIBRARY.md
Steam Cloud saves docs/STEAM_CLOUD.md
Madeira Dock (the Steam client) docs/MADEIRA_DOCK.md
32-bit games (WoW64) docs/WOW64.md
Controllers and touch controls docs/CONTROLLERS.md
Keyboard, mouse and trackpad docs/KEYBOARD_MOUSE.md
Audio and video docs/MEDIA.md
Licensing in detail docs/LICENSING.md

Licensing

Madeira is licensed under GPL-3.0-or-later (LICENSE) with the Madeira Converter Exception (LICENSE-EXCEPTION.md), an additional permission that allows it to work with Apple's Metal Shader Converter.

The projects it builds on keep their own licenses upstream, but Madeira's forks are not all licensed the same way as their upstreams:

Component License
Wine fork LGPL-2.1-or-later, like upstream Wine
FEX-Emu fork, DXMT fork Upstream code stays MIT; Madeira's changes are GPL-3.0-or-later with the exception
rpmalloc fork Upstream code stays 0BSD; Madeira's changes are GPL-3.0-or-later with the exception
Madeira Dock GPL-3.0-or-later with the exception

Anything obtained earlier under a permissive license stays available under it. Per-component details, including GnuTLS, Nettle, GMP, FFmpeg and LLVM, are in THIRD-PARTY-NOTICES.md; the license texts are in LICENSES/.

Microsoft's Visual C++ runtime DLLs are not distributed with Madeira. To build with them, supply them yourself as described in tools/fetch-vcruntime.md.

Contributing

Contributions are welcome under GPL-3.0-or-later; see CONTRIBUTING.md.

Madeira's forks contain a lot of AI-assisted work. FEX-Emu does not accept AI-generated code, so please do not send changes from these forks upstream to FEX-Emu, and check each upstream project's contribution policy before proposing anything to it.

Credits

Madeira is built on Wine, FEX-Emu, DXMT by Feifan He (3Shain) with the Direct3D 9 frontend by David Acevedo (dacevedo12), rpmalloc by Mattias Jansson, StikDebug, StikJIT and idevice for enabling JIT. Thank you to everyone who contributes to them.

Join the community on Discord

Madeira (willfaust/Madeira)

Searching Database…

What is this?Madeira runs x86-64 Windows PC games on a non-jailbroken iPhone by combining Wine (ARM64EC), FEX-Emu (x86-64 to ARM64 translation), and DXMT (D3D11 to Metal), all running inside a single Mach process on iOS.
Is this a jailbreak tool or something I install the normal way?It is not a jailbreak. It runs on a stock, non-jailbroken iPhone but has to be sideloaded rather than installed from the App Store, because it needs a debugger attached for JIT.
How do I build and install it on my iPhone?Build the native Wine/FEX/DXMT pieces with build//build.sh, then build the iOS app itself with xcodebuild and sideload the result onto your phone.
What do I need before I can run this?A non-jailbroken iPhone (development has been on an A15 / iPhone 13 Pro), a JIT debugger such as StikDebug to attach at launch, and an Apple ID for signing — a free account works but forces weekly rebuilds.
Which games actually work right now?Thumper and ULTRAKILL are playable; Marvel Cosmic Invasion reaches gameplay but has had an unexplained crash and unreliable controls; other titles reach gameplay only at low frame rates, and the project is explicitly research-grade with per-title quirks.
Does this work on any iPhone?It targets non-jailbroken iPhones only; development has specifically been done on an A15 chip (iPhone 13 Pro), and there is no Android, Mac, or desktop build.
Why does the app need to be rebuilt every week?It is signed with a free Apple ID, and free provisioning profiles expire after 7 days, forcing a rebuild-and-reinstall cycle. The app's container (saves, Wine prefixes) survives the reinstall.
Can I just clone the official Wine, FEX-Emu or DXMT repos to build this?No, the build uses submodules pointing at Madeira-specific forks of FEX, Wine, and dxmt that contain iOS-specific work, so the plain upstream repos won't build this project.
Can I submit AI-generated fixes from this fork back to FEX-Emu?No. The forks here contain substantial AI-assisted work, but FEX-Emu's own contribution policy forbids AI-generated code, so such changes shouldn't be submitted upstream.
Is everything needed to build included in the repo?No, the Microsoft Visual C++ runtime DLLs are not distributed and must be fetched separately before building, as documented in tools/fetch-vcruntime.md.
Creator
willfaust
Size
250.7 MB
Stars
3.2K
Age
8mo
Commits · 90 Days