Patch:Joypad switch

From KeenWiki
Jump to navigation Jump to search

The joypad switch is an executable switch that automatically makes the game use a joystick instead of a keyboard. This switch is for the convenience of players who wish to use a joystick when playing.

The -joypad switch is used by running the game with the string \joypad on the command line (E.g. Keen4e.exe \joypad.) or adding -joypad to the batch file for mods. (E.g. ck4patch.exe Keen4e.exe -joypad.) It should be noted that the '\' or '-' is not usually necessary for the switch to work but is best kept since under rare circumstances it may be needed.

Switch text

This is the text required to 'activate' the switch. Making this '$00' will cause the switch to always be active. Text should be all in capitals.

Switch text for -joypad

#Keen 4 Switch text for -joypad:
%patch $3E99  [$01D3W] #Text called from
%patch $2F043 "JOYPAD" $00

#Keen 5 Switch text for -joypad:
%patch $3E93  [$0183W] #Text called from
%patch $304C3 "JOYPAD" $00

#Keen 6 Switch text for -joypad:
%patch $3CC2  [$0117W] #Text called from
%patch $30E47 "JOYPAD" $00

Joypad variable

The joypad switch sets the joypad variable to 1. If this is changed then joypad will no longer automatically enable joypad mode. It can however be used to change other variables instead.

Set variable with -joypad switch

#Set variable with -joypad switch - Keen 4
%patch $3EAA {$7A18W} [$0001W]

#Set variable with -joypad switch - Keen 5
%patch $3EA4 {$6F16W} [$0001W]

#Set variable with -joypad switch - Keen 6
%patch $3CD3 {$7550W} [$0001W]

Joypad always on

These patches make the game always set the joypad switch so that the game automatically uses the joystick. The patches do this by skipping the check and simply going to setting the variable.

Disable joypad switch

#Joypad always on -Keen 4
%patch $3E98  $EB $0E

#Joypad always on -Keen 5
%patch $3E92  $EB $0E

#Joypad always on -Keen 6
%patch $3CC1  $EB $0E

Disable joypad switch

These patches disables the joypad switch entirely meaning it can never be used. It skips the switch check and variable change.

Disable joypad switch

#Disable joypad switch -Keen 4
%patch $3E98  $EB $14

#Disable joypad switch -Keen 5
%patch $3E92  $EB $14

#Disable joypad switch -Keen 6
%patch $3CC1  $EB $14