Hacking Tunneler

While the source code for Tunneler is long gone, it’s still possible to customize the game by hacking the TUNNELER.COM binary executable — if you’re handy with a binary editor!

Keyboard Control

Because Tunneler makes use of more simultaneous key presses than most keyboards are designed to support, there are some keyboards on which Tunneler doesn’t work properly.  I’ve received requests to change the key control definitions.  You can hack Tunneler by modifying the byte values at the following offsets:

Offset  Player  Control  Key             Scan Code
0x96DF  Blue    Fire     [Left-Control]  0x1d
0x96E1  Green   Fire     [Enter]         0x1c
0x96E3  Blue    Up       [W]             0x11
0x96E5  Green   Up       [KEYPAD-UP]     0x48
0x96E7  Blue    Down     [X]             0x2d
0x96E9  Green   Down     [KEYPAD-DOWN]   0x50
0x96EB  Blue    Right    [D]             0x20
0x96ED  Green   Right    [KEYPAD-RIGHT]  0x4d
0x96EF  Blue    Left     [A]             0x1e
0x96F1  Green   Left     [KEYPAD-Left]   0x4b

For instance, to change the key for the Blue (left) player’s Down control from [X] to [S], change the byte value at offset 0x96E7 from 0x2d to 0x1f.

Here is a complete list of the IBM PC keyboard scan codes, as used by Tunneler.  I haven’t tried hacking in the two-byte (starting with 0xE0) key codes, so I’m not sure if those will work.

Key                 Scan Code                 Key                 Scan Code
[`]                 0x29                      [Tab]               0x0f
[1]                 0x02                      [Q]                 0x10
[2]                 0x03                      [W]                 0x11
[3]                 0x04                      [E]                 0x12
[4]                 0x05                      [R]                 0x13
[5]                 0x06                      [T]                 0x14
[6]                 0x07                      [Y]                 0x15
[7]                 0x08                      [U]                 0x16
[8]                 0x09                      [I]                 0x17
[9]                 0x0a                      [O]                 0x18
[0]                 0x0b                      [P]                 0x19
[-]                 0x0c                      [[]                 0x1a
[=]                 0x0d                      []]                 0x1b
[Backspace]         0x0e                      [\]                 0x2b

[Caps Lock]         0x3a                      [Left Shift]        0x2a
[A]                 0x1e                      [Z]                 0x2c
[S]                 0x1f                      [X]                 0x2d
[D]                 0x20                      [C]                 0x2e
[F]                 0x21                      [V]                 0x2f
[G]                 0x22                      [B]                 0x30
[H]                 0x23                      [N]                 0x31
[J]                 0x24                      [M]                 0x32
[K]                 0x25                      [,]                 0x33
[L]                 0x26                      [.]                 0x34
[;]                 0x27                      [/]                 0x35
[']                 0x28                      [Right Shift]       0x36
[Enter]             0x1c

[Left Ctrl]         0x1d                      [Insert]            0xe052
[Left Alt]          0x38                      [Delete]            0xe053
[Space]             0x39                      [Home]              0xe047
[Right Alt]         0xe038                    [End]               0xe04f
[Right Ctrl]        0xe01d                    [PgUp]              0xe049
[PgDn]              0xe051

[Left]              0xe04b                    [Print Screen]      0xe037
[Up]                0xe048                    [Alt+SysRq]         0x54
[Down]              0xe050                    [Scroll Lock]       0x46
[Right]             0xe04d                    [Ctrl+Break]        0xe046

[NumLock]           0x45                      [Esc]               0x01
[KEYPAD-7 Home]     0x47                      [F1]                0x3b
[KEYPAD-4 Left]     0x4b                      [F2]                0x3c
[KEYPAD-1 End]      0x4f                      [F3]                0x3d
[KEYPAD-/]          0xe035                    [F4]                0x3e
[KEYPAD-8 Up]       0x48                      [F5]                0x3f
[KEYPAD-5]          0x4c                      [F6]                0x40
[KEYPAD-2 Down]     0x50                      [F7]                0x41
[KEYPAD-0 Insert]   0x52                      [F8]                0x42
[KEYPAD-*]          0x37                      [F9]                0x43
[KEYPAD-9 PageUp]   0x49                      [F10]               0x44
[KEYPAD-6 Right]    0x4d                      [F11]               0x57
[KEYPAD-3 PageDown] 0x51                      [F12]               0x58
[KEYPAD-. Delete]   0x53
[KEYPAD--]          0x4a
[KEYPAD-+]          0x4e
[KEYPAD-Enter]      0xe01c

[Back]              0xe06a                    [My Computer]       0xe06b
[Forward]           0xe069                    [Calculator]        0xe021
[Stop]              0xe068                    [Sleep]             0xe05f
[Mail]              0xe06c
[Search]            0xe065                    [Left Windows]      0xe05b
[Favorites]         0xe066                    [Right Windows]     0xe05c
[Web/Home]          0xe032                    [Menu]              0xe05d
This entry was posted on by .

Leave a Reply

Your email address will not be published. Required fields are marked *