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