Patch:F10 D Cheat

From KeenWiki
Jump to navigation Jump to search

The F10 + D or demo cheat allows the player to record a demo file in any level of the game. When the chat is first used the player will be asked what level they want to record the demo in, on entering this they will be taken to that level and allowed to play. Activating the cheat again will save the demo file. (As DEMO.CKx; see also Patch:Files and filenames.)

Related patches can be found at Patch:Demo.


Windows

The demo cheat is unique in that two completely different windows and processes are activated by the same cheat. During normal gameplay the demo cheat will activate demo recording. During demo recording the demo cheat will activate demo saving.


Record demo

This is the text that asks where the player wishes to record a demo from. It appears when the demo cheat is first used and after a valid value is entered it will send Keen to that level.

Keen Demo cheat record text

#Keen 4 :
%patch $64AD  [$0003W] #Height
%patch $64B1  [$001EW] #Width
%patch $64C2  [$029EW] #Text called from
%patch $2F10E "  Record a demo from level(0-21):" $00


#Keen 5 :
%patch $6468  [$0003W] #Height
%patch $646C  [$001EW] #Width
%patch $647D  [$0242W] #Text called from
%patch $30582 "  Record a demo from level(0-21):" $00


#Keen 6 :
%patch $627D  [$0003W] #Height
%patch $6281  [$001EW] #Width
%patch $6292  [$01E2W] #Text called from
%patch $30F12 "  Record a demo from level(0-21):" $00


Save demo

This is the text which asks what demo number to save, this replaces the '?' in the file name. (See below.)

Keen demo cheat save as text

#Keen 4 :
%patch $6558  [$0003W] #Height
%patch $655C  [$0016W] #Width
%patch $656D  [$2C0W] #Text called from
%patch $2F130 "  Save as demo #(0-9):" $00


#Keen 5 :
%patch $6528  [$264W] #Text called from
%patch $305A4 "  Save as demo #(0-9):" $00


#Keen 6 :
%patch $633D  [$204W] #Text called from
%patch $30F34 "  Save as demo #(0-9):" $00


Playing demo level

This text appears in the Level Entry Window when the player is loading a level to record a demo in or the game is loading a level to display a demo in.

Play demo level text

#Keen 4 :
%patch $6259  [$0299W]
%patch $2F109 "DEMO" $00


Disable

These patches disable the F10-D cheat entirely. No window appears and nothing can be entered. This frees up some cheat code space, but also considerably more in the actual demo recording code itself.

Disable demo cheat

#Disable Keen 4 F10-D (Frees $7469-$749E, $64A0-$6631, $15339-$15380)
%patch $7467 $EB $35

#Disable Keen 5 F10-D (Frees $741E-$7453, $6456-$65EC, $162D6-$1631D)
%patch $741C $EB $35

#Disable Keen 6 F10-D (Frees $7238-$726D, $6270-$6401, $14E6A-$14EB1)
%patch $7236 $EB $35


Number of levels demo can be recorded in

This patches changes the highest level number a demo can be recorded in. Changing this to $00 $EB will stop any demos ever being recorded, though the window will allow the player to type numbers into it.

Keen 4

#Number of levels demo can be recorded from:
%patch $6516 $15

Keen 5

#Number of levels demo can be recorded from:
%patch $64D1 $15

Keen 6

#Number of levels demo can be recorded from:
%patch $62E6 $15


Key that activates cheat

This patch alters what key activates the demo cheat. (See Patch:Scancodes.) By default this is 'd'. Setting this to $C647, $BCAF, $C7D5 or $E48A (in Keen 4, Keen 5, Keen 6 and Keen Dreams respectively.) will disable the cheat.

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

Demo cheat activation keys

#Demo cheat keys -Keen 4
%patch $7469 {$C687W} #D
%patch $7470 {$C631W} #Game state

#Demo cheat keys -Keen 5
%patch $741E {$BCEFW} #D
%patch $7425 {$BC99W} #Game state

#Demo cheat keys -Keen 6
%patch $7238 {$C815W} #D
%patch $723F {$C7BFW} #Game state


What level state is set to and making cheat give something

By default the F10-D cheat sets the level state to 2 when the demo is saved, 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.) The utility of this is not clear.

Keen 4

#What F10-D sets (Change level state to 2)
%patch $7491 {$75ACW}  [$0002W]

Keen 6

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


Cheat code

This is the complete code for the F10-D cheat. It contains, and is thus incompatible with, all the other non-cheat-window 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.

On the first line the two required keys are checked. On the second the game checks to see whether a demo isn't already being recorded (The record variable = 0) If so it starts a demo and skips the next check.

The next check checks to see if a demo is being recorded (=1) and if so ends the demo. In either case the level is won (Level variable set to 2) when the cheat is activated.

Keen 4

#F10-D cheat code
%patch $7467 $83 $3E {$C687W}  [$00] {$74} $30 $83 $3E {$C631W}  [$00] {$74} $29 $83 $3E
             {$3BD6W}  [$00] {$75} $07 $9A $05C40860RL     $EB $12 $83 $3E {$3BD6W}
             [$01] {$75} $0B $9A $05C408F4RL     $C7 $06 {$7A70W}  [$0002W]  $B8 $0001W
                 $5F $5E $8B $E5 $5D $CB

Keen 6

#F10-D cheat code
%patch $7236 $83 $3E {$C815W}  [$00] {$74} $30 $83 $3E {$C7BFW}  [$00] {$74} $29 $83 $3E
             {$35D6W}  [$00] {$75} $07 $9A $05A10860RL     $EB $12 $83 $3E $D6 $35
             [$01] {$75} $0B $9A $05A108F4RL     $C7 $06 {$75ACW}  [$0002W]  $B8 $0001W
             $5F $5E $8B $E5 $5D $CB


Cheat wins level - doesn't record demos

This patch removes demo recording and makes the demo cheat win the level. This makes it identical to the end level cheat, but changing the level state value at the end. can make it do other things, like cost Keen a life or bring up the Council Member message for that level. This patch is incompatible with all other patches on this page.

Keen 4

#F10-D cheat code wins level
%patch $7467 $83 $3E {$C687W}  $00 $74 $30 $83 $3E {$C631W}  $00 $74 $29 $83 $3E
             $7ADCW  $00 $74 $05 $9A $037D0329RL     $C7 $06 {$7A70W}  [$0002W]
             $B8 $0001W  $5F $5E $8B $E5 $5D $CB


Files and filenames

File to load

In all Keens except Dreams there is code to save and load a demo file separate from the demo cheat] (Even in Keen Vorticons, where no demo recording cheat exists at all.) This code is never used and can be overwritten, but it is an interesting side-note.

Keen

#Keen 1 :
%patch $5B5B  [$2781W] #Text called from
%patch $157D1 "DEMO" $00

%patch $5BD0  [$2788W] #Text called from
%patch $157D8 "DEMO" $00


#Keen 2 :
%patch $212E  [$26E1W] #Text called from
%patch $19E61 "DEMO" $00

%patch $21A3  [$26E8W] #Text called from
%patch $19E68 "DEMO" $00


#Keen 3 :
%patch $20E3  [$27DDW] #Text called from
%patch $1BFFD "DEMO" $00

%patch $2154  [$27E4W] #Text called from
%patch $1C004 "DEMO" $00


#Keen 4 :
%patch $3E83  [$1CEW] #Text called from
%patch $2F03E "DEMO" $00

%patch $6259  [$299W] #Text called from
%patch $2F109 "DEMO" $00


#Keen 5 :
%patch $3E7D  [$17EW] #Text called from
%patch $304BE "DEMO" $00

%patch $61F5  [$21EW] #Text called from
%patch $3055E "DEMO" $00


#Keen 6 :
%patch $3CAC  [$112W] #Text called from
%patch $30E42 "DEMO" $00

%patch $6029  [$1DDW] #Text called from
%patch $30F0D "DEMO" $00


File to save to

This is the file the demo is saved to. The '?' is replaced with a digit from 0-9. This has no real effect on the game.

Keen Demo filename

#Keen 4 :
%patch $6542  [$0244W] #Text called from
%patch $2F0B4 "DEMO?.CK4" $00


#Keen 5 :
%patch $64FD  [$01F4W] #Text called from
%patch $30534 "DEMO?.CK5" $00


#Keen 6 :
%patch $6312  [$0188W] #Text called from
%patch $30EB8 "DEMO?.CK6" $00


Demo error texts

This is ancillary text related to recording a demo. The first relates to leaving the demo loop in the main menu (It appers to be disabled) the second appears as an error when a DEMOx.CKy file cannot be written (Due to file\folder settings such as playing Keen from a CD.) The third is an error that occurs when a recorded demo is too long and the fourth is an error when a loaded demo is too large.

Keen 4

#Exit demo loop
%patch $3ECF  [$01DAW] #Text called from
%patch $2F04A "Demo loop exited???" $00

#Can't write demo
%patch $2F14A "DemoRecord:  Cannot write demo file!" $00

#Recorded demo too long
%patch $1504B  [$3EE5W] #Text called from
%patch $32D55 "Demo playback exceeded" $00

#Loaded demo too long
%patch $152FA  [$3EFCW] #Text called from
%patch $32D6C "Demo buffer overflow" $00

Keen 5

#Exit demo loop
%patch $3EC9  [$018AW] #Text called from
%patch $304CA "Demo loop exited???" $00

#Can't write demo
%patch $305BE "DemoRecord:  Cannot write demo file!" $00

#Recorded demo too long
%patch $15FE8  [$359DW] #Text called from
%patch $338DD "Demo playback exceeded" $00

#Loaded demo too long
%patch $16297  [$35B4W] #Text called from
%patch $338F4 "Demo buffer overflow" $00

Keen 6

#Exit demo loop
%patch $3CF8  [$011EW] #Text called from
%patch $30E4E "Demo loop exited???" $00

#Can't write demo
%patch $30F4E "DemoRecord:  Cannot write demo file!" $00

#Recorded demo too long
%patch $14B7C  [$38E5W] #Text called from
%patch $34615 "Demo playback exceeded" $00

#Loaded demo too long
%patch $14E2B  [$38FCW] #Text called from
%patch $3462C "Demo buffer overflow" $00