Patch:Status Window (Galaxy)

From KeenWiki
Jump to navigation Jump to search

The status window in Keen Galaxy appears when the enter key is pressed during normal gameplay. It displays what Keen has, keys, shots, score and suchlike. This page covers patches relating to this window, mostly just what is displayed.

Patches for other status windows can be found at Patch:Status Window (Vorticons) and Patch:Status_Window (Dreams). These patches also require some knowledge of Patch:Game stats and Patch:Text patches


Disable status window

These patches disable the status window completely so that Keen cannot use it.

Disable status window

#Disable status window -Keen 4
%patch $78B2 $EB $30

#Disable status window -Keen 5
%patch $786D $EB $30

#Disable status window -Keen 6
%patch $7687 $EB $30


What keys bring up status window

These patches relate to what is required to make the status window appear onscreen. Three conditions need to be met. The first is that the enter key be pressed. (See Patch:Scancodes.) The second and third conditions are unknown, but probably relate to game state. (So Keen cannot use the status window in, say, demos.)

Keen 4

%patch $78B4 {$C67FW} #Enter
%patch $78BB {$C643W} #?
%patch $78C2 {$C641W} #?

Keen 5

%patch $786F {$BCE7W} #Enter
%patch $7876 {$BCABW} #?
%patch $787D {$BCA9W} #?

Keen 6

%patch $7689 {$C80DW} #Enter
%patch $7690 {$C7D1W} #?
%patch $7697 {$C7CFW} #?


Accessory bitmaps

The status window has two 'accessory bitmaps'; one above it and one to the side. Both are masked bitmaps whose vertical and horizontal position can be changed. While the image can be changed it is not yet known where the bitmaps are cached meaning that this is rather ineffective. It is also possible to stop the images from appearing.

Keen 4

#Window side bitmap
%patch $8293 [$007AW] #Bitmap
%patch $829A [$FF58W] #Vertical
%patch $82A5 [$0028W] #Horizontal

#Don't display window side bitmap
%patch $828B $EB $29

#Window top bitmap
%patch $8136 [$007BW] #Bitmap
%patch $813A [$0010W] #Vertical (Reversed)
%patch $8149 [$0088W] #Horizontal

#Don't display window top bitmap
%patch $8135 $EB $23

Keen 5

#Window side bitmap
%patch $820F [$0064W] #Bitmap
%patch $8216 [$FF58W] #Vertical
%patch $8221 [$0028W] #Horizontal

#Don't display window side bitmap
%patch $8207 $EB $29

#Window top bitmap
%patch $80B2 [$0065W] #Bitmap
%patch $80B6 [$0010W] #Vertical (Reversed)
%patch $80C5 [$0088W] #Horizontal

#Don't display window top bitmap
%patch $80B1 $EB $23

Keen 6

#Window side bitmap
%patch $803A [$002CW] #Bitmap
%patch $8041 [$FF58W] #Vertical
%patch $804C [$0028W] #Horizontal

#Don't display window side bitmap
%patch $8032 $EB $29

#Window top bitmap
%patch $7EDD [$002DW] #Bitmap
%patch $7EE1 [$0010W] #Vertical (Reversed)
%patch $7EF0 [$0088W] #Horizontal

#Don't display window top bitmap
%patch $7EDC $EB $23


What is displayed

Editing the window is relatively simple once it is understood how it works. The window displays three sorts of things, 8x8 unmasked tiles, blocks of color and text. Everything must be placed on the screen before it is drawn. All position values are in pixels with the top left of the screen being 0,0. Since the window is made of 8x8 tiles, most values will be a multiple of $08 or near to.

Text is treated just like normal text patches, the text has a 'read from' value and h and v position values. Text inverts the color of what it's over, so text on a white background is black, that on a dark red background is light blue and so on. There is also often a variable for how big the text can get, if the text is longer than this, the game will crash with a 'string exceed width' error.

Blocks of color are just what they sound like, a rectangle of pixels of a certain color drawn on the window. These are used as backgrounds to the displayed stuff; the level name for example is over a large white block. These need a color value, h and v position and height\width value to be drawn. If the color is 0 (black) then the color value doesn't need to be specified.

Tiles are picked from the unmasked 8x8 tileset and drawn in rows or columns, sometimes just a single tile. There are two types of tile placement; the first is normal, a tile of a specific value is drawn on the window. The other type is 'counter', used to show the score, ammo and other such values. This type of display is not a simple 'on\off' arrangement but needs to be able to display a range of tiles. This will have a 'start' tile treated as tile 0. (For the number counters this is $29, the grey '8', tile 1 is thus the light red '0' tile and so on.)

As well as a start tile, counters need a h\v position and the number of digits to display (For example, lives displays 2 digits, ammo 3, score 8.) It is also possible to change what a counter 'tracks'; what it displays the value of. This can be useful, you can track Keen's position in the level for example instead of his ammo amount. Patch:Game stats is useful here.

It is almost always possible to not draw any number of things and there are many patches to delete something from the window. With all these patches it is possible to reshape the window in almost any way desired.


Keen 4

Keen 4

#----------------
#MAIN WINDOW
#----------------

#Window size\location
%patch $7BFC [$0040W] #Border horizontal location
%patch $7BFF [$0010W] #Border vertical location
%patch $7C04 [$00B8W] #Border width
%patch $7C09 [$0090W] #Border height

#Border
%patch $7C0C [$0036W] #Tile used for top left corner
%patch $7C1C [$003CW] #Tile used for bottom left corner
%patch $7C3B [$0037W] #Tile used for top
%patch $7C49 [$003DW] #Tile used for bottom
%patch $7C6C [$0038W] #Tile used for top right corner
%patch $7C7A [$003EW] #Tile used for bottom right corner
%patch $7C96 [$0039W] #Tile used for left side
%patch $7CA6 [$003BW] #Tile used for right side

#Background
%patch $7CC9 [$0007W] #Color (Light grey)
%patch $7CCD [$0088W] #Height
%patch $7CD1 [$00B0W] #Width
%patch $7CD5 [$0018W] #Vertical
%patch $7CD9 [$0048W] #Horizontal

#Don't draw...
%patch $7C13 $90 $90 $90 $90 $90 #Box top left corner
%patch $7C28 $90 $90 $90 $90 $90 #Box bottom left corner
%patch $7C40 $90 $90 $90 $90 $90 #Box top
%patch $7C53 $90 $90 $90 $90 $90 #Box bottom
%patch $7C71 $90 $90 $90 $90 $90 #Box top right corner
%patch $7C84 $90 $90 $90 $90 $90 #Box bottom right corner
%patch $7C9D $90 $90 $90 $90 $90 #Box left side
%patch $7CB1 $90 $90 $90 $90 $90 #Box right side
%patch $7CDC $90 $90 $90 $90 $90 #Box grey background


#----------------
#LOCATION
#----------------

#Location text
%patch $7CE8 [$001CW] #Horizontal
%patch $7CEE [$0050W] #Vertical
%patch $7CF4 [$00A0W] #Maximum text width
%patch $7CF7 [$0617W] #Text read from
%patch $2F487 "LOCATION" $00

#Location background rectangle
%patch $7D03 [$000FW] #Color (White)
%patch $7D07 [$0014W] #Height
%patch $7D0B [$00A2W] #Width
%patch $7D0F [$0026W] #Vertical
%patch $7D13 [$004FW] #Horizontal

#Level name
%patch $7D50 [$0014W] #Horizontal
%patch $7D58 [$0028W] #Vertical
%patch $7D30 {$7A88W} #Track (Current level for getting level name)
%patch $7D44 {$7A88W} #Track (Current level for centering v)
%patch $7D61 {$7A88W} #Track (Current level for centering h)

#Don't draw
%patch $7CFA $90 $90 $90 $90 $90 #Location text
%patch $7D16 $90 $90 $90 $90 $90 #Background
%patch $7D64 $90 $90 $90 $90 $90 #Level name
%patch $7CE4 $E9 $0085W          #Don't display Location at all

#Use level entrance string instead of level name
%patch $7D33 $90 $90 $90 $90 $90


#----------------
#SCORE
#----------------

#Score text
%patch $7D70 [$003DW] #Vertical
%patch $7D76 [$0050W] #Horizontal
%patch $7D7C [$0040W] #Maximum text width
%patch $7D7F [$0620W] #Text read from
%patch $2F490 "SCORE" $00 

#Score background rectangle
%patch $7D8E [$000AW] #Height
%patch $7D92 [$0042W] #Width
%patch $7D96 [$0047W] #Vertical
%patch $7D9A [$004FW] #Horizontal

#Counter
%patch $7DA7 {$7A52W} #Track score (high)
%patch $7DAB {$7A50W} #Track score (low)
%patch $7DAE [$0029W] #Start tile
%patch $7DB2 [$0008W] #Number of digits
%patch $7DB6 [$0048W] #Vertical position
%patch $7DBA [$0050W] #Horizontal position

#Don't draw
%patch $7D82 $90 $90 $90 $90 $90 #Score text
%patch $7D9D $90 $90 $90 $90 $90 #Score background rectangle
%patch $7DBE $90 $90 $90         #Score Counter


#----------------
#EXTRA
#----------------

#Extra text
%patch $7DC8 [$003DW] #Vertical
%patch $7DCE [$00B0W] #Horizontal
%patch $7DD4 [$0040W] #Maximum text width
%patch $7DD7 [$0626W] #Text read from
%patch $2F496 "EXTRA" $00

#Background rectangle
%patch $7DE6 [$000AW] #Height
%patch $7DEA [$0042W] #Width
%patch $7DEE [$0047W] #Vertical
%patch $7DF2 [$00AFW] #Horizontal

#Counter
%patch $7DFF {$7A56W} #Track extra keen score (high)
%patch $7E03 {$7A54W} #Track extra keen score (low)
%patch $7E06 [$0029W] #Start tile
%patch $7E0A [$0008W] #Number of digits
%patch $7E0E [$0048W] #Vertical position
%patch $7E12 [$00B0W] #Horizontal position

#Don't draw
%patch $7DDA $90 $90 $90 $90 $90 #Extra text
%patch $7DF5 $90 $90 $90 $90 $90 #Background rectangle
%patch $7E16 $90 $90 $90         #Counter


#----------------
#RESCUED
#----------------

#Rescued text
%patch $7E20 [$0055W] #Vertical
%patch $7E26 [$0050W] #Horizontal
%patch $7E2C [$0040W] #Maximum text width
%patch $7E2F [$062CW] #Text read from
%patch $2F49C "RESCUED" $00

#Background rectangle
%patch $7E3E [$000AW] #Height
%patch $7E42 [$0042W] #Width
%patch $7E46 [$005FW] #Vertical position
%patch $7E4A [$004FW] #Horizontal position

#Counter
%patch $7E5A [$0028W] #Start tile
%patch $7E60 [$0060W] #Vertical position
%patch $7E6A [$0050W] #Horizontal position
%patch $7E7C {$7A5EW} #What's counted

#Don't draw
%patch $7E32 $90 $90 $90 $90 $90 #Rescued text
%patch $7E4D $90 $90 $90 $90 $90 #Background rectangle
%patch $7E6D $90 $90 $90 $90 $90 #Rescued tiles


#----------------
#DIFFICULTY
#----------------

#Level text
%patch $7E84 [$0055W] #Vertical
%patch $7E8A [$00B0W] #Horizontal
%patch $7E90 [$0040W] #Maximum text width
%patch $7E93 [$0634W] #Text read from
%patch $2F4A4 "LEVEL" $00 

#Background rectangle
%patch $7E9F [$000FW] #Color
%patch $7EA3 [$000AW] #Height
%patch $7EA7 [$0042W] #Width
%patch $7EAB [$005FW] #Vertical
%patch $7EAF [$00AFW] #Horizontal

#Difficulty checks
%patch $7ECD {$7A6CW}     #Track difficulty
%patch $7ED0 [$0001W] $74 #If 1 goto write easy text
%patch $7ED5 [$0002W] $74 #If 2 goto write normal text
%patch $7EDA [$0003W] $74 #If 3 goto write hard text

#Difficulty labels
%patch $7EBE [$0060W] #Vertical
%patch $7EC4 [$00B0W] #Horizontal
%patch $7ECA [$0040W] #Maximum text width
%patch $7EE1 [$063AW] #Text read from (easy)
%patch $7EEF [$063FW] #Text read from (normal)
%patch $7EFD [$0646W] #Text read from (hard)
%patch $2F4AA "Easy" $00 
%patch $2F4AF "Normal" $00 
%patch $2F4B6 "Hard" $00

#Don't draw
%patch $7E96 $90 $90 $90 $90 $90 #Level text
%patch $7EB2 $90 $90 $90 $90 $90 #Background rectangle
%patch $7EE4 $90 $90 $90 $90 $90 #Easy text
%patch $7EF2 $90 $90 $90 $90 $90 #Medium text
%patch $7F00 $90 $90 $90 $90 $90 #Hard text


#----------------
#GEMS
#----------------

#Gem text
%patch $7F0C [$0050W] #Vertical
%patch $7F12 [$0070W] #Horizontal
%patch $7F15 [$064BW] #Text read from
%patch $2F4BB "KEYS" $00 

#Background rectangle
%patch $7F24 [$000AW] #Height
%patch $7F28 [$0022W] #Width
%patch $7F2C [$006FW] #Vertical position
%patch $7F30 [$0077W] #Horizontal position

#Counter
%patch $7F45 {$7A60W} $00 $74 #What to track (Red to green gem, draw if <>0)
%patch $7F4D [$0024W] #Start tile
%patch $7F51 [$0070W] #Vertical position
%patch $7F5D [$0078W] #Horizontal position
%patch $7F6B [$04]    #Number of gem types to show

#Don't draw
%patch $7F18 $90 $90 $90 $90 $90 #Gem text
%patch $7F33 $90 $90 $90 $90 $90 #Background rectangle
%patch $7F60 $90 $90 $90 $90 $90 #Gem tiles


#----------------
#SHOTS
#----------------

#Shots text
%patch $7F72 [$00B0W] #Vertical
%patch $7F78 [$0070W] #Horizontal 
%patch $7F7B [$0650W] #Text read from
%patch $2F4C0 "AMMO" $00 

#Background rectangle
%patch $7F8A [$000AW] #Height
%patch $7F8E [$001EW] #Width
%patch $7F92 [$006FW] #Vertical position
%patch $7F96 [$00D7W] #Horizontal position

#Counter
%patch $7FA2 {$7A58W} #What to track
%patch $7FA8 [$0029W] #Start tile
%patch $7FAC [$0003W] #Number of digits
%patch $7FB0 [$0070W] #Vertical position
%patch $7FB4 [$00D8W] #Horizontal position

#Don't draw
%patch $7F7E $90 $90 $90 $90 $90 #Shots text
%patch $7F99 $90 $90 $90 $90 $90 #Background rectangle
%patch $7FB8 $90 $90 $90         #Shots counter


#----------------
#LIVES
#----------------

#Lives text
%patch $7FC2 [$0050W] #Horizontal
%patch $7FC8 [$0080W] #Vertical
%patch $7FCB [$0655W] #Text read from
%patch $2F4C5 "KEENS" $00 

#Background rectangle
%patch $7FDA [$000AW] #Height
%patch $7FDE [$0012W] #Width
%patch $7FE2 [$007FW] #Vertical AND horizontal position (Both are equal!)

#Counter
%patch $7FEF {$7A6AW} #What to track
%patch $7FF5 [$0029W] #start tile
%patch $7FF9 [$0002W] #Number of digits
%patch $7FFD [$0080W] #Vertical AND horizontal position (Both are equal!)

#Don't draw
%patch $7FCE $90 $90 $90 $90 $90 #Lives text
%patch $7FE6 $90 $90 $90 $90 $90 #Background rectangle
%patch $8002 $90 $90 $90         #Lives counter


#----------------
#DROPS
#----------------

#Drops text
%patch $800C [$00B0W] #Horizontal
%patch $8012 [$0080W] #Vertical
%patch $8015 [$065BW] #Text read from
%patch $2F4CB "DROPS" $00

#Background rectangle
%patch $8024 [$000AW] #Height
%patch $8028 [$0010W] #Width
%patch $802C [$007FW] #Vertical
%patch $8030 [$00E0W] #Horizontal

#Counter
%patch $803C {$7A5AW} #What to track
%patch $8042 [$0029W] #Start tile
%patch $8046 [$0002W] #Number of digits
%patch $804A [$0080W] #Vertical position
%patch $804E [$00E0W] #Horizontal position

#Don't draw...
%patch $8018 $90 $90 $90 $90 $90 #Drops text
%patch $8033 $90 $90 $90 $90 $90 #Background rectangle
%patch $8052 $90 $90 $90         #Drops counter

#Don't display any Drops stuff
%patch $8008 $EB $4E


#----------------
#WETSUIT:
#----------------

#Background rectangle
%patch $8059 [$000FW] #Color
%patch $805D [$000AW] #Height
%patch $8061 [$0042W] #Width
%patch $8065 [$008FW] #Vertical
%patch $8069 [$004FW] #Horizontal

#Wetsuit text position (in pixels, from top left of screen)
%patch $8078 [$0090W] #Vertical
%patch $807E [$0050W] #Horizontal
%patch $8084 [$0030W] #Maximum text width

#Text and tracking
%patch $8088 {$7A5CW} $00 $74 #If wetsuit<>0 then
%patch $808E [$0661W]	    #Read text from here
%patch $809C [$0669W]	    #Else read text from here
%patch $2F4D1 "Wetsuit" $00 
%patch $2F4D9 "???" $00 

#Don't draw...
%patch $806C $90 $90 $90 $90 $90 #Background rectangle
%patch $8091 $90 $90 $90 $90 $90 #If got wetsuit
%patch $809F $90 $90 $90 $90 $90 #If not got wetsuit

#Don't display any Wetsuit stuff
%patch $8058 $EB $4D


#----------------
#PRESS ANY KEY
#----------------

#Two rows of tiles
%patch $80AE [$0048W] #Start tile (First row)
%patch $80B2 [$008CW] #Vertical position
%patch $80BE [$00A0W] #Horizontal position

%patch $80CC [$0052W] #Start tile (First row)
%patch $80D0 [$0094W] #Vertical position
%patch $80DC [$00A0W] #Horizontal position

#Don't draw
%patch $80C1 $90 $90 $90 $90 $90 #PAK row 1
%patch $80DF $90 $90 $90 $90 $90 #PAK row 2


Keen 5

Keen 5

#----------------
#MAIN WINDOW
#----------------

#Window size\location
%patch $7BB7 [$0040W] #Border horizontal location
%patch $7BBA [$0010W] #Border vertical location
%patch $7BBF [$00B8W] #Border width
%patch $7BC4 [$0090W] #Border height

#Border
%patch $7BC7 [$0036W] #Tile used for top left corner
%patch $7BD7 [$003CW] #Tile used for bottom left corner
%patch $7BF6 [$0037W] #Tile used for top
%patch $7C04 [$003DW] #Tile used for bottom
%patch $7C27 [$0038W] #Tile used for top right corner
%patch $7C35 [$003EW] #Tile used for bottom right corner
%patch $7C51 [$0039W] #Tile used for left side
%patch $7C61 [$003BW] #Tile used for right side

#Background
%patch $7C84 [$0007W] #Color (Light grey)
%patch $7C88 [$0088W] #Height
%patch $7C8C [$00B0W] #Width
%patch $7C90 [$0018W] #Vertical
%patch $7C94 [$0048W] #Horizontal

#Don't draw...
%patch $7BCE $90 $90 $90 $90 $90 #Box top left corner
%patch $7BE3 $90 $90 $90 $90 $90 #Box bottom left corner
%patch $7BFB $90 $90 $90 $90 $90 #Box top
%patch $7C0E $90 $90 $90 $90 $90 #Box bottom
%patch $7C2C $90 $90 $90 $90 $90 #Box top right corner
%patch $7C3F $90 $90 $90 $90 $90 #Box bottom right corner
%patch $7C58 $90 $90 $90 $90 $90 #Box left side
%patch $7C6C $90 $90 $90 $90 $90 #Box right side
%patch $7C97 $90 $90 $90 $90 $90 #Box grey background


#----------------
#LOCATION
#----------------

#Location text
%patch $7CA3 [$001CW] #Horizontal
%patch $7CA9 [$0050W] #Vertical
%patch $7CAF [$00A0W] #Maximum text width
%patch $7CB2 [$0593W] #Text read from
%patch $308D3 "LOCATION" $00

#Location background rectangle
%patch $7CBE [$000FW] #Color (White)
%patch $7CC2 [$0014W] #Height
%patch $7CC6 [$00A2W] #Width
%patch $7CCA [$0026W] #Vertical
%patch $7CCE [$004FW] #Horizontal

#Level name
%patch $7D34 [$0014W] #Horizontal
%patch $7D3C [$0028W] #Vertical
%patch $7D14 {$6F88W} #Track (Current level for getting level name)
%patch $7D28 {$6F88W} #Track (Current level for centering v)
%patch $7D45 {$6F88W} #Track (Current level for centering h)

#Don't draw
%patch $7CB5 $90 $90 $90 $90 $90 #Location text
%patch $7CD1 $90 $90 $90 $90 $90 #Background
%patch $7D48 $90 $90 $90 $90 $90 #Level name
%patch $7C9F $E9 $00AEW          #Don't display Location at all

#Use level entrance string instead of level name
%patch $7D17 $90 $90 $90 $90 $90


#----------------
#SCORE
#----------------

#Score text
%patch $7D54 [$003DW] #Vertical
%patch $7D5A [$0050W] #Horizontal
%patch $7D60 [$0040W] #Maximum text width
%patch $7D63 [$0620W] #Text read from
%patch $308DC "SCORE" $00 

#Score background rectangle
%patch $7D72 [$000AW] #Height
%patch $7D76 [$0042W] #Width
%patch $7D7A [$0047W] #Vertical
%patch $7D7E [$004FW] #Horizontal

#Counter
%patch $7D8B {$6F52W} #Track score (high)
%patch $7D8F {$6F50W} #Track score (low)
%patch $7D92 [$0029W] #Start tile
%patch $7D96 [$0008W] #Number of digits
%patch $7D9A [$0048W] #Vertical position
%patch $7D9E [$0050W] #Horizontal position

#Don't draw
%patch $7D66 $90 $90 $90 $90 $90 #Score text
%patch $7D81 $90 $90 $90 $90 $90 #Score background rectangle
%patch $7DA2 $90 $90 $90         #Score Counter


#----------------
#EXTRA
#----------------

#Extra text
%patch $7DAC [$003DW] #Vertical
%patch $7DB2 [$00B0W] #Horizontal
%patch $7DB8 [$0040W] #Maximum text width
%patch $7DBB [$05A2W] #Text called from
%patch $308E2 "EXTRA" $00

#Background rectangle
%patch $7DCA [$000AW] #Height
%patch $7DCE [$0042W] #Width
%patch $7DD2 [$0047W] #Vertical
%patch $7DD6 [$00AFW] #Horizontal

#Counter
%patch $7DE3 {$6F56W} #Track extra keen score (high)
%patch $7DE7 {$6F54W} #Track extra keen score (low)
%patch $7DEA [$0029W] #Start tile
%patch $7DEE [$0008W] #Number of digits
%patch $7DF2 [$0048W] #Vertical position
%patch $7DF6 [$00B0W] #Horizontal position

#Don't draw
%patch $7DBE $90 $90 $90 $90 $90 #Extra text
%patch $7DD9 $90 $90 $90 $90 $90 #Background rectangle
%patch $7DFA $90 $90 $90         #Counter


#----------------
#KEYCARD
#----------------

#Keycard text
%patch $7E04 [$005CW] #Vertical
%patch $7E0A [$0050W] #Horizontal
%patch $7E0D [$05A8W] #Text read from
%patch $308E8 "KEYCARD" $00

#Background rectangle
%patch $7E1C [$000AW] #Height AND width
%patch $7E21 [$005BW] #Vertical position
%patch $7E25 [$0087W] #Horizontal position

#Counter
%patch $7E32 {$6F5AW}  #Check this variable
%patch $7E34 [$00] {$74} #If not 0 then draw...
%patch $7E38 [$0028W]  #Start tile
%patch $7E3C [$005CW]  #Vertical position
%patch $7E40 [$0088W]  #Horizontal position

#Don't draw
%patch $7E10 $90 $90 $90 $90 $90 #Keycard text
%patch $7E2B $90 $90 $90 $90 $90 #Background rectangle
%patch $7E30 $EB $19             #Keycard


#----------------
#DIFFICULTY
#----------------

#Level text
%patch $7E4F [$0055W] #Vertical
%patch $7E55 [$00B0W] #Horizontal
%patch $7E5B [$0040W] #Maximum text width
%patch $7E5E [$05B0W] #Text read from
%patch $308F0 "LEVEL" $00 

#Background rectangle
%patch $7E6A [$000FW] #Color
%patch $7E6E [$000AW] #Height
%patch $7E72 [$0042W] #Width
%patch $7E76 [$005FW] #Vertical
%patch $7E7A [$00AFW] #Horizontal

#Difficulty checks
%patch $7E98 {$6F6CW}     #Track difficulty
%patch $7E9B [$0001W] $74 #If 1 goto write easy text
%patch $7EA0 [$0002W] $74 #If 2 goto write normal text
%patch $7EA5 [$0003W] $74 #If 3 goto write hard text

#Difficulty labels
%patch $7E89 [$0060W] #Vertical
%patch $7E8F [$00B0W] #Horizontal
%patch $7E95 [$0040W] #Maximum text width
%patch $7EAC [$05B6W] #Text read from (easy)
%patch $7EBA [$05BBW] #Text read from (normal)
%patch $7EC8 [$05C2W] #Text read from (hard)
%patch $308F6 "Easy" $00 
%patch $308FB "Normal" $00 
%patch $30902 "Hard" $00

#Don't draw
%patch $7E61 $90 $90 $90 $90 $90 #Level text
%patch $7E7D $90 $90 $90 $90 $90 #Background rectangle
%patch $7EAF $90 $90 $90 $90 $90 #Easy text
%patch $7EBD $90 $90 $90 $90 $90 #Medium text
%patch $7ECB $90 $90 $90 $90 $90 #Hard text


#----------------
#GEMS
#----------------

#Gem text
%patch $7ED7 [$0050W] #Vertical
%patch $7EDD [$0070W] #Horizontal
%patch $7EE0 [$05C7W] #Text read from
%patch $30907 "KEYS" $00 

#Background rectangle
%patch $7EEF [$000AW] #Height
%patch $7EF3 [$0022W] #Width
%patch $7EF7 [$006FW] #Vertical position
%patch $7EFB [$0077W] #Horizontal position

#Counter
%patch $7F10 {$6F60W} $00 $74 #What to track (Red to green gem, draw if <>0)
%patch $7F18 [$0024W] #Start tile
%patch $7F1C [$0070W] #Vertical position
%patch $7F28 [$0078W] #Horizontal position

#Don't draw
%patch $7EE3 $90 $90 $90 $90 $90 #Gem text
%patch $7EFE $90 $90 $90 $90 $90 #Background rectangle
%patch $7F2B $90 $90 $90 $90 $90 #Gem tiles


#----------------
#SHOTS
#----------------

#Shots text
%patch $7F3D [$00B0W] #Vertical
%patch $7F43 [$0070W] #Horizontal 
%patch $7F46 [$05CCW] #Text read from
%patch $3090C "AMMO" $00 

#Background rectangle
%patch $7F55 [$000AW] #Height
%patch $7F59 [$001AW] #Width
%patch $7F5D [$006FW] #Vertical position
%patch $7F61 [$00D7W] #Horizontal position

#Counter
%patch $7F6D {$6F56W} #What to track
%patch $7F73 [$0029W] #Start tile
%patch $7F77 [$0003W] #Number of digits
%patch $7F7B [$0070W] #Vertical position
%patch $7F7F [$00D8W] #Horizontal position

#Don't draw
%patch $7F49 $90 $90 $90 $90 $90 #Shots text
%patch $7F64 $90 $90 $90 $90 $90 #Background rectangle
%patch $7F83 $90 $90 $90         #Shots counter


#----------------
#LIVES
#----------------

#Lives text
%patch $7F8D [$0050W] #Vertical 
%patch $7F93 [$0080W] #Horizontal
%patch $7F96 [$05D1W] #Text read from
%patch $30911 "KEENS" $00 

#Background rectangle
%patch $7FA5 [$000AW] #Height
%patch $7FA9 [$0012W] #Width
%patch $7FAD [$007FW] #Vertical AND horizontal position (Both are equal!)

#Counter
%patch $7FBA {$6F6AW} #What to track
%patch $7FC0 [$0029W] #start tile
%patch $7FC4 [$0002W] #Number of digits
%patch $7FC8 [$0080W] #Vertical AND horizontal position (Both are equal!)

#Don't draw
%patch $7F99 $90 $90 $90 $90 $90 #Lives text
%patch $7FB1 $90 $90 $90 $90 $90 #Background rectangle
%patch $7FCD $90 $90 $90         #Lives counter


#----------------
#VITALIN
#----------------

#Vitalin text
%patch $7FD7 [$00B0W] #Vertical
%patch $7FDD [$0080W] #Horizontal
%patch $7FE0 [$05D7W] #Text read from
%patch $30917 "VITALIN" $00

#Background rectangle
%patch $7FEF [$000AW] #Height
%patch $7FF3 [$0010W] #Width
%patch $7FF7 [$007FW] #Vertical
%patch $7FFB [$00E0W] #Horizontal

#Counter
%patch $8007 {$6F58W} #What to track
%patch $800D [$0029W] #Start tile
%patch $8011 [$0002W] #Number of digits
%patch $8015 [$0080W] #Vertical position
%patch $8019 [$00E0W] #Horizontal position

#Don't draw...
%patch $7FE3 $90 $90 $90 $90 $90 #Vitalin text
%patch $7FFE $90 $90 $90 $90 $90 #Background rectangle
%patch $801D $90 $90 $90         #Vitalin counter


#----------------
#PRESS ANY KEY
#----------------

#Two rows of tiles
%patch $802A [$0048W] #Start tile (First row)
%patch $802E [$008CW] #Vertical position
%patch $803A [$0078W] #Horizontal position

%patch $8048 [$0052W] #Start tile (First row)
%patch $804C [$0094W] #Vertical position
%patch $8058 [$0078W] #Horizontal position

#Don't draw
%patch $803D $90 $90 $90 $90 $90 #PAK row 1
%patch $805B $90 $90 $90 $90 $90 #PAK row 2


Keen 6

Keen 6

#----------------
#MAIN WINDOW
#----------------

#Window size\location
%patch $7990 [$0040W] #Border horizontal location
%patch $7993 [$0010W] #Border vertical location
%patch $7998 [$00B8W] #Border width
%patch $799D [$0090W] #Border height

#Border
%patch $79A0 [$0036W] #Tile used for top left corner
%patch $79B0 [$003CW] #Tile used for bottom left corner
%patch $79CF [$0037W] #Tile used for top
%patch $79DD [$003DW] #Tile used for bottom
%patch $7A00 [$0038W] #Tile used for top right corner
%patch $7A0E [$003EW] #Tile used for bottom right corner
%patch $7A2A [$0039W] #Tile used for left side
%patch $7A3A [$003BW] #Tile used for right side

#Background
%patch $7A5D [$0007W] #Color (Light grey)
%patch $7A61 [$0088W] #Height
%patch $7A65 [$00B0W] #Width
%patch $7A69 [$0018W] #Vertical
%patch $7A6D [$0048W] #Horizontal

#Don't draw...
%patch $79A7 $90 $90 $90 $90 $90 #Box top left corner
%patch $79BC $90 $90 $90 $90 $90 #Box bottom left corner
%patch $79D4 $90 $90 $90 $90 $90 #Box top
%patch $79E7 $90 $90 $90 $90 $90 #Box bottom
%patch $7A05 $90 $90 $90 $90 $90 #Box top right corner
%patch $7A18 $90 $90 $90 $90 $90 #Box bottom right corner
%patch $7A31 $90 $90 $90 $90 $90 #Box left side
%patch $7A45 $90 $90 $90 $90 $90 #Box right side
%patch $7A70 $90 $90 $90 $90 $90 #Box grey background


#----------------
#LOCATION
#----------------

#Location text
%patch $7A7C [$001CW] #Horizontal
%patch $7A82 [$0050W] #Vertical
%patch $7A88 [$00A0W] #Maximum text width
%patch $7A8B [$058FW] #Text read from
%patch $312BF "LOCATION" $00

#Location background rectangle
%patch $7A97 [$000FW] #Color (White)
%patch $7A9B [$0014W] #Height
%patch $7A9F [$00A2W] #Width
%patch $7AA3 [$0026W] #Vertical
%patch $7AA7 [$004FW] #Horizontal

#Level name
%patch $7AE4 [$0014W] #Horizontal
%patch $7AEC [$0028W] #Vertical
%patch $7AC4 {$75C4W} #Track (Current level for getting level name)
%patch $7AD8 {$75C4W} #Track (Current level for centering v)
%patch $7AF5 {$75C4W} #Track (Current level for centering h)

#Don't draw
%patch $7A8E $90 $90 $90 $90 $90 #Location text
%patch $7AAA $90 $90 $90 $90 $90 #Background
%patch $7AF8 $90 $90 $90 $90 $90 #Level name

#Use level entrance string instead of level name
%patch $7AC7 $90 $90 $90 $90 $90


#----------------
#SCORE
#----------------

#Score text
%patch $7B04 [$003DW] #Vertical
%patch $7B0A [$0050W] #Horizontal
%patch $7B10 [$0040W] #Maximum text width
%patch $7B13 [$0598W] #Text read from
%patch $312C8 "SCORE" $00 

#Score background rectangle
%patch $7B22 [$000AW] #Height
%patch $7B26 [$0042W] #Width
%patch $7B2A [$0047W] #Vertical
%patch $7B2E [$004FW] #Horizontal

#Counter
%patch $7B3B {$758AW} #Track score (high)
%patch $7B3F {$7588W} #Track score (low)
%patch $7B42 [$0029W] #Start tile
%patch $7B46 [$0008W] #Number of digits
%patch $7B4A [$0048W] #Vertical position
%patch $7B4E [$0050W] #Horizontal position

#Don't draw
%patch $7B16 $90 $90 $90 $90 $90 #Score text
%patch $7B31 $90 $90 $90 $90 $90 #Score background rectangle
%patch $7B52 $90 $90 $90         #Score Counter


#----------------
#EXTRA
#----------------

#Extra text
%patch $7B5C [$003DW] #Vertical
%patch $7B62 [$00B0W] #Horizontal
%patch $7B68 [$0040W] #Maximum text width
%patch $7B6B [$059EW] #Text read from
%patch $312CE "EXTRA" $00

#Background rectangle
%patch $7B7A [$000AW] #Height
%patch $7B7E [$0042W] #Width
%patch $7B82 [$0047W] #Vertical
%patch $7B86 [$00AFW] #Horizontal

#Counter
%patch $7B93 {$758EW} #Track extra keen score (high)
%patch $7B97 {$758CW} #Track extra keen score (low)
%patch $7B9A [$0029W] #Start tile
%patch $7B9E [$0008W] #Number of digits
%patch $7BA2 [$0048W] #Vertical position
%patch $7BA6 [$00B0W] #Horizontal position

#Don't draw
%patch $7B6E $90 $90 $90 $90 $90 #Extra text
%patch $7B89 $90 $90 $90 $90 $90 #Background rectangle
%patch $7BAA $90 $90 $90         #Counter


#----------------
#DIFFICULTY
#----------------

#Level text
%patch $7BB4 [$0055W] #Vertical
%patch $7BBA [$00B0W] #Horizontal
%patch $7BC0 [$0040W] #Maximum text width
%patch $7BC3 [$05A4W] #Text read from
%patch $312D4 "LEVEL" $00 

#Background rectangle
%patch $7BCF [$000FW] #Color
%patch $7BD3 [$000AW] #Height
%patch $7BD7 [$0042W] #Width
%patch $7BDB [$005FW] #Vertical
%patch $7BDF [$00AFW] #Horizontal

#Difficulty checks
%patch $7BFD {$75A8W}     #Track difficulty
%patch $7C00 [$0001W] $74 #If 1 goto write easy text
%patch $7C05 [$0002W] $74 #If 2 goto write normal text
%patch $7C0A [$0003W] $74 #If 3 goto write hard text

#Difficulty labels
%patch $7BEE [$0060W] #Vertical
%patch $7BF4 [$00B0W] #Horizontal
%patch $7BFA [$0040W] #Maximum text width
%patch $7C11 [$05AAW] #Text read from (easy)
%patch $7C1F [$05AFW] #Text read from (normal)
%patch $7C2D [$05B6W] #Text read from (hard)
%patch $312DA "Easy" $00 
%patch $312DF "Normal" $00 
%patch $312E6 "Hard" $00

#Don't draw
%patch $7BC6 $90 $90 $90 $90 $90 #Level text
%patch $7BE2 $90 $90 $90 $90 $90 #Background rectangle
%patch $7C14 $90 $90 $90 $90 $90 #Easy text
%patch $7C22 $90 $90 $90 $90 $90 #Medium text
%patch $7C30 $90 $90 $90 $90 $90 #Hard text


#----------------
#ITEMS
#----------------

#Item text
%patch $7C3C [$0050W] #Vertical
%patch $7C42 [$0060W] #Horizontal
%patch $7C45 [$05BBW] #Text read from
%patch $312EB "ITEMS" $00 

#Background rectangle
%patch $7C54 [$000AW] #Height
%patch $7C58 [$001AW] #Width
%patch $7C5C [$005FW] #Vertical position
%patch $7C60 [$007FW] #Horizontal position

#Sandwich counter
%patch $7C6D {$7594W} $01 $75 #Track sandwich (If 1 draw tile 2, else draw tile 1)
%patch $7C73 [$0002W] #Tile if got
%patch $7C77 [$0060W] #Vertical position if got
%patch $7C7B [$0080W] #Horizontal position if got
%patch $7C89 [$0001W] #Tile if not got
%patch $7C8D [$0060W] #Vertical position if not got
%patch $7C91 [$0080W] #Horizontal position if not got

#Rope+hook counter
%patch $7C9E {$7596W} $01 $75 #Track Rope+hook (If 1 draw tile 4, else draw tile 3)
%patch $7CA4 [$0004W] #Tile if got
%patch $7CA8 [$0060W] #Vertical position if got
%patch $7CAC [$0088W] #Horizontal position if got
%patch $7CBA [$0003W] #Tile if not got
%patch $7CBE [$0060W] #Vertical position if not got
%patch $7CC2 [$0088W] #Horizontal position if not got

#Rocket card counter
%patch $7CCF {$7598W} $01 $75 #Track Rocket card (If 1 draw tile 6, else draw tile 5)
%patch $7CD5 [$0006W] #Tile if got
%patch $7CD9 [$0060W] #Vertical position if got
%patch $7CDD [$0090W] #Horizontal position if got
%patch $7CEB [$0005W] #Tile if not got
%patch $7CEF [$0060W] #Vertical position if not got
%patch $7CF3 [$0090W] #Horizontal position if not got


#Don't draw
%patch $7C48 $90 $90 $90 $90 $90 #Items text
%patch $7C63 $90 $90 $90 $90 $90 #Background rectangle

%patch $7C7E $90 $90 $90 $90 $90 #Sandwich if got
%patch $7C94 $90 $90 $90 $90 $90 #Sandwich not got
%patch $7C6B $EB $2F		 #Sandwich at all

%patch $7CAF $90 $90 $90 $90 $90 #Rope+hook if got
%patch $7CC5 $90 $90 $90 $90 $90 #Rope+hook not got
%patch $7C9C $EB $2F		 #Rope+hook at all

%patch $7CE0 $90 $90 $90 $90 $90 #Rocket card if got
%patch $7CF6 $90 $90 $90 $90 $90 #Rocket card not got
%patch $7CCD $EB $2F		 #Rocket card at all


#----------------
#GEMS
#----------------

#Gem text
%patch $7D02 [$0050W] #Vertical
%patch $7D08 [$0070W] #Horizontal
%patch $7D0B [$05C1W] #Text read from
%patch $312F1 "KEYS" $00 

#Background rectangle
%patch $7D1A [$000AW] #Height
%patch $7D1E [$0022W] #Width
%patch $7D22 [$006FW] #Vertical position
%patch $7D26 [$0077W] #Horizontal position

#Counter
%patch $7D3B {$759CW} $00 $74 #What to track (Red to green gem, draw if <>0)
%patch $7D43 $0024W] #Start tile
%patch $7D47 $0070W] #Vertical position
%patch $7D53 $0078W] #Horizontal position

#Don't draw
%patch $7D0E $90 $90 $90 $90 $90 #Gem text
%patch $7D29 $90 $90 $90 $90 $90 #Background rectangle
%patch $7D56 $90 $90 $90 $90 $90 #Gem tiles


#----------------
#SHOTS
#----------------

#Shots text
%patch $7D68 [$00B0W] #Vertical
%patch $7D6E [$0070W] #Horizontal 
%patch $7D71 [$05C6W] #Text read from
%patch $312F6 "AMMO" $00 

#Background rectangle
%patch $7D80 [$000AW] #Height
%patch $7D84 [$001AW] #Width
%patch $7D88 [$006FW] #Vertical position
%patch $7D8C [$00D7W] #Horizontal position

#Counter
%patch $7D98 {$7590W} #What to track
%patch $7D9E [$0029W] #Start tile
%patch $7DA2 [$0003W] #Number of digits
%patch $7DA6 [$0070W] #Vertical position
%patch $7DAA [$00D8W] #Horizontal position

#Don't draw
%patch $7D74 $90 $90 $90 $90 $90 #Shots text
%patch $7D8F $90 $90 $90 $90 $90 #Background rectangle
%patch $7DAE $90 $90 $90         #Shots counter


#----------------
#LIVES
#----------------

#Lives text
%patch $7DB8 [$0050W] #Vertical 
%patch $7DBE [$0080W] #Horizontal
%patch $7DC1 [$05CBW] #Text read from
%patch $312FB "KEENS" $00 

#Background rectangle
%patch $7DD0 [$000AW] #Height
%patch $7DD4 [$0012W] #Width
%patch $7DD8 [$007FW] #Vertical AND horizontal position (Both are equal!)

#Counter
%patch $7DE5 {$75A6W} #What to track
%patch $7DEB [$0029W] #start tile
%patch $7DEF [$0002W] #Number of digits
%patch $7DF3 [$0080W] #Vertical AND horizontal position (Both are equal!)

#Don't draw
%patch $7DC4 $90 $90 $90 $90 $90 #Lives text
%patch $7DDC $90 $90 $90 $90 $90 #Background rectangle
%patch $7DF8 $90 $90 $90         #Lives counter


#----------------
#VIVAS
#----------------

#Drops text
%patch $7E02 [$00B0W] #Vertical
%patch $7E08 [$0080W] #Horizontal
%patch $7E0B [$05D1W] #Text read from
%patch $31301 "VIVAS" $00

#Background rectangle
%patch $7E1A [$000AW] #Height
%patch $7E1E [$0010W] #Width
%patch $7E22 [$007FW] #Vertical
%patch $7E26 [$00E0W] #Horizontal

#Counter
%patch $7E32 {$7592W} #What to track
%patch $7E38 [$0029W] #Start tile
%patch $7E3C [$0002W] #Number of digits
%patch $7E40 [$0080W] #Vertical position
%patch $7E44 [$00E0W] #Horizontal position

#Don't draw...
%patch $7E0E $90 $90 $90 $90 $90 #Vivas text
%patch $7E29 $90 $90 $90 $90 $90 #Background rectangle
%patch $7E48 $90 $90 $90         #Vivas counter


#----------------
#PRESS ANY KEY
#----------------

#Two rows of tiles
%patch $7E55 [$0048W] #Start tile (First row)
%patch $7E59 [$008CW] #Vertical position
%patch $7E65 [$0078W] #Horizontal position

%patch $7E73 [$0052W] #Start tile (First row)
%patch $7E77 [$0094W] #Vertical position
%patch $7E83 [$0078W] #Horizontal position

#Don't draw
%patch $7E68 $90 $90 $90 $90 $90 #PAK row 1
%patch $7E86 $90 $90 $90 $90 $90 #PAK row 2


Replace Wetsuit text with counter

This patch replaces the Wetsuit's ???\Wetsuit text box with a counter just like that used for lives or drops. As patched here it will appear below the lives counter and be the same size. (Specifically the text is read from $0661W and is located at 0050W,0090W. The background rectangle is 0Ax11 pixels located at 008FW,007FW and the counter is 02 digits long located at 0090W,0084W.)

As a side effect the Press Any Key code has to be moved 1 byte down to make room making this patch incompatible with any of the Press Any Key patches on this page. This can be corrected by moving the PAK patches 1 byte or by simply tweaking the PAK code in this patch.(Specifically the first row of PAK tiles starts at tile 48 and is placed starting at 008CW,00A0W while the second PAK row starts at tile 52 placed starting 0094W,00A0W.)

A final side-effect is that this patch requires the very end of the window code to be dependent on scroll_status_window code meaning that in the very unlikely event that the very end of that code is modified this patch may fail.

Keen 4

#Replace Wetsuit box with new counter (One byte too large!)
%patch $8058 $C7 $06 $A537W  [$0050W]  $C7 $06 $A535W  [$0090W]  $B8 [$0661W]  $50
             $9A $19310CF9RL     $83 $C4 $02 $33 $C0 $50 $B8 [$000AW]  $50 $B8
             [$0011W]  $50 $B8 [$008FW]  $50 $B8 [$007FW]  $50 $9A $1D060DE3RL
             $83 $C4 $0A $A1 {$7A5CW}  $99 $5052W  $B8 [$0029W]  $50 $B8 [$0002W]
             $50 $B8 [$0090W]  $50 $B8 [$0084W]  $50 $0E $E8 $FACDW  $83 $C4 $0C

#Relocate end of window one byte
%patch $80A8 $33 $F6 $EB $3D $8B $C6 $05 [$0048W]  $50 $B8 [$008CW]  $50 $8B $C6
             $D1 $E0 $D1 $E0 $D1 $E0 $05 [$00A0W]  $50 $9A $1D060ABBRL     $83
             $C4 $06 $8B $C6 $05 [$0052W]  $50 $B8 [$0094W]  $50 $8B $C6 $D1 $E0
             $D1 $E0 $D1 $E0 $05 [$00A0W]  $50 $9A $1D060ABBRL     $83 $C4 $06
             $46 $83 $FE $0A $7C $BE $E9 $01CAW

#Counter text:
%patch $2F4D1 "Wetsuit" $00


Sounds

There are two sounds associated with the Status Window, one for when it is bought down, the other for when it is dismissed. Both can be silenced.

Keen 4

#Sounds
%patch $8391 $22     #Status window goes down sound
%patch $8406 $23     #Status window goes up sound

#Disable sounds
%patch $8390 $EB $0A #Don't play Status window goes down sound
%patch $8405 $EB $0A #Don't play Status window goes up sound

Keen 5

#Sounds
%patch $830D $22     #Status window goes down sound
%patch $8382 $23     #Status window goes up sound

#Disable sounds
%patch $830C $EB $0A #Don't play Status window goes down sound
%patch $8381 $EB $0A #Don't play Status window goes up sound

Keen 6

#Sounds
%patch $8138 $22     #Status window goes down sound
%patch $81AD $23     #Status window goes up sound

#Disable sounds
%patch $8137 $EB $0A #Don't play Status window goes down sound
%patch $81AC $EB $0A #Don't play Status window goes up sound