The first thing you must do is decide what three keys should be the cheat code, and find the corresponding scan codes from the table below. For example, suppose we wanted to use J,X,Tab for a cheat code. The three scan codes are $24, $2D, $0F.
Scan Codes:
Code: Select all
ESC $01 U $16 | or \ $2B F6 $40
! or 1 $02 I $17 Z $2C F7 $41
@ or 2 $03 O $18 X $2D F8 $42
# or 3 $04 P $19 C $2E F9 $43
$ or 4 $05 { or [ $1A V $2F F10 $44
% or 5 $06 } or ] $1B B $30 NUMLOCK $45
^ or 6 $07 ENTER $1C N $31 SCROLL LOCK $46
& or 7 $08 CTRL $1D M $32 HOME or 7 $47
* or 8 $09 A $1E < or , $33 UP or 8 $48
( or 9 $0A S $1F > or . $34 PGUP or 9 $49
) or 0 $0B D $20 ? or / $35 NUMPAD - $4A
_ or - $0C F $21 RIGHT SHIFT $36 LEFT or 4 $4B
+ or = $0D G $22 PRTSC or * $37 NUMPAD 5 $4C
LEFT $0E H $23 ALT $38 RIGHT or 6 $4D
TAB $0F J $24 SPACEBAR $39 NUMPAD + $4E
Q $10 K $25 CAPSLOCK $3A END or 1 $4F
W $11 L $26 F1 $3B DOWN or 2 $50
E $12 : or ; $27 F2 $3C PGDN or 3 $51
R $13 " or ' $28 F3 $3D INS or 0 $52
T $14 or ` $29 F4 $3E DEL or . $53
Y $15 LEFT SHIFT $2A F5 $3F
Numbers to Add to Scan Codes:
Code: Select all
Episode Number to Add
1 $502C
2 $5008
3 $5258
Addresses to Patch
Code: Select all
Episode Cheat Addresses
1 Items $11F5, $11FC, $1203
God $120D, $1214, $121B
2 Items $11AF, $11B6, $11BD
God $11C7, $11CE, $11D5
3 Items $1150, $1157, $115E
God $1168, $116F, $1176
Code: Select all
%ext ck1
%version 1.31
# Change the god-mode cheat to J,X,Tab
%patch $120D $50 $50
%patch $1214 $59 $50
%patch $121B $3B $50
%end
An easy way to disable a cheat is to use a scan code of zero for each key. For example, a patch file to disable the god-mode cheat in Keen 1 would be:
Code: Select all
%ext ck1
%version 1.31
# Disable the god-mode cheat
%patch $120D $2C $50
%patch $1214 $2C $50
%patch $121B $2C $50
%end