Patch:F10 I Cheat

From KeenWiki
Jump to navigation Jump to search

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


Window

These patches alter the size of the cheat window and what text is displayed in it. The window setup is quite simple.

Keen 4

#Free items
%patch $7527 [$0003W]        #Window height
%patch $752B [$000CW]        #Window width
%patch $7537 [$0521W]        #Text called from

#Text
%patch $2F391 "Free items!" $00

Keen 5

#Free items
%patch $74DC [$0003W]        #Window height
%patch $74E0 [$000CW]        #Window width
%patch $74EC [$049DW]        #Text called from

#Text
%patch $307DD "Free items!" $00

Keen 6

#Free Items
%patch $72F6 [$0003W]        #Height
%patch $72FA [$000CW]        #Width
%patch $7306 [$0499W]        #Text called from

#Text
%patch $311C9 "Free items!" $00

Keen Dreams

%patch $3813 [$0003W]         #Height of Item cheat box
%patch $3817 [$000CW]         #Width
%patch $3823 [$00C7W]         #Text read from

#Text
%patch $23B37 "Free items!" $00


Key that activates cheat

This patch alters what key activates the free items cheat. (See Patch:Scancodes.) By default this is 'i' Setting this to $C647 will disable the cheat in Keen 4.

Keen 4

#F10 + I key
%patch $751C {$C675W}

Keen 5

#F10 + I key
%patch $74D1 {$BCDDW}

Keen 6

#F10 + I key
%patch $72EB {$C803W}

Keen Dreams

#F10 + I key
%patch $3808 {$E4B8W}


Disable

This patch disables the F10 I cheat entirely.

Keen 4

#Disable F10-I
%patch $751F $EB

Keen 5

#Disable F10-I
%patch $74D4 $EB

Keen 6

#Disable F10-I
%patch $72EE $EB

Keen Dreams

#Disable F10-I
%patch $380B $EB


Don't draw cheat window

This patch allows the Items cheat to work, but does not display the window or wait for a key (Remove the last five $90 to make the cheat wait for a key.) This means that the player can only see the effects by looking at their score box. (And also that by holding down F10 and I the player can make their score increase rapidly.) If the patch is altered to wait for a key this is less of an issue (And not really noticeable since the player is bound to press a key right after cheating.)

Keen 4

#Don't draw Items cheat window
%patch $7562 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90

Keen 5

#Don't draw Items cheat window
%patch $7517 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90

Keen 6

#Don't draw Items cheat window
%patch $7337 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90


Items cheat affects

By default the items cheat gives Keen 'everything' including some points. However this is done in several ways. The ammunition is simply set to 99 and several miscellaneous items set to 1. Int he case of the gems however a certain value (99) is used for a starting item and three others (A total of four with this number being patchable.) Finally the score is increased by reference to the 'increase score' code.

Patches affecting what is changed require some knowledge of game stats. Notice that in Keen 6 you can stop an item being set to 1 by replacing its $A3 $xxxxW with $90 $90 $90

Keen 4

#Stuff changed
%patch $754C [$7A60W] {$0063W} #Set gems to 99
%patch $7553 [$04]           #Four gems are affected
%patch $7558 [$7A58W] {$0063W} #Shots set to
%patch $755E [$7A5CW] {$0001W} #Wetsuit set to
%patch $756D [$0BB8W]        #Points given

Keen 5

#Stuff changed
%patch $7501 [$6F60W] {$0063W} #Set gems to 99
%patch $7508 [$04]           #Four gems are affected
%patch $750D [$6F56W] {$0063W} #Shots set to
%patch $7513 [$6F5AW] {$0001W} #V card set to
%patch $7522 [$0BB8W]        #Points given

Keen 6

#Stuff changed
%patch $731B [$759CW] {$0063W} #Set gems to 99
%patch $7322 [$04]           #Four gems are affected
%patch $7327 [$7590W] {$0063W} #Shots set to
%patch $732C {$0001W}        #Set following to 1...
%patch $732E $A3 [$7594W]    #Sandwich
%patch $7331 $A3 [$7596W]    #Grappling hook
%patch $7334 $A3 [$7598W]    #Rocket card
%patch $7342 [$0BB8W]        #Points given

Keen Dreams

#Stuff changed
%patch $382F {$711EW}  [$0063W] #Bombs
%patch $3835 {$711CW}  [$0063W] #Flower power
%patch $383B {$7122W}  [$0063W] #Keys


Cheat doesn't affect stuff

Each line of the patches that follow stops the items cheat from affecting various items. (That is the amount Keen has will not be affected at all.) The patch affecting gems affects all four, to remove the effect from 1 or more gems, see the above section where the number of gems that are affected can be altered.

Keen 4

#Items cheat doesn't affect...
%patch $754A $EB $0A #Gems
%patch $7556 $EB $04 #Shots
%patch $755C $EB $04 #Wetsuit
%patch $756C $EB $0A #Points

Keen 5

#Items cheat doesn't affect...
%patch $74FF $EB $0A #Gems
%patch $750B $EB $04 #Shots
%patch $7511 $EB $04 #V cards
%patch $7521 $EB $0A #Points

Keen 6

#Items cheat doesn't affect...
%patch $7319 $EB $0A     #Gems
%patch $7325 $EB $04     #Shots
%patch $732E $90 $90 $90 #Sandwich
%patch $7331 $90 $90 $90 #Grappling hook
%patch $7334 $90 $90 $90 #Rocket card
%patch $7341 $EB $0A     #Points


Cheat increases some items instead of setting them

By default only Keen's points are increased by the items cheat, all other items are set to a specific value. So if Keen has more than 99 ammo, using the items cheat will actually decrease his ammo count. The following patches alter the cheat so that item counters are increased, so for example the ammunition patch causes Keen's shots to be increased by 99 each time the cheat is used. Notice that the maximum amount that an item can increase is $7F or 127.

Keen 4

#Items cheat increases Keen's ammo by 99 each time
%patch $7556 $83 $06 {$7A58W}  [$63] $90

#Items cheat increases Keen's wetsuit by 1 each time
%patch $755C $83 $06 {$7A5CW}  [$01] $90

Keen 5

#Items cheat increases Keen's ammo by 99 each time
%patch $750B $83 $06 {$7A58W}  [$63] $90

#Items cheat increases Keen's v cards by 1 each time
%patch $7511 $83 $06 {$7A5CW}  [$01] $90

Keen 6

#Items cheat increases Keen's ammo by 99 each time
%patch $7325 $83 $06 {$7A58W}  [$63] $90


Default cheat code

This is the complete code for the F10-I cheat. It contains, and is thus incompatible with, all the other patches on this page. It should hopefully be obvious where these patches fit into this patch.) Notice the two keys required to activate the cheat.

Note that this code cannot be 'transplanted' anywhere in the executable without adjusting the $E8 $154DW call appropriately. (See Patch:Jump conditions.)

Keen 4

#Items cheat code
%patch $751A $83 $3E {$C675W}  $00 $74 $60 $9A $1D060999RL     $B8 [$0003W]  $50 #Check key
             $B8 [$000CW]  $50 $9A $19311070RL     $83 $C4 $04 $B8 [$0521W]  $50 #Draw window and text
             $9A $19310E1FRL     $83 $C4 $02 $33 $F6 $EB $0B $8B $DE $D1 $E3
             $C7 $87 {$7A60W}  [$0063W]  $46 $83 $FE $04 $7C $F0 $C7 $06 {$7A58W}  #Give items
             [$0063W]  $C7 $06 {$7A5CW}  [$0001W]  $9A $1D060A9BRL     $9A $14600EDFRL
                     $B8 [$0BB8W]  $50 $90 $0E $E8 $154DW  $83 $C4 $02 $B8 $0001W #Increase score
                 $5F $5E $8B $E5 $5D $CB

Keen 5

#Items cheat code
%patch $74CF $83 $3E {$BCDDW}  $00 $74 $60 $9A $1E000995RL     $B8 [$0003W]  $50 #Check key
             $B8 [$000CW]  $50 $9A $19311070RL     $83 $C4 $04 $B8 [$049DW]  $50 #Draw window and text
             $9A $1A2B0E1DRL     $83 $C4 $02 $33 $F6 $EB $0B $8B $DE $D1 $E3
             $C7 $87 {$6F60W}  [$0063W]  $46 $83 $FE $04 $7C $F0 $C7 $06 {$6F56W}  #Give items
             [$0063W]  $C7 $06 {$6F5AW}  [$0001W]  $9A $1E000A97RL     $9A $155A0EDCRL
                     $B8 [$0BB8W]  $50 $90 $0E $E8 $1514W  $83 $C4 $02 $B8 $0001W #Increase score
                 $5F $5E $8B $E5 $5D $CB

Keen 6

#Items cheat code
%patch $72E9 $83 $3E {$C803W}  $00 $74 $66 $9A $1CF709A3RL     $B8 [$0003W]  $50 #Check key
             $B8 [$000CW]  $50 $9A $118F81070RL    $83 $C4 $04 $B8 [$0499W]  $50 #Draw window and text
             $9A $118F80E1FRL    $83 $C4 $02 $33 $F6 $EB $0B $8B $DE $D1 $E3
             $C7 $87 {$759CW}  [$0063W]  $46 $83 $FE $04 $7C $F0 $C7 $06 {$7590W}  #Give items
             [$0063W]  $B8 [$0001W]  $A3 {$7594W}  $A3 {$7596W}  $A3 {$7598W}  $9A
         $11CF70AA5RL    $9A $114130EE0RL    $B8 [$0BB8W]  $50 $90 $0E $E8
         $155CW  $83 $C4 $02 $B8 $0001W  $5F $5E $8B $E5 $5D $CB             #Increase score

Keen Dreams

#Items cheat code
%patch $3806 $83 $3E {$E4B8W}  [$00] {$74} $42 $9A $0CA507D5RL     $B8 [$0003W]  $50
             $B8 [$000CW]  $50 $9A $11FA1C64RL     $83 $C4 $04 $B8 [$00C7W]  $50
             $9A $11FA1A1ERL     $44 $44 $C7 $06 {$711EW}  [$0063W]  $C7 $06 {$711CW}
                 [$0063W]  $C7 $06 {$7122W}  [$0063W]  $9A $0CA508C0RL     $9A
         $0FE40C8ERL     $B8 $0001W  $E9 $013DW


Window has a different border

In Keen Dreams it is possible to make certain windows use a different set of 8x8 tiles for their border. This patch is on the 'text windows' page.