dhelogo2.gif (5079 bytes)

How to get Dehacked working

What do I need to get DEHACKED working?

A full version of doom or doom2.

This is mainly needed to provide a reference for the original doom.exe (the WAD file is needed as a resource too). A lot of the difficulties in setting up dehacked relate to having the original EXE available, and telling dehacked where it is and which version it is. Many people nowadays do not have the files installed because they are just using source ports and are surprised to find dehacked needs the old DOS EXE.  Also, if you bought the Doom collectors edition, this didn't even have the original DOS distributions on the disk.  Fortunately, the original exe can be easily downloaded as part of the Doom shareware package.  This exe will work and will allow you to use dehacked with Doom or Doom2.

Note: Dehacked needs the original DOS exe.  Doom95.exe will not work. 

A copy of Dehacked!

Available from the Doomworld utilities section. Dehacked version 3.1 is the last version available. Internally it reports itself in its files as version 3.0, but it is 3.1. Earlier versions saved its patches in some sort of binary format. The later ones are simple text files and can easily be edited with notepad or similar to add BEX information. It is the later text format that source ports support. If you have any old format patches, you can load them into dehacked 3.1 and resave them to upgrade to the new format.

How do I get DEHACKED working?

Dehacked has an ini file that you will need to edit to get dehacked working with your set up. It should be in the directory you unzipped dehacked into. Open it with notepad, or similar, and change the various settings to suit your system.

The DEHACKED.INI sections.

The dehacked ini file is quite well commented, but a number of people do have problems setting it up, so here goes.

File locations

You need to tell dehacked where to find your original doom.exe

There are a number of predefined entries pointing to possible doom.exe files. Most of these are commented out by having a # at the start of the line. You should specify the location of a doom.exe for dehacked to use as the source of original unhacked data. This file will only ever be read by dehacked, not altered. It should be an unedited doom exe of some sort.  Version 1.9 is best as most source ports work with the 1.9 WAD file anyway.

For a default doom2 installation, the line in the ini file should look like this.

normalname = c:\doom2\doom2.exe

Any other lines with the normalname start should be commented (#) out.

You will also need to tell dehacked where your hacked EXE is. This is now fairly redundant as you can run the patches you create using a source port, and there is no need to create a new EXE with dehacked. Dehacked expects to find a hacked exe name, however, so you should include it.

Typical example

editname = c:\doom2\hack.exe

Once again, all other editname lines should be commented out. The hack file does not need to actually exist at this stage. When you first start dehacked it will check if the file is there. If it isn’t, it will ask if you wish to create it. You should say yes. If you write your changes to your hack file (press w in dehacked), you can quit and dehacked will start up next time with the changes you made still in place. That is about the only real use I have for the hacked EXE nowadays.

You also need to tell dehacked where your main doom(2) Iwad is. Dehacked uses this to display graphics and play sounds from the wad. It will not accept the shareware doom1.wad.

wadname = C:\doom2\doom2.wad

Again make sure all other wadname lines are commented out.

Other location entries.

Pathname tells dehacked the directory to run the hacked doom EXE from for testing purposes when hitting the "r" key in the program. In most cases you will not need this, as you will be using a source port to load dehacked patches rather than running a hacked exe.

pathname = c:\doom2

Patch dir is important. It tells dehacked where to load and save your patch files from/to. Because dehacked is an old DOS prog, it doesn’t have a particularly helpful load/save dialogue. You just hit "L" or "S" in the program and type in the name of the file. If you just type in the file name, dehacked looks in the directory specified in the ini. You can type in the full path name to a file not in the default directory. If you have not specified a patchdir, or have specified a patchdir that doesn’t exist, dehacked can have difficulties when saving/loading files from any location.

patchdir = c:\doom\doom2

Other parameters

By default, dehacked loads the original doom data (from doom.exe) before loading in new patches. If you uncomment the following line in the ini, you will stop it doing this. In my experience, not loading the original can sometimes confuse dehacked when you load in a new patch. There is a keystroke in the program that allows you to reset the data anyway (z for zap the data). Not loading the original data, however, allows you to add changed data in a patch to changed data already in your hacked EXE.

The line appears commented out in the ini like this by default.

#askatload = false

Dehacked has a graphic logo that can be loaded every time the prog starts. IMO this just wastes time so uncomment the line.

loadlogo = false

I have already said that dehacked will remember the status of your previous edit if you write to your hacked EXE before quitting. There is one thing that will be forgotten if you use this method. This is because the information concerned is not stored in the EXE. For example, you may have chosen to rename the trooper mymonster in dehacked to help make things more meaningful to you. These changed names are only used by dehacked to help you when editing, they have no effect on the doom EXE.

When you save and load your dehacked patch, the changed names will be saved and loaded from the patch. If you have simply relied on your modified EXE to keep the edit status for you, the modified thing names will be forgotten next time you start dehacked. You can put your changed names in a things name file so that they are automatically loaded each time.

If you want to use this feature, you have to create a text file with all your renamed items in it.  The format is like this:

2 My Monster
3 Another Monster
4 My Lamp

Where the number is the thing number in the dehacked thing editor (2 is normally the trooper, 3 the sargeant, 4 the archvile etc).

Once you have set up your file, you need to identify it in the dehacked ini.  Use the following:

namefile = mynames.nam

to point to your names file where mynames is the name of your name file. Remember, this is a DOS program, so no long file names (8 letters + a 3 letter extension at most).

As an aside, I said that changed thing names are also saved in your patch files. These are restored in dehacked when you load the patch. If you have renamed a thing but not edited any of its data (eg calling a stimpack a band aid or something but otherwise leaving it unchanged) this will not be saved in the patch file. Dehacked only saves changes to the original EXE, not the entire data for each thing.  The name data is used by dehacked only, and not doom.exe.  If no EXE related data has changed, there will be no entry for the stimpack in your patch, even if you changed the name in dehacked.

Sound card configuration

Dehacked can play the sounds in your doom wad if it can find your sound card. It can use and autodetect sound blaster cards by setting the dma parameter to –1. However, many newer sound cards (my SB Live for one) cannot be auto detected. It may still work if you put in the correct parameters for your card though. To find out the parameters for your card, open a DOS window under Win 95/98 (start, run, and enter command.com, or find your MSDOS shortcut) and type "set [enter]" at the command prompt. This will give you your environment settings. Look for the line Blaster=XXXXXXXXX. These are your sound card settings. Do not try and find out the settings using the device manager in win 95/98 as these often differ to those used in a DOS session under windows (although you should find the SB16 emulation settings are the same as the DOS blaster line).

My blaster setting looks like this

BLASTER=A220 I7 D1 H5 P330 T6

A is the address, I is the Irq setting, D is the low DMA setting, H is the high DMA setting, P is the MPU 401 port setting (I think) and T is the card type. You don’t actually need to know what these are, just that they exist and dehacked needs them. The first 3 are the ones dehacked uses. My dehacked.ini has the following lines.

sbaddress = 220

sbirq = 7

sbdma = 1

Identifying your Doom version.

Doom has been updated a number of times. The newest version is 1.9 and you should have that by now as that is the version most ports require, but dehacked supports other versions. There is a list in dehacked.ini of which number corresponds to which version. For anyone nowadays the only decision should be do I have the normal version 1.9 or the ultimate doom version 1.9. If you get it wrong you will soon know when you start dehacked and see error messages in many of the data entry fields.

Cut and pasted straight from the ini file.

# Doom version #

# 0 for Doom 1 1.666

# 1 for Doom 2 1.666

# 2 for Doom 2 1.7, 1.7a

# 3 for Doom x 1.9

# 4 for Ultimate Doom 1.9

version = 3

Set the version line to reflect the version of doom you have.

Unusual Doom versions

The final section of the ini was just put in to try and anticipate any new versions or modified versions of doom. It allows you to tell dehacked the size of the file and offsets of the data sections for non standard doom.exe files. Most people will not have such a file and there is little need to go into more detail here (even if I could). Use a standard 1.9 EXE, and make sure all the settings from the last part of the ini are commented out.