Patch:Terminator text

From KeenWiki
Jump to: navigation, search

The "terminator text" is side-scrolling text that appears at the start of the Keen Galaxy games, along with several credits images. In reality, it is composed of two translucent monochrome images. The images themselves can be exported and imported with Keengraph. This sequence uses a different palette from the usual game, which alters the colors of various images, mostly for the interesting effects as the two images pass each other.

There are two palettes, the first is used as the "text" scrolls and the credits are shown. When this is happening the EGA graphics planes are divided up between the two horizontally scrolling monochrome images (i.e., "COMMANDER" and "KEEN") and the vertically scrolling credit pictures, as follows: The KEEN graphic is drawn into plane 0, the COMMANDER graphic into plane 1, and the vertically scrolling credit images into planes 2 and 3.

By setting EGA registers so that drawing to select planes at a time is allowed, the game can update one component of the scrolling screen without disturbing the other two. Thus, by default, the palette is set so that the vertically scrolling credit images can only have three completely opaque colors, and one completely transparent color (i.e., both planes 2 and 3 are zero). This leaves four colors that can be created from all the combinations of the two planes dedicated to the horizontally scrolling images (because 2^2 = 4): COMMANDER and KEEN can both have a unique color, as can their union and the backdrop. Hence, seven colors can be shown at once, if vertically scrolling images are not to have any translucence.

The second palette is used for when the screen "moves out" and becomes the title of the titlescreen bitmap. It changes to the normal game palette as soon as this zooming is finished, before the screen randomly 'fills in.' The details of this palette are unknown but are related to the first palette, presumably altering the EGA planes to allow a smooth transition between the scrolling images and the normal game.

This makes changing these palettes unusually difficult. See Patch:Palette for more details.


Disable entire sequence

This disables the Terminator text entirely, but as a side effect also removes the title screen. The game will go directly to the first demo instead. To simply disable a specific graphic see the 'images section below.

Patch: Keen 4
#Disable Terminator sequence and title screen (Frees $4E9F-$51B7)
%patch $3C26 $90 $90 $90 $90 $90


Go straight to title screen or help

The first set of patches in this section skips the credit bitmaps sequence and instead goes straight to the title screen appearing. Changing the blue value to $003BW will cause the terminator sequence to go straight to the help screen instead.

The second set of patches goes to he title zoom sequence, just before the title screen. (The terminator chunks do appear briefly but can be totally removed by altering their graphics to be totally black.)

Patch: Skip terminator sequence, go straight to title
#Terminator sequence goes straight to title - Keen 4
%patch $50ED $A545W $001CW
#Terminator sequence goes straight to title - Keen 5
%patch $50E7 $9BADW $001CW
#Terminator sequence goes straight to title - Keen 6
%patch $4F08 $A6D3W $001CW

Patch: Skip terminator sequence, go straight to title zoom
#Skip terminator sequence, go straight to title zoom -Keen 4
%patch $50F1 $90 $90 $90 $90
#Skip terminator sequence, go straight to title zoom -Keen 5
%patch $50EB $90 $90 $90 $90
#Skip terminator sequence, go straight to title zoom -Keen 6
%patch $4F0C $90 $90 $90 $90


Replace Terminator Text with another action

This is the Main menu actions list, a list of various things the game does at the main menu. By simply swapping various pointers around it is possible to change the order that various actions appear or replace one action with another. A novel option is to replace the terminator text with the star wars story

Patch: Keen 4
#Main menu actions list
%patch $3CB9 $0448W
#3C18: Terminator sequence and title screen
$045FW
#3C2F: Demo 1
$046CW
#3C3C: Star wars story
$0473W
#3C43: Demo 2
$0481W
#3C51: High score demo
$0488W
#3C58: Demo 3
$0496W
#3C66: Demo 4


Palettes

These govern how the images are colored. Notice that the 16 EGA entries have only 6 colors in them. This is because all the images displayed are transparent, meaning things look very unusual if 16 colors are used. Care has to be taken when altering the palette colors. The 2nd, 3rd and 4th entries determine the color of the 'COMMANDER KEEN' images.

The following table shows are what colors each value is:

$1F, white       $1E, yellow       $1D, light purple  $1C, light red
$1B, light teal  $1A, light green  $19, light blue    $18, dark grey (light black)
$17, white       $16, yellow       $15, light purple  $14, light red
$13, light teal  $12, light green  $11, light blue    $10, dark grey (light black)
$0F, light grey  $0E, brown        $0D, dark purple   $0C, dark red
$0B, dark teal   $0A, dark green   $09, dark blue     $08, black
$07, light grey  $06, brown        $05, dark purple   $04, dark red
$03, dark teal   $02, dark green   $01, dark blue     $00, black

Patch: Keen 4
#Palettes called from:
%patch $50B5 $0218W %patch $50B8 $0229W
#Terminator text palette:
%patch $2F078 $00 $18 $18 $07 $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $13 $00
#Light colors (and border color)
#Terminator text palette 2, screen moves out:
%patch $2F099 $00 $18 $18 $07 $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $18 $00
#Light colors (and border color)

Patch: Keen 5
#Terminator text palette:
%patch $304F8 $00 $04 $04 $1C $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $13 $00
#Light colors (and border color)
#Terminator text palette 2, screen moves out:
%patch $30509 $00 $04 $04 $1C $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $04 $00
#Light colors (and border color)

Patch: Keen 6
#Terminator text palette:
%patch $30E7C $00 $05 $05 $15 $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $13 $00
#Light colors (and border color)
#Terminator text palette 2, screen moves out:
%patch $30E8D $00 $05 $05 $15 $01 $01 $01 $01
#Dark colors
$11 $11 $11 $11 $13 $13 $13 $05 $00
#Light colors (and border color)


COMMANDER + KEEN images

These are the 'COMMANDER KEEN' images that move past each other, they are in the same plane, behind the credit bitmaps. The values for what is used is the chunk number, (properly labelled by Keengraph, ModKeen does not extract the chunk properly and labels it differently.)

Patch: Keen 4
#Terminator chunks:
%patch $4EE8 $1281W
#COMMANDER
%patch $4EF4 $1280W
#KEEN


Don't show COMMANDER + KEEN images

This is an alternate and more stable version of the patch above which allows the modder to selectively remove one or both of the terminator images. Note that disabling both images also frees $4571-$459E.

Patch: Keen 4
#Don't display 'KEEN' (Free $4F59-$4F9F)
%patch $4F56 $E9 $0046W
#Don't display 'COMMANDER' (Free $504D-$5075)
%patch $504A $E9 $0028W


Credit bitmaps

These are the images crediting the game team that appear over the terminator text images for specific periods of time. They are read from a pointer list whose pointer is stored elsewhere in the code. It is possible to change the number of iamges shown. (Less is simple, more becomes more difficult as there is only a limited time to display images.)

Patch: Keen 4
#Bitmap list:
%patch $3F46 $0200W
#Location
%patch $50E0 $04
#Number of bitmaps to show 1
%patch $5113 $04
#Number of bitmaps to show 2
#Credit bitmaps:
%patch $2F070 $0068W $0069W $006AW $006BW

Patch: Keen 5
#Bitmap list:
%patch $3F40 $01B0W
#Location
%patch $50DA $04
#Number of bitmaps to show 1
%patch $510D $04
#Number of bitmaps to show 2
#Credit bitmaps:
%patch $304F0 $0053W $0054W $0055W $0056W

Patch: Keen 6
#Bitmap list:
%patch $3D61 $0144W
#Location
%patch $4EFB $04
#Number of bitmaps to show 1
%patch $4F2E $04
#Number of bitmaps to show 2
#Credit bitmaps:
%patch $30E74 $001DW $001EW $001FW $0020W


Don't display credits

This patch completely removes the credit bitmaps, skipping the code block entirely.

Patch: Keen 4
#Don't display credit bitmaps in terminator sequence (Keen 4; frees $4007-$41A7)
%patch $4006 $CB
#Don't display credit bitmaps in terminator sequence (Keen 5; frees $4001-$41A1)
%patch $4000 $CB
#Don't display credit bitmaps in terminator sequence (Keen 6; frees $3E21-$3FC1)
%patch $3E21 $CB


Credits horizontal position

This patch changes the horizontal position of the credit images. by default this is right in the middle of the screen, but it needs to be made less if the images are wider.

Patch: Credit images horizontal position
#Credit images horizontal position -Keen 4
%patch $402C $0014W
#Credit images horizontal position -Keen 5
%patch $4026 $0014W
#Credit images horizontal position -Keen 6
%patch $3E47 $0014W


Credits sitting time

This patch changes how long the credit images sit still for before moving up. If very small the images will just keep moving up th screen.

Patch: Credit images horizontal position
#Credit images sitting time -Keen 4
%patch $424F $00C8W
#Credit images sitting time -Keen 5
%patch $4249 $00C8W
#Credit images sitting time -Keen 6
%patch $406A $00C8W


Credits wobble

This patch causes the credit images to 'wobble' back and forth once they rise into position.

Patch: Credit images wobble
#Credit images wobble -Keen 4
%patch $4012 $0005W
#Credit images wobble -Keen 5
%patch $400C $0005W
#Credit images wobble -Keen 6
%patch $3E2D $0005W


Credits appear instantly

This patch makes the credit images appear in the middle of the screen instantly instead of sliding into place. It is slightly buggy ('Image dirt' may appear) but stable. The images will slide off the screen.

Patch: Credit images appear instantly
#Credit images appear instantly -Keen 4
%patch $4217 $0000W
#Credit images appear instantly -Keen 5
%patch $4211 $0000W
#Credit images appear instantly -Keen 5
%patch $4032 $0000W