Commander Keen 4-6
From ModdingWiki
This is the main page for Commander Keen 4-6. For a complete list of all pages related to these games, visit the Commander Keen 4-6 category page.
File formats
- AudioT Format - used for storing sound and music data
- B800 Text - there are a couple of text screens in the main .EXE file (including the text displayed on the screen when you quit)
- EGAGraph Format - used for storing graphics, text and miscellaneous data
- GameMaps Format - used for storing level maps
- IMF Format - actual music is in IMF
- Keen 4-6 Action Format Sprite's behaviors are governed by this
- Keen 4-6 Tileinfo Format Tile information are governed by this
Music
AudioT Format Details
Keen 4, 5 and 6 use the compressed version of the AudioT Format to store music and sound. The main audio file for each game, the AUDIOT.xxx file, is called AUDIO.CKx, where x is the number of the Keen game (4, 5 or 6). For example, the file for Keen 4 is AUDIO.CK4.
The two secondary files needed for this format, the AUDIOHED.xxx and AUDIODCT.xxx, are embedded inside the main .exe file of each game (KEEN4E.EXE, KEEN5E.EXE and KEEN6.EXE for the EGA versions of the game).
Levels Songs Assignment
There is a place inside the executables too, where each level in the game is assigned a song from the AUDIO.CKx file. These are the addresses in the uncompressed executable for each game where the levels songs are stored:
- $2F205 in Keen 4 V1.4
- $30679 in Keen 5 V1.4
- $3103D in Keen 6 V1.4
From those addresses, the following bytes indicate the song for each level. Every 2 bytes is a value corresponding to a level. The first 2 bytes correspond to level 0; the next 2 bytes correspond to level 1; and so on. Each 2-byte value is an integer corresponding to the song number used in that level, starting from $00 $00, and going up to $00 $01, and so on. This numbers refer to the order the songs are in the AUDIO.CKx file; $00 $00 is the first one, $00 $01 is the second one, and so on.
Default values for each game:
- Keen 4:
- VALUE LEVEL MUSIC PLAYED LEVEL No
%patch $2F206 $00 $00 #Map (Shadowlands) 0
$04 $00 #Border Village (Kick in the Pants) 1
$03 $00 #Slug Village (Slug Village) 2
$03 $00 #Perilous Pit (Slug Village) 3
$02 $00 #Cave of Descendants (Too Hot) 4
$02 $00 #Chasm of Chills (Too Hot) 5
$04 $00 #Crystalus (Kick in the Pants) 6
$03 $00 #Hiliville (Slug Village) 7
$01 $00 #Sand Yego (Eat your Veggies) 8
$01 $00 #Miragia (Eat your Veggies) 9
$01 $00 #Lifwater Oasis (Eat your Veggies) 10
$02 $00 #Pyramid of Moons (Too Hot) 11
$02 $00 #Pyramid of Shadows (Too Hot) 12
$02 $00 #Pyramid of Ancients (Too Hot) 13
$02 $00 #Pyramid of Forbidden (Too Hot) 14
$02 $00 #Isle of Tar (Too Hot) 15
$02 $00 #Isle of Fire (Too Hot) 16
$01 $00 #Well of Wishes (Eat your Veggies) 17
$03 $00 #Bwb Megarocket (Slug Village) 18
$FF $FF #High scores (No music, 'Fanfare') 19
- Keen 5:
- VALUE LEVEL MUSIC PLAYED LEVEL No
%patch $3067A $0B $00 #Map (Omegamatic) 0
$05 $00 #Ion Ventilation System (Wednesday on the Beach) 1
$07 $00 #Security Center (Security Center) 2
$09 $00 #Defense Tunnel Vlook (Be Sphereful) 3
$0A $00 #Energy Flow Systems (Make it Tighter) 4
$09 $00 #Defense Tunnel Burrh (Be Sphereful) 5
$0A $00 #Regulation Control Center (Make it Tighter) 6
$09 $00 #Defense Tunnel Sorra (Be Sphereful) 7
$0A $00 #Neutrino Burst Injector (Make it Tighter) 8
$09 $00 #Defense Tunnel Teln (Be Sphereful) 9
$0A $00 #Brownian Motion Inducer (Make it Tighter) 10
$03 $00 #Gravitational Damping Hub (Snooping) 11
$0D $00 #Quantum Explosion Dynamo (QED) 12
$04 $00 #Korath III Base (Bagpipes) 13
$0C $00 #Ending (Fanfare)
$02 $00 #High Scores (High Scores) 15
%patch $3069C $01 $00 #Scrolling Story (Armageddon Machine)
$00 $00 #Game Over (Came In)
$08 $00 #Help (Help)
- Keen 6:
- VALUE LEVEL MUSIC PLAYED LEVEL No
%patch $3103E $05 $00 #Map (Aliens Ate My Babysitter) 0
$03 $00 #Bloogwaters Crossing (Faster) 1
$01 $00 #Guard Post One (Brer Tar) 2
$08 $00 #First Dome of Darkness (Mamba Snake) 3
$08 $00 #Second Dome of Darkness (Mamba Snake) 4
$08 $00 #Bloogdome (Mamba Snake) 5
$07 $00 #Bloogton Manufacturing (Metal) 6
$02 $00 #Bloogton Tower (To the Future) 7
$07 $00 #Bloogfoods, Inc. (Metal) 8
$01 $00 #Guard Post 2 (Brer Tar) 9
$03 $00 #Bloogville (Faster) 10
$02 $00 #BASA (To the Future) 11
$01 $00 #Guard Post 3 (Brer Tar) 12
$04 $00 #Bloogbase Recreational District(Space Funk) 13
$04 $00 #Bloogbase Management District (Space Funk) 14
$06 $00 #Bloog Control Center (Ominous) 15
$02 $00 #Blooglab Space Station (To the Future) 16
$00 $00 #Bean-with-Bacon Megarocket (A World of Wonderment) 17
$00 $00 #High Scores (A World of Wonderment) 18

