Author Topic: HACKING 101 - The DIFF.TBL  (Read 1185 times)

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
HACKING 101 - The DIFF.TBL
« on: August 12, 2009, 05:51:57 AM »
The DIFF.TBL - What it is & how to use it

PRACTICE PAINLESS EDITING: ALWAYS BACK UP YOUR FILES FIRST!

History
  Editors such as HackCKIT, UGE, or Hex Editors are used to directly alter the bytes of CKIT.exe, UA's main executable file. Distributing a hacked CKIT is both illegal and cumbersome, however a distributing a DIFF.TBL to apply the changes to an unhacked CKIT is legal and simple. Peter Delaney developed the first DIFF.TBL for applying hacks to a module, and its use has continued through UA Tools, and (currently) David Knott's UAShell. The best part of this is that the hacks can be applied or removed automatically. It is possible to apply the information in a DIFF.TBL without using UAShell (via Hex editing), but this is time consuming, a lot more work, and the changes can not be removed automatically.

Note: Before editing, use UAShell to apply the design (F5) you want to edit.

What It Is
  A DIFF.TBL file, or difference table, is constructed from a byte-by-byte comparison of two files. UAShell compares a reference (PANIC.XXX in the Default.dsn folder) with the CKIT.exe in your FRUA root directory, and writes the differences to a file (named DIFF.TBL) in the active design directory.

  The file format is [Hex Address] [old value] [new value], with one space between each value, and no leading or trailing spaces. Leading zeros are not used (9, not 09), and the last line must always be a single zero, followed by [Enter].

Example:

3F4E1 25 24
3F4FF E 19
0

How to Make One
  When using CKIT editors through UAShell, the program shells out to a DOS window and starts the editor (for a listed program), or just sits and waits (if you select CKITSAVE) while you open and run your own. When you finish editing, return to the DOS window and follow the prompts. If you select Save Changes, UAShell will create a DIFF.TBL in your design folder.

  In some cases it may be best to copy your CKIT into another directory and edit it there. (Example: You are editing text strings and want to run UA to find the strings in one window while editing them in another. Since CKIT can't be open for both running and editing, use two CKITs.) When you finish editing, run UAShell, open CKIT EDITORS (F2), and select CKITSAVE. AFTER the DOS window shells out, copy the hacked CKIT into your UA root directory. Return to the DOS window and follow the prompts.

Pasting Into an Existing DIFF.TBL
  Many hack documents contain the phrase "paste the following lines into your DIFF.TBL." Is it really that easy? The short answer is, "Yes." Just make sure you don't include extra spaces, and paste above the final 'zero' line.

  The lines do not have to be in order, and if you write to a byte more than once (which shouldn't happen), the last value will be applied.

Happy Hacking
« Last Edit: August 13, 2009, 05:24:29 PM by nologgie »
Some days it just doesn't pay to gnaw through the straps.

Offline Rosestar

  • Full Member
  • ***
  • Posts: 192
  • Keeper of the Blue Kitten
Re: HACKING 101 - The DIFF.TBL
« Reply #1 on: August 13, 2009, 01:09:24 PM »
Quote
and it's use
|sf>I hope you don't mind some minor proofreading critiques.  Change this to "its" use.

Quote
if a byte is written to more than once (which shouldn't happen)
Change this to "if you write to a byte more than once (which shouldn't happen)".
---
Suzanne M. Ferree
  ev322@netzero.net

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: HACKING 101 - The DIFF.TBL
« Reply #2 on: August 13, 2009, 05:28:01 PM »
Done.
Some days it just doesn't pay to gnaw through the straps.