Patch:Status Window (Vorticons)
The status window in Keen Vorticons appears when the spacebar is pressed during normal gameplay. It displays what Keen has, keys, shots, score and suchlike. This page covers patches relating to this window, divided into two sections. The first section contains patches relating to the window's behavior, what causes it to appear and what it does. The second section contains patches that relate to what the window looks like, its construction and content.
Patches for other status windows can be found at Patch:Status_Window_(Galaxy) and Patch:Status_Window_(Dreams). These patches also require some knowledge of Patch:Game stats and Patch:Text patches
Disable status window
This patch completely disables the status window, meaning it cannot be called during gameplay. The map is treated differently from levels, meaning it is possible to disable the status window in only one of these.
Keen 1
#Disable status window
%patch $124F $5D $C3 #In-level
%patch $7FA3 $EB $08 #On map
Keen 2
#Change status window key
%patch $1209 $5D $C3 #In-level
%patch $83A0 $EB $08 #On map
Keen 3
#Change status window key
%patch $11AD $5D $C3 #In-level
%patch $8D6C $EB $08 #On map
Status window behavior
This section contains patches that alter how the status window behaves, what causes it to appear and what it does.
Change controls
These patches change what key activates the status screen. By default this is the spacebar. in the example here it is changed to enter. Using these patches requires some knowledge of Patch:Scancodes.
Keen 1
#Change status window key
%patch $1251 [$5048W]
%patch $7FA3 [$5048W]
Keen 2
#Change status window key
%patch $120B [$5024W]
%patch $83A2 [$5024W]
Keen 3
#Change status window key
%patch $11AF [$5274W]
%patch $8D6E [$5274W]
Galaxy style status window controls
This changes the controls of the game to be more like Keen Galaxy. Spacebar shoots, enter brings up the status screen. See #http://andy.durdin.net/keen/modding/viewtopic.php?t=433 for the original topic. In essence this is a longer version of the above patches, with extra lines altering Keen's shot keys.
Keen 1
#Change the controls to Space, shoot; Enter, status.
%patch $1251 [$5048W]
%patch $7FA3 [$5048W]
%patch $3B23 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
%patch $3C4E $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
%patch $3DB9 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
%patch $3DCC $90 $90
%patch $3E6D $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
%patch $3FFC $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
%patch $40AA $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W] $00
Keen 2
#Change the controls to: Space, shoot; Enter, status.
%patch $120B [$5024W]
%patch $83A2 [$5024W]
%patch $6965 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
%patch $6A90 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
%patch $6BFB $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
%patch $6C0E $90 $90
%patch $6CAF $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
%patch $6E3E $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
%patch $6EEC $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5041W] $00
Keen 3
#Change the controls to: Space, shoot; Enter, status.
%patch $11AF [$5274W]
%patch $8D6E [$5274W]
%patch $71C9 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
%patch $72FA $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
%patch $7461 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
%patch $7474 $90 $90
%patch $7515 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
%patch $76A1 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
%patch $7750 $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5291W] $00
Status window construction and appearance
Status screen appearance
The status screen is at heart a text window with 16x16 tiles drawn over it at certain positions, followed by variables like the score.
For text, a lot of 'short lines' (separators) little more than one character long are used, as well as some 'long lines' with actual labels on them. Short lines are often shifted across a few characters.
There is also a 'big versatile status screen patch' that allows total customization of the Keen 1 status window. It is the last entry in this section.
Keen 1
Keen 1
#Status box size:
%patch $0E53 [$000CW] #Height (In lines of text)
%patch $0E57 [$001CW] #width (In letters)
#Text read from
%patch $0E6B [$1E02W] #First line (SCORE...EXTRA KEEN AT)
%patch $0E7C [$1E20W] #Second line - Score\EKA separator
%patch $0E85 [$1E23W] #Third line (KEENS...SHIP)
%patch $0E96 [$1E41W] #Fourth line - Lives\Parts separator 1
%patch $0EA7 [$1E44W] #Fifth line - Lives\Parts separator 2
%patch $0EB8 [$1E47W] #Sixth line - Lives\Parts separator 3
%patch $0EC1 [$1E4AW] #Seventh line (RAYGUN...KEYS)
%patch $0ED2 [$1E68W] #Eighth line - Raygun\Pogo separator 1
%patch $0EE0 [$1E6AW] #Eighth line - Pogo\Keycard separator 1
%patch $0EF1 [$1E6DW] #Ninth line -Raygun\Pogo separator 2
%patch $0EFF [$1E6FW] #Ninth line -Pogo\Keycard separator 2
%patch $0F10 [$1E72W] #Tenth line - Raygun\Pogo separator 3
%patch $0F1E [$1E74W] #Tenth line - Pogo\Keycard separator 3
%patch $0F27 [$1E77W] #Eleventh line (CHARGE)
%patch $0F35 [$1E81W] #Eleventh line - Pogo\Keycard separator 4
%patch $0F46 [$1E84W] #Twelfth line - Charge\Pogo separator
%patch $0F54 [$1E86W] #Twelfth line - Pogo\Keycard separator 5
%patch $0F5D [$1E89W] #Thirteenth line (PRESS A KEY)
#Text
%patch $14E52 " SCORE EXTRA KEEN AT " $0A $00
%patch $14E70 " " $0A $00
%patch $14E73 " KEENS SHIP PARTS " $0A $00
%patch $14E91 " " $0A $00
%patch $14E94 " " $0A $00
%patch $14E97 " " $0A $00
%patch $14E9A " RAYGUN POGO KEYCARDS " $0A $00
%patch $14EB8 " " $00
%patch $14EBA " " $0A $00
%patch $14EBD " " $00
%patch $14EBF " " $0A $00
%patch $14EC2 " " $00
%patch $14EC4 " " $0A $00
%patch $14EC7 " CHARGE " $00
%patch $14ED1 " " $0A $00
%patch $14ED4 " " $00
%patch $14ED6 " " $0A $00
%patch $14ED9 " PLEASE PRESS A KEY " $00
#Score
%patch $0F66 [$0A] #Base to show Keens score in ($0A = 10, $01 = binary, $00 don't show)
%patch $0F6F {$AACCW} #Variable (Low)
%patch $0F73 {$AACAW} #Variable (High)
#Extra Keen score
%patch $0FA0 [$0A] #Base to show Extra Keens score in ($0A = 10, $01 = binary, $00 don't show)
%patch $0FA8 {$6EC4W} #Variable (Low)
%patch $0FAC {$6EC2W} #Variable (High)
%patch $0FB0 {$4E20W} #Minimum EKA score
#Lives
%patch $1001 {$AAC6W} #Lives variable
%patch $0FE5 [$0003W] #Vertical position of lives
%patch $0FF0 $90 $90 #Lives spaced 8 pixels apart, not 16
%patch $1007 [$06] #Maximum number of lives to show
%patch $0FDE $EB $1E #Don't show Lives
%patch $1003 $90 $90 #Always show maximum number of Keens no matter how many lives Keen has
#Raygun tile
%patch $1166 [$019EW] #Tile
%patch $116D [$0007W] #V position, squares
%patch $1176 [$0004W] #V position, pixels
%patch $117C [$0003W] #H position
#Shots counter
%patch $1198 {$AAC8W} #Variable
%patch $1188 [$0003W] #H position
%patch $1191 [$000BW] #V position
#Pogo tile
%patch $11A7 [$019FW] #Tile
%patch $11AE [$0008W] #V position, squares
%patch $11B7 [$0004W] #V position, pixels
%patch $11BD [$000BW] #H position
Change the lives sprite
This patch allows the sprite used for lives to be changed. The first blue value is the sprite used * 4. (Here sprite 31 x 4 = 124 = $7B.) The second blue value is the vertical position of the sprites, originally this was 3 but because of he patch it must now be 9 larger (12 or $0C). This patch is incompatible with several of the patches in the above section that alter the lives counter.
Keen 1
#Change the lives sprite
%patch $0FDE $B8 [$007BW] $50 $8B $46 $FE $05 [$000CW] $D1 $E0 $D1 $E0
$50 $8B $C7 $D1 $E0 $90
Don't show ship parts
This patch removes the ship parts from the status window, converting it into more space to show Keen's lives. The blue variable is how many lives can now be shown in the status window.
Keen 1
#Don't display ship parts
%patch $100A $E9 $00B9W
%patch $14E90 $0A $0A $0A $00
%patch $0E8D $EB $31
%patch $1007 [$0D]
Keen 2
Keen 2
#Status box size:
%patch $0E53 [$000CW] #Height (In lines of text)
%patch $0E57 [$001CW] #width (In letters)
#Text read from
%patch $0E69 [$219CW] #First line (SCORE...EXTRA KEEN AT)
%patch $0E7A [$21BAW] #Second line
%patch $0E83 [$21BDW] #Third line (KEENS...PISTOL)
%patch $0E94 [$21DBW] #Fourth line
%patch $0EA5 [$21DEW] #Fifth line
%patch $0EB6 [$21E1W] #Sixth line
%patch $0EBF [$21E1W] #Seventh line (TARGETS...KEYS)
%patch $0ED0 [$2202W] #Eighth line
%patch $0EE1 [$2205W] #Ninth line
%patch $0EF2 [$2208W] #Tenth line
%patch $0F03 [$220BW] #Eleventh line
%patch $0F0C [$220EW] #Twelfth line (PRESS A KEY)
%patch $10A4 [$222BW] #London
%patch $10C0 [$2232W] #Cairo
%patch $10DC [$2238W] #Sydney
%patch $10F8 [$223FW] #New York
%patch $1118 [$2248W] #Paris
%patch $1138 [$224EW] #Rome
%patch $1158 [$2253W] #Moscow
%patch $1178 [$225AW] #Washington
#Text
%patch $1991C " SCORE EXTRA KEEN AT " $0A $00
%patch $1993A " " $0A $00
%patch $1993D " KEENS PISTOL " $0A $00
%patch $1995B " " $0A $00
%patch $1995E " " $0A $00
%patch $19961 " " $0A $00
%patch $19964 " TARGETS SAVED KEYS " $0A $00
%patch $19982 " " $0A $00
%patch $19985 " " $0A $00
%patch $19988 " " $0A $00
%patch $1998B " " $0A $00
%patch $1998E " PLEASE PRESS A KEY " $0A $00
%patch $199AB "London" $00
%patch $199B2 "Cairo" $00
%patch $199B8 "Sydney" $00
%patch $199BF "New York" $00
%patch $199C8 "Paris" $00
%patch $199CE "Rome" $00
%patch $199D3 "Moscow" $00
%patch $199DA "Wash D.C." $00
#H position of separating lines (Short lines)
%patch $0E74 [$0A] #SCORE-EXTRA square
%patch $0E8E [$13] #KEENS-PISTOL separator 1
%patch $0E9F [$13] #KEENS-PISTOL separator 2
%patch $0EB0 [$13] #KEENS-PISTOL separator 3
%patch $0ECA [$13] #TARGETS-KEYS separator 1
%patch $0ED8 [$13] #TARGETS-KEYS separator 2
%patch $0EEC [$13] #TARGETS-KEYS separator 3
%patch $0EFD [$13] #TARGETS-KEYS separator 4
#Score
%patch $0F15 [$0A] #Base to show Keens score in ($0A = 10, $01 = binary, $00 don't show)
%patch $0F1E {$9AE2W} #Variable (Low)
%patch $0F22 {$9AE0W} #Variable (High)
#Extra Keen score
%patch $0F4E [$0A] #Base to show Extra Keens score in ($0A = 10, $01 = binary, $00 don't show)
%patch $0F56 {$6EA0W} #Variable (Low)
%patch $0F5A {$6E9EW} #Variable (High)
%patch $0F5E {$4E20W} #Minimum EKA score
#Lives
%patch $0FB7 {$9ADCW} #Lives variable
%patch $0FBC [$0009W] #Maximum number of lives to show
%patch $0F8B [$0000W] #Hide x lives from START of lives (None hidden by default)
%patch $0F95 [$0003W] #Vertical position of lives
%patch $0FA1 $90 $90 #Lives spaced 8 pixels apart, not 16
%patch $0F8F $EB $1E #Don't show Lives
%patch $0FB9 $90 $90 #Always show maximum number of Keens no matter how many lives Keen has
#Raygun tile
%patch $0FC1 [$019EW] #Tile
%patch $0FC7 [$0003W] #V position, squares
%patch $0FD0 [$0004W] #V position, pixels
%patch $0FD6 [$0015W] #H position
#Shots
%patch $0FE2 [$0018W] #H position
%patch $0FEA [$0004W] #V position
#Keycards
%patch $0FFB [$0015W] #Keycards horizontal position
%patch $1003 [$0007W] #Keycards vertical position
%patch $1010 [$01A8W] #Keycard A tile
%patch $102F [$01A9W] #Keycard B tile
%patch $1040 [$0003W] #Keycard B horizontal offset (3 squares left of Key A)
%patch $1051 [$01AAW] #Keycard C tile
%patch $105E [$0010W] #Keycard C vertical offset (two squares down from Key A)
%patch $1073 [$01ABW] #Keycard D tile
%patch $1080 [$0010W] #Keycard D vertical offset(two squares down from Key A)
%patch $1087 [$0003W] #Keycard D offset offset (3 squares left of Key A)
%patch $1032 $90 #Don't show keycard B
%patch $1054 $90 #Don't show keycard C
%patch $1076 $90 #Don't show keycard D
Change the lives sprite
This patch allows the sprite used for lives to be changed. The first blue value is the sprite used * 4. (Here sprite 31 x 4 = 124 = $7B.) The second blue value is the vertical position of the sprites, originally this was 3 but because of he patch it must now be 9 larger (12 or $0C). This patch is incompatible with several of the patches in the above section that alter the lives counter.
Keen 2
#Change the lives sprite
%patch $0F8F $B8 [$007BW] $50 $8B $C7 $05 [$000CW] $D1 $E0 $D1 $E0
$50 $8B $46 $FE $D1 $E0 $90
Keen 3
Keen 3
#Status box size:
%patch $0EC0 [$000BW] #Height (In lines of text)
%patch $0EC4 [$001CW] #width (In letters)
#Text read from:
%patch $0ED5 [$22D4W] #1st line
%patch $0EE5 [$22F2W]
%patch $0EED [$22F5W] #3rd
%patch $0EFD [$2313W]
%patch $0F0D [$2316W]
%patch $0F1D [$2319W]
%patch $0F25 [$231CW] #7th
%patch $0F35 [$233AW]
%patch $0F45 [$233DW]
%patch $0F55 [$2340W]
%patch $0F5D [$2343W] #11th
#Text
%patch $1BAF4 " SCORE EXTRA KEEN AT " $0A $00
%patch $1BB12 " " $0A $00
%patch $1BB15 " KEENS PISTOL " $0A $00
%patch $1BB33 " " $0A $00
%patch $1BB36 " " $0A $00
%patch $1BB39 " " $0A $00
%patch $1BB3C " ANKH TIME KEY CARDS " $0A $00
%patch $1BB5A " " $0A $00
%patch $1BB5D " " $0A $00
%patch $1BB60 " " $0A $00
%patch $1BB63 " PLEASE PRESS A KEY " $00
#Horizontal position of some text (In characters)
%patch $0EDF [$000CW] #2nd line
%patch $0EF7 [$0013W] #4th line
%patch $0F07 [$0013W] #5th line
%patch $0F17 [$0013W] #6th line
%patch $0F2F [$000BW] #8th
%patch $0F3F [$000BW] #9th
%patch $0F4F [$000BW] #10th
#Position of values (Score and suchlike)
%patch $0F65 [$0A] #Score base (0A = 10 = decimal, $10 =hex, $01 = binary, $00 don't show)
%patch $0F86 [$0A] #Score h position
%patch $102F [$18] #Ammo h position
%patch $1037 [$04] #Ammo v position
%patch $1066 [$07] #Ankh time h position
%patch $106E [$08] #Ankh time v position
#EKA structure
%patch $0F9C [$0A] #Extra Keen counter base (like above, $00, don't show)
%patch $0FC5 [$1A] #Extra Keen counter h position
%patch $0FA4 {$70F0W} #Variable (Low)
%patch $0FA8 {$70EEW} #Variable (High)
%patch $0FAC {$4E20W} #Minimum EKA score
#Keen's lives structure
%patch $100A [$09] #Maximum number of lives to show
%patch $0FD7 [$0000W] #Hide x lives from START of lives (None hidden by default)
%patch $0FD7 [$00] #Lives h position (Lives stop at $12, so $0A doesn't show lives)
%patch $0FE1 [$0003W] #Sprite vertical position
%patch $0FED $90 $90 #Sprites close together (Change spacing of sprites)
#Raygun
%patch $100E [$00D8W] #Raygun tile
%patch $1014 [$0003W] #Vertical position (lines)
%patch $101D [$0004W] #Plus xx pixels
%patch $1023 [$0015W] #H position
%patch $103E {$9D48W} #What counter tracks
#Ankh
%patch $1045 [$00D6W] #Ankh tile
%patch $104B [$0007W] #V position
%patch $1054 [$0004W] #Plus xx pixels
%patch $105A [$0003W] #H position
%patch $1074 {$9946W} #What counter tracks
#Don't show Ankh tile
%patch $105D $90 $90 $90
#Keycards
%patch $1084 [$000DW] #Keycards h position (4 keycards start here)
%patch $108C [$0008W] #Keycards v position (All 4 keycards this height)
%patch $1099 [$00D9W] #Yellow keycard tile
%patch $10BB [$00DAW] #Red keycard tile
%patch $10CF [$0004W] #Red keycard left of yellow by this much
%patch $10E0 [$00DBW] #Green keycard tile
%patch $10F4 [$0008W] #Green keycard left of yellow by this much
%patch $1105 [$00DCW] #Blue keycard tile
%patch $1119 [$000CW] #Blue keycard left of yellow by this much
%patch $1094 [$0001W] #Always show yellow keycard
%patch $10B6 [$0001W] #Always show red keycard
%patch $10DB [$0001W] #Always show green keycard
%patch $1100 [$0001W] #Always show blue keycard
Change the lives sprite
This patch allows the sprite used for lives to be changed. The first blue value is the sprite used * 4. (Here sprite 30 x 4 = 120 = $77.) The second blue value is the vertical position of the sprites, originally this was 3 but because of he patch it must now be 9 larger (12 or $0C). This patch is incompatible with several of the patches in the above section that alter the lives counter.
Keen 3
#Change the lives sprite
%patch $0FDB $B8 [$0077W] $50 $8B $C7 $05 [$000CW] $D1 $E0 $D1 $E0
$50 $8B $46 $FE $D1 $E0 $90
The big versatile Keen 1 status box patch
This patch fully customizes the status window, allowing the smart patcher to remove or rearrange things to their will. Along with the tiles and variables, it contains their positions and even allows entire blocks of code to be skipped. In addition to this, it frees up space for use with other patches.
The status file is just an external text file of 392 bytes in size. A default example can be found here: STATUS.CK1
Values in brown are related to Patch:Item bytes which control *what* is shown, or jumps which control whether or not something is shown. Values in blue are positions (In 8x8 tiles) or 16x16 tiles displayed
Keen 1
#Big versatile status window patch:
#Patch in the long-integer drawing function
%patch $11B4 $55 $89 $E5 $B8 $0A $00 $50 $B8 $90 $82 $50 $FF
$76 $06 $FF $76 $04 $E8 $03 $C2 $83 $C4 $08 $B8 $90 $82 $50 $E8
$A5 $C5 $44 $44 $8B $56 $08 $29 $C2 $89 $16 $82 $82 $8B $46 $0A
$A3 $F8 $82 $B8 $90 $82 $50 $E8 $E8 $50 $44 $44 $89 $EC $5D $C3
#Patch in the name of the status dialog text file, you'll need to create a file with this name and put your status
#text in it or Keen will crash.
%patch $14E52 "STATUS.CK1" $00
# Patch in the code to draw the status text (coordinates are measured in characters--8 pixel blocks)
%patch $0E6A $B8 $00 $3D $BA $1E02W # Show status window (0E6A)
$CD $21 $89 $C3 $BF $27 $00 $C6 $06 $9A $82 $00 $B9 $0A $00 $BA
$90 $82 $B4 $3F $CD $21 $53 $B8 $90 $82 $50 $E8 $2E $97 $44 $44
$5B $4F $75 $E8 $B4 $3E $CD $21
#Draw the status window, you can fiddle around with this code
#Draw extra Keen score at 01,0A
%patch $0E98 $8B $46 $FE $05 [$0001W] $50 $89
$F0 $05 [$000AW] $50 $FF $36 $CC $AA $FF $36 $CA $AA $E8 $04 $03
$83 $C4 $08
#Draw extra Keen score at 01,1A
%patch $0EB3 $8B $46 $FE $05 [$0001W] $50 $89 $F0 $05 [$001AW] $50
$A1 $C4 $6E $8B $16 $C2 $6E $81 $C2 $20 $4E $15 $00 $00 $50 $52
$E8 $E1 $02 $83 $C4 $08
#Draw Keen's lives, count $AAC6W, show sprite $007B \ 4 at 03,01
%patch $0ED6 $31 $FF $3B $3E {$AAC6W} $7D $29 $83 $FF
$06 $7D $24 $B8 [$007BW] $50 $8B $46 $FE $05 [$0003W] $B1 $03 $D3
$E0 $90 $90 $50 $89 $F8 $D1 $E0 $05 [$0001W] $01 $F0 $50 $E8 $2C
$AC $83 $C4 $06 $47 $EB $D1
#Draw joystick, check $AA94, if 0 show tile $0141 else show tile $013D at position 3.5 (3 + 4 pixels),10
%patch $0F07 $B8 [$0141W] $83 $3E {$AA94W} [$00] {$74}
$03 $B8 [$013DW] $50 $8B $46 $FE $05 [$0003W] $B1 $03 $D3 $E0 $05
[$0004W] $50 $89 $F0 $05 [$0010W] $50 $E8 $0D $AA $83 $C4 $06
#Draw battery, check $AA9C, if 0 show tile $0142 else show tile $013E at position 3.5,13
$B8
[$0142W] $83 $3E {$AA9CW} [$00] {$74} $03 $B8 [$013EW] $50 $8B $46 $FE
$05 [$0003W] $B1 $03 $D3 $E0 $05 [$0004W] $50 $89 $F0 $05 [$0013W]
$50 $E8 $E5 $A9 $83 $C4 $06
#Draw vacuum, check $AA96, if 0 show tile $0143 else show tile $013F at position 3.5,16
$B8 [$0143W] $83 $3E {$AA96W} [$00] {$74}
$03 $B8 [$013FW] $50 $8B $46 $FE $05 [$0003W] $B1 $03 $D3 $E0 $05
[$0004W] $50 $89 $F0 $05 [$0016W] $50 $E8 $BD $A9 $83 $C4 $06
#Draw whiskey, check $AA98, if 0 show tile $0144 else show tile $0140 at position 3.5,19
$B8
[$0144W] $83 $3E {$AA98W} [$00] {$74} $03 $B8 [$0140W] $50 $8B $46 $FE
$05 [$0003W] $B1 $03 $D3 $E0 $05 [$0004W] $50 $89 $F0 $05 [$0019W]
$50 $E8 $95 $A9 $83 $C4 $06
#Draw Key A, check $AA9E, if 0 show tile $022E else show tile $01A8 at position 7.5,13
%patch $0FA7 $B8 [$022EW] $83 $3E {$AA9EW} [$00] {$74}
$03 $B8 [$01A8W] $50 $8B $46 $FE $05 [$0007W] $B1 $03 $D3 $E0 $05
[$0004W] $50 $89 $F0 $05 [$0013W] $50 $E8 $6D $A9 $83 $C4 $06
#Draw Key B, check $AAA0, if 0 show tile $022E else show tile $01A9 at position 7.5,17
$B8
[$022EW] $83 $3E {$AAA0W} [$00] {$74} $03 $B8 [$01A9W] $50 $8B $46 $FE
$05 [$0007W] $B1 $03 $D3 $E0 $05 [$0004W] $50 $89 $F0 $05 [$0017W]
$50 $E8 $45 $A9 $83 $C4 $06
#Draw Key C, check $AAA2, if 0 show tile $022E else show tile $01AA at position 9.5,13
$B8 [$022EW] $83 $3E {$AAA2W} [$00] {$74}
$03 $B8 [$01AAW] $50 $8B $46 $FE $05 [$0009W] $B1 $03 $D3 $E0 $05
[$0004W] $50 $89 $F0 $05 [$0013W] $50 $E8 $1D $A9 $83 $C4 $06
#Draw Key D, check $AAA4, if 0 show tile $022E else show tile $01AB at position 9.5,17
$B8
[$022EW] $83 $3E {$AAA4W} [$00] {$74} $03 $B8 [$01ABW] $50 $8B $46 $FE
$05 [$0009W] $B1 $03 $D3 $E0 $05 [$0004W] $50 $89 $F0 $05 [$0017W]
$50 $E8 $F5 $A8 $83 $C4 $06
#Draw Pogo, check $AA9A, if 0 show tile $000B else show tile $019F at position 8.5,0B
%patch $1047 $B8 [$000BW] $83 $3E {$AA9AW} [$00] {$74}
$03 $B8 [$019FW] $50 $8B $46 $FE $05 [$0008W] $B1 $03 $D3 $E0 $05
[$0004W] $50 $89 $F0 $05 [$000BW] $50 $E8 $CD $A8 $83 $C4 $06
#Draw Ammo value, count $AAC8, at position 0B,06
$8B
$46 $FE $05 [$000BW] $50 $89 $F0 $05 [$0006W] $50 $31 $C0 $50 $FF
$36 [$AAC8W] $E8 $2E $01 $83 $C4 $08
#Draw Raygun at position 7.5,03 (Change first two bytes to $EB $1C to skip)
$B8 [$019EW] $50 $8B $46 $FE
$05 [$0007W] $B1 $03 $D3 $E0 $05 [$0004W] $50 $89 $F0 $05 [$0003W]
$50 $E8 $95 $A8 $83 $C4 $06
#Wait for key and return
$E8 $90 $4B $31 $C0 $50 $E8 $1E $AD
$44 $44 $E8 $81 $A6 $E8 $D1 $F1 $E8 $CE $F1 $E8 $7C $4B $8B $46
$FC $8B $56 $FA $89 $16 $35 $51 $A3 $37 $51 $5F $5E $89 $EC $5D
$C3