Saving the Masters of the Elements From Getting Lost to Time: Part 1
#windows #retrogaming #preservation
Table of contents
Masters of the Elements (or Meister Zufall und die Herrscher der Elemente in Germany) is an educational adventure video game developed by the Dutch studio IJsfontein Interactive Media, initially released in late 1997 for Macintosh and Microsoft Windows.
I don’t remember when I got the game; it was most likely Christmas 1999 or 2000. What I do remember, though, is that I spent many hours wandering around the game and trying to solve the puzzles.
And I remember the day the game would stop working forever: The day I updated my PC to Windows 2000.
The game will not work on anything newer than Windows 95, 98, or ME. No matter which compatibility mode you try, as soon as you try to launch the game on Windows 2000, it will fail with a very non-descriptive error message.
When you click on “Stop”, the game immediately quits. When you try “Continue,” the game sits there forever and eventually crashes.
For many years, I have not found a solution to this problem. Yes, there was a patch for running the game on Windows XP, but it was so hard to find that I got it as late as the year 2023. Furthermore, it only works with the version released in Belgium and introduces issues in all other releases.
Hello, Director!
Luckily for me, the game was created with Macromedia Director, a multimedia authoring suite developed between the mid-90s and mid-2000s. If you played any educational title during this period, there’s a high chance it used Director as well—thousands of applications and games are known to use it. In case you have never heard of Director, I’m sure you have heard about Shockwave—yes, that’s the web variant of Director applications.
The ScummVM development team is currently working on support for Director applications, so I know some very knowledgeable people who are incredibly familiar with it.
Macromedia Director started as a tool for creating multimedia presentations and interactive applications, and it became popular thanks to its relative ease of use. Since it features a complete scripting language, Lingo, it can also be used for advanced games.
It also includes the concept of XObjects and Xtras, which are third-party add-ons that enhance Director’s functionality even more. XObjects were the initial variant of these add-ons, and evolved to Xtras starting with Director 5.0. Thanks to backward compatibility, Director 6.0 supports XObjects as well.
The investigation begins
Let’s look at the error message: “Script error: Handler not defined, #Putcurs”.
The error message tells us that a movie or Lingo script tries to call a function called Putcurs
, but fails to find it. Since Putcurs
is not a command built into Director’s language set itself, it is very likely that one of the XObjects or Xtras is causing the problem.
Conveniently, Director applications usually have a directory called Xtras
which include both the XObjects and the Xtras, and Masters of the Elements is no exception:
...
-r-xr-xr-x 1 fabulous None 273K Jan 29 1997 PMATIC.X32
-r-xr-xr-x 1 fabulous None 4.5K Aug 31 1993 PUTCURS.DLL
-r-xr-xr-x 1 fabulous None 112K May 11 1995 SOUNDIMP.X32
...
There it is, a suspiciously small DLL file. Looking at the string table of the DLL reveals that it is indeed an XObject, and a very old one as well.
--Put Cursor XObject. 31 ago 95. Mauricio Piacentini Tabuleiro da Baiana Multimedia
putCurs
I mNew --Creates a new instance of the XObject
X mDispose --Disposes of XObject instance
III mSet, Xpos, Ypos --Set the cursor to a new position
Why does it work on Windows 95/98/ME, but not on Windows 2000, XP, or anything else?
Windows backward compatiblity is not always amazing
A quick check with file
reveals that it is a 16-bit DDL, written with Windows 3.1 in mind. Remember, the game was released in 1997 using Director 6.0, so this is an odd choice.
PUTCURS.DLL: MS-DOS executable, NE version 5 for MS Windows 3.10 (DLL)
Director 6.0 is a 32-bit application, and now we know it needs to include the 16-bit DLL file to access the functions exported by said DLL. And that’s the problem: This is impossible on the Windows NT family.
Windows generally can’t mix 32-bit and 16-bit code in the same process. Instead, it relies on a method called “thunking”. There are two types of thunks: Generic thunks and flat thunks.
Generic thunks support loading a 32-bit DLL from within a 16-bit application, and they are supported in Windows 9x and the NT series, including Windows 2000. Generic thunks are a relic from transitioning the 16-bit DOS-based world to modern Win32: Developers could update their libraries first, and then adapt their applications accordingly.
The other type of thunk is called a “flat thunk”, and it works in both directions: A 32-bit application can call 16-bit code, and a 16-bit application can call 32-bit code. And there is one catch: Flat thunks only work on Windows 9x.
That’s why it breaks, and that’s why it will never work again. Unless…
…to be continued…
Do you have any comments or suggestions regarding this article? Please drop an e-mail to feedback@fabulous.systems!