Patch:F10 B Cheat

From KeenWiki
Jump to: navigation, search

The F10 + B or border color cheat in Keen galaxy is a cheat used to change the border color of the game. This is only really visible in native DOS and mods run in Dosbox show no visible border and thus no effect. As the effect is entirely cosmetic it is unclear what its purpose was.

The border color is an entry from the game palette 0-15 and thus depends on the palette being used.


Window

This is the cheat window and patches relating to it.

Patch: Keen 4
#Border color
%patch $73CE $0003W
#Window height
%patch $73D2 $0018W
#Window width
%patch $73E3 $04F2W
#Text called from
#Text
%patch $2F362 " Border color (015):" $00

Patch: Keen 5
#Border color
%patch $7383 $0003W
#Window height
%patch $7387 $0018W
#Window width
%patch $7398 $046EW
#Text called from
#Text
%patch $307AE " Border color (0-15):" $00

Patch: Keen 6
#Border color (F10 + B)
%patch $719D $0003W
#Height
%patch $71A1 $0018W
#Width
%patch $71B2 $046AW
#Text called from
#Text
%patch $3119A " Border color (0-15):" $00


Key that activates cheat

This patch alters what keys activate the border color cheat. (See Patch:Scancodes.) By default this is 'b'. Setting this to $C647, $BCAF or $C7D5 (in Keen 4, Keen 5 and Keen 6 respectively.) will disable the cheat.

Note that two keys need to be pressed for the god mode cheat to work; the second is the 'game state' and stops the cheat being activated during demos.

Patch: Keen 4
#F10 + B keys
%patch $73B6 $C6A7W
#B
%patch $73C0 $C631W
#Game state

Patch: Keen 5
#F10 + B keys
%patch $736B $BD0FW
#B
%patch $7375 $BC99W
#Game state

Patch: Keen 6
#F10 + B keys
%patch $7185 $C835W
#B
%patch $718F $C7BFW
#Game state


Disable

This patch disables the F10 B cheat entirely.

Patch: Keen 4
#Disable F10-B (Frees $73B7-$744B)
%patch $73B4 $E9 $0095W

Patch: Keen 5
#Disable F10-B (Frees $736C-$7400)
%patch $7369 $E9 $0095W

Patch: Keen 6
#Disable F10-B (Frees $7186-$721A)
%patch $7183 $E9 $0095W


Change function of border cheat

These patches change the function of the border cheat so that it does something else.


Default border cheat code

This is the unmodified border cheat code. The first line contains the two conditions needed to activate the cheat. The first is the 'B' key, the second an unknown condition. On the second line the window size is set and on the third line the text is called. On the fifth line the input text is set up; $0002W is the maximum number of characters that can be entered into the window. (In this case 2, allowing the player to enter a number between 0-99) Finally line 9 contains the maximum allowable value. (15 in this case.)

Patch: Keen 4
#Border cheat code
%patch $73B4 $83 $3E $C6A7W $00 $75 $03 $E9 $008EW $83 $3E $C631W $00 $75 $03 $E9 $0084W $9A $1D060999RL $B8 $0003W $50 $B8 $0018W $50 $9A $19311070RL $83 $C4 $04 $83 $06 $35 $A5 $06 $B8 $04F2W $50 $9A $19310CF9RL $83 $C4 $02 $9A $1D060A9BRL $33 $C0 $50 $B8 $0002W $50 $B8 $0001W $50 $33 $C0 $50 $B8 $7A88W $50 $FF $36 $22 $60 $FF $36 $20 $60 $9A $19311205RL $83 $C4 $0E $F7 $D8 $1B $C0 $40 $89 $46 $FE $83 $7E $FE $00 $75 $20 $B8 $7A88W $50 $9A $000015CFRL $83 $C4 $02 $8B $F8 $0B $FF $7C $0E $83 $FF $0F $7F $09 $50 $9A $1D0600E9RL $83 $C4 $02 $B8 $0001W $5F $5E $8B $E5 $5D $CB


Border cheat just waits for a key

This cheat modifies the F10 B Cheat so that a border color cannot be inputted. Instead the window appears but then just waits for a key before vanishing. (Like the F10 G window.)

Patch: Keen 4
#Border cheat just waits for a key
%patch $73F3 $9A $14600EDFRL $83 $36 $29 $C6 $01 $B8 $0001W $5F $5E $8B $E5 $5D $CB


Border cheat increases score

This cheat modifies the F10 B Cheat in a similar way to the above, except as well as waiting for a key the border cheat also increases Keen's score by 10'000 points. (This value marked in blue.) This makes it similar to the items cheat,) except only points are affected.

The maximum point increase is $FFFF or 65535 points unless the $B8 $xxxxW $50 $9A $06BD1EF2RL $83 $C4 $02 code is repeated. (Two repeats allows a maximum of 65535 * 2 or 131070 points and so on.)

Patch: Keen 4
#Border cheat increases score by 10'000
%patch $73F3 $B8 $2710W $50 $9A $06BD1EF2RL $83 $C4 $02 $9A $14600EDFRL $83 $36 $29 $C6 $01 $B8 $0001W $5F $5E $8B $E5 $5D $CB


Border cheat gives extra points when score reaches a certain value

Again this is similar to the previous section. However in this case the border cheat is not triggered by pressing keys but instead checks the player's score. When the player's score hits a certain value (In this patch 250'000 points or $0003D090 in hex.) then the cheat is activated and gives extra points.

There is a caveat on how this works however. In this case the game does not check for the exact score; that would make the bonus too hard to get (Getting 200 points for a score of 250'100 would 'skip' the bonus.) Instead it checks to see if the first part of Keen's score is equal or above $D090 then whether the second part is equal to $0003. What this means is that the game will trigger the bonus when Keen's score is between $0003D090 and $0003FFFF. (250'000 and 262'143.) This means that if the points aren't increased enough then the bonus will trigger again. (If the increase is 10'000 points then the bonus will trigger twice; 5'000 points triggers it 3 times and so on.) This means that some thought must be given towards designing appropriate score limits. (A limit of 230'000 for example will need a minimum point increase of 32143 points to avoid re-triggering.(3FFFF - 38270 = 7D8F.)

Again the maximum point increase is $FFFF or 65535 points unless the $B8 $xxxxW $50 $9A $06BD1EF2RL $83 $C4 $02 code is repeated. (Two repeats allows a maximum of 65535 * 2 or 131070 points and so on.) See also Patch:Jump conditions and Patch:Game stats.

Patch: Border cheat increases score by 20'000 when 250'000 is reached - Keen 4
#Border cheat now checks score
%patch $73B4 $81 $3E $7A50W $D090W $72 $09 $81 $3E $7A52W $0003W $74 $04 $90
#Border cheat increases score by 10K
%patch $73F3 $B8 $4E20W $50 $9A $06BD1EF2RL $83 $C4 $02 $9A $14600EDFRL $83 $36 $29 $C6 $01 $B8 $0001W $5F $5E $8B $E5 $5D $CB