Patch:B A T Cheat

From KeenWiki
Jump to navigation Jump to search

The B + A + T or free items cheat in Keen Galaxy gives the player items when used. It differs from the items cheat in that it is an 'official' cheat to be used by players as opposed to something included to help the developers debug the game. As it is entirely separate from the F10 item cheat it has potential patching applications.

Patches affecting what is changed require some knowledge of game stats.


Window

Keen 4

#Cheat option (BAT)
%patch $785A $0007W  #Window height
%patch $785E $0014W  #Window width
%patch $786F $05C5W  #Text called from

#Stuff changed
%patch $788B  [$7A58W] {$0063W}		#Set shots to 99
%patch $7891  [$7A6AW]		        #Add Wetsuit
%patch $7894  {$0001W} 			#Set the following to 1...
              $A3 [$7A66W]		#Green gem
              $A3 [$7A64W]		#Yellow gem
              $A3 [$7A62W]		#Blue gem
              $A3 [$7A60W]		#Red gem
#Text
%patch $2F435 "Cheat Option!" $0A $0A
              "You just got all" $0A
              "the keys, 99 shots," $0A
              "and an extra keen!" $00

Keen 5

#Cheat option (BAT)
%patch $780F $0007W  #Window height
%patch $7813 $0014W  #Window width
%patch $7824 $0541W  #Text called from

#Stuff changed
%patch $7840  [$6F56W] {$0063W}		#Set shots to 99
%patch $7846  [$6F6AW]		        #Add V card
%patch $784A  [$6F5AW] {$0063W}		#Set something, (maybe V-card) to 99
%patch $784F  {$0001W} 			#Set the following to 1...
              $A3 [$6F66W]		#Green gem
              $A3 [$6F64W]		#Yellow gem
              $A3 [$6F62W]		#Blue gem
              $A3 [$6F60W]		#Red gem
#Text
%patch $30881 "Cheat Option!" $0A $0A
              "You just got all" $0A
              "the keys, 99 shots," $0A
              "and an extra keen!" $00

Keen 6

#Cheat option (BAT)
%patch $762F $0007W  #Window height
%patch $7633 $0014W  #Window width
%patch $7644 $053DW  #Text called from

#Stuff changed
%patch $7660  [$7A58W] {$0063W}		#Set shots to 99
%patch $7666  [$7A6AW]		        #Add 1 life
%patch $7669  {$0001W} 			#Set the following to 1...
              $A3 [$7A66W]		#Green gem
              $A3 [$7A64W]		#Yellow gem
              $A3 [$7A62W]		#Blue gem
              $A3 [$7A60W]		#Red gem

#Text
%patch $3126D "Cheat Option!" $0A $0A
              "You just got all" $0A
              "the keys, 99 shots," $0A
              "and an extra keen!" $00


Complete window code

This is the complete code for producing the B A T window, updating the player's inventory and then removing that window. Unlike most cheats this window has its own specific section of code rather than being a subsection of a larger cheat code. The first two lines deal with a number of conditions that must be met in order for the window to appear. It is not presently known what these conditions are, but they are complex. If any one of three conditions is met then a fourth is not checked for.

The third line sets up the window's size while the fourth calls its text. The fifth line removes the window and clears the screen. On the remaining three lines the various things the cheat affects are updated. First the player's ammunition is set to 99. Then their life counter is incremented by 1. Then the value 1 is applied to all four keygem values. In Keen 5 the V card is set to 1 also.

Keen 4

#Complete B A T window code
%patch $7830 $55 $8B $EC $56 $BE $1E $00 $EB $1B $83 $FE [$30] {$74} $15 $83 $FE
             [$1E] {$74} $10 $83 $FE [$14] {$74} $0B $8B $DE $D1 $E3 $83 $BF {$C647W}
             [$00] {$75} $4F $46 $83 $FE $2C $7E $E0 $B8 [$0007W]  $50 $B8 [$0014W]
             $50 $9A $19311070RL     $83 $C4 $04 $83 $06 $35 $A5 $02 $B8 [$05C5W]
                 $50 $9A $19310EBDRL     $83 $C4 $02 $9A $1D060A9BRL     $9A
             $14600EDFRL     $9A $16540D59RL     $C7 $06 {$7A58W}  [$0063W]  $FF
             $06 {$7A6AW}  $B8 [$0001W]  $A3 {$7A66W}  $A3 {$7A64W}  $A3 {$7A62W}  $A3
             {$7A60W}  $5E $5D $CB

Keen 5

#Complete B A T window code
%patch $77E5 $55 $8B $EC $56 $BE $1E $00 $EB $1B $83 $FE [$30] {$74} $15 $83 $FE
             [$1E] {$74} $10 $83 $FE [$14] {$74} $0B $8B $DE $D1 $E3 $83 $BF {$BCAFW}
             [$00] {$75} $55 $46 $83 $FE $2C $7E $E0 $B8 [$0007W]  $50 $B8 [$0014W]
             $50 $9A $1A2B106ERL     $83 $C4 $04 $83 $06 $9D $9B $02 $B8 [$0541W]
                 $50 $9A $1A2B0EBBRL     $83 $C4 $02 $9A $1E000A97RL     $9A
             $155A0EDCRL     $9A $174E0D56RL     $C7 $06 {$6F56W}  [$0063W]  $FF
             $06 {$6F6AW}  $C7 $06 {$6F5AW}  [$0001W]  $B8 [$0001W]  $A3 {$6F66W}  $A3
             {$6F64W}  $A3 {$6F62W}  $A3 {$6F60W}  $5E $5D $CB


Keys that activate cheat

This patch alters what keys activate the cheat option. (See Patch:Scancodes.) Setting any key to $C647, $BCAF or $C7D5 (in Keen 4, Keen 5 and Keen 6 respectively.) will disable the cheat. Three keys are required to activate the B A T cheat, however this cheat will also work without the A 2 Enter keys being pressed beforehand.

It is possible to 'remove' a needed key by making it identical to another. That is, if the 'B' key is changed to 'A' only 'A' and 'T' will need to be pressed to activate the cheat. (Disabling all three keys is a bad idea.)

Keen 4

#B A T cheat keys
%patch $7A9B {$C6A7W} #B
%patch $7AA2 {$C633W} #T
%patch $7AA9 {$C66FW} #A

Keen 5

#B A T cheat keys
%patch $7A56 {$BD0FW} #B
%patch $7A5D {$BCEBW} #T
%patch $7A64 {$BCD7W} #A

Keen 6

#B A T cheat keys
%patch $782F {$C6A7W} #B
%patch $7836 {$C633W} #T
%patch $783D {$C66FW} #A


Disable

This patch completely disables the B A T cheat by skipping the required key checks.

Keen 4

#Disable the B A T cheat (Frees $7830-$78A4)
%patch $7A99 $EB $17

Keen 5

#Disable the B A T cheat (Frees $77E5 - $785F)
%patch $7A54 $EB $17

Keen 6

#Disable the B A T cheat (Frees $7605 - $7679)
%patch $782D $EB $17


Demo mode doesn't disable boss\BAT cheat

This patch changes things so that 'demo mode' doesn't disable this cheat or the 'boss' cheat. (Other cheats aren't affected by demo mode.)

Keen 4

#Demo mode doesn't disable cheats
%patch $796C $EB $08


What disables boss\BAT cheat

This patch changes what affects the BAT (And boss) cheats. By default this is the demo mode variable, but it can be other things such as having an item. See also Patch:Jump conditions

Keen 4

#What disables boss\BAT cheat
%patch $796E {$7A72W}  [$00] {$74}


Cheat doesn't affect stuff

Each line of the following patches stops the BAT cheat affecting a single item of Keen's (That is, however much Keen has beforehand he'll have after using the cheat.)

Keen 4

%patch $7889 $EB $04 #Shots
%patch $788F $EB $02 #Lives
%patch $7897 $1E     #Green gem
%patch $789A $1E     #Yellow gem
%patch $789D $1E     #Blue gem
%patch $78A0 $1E     #Red gem

Keen 5

%patch $783E $EB $04 #Shots
%patch $7844 $EB $02 #Lives
%patch $7848 $EB $04 #V card
%patch $7852 $1E     #Green gem
%patch $7855 $1E     #Yellow gem
%patch $7858 $1E     #Blue gem
%patch $785B $1E     #Red gem

Keen 6

%patch $765E $EB $04 #Shots
%patch $7664 $EB $02 #Lives
%patch $766C $56     #Green gem
%patch $766F $56     #Yellow gem
%patch $7672 $56     #Blue gem
%patch $7675 $56     #Red gem