BlogProjectsTravelAbout MeContact

I found hidden debug menus in Destroy All Humans! 1 and 2 (PS2)

August 8, 2026·Written without AI

Today I discovered the existence of, and how to activate, hidden debug menus that are left over in both release versions of Destroy All Humans! 1 and 2 for PS2. You can enable and have fun playing with these debug menus by adding a simple one line patch file in PCSX2. As far as I can tell, I'm the first person on the internet to find an document these, so I thought it worthy of making a blog post.

The Codes

I will get straight to the point and share the codes with you. If you are interested to know how the codes work and how I found the debug menus after 20 years of them hiding in plain sight, stick around for an interesting technical deep dive!

All you have to do is open the game with PCSX2, go to Tools -> Edit Patches... and PCSX2 will create an empty .pnach file and open it in a text editor for you to edit. Here is where you want to put the following code(s):

Destroy All Humans!

File: SLUS-20945_67A29886.pnach

patch=1,EE,0032D0C8,extended,2445F630

Destroy All Humans! 2

File: SLUS-21439_42DF8C8C.pnach

patch=1,EE,003678C0,extended,24050000

Once these are added, restart PCSX2. If done correctly, after loading up the game and loading into a mission, you should be able to hit SELECT in DAH1, or L1 + SELECT in DAH2 to load the debug menus. Enjoy!

How I Found The Debug Menus

After coming to a stopping point for my work with reverse engineering Rumble Racing and creating a renderer for the game for noclip.website, I was looking for another nostalgic PS2 game to start tearing apart. I thought back on some fond games I played as a kid and the Destroy All Humans! series came to mind. It's an open-world satirical game that pokes fun at a 20th century US paranoid of communism and aliens. I figured that the maps would be full of funny details and textures, and that both games likely share the same underlying engine since they are made by the same studio only a year apart. This makes the games a good candidate for reverse engineering and a potential eventual port to noclip.website.

The first step when diving into reverse engineering a game is to figure out where you even begin. The first thing I usually do is extract the game data from the ISO file and take random files and open up them up in hexed.it and start perusing through the data. Of course I don't understand anything at this point, but sometimes you can see strings or other repeating patterns that inspire your brain to start imagining how the game works in the background.

In the case of Destroy all Humans 1, each game level is stored in a folder with its canonical name in the filesystem, i.e. AREA42/, FARM/, and ROSWELL/, and each of these levels has a single .DIR file, and three .PKG files. Inspecting DISCARD.PKG I immediately noticed that there were references to Lua, broken file paths, and what appear to be variable names all stored in ascii.

After a bit of research, it appears that it is likely Lua 4 bytecode, and that there is even an open source decompiler for Lua 4 called lua4dec that I could use to potentially decompile it.

The idea of being the first person to be able to peek behind the curtains at the proprietary source code and filesystem layout of a PS2 game is always exciting, but I knew it was not going to be possible in the current state. From my experience with Rumble Racing, I figured that the reason the file paths are broken is likely due to the data being compressed, so I wasn't going to be able to decompile the bytecode until I figured out where and how the data was being decompressed.

Decompress All Humans

Using the PCSX2 debugger, I loaded the farm level and paused execution in-game. In a paused state you can inspect the PS2's memory at runtime. I searched for the partial file path in the compressed data which was not broken, and found a couple of places where the file path was in memory and I set a write breakpoint on both addresses. After restarting the game and loading the level, PCSX2 will automatically halt during the routine that is writing those values. In this case, it was clear I was halting in a memcpy, and the function at 00353DC4 that was calling it was the decompression routine I was interested in.

Normally, I load the game binary into Ghidra with ghidra-emotionengine-reloaded and it decompiles the assembly to C-like pseudocode which you can navigate through. However this case was different: While the game loaded and decompiled like any other game, I could not navigate to the address 00353DC4. It was not being found anywhere in the decompiled code, and Ghidra kept yelling at me that the address did not exist and could not be navigated to.

At first I assumed there was something wrong with the memory map and that I needed to manually add the range as a .text section for it to be picked up by the decompiler. After trying and failing at doing this, I scrolled to the decompression routine address. I noticed that the data there did not match the bytes/instructions that I was seeing at that address in PCSX2.

Something weird was going on. The decompression routine exists at runtime, but not in the static ELF file? Was the game dynamically writing its own code into memory at runtime? One way to find out: I plopped another write breakpoint on an address in the middle of the decompression routine. Once again, restarting the game triggered PCSX2 to break in the routine that was writing the decompression routine itself and modifying its bytes. Once again, a large chunk of data was being decompressed and copied around from one place to another. It now became clear that the game was indeed copying its own compiled executable code around in memory at runtime.

After some more digging I found out that the original ELF had another compressed ELF file embedded in its readonly data. My next job was decompressing and extracting this second compressed ELF file out of the main ELF file. Once I did that, I was able to load it into Ghidra, and I was FINALLY able to navigate to the original decompression routine the game uses at address 00353DC4! Progress!

But... Why?

I was curious why Pandemic Studios would be embedding a compressed ELF file within the main ELF file and doing this weird trickery at runtime, so I asked the folks at the PS2 Decompilation Discord channel and they offered some ideas:

Most of the time that stuff is usually done for anti-piracy or other copy protection purposes. I know Valkyrie Profile 2 in particular is an example of insane copy protection methods. IIRC that game decrypts the ELF using VU microcode, and actually has real anti-cheat which bricks your save file if it detects that the save was edited

Reading this made me extremely happy that I was not trying to figure out that game. Devs using hand-written assembly on the PS2's separate vector unit hardware to obfuscate the decryption process of the game code is next-level paranoia and insanity.

Oh yeah that might have been something done for the multiplayer Since Battlefront did have multiplayer mode maybe they did that for avoiding hacks and it was inherited in DAH involuntarily since that game only had local multiplayer iirc while Battlefront did have online multiplayer through a special device for the PS2

Both of these theories suggest that it might have been a leftover anti-piracy/anti-debugging measure that Destroy all Humans might have inherited from Star Wars Battlefront. This would make sense because I know that game was also made by Pandemic Studios, released before this one, also uses Lua scripting, and likely shares a lot of the common engine code.

TODO: Continue writing...