############################################################################### # # File: dkong.keg # # Description: # # This file contains the definition for Donkey Kong # # Author: Kevin Brisley # ############################################################################### # # The name of the game. # DKong.Name: Donkey Kong # # The desired FPS. # DKong.FramesPerSecond: 60 # # The history and anecdote files. # DKong.HistoryFile: dkong.his DKong.TalesFile: dkong.tal # # Address spaces. # DKong.NumSpaces: 1 # # The first address space is used by the Game CPU. It includes the following: # 0x00000-0x0FFFF (64K): Game RAM/ROM. # DKong.Space1.Size: 0x10000 DKong.Space1.NumROMs: 4 DKong.Space1.ROM1.Description: dk.5e @ 0x00000 DKong.Space1.ROM2.Description: dk.5c @ 0x01000 DKong.Space1.ROM3.Description: dk.5b @ 0x02000 DKong.Space1.ROM4.Description: dk.5a @ 0x03000 # # CPUs. # DKong.NumCPUs: 1 # # CPU 1 (game). # DKong.CPU1.Description: Game DKong.CPU1.Type: Z80_OLD DKong.CPU1.ClockSpeed: 3072000 DKong.CPU1.Space: 1 DKong.CPU1.IValue: INT_NMI DKong.CPU1.IDisable: 0x07d84 # # The number of inputs. # DKong.NumInputs: 4 DKong.Input1.Description: Player 1 Controls DKong.Input1.CPU: 1 DKong.Input1.Location: 0x07c00 DKong.Input1.Default: 0x00 DKong.Input2.Description: Player 2 Controls DKong.Input2.CPU: 1 DKong.Input2.Location: 0x07c80 DKong.Input2.Default: 0x00 DKong.Input3.Description: Coin Controls DKong.Input3.CPU: 1 DKong.Input3.Location: 0x07d00 DKong.Input3.Default: 0x00 DKong.Input4.Description: Dip Switches DKong.Input4.CPU: 1 DKong.Input4.Location: 0x07d80 DKong.Input4.Default: 0x84 # # The number of outputs. # DKong.NumOutputs: 0 # # The keys used in the game. # DKong.NumKeys: 13 # Player 1 Jump DKong.Key1.Key: KEY_SPACE DKong.Key1.Joy: JOY_B1 DKong.Key1.Mask: 0x10 DKong.Key1.Input: 1 DKong.Key1.Default: Off/0 # Player 1 Down DKong.Key2.Key: KEY_DOWN DKong.Key2.Joy: JOY_DOWN DKong.Key2.Mask: 0x08 DKong.Key2.Input: 1 DKong.Key2.Default: Off/0 # Player 1 Up DKong.Key3.Key: KEY_UP DKong.Key3.Joy: JOY_UP DKong.Key3.Mask: 0x04 DKong.Key3.Input: 1 DKong.Key3.Default: Off/0 # Player 1 Left DKong.Key4.Key: KEY_LEFT DKong.Key4.Joy: JOY_LEFT DKong.Key4.Mask: 0x02 DKong.Key4.Input: 1 DKong.Key4.Default: Off/0 # Player 1 Right DKong.Key5.Key: KEY_RIGHT DKong.Key5.Joy: JOY_RIGHT DKong.Key5.Mask: 0x01 DKong.Key5.Input: 1 DKong.Key5.Default: Off/0 # Player 2 Jump DKong.Key6.Key: KEY_A DKong.Key6.Mask: 0x10 DKong.Key6.Input: 2 DKong.Key6.Default: Off/0 # Player 2 Down DKong.Key7.Key: KEY_K DKong.Key7.Mask: 0x08 DKong.Key7.Input: 2 DKong.Key7.Default: Off/0 # Player 2 Up DKong.Key8.Key: KEY_I DKong.Key8.Mask: 0x04 DKong.Key8.Input: 2 DKong.Key8.Default: Off/0 # Player 2 Left DKong.Key9.Key: KEY_J DKong.Key9.Mask: 0x02 DKong.Key9.Input: 2 DKong.Key9.Default: Off/0 # Player 2 Right DKong.Key10.Key: KEY_L DKong.Key10.Mask: 0x01 DKong.Key10.Input: 2 DKong.Key10.Default: Off/0 # Coin DKong.Key11.Key: KEY_3 DKong.Key11.Mask: 0x80 DKong.Key11.Input: 3 DKong.Key11.Default: Off/0 # Player 2 Start DKong.Key12.Key: KEY_2 DKong.Key12.Mask: 0x08 DKong.Key12.Input: 3 DKong.Key12.Default: Off/0 # Player 1 Start DKong.Key13.Key: KEY_1 DKong.Key13.Mask: 0x04 DKong.Key13.Input: 3 DKong.Key13.Default: Off/0 # # The dip switches used in the game. # DKong.NumDips: 8 # Type of machine DKong.Dip1.Description: Cocktail or Upright DKong.Dip1.Mask: 0x80 DKong.Dip1.Input: 4 DKong.Dip1.Default: On/1 # Coin Count (1 of 3) DKong.Dip2.Description: Coin Count (1 of 3) DKong.Dip2.Mask: 0x40 DKong.Dip2.Input: 4 DKong.Dip2.Default: Off/0 # Coint Count (2 of 3) DKong.Dip3.Description: Coint Count (2 of 3) DKong.Dip3.Mask: 0x20 DKong.Dip3.Input: 4 DKong.Dip3.Default: Off/0 # Coint Count (3 of 3) DKong.Dip4.Description: Coint Count (3 of 3) DKong.Dip4.Mask: 0x10 DKong.Dip4.Input: 4 DKong.Dip4.Default: Off/0 # Bonus Life (1 of 2) DKong.Dip5.Description: Bonus Life (1 of 2) DKong.Dip5.Mask: 0x08 DKong.Dip5.Input: 4 DKong.Dip5.Default: Off/0 # Bonus Life (2 of 2) DKong.Dip6.Description: Bonus Life (2 of 2) DKong.Dip6.Mask: 0x04 DKong.Dip6.Input: 4 DKong.Dip6.Default: On/1 # Number of Lives (1 of 2) DKong.Dip7.Description: Number of Lives (1 of 2) DKong.Dip7.Mask: 0x02 DKong.Dip7.Input: 4 DKong.Dip7.Default: Off/0 # Number of Lives (2 of 2) DKong.Dip8.Description: Number of Lives (2 of 2) DKong.Dip8.Mask: 0x01 DKong.Dip8.Input: 4 DKong.Dip8.Default: Off/0 # # Screen Resolution. # DKong.ScreenWidth: 256 DKong.ScreenHeight: 256 # # Graphics Sets. # DKong.NumGfxSets: 2 # # The first set contains the characters. # DKong.GfxSet1.Width: 8 DKong.GfxSet1.Height: 8 DKong.GfxSet1.Number: 256 DKong.GfxSet1.BPP: 2 DKong.GfxSet1.BPs: 0 16384 DKong.GfxSet1.XBits: 56 48 40 32 24 16 8 0 DKong.GfxSet1.YBits: 0 1 2 3 4 5 6 7 DKong.GfxSet1.Increment: 64 DKong.GfxSet1.NumROMs: 2 DKong.GfxSet1.ROM1.Description: dk.3n DKong.GfxSet1.ROM2.Description: dk.3p # # The second set contains the sprites. # DKong.GfxSet2.Width: 16 DKong.GfxSet2.Height: 16 DKong.GfxSet2.Number: 128 DKong.GfxSet2.BPP: 2 DKong.GfxSet2.BPs: 0 32768 DKong.GfxSet2.XBits: 120 112 104 96 88 80 72 64 \ 56 48 40 32 24 16 8 0 DKong.GfxSet2.YBits: 0 1 2 3 4 5 6 7 \ 16384 16385 16386 16387 \ 16388 16389 16390 16391 DKong.GfxSet2.Increment: 128 DKong.GfxSet2.NumROMs: 4 DKong.GfxSet2.ROM1.Description: dk.7c DKong.GfxSet2.ROM2.Description: dk.7d DKong.GfxSet2.ROM3.Description: dk.7e DKong.GfxSet2.ROM4.Description: dk.7f # # Graphic Layers # DKong.NumGfxLayers: 2 ############################################################################### # The first layer renders the characters. # # The video RAM starts at 0x07400 and is used for the characters and the # colour. It is mapped as follows: # # 0x77e0 0x77c0 0x77a0 ... 0x7420 0x7400 # 0x77e1 0x77c1 0x77a1 ... 0x7421 0x7401 # ... ... ... ... ... # 0x77ff 0x77df 0x77bf ... 0x743f 0x741f ############################################################################### DKong.GfxLayer1.Lightweight: Yes DKong.GfxLayer1.Space: 1 DKong.GfxLayer1.GfxSet: 1 DKong.GfxLayer1.Palette: 1 DKong.GfxLayer1.ColourTable: 1 DKong.GfxLayer1.Transparency: Off DKong.GfxLayer1.NumChars: 1024 DKong.GfxLayer1.NumDirty: 1 DKong.GfxLayer1.Dirty1.Start: 0x07400 DKong.GfxLayer1.Dirty1.End: 0x077ff DKong.GfxLayer1.Dirty1.CharsPerLoc: 1 DKong.GfxLayer1.Dirty1.Assign: # DKong.GfxLayer1.NumCharNums: 1 DKong.GfxLayer1.CharNum1.Value: @(0x07400 + #) DKong.GfxLayer1.NumColours: 1 DKong.GfxLayer1.Colour1.Value: @(0x07400 + #) >> 2 DKong.GfxLayer1.NumXPoss: 1 DKong.GfxLayer1.XPos1.Value: (31 - # / 32) * 8 DKong.GfxLayer1.NumYPoss: 1 DKong.GfxLayer1.YPos1.Value: (# % 32) * 8 ############################################################################### # The second layer renders the sprites. # # The sprite RAM starts at 0x06900. There are 4 sequential bytes per # sprite and 96 sprites. The following describes the 4 bytes: # # 0 : X Position & Enable. # 1 : bits 0-6 indicate the sprite number # bit 7 indicates vertical flip # 2 : bits 0-6 indicate the colour # bit 7 indicates horizontal flip # 3 : Y Position. ############################################################################### DKong.GfxLayer2.Space: 1 DKong.GfxLayer2.GfxSet: 2 DKong.GfxLayer2.Palette: 1 DKong.GfxLayer2.ColourTable: 2 DKong.GfxLayer2.Transparency: On DKong.GfxLayer2.NumChars: 96 DKong.GfxLayer2.NumDirty: 1 DKong.GfxLayer2.Dirty1.Start: 0x06900 DKong.GfxLayer2.Dirty1.End: 0x06a7f DKong.GfxLayer2.Dirty1.CharsPerLoc: 1 DKong.GfxLayer2.Dirty1.Assign: # / 4 DKong.GfxLayer2.NumCharNums: 1 DKong.GfxLayer2.CharNum1.Value: @(0x6901 + 4 * #) & 0x7f DKong.GfxLayer2.NumColours: 1 DKong.GfxLayer2.Colour1.Value: @(0x6902 + 4 * #) & 0x7f DKong.GfxLayer2.NumXPoss: 1 DKong.GfxLayer2.XPos1.Value: @(0x6900 + 4 * #) - 7 DKong.GfxLayer2.NumYPoss: 1 DKong.GfxLayer2.YPos1.Value: @(0x6903 + 4 * #) - 8 DKong.GfxLayer2.NumEnables: 1 DKong.GfxLayer2.Enable1.Value: @(0x6900 + 4 * #) DKong.GfxLayer2.NumHFlips: 1 DKong.GfxLayer2.HFlip1.Value: @(0x6901 + 4 * #) & 0x80 DKong.GfxLayer2.NumVFlips: 1 DKong.GfxLayer2.VFlip1.Value: @(0x6902 + 4 * #) & 0x80 # # Colour Palettes # DKong.NumPalettes: 1 DKong.Palette1.NumColours: 16 DKong.Palette1.MaxValue: 255 DKong.Palette1.Colour1.RGB: 0x00/0x00/0x00 DKong.Palette1.Colour2.RGB: 0xff/0xff/0xff DKong.Palette1.Colour3.RGB: 0xff/0x00/0x00 DKong.Palette1.Colour4.RGB: 0xff/0x00/0xff DKong.Palette1.Colour5.RGB: 0xa8/0xff/0xff DKong.Palette1.Colour6.RGB: 0xff/0xc8/0xb8 DKong.Palette1.Colour7.RGB: 0xb8/0x00/0x00 DKong.Palette1.Colour8.RGB: 0x00/0x00/0xff DKong.Palette1.Colour9.RGB: 0xff/0xff/0x00 DKong.Palette1.Colour10.RGB: 0xff/0x80/0xff DKong.Palette1.Colour11.RGB: 0x78/0xc0/0xff DKong.Palette1.Colour12.RGB: 0xff/0x60/0x00 DKong.Palette1.Colour13.RGB: 0x00/0xff/0x00 DKong.Palette1.Colour14.RGB: 0x88/0x00/0x00 DKong.Palette1.Colour15.RGB: 0xff/0xb0/0x70 DKong.Palette1.Colour16.RGB: 0x00/0x60/0x00 # # The colour lookup table. # DKong.NumColourTables: 2 DKong.ColourTable1.NumEntries: 256 DKong.ColourTable1.List: \ 0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x01, \ 0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x01, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x05,0x06,0x02, 0x00,0x05,0x06,0x02, \ 0x00,0x0e,0x06,0x01, 0x00,0x0e,0x06,0x01, \ 0x00,0x0e,0x06,0x01, 0x00,0x0e,0x06,0x01, \ 0x00,0x0e,0x06,0x01, 0x00,0x0e,0x06,0x01, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x02, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x02, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x02, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, \ 0x00,0x04,0x07,0x08, 0x00,0x04,0x07,0x08, \ 0x00,0x0a,0x00,0x00, 0x00,0x00,0x00,0x00, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x04, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x04, \ 0x00,0x02,0x03,0x04, 0x00,0x02,0x03,0x04, \ 0x00,0x00,0x00,0x00, 0x00,0x02,0x05,0x07 DKong.ColourTable2.NumEntries: 64 DKong.ColourTable2.List: \ 0x00,0x0a,0x07,0x0b,0x00,0x0b,0x08,0x01, \ 0x00,0x02,0x05,0x07,0x00,0x02,0x03,0x01, \ 0x00,0x04,0x05,0x06,0x00,0x07,0x08,0x09, \ 0x00,0x0a,0x0b,0x0c,0x00,0x0e,0x0d,0x01, \ 0x00,0x0e,0x0d,0x0b,0x00,0x0b,0x01,0x09, \ 0x00,0x01,0x07,0x09,0x00,0x0b,0x07,0x05, \ 0x00,0x01,0x04,0x07,0x00,0x03,0x04,0x05, \ 0x00,0x0e,0x08,0x07,0x00,0x08,0x0b,0x00