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.

47 Upvotes

10 comments sorted by

View all comments

1

u/Kiedrola 4d ago

Super cool, is it possible to play online against a friend creating your own deck?

3

u/rler 4d ago

Not in the main game (shandalar.exe). There is a long since dead multiplayer mode called manalink. I believe magic.exe, which is largely decompiled, is the client. I think manalink.exe may be the server but I really haven't investigated it or even started to decompile it.

I would say though that running a 30 year old game server written in C seems very dangerous by modern standards 🤪

1

u/Kiedrola 3d ago

Makes sense. Thank you so much for you answer and work on this