Patch:F10 E Cheat

From KeenWiki
Jump to navigation Jump to search

The F10 + E or exit level cheat in Keen Galaxy is a cheat used to exit and win the current level. Unlike most F10 cheats it has no window and needs no input when activated. The current level is 'won' as if Keen had exited it normally. (The map level is reloaded.) This can make a game unwinnable if the level exited contains something vital to winning the game.

See also Patch:Level exit and Patch:Levels.


Disable

These patches disable the F10-E cheat completely.

Keen 4

#Disable F10-E (Frees 30 bytes at $74A0)
%patch $749E $EB $1E

Keen 5

#Disable F10-E (Frees 30 bytes at $7455)
%patch $7453 $EB $1E

Keen 5

#Disable F10-E (Frees 30 bytes at $726F)
%patch $726D $EB $1E


Key that activates cheat

This patch alters what key activates the win level cheat. (See Patch:Scancodes.) By default this is 'e' Setting this to $C647 will disable the cheat. There are two other checks made. The first checks whether the game is 'in progress', that is it is not a demo. The second checks the TED5 variable. These can be tweaked to allow additional keys to activate the cheat.

Note that if the TED5 variable is not zero then the game will shut down and run TED5 when this cheat is used.

Keen 4

#Win level keys
%patch $74A0 {$C66BW} #E
%patch $74A7 {$C631W} #Game in progress
%patch $74AE {$7ADCW} #TED5 variable

Keen 5

#Win level keys
%patch $7455 {$BCD3W} #E
%patch $745C {$BC99W} #Game in progress
%patch $7463 {$6FDCW} #TED5 variable

Keen 6

#Win level keys
%patch $726F {$C7F9W} #E
%patch $7276 {$C7BFW} #Game in progress
%patch $727D {$7618W} #TED5 variable


What level state is set to and making cheat give something

By default the F10-E cheat sets the level state to 2, which wins the level. This can be changed to other things (See this list of what various values do. or the cheat can be changed to give something entirely different, like the Wetsuit (See Patch:Game stats.)

Keen 4

#What F10-E sets (Change level state to 2)
%patch $74BA {$7A70W}  [$0002W]

Keen 5

#What F10-E sets (Change level state to 2)
%patch $746F {$6F70W}  [$0002W]

Keen 6

#What F10-E sets (Change level state to 2)
%patch $728B {$6F70W}  [$0002W]


Cheat code

This is the complete code for the F10-E 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.)

On the first line two checks are made, firstly that the 'e' key is pressed and secondly that the game is 'in progress' (and thus not a demo.) On the second line there is another condition checking for the TED5 variable; if this is 1 then TED5 is run and the game is shut down.

Keen 4

#F10-E cheat code
%patch $749E $83 $3E {$C66BW}  [$00] {$74} $19 $83 $3E {$C631W}  [$00] {$74} $12 $83 $3E
             {$7ADCW}  [$00] {$74} $05 $9A $037D0329RL     $C7 $06 {$7A70W}  [$0002W]

Keen 5

#F10-E cheat code
%patch $7453 $83 $3E {$BCD3W}  [$00] {$74} $19 $83 $3E {$BC99W}  [$00] {$74} $12 $83 $3E
             {$6FDCW}  [$00] {$74} $05 $9A $037D0326RL     $C7 $06 {$6F70W}  [$0002W]

Keen 6

#F10-E cheat code
%patch $726D $83 $3E {$C7F9W}  [$00] {$74} $19 $83 $3E {$C7BFW}  [$00] {$74} $12 $83 $3E
             {$7618W}  [$00] {$74} $05 $9A $037B032ARL     $C7 $06 {$75ACW}  [$0002W]


Disable TED5 code

This patch removes the TED5 check from the F10-E cheat so that it cannot be used to call the program.

Keen 4

#Disable TED5 code in F10-E cheat
%patch $74AC $EB $0A

Keen 5

#Disable TED5 code in F10-E cheat
%patch $7461 $EB $0A

Keen 6

#Disable TED5 code in F10-E cheat
%patch $727B $EB $0A


F10-E in Keen Dreams

This patch replaces the level warp cheat, F10-W, with an F10-E cheat. It also frees up some space for patching. This cheat will not work on the map level (Since you return to the map anyway.) The first line changes the cheat's scancode from 'W' to 'E' while the second line checks for the map level, and if Keen is not in it, changes the level state to 2 (Win level.)

Keen Dreams

#Change F10-W to F10-E (Free $391A-$3989)
%patch $38F9 {$E4AEW}
%patch $390B $83 $3E {$7124W}  [$00] $74 $78 $C7 $06 {$705AW}  [$0002W]  $EB $70