- Mon 16 June 2025
- Programming
- Ben Cottrell
Foreword
It's remarkable how much technology stays fundamentally the same, and the Windows operating system is a testament to that. Their market dominance has actually had a positive impact, in terms of providing a consistent platform to target, especially through DirectX as well.
In fact, DirectX may have supplanted Windows, thanks to Vulkan and the compatibility software layers WINE and DXVK. DXVK translates Direct3D version 8,9,10 and 11 calls into Vulkan equivalents. Vulkan shares many similarities with Direct3D.
I think I can understand why Microsoft, under Satya Nadella's direction, is choosing to prioritize the cloud, as well as private and government partnerships, and research.
The Game I Wanted to Play
The game I tried, was released around 2001, and is called Monopoly Tycoon. This game seemed to use Windows specific codecs, as I found out when I did the reverse engineering.
Codec Issues
On endeavourOS, I had installed the latest stable version of Wine, to see if the game Monopoly Tycoon would work. The installer completed without any issues, however, after clicking a button on the main menu dialog to play the game, it segfaulted.
The culprit was winegstreamer refusing to play the intro video, because the codec was "MPEG 1 System Stream". It was strange that the format wouldn't work, because, I found gstreamer does support the format, when playing the video with gst-play-1-0.
Reverse Engineering
To see why the intro video was failing to play, I loaded the main executable into Ghidra for further analysis.
What really helped, was being able to look up COM GUID's inside the registry, on a VM running Windows XP. Then I could rename the IID values, passed from the heap, in Ghidra.
Luckily, the game's code wasn't too obfuscated, and, through adding bookmarks, and renaming functions, I could understand the codebase with increasing clarity.
I suspect that the game is insisting an exact codec from DirectShow. The next task to prove this would involve replicating the disassembled code in a test program. This is where having Visual Studio installed in the XP VM, with the Windows SDK, comes in handy.
An Accidental Fix
The solution to get the game working, albeit without music, was to build the latest version of Wine myself, in WoW64 mode, which requires a 64bit version (built first), followed by a 32bit version. For the 32bit build, I skipped installing the 32bit development package for FFMPEG.
Fortunately, gstreamer seems to support most other codecs, and with DXVK replacing the Direct3D DLL's inside my Wine installation prefix, the game ran reasonably well. As the game runs in a window, I can switch to VLC with a playlist of the game's soundtrack, and just play the tracks on repeat.
Future Ideas
I could write a test program, as I mentioned in the Reverse Engineering section, to verify the issue, and see if a patch would fix it, so the game would run normally on the stable version of Wine.
Relatedly, I've been exploring the shell API, and learned how to enumerate folders, and about PIDL's. I might write an article about that.