After a few minutes of comparing files, it seems like there is a character map (a list of all the supported characters, as described in the vcky Virtual Keyboard tag in the metadata of the ui.map file) that consists of a SHORT value for each character beginning at offset 0x134 and ending at offset 0x93A, spanning a total of 2054 (0x806) bytes. Within this 2054-byte character map are SHORT values, one SHORT value for each supported character of the input devices, listed in ASCII order (I think), such as 1, 2, 3... a, b, c, etc. . Here's a snapshot of what it looks like in HexEdit:
As a reminder, these byte values must be reversed in order to switch between Little Endian and Big Endian, if you were to interpret the values as integer numbers.
You can see that all those "empty" values are 7F FF (or FF7F when converted, which is a value of 65,407). Each of these SHORT values represents a keyboard character. When you see a value of 7F FF, it means this keyboard character is not assigned a task or binding to a control in the player's profile. However, if you see a different value at this offset, then the SHORT value at that offset ties that character to its keyboard control function.
For example, 00 13 is a value used by the player profile control "Move Forward". When that 00 13 value is at offset 0x156, which is the offset representing the character 1, then the 1 key is mapped to "Move Forward". If this "Move Forward" setting is changed in the game so that it is mapped to the character 2 instead, then the offset 0x156 will return to a value of 7F FF and the next SHORT value in the character map, which is at offset 0x158, will change to 00 13.
Below, I have the "Move Forward" control set to 3 instead of 1 or 2 used in the example above. The ??? values are represented by 7F FF in SHORT value in the hex code.
You have multiple input devices, of course, including a mouse and keyboard with the configuration shown in the picture above. The second column represents the Mouse input device. This device's character map starts at offset 0x20E, which shows us that the majority of the unmapped characters in the input device character map are representing values for supported gamepads and other miscellaneous input devices supported by the game. Thus, the actual keyboard map is between offsets 0x134 and 0x20E, a size of 218 bytes (0xDA bytes). Perhaps there are 218 keyboard characters in the vcky tag in the ui.map file?
I will now present a complete character map for you (a work in progress) :
Code: Select all
Character Map Analysis for Halo Demo's blam.sav file
Complete Keyboard Input Device Mapping
The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_keyboard_button_names
0x156 1
0x158 2
0x15A 3
0x15C 4
0x15E 5
0x160 6
0x162 7
0x164 8
0x166 9
0x168 0
0x16A -
0x16C
0x18E A
Complete Mouse Input Device Mapping
The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_mouse_button_names
0x20E Left Button
0x210 Middle Button
0x212 Right Button
0x214 Button 4
0x216 Button 5
0x218 Button 6
0x21A Button 7
0x21C Button 8
0x21E Horizontal Axis -
0x220 Horizontal Axis +
0x222 Vertical Axis -
0x224 Vertical Axis +
0x226 Wheel -
0x228 Wheel +
Control Device Action Values
The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_binding_labels
Note that you will not be able to manually change the mapping for the values within the blam.sav file unless you also
change the 4-byte checksum at the end of the file. Without changing the checksum, the game will revert to default controls.
Move Forward 0013
Move Backward 0014
Move Left 0015
Move Right 0016
Look Up 0017
Look Down 0018
Look Left 0019
Look Right 001A