Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SideWinder controller profiles

SWG and SWX files store Microsoft SideWinder controller preferences and control mappings.

REDGUARD.SWG is the profile for the Microsoft SideWinder Gamepad. redguard.swx is the profile for the Microsoft SideWinder Freestyle Pro. Both use the same version 3 binary layout.

Overall Structure

[Header — size, version, signature, device identifier, and settings]
[Control records — fixed-size labels and mapping data]

Integers use little-endian byte order. The header occupies 142 bytes, and each control record occupies 684 bytes. Each shipped profile contains 27 control records and occupies 18,610 bytes.

OffsetSizeTypeNameDescription
0x004u32file_sizeTotal file size, including the header.
0x044u32versionProfile version, 3.
0x084u32field_08Zero in the shipped profiles.
0x0C10[u8; 10]signatureASCII SideWinder, without a terminating NUL.
0x1616[u8; 16]device_idDevice identifier bytes.
0x26104[u8; 104]settingsOpaque controller settings.

The Gamepad identifier is 84 CE 48 C9 26 90 D0 11 9F FE 00 A0 C9 11 F5 AF. The Freestyle Pro identifier is 86 CE 48 C9 26 90 D0 11 9F FE 00 A0 C9 11 F5 AF.

Control Records

Offsets in this table are relative to the beginning of a control record.

OffsetSizeTypeNameDescription
0x0064[u8; 64]nameLabel ending at the first NUL, or at the end of the field.
0x404u32control_maskController input the record assigns. See Record order.
0x444u32field_440 or 1.
0x484u32field_481 in every record that sends keys, 0 otherwise.
0x4C4u32field_4cZero in the shipped profiles.
0x501u8key_countNumber of keys the record sends at once.
0x512 × key_count[[u8; 2]]keysKeys sent: a PC keyboard scancode followed by a prefix byte, 0xE0 for extended keys such as the arrow keys and 0x00 otherwise.
————Remaining bytes up to 0x2AC hold further mapping settings; 0x57 and 0x59 (u16) and 0x5D (u16, 0xFFFF) are nonzero in records that send keys.

Record order

Both profiles use the same 27-record order:

RecordsAssigned inputcontrol_mask
0–7Buttons A, B, C, X, Y, Z, Left Trigger, Right TriggerOne bit each, 0x0001 through 0x0080
8Start0x0100
9–17The same nine controls while the modifier button is held (Button M on the Gamepad, Shift on the Freestyle Pro)Control bit plus 0x0200
18–25Up, Up + Right, Right, Down + Right, Down, Down + Left, Left, Up + LeftOne bit each, 0x0001 through 0x0080
26Unlabelled0x0100 in the Gamepad profile, 0x0001 in the Freestyle Pro profile

Shipped mappings

REDGUARD.SWG (Gamepad), scancodes in decimal:

ControlLabelKey
AUse/Attack29 (Ctrl)
BJump56 (Alt)
CInventory23 (I)
XView/Defend42 (Left Shift)
YWalk57 (Space)
ZQuick Sword31 (S)
Left TriggerLast Item51 (comma)
Right TriggerNext Item52 (period)
StartMenu1 (Escape)
M + Left TriggerLog38 (L)
M + Right Trigger(no label)50 (M)
D-pad directionsdirection labelsExtended arrow keys; diagonals send two arrow keys

The labels are text only; the keys determine the effect, through the game’s keyboard bindings. redguard.swx (Freestyle Pro) sends keys only for Button Y (I), Button Z (S), Left Trigger (comma), Right Trigger (period), and Start (Escape).

An empty label does not remove its record. Bytes following the first NUL remain part of the stored field. Text bytes map directly to Unicode code points U+0000 through U+00FF without selecting a Windows code page.

These profiles are controller configuration files. They do not contain game assets, save state, or swap memory. KEYS.INI describes the separate game keyboard bindings.

Use by the game

Neither RGFX.EXE nor the REDGUARD.EXE launcher opens these files. They are read by Microsoft’s SideWinder software on the host system, which sends PC keyboard scancodes for controller input; see Shipped mappings. The game receives those keystrokes through the keyboard bindings in KEYS.INI, not through its joystick input.

The GOG release runs RGFX.EXE in DOSBox, where the SideWinder software is not involved, so these profiles have no effect. Controller input reaches the game only through DOSBox’s emulated gameport or keyboard mapper; see KEYS.INI: GOG release.

See Bundled support resources for the other support files shipped with the game.

External References