home *** CD-ROM | disk | FTP | other *** search
/ Toolkit for DOOM / DOOMTOOL.ISO / doomhack / dmpatch.zip / DMPATCH.DOC next >
Text File  |  1994-08-15  |  5KB  |  121 lines

  1. The name:
  2.  
  3.    DMPATCH.EXE
  4.  
  5. The purpose:
  6.  
  7.    To allow simple, consistent ways to patch the DOOM executable.
  8.  
  9. The program:
  10.  
  11.    This is a very simple patch program.  It was written with DOOM in
  12.    mind, but should be able to be used with almost any file (with some
  13.    things in mind, see caveats).  I wrote it to be flexible, and made
  14.    it allow easy patches to different versions of the executable.
  15.  
  16.    This program takes either 1 or 2 command line arguments.  If there
  17.    are two command line arguments, the first is the name of the file,
  18.    and the second is the offset in the file to make the modifications.  
  19.    If there is only one argument, it is the offset into the file.  In
  20.    this case, the file 'doom.exe' in the current directory is assumed
  21.    to be the file to edit.
  22.  
  23.    After the program starts, and it does a few things, it will ask you
  24.    how many bytes you want to change.  Enter the amount you desire.
  25.  
  26.    Now the program will put you in a rather crude editing mode.  The
  27.    current values at the requested address will be display, and a
  28.    "_" will be shown a couple of lines below.  This represents the
  29.    current editing position.  You may enter in the patch values you
  30.    want.  If you make a mistake, the backspace should work; however,
  31.    I wouldn't count on it 100%.  Try not to make mistakes, and don't
  32.    start without backing up the original.
  33.  
  34.    After you have entered the correct number of bytes, the program will
  35.    display what you entered and ask if that is OK to patch.  If you
  36.    say yes, the program will patch the addresses and drop you out on the
  37.    DOS command line.  Otherwise, it will just drop you out in DOS that
  38.    much faster.
  39.  
  40. The good:
  41.  
  42.    I am trying to get a consistent way to publish the many things I
  43.    have found about the executable in a way that will help most people.
  44.    I will organize this into some sort of table ASAP.  I am always 
  45.    welcome to new entries from anyone, and will also field requests
  46.    to figure out patches to do new things.
  47.  
  48. The bad:
  49.  
  50.    This program will modify your executable.  If you enter erroneous
  51.    information, you could DESTROY your executable.  Please backup the
  52.    DOOM.EXE (or whatever other file you are patching) before beginning.
  53.    I have tried to make sure it is stable, but we all know how that
  54.    goes.  If anyone catches anything I missed (bugs that is), I would
  55.    appreciate a line.
  56.  
  57. The ugly:
  58.  
  59.    MY INTERFACE.
  60.  
  61.    This program is crude.  It is not user friendly.  I did not spend a
  62.    lot of time on it.  If you have suggestions for interface or other
  63.    modifications/additions, I would love to hear them (particularly if
  64.    they are not too complex to implement).
  65.  
  66. The example:
  67.  
  68.    Say I want to change 4 bytes at hex offset 8ab48 in doom.exe (which is in 
  69.    the current directory)
  70.  
  71.      dmpatch 8ab48
  72.  
  73.      Then enter 4 when it asks how many bytes to change, etc, etc.
  74.  
  75.    Say I want to change 6 bytes at hex offset 12af9 in \games\doom\doom.exe
  76.    (which is NOT in the current directory)
  77.  
  78.      dmpatch \games\doom\doom.exe 12af9
  79.  
  80.      Then enter 6 when it asks how many bytes to change, etc, etc.
  81.  
  82. The caveats:
  83.  
  84.    I wrote this for my own use.  For this reason, I wrote it to be
  85.    most compatible with the disassembler I use.  The disassembler that
  86.    I use does some weird segmenting stuff with the DOS4GW header, and
  87.    hence, subtracts 1dd0 (hex) from each address (ie: offset 5dd0 in the
  88.    file appears as 4000).  So, the patch values that I supply will be
  89.    1dd0 (hex) less than their actual offset in the file.  If you are
  90.    going to use this program on a file other than DOOM, keep this in mind.
  91.  
  92. The request:
  93.  
  94.    I would love to have some help disassembling doom.exe.  If anyone has
  95.    done any of this and would like to share it with me, I will add it
  96.    to what I have already (and of course give credit where due).  I think
  97.    we could get a pretty decent list pretty quick with a few peoples
  98.    input.
  99.  
  100. The BS:
  101.  
  102.    I wrote this program for my own use.  I am releasing it into public
  103.    domain so that others can use it to.  I make no guarantees express
  104.    or otherwise about its operation.  If you can't deal with that, don't
  105.    use it.  I will not accept responsibility for how this program is
  106.    used (particularly if it is illegal), or what it does to your 
  107.    information if you use it wrong or there is a bug in it.  The program
  108.    may be freely distributed.
  109.  
  110.    ID software has no knowledge (to my knowledge) of this software and
  111.    is in no way affiliated with it.  They cannot be held responsible for
  112.    it in any way.
  113.  
  114. Please any suggestions/observations/etc e-mail to me.
  115.  
  116. Steve Larsen
  117. larsen@sunset.cs.utah.edu
  118. larsen@unislc.slc.unisys.com
  119.  
  120.  
  121.