Macro Decompiling

Although macros require compiling to be ran in the Doom 64 engine, it is also possible to do the reverse and decompile them. For your convenience, decompiled macros from maps of the original Doom 64 campaign can be downloaded here.

The first step to decompiling is to extract the MACROS lump from the map where Slade is recommended. The extracted MACROS.lmp is not easily editable, but decompiling it will result in easier to understand macro actions.

Blam.exe from Doom Builder 64 is used to decompile a macros lump into editable text. Within the Doom Builder 64 directory, blam.exe is found in the same folder as common.txt: "(install path)\Doom Builder 64\Compilers\Doom64". Now put MACROS.lmp into that folder. From here, there is a couple ways to decompile the lump.

Using a Batch file

Download the .bat file found here and place it in the folder with blam.exe. When you run this file, it will look for macros.lmp in the same directory and output the decompiled macro as a text file. Alternatively you can create a new text file (in the same folder as blam.exe and the macros.lmp) and open it. Copy this into the text file:

cd /d %~dp0

START cmd /c "blam.exe macros.lmp macros.01.txt -d"

After saving, rename the text file to "decompile.bat". Running the batch file (it can be double clicked to run) should now decompile macros.lmp to the "macros.01.txt" file.

Creating a Shortcut

Create a shortcut to blam.exe (right click and choose "create shortcut"). Then right click the shortcut and choose "properties". In the properties window that comes up, select the "Shortcut" tab, if it isn't already. In the "Target:" field, go to the end (after where it says "...\blam.exe") and type " macros.lmp macros.txt -d" (minus the quotes). Then hit "Okay". Running the shortcut with "macros.lmp" in the folder should now decompile the script to the "macros.txt" file.