Commander Keen 4-6

From ModdingWiki

Jump to: navigation, search
Commander Keen 4 title screen
Commander Keen 4 title screen

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
  • EGAGraph Format - used for storing graphics, text and miscellaneous data
  • GameMaps Format - used for storing level maps
  • IMF Format - actual music is in IMF
  • B800 Text - there are a couple of text screens in the main .EXE file (including the text displayed on the screen when you quit)

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 (or is it $32005?)
  • $30679 in Keen 5 V1.4
  • $3103D in Keen 6 V1.4

From that 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 (starting at address $2F205):
VALUE   LEVEL                 MUSIC PLAYED         LEVEL No
$00 $00 #Map                  (Shadowlands)          0
$00 $04 #Border Village       (Kick in the Pants)    1
$00 $03 #Slug Village         (Slug Village)         2
$00 $03 #Perilous Pit         (Slug Village)         3
$00 $02 #Cave of Descendants  (Too Hot)              4
$00 $02 #Chasm of Chills      (Too Hot)              5
$00 $04 #Crystalus            (Kick in the Pants)    6
$00 $03 #Hiliville            (Slug Village)         7
$00 $01 #Sand Yego            (Eat your Veggies)     8
$00 $01 #Miragia              (Eat your Veggies)     9
$00 $01 #Lifwater Oasis       (Eat your Veggies)    10
$00 $02 #Pyramid of Moons     (Too Hot)             11
$00 $02 #Pyramid of Shadows   (Too Hot)             12
$00 $02 #Pyramid of Ancients  (Too Hot)             13
$00 $02 #Pyramid of Forbidden (Too Hot)             14
$00 $02 #Isle of Tar          (Too Hot)             15
$00 $02 #Isle of Fire         (Too Hot)             16
$00 $01 #Well of Wishes       (Eat your Veggies)    17 
$FF $FF #High scores          (No music)            19

Related Links

Personal tools
programming