Patch:Computer Wrist

From KeenWiki
Jump to navigation Jump to search

The Computer Wrist in Keen 4 and 5 is the help section, accessed by pressing F1 during gameplay or at the Main Menu. It consists of a main screen that allows Keen to read a number of sections. The format and function of the 'subsections' are identical, with only content varying, while the main screen is separate. As such this page will be divided into three sections; the first will deal with the Computer Wrist in general, the second with the main screen and the third with the remaining screens.

As the ending sequence pages use the same code to display text and images, some patches on this page will also affect it.


Computer Wrist in general

Patches in this section of the page affect the Computer Wrist in general; how it is bought up and how it behaves when it is.


Computer Wrist in Keen 6

By default Keen 6 lacks a help section. It is, however, possible to patch in some sort of functionality. This patch adds a single help document that can be accessed in-game (Not in the menu) by pressing F1. This document acts like the ending sequence, with unnumbered pages that can only be scrolled through from start to finish. While limited this may be desirable.

The chunk used here, $15B2, is the 'out of memory' chunk used when the game crashes if it runs out of memory while loading. As this won't be a problem on most modern systems it can easily be altered. The music played during the help section is marked in blue and here is song 13, the same used for the story screen.

Keen 6

#NOMEM chunk changed to simple 'thanks for playing' chunk
%patch $3B2D $15AFW
%patch $6D47 $15AFW

#Disable sprite test cheat (Free 390 bytes at $6B08)
%patch $7499 $EB $12

#Display help section code (Chunk is $15B2W) =$069A036CRL 
%patch $6D0C $55 $8B $EC $83 $EC $02 $56 $B8 $0004W  $50 $9A $1CF70317RL   
             $83 $C4 $02 $9A $1608012ARL     $9A $125A14BERL     $9A $125A1610RL
                     $B8 $001CW  $50 $9A $125A1108RL     $83 $C4 $02 $B8
         $001BW  $50 $9A $125A1108RL     $83 $C4 $02 $B8 $15B2W  $50 $9A
         $125A1108RL     $83 $C4 $02 $A1 $A18DW  $89 $46 $FE $A3 $CCB1W  $C7
             $06 $CCAFW  $0000W  $9A $0DBE0631RL     $B8 [$000DW]  $50 $9A $069A20DBRL
                 $83 $C4 $02 $E9 $0036W  $33 $C0 $50 $9A $0DBE048ARL     $83
             $C4 $02 $9A $141308A9RL     $33 $C0 $50 $FF $36 $A942W  $9A
         $1DFB07E4RL     $83 $C4 $04
%patch $6D94 $9A $14130F44RL     $0B $C0 $75 $0E $B8 $0001W  $50 $9A $1DFB0ADDRL   
                     $83 $C4 $02 $EB $E9 $A1 $FD $CC $3B $06 $FB $CC $7D $03
             $E9 $FFBEW  $B8 $A18DW  $50 $9A $15110988RL     $83 $C4 $02 $B8
             $765FW  $50 $9A $15110988RL     $83 $C4 $02 $B8 $7661W  $50 $9A
             $15110988RL     $83 $C4 $02 $9A $125A14DERL     $9A $141308A9RL
                 $B8 $0004W  $50 $9A $1CF70317RL     $83 $C4 $02 $9A $1608012ARL
                     $9A $125A1553RL      $FF $36 $A4 $75 $9A $069A20DBRL
             $83 $C4 $02 $5E $8B $E5 $5D $CB

#Call help when F1 pressed
%patch $8EBD $80 $3E $D3 $A6 $3B $75 $0C $9A $069A036CRL     $9A $16080E88RL     $90 $90


What key brings up the Computer Wrist

For Keen 4 and 5 it is possible to change the key that brings up the Computer Wrist. The values are scancodes. Setting this to $00 will totally disable the Computer Wrist, or the patches in the section below can be used. Note that since the game has different key response codes for various things, to completely disable the Computer Wrist requires the use of several patches.

The Computer Wrist cannot by used during the ending sequence, title screen, paddle war, demos or story sequence. Instead these will end (or must be ended) before the Computer Wrist can be used.

Keen 4

#Scancodes for F1 help
%patch $3F08  $3B #Unknown, initiation screen?
%patch $51AA  $3B #During terminator text
%patch $792F  $3B #In game levels
%patch $1CED7 $3B #In Main Menu

Keen 5

#Scancodes for F1 help
%patch $3F02  $3B #Unknown, initiation screen?
%patch $51A4  $3B #During terminator text
%patch $78EA  $3B #In game levels
%patch $1DE73 $3B #In Main Menu


Disable Computer Wrist

These patches will cleanly skip the Computer Wrist by bypassing scancodes, a somewhat neater way of doing things than manipulating the above patches. Again, multiple patches may be necessary. For Keen 5 the last patch will completely disable the Computer Wrist under all circumstances.

Keen 4

#Disable help
%patch $3F09  $EB     #Unknown, initiation screen?
%patch $51AB  $EB     #During terminator text
%patch $7930  $EB     #In game levels
%patch $1CED9 $90 $90 #In Main Menu

Keen 5

#Disable help
%patch $3F09  $EB     #Unknown, initiation screen?
%patch $51A5  $EB     #During terminator text
%patch $78EB  $EB     #In game levels
%patch $1DE75 $90 $90 #In Main Menu

#Totally disable help
%patch $EA5D $CB


Help screen only -Disable help options

These patches disable accessing the help options; pressing F1 brings up the help screen, but all the player can do is exit out of it. The first line of each patch removes the ability to access all options. The second line removes the ability to scroll the options menu, so pressing up and down has no effect. The third option removes the hand graphic so that only one image remains onscreen.

Keen 4

#No help options
%patch $9B69 $90 $90
%patch $99BA $C7 $06 $C8A3W  $0000W $EB $14
%patch $99EA $90 $90 $90 $90 $90


No menu, only load 1st option

This is the inverse to the above patch; when F1 is pressed a single text document is bought up, by default the first item from the help menu, the Computerwrist help. When Esc is pressed help is exited entirely instead of going to the main menu. This greatly simplifies the help section.

F1 brings up Computerwrist help only

#F1 brings up Computerwrist help only -Keen 4
%patch $9C61 $FF08W
%patch $9B54 $90 $90 $90 $90

#F1 brings up Computerwrist help only -Keen 5
%patch $EBDA $FF03W
%patch $E99E $5F $5E $8B $E5 $5D $CB


Graphic chunks used for Computer Wrist documents and number of options

These are the EGAGRAPH chunks used for various Computer Wrist topics. These determine what the player sees when the Computer Wrist topics are selected.

Note that it is possible to include one extra Computer Wrist item in Keen 4 using chunk $1288W which is unused by default.

Keen 4

#Location of help chunks list
%patch $9BA4 $0716W

#Number of Computer Wrist options - 1
%patch $99CD [$04] #If attempting to go higher than this
%patch $99D4 [$04] #Set value TO this

#Help section documents
%patch $2F586 $1283W #Computer Wrist
              $1285W #The game
              $1284W #The story
              $1289W #Order Info
              $1286W #About ID


Music

In Keen 5 music plays in the Computerwrist, however Keen 4 lacks this by default, requiring patching to enable it.


Song played in Keen 5

Music plays in the help section. This is not a song reference but a level reference, that is, the same music plays as the level whose value is listed here.

Keen 5

#Help menu song:
%patch $EABD [$0013W]


Don't play music in Keen 5

These patches remove music from playing or changing in given situations. For disabling music in a level the best option is to create an 'empty' song with no sound and use that as the level music.

Keen 5

#No music in help menu:
%patch $EABC $EB $0A


Play music in Keen 4

It is possible to play music in Keen 4 in several different situations. The first patch is most like Keen 5; music starts playing when the Computerwrist is first called. Other patches allow music to be played when an option is selected or the Computer Wrist screen exited. This should be handled carefully in order to blend with the rest of the game. The main menu music patch should be used so the song start doesn't seem too abrupt and the song should be switched back to the menu song when help is exited. All the patches given here are compatible, meaning that more than one song can be played in the Computerwrist.

The song to be played is the blue highlighted value, 4 in all cases. It works exactly the same as values in other music patches in that it plays the same song as a game level. The music will restart whenever the specified action is taken, even if the same song is already playing.

The first patch for Keen 4 rearranges some of the Computerwrist cache code; the brown highlighted values. These store bitmaps for help to use later which makes these patches incompatible with any others on this page that change the Computerwrist's images.

Keen 4

#Play music when help loads
%patch $992D $B8 {$0051W}  $50 $9A $12A61117RL     $B8 {$0052W}  $50 $9A 
     $12A61117RL     $B8 {$0054W}  $50 $9A $12A61117RL     $B8 [$0003W]  $50 $9A
             $06BD20C7RL     $83 $C4 $0A

#In help play music when:
%patch $9A76 $06BD20C7RL #Selecting a help option
%patch $9A72 [$0004W]      #Play this song

%patch $9A8B $06BD20C7RL #Exiting help
%patch $9A87 [$0004W]      #Play this song

%patch $9B8C $06BD20C7RL #Exiting help 2 (Not really needed)
%patch $9B88 [$0004W]      #Play this song

%patch $9B5F $06BD20C7RL #Selecting option AND exiting
%patch $9B5B [$0004W]      #Play this song


Create a 'change music' command

This patch allows Computerwrist\ending pages to contain a '^M' command that will switch the music to a custom song. (For example '^M3' will change the music to that of level 3.) This can allow individual pages to have their own music and to allow music to change several times in a single section.

Note that this happens in the game files itself; to make use of it the modder must be able to edit the EGAGRAPH file. There is also one significant side-effect; the'^T' command is changed to '^A' (for 'animation'.) In the default game this will only affect the ending sequence, causing it to break. To fix this all that is required is a simple find-and-replace of the command to make it work again.

Music will change when the command is read. If placed at the start of the page this will be when the page first appears, but it can also be placed after a timed animation to happen during an 'action sequence' in the middle of the page. In the Computerwrist, if a player goes back a page the music will 'restart', even if it is already playing so this should be kept in mind.

Finally the commands '^H', '^I' and '^J' will cause the game to crash if encountered. These however should never appear in any competent modder's files, as they are not valid commands in the original game, but these sequences may appear by accident.

Keen 4

#Add a ^M command to change music
#New, compact list
%patch $92A0 $0041W
%patch $9296 "A"    #First letter
%patch $929C $0F    #Length
%patch $92A7 $0337W #Location
%patch $9487 $0233W #'A' (Old 'T', Animation)
             $0159W #'B'
             $01A9W #'C'
             $0237W #'D' (Nothing)
             $0199W #'E'
             $0237W #'F' (Nothing)
             $023DW #'G'
             $0237W #'H' (Nothing)
             $0237W #'I' (Nothing)
             $0237W #'J' (Nothing)
             $0237W #'K' (Nothing)
             $01FAW #'L'
             $0327W #'M' (New music)
             $0237W #'N' (Nothing)
             $0237W #'O' (Nothing)
             $0199W #'P'

#Corrupt list for ^G (H-J invalid)
%patch $9495 $5F $5E $8B $E5 $5D $CB

#^M command
%patch $946B $29
%patch $98B0 "A"
%patch $9475 $EB $1E $0E $E8 $FCF2W  $50 $9A $06BD20C7RL     $83 $C4 $02 $E9 $FEE8W


Main Screen

The main screen consists of four images bordering the screen, a large image in the middle of the screen and a cursor that can move up and down to select an option. This can be a bit hard to see by default as everything is colored dark red, seeming to blend together. Patches in this section should only affect this screen and not any screens selected from it.

For patches changing what documents are accessed from here see the above section.


Images used and their position

There are six images used for the help screen, four screen borders, the options image and the cursor. All values refer to graphics chunks, which can be complicated if using ModKeen (Keengraph numbers graphics correctly.) Each image must be stored (Cached) before being displayed and is displayed at specific x,y locations.

Not all images have both x and y location values, if a value is 0 it isn't easily patchable. The hand needs two location patches, since it is a cursor. These should match.

Note also that this affects only the Computerwrist main screen; there are an identical set of patches for the border images used on 'regular help pages' (as well as the ending sequence!) that can be selected from this screen.

Keen 4

#Store images
%patch $990D [$0006W] #Help options
%patch $9919 [$002DW] #Hand
%patch $9925 [$0050W] #Top of help screen
%patch $9931 [$0051W] #Left of help screen
%patch $993D [$0052W] #Right of help screen
%patch $9949 [$0054W] #Bottom of help screen

#Display images
%patch $9955 [$0050W] #Top of help screen (At 0,0)

%patch $9965 [$0051W] #Left of help screen (At 0,8)
%patch $9969 [$0008W] #V location

%patch $9978 [$0052W] #Right of help screen (At 312,8)
%patch $997C [$0008W] #V location
%patch $9980 [$0138W] #H location

%patch $998C [$0054W] #Bottom of help screen (At 8, 192)
%patch $9990 [$00C0W] #V location
%patch $9994 [$0008W] #H location

%patch $99A0 [$0006W] #Help options (At 96,8)
%patch $99A4 [$0008W] #V location
%patch $99A8 [$0060W] #H location

%patch $99D7 [$002DW] #Hand (At 48,48)
%patch $99E3 [$0030W] #V location 1
%patch $99E7 [$0030W] #H location 1
%patch $9A0C [$0030W] #V location 2
%patch $9A10 [$0030W] #H location 2

Keen 5

#Store images
%patch $E875 [$0006W] #Help options
%patch $E881 [$0018W] #Hand
%patch $E88D [$001CW] #Top of help screen
%patch $E899 [$001DW] #Left of help screen
%patch $E8A5 [$001EW] #Right of help screen
%patch $E8B1 [$0020W] #Bottom of help screen

#Display images
%patch $E8BD [$001CW] #Top of help screen (At 0,0)

%patch $E8CD [$001DW] #Left of help screen (At 0,8)
%patch $E8D1 [$0008W] #V location

%patch $E8E0 [$001EW] #Right of help screen (At 312,8)
%patch $E8E4 [$0008W] #V location
%patch $E8E8 [$0138W] #H location

%patch $E8F4 [$0020W] #Bottom of help screen (At 8, 192)
%patch $E8F8 [$00C0W] #V location
%patch $E8FC [$0008W] #H location

%patch $E908 [$0006W] #Help options (At 96,8)
%patch $E90C [$0008W] #V location
%patch $E910 [$0060W] #H location

%patch $E93F [$0018W] #Hand (At 48,48)
%patch $E94B [$0030W] #V location 1
%patch $E94F [$0030W] #H location 1
%patch $E974 [$0030W] #V location 2
%patch $E978 [$0030W] #H location 2


Don't display images

These patches simply remove a bitmap image from the screen.

Keen 4

#Don't display main Computer Wrist bitmaps:
%patch $995C $90 $90 $90 $90 $90 #Top of help screen
%patch $996F $90 $90 $90 $90 $90 #Left of help screen
%patch $9983 $90 $90 $90 $90 $90 #Right of help screen
%patch $9997 $90 $90 $90 $90 $90 #Bottom of help screen
%patch $99AB $90 $90 $90 $90 $90 #Help options
%patch $99EA $90 $90 $90 $90 $90 #Hand

Keen 5

#Don't display main Computer Wrist bitmaps:
%patch $E8C4 $90 $90 $90 $90 $90 #Top of help screen
%patch $E8D7 $90 $90 $90 $90 $90 #Left of help screen
%patch $E8EB $90 $90 $90 $90 $90 #Right of help screen
%patch $E8FF $90 $90 $90 $90 $90 #Bottom of help screen
%patch $E913 $90 $90 $90 $90 $90 #Help options
%patch $E952 $90 $90 $90 $90 $90 #Hand


Background color

For Keen 4&5 the background screen color is 'drawn' by making a 320x200 box of color $04 (Dark red) whenever the page refreshes. (This is also done for the main help screen.) As it lacks help Keen 6 only has an entry for ending sequence pages.

There are two other important patches. The first is for the help pointer which erases its old image as it moves; this should match the help background. The second is the 'box' color; this is used to erase parts of images or writing on help\ending pages and should match the help screen background color.

Keen 4

#Computerwrist screen color:
%patch $98F5 [$0004W] #Color dark red used for screen background
%patch $98F9 [$00C8W] #200x...
%patch $98FD [$0140W] #320...
%patch $99F8 [$0004W] #Color used behind help pointer

#Help\Ending pages background color (Visible by default)
%patch $95FB [$0004W] #Color dark red used for screen background
%patch $95FF [$00C8W] #200x...
%patch $9603 [$0140W] #320...
%patch $92C6 [$0004W] #Box color

Keen 5

#Computerwrist screen color: Visible by default)
%patch $E85D [$0004W] #Color dark red used for screen background
%patch $E861 [$00C8W] #200x...
%patch $E865 [$0140W] #320...
%patch $E960 [$0004W] #Color used behind help pointer

#Help\Ending pages background color (Visible by default)
%patch $E563 [$0004W] #Color dark red used for screen background
%patch $E567 [$00C8W] #200x...
%patch $E56B [$0140W] #320...

Keen 6

#Ending pages background color (Visible by default)
%patch $E07F [$0004W] #Color dark red used for screen background
%patch $E083 [$00C8W] #200x...
%patch $E087 [$0140W] #320...


Height of options menu

The help 'menu' is just an image and bears no relation to what option can be selected. If you resize this image you may want to resize the height of each help option. Due to the way the menu is set up there are three values for the 'height' of each menu option. These should all match. For patches changing the number of options in the main screen see the first section of this page.

Keen 4

#Help menu option height
%patch $99DE $0018W #Height of hand options 1
%patch $99FC $0018W #Height of hand options 2
%patch $9A07 $0018W #Height of hand options 3


Option screens

All other screens in the help section are equivalent, they merely load a different data file to display. Thus patches that affect one will affect all other screens. Patches in this section relate to every one of these option screens. For patches changing what documents are loaded as well as how many options the player has see the first section of this page.


Images used and their position

Unlike the above help screen, images in the other screens don't need to be cached (Except the page number indicator); they are already cached when the main screen is loaded. Notice also how similar the setup is to the main screen, except for the bottom image they are identical.

Notice also that the same setup -with one difference- is used by the ending sequence screen so altering one will alter both screens.

Keen 4

#Top of help screen (At 0,0)
%patch $9613 [$0050W] #Bitmap

#Left of help screen (At 0,8)
%patch $9623 [$0051W] #Bitmap
%patch $9627 [$0008W] #Vertical position

#Right of help screen (At 312,8)
%patch $9636 [$0052W] #Bitmap
%patch $963A [$0008W] #Vertical position
%patch $963E [$0138W] #Horizontal position

#Bottom of help screen(At 8, 176)
%patch $964E [$0053W] #Bitmap
%patch $9652 [$00B0W] #Vertical position
%patch $9656 [$0008W] #Horizontal position

#Bottom of ending screen
%patch $9664 [$0054W] #Bitmap
%patch $9668 [$00C0W] #Vertical position
%patch $966C [$0008W] #Horizontal position

#Don't show...
%patch $9612 $EB $0E #Top help image
%patch $9622 $EB $11 #Left help image
%patch $9635 $EB $12 #Right help image
%patch $964D $EB $12 #Bottom help image
%patch $9663 $EB $12 #Bottom  ending image
%patch $9612 $EB $63 #All images

Keen 5

#Top of help screen (At 0,0)
%patch $E57B [$001CW] #Bitmap

#Left of help screen (At 0,8)
%patch $E58B [$001DW] #Bitmap
%patch $E58F [$0008W] #Vertical position

#Right of help screen (At 312,8)
%patch $E59E [$001EW] #Bitmap
%patch $E5A2 [$0008W] #Vertical position
%patch $E5A6 [$0138W] #Horizontal position

#Help section bottom (At 8, 176)
%patch $E5B6 [$001FW] #Bitmap
%patch $E5BA [$00B0W] #Vertical position
%patch $E5BE [$0008W] #Horizontal position

#Bottom image
%patch $E5CC [$0020W] #Bitmap
%patch $E5D0 [$00C0W] #Vertical position
%patch $E5D4 [$0008W] #Horizontal position

#Don't show...
%patch $E57A $EB $0E #Top help image
%patch $E58A $EB $11 #Left help image
%patch $E59D $EB $12 #Right help image
%patch $E5B5 $EB $12 #Bottom help image
%patch $E5CB $EB $12 #Bottom  ending image
%patch $E57A $EB $63 #All images


Ending sequence doesn't have border images

This patch rearranges the screen code so that the ending sequence has no border images while the help screens do. This can help distinguish both kinds of screen. As a side effect the location and image values are shifted slightly from those in the section above, rendering all above patches dealing with them incompatible. Instead alterations must be made to the blue values in this patch.

As another note this means that the end sequence's bottom border image is not used and can be used for something else. There are modifications to this patch that allow one or more help border images to appear in the ending sequence.

Ending sequence 'Ending sequence doesn't have border images

#Ending sequence doesn't have border images -Keen 4
%patch $9612 $0B $FF $74 $4D $B8 [$0050W]  $50 $33 $C0 $50 $50 $9A $1D060C79RL
                 $83 $C4 $06 $B8 [$0051W]  $50 $B8 {$0008W}  $50 $33 $C0 $50 $9A    
             $1D060C79RL     $83 $C4 $06 $B8 [$0052W]  $50 $B8 {$0008W}  $50 $B8
             {$0138W}  $50 $9A $1D060C79RL     $83 $C4 $06 $B8 [$0053W]  $50 $B8
             {$00B0W}  $50 $B8 {$0008W}  $50 $9A $1D060C79RL     $83 $C4 $06 $EB
             $14

Ending sequence 'Patch modifiers, use ONE

#End sequence pages also display...
%patch $9616 $37 #...bottom border
%patch $9616 $23 #...bottom and right borders
%patch $9616 $10 #...bottom, right and left borders


Background color

Just like the main screen, Computer Wrist pages have a background color that has no effect on them, and instead take their color from a screen-sized red background box.

Keen 4

#Screen colors:
%patch $95FB [$0004W] #Color dark red used for screen background
%patch $95FF [$00C8W] #200x...
%patch $9603 [$0140W] #320...


Page number indicator

The Page number indicator (PNI) tells the player which page they are on and how many pages in total are in a given section. It has a single vertical and horizontal position despite being made of four different pieces of text. It is possible to patch out the PNI entirely or only various parts of it.

Keen 4

#Position of page no. indicator text
%patch $97A2 [$00BAW] #Vertical
%patch $97A8 [$00DAW] #Horizontal

#Don't display current page number
%patch $9755 $EB $0E

#Don't display any text
%patch $972A $E9 $008AW

Keen 5

#Position of page no. indicator text
%patch $E70A [$00BAW] #Vertical
%patch $E710 [$00DAW] #Horizontal

#Don't display current page number
%patch $E6BD $EB $0E

#Don't display any text
%patch $E692 $E9 $008AW

Keen 6

#Position of page no. indicator text
%patch $E1C3 [$00BAW] #Vertical
%patch $E1C9 [$00DAW] #Horizontal

#Don't display current page number
%patch $E176 $EB $0E

#Don't display any text
%patch $E149 $E9 $008CW


Page controls

These patches govern the page controls for the help options. By default three things can be done, going to the next page, going back to the previous page and quitting. Quitting is independent and takes the player back to the main Computerwrist menu. (Though this can be patched, see next section.) the value, highlighted in brown, is a scancode.

The other page controls are read from a menu that reads the 4x3 number pad keys found at the right of most keyboards. The arrow keys are mapped onto this so for example the left arrow is treated the same as numberpad 4. However things like the '+' key are not mapped to the numberpad. The Home key is also ignored (It's value is zero.)

The options are read from a list of 10 items, each corresponding to a numberpad key. The first value is the up arrow (Numberpad 8) By changing the values on the list it's possible to control which keys scrol through the help pages and how.

Computerwrist page controls -Keen 4

#Key that quits option
%patch $9C45 {$01}

#Location of help keys list
%patch $9C18 [$0B19W]

#Number of options -1
%patch $9C13 [$09]

#Help menu codes
%patch $9C69 [$0ACDW] #Press up\numpad-8 (Prev page)
             [$0ACDW] #Press PgUp\numpad-9 (Prev page)
             [$0AF1W] #Press numpad - (Nothing)
             [$0ACDW] #Press left\numpad-4 (Prev page)
             [$0AF1W] #Press numpad 5 (Nothing)
             [$0AE3W] #Press right\numpad-6 (Next page)
             [$0AF1W] #Press numpad + (Nothing)
             [$0AF1W] #Press End\numpad-1 (Nothing)
             [$0AE3W] #Press down\numpad-2 (Next page)
             [$0AE3W] #Press PgDn\numpad-3 (Next page)

Computerwrist page controls -Keen 5

#Key that quits option
%patch $EBBE {$01}

#Location of help keys list
%patch $EB94 [$0B23W]

#Number of options -1
%patch $EB8C [$09]

#Help menu codes
%patch $EBE3 [$0AD6W] #Press up\numpad-8 (Prev page)
             [$0AD6W] #Press PgUp\numpad-9 (Prev page)
             [$0AFAW] #Press numpad - (Nothing)
             [$0AD6W] #Press left\numpad-4 (Prev page)
             [$0AFAW] #Press numpad 5 (Nothing)
             [$0AECW] #Press right\numpad-6 (Next page)
             [$0AFAW] #Press numpad + (Nothing)
             [$0AFAW] #Press End\numpad-1 (Nothing)
             [$0AECW] #Press down\numpad-2 (Next page)
             [$0AECW] #Press PgDn\numpad-3 (Next page)


Can't go back after a certain number of pages

This patch alters all help sections (but not the ending sequence) so that after a certain page is reached, the player cannot press the left arrow or other keys to go back and view previous pages. Depending on how things are arranged this can make a single help document, or multiple ones, act differently from the rest.

This patch is incompatible with the above page controls patch since it alters the control code and table. The value in blue is the last page the player will be able to navigate normally. Here it is 10, meaning that on page 11 pressing the left arrow will have no effect.

Can't go back after a certain number of pages -Keen 4

#If any help section is >10 pages, player can't go back after page 10.
%patch $9C1D $83 $3E $C8FFW  [$0A] $7F $1D $83 $3E $C8FFW  $01 $7E $16 $0E $E8
             $FB94W  $0E $E8 $FB90W  $BE $0001W  $EB $10 $A1 $C8FFW  $3B $06
             $C8FDW  $7C $F2
%patch $9C73 $0AE8W $0AF1W $0AF1W $0AE8W $0AE8W


Pressing Esc quits help entirely

This patch alters things so that pressing the Esc key, which normally quits to the Computerwrist menu, quits help entirely. This can make help a little more tricky to use, though also quicker and is used in another patch on this page to only load an option and skip the menu entirely.


Pressing Esc quits help entirely

#Quitting option quits help -Keen 4
%patch $9C61 $FF08W

#Quitting option quits help -Keen 5
%patch $EBDA $FF03W


Page codes

Page codes are short sequences of characters inserted into page text in the game files to control things like displaying images. They are invisible to the player but are part of the game's file format. They all start with the '^' character followed by a letter. The following letter is case insensitive, even though the game's code checks for capital letters only.

Most codes are read from an alphabetical list. There the first entry is for 'B', the second for 'C' and so on.Therefore changing the letter of the command is not as simple as altering a single letter, instead the order of entries on the code list must be changed.

For example; to change the '^B' command to '^S' in Keen 4 the modder must swap the two entries at and

Most codes also have additional functions that will also need to be changed if the code is altered. For example the '^G' code displays graphics on pages, but is also looked for elsewhere to cache graphics before a Computerwrist document is loaded. Changing the command list but nothing else will cause graphics not to be cached, resulting in gibberish.

Keen 4

#Page code indicator
%patch $9706 "^"

#Code list location
%patch $92A7 [$0331W]

#List length
%patch $929C [$12]

#First letter
%patch $9296 "B"

#Code list
%patch $9481 [$0159W] #'B' (At $92A9)
%patch $9483 [$01A9W] #'C' (At $92F9)
%patch $9485 [$032BW] #'D' (Nothing)
%patch $9487 [$0199W] #'E' (At $92E9)
%patch $9489 [$032BW] #'F' (Nothing)
%patch $948B [$023DW] #'G' (At $938D)
%patch $948D [$032BW] #'H' (Nothing)
%patch $948F [$032BW] #'I' (Nothing)
%patch $9491 [$032BW] #'J' (Nothing)
%patch $9493 [$032BW] #'K' (Nothing)
%patch $9495 [$01FAW] #'L' (At $934A)
%patch $9497 [$032BW] #'M' (Nothing)
%patch $9499 [$032BW] #'N' (Nothing)
%patch $949B [$032BW] #'O' (Nothing)
%patch $949D [$0199W] #'P' (At $92E9)
%patch $949F [$032BW] #'Q' (Nothing)
%patch $94A1 [$032BW] #'R' (Nothing)
%patch $94A3 [$032BW] #'S' (Nothing)
%patch $94A5 [$0233W] #'T' (At $9383)

Keen 5

#Page code indicator
%patch $E66E "^"

#Code list location
%patch $E20F [$0329W]

#List length
%patch $E204 [$12]

#First letter
%patch $E1FE "B"

#Code list
%patch $E3E9 [$0151W] #'B' (At $E211)
%patch $E3EB [$01A1W] #'C' (At $E261)
%patch $E3ED [$0323W] #'D' (Nothing)
%patch $E3EF [$0191W] #'E' (At $E251)
%patch $E3F1 [$0323W] #'F' (Nothing)
%patch $E3F3 [$0235W] #'G' (At $E2F5)
%patch $E3F5 [$0323W] #'H' (Nothing)
%patch $E3F7 [$0323W] #'I' (Nothing)
%patch $E3F9 [$0323W] #'J' (Nothing)
%patch $E3FB [$0323W] #'K' (Nothing)
%patch $E3FD [$01F2W] #'L' (At $E2B2)
%patch $E3FF [$0323W] #'M' (Nothing)
%patch $E401 [$0323W] #'N' (Nothing)
%patch $E403 [$0323W] #'O' (Nothing)
%patch $E405 [$0191W] #'P' (At $E251)
%patch $E407 [$0323W] #'Q' (Nothing)
%patch $E409 [$0323W] #'R' (Nothing)
%patch $E40B [$0323W] #'S' (Nothing)
%patch $E40D [$022BW] #'T' (At $E2EB)

Keen 6

#Page code indicator
%patch $E125 "^"

#Code list location
%patch $DD2F [$0329W]

#List length
%patch $DD24 [$12]

#First letter
%patch $DD1E "B"

#Code list
%patch $DF09 [$0151W] #'B' (At $DD31)
%patch $DF0B [$01A1W] #'C' (At $DD81)
%patch $DF0D [$0323W] #'D' (Nothing)
%patch $DF0F [$0191W] #'E' (At $DD71)
%patch $DF11 [$0323W] #'F' (Nothing)
%patch $DF13 [$0235W] #'G' (At $DE15)
%patch $DF15 [$0323W] #'H' (Nothing)
%patch $DF17 [$0323W] #'I' (Nothing)
%patch $DF19 [$0323W] #'J' (Nothing)
%patch $DF1B [$0323W] #'K' (Nothing)
%patch $DF1D [$01F2W] #'L' (At $DDD2)
%patch $DF1F [$0323W] #'M' (Nothing)
%patch $DF21 [$0323W] #'N' (Nothing)
%patch $DF23 [$0323W] #'O' (Nothing)
%patch $DF25 [$0191W] #'P' (At $DD71)
%patch $DF27 [$0323W] #'Q' (Nothing)
%patch $DF29 [$0323W] #'R' (Nothing)
%patch $DF2B [$0323W] #'S' (Nothing)
%patch $DF2D [$022BW] #'T' (At $DE0B)


New Page

New pages are headed with '^P'; if a text chunk's first two characters are not this then the game will crash with an error. Each character is checked for separately, including the '^', which is a different check from other page code commands.

Note that the first check is only to see if the text chunk starts with '^P' while the second is used to count how many actual pages are in the chunk and the third finds the previous ^P when moving back a page. (All should match.)

Keen 4

#Characters that start help sections
%patch $96C0 "^"
%patch $96D9 "P"

#Characters that head next help page
%patch $9847 "^"
%patch $9868 "P"

#Characters that head previous help page
%patch $97D5 "^"
%patch $97E7 "P"

Keen 5

#Characters that start help sections
%patch $E628 "^"
%patch $E641 "P"

#Characters that head next help page
%patch $E7AF "^"
%patch $E7D0 "P"

#Characters that head previous help page
%patch $E73D "^"
%patch $E74F "P"

Keen 6

#Characters that start help sections
%patch $E0DF "^"
%patch $E0F8 "P"

#Characters that head next help page
%patch $E23D "^"
%patch $E25E "P"

#Characters that head previous help page
%patch $E1F5 "^"
%patch $E207 "P"


End section

This command ends the help section; when it is reached no more data is read. If not present then the game will crash with an error.

End section command

#End section command -Keen 4:
%patch $9872 "E"

#End section command -Keen 5:
%patch $E7DA "E"

#End section command -Keen 6:
%patch $E268 "E"