Linux Gets a 30-Year-Old Movie Maker
Microsoft 3D Movie Maker (3DMM) now runs natively on Linux. Ben Stone's 3DMMEx fork, built over 18 months, is the first known fork to run outside Windows. The key enabler: Microsoft's May 2022 release of the full 3DMM source code under an MIT license, after Alice Averlong's advocacy and Scott Hanselman's team's efforts.
The Porting Challenges
Stone and collaborator Mark Cave-Ayland faced multiple issues:
- Pre-standardized C++ dialect only compilable with MSVC.
- Kauai framework was "cross-platform" only for Windows and Macintosh 68K, with incomplete Mac support.
- Inline x86 assembly in performance-critical functions (memory copy, bitmap ops, compression).
- 32-bit assumptions causing 64-bit compile errors.
- Static libraries for BRender and AudioMan, with no source.
Decompiling AudioMan
AudioMan, a sound mixer library, was provided as a pre-compiled static lib (AUDIOD.LIB). Stone decompiled it using Ghidra, leveraging a debug build with symbols. He only decompiled critical components. For Linux, he replaced AudioMan with miniaudio, a cross-platform audio library, solving both sound playback and recording.
Removing Assembly
Kauai used #define-switched assembly for performance. Stone removed the #define to use C++ fallbacks, which uncovered bugs in the C++ versions. The switch also improved performance by allowing the C runtime's optimized memcpy/memmove.
Replacing Win32 with SDL
Kauai's GUI used Win32 APIs. Stone wrote a "hello world" test app to validate SDL integration before tackling the full application. He replaced GDI calls with SDL equivalents. Font management was particularly hard: Win32's EnumFonts has no SDL equivalent, requiring a custom font enumeration layer.
Testing and Debugging
Stone added Google Test for unit tests, NatVis visualizers for custom types (e.g., STN strings), static asserts for file format struct sizes to prevent breakage, and script-level logging to trace UI logic.
Current Status and Next Steps
3DMMEx compiles on Linux with CMake. The project is on GitHub. Stone plans to add more unit tests, improve the SDL backend, and potentially port to other platforms. The code style retains the original Apps Hungarian notation (e.g., mpgrfchpsz).
