########## PALETTES AND BORDERS ########## ------------------------------------------------------------------------------- #Change the default colors: #This is the color palette: 16 entries of r, g, b (each 0-63) %patch $13054 00 00 00 #black 00 00 42 #blue 00 42 00 #green 00 42 42 #cyan 42 00 00 #red 42 00 42 #magenta 42 21 00 #brown 42 42 42 #bright gray 21 21 21 #gray 21 21 63 #bright blue 21 63 21 #bright green 21 63 63 #bright cyan 63 21 21 #bright red 63 21 63 #pink 63 63 21 #yellow 63 63 63 #white #Set the palette when we go into graphics mode %patch $6E46 $E8 $D3 $D5 $90 $90 #Code to set graphics mode and set the palette %patch $441C $B8 $0D $00 $CD $10 $B8 $12 $10 $B9 $08 $00 $BB $00 $00 $8C $DA $8E $C2 $BA $04 $00 $CD $10 $BB $18 $00 $BA $1C $00 $CD $10 $C3 #Include this part if the "Change background tiles" patch is not used #It gives us 36 spare bytes for the palette-setting code %patch $4409 $B8 $14 $01 $26 $81 $3F $31 $01 $73 $03 $B8 $8F $00 $26 $89 $07 $E9 $5C $01 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- #Change the palette colours; there are 4 default palettes, you can create and use #a new pallette for the lights off, or four new palettes for fading in/out #[fade in/out and lights defualt use the same palettes] the last value is the #Border color used with the palette #Compatible with above colorchange patch! #Colors as follows: $1F, white; $1E, yellow; $19, light purple; $1C, light red; # $1B, light teal; $1A, light green; $19, light blue; $19, light green # $07, light grey; $06, brown; $05, dark purple; $04, dark red # $03, dark teal; $02 dark green; $01, dark grey $00, black #Four border colors not found in the palette: %patch $4A62 $03 #Color after killing a vorticon %patch $6F9D $03 #Color after killing vorticon commander #The two colors that the border flashes when a Vorticon dies %patch $4A7D $0E %patch $4A85 $03 #Default palettes: %patch $15558 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $03 #Black %patch $15569 $00 $00 $00 $00 $00 $00 $00 $00 $00 $01 $02 $03 $04 $05 $06 $07 $03 #Fade 2 [Used by lights off] %patch $1557A $00 $00 $00 $00 $00 $00 $00 $00 $18 $19 $1A $1B $1C $1D $1E $1F $03 #Fade 1 %patch $1558B $00 $01 $02 $03 $04 $05 $06 $07 $18 $19 $1A $1B $1C $1D $1E $1F $03 #'Normal' colours ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- #Make a new palette for lights off: %patch $13084 $1F $1F $1F $1F $1F $1F $1F $1F #New Palette $00 $00 $00 $00 $00 $00 $00 $00 $00 %patch $35C9 $34 $00 #Make Lights off use new palette ------------------------------------------------------------------------------- #How fast palettes change: %patch $6C91 $01 $00 #Pause BEFORE palettes change 1 %patch $6C4D $01 $00 #Black screen between light->dark and dark->light %patch $6C77 $08 $00 #Speed palettes change 1 %patch $6CA6 $08 $00 #Speed palettes change 2 %patch $6C62 $08 $00 #Speed palettes change 3 %patch $6CBB $08 $00 #Speed palettes change 4 %patch $6CD0 $08 $00 #Speed palettes change 5 ########## PARTS ########## See ITEMS ########## POGO [KEEN] ########## See also SPRITE PATCHES -> ANIMATIONS -> KEEN ################################# # THE JETPACK PATCH v0.1 ################################# #Keen always has a pogo %patch $900E $01 $00 #Pogo Jetpack: Precise control %patch $3F4E $90 $90 # Enables jetpack (ignores cmp god_mode,0x00) %patch $3F5B $FFF2W # Thrust: 0xFFF2 < neutral < 0xFFF3; 0xFF38 = Godmode default; # Thrustvalue < neutral == upwards thrust; thrustvalue > neutral == downwards thrust # 0xFFFF wraps around to 0x0000, e.g. 0x0002 provides more DOWNWARDS thrust than 0xFFFF #Pogo stops when Keen hits the ground. %patch $409B $90 $90 ##### BEGIN Jetpack Patch #Skip diagonal-key checking %patch $55EF $EB $4A #jmp short 0x563B #Route upwards movement to ThrustUpSkip %patch $565A $EB $D3 #jmp short 0x562F (up left) %patch $5661 $EB $CC #jmp short 0x562F (up) %patch $5668 $EB $C5 #jmp short 0x562F (up right) #Route downwards movement to ThrustDownSkip %patch $5684 $EB $AC #jmp short 0x5632 (down left) %patch $568B $EB $A5 #jmp short 0x5632 (down) #no room to put in down left jump... must fix #ThrustUp: 0x55F1 - 0x5604 %patch $55F1 $1E #push ds %patch $55F2 $0E #push cs %patch $55F3 $1F #pop ds %patch $55F4 $A1 $3F5BW #mov ax, [w_thrust] %patch $55F7 $3D $0020W #cmp word ax, THRUSTMAX = 020h %patch $55FA $7F $06 #jg short = 6 %patch $55FC $05 $0004W #add ax, THRUST_UP_DELTA = 4 %patch $55FF $A3 $3F5BW #mov [w_thrust], ax %patch $5602 $1F #pop ds %patch $5603 $EB $30 #jmp short ThrustExitSkip #ThrustDown - 0x5610 -> 0x5622 %patch $5610 $1E #push ds %patch $5611 $0E #push cs %patch $5612 $1F #pop ds %patch $5613 $A1 $3F5BW #mov ax, [w_thrust] %patch $5616 $3D $FFCCW #cmp word ax, THRUSTMIN = -51 (arbitrarily picked) %patch $5619 $7C $06 #jl 6 %patch $561B $05 $FFFCW #add ax, THRUST_DOWN_DELTA = -4 %patch $561E $A3 $3F5BW #mov [w_thrust], ax %patch $5621 $1F #pop ds %patch $5622 $EB $11 #jmp short ThrustExitSkip #Four 3-byte jmpSkips (added for convenience) #Patch jmp short to here, these point to small code snippets #Enough room to hold a near disp %patch $562F $EB $C0 #ThrustUpSkip jmp short 0x55F1 %patch $5632 $EB $DC #ThrustDownSkip jmp short 0x5610 %patch $5635 $EB $5B #ThrustExitSkip: jmp short 0x5692 #%patch $5638 #ThrustAltSkip ################################## END JETPACK PATCH ############################################## #----------------------------------------------------------------- #What the pogo gives: (1 pogo, 0 = take pogo) %patch $44AD $9A $AA $01 $00 #Keen can't pogo when %patch $3B18 $9A $AA $00 #Standing (If pogo = 0) %patch $3DAE $9A $AA $00 #Falling\jumping (If pogo = 0) #What the first byte affects: $94: Joystick $96: Vaccum $98: Whiskey $9A: Pogo $9C: Battery $9E: All cards $A0; Red card $A2: Green card $A4: Blue card $A6: Level 1 $A8: Level 2 $AA: Level 3 $AC: Level 4 $AE: Level 5 $B0: Level 6 $B2: Level 7 $B4: Level 8 $B6: Level 9 $B8: Level 10 $BA: Level 11 $BC: Level 12 $BE: Level 13 $C0: Level 14 $C2: Level 15 $C4: Level 16 $C6: Lives $C8: Ammo $CA: Points $CC: Points * 65536 #----------------------------------------------------------------- #Keen always has a pogo %patch $900E $01 $00 #Set pogo AND ammo to 0 when Keen dies\exits levels %patch $55EF $EB $4A %patch $55F1 $33 $C0 $A3 $C8 $AA $A3 $9A $AA $A3 $C0 $6E $C3 %patch $7D01 $E8 $ED $D8 $90 $90 $90 #Remove Keen's pogo after he exits a level %patch $8041 $90 $90 $90 $90 #Keen flies with pogo... %patch $3F4E $EB #NOT even with GOD mode %patch $3F4E $90 $90 #Even without GOD mode #Pogo heights: %patch $3F40 $C8 $00 #Normal %patch $3F3C $FF $FF #High (The smaller, the higher he goes) %patch $3F31 $90 #Always pogo high %patch $3F43 $90 #Never pogo high #Pogo stops when Keen hits the ground. %patch $409B $90 $90 #'Keen Dreams' jump cheat %patch $3F3D $90 #Trying to pogo exits level %patch $3F5D $EB #Keen hovers when alt is pushed and is moving up %patch $3F46 $90 #Keen hovers in the air when pressing alt %patch $3F57 $90 %patch $3F4E $90 $90 #Keen hovers in the air when pressing ctrl %patch $3F39 $90 #Keen floats upward, or downward [jetpack pogo] %patch $3F82 $90 #Keens pogo becomes a rocket %patch $3F7F $90 #Pogo acts as an antigravity boots %patch $3F50 $90 %patch $3F4E $90 #Control Godmode pogo speed: #First line lets you use this all the time, second line is the speed, $FFF2 #is 'neutral', larger (Incl >$0001) is DOWNWARDS, less is UPWARDS. Default #is $FF38. Pogo can be a jetpack rocket, or air cushion. %patch $3F4E $90 $90 # Enables jetpack (ignores cmp god_mode,0x00) %patch $3F5B $38 $FF # Thrust ########## POGO [TILE] ########## #Getting a pogo exits the level and loses a life %patch $4F36 $60 $00 #Pogo kills Keen, but without the death sprite. %patch $44AB $5F $06 $C8 $AA $00 $00 #What the pogo gives INSTEAD of a pogo: %patch $44AB $C7 $06 $C8 $AA $xx $00 #xx shots %patch $44AB $FF $06 $C6 $AA $90 $90 #Extra life %patch $44AB $C9 $06 $C8 $AA $00 $00 #Finnish level, give all keys and the battery %patch $44AB $7E $06 $C8 $AA $00 $00 #NOTHING! %patch $44AB $CE $06 $C8 $AA $00 $00 #Kill Keen, but give him whiskey and a key %patch $44AB $9F $06 $C8 $AA $00 $00 #Two keys, battery and whiskey, exits level ########## POINTS- COLA, TEDDY, ETC ########## #Changing pointitem scores: #These use the default values. %patch $15078 $64 $00 #100 %patch $1507A $C8 $00 #200 %patch $15076 $F4 $01 #500 %patch $1507C $E8 $03 #1000 %patch $1507E $88 $13 #5000 #Points Keen has at game start: (0) %patch $9008 $00 $00 #The two words point items add to: %patch $0D5B $CA #Score big %patch $0D5F $CC #Score small ########## PRESENTING AN ID SOFTWARE... SEQUENCE ########## #Skip: %patch $A262 $01 #Keen goes straight to world map after sequence %patch $A265 $90 #skip sequence, go straight to menu #Positions: (H position in 8x8 blocks, v in pixels) #Top of APOGEE sign is vertical 0 %patch $6FA9 $0F $00 #One moment h %patch $A1FA $16 $00 #An h %patch $A1F6 $F6 $FF #An v (Negative, e.g, ABOVE APOGEE sign) %patch $A1E0 $10 $00 #Rising apogee h %patch $A20C $10 $00 #Still Apogee h %patch $A221 $12 $00 #Presentation h %patch $A21D $20 $00 #Presentation v %patch $A22F $63 $00 #Of an v %patch $A233 $15 $00 #Of an h %patch $A241 $72 $00 #Id software v %patch $A245 $13 $00 #Id software h %patch $A253 $9F $00 #Production v %patch $A257 $13 $00 #Production h #Bitmaps %patch $6FA1 $0E #One moment %patch $A1EF $08 #An %patch $A1D8 $0A #Apogee rising %patch $A204 $0A #Apogee still %patch $A216 $09 #Presentation %patch $A22B $0F #Of an %patch $A23D $11 #ID software %patch $A24F $10 #Production #Remove bitmaps %patch $A1FD $90 #An %patch $A20F $90 $90 $90 #Still Apogee %patch $A1E3 $90 #Rising Apogee %patch $A224 $90 $90 $90 #Presentation %patch $A236 $90 $90 $90 #Of an %patch $A248 $90 $90 $90 #Id software %patch $A25A $90 $90 $90 #Production ########## PRESS F1 FOR HELP ########## %patch $97C0 $02 $00 #'Press F1 for help' sprite %patch $97C9 $90 #Don't show Press F1 for help sprite %patch $97C4 $B6 $00 #Press F1 for help y position %patch $97C8 $10 $00 #Press F1 for help sprite x position ########## PREVIEWS ########## #Change the time that the two previews take #Time value is in 64ths of a second (approx) #$012C = 300 = ~4.6 seconds %patch $96F2 $2C $01 %patch $9713 $2C $01 #Stop the previews images showing: %patch $9702 $7E %patch $96E5 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 %patch $9717 $C8 #Stop just image 1: %patch $96EA $96 %patch $96F2 $01 $00 #Or image 2: %patch $9702 $7E %patch $9713 $01 $00