############################################################################### # # File: bagman.keg # # Description: # # This file contains the definition for Bagman. # # Author: Kevin Brisley # ############################################################################### # # The name of the game. # Bagman.Name: Bagman # # The desired FPS. # Bagman.FramesPerSecond: 60 # # The history and anecdote files. # Bagman.HistoryFile: bagman.his Bagman.TalesFile: bagman.tal # # Address spaces. # Bagman.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): Interrupt Disable. # Bagman.Space1.Size: 0x10001 Bagman.Space1.NumROMs: 6 Bagman.Space1.ROM1.Description: a4_9e.bin @ 0x00000 Bagman.Space1.ROM2.Description: a4_9f.bin @ 0x01000 Bagman.Space1.ROM3.Description: a4_9j.bin @ 0x02000 Bagman.Space1.ROM4.Description: a4_9k.bin @ 0x03000 Bagman.Space1.ROM5.Description: a4_9m.bin @ 0x04000 Bagman.Space1.ROM6.Description: a4_9n.bin @ 0x05000 # # CPUs. # Bagman.NumCPUs: 1 # # CPU 1 (game). # Bagman.CPU1.Description: Game Bagman.CPU1.Type: Z80 Bagman.CPU1.ClockSpeed: 3072000 Bagman.CPU1.Space: 1 Bagman.CPU1.IValue: 255 Bagman.CPU1.IDisable: 0x10000 # # The number of inputs. # Bagman.NumInputs: 4 Bagman.Input1.Description: Player 1 Controls Bagman.Input1.CPU: 1 Bagman.Input1.Port: 12 Bagman.Input1.Default: 0xff Bagman.Input2.Description: Player 2 Controls Bagman.Input2.CPU: 1 Bagman.Input2.Port: 1 Bagman.Input2.Default: 0xff Bagman.Input3.Description: Dip Switches Bagman.Input3.CPU: 1 Bagman.Input3.Location: 0x0b000 Bagman.Input3.Default: 0xb6 Bagman.Input4.Description: Random Number Bagman.Input4.CPU: 1 Bagman.Input4.Location: 0x0a000 Bagman.Input4.Random: 1-255 # # The number of outputs. # Bagman.NumOutputs: 1 Bagman.Output1.Description: Interrupt Disable Bagman.Output1.CPU: 1 Bagman.Output1.WLocation: 0xa000 Bagman.Output1.Location: 0x10000 # # The keys used in the game. # Bagman.NumKeys: 16 # Player 1 Fire Bagman.Key1.Key: KEY_SPACE Bagman.Key1.Joy: JOY_B1 Bagman.Key1.Mask: 0x80 Bagman.Key1.Input: 1 Bagman.Key1.Default: Off/1 # Player 1 Down Bagman.Key2.Key: KEY_DOWN Bagman.Key2.Joy: JOY_DOWN Bagman.Key2.Mask: 0x40 Bagman.Key2.Input: 1 Bagman.Key2.Default: Off/1 # Player 1 Up Bagman.Key3.Key: KEY_UP Bagman.Key3.Joy: JOY_UP Bagman.Key3.Mask: 0x20 Bagman.Key3.Input: 1 Bagman.Key3.Default: Off/1 # Player 1 Right Bagman.Key4.Key: KEY_RIGHT Bagman.Key4.Joy: JOY_RIGHT Bagman.Key4.Mask: 0x10 Bagman.Key4.Input: 1 Bagman.Key4.Default: Off/1 # Player 1 Left Bagman.Key5.Key: KEY_LEFT Bagman.Key5.Joy: JOY_LEFT Bagman.Key5.Mask: 0x08 Bagman.Key5.Input: 1 Bagman.Key5.Default: Off/1 # Player 1 Start Bagman.Key6.Key: KEY_1 Bagman.Key6.Mask: 0x04 Bagman.Key6.Input: 1 Bagman.Key6.Default: Off/1 # Coin 2 Bagman.Key7.Key: KEY_4 Bagman.Key7.Mask: 0x02 Bagman.Key7.Input: 1 Bagman.Key7.Default: Off/1 # Coin 1 Bagman.Key8.Key: KEY_3 Bagman.Key8.Mask: 0x01 Bagman.Key8.Input: 1 Bagman.Key8.Default: Off/1 # Player 2 Fire Bagman.Key9.Key: KEY_A Bagman.Key9.Mask: 0x80 Bagman.Key9.Input: 2 Bagman.Key9.Default: Off/1 # Player 2 Down Bagman.Key10.Key: KEY_K Bagman.Key10.Mask: 0x40 Bagman.Key10.Input: 2 Bagman.Key10.Default: Off/1 # Player 2 Up Bagman.Key11.Key: KEY_I Bagman.Key11.Mask: 0x20 Bagman.Key11.Input: 2 Bagman.Key11.Default: Off/1 # Player 2 Right Bagman.Key12.Key: KEY_L Bagman.Key12.Mask: 0x10 Bagman.Key12.Input: 2 Bagman.Key12.Default: Off/1 # Player 2 Left Bagman.Key13.Key: KEY_J Bagman.Key13.Mask: 0x08 Bagman.Key13.Input: 2 Bagman.Key13.Default: Off/1 # Player 2 Start Bagman.Key14.Key: KEY_2 Bagman.Key14.Mask: 0x04 Bagman.Key14.Input: 2 Bagman.Key14.Default: Off/1 # Coin 4 Bagman.Key15.Key: KEY_5 Bagman.Key15.Mask: 0x02 Bagman.Key15.Input: 2 Bagman.Key15.Default: Off/1 # Coin 6 Bagman.Key16.Key: KEY_6 Bagman.Key16.Mask: 0x01 Bagman.Key16.Input: 2 Bagman.Key16.Default: Off/1 # # The dip switches used in the game. # Bagman.NumDips: 8 # Type of machine Bagman.Dip1.Description: Cocktail or Upright Bagman.Dip1.Mask: 0x80 Bagman.Dip1.Input: 3 Bagman.Dip1.Default: Off/1 # Bonus Bagman.Dip2.Description: Bonus Bagman Bagman.Dip2.Mask: 0x40 Bagman.Dip2.Input: 3 Bagman.Dip2.Default: Off/1 # Language Bagman.Dip3.Description: Language (English or French) Bagman.Dip3.Mask: 0x20 Bagman.Dip3.Input: 3 Bagman.Dip3.Default: Off/1 # Difficulty (1 of 2) Bagman.Dip4.Description: Difficulty (1 of 2) Bagman.Dip4.Mask: 0x10 Bagman.Dip4.Input: 3 Bagman.Dip4.Default: Off/1 # Difficulty (2 of 2) Bagman.Dip5.Description: Difficulty (2 of 2) Bagman.Dip5.Mask: 0x08 Bagman.Dip5.Input: 3 Bagman.Dip5.Default: Off/1 # Coins Per Play Bagman.Dip6.Description: Coins Per Play Bagman.Dip6.Mask: 0x04 Bagman.Dip6.Input: 3 Bagman.Dip6.Default: Off/1 # Number of Lives (1 of 2) Bagman.Dip7.Description: Number of Lives (1 of 2) Bagman.Dip7.Mask: 0x02 Bagman.Dip7.Input: 3 Bagman.Dip7.Default: Off/1 # Number of Lives (2 of 2) Bagman.Dip8.Description: Number of Lives (2 of 2) Bagman.Dip8.Mask: 0x01 Bagman.Dip8.Input: 3 Bagman.Dip8.Default: Off/1 # # Screen Resolution. # Bagman.ScreenWidth: 256 Bagman.ScreenHeight: 256 # # Graphics Sets. # Bagman.NumGfxSets: 2 # # The first set contains the character set. # Bagman.GfxSet1.Width: 8 Bagman.GfxSet1.Height: 8 Bagman.GfxSet1.Number: 1024 Bagman.GfxSet1.BPP: 2 Bagman.GfxSet1.BPs: 0 65536 Bagman.GfxSet1.XBits: 56 48 40 32 24 16 8 0 Bagman.GfxSet1.YBits: 0 1 2 3 4 5 6 7 Bagman.GfxSet1.Increment: 64 Bagman.GfxSet1.NumROMs: 4 Bagman.GfxSet1.ROM1.Description: a2_1e.bin Bagman.GfxSet1.ROM2.Description: a2_1c.bin Bagman.GfxSet1.ROM3.Description: a2_1j.bin Bagman.GfxSet1.ROM4.Description: a2_1f.bin # # The second set contains the sprites. # Bagman.GfxSet2.Width: 16 Bagman.GfxSet2.Height: 16 Bagman.GfxSet2.Number: 128 Bagman.GfxSet2.BPP: 2 Bagman.GfxSet2.BPs: 0 32768 Bagman.GfxSet2.XBits: 184 176 168 160 152 144 136 128 \ 56 48 40 32 24 16 8 0 Bagman.GfxSet2.YBits: 0 1 2 3 4 5 6 7 \ 64 65 66 67 68 69 70 71 Bagman.GfxSet2.Increment: 256 Bagman.GfxSet2.NumROMs: 2 Bagman.GfxSet2.ROM1.Description: a2_1e.bin Bagman.GfxSet2.ROM2.Description: a2_1j.bin # # Graphic Layers # Bagman.NumGfxLayers: 2 ############################################################################### # The first layer renders the characters. # # The video RAM starts at 0x09000 and is mapped as follows: # # 0x93e0 0x93c0 0x93a0 ... 0x9020 0x9000 # 0x93e1 0x93c1 0x93a1 ... 0x9021 0x9001 # ... ... ... ... ... # 0x93ff 0x93df 0x93bf ... 0x903f 0x901f ############################################################################### Bagman.GfxLayer1.Lightweight: Yes Bagman.GfxLayer1.Space: 1 Bagman.GfxLayer1.GfxSet: 1 Bagman.GfxLayer1.Palette: 1 Bagman.GfxLayer1.ColourTable: 1 Bagman.GfxLayer1.Clipping: 16,239,0,255 Bagman.GfxLayer1.Transparency: Off Bagman.GfxLayer1.NumChars: 1024 Bagman.GfxLayer1.NumDirty: 2 Bagman.GfxLayer1.Dirty1.Start: 0x09000 Bagman.GfxLayer1.Dirty1.End: 0x093ff Bagman.GfxLayer1.Dirty1.CharsPerLoc: 1 Bagman.GfxLayer1.Dirty1.Assign: # Bagman.GfxLayer1.Dirty2.Start: 0x09820 Bagman.GfxLayer1.Dirty2.End: 0x09bff Bagman.GfxLayer1.Dirty2.CharsPerLoc: 1 Bagman.GfxLayer1.Dirty2.Assign: # + 0x20 Bagman.GfxLayer1.NumCharNums: 1 Bagman.GfxLayer1.CharNum1.Value: \ (@(0x09800 + #) & 0x10 ? 1 : 0) * 512 + \ (@(0x09000 + #) + 8 * (@(0x09800 + #) & 0x20)) Bagman.GfxLayer1.NumColours: 1 Bagman.GfxLayer1.Colour1.Value: @(0x09800 + #) & 0x0f Bagman.GfxLayer1.NumXPoss: 1 Bagman.GfxLayer1.XPos1.Value: (31 - # / 32) * 8 Bagman.GfxLayer1.NumYPoss: 1 Bagman.GfxLayer1.YPos1.Value: (# % 32) * 8 ############################################################################### # The second layer renders the sprites. # # The sprite RAM starts at 0x09800. There are 4 sequential bytes per # sprite and 8 sprites. The following describes the 4 bytes: # # 0 : bits 0-5 indicate the sprite number # bit 6 indicates vertical flip # bit 7 indicates horizontal flip # 1 : bits 0-4 indicates the colour # bit 5 indicates the sprite number # 2 : X Position # 3 : Y Position. ############################################################################### Bagman.GfxLayer2.Space: 1 Bagman.GfxLayer2.GfxSet: 2 Bagman.GfxLayer2.Palette: 1 Bagman.GfxLayer2.ColourTable: 1 Bagman.GfxLayer2.Clipping: 16,239,0,255 Bagman.GfxLayer2.Transparency: On Bagman.GfxLayer2.NumChars: 8 Bagman.GfxLayer2.NumDirty: 1 Bagman.GfxLayer2.Dirty1.Start: 0x09800 Bagman.GfxLayer2.Dirty1.End: 0x0981f Bagman.GfxLayer2.Dirty1.CharsPerLoc: 1 Bagman.GfxLayer2.Dirty1.Assign: # / 4 Bagman.GfxLayer2.NumCharNums: 1 Bagman.GfxLayer2.CharNum1.Value: \ (@(0x09800 + 4 * #) & 0x3f) + 2 * (@(0x09801 + 4 * #) & 0x20) Bagman.GfxLayer2.NumColours: 1 Bagman.GfxLayer2.Colour1.Value: @(0x09801 + 4 * #) & 0x1f Bagman.GfxLayer2.NumXPoss: 1 Bagman.GfxLayer2.XPos1.Value: @(0x09802 + 4 * #) + 1 Bagman.GfxLayer2.NumYPoss: 1 Bagman.GfxLayer2.YPos1.Value: @(0x09803 + 4 * #) - 1 Bagman.GfxLayer2.NumEnables: 1 Bagman.GfxLayer2.Enable1.Value: @(0x09802 + 4 * #) && @(0x09803 + 4 * #) Bagman.GfxLayer2.NumHFlips: 1 Bagman.GfxLayer2.HFlip1.Value: @(0x09800 + 4 * #) & 0x80 Bagman.GfxLayer2.NumVFlips: 1 Bagman.GfxLayer2.VFlip1.Value: @(0x09800 + 4 * #) & 0x40 # # Colour Palettes # Bagman.NumPalettes: 1 Bagman.Palette1.NumColours: 41 Bagman.Palette1.MaxValue: 255 Bagman.Palette1.Colour1.RGB: 0x00/0x00/0x00 Bagman.Palette1.Colour2.RGB: 0x49/0x00/0x00 Bagman.Palette1.Colour3.RGB: 0x92/0x00/0x00 Bagman.Palette1.Colour4.RGB: 0xff/0x00/0x00 Bagman.Palette1.Colour5.RGB: 0x00/0x24/0x00 Bagman.Palette1.Colour6.RGB: 0x92/0x24/0x00 Bagman.Palette1.Colour7.RGB: 0xb6/0x24/0x00 Bagman.Palette1.Colour8.RGB: 0xff/0x24/0x00 Bagman.Palette1.Colour9.RGB: 0xdb/0x49/0x00 Bagman.Palette1.Colour10.RGB: 0x00/0x6c/0x00 Bagman.Palette1.Colour11.RGB: 0xff/0x6c/0x00 Bagman.Palette1.Colour12.RGB: 0x00/0x92/0x00 Bagman.Palette1.Colour13.RGB: 0x92/0x92/0x00 Bagman.Palette1.Colour14.RGB: 0xdb/0x92/0x00 Bagman.Palette1.Colour15.RGB: 0xff/0x92/0x00 Bagman.Palette1.Colour16.RGB: 0x00/0xdb/0x00 Bagman.Palette1.Colour17.RGB: 0x6d/0xdb/0x00 Bagman.Palette1.Colour18.RGB: 0x00/0xff/0x00 Bagman.Palette1.Colour19.RGB: 0x49/0xff/0x00 Bagman.Palette1.Colour20.RGB: 0xff/0xff/0x00 Bagman.Palette1.Colour21.RGB: 0x00/0x00/0x55 Bagman.Palette1.Colour22.RGB: 0xff/0x00/0x55 Bagman.Palette1.Colour23.RGB: 0xff/0x24/0x55 Bagman.Palette1.Colour24.RGB: 0xff/0x6d/0x55 Bagman.Palette1.Colour25.RGB: 0xdb/0x92/0x55 Bagman.Palette1.Colour26.RGB: 0xff/0x92/0x55 Bagman.Palette1.Colour27.RGB: 0x24/0xff/0x55 Bagman.Palette1.Colour28.RGB: 0x49/0xff/0x55 Bagman.Palette1.Colour29.RGB: 0xff/0xff/0x55 Bagman.Palette1.Colour30.RGB: 0x00/0x00/0xaa Bagman.Palette1.Colour31.RGB: 0xff/0x00/0xaa Bagman.Palette1.Colour32.RGB: 0x00/0x24/0xaa Bagman.Palette1.Colour33.RGB: 0xff/0x24/0xaa Bagman.Palette1.Colour34.RGB: 0xdb/0xdb/0xaa Bagman.Palette1.Colour35.RGB: 0xff/0xdb/0xaa Bagman.Palette1.Colour36.RGB: 0x00/0x00/0xff Bagman.Palette1.Colour37.RGB: 0xdb/0x00/0xff Bagman.Palette1.Colour38.RGB: 0x00/0xb6/0xff Bagman.Palette1.Colour39.RGB: 0x92/0xdb/0xff Bagman.Palette1.Colour40.RGB: 0xdb/0xdb/0xff Bagman.Palette1.Colour41.RGB: 0xff/0xff/0xff # # The colour lookup table. # Bagman.NumColourTables: 1 Bagman.ColourTable1.NumEntries: 64 Bagman.ColourTable1.List: \ 0x00,0x1e,0x03,0x0b,0x00,0x0a,0x27,0x07, \ 0x00,0x03,0x21,0x23,0x00,0x1e,0x03,0x0b, \ 0x00,0x23,0x25,0x1c,0x00,0x23,0x1c,0x25, \ 0x00,0x03,0x21,0x23,0x00,0x1c,0x08,0x27, \ 0x00,0x18,0x08,0x21,0x00,0x03,0x07,0x13, \ 0x00,0x18,0x21,0x07,0x00,0x1c,0x23,0x08, \ 0x00,0x21,0x26,0x23,0x00,0x13,0x23,0x03, \ 0x00,0x0b,0x25,0x08,0x00,0x07,0x13,0x23