Blah blah flowery prose intro containing snark and in-jokes.
We’ve known that the Monkey Island 2 talkie prototype existed for years but now that we’ve finally got our hands on it, what secrets does it hold?
In this unashamedly geeky article we’re going to look at how the prototype differs from the original game, how to extract and listen to the voice files and how to use Lucasarts’ own debugger tool to peek into the inner workings of Monkey Island 2.
The resource files
There were 8 main versions of the SCUMM engine. Up to version 4 most games stored their data in .lfl files. Each room was an lfl file so for example the file 36.lfl contained all the data for that room. Monkey Island 2 used version 5 of the SCUMM engine. Most games that ran on this used .000 and .001 files to store the game data.
The prototype is unusual in that it uses SCUMM v5 but stores all its data in .lfl files. This makes it a little more difficult to investigate as most of the tools we commonly use to look inside SCUMM datafiles are designed for .000/.001 files. Many won’t work with lfl files or have incomplete support for them. Scumm Revisited 2 or Scumm Revisited 5 are the best tools to use if you want to look into the resource files yourself.
There are 20 .lfl files from 000.lfl down to 106.lfl. Some lfl files are missing therefore some rooms are missing in-game. The numbering of the lfl files seems to corresponds to the room numbering in normal MI2 so the rooms we’ve got are:
- 000 The index file (not a room)
- 001 Part I: The Largo Embargo
- 002 Scabb Island Overview
- 004 Scabb Island Beach
- 006 Steamin' Weenie Hut
- 009 Woodtick Bar
- 014 Woodtick Laundromat
- 016 Scabb Island Cemetery
- 018 The Crypt
- 019 Rapp Scallion's Coffin
- 020 Scabb Island Swamp
- 021 International House of Mojo
- 030 Phatt Island Library
- 050 Stan's Previously Owned Coffins
- 070 LeChuck's Fortress Shipping Room
- 082 Captain Dread's Map
- 094 Inventory Icons
- 104 Rapp Scallion Animation #1
- 105 Rapp Scallion Animation #2
- 106 Rapp Scallion Animation #3
I’ve had a brief look in the files and I can't see any noticeable differences between these and the full game. This is what we’d expect really since this isn't a prototype of MI2 in development, it’s a prototype of talkie in the SCUMM engine and was created after MI2 had shipped.
There are two ways of getting version information about a game, one is to press ctrl+v in game - this shows the prototype as “Monkey 2 (v1.0U 1/23/91) 29,29 Regular Mode”. The other way is to run the game with the command line parameter /?. This outputs information about all the parameters the program supports and version information.
Doing “sputm5c /?” shows its version is 5.2.11 CD (Jun 29 1992 15:22:26)
For comparison purposes here is the version information for other SCUMM v5 games:
- Monkey Island 2 demo 5.2.02 (Oct 03 1991 16:59:10)
- Monkey Island 2 floppy 5.2.02 (Nov 21 1991 08:35:15)
- Fate of Atlantis floppy 5.2.20 (Apr 17 1992 14:41:22)
- Loom cd 5.1.42 1992
- Fate of Atlantis demo 5.5.00 (Apr 26 1993 19:10:05)
- Fate of Atlantis cd CD 5.5.00 (May 05 1993 18:15:17)
- Monkey Island 2 cd 5.2.28cd (Sep 06 1996 17:32:24)
- Monkey Island 1 cd 5.3.06 CD (Sep 06 1996 17:49:04)
Looking at the dates shows this prototype was built 7 months after Monkey Island 2’s release, 2 months after Fate of Atlantis and well before the first talkie SCUMM games - Day of the Tentacle and Fate of Atlantis cd.
The program that runs the prototype is named “SPUTM5c.exe”. True geeks will know that SPUTM is the name of the interpreter that runs the games. When you run Monkey2.exe or Atlantis.exe to start the games - those files are the SPUTM interpreters. When the games were built for release the interpreter was renamed. This matters because when you run the interpreter it’ll try and open the resource files that have the same name as it does. So Atlantis.exe will try and find the files atlantis.000 and atlantis.001 and run them. In the case of the prototype we can't just run SPUTM5c.exe on its own because it then looks for SPUTM5c.000 and SPUTM5c.001 files, which don't exist.
This is why the run.bat file is needed to start the game. A .bat file is a list of commands, it's just a text file so if we look inside it we see:
@echo Take Guybrush to Crypt and resurrect Rapp
sputm5c p s %1 900
The SET command defines a variable, so set LFLPATH= makes a variable containing the path to the lfl files so the interpreter can find them. Set SPUTMDEBUG=1 enables debug mode, but more on that later.
The command line used to launch the game is “sputm5c p s %1 900”
- p seems to tell it to look for lfl files instead of .000 and .001 resources.
- s means use soundblaster sound.
- 900 is the boot parameter. These jump you straight to a particular point in the game. In normal MI2 that boot param takes you to “scabb island overhead, with crypt key, pirate quotes, ash-2-life” and that's what it does here too. Remember that some lfl files are missing so we have to start the game with a boot parameter. If we try and start it normally it’ll fail as it’ll try to access room 108 which we don't have.
- %1 is part of the bat file rather than SPUTM. It stores the command line param that that bat file is run with. Eg if we did “run.bat ilovemojo” the line would become “sputm5c p s ilovemojo 900”. This will come in handy later when we get to the debugger and need to pass another command line parameter to activate it.
Monster.sou is the file that stores the speech in most SCUMM talkie games. It does that here too but the format of the file is a little different from that used in the other games. None of the SCUMM tools were capable of extracting it - so I made a tool to do it. The pithily named Monkey Island 2 Talkie Speech Extractor will dump all the audio from the monster.sou file.
There are 261 dialog files inside and there’s speech for far more than just the Rapp Scallion coffin scene. There’s the dialog with Elaine in her mansion, the campfire conversation at the start and more. I’m not sure that any of it will play in-game, it might be that only the audio for the coffin scene was hooked up. Others will have to try this as I haven't had time to check (unusually for Mojo this article had an actual deadline).
As you’d expect the speech is low quality. It's 8 bit, mono, 11 kHz and is stored in the monster.sou file in Creative VOC format. This is what’s used for the digitized sounds in Monkey Island 1 and 2 and for the speech in Fate of Atlantis.
Debug mode and Windex
We’ve known for years that the SCUMM games have a debug mode built into them. Back in 2003 I wrote about how to activate and use them in a Lucasforums thread. Since Lucasforums is now toast you can read about debug mode in Monkey Island on The SCUMM Bar and in the other games here. Basically, you type in a code, press a key and then some debug features are unlocked like jumping to other rooms. Only a few debugging features are unlocked by doing this though.
The sputm5c.exe interpreter from the prototype is a proper debug build. This means that we can use the full set of debug commands and it also means it has the windex debugger.
Windex is the actual debugger that people at Lucasarts used to develop and debug the game. It was a dual-monitor setup so one would run the game while the other (a hercules monochrome monitor) would display the debugger. This isn't something that DOSBox can normally do, fortunately a user on the VOGONS forums has created a version of DOSBox that supports a second monochrome display. This means that we can run the game and debugger side by side just as the developers would at the time.
How to use it:
- Get the special version of DOSBox from here.
- Copy the SDL.ddl and SDL_net.dll files from a regular version of DOSBox and put them in the folder.
- Run DOSBox with the command line “Dosbox.exe -display2 green”. It should have 2 windows.
- Mount your game folder (I put the game in c:\dos so I would do “mount c c:\dos”).
- Cd to your M2TALKIE folder.
- The parameter w starts the debugger so run the game like this “run.bat w”.
- Press the / key to suspend the game and jump to the debugger.
To type commands into the debugger you have to click into the main DOSBox window. Typing s will let you step through the current SCUMM script while typing ? will show some of the ingame key combinations.To continue the game type “r”. At any point you can press the / key to suspend the game and jump back to the debugger. There are lots of commands which I’ll list below, most of these come from the inimitable Serge who wrote about them in 2002.
Commands you can type in the debugger:
- act: Show actor info
- box: Show box info
- bp, br <breakpoint number> <script number> <offset>?: Set breakpoint
- cru: Crunch memory
- deb: Show debug level
- deb <level>: Set debug level
- f: Trace frame
- fl: Flobject?
- heap: Show heap info
- help: Show help from \scummbin.5\windhelp.txt
- hd: Hex dump?
- hide <param>:
param = f : hide frame count
param = hex : hide hex opcodes
param = disk : hide disk usage
param = v : hide variable dumping
param = sta : hide stack tracing
- inp <filename>: Parse <filename> as Windex commands (like a batch file)
- inv: Inventory info
- loc: Local variable stuff
- menu <filename>: Load menu - not sure how these are supposed to work.
- misc: Show misc. info
- obj: Object info
- out <filename>: Direct Windex output to <filename>
- r: Run
- s: Step
- show <param>:
- param = f : hide frame count
- param = hex : hide hex opcodes
- param = disk : hide disk usage
- param = v : hide variable dumping
- param = sta : hide stack tracing
- scr: Show script info
- seto, sobj: Set current object?
- sou: Sound info
- sou <ON/OFF>: Turn debug sounds on/off
- t: Trace
- v: Show no. of variables
- v <varno.>: Show variable value
- v <varno.> = <val>: Set variable value
- ver: Verb info?
- ctrl+a Start Actor Animation
- ctrl+b Change Video Mode
- ctrl+e Examine/Set a Scumm Var
- ctrl+f Fast Mode
- ctrl+g Goto Room #
- ctrl+l Restart with boot parameter
- ctrl+o Pick Up Object from room
- ctrl+p Palette control Actor/Room
- ctrl+r Redraw entire screen
- ctrl+s Play sound from a file
- ctrl+t Display Text clipping plane
- ctrl+u Remove Unused items from Heap
- ctrl+w Display Walk Boxes
- ctrl+x Test Actor Scaling
- ctrl+y Attach actor to Cursor
- ctrl+z Display Z clipping plane(s)
- shift+f Debug findblock
- shift+h Adjust actor RGB Hue
- shift+i Adjust Actor Intensity
- shift+o Display objects and their usepos
- shift+p Set ActorShadow Intensity
- shift+u Stress the heap
- alt+l Enable/Disable Live MIDI
- ? Help
- /: Frame
- shift + 7?: Trace
Can I run the prototype in ScummVM?
No. I mean you could patch ScummVM so it would load it from lfl files and add support for the monster.sou, it's just a SCUMM v5 game after all. There would be little point to doing it though. Just use DOSBox.
Apart from the fact that there’s speech and no text on the screen, what else is different when you play the game?
You have to use the debugger to jump past some missing rooms but as far as I can tell, there are no other differences. It's up to others to investigate that further.
Has the windex debugger been released publicly before?
Yes but it's not well known - probably because we couldn't do dual monitor DOSBox for many years. The Monkey Island 2 demo included windex. If you start the MI2 rolling demo MI2DEMO.EXE with SPUTMDEBUG 1 it’ll load the debugger.
What's the difference between the w and W parameters with windex?
Lower case w starts the game normally and then you have to press / to jump to the debugger. Upper case W jumps you straight into the debugger before the game loads so you can step through the boot script if you wish.
How did you find the time to investigate and write all this over a weekend?
I neglected my wife and family. My exclamations of “its got windex!” and “there’s loads of samples in that monster.sou!” were met with the withering contempt that they deserve.
Things I haven't had time to check:Do any of the other speech sounds play in game besides the crypt?
You’d have to jump to the correct room ingame to see (ctrl+g).
Are the scripts different?
You’d have to use the ScummVM descumm tool to look.
Does this exe work as windex on the original game?
I imagine it will work on the floppy version and the demo, most other scumm v5 games are a slightly higher subversion so it may not work with MI1 cd for example. To test it you’d put it in the game dir, rename the exe to monkey1.exe for example and run it the same way. Set the environment variable “set SPUTMDEBUG=1”, start the game with the w parameter and a boot parameter applicable to that game.