PATCH QUESTION: How to change the border color in Keen 1-3?

Request patches for Keens 1-3.
Post Reply
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

PATCH QUESTION: How to change the border color in Keen 1-3?

Post by KeenRush »

Hi, is there any way to change that cyan/light blue border of Keen 1-3? It would be cool to have in mod it in something different colour, for example red.
Possible?
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

PATCH: Change border color in Keen 1, 2, 3

Post by adurdin »

You basically have a choice of 16* colors for the border in the Keen games. The colors are shown in the table below, with the associated hex values.

Border Color Values:
Image

There are three different border colors: one is the color that is shown during most of the game; the other two are the colors that the border flashes when a goal is achieved (e.g. a vorticon is killed). Here are sample patch files that change the default border color to purple, and the flashing colors to red and white:

Sample Patch File for Keen 1:

Code: Select all

%ext ck1
%version 1.31

# All these should have the same value -- this is the usual border color
%patch $4A62   $05
%patch $6F9D   $05
%patch $15568  $05
%patch $15579  $05
%patch $1558A  $05
%patch $1559B  $05

# The two colors that the border flashes when a Vorticon dies
%patch $4A7D $3F
%patch $4A85 $04

%end
Sample Patch File for Keen 2:

Code: Select all

%ext ck2
%version 1.31

# All these should have the same value -- this is the usual border color
%patch $319C   $05
%patch $77C6   $05
%patch $19BF8  $05
%patch $19C09  $05
%patch $19C1A  $05
%patch $19C2B  $05

# The two colors that the border flashes when Keen destroys a Tantalus ray
%patch $77E1 $3F
%patch $77E9 $04

%end
Sample Patch File for Keen 3:

Code: Select all

%ext ck3
%version 1.31

# All these should have the same value -- this is the usual border color
%patch $3131   $05
%patch $8065   $05
%patch $1BD94  $05
%patch $1BDA5  $05
%patch $1BDB6  $05
%patch $1BDC7  $05

# The two colors that the border flashes when Keen destroys part of the Mangling Machine
%patch $8080 $3F
%patch $808A $04

%end
*Theoretically you should be able to use any of the 64 EGA palette colors, but only the sixteen given work properly on modern video cards.
Last edited by adurdin on Sun Oct 28, 2007 6:21 pm, edited 1 time in total.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Cheers Andy. :)

By the way, why there are so many "places" that you have to patch to get that cyan/light blue border changed? Or did the Keen team first made it to change in many different places, but didn't like it, and then they were too lazy to remove code, so they just all of them to have same values?
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

There are four different places where the border color is set explicitly; three of these are when it is flashing and immediately afterwards.

The remaining four places (the 5-digit offsets) are in the four different palettes that are used for the fading effect when entering or exiting a level. You can try playing with these palettes if you want -- just patch the 16 bytes preceding each of the border colors. I believe the first one is an all black palette, the next one is half black, the next all dark colors, and the next ordinary colors.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hmmm, ok. Maybe I won't touch those..
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Woohoo! nothing like dredging up an old topic eh?

I finally figured out what the border colour patch does:

#change border colour values are: $ 01 00 02 to 07 38 to 3F
# All these should have the same value -- this is the usual border color
%patch $4A62 $13 #colour after killing vorticon
%patch $6F9D $03 #colour after killing vorticon commander
%patch $15568 $01 #Fade colour 3
%patch $15579 $11 #Fade colour 2
%patch $1558A $03 #Fade colour 1
%patch $1559B $13 #Border colour

# The two colors that the border flashes when a Vorticon dies
%patch $4A7D $02 #duh
%patch $4A85 $12 #duh

What do I mean by fade colour? When Keen exits a level or the screen changes (i.e say you select 'the keenest' in the menu." the border changes colour as follows: Border colour,1,2,3,2,1,Border colour.

Here's an example border, watch it closely.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

First of all: it is great thing that you have spare time!! ^_^
Very cool job, I'm going to take advantage of that information right now. If I only would have more spare time I could have tried to change those hexes and see what happens..
Post Reply