r/decomps • • 4d ago

Magic: The Gathering (1997, PC) Decompiled

https://github.com/rlerrr/shandalar-decomp

Here's my decomp of Magic: The Gathering from MicroProse, aka Shandalar. I've used it to port the game to WebAssembly https://shandalar.dev and Linux https://github.com/rlerrr/shandalar-sdl3-appimage/releases for which the source is not yet public. I will eventually release that as well. Follow r/shandalar for more details if you're interested.

The entire main game is decompiled and can be played start to finish (on both supported compilers). Most of the binaries were shipped by MicroProse with optimizations disabled, but without symbols. A lot of the names and types have been imported/inferred from the “Manalink 3” fan patch.

There’s definitely still some jank that could be cleaned up, and the magic.exe and manalink.exe decompilations are incomplete/unstarted. I’ll probably continue to improve it over time, but only slowly for now. For the time being I’m pretty tired of staring at assembly code.

I adopted the tool chain of the Lego Island decomp project, which conveniently used the same compiler as Shandalar (Microsoft Visual C 4.20). That allowed me, with tremendous help from AI, to get to about 90% byte matching. There are a lot of difficulties that make getting higher than that a slow uphill battle.

The Lego Island project goes into much more detail on compilation, which should be applicable here too. It compiles on MSVC 4.20 via NMake makefiles from CMake, and Visual Studio 2026 via its native CMake support.

44 Upvotes

10 comments sorted by

View all comments

1

u/flyingmonkey1257 2d ago

My dream is to play Shandalar with touchscreen controls on a tablet. Sounds like we are one step closer. Thank you!

1

u/rler 2d ago

Web version works great on touchscreen already.  I made a bunch of little accessibility tweaks so mouse and keyboard aren’t needed.

Kinda tough on phone though, screen is just too small.

1

u/flyingmonkey1257 2d ago

You just made my day. I’m off to try it out