Last week I was still deep in the reverse-engineering weeds of the Amiga port. This week the mood changed completely: it was the week Chamber of the Sci-Mutant Priestess finally stepped out into the light, and the week I started the work on a second engine called MacVenture.
Chamber goes to testing
The headline first: Chamber is now enabled for the upcoming ScummVM release and marked as testing. After all the months of decoding scripts, chasing endianness bugs, and rebuilding renderers one palette at a time, it felt genuinely strange to finally flip the switch.
The change enables the engine to build by default and promotes all five game variants — the multi-language CGA build, the US CGA build, the EGA build, and both Amiga builds (EU and US) — from ADGF_UNSTABLE to ADGF_TESTING. That last part matters: it means the games now show up for players who want to try them and report issues, instead of being hidden behind a developer flag.
It also carried a couple of last-minute fixes I wanted in before the release:
-
The endgame saucer animation was accumulating frames on the linear back buffer in EGA and Amiga modes, leaving a smeared trail instead of a clean animation. Fixed.
-
Hercules mode mouse mapping was off, so hotspot detection didn’t line up with what you saw on screen. Corrected the coordinate mapping.
And, on a more personal note, my name went into the credits with this work. Small thing on a diff, big thing for me.
A second engine: the MacVenture Steam versions
With Chamber wrapped up for release, my mentor pointed me at the next target: getting the MacVenture games — Shadowgate, Déjà Vu, Déjà Vu II, and Uninvited — running from their Steam releases, so we can eventually announce those for testing too, exactly like we just did with Chamber.
I expected to spend the week playing games. Instead I spent the first part of it doing detective work, because the Steam builds are not what you’d think.
Where is the game?
Each Steam download is basically a small Chromium (CEF) web wrapper: a .exe and a few DLLs. There are no loose game files anywhere. It turns out these are the “MacVenture Series” web ports, and the actual game data — the original Macintosh files, resource forks and all — is stored as an 800K Mac HFS disk image embedded as a resource inside the .exe.
So the pipeline to feed ScummVM became:
-
Pull the disk image (
.dsk) out of the PE resources in the executable. -
Run it through ScummVM’s own dumper-companion tool, which extracts the Mac files and, crucially, punyencodes the filenames. That’s the part that lets a name like Déjà Vu survive as
xn--Dj Vu-sqa5don a normal filesystem while ScummVM still recognizes it.
The nice surprise: once extracted, all four games were detected immediately as the existing “1993 rerelease” entries — the resource forks are identical — so no detection work was needed at all.
The crash that blocked everything
The bad surprise: all four games crashed on startup with an assertion failure the moment the GUI tried to initialize.
Assertion 'isValidRect()' failed (common/rect.h:201)
This one was a proper rabbit hole, and a good reminder of how far an uninitialized value can travel before it hurts you. Tracing it back through the window manager and the nine-patch border renderer, the story was:
-
MacVenture builds its window border offsets in
borderOffsets(), setting every field of theBorderOffsetsstruct explicitly… except a newer field,titlePadding, which was never assigned. -
That garbage value fed straight into the console window’s title width calculation.
-
In
nine_patch.cpp, the border width is computed asdw = _h._fix + _titleWidth. With a garbage title width of ~32,800,dwoverflowed to 32,864. -
That produced an invalid
Common::Rect(its right edge wrapped past its left edge), which tripped the assertion and aborted the game.
The fix is a single line — initialize titlePadding to 0 alongside the other offsets — but finding it meant instrumenting the whole border-drawing path to watch the bad number appear. And because it’s a genuine upstream bug, the fix helps the ordinary 1993 rereleases too, not just the Steam ones.
After that, all four games boot and run cleanly.
Reflection and what’s next
Two milestones in one week: Chamber crossing the finish line into testing, and MacVenture going from “won’t even start” to “boots all four games.” I owe a big thank-you to my mentor, sev, for all the help and patience.
Next week is the fun part I thought I’d be doing this week: actual playthroughs of all four MacVenture games. I’ll be watching closely for the Window Manager quirks, the lasso/marquee item selection, and the console text scrolling — the areas most likely to still hide bugs. Once those hold up, we’ll document the extraction steps and announce MacVenture for testing as well.
See you next week.