Before you begin
The first thing you need to do is equip yourself with a couple useful bits of software:
- a hex editor (I recommend HxD)
- if you wish to play with a controller, x360ce is probably the simplest way to find your controller's DirectInput GUID - we won't be using it for anything else
The file is structured in 172 bytes of data, mostly in chunks of 4 bytes. Here's a detailed breakdown of what each chunk represents:
byte 0 to 3: some identifier
byte 4 to 19: audio device GUID
byte 20 to 35: graphics device GUID
byte 36 to 39: window width
byte 40 to 43: window height
byte 44 to 47 & 48 to 51: color depth (20 00 00 00)
byte 52 to 55: windowed
byte 56 to 59: compatibility mode
byte 60 to 63: high res
byte 64 to 79: controller GUID
byte 80 to 115: keyboard inputs
byte 80 to 83: left
byte 84 to 87: right
byte 88 to 91: top
byte 92 to 95: bottom
byte 96 to 99: hop
byte 100 to 103: search
byte 104 to 107: zap
byte 108 to 111: rotate left
byte 112 to 115: rotate right
byte 116 to 123: unused afaik
byte 124 to 159: controller inputs
byte 124 to 127: left
byte 128 to 131: right
byte 132 to 135: up
byte 136 to 139: down
byte 140 to 143: hop
byte 144 to 147: search
byte 148 to 151: zap
byte 152 to 155: rotate left
byte 156 to 159: rotate right
byte 160 to 167: unused afaik
byte 168 to 171: language index
The graphics device GUID is mandatory to change resolution, but the audio device can be left zeroed if you don't wish to output sound on a non-default channel. Controller GUID is of course mandatory to play with a controller.
Graphics
GUID
Before doing anything with the settings, we need to find the graphics device GUID.
To do that, launch dxdiag and let it run, then click "Save All Information..." and look for a field named Device Identifier; this will be your GUID.
Once you have your GUID, you need to transform it a bit before inputting it into the hex file. Since zapper.dat is in little endian, we need to invert the byte order the first 3 sections of our GUID. For example:
- My graphics card's GUID looks like this: D7B71E3E-67C4-11CF-1F6A-B3A70EC2ED35
- To invert the byte order of my first section, I divide it in pairs: D7 B7 1E 3E; then I simply reverse the order of the pairs: 3E 1E B7 D7
- Once every section is formatted properly, my GUID will now look like: 3E 1E B7 D7 C4 67 CF 11 1F 6A B3 A7 0E C2 ED 35
- I can then replace the bytes 20 to 35 in zapper.dat with those bytes
Changing resolution & windowed mode
The game seems to only accept a number of preset widths and heights, that you will have to replace bytes 36, 37, 40 and 41 with. Here are some common parameters (remember, the byte order is inverted):
- 1920x1080: 80 07 x 38 04
- 1280x720: 00 05 x D0 02
- 640x480: 80 02 x E0 01
You will also need to fill out the color depth bytes (44 & 48) with 20 (32 bits).
If you want to enable windowed mode, every other setting affecting resolution will be ignored.
To enable windowed mode, simply replace byte 52 with a 01.
Sound
GUID
You will need to find the GUID of the sound device you want to use. Do note that if you want to use your default device, you don't need to do anything, the game will wire it for you.
To find your sound device GUID, launch Device Manager, find your audio output and open its Properties. In the Events tab, find an event such as "Device configured", and in the Information area, you will find a message that looks like "Device SWD\MMDEVAPI{0.0.0.00000000}.{c7d1fc58-9603-4d90-b331-15df2d573f44} was configured."; in that case, your GUID would be c7d1fc58-9603-4d90-b331-15df2d573f44.
You can then replace the bytes 4 to 19 in zapper.dat following the same method as the Graphics GUID section of this guide.
Input
Keyboard
[to be completed when peer tested]
Keyboard mappings seem to increment from left to right and top to bottom independently of the layout.
Some useful bindings:
tab: 36
left ctrl: 44
left shift: 51
left alt: 5F
up arrow: EF
left arrow: F2
right arrow: F4
down arrow: F7
Controller
In order to use a controller, you will need to find its GUID. To do that, launch x360ce and click "Add..." to add your device to the program. Then, in the last tab you should find a field named IG, which will contain your GUID. Once you have it, you can remove the controller and close x360ce.
You can then replace the bytes 64 to 79 in zapper.dat following the same method as the Graphics GUID section of this guide.
[to be completed when peer tested]
Some useful bindings:
bottom button: 01
right button: 02
left button: 03
top button: 04
left trigger: 05
right trigger: 06
left stick press: 09
right stick press: 0A
left stick X axis: 21
left stick Y axis: 22
left/right bumpers: 23
right stick X axis: 24
right stick Y axis: 25
Language
Byte 168 contains the language index. Here is the list of available languages:
00: english
01: french
02: german
03: italian
04: spanish
05: dutch