HN
Today

Porting 3D Movie Maker to Linux

Ben Stone details the ambitious 18-month journey to port the classic Microsoft 3D Movie Maker to Linux, marking the first time this nostalgic application runs natively outside Windows. This deep dive into software archeology, made possible by Microsoft's unexpected open-sourcing of the code, showcases the intricate challenges of modernizing a 30-year-old codebase. The project resonates with HN's interest in retro tech, open-source initiatives, and the technical prowess required for cross-platform compatibility.

7
Score
0
Comments
#10
Highest Rank
16h
on Front Page
First Seen
May 14, 8:00 PM
Last Seen
May 15, 11:00 AM
Rank Over Time
20101213111211141418212218172327

The Lowdown

The author, Ben Stone, chronicles the 18-month endeavor of porting Microsoft's 1995 cult classic, 3D Movie Maker, to Linux. Following Microsoft's surprising decision to open-source the application, Stone's project, 3DMMEx, has achieved a significant milestone: native execution on Linux, making it the first fork to run off its original platform. This journey involved overcoming numerous technical hurdles inherent in migrating a decades-old multimedia application.

  • Origin Story: The project began after Microsoft open-sourced 3D Movie Maker's (codenamed "Socrates") source code in May 2022, spurred by Alice Averlong's efforts. The codebase, including the "Kauai" application framework, was found to be exceptionally well-engineered for its time.
  • Initial Challenges: Stone initially joined the 3DMMForever project but later forked it into 3DMMEx due to its stalled progress. Key porting difficulties included a pre-standardized C++ dialect, the Kauai framework's limited platform support (Windows and partial Mac 68K), direct Win32 API calls, inline x86 assembly, 64-bit pointer size assumptions, external static libraries, and lack of tests.
  • Collaborative Effort: An email from Mark Cave-Ayland, interested in running 3DMM on a Raspberry Pi for his children, sparked a collaboration. Mark focused on Linux porting, while Ben concentrated on SDL integration for Windows.
  • Static Library Replacements: The BRender 3D engine's x86 assembly was replaced with portable C, and the Windows-specific AudioMan sound library was reverse-engineered and replaced with miniaudio for cross-platform support.
  • Assembly Language Removal: Performance-sensitive functions originally using inline x86 assembly were successfully migrated to C++ implementations, leveraging modern C runtime optimizations.
  • Engineering Improvements: Debugging and testing were enhanced with Google Test integration, NatVis visualizers for Visual Studio, static asserts for file format compatibility across platforms (especially 64-bit), improved UI logging, and minor refactors to facilitate SDL/cross-platform implementations while maintaining the original Apps Hungarian code style.
  • Win32 to SDL Transition: The Win32 GUI implementation was replaced with SDL, requiring reimplementation of features like font enumeration and accelerator tables. Challenges included reconciling SDL's UTF-8 expectation with 3DMM's system default code page.
  • Linux Boot-Up: Mark Cave-Ayland played a crucial role in getting 3DMMEx to boot on Linux by addressing filesystem issues, POSIX support, and integrating FluidSynth for MIDI and GStreamer for cutscenes.
  • Future Work: While functional, the project still requires improvements, particularly for mouse handling. Future goals include expanding to macOS and Emscripten (for web browsers), and providing Linux binary releases.
    This detailed account highlights the dedication and technical skill required to breathe new life into a piece of computing history, making it accessible to a new generation of users on modern operating systems while preserving its original charm and functionality.