Skip to content

SOFTWARE ARCHIVE / 1994

DeHackEd

Game Utilities

Greg Lewis's editor that opened up Doom's executable: each monster's health, speed and weapons, plus cheats and text, saved in .DEH patches still used today.

A window into the history of our computers.

Cover of DeHackEd
COMMUNITY RATING

— no rating yet

Platform
MS-DOS
Year
1994
Developer
Greg Lewis
Language
English
HISTORY / CONTEXT / FEATURES

Inside DeHackEd

First you had to touch the configuration file, then type DEHACKED at the MS-DOS prompt and, after a logo with an electrified planet, a blue screen full of numbers appeared. It looked like a spreadsheet, but it was the inside of Doom. DeHackEd let you change the trooper’s hit points, an imp’s speed or what a cacodemon shot, save it all in a small .DEH patch and pass it to your friends over BBS or FTP. You pressed W, launched Doom and, suddenly, the game you knew by heart behaved differently.

A student versus Doom’s executable

Doom arrived in December 1993 with its maps, graphics and sounds stored in WAD files that the community soon learned to edit. However, the behavior of monsters, weapons and objects was inside the executable itself, DOOM.EXE. Matt Fell, author of the Unofficial Doom Specs, published an article titled «Hacking the DOOM.EXE file» with the structure of those tables, and from that information Greg Lewis, known as Tree, who signed with a University of Michigan email address, wrote an editor to modify them without wrestling with a hex editor.

Version 1.0 of DeHackEd appeared around June 19, 1994, and updates followed at a rapid pace, announced in the alt.games.doom newsgroup and distributed from the idgames archive at ftp.cdrom.com. Lewis wrote it in Borland C++ 3.1 and released it into the public domain, with no registered version, although he suggested a 10-dollar donation to anyone who found it useful. His list of acknowledgments shows how much of a collective effort it was: Lee Gaiteri, Lummox JR, deciphered the code pointers and designed the logo; Elias Papavassilopoulos located the miscellaneous data, and other hobbyists went on identifying, one by one, the bits that were still a mystery.

What made it special

  • Things editor: every object in the game, from the player to the Cyberdemon, showed its hit points, speed, size, mass, sounds and frames, plus a 32-bit table of properties such as floating, being invisible or passing through walls.
  • Frame table: it let you decide which image is shown, how long it lasts and which comes next; from version 3.0 also which action the game runs on each frame, the so-called code pointers.
  • Weapons, cheats and miscellaneous data: ammo, cheat codes and values such as starting health or the ammo the BFG uses were gathered on a single screen.
  • Sounds, sprites and text: tables for reassigning sounds and sprite names, and a text editor with search for changing the game’s messages and phrases.
  • Built-in viewer: the space bar showed the selected frame or played the selected sound, reading it from the registered WAD.
  • Text patches: changes were saved in .DEH files that could be opened with any editor and also applied from the command line, ideal for batch files.
  • Without touching the original: modifications were written to a copy of the executable, DOOMHACK.EXE, so DOOM.EXE or DOOM2.EXE stayed intact.

Versions that defined an era

  • 1.0 (June 1994): the first public version; 1.1 already added the bit editor and 1.2, patch files.
  • 2.0 (September 1994): new windowed interface, frame viewer, text editing and the DEHACKED.INI file for paths and names.
  • 2.2 (December 1994): arrival of the mouse and compatibility with Doom II 1.7a.
  • 2.3 (February 1995): revised text patch format and support for Doom 1.9.
  • 3.0 (August 1995): compatibility with The Ultimate Doom, cheat editing, code pointers and miscellaneous data.
  • 3.0a (September 4, 1995): a fix for Doom II 1.666 and 1.7; it was Greg Lewis’s last version.
  • 3.1 (1997): an adaptation for Final Doom carried out by John A. Kaczmarski Jr.

From fan trick to standard

Before id Software released Doom’s source code, DeHackEd was the main way to change the engine’s rules, and patches circulated everywhere: frantic-fire weapons, monsters that passed themselves off as marines in deathmatches, or barrels that chased the player. Some projects went much further; total conversions such as Hacx used installers that applied their .DEH patch to a copy of the Doom II executable. The documentation itself warned that id’s legal department considered those patches contrary to its license, although, according to Lewis, the company did not object to their being distributed.

The format outlived its program. Version 2.3 even got a Linux port; Lewis himself made HHE for Heretic and, in 2004, Mike Fredericks started from 3.0a to create SeHackEd, dedicated to Strife. Source ports learned to load .DEH patches directly: Boom added the BEX extensions and MBF introduced in 1998 the ability to include the patch inside the WAD itself. Today, modern editors such as WhackEd and extensions such as DEHEXTRA still speak the language Greg Lewis defined in 1994, and most current ports load their patches without further ado.

A look at the program

See screenshots ↗
VISUAL ARCHIVE

Full screenshots of the program. Tap to enlarge and move from one to the next.

DeHackEd / visual archive
DeHackEd startup logo, with the electrified planet and Greg Lewis's credits Enlarge
EXPLORAR0102030405
Image sources ↗
USER MANUAL

Back to the desktop.

01Loading your first .DEH patch with DeHackEd 3.0a in DOSBox

Reference environment: DOSBox 0.74-3 on Windows, macOS or Linux, with DeHackEd 3.0a and your own copy of Doom II 1.9 for MS-DOS (DOOM2.EXE and DOOM2.WAD).

Before you start

DeHackEd is not a game: it modifies Doom’s executable, so you need your registered copy of Doom, The Ultimate Doom or Doom II in its MS-DOS version. The shareware WAD won’t do, and neither will the Windows editions such as Doom95. In this example the game files are in C:\retro\doom2. Download dhe30a.zip and unzip it into a subfolder, C:\retro\doom2\dhe. If you have Final Doom (TNT or Plutonia), use the dhe31.zip package, which comes prepared for those versions.

Step by step

  1. Open DEHACKED.INI with a text editor. Check that the lines without a # in front say editname = c:\doom2\doomhack.exe, normalname = c:\doom2\doom2.exe, wadname = c:\doom2\doom2.wad and pathname = c:\doom2, and change patchdir to c:\doom2\dhe, which is where the sample patches are.
  2. Open DOSBox and mount the folder that contains the game’s folder as drive C: with mount c C:\retro. Type c: and then cd doom2\dhe.
  3. Start the editor with dehacked. After the DHE logo (it can be turned off with loadlogo = false in the INI) you will arrive at the editor. If DOOMHACK.EXE does not exist yet, the program will offer to create it from DOOM2.EXE: accept.
  4. The Things editor opens (F2). With F3 you go to the frame table, with F4 to weapons, cheats and miscellaneous data, with F5 to sounds, with F6 to sprites and with F7 to the text editor. Move with the arrow keys, press Enter to edit a field and Esc to cancel.
  5. To try an existing patch, press L and then Enter to pick it from the list, for example SUPRWEP8.DEH. When it asks whether you want to reload the executable’s original data, answer yes.
  6. Press W to write the changes to DOOMHACK.EXE. Without this step, Doom will notice nothing.
  7. Press R to launch the modified game. The sample file starts it with -skill 4 -warp 8; you can change that in the params line of the INI. To save your own modifications, use S and type a patch name.

Check that it works

When you return to the editor, the A key shows the DeHackEd version and which Doom executable it has recognized. If you exit with Esc and type cd .. and doomhack, the game should start with the patch’s changes, while doom2 remains the original.

If something goes wrong

If DeHackEd says it can’t find the Doom files, check the paths in the INI: they are those of the C: drive that DOSBox sees, not those of your computer. If you see no change in the game, remember to press W before exiting and to run doomhack instead of doom2. If your executable has a nonstandard size, the help file (DEHACKED.HLP) explains how to specify the version and size in the INI. In network games, all players must use exactly the same patch.

Downloads and resources

Sources and documentation7

¿Lo utilizabas?

Comparte tu experiencia con DeHackEd o resuelve una duda con la comunidad.

Conversar en el foro ↗
SHARED MEMORY / SOFTWARE

Your desktop.
Your memories.

Vuelve a compartirlos.

Someone else remembers DeHackEd. Send them this page and head back to that desktop together.

YOUR RETRO POSTCARD
CLÁSICOS
BÁSICOS.
ARCHIVO
OF SOFTWARE
Esto estaba
on my computer.
Cover of DeHackEd
DeHackEd1994 CLASICOSBASICOS.ORG

A memory to keep. A story to send.

THE ARCHIVE IS STILL OPEN

More software worth a look.