############################################################################### # # File: puckman.keg # # Description: # # This file contains the definition for Puck Man. # # Author: Kevin Brisley # ############################################################################### # # The name of the game. # PuckMan.Name: Puck Man # # The desired FPS. # PuckMan.FramesPerSecond: 60 # # The history and anecdote files. # PuckMan.HistoryFile: puckman.his PuckMan.TalesFile: puckman.tal # # Address spaces. # PuckMan.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 Vector. # 0x10001-0x10001 (1Byte): Interrupt Disable. # PuckMan.Space1.Size: 0x10002 PuckMan.Space1.NumROMs: 4 PuckMan.Space1.ROM1.Description: puckman.6e @ 0x00000 PuckMan.Space1.ROM2.Description: puckman.6f @ 0x01000 PuckMan.Space1.ROM3.Description: puckman.6h @ 0x02000 PuckMan.Space1.ROM4.Description: puckman.6j @ 0x03000 # # CPUs. # PuckMan.NumCPUs: 1 # # CPU 1 (game). # PuckMan.CPU1.Description: Game PuckMan.CPU1.Type: Z80 PuckMan.CPU1.ClockSpeed: 3072000 PuckMan.CPU1.Space: 1 PuckMan.CPU1.IValue: 255 PuckMan.CPU1.ILocation: 0x10000 PuckMan.CPU1.IDisable: 0x10001 # # The number of inputs. # PuckMan.NumInputs: 3 PuckMan.Input1.Description: In Port 0 PuckMan.Input1.CPU: 1 PuckMan.Input1.Location: 0x5000 PuckMan.Input2.Description: In Port 1 PuckMan.Input2.CPU: 1 PuckMan.Input2.Location: 0x5040 PuckMan.Input3.Description: Dip Switches PuckMan.Input3.CPU: 1 PuckMan.Input3.Location: 0x5080 # # The number of outputs. # PuckMan.NumOutputs: 2 PuckMan.Output1.Description: Interrupt Vector PuckMan.Output1.CPU: 1 PuckMan.Output1.Port: 0x00 PuckMan.Output1.Location: 0x10000 PuckMan.Output2.Description: Interrupt Disable PuckMan.Output2.CPU: 1 PuckMan.Output2.WLocation: 0x5000 PuckMan.Output2.Location: 0x10001 # # The keys used in the game. # PuckMan.NumKeys: 16 # Insert Credit. PuckMan.Key1.Key: KEY_3 PuckMan.Key1.Joy: JOY_B3 PuckMan.Key1.Mask: 0x80 PuckMan.Key1.Input: 1 PuckMan.Key1.Default: Off/1 # Coin Slot 2 PuckMan.Key2.Key: KEY_8 PuckMan.Key2.Mask: 0x40 PuckMan.Key2.Input: 1 PuckMan.Key2.Default: Off/1 # Coin Slot 1 PuckMan.Key3.Key: KEY_9 PuckMan.Key3.Mask: 0x20 PuckMan.Key3.Input: 1 PuckMan.Key3.Default: Off/1 # Frame Skip. PuckMan.Key4.Key: KEY_F PuckMan.Key4.Mask: 0x10 PuckMan.Key4.Input: 1 PuckMan.Key4.Default: Off/1 # Player 1 Down. PuckMan.Key5.Key: KEY_DOWN PuckMan.Key5.Joy: JOY_DOWN PuckMan.Key5.Mask: 0x08 PuckMan.Key5.Input: 1 PuckMan.Key5.Default: Off/1 # Player 1 Right. PuckMan.Key6.Key: KEY_RIGHT PuckMan.Key6.Joy: JOY_RIGHT PuckMan.Key6.Mask: 0x04 PuckMan.Key6.Input: 1 PuckMan.Key6.Default: Off/1 # Player 1 Left. PuckMan.Key7.Key: KEY_LEFT PuckMan.Key7.Joy: JOY_LEFT PuckMan.Key7.Mask: 0x02 PuckMan.Key7.Input: 1 PuckMan.Key7.Default: Off/1 # Player 1 Up. PuckMan.Key8.Key: KEY_UP PuckMan.Key8.Joy: JOY_UP PuckMan.Key8.Mask: 0x01 PuckMan.Key8.Input: 1 PuckMan.Key8.Default: Off/1 # Table/Standup. PuckMan.Key9.Key: KEY_T PuckMan.Key9.Mask: 0x80 PuckMan.Key9.Input: 2 PuckMan.Key9.Default: Off/1 # 2 Player Start. PuckMan.Key10.Key: KEY_2 PuckMan.Key10.Joy: JOY_B2 PuckMan.Key10.Mask: 0x40 PuckMan.Key10.Input: 2 PuckMan.Key10.Default: Off/1 # 1 Player Start. PuckMan.Key11.Key: KEY_1 PuckMan.Key11.Joy: JOY_B1 PuckMan.Key11.Mask: 0x20 PuckMan.Key11.Input: 2 PuckMan.Key11.Default: Off/1 # Test. PuckMan.Key12.Key: KEY_X PuckMan.Key12.Mask: 0x10 PuckMan.Key12.Input: 2 PuckMan.Key12.Default: Off/1 # Player 2 Down. PuckMan.Key13.Key: KEY_K PuckMan.Key13.Mask: 0x08 PuckMan.Key13.Input: 2 PuckMan.Key13.Default: Off/1 # Player 2 Right. PuckMan.Key14.Key: KEY_L PuckMan.Key14.Mask: 0x04 PuckMan.Key14.Input: 2 PuckMan.Key14.Default: Off/1 # Player 2 Left. PuckMan.Key15.Key: KEY_J PuckMan.Key15.Mask: 0x02 PuckMan.Key15.Input: 2 PuckMan.Key15.Default: Off/1 # Player 2 Up. PuckMan.Key16.Key: KEY_I PuckMan.Key16.Mask: 0x01 PuckMan.Key16.Input: 2 PuckMan.Key16.Default: Off/1 # # The dip switches used in the game. # PuckMan.NumDips: 8 # Ghost Name. PuckMan.Dip1.Description: Ghost Names PuckMan.Dip1.Mask: 0x80 PuckMan.Dip1.Input: 3 PuckMan.Dip1.Default: Off/1 # Difficulty. PuckMan.Dip2.Description: Difficulty PuckMan.Dip2.Mask: 0x40 PuckMan.Dip2.Input: 3 PuckMan.Dip2.Default: Off/1 # Bonus Pacman (1 of 2). PuckMan.Dip3.Description: Bonus Pacman (1 of 2) PuckMan.Dip3.Mask: 0x20 PuckMan.Dip3.Input: 3 PuckMan.Dip3.Default: On/0 # Bonus Pacman (2 of 2). PuckMan.Dip4.Description: Bonus Pacman (2 of 2) PuckMan.Dip4.Mask: 0x10 PuckMan.Dip4.Input: 3 PuckMan.Dip4.Default: On/0 # Number of lives (1 of 2). PuckMan.Dip5.Description: Number of Lives (1 of 2) PuckMan.Dip5.Mask: 0x08 PuckMan.Dip5.Input: 3 PuckMan.Dip5.Default: Off/1 # Number of lives (2 of 2). PuckMan.Dip6.Description: Number of Lives (2 of 2) PuckMan.Dip6.Mask: 0x04 PuckMan.Dip6.Input: 3 PuckMan.Dip6.Default: On/0 # Play Mode (1 of 2). PuckMan.Dip7.Description: Play Mode (1 of 2) PuckMan.Dip7.Mask: 0x02 PuckMan.Dip7.Input: 3 PuckMan.Dip7.Default: On/0 # Play Mode (2 of 2). PuckMan.Dip8.Description: Play Mode (2 of 2) PuckMan.Dip8.Mask: 0x01 PuckMan.Dip8.Input: 3 PuckMan.Dip8.Default: Off/1 # # Screen Resolution. # PuckMan.ScreenWidth: 224 PuckMan.ScreenHeight: 288 # # Graphics Sets. # PuckMan.NumGfxSets: 2 # # The first set contains the characters. # PuckMan.GfxSet1.Width: 8 PuckMan.GfxSet1.Height: 8 PuckMan.GfxSet1.Number: 256 PuckMan.GfxSet1.BPP: 2 PuckMan.GfxSet1.BPs: 0 4 PuckMan.GfxSet1.XBits: 56 48 40 32 24 16 8 0 PuckMan.GfxSet1.YBits: 64 65 66 67 0 1 2 3 PuckMan.GfxSet1.Increment: 128 PuckMan.GfxSet1.NumROMs: 1 PuckMan.GfxSet1.ROM1.Description: puckman.5e # # The second set contains the sprites. # PuckMan.GfxSet2.Width: 16 PuckMan.GfxSet2.Height: 16 PuckMan.GfxSet2.Number: 64 PuckMan.GfxSet2.BPP: 2 PuckMan.GfxSet2.BPs: 0 4 PuckMan.GfxSet2.XBits: 312 304 296 288 280 272 264 256 \ 56 48 40 32 24 16 8 0 PuckMan.GfxSet2.YBits: 64 65 66 67 128 129 130 131 \ 192 193 194 195 0 1 2 3 PuckMan.GfxSet2.Increment: 512 PuckMan.GfxSet2.NumROMs: 1 PuckMan.GfxSet2.ROM1.Description: puckman.5f # # Graphic Layers # PuckMan.NumGfxLayers: 2 ############################################################################### # The first layer renders the characters. # # The video RAM starts at 0x04000 and is mapped as follows: # # /0x43dd 0x43dc 0x43db ... 0x43c3 0x43c2\ # \0x43fd 0x43fc 0x43fb ... 0x43e3 0x43e2/ # /0x43a0 0x4380 0x4360 ... 0x4060 0x4040\ # | 0x43a1 0x4381 0x4361 ... 0x4061 0x4041 | # ... ... ... ... ... # | 0x43be 0x439e 0x437e ... 0x407e 0x405e | # \0x43bf 0x439f 0x437f ... 0x407f 0x405f/ # /0x401d 0x401c 0x401b ... 0x4003 0x4002\ # \0x403d 0x403c 0x403b ... 0x4023 0x4022/ # # The colour RAM starts at 0x04400 and is mapped as follows: # # /0x47dd 0x47dc 0x47db ... 0x47c3 0x47c2\ # \0x47fd 0x47fc 0x47fb ... 0x47e3 0x47e2/ # /0x47a0 0x4780 0x4760 ... 0x4460 0x4440\ # | 0x47a1 0x4781 0x4761 ... 0x4461 0x4441 | # ... ... ... ... ... # | 0x47be 0x479e 0x477e ... 0x447e 0x445e | # \0x47bf 0x479f 0x477f ... 0x447f 0x445f/ # /0x441d 0x441c 0x441b ... 0x4403 0x4402\ # \0x443d 0x443c 0x443b ... 0x4423 0x4422/ # ############################################################################### PuckMan.GfxLayer1.Lightweight: Yes PuckMan.GfxLayer1.Space: 1 PuckMan.GfxLayer1.GfxSet: 1 PuckMan.GfxLayer1.Palette: 1 PuckMan.GfxLayer1.ColourTable: 1 PuckMan.GfxLayer1.Transparency: Off PuckMan.GfxLayer1.Clipping: 0,223,0,287 PuckMan.GfxLayer1.BlankChar: 64 PuckMan.GfxLayer1.NumChars: 1024 PuckMan.GfxLayer1.NumDirty: 2 PuckMan.GfxLayer1.Dirty1.Start: 0x04000 PuckMan.GfxLayer1.Dirty1.End: 0x043ff PuckMan.GfxLayer1.Dirty1.CharsPerLoc: 1 PuckMan.GfxLayer1.Dirty1.Assign: # PuckMan.GfxLayer1.Dirty2.Start: 0x04400 PuckMan.GfxLayer1.Dirty2.End: 0x047ff PuckMan.GfxLayer1.Dirty2.CharsPerLoc: 1 PuckMan.GfxLayer1.Dirty2.Assign: # PuckMan.GfxLayer1.NumCharNums: 1 PuckMan.GfxLayer1.CharNum1.Value: @(0x04000 + #) PuckMan.GfxLayer1.NumColours: 1 PuckMan.GfxLayer1.Colour1.Value: @(0x04400 + #) PuckMan.GfxLayer1.NumXPoss: 1 PuckMan.GfxLayer1.XPos1.Value: \ (# / 32) <= 1 ? (29 - # % 32) * 8 : \ (# / 32) >= 30 ? (29 - # % 32) * 8 : \ (29 - # / 32) * 8 PuckMan.GfxLayer1.NumYPoss: 1 PuckMan.GfxLayer1.YPos1.Value: \ (# / 32) <= 1 ? (# / 32 + 34) * 8 : \ (# / 32) >= 30 ? (# / 32 - 30) * 8 : \ (# % 32 + 2) * 8 ############################################################################### # The second layer renders the sprites. # # The sprite RAM is split in two, half at 0x04FF2 and the other half at # 0x05062. There are 2 sequential bytes per sprite and 6 sprites. # The following describes the 4 bytes: # # First half - # 0 : bit 0 indicates vertical flip # bit 1 indicates horizontal flip # bits 2-7 indicate the sprite number # 1 : Colour # # Second half - # 0 : X Position from right side of the screen. # 1 : Y Position from bottom of the screen. ############################################################################### PuckMan.GfxLayer2.Space: 1 PuckMan.GfxLayer2.GfxSet: 2 PuckMan.GfxLayer2.Palette: 1 PuckMan.GfxLayer2.ColourTable: 1 PuckMan.GfxLayer2.Clipping: 0,223,16,271 PuckMan.GfxLayer2.Transparency: Map PuckMan.GfxLayer2.NumChars: 6 PuckMan.GfxLayer2.NumDirty: 2 PuckMan.GfxLayer2.Dirty1.Start: 0x04ff2 PuckMan.GfxLayer2.Dirty1.End: 0x04ffd PuckMan.GfxLayer2.Dirty1.CharsPerLoc: 1 PuckMan.GfxLayer2.Dirty1.Assign: 5 - # / 2 PuckMan.GfxLayer2.Dirty2.Start: 0x05062 PuckMan.GfxLayer2.Dirty2.End: 0x0506d PuckMan.GfxLayer2.Dirty2.CharsPerLoc: 1 PuckMan.GfxLayer2.Dirty2.Assign: 5 - # / 2 PuckMan.GfxLayer2.NumCharNums: 1 PuckMan.GfxLayer2.CharNum1.Value: @(0x04ff2 + 2 * (5 - #)) >> 2 PuckMan.GfxLayer2.NumColours: 1 PuckMan.GfxLayer2.Colour1.Value: @(0x04ff3 + 2 * (5 - #)) PuckMan.GfxLayer2.NumXPoss: 1 PuckMan.GfxLayer2.XPos1.Value: 239 - @(0x05062 + 2 * (5 - #)) PuckMan.GfxLayer2.NumYPoss: 1 PuckMan.GfxLayer2.YPos1.Value: 272 - @(0x05063 + 2 * (5 - #)) PuckMan.GfxLayer2.NumEnables: 1 PuckMan.GfxLayer2.Enable1.Value: 1 PuckMan.GfxLayer2.NumHFlips: 1 PuckMan.GfxLayer2.HFlip1.Value: @(0x4ff2 + 2 * (5 - #)) & 0x02 PuckMan.GfxLayer2.NumVFlips: 1 PuckMan.GfxLayer2.VFlip1.Value: @(0x4ff2 + 2 * (5 - #)) & 0x01 # # Colour Palettes # PuckMan.NumPalettes: 1 PuckMan.Palette1.NumColours: 16 PuckMan.Palette1.MaxValue: 255 PuckMan.Palette1.Colour1.RGB: 0x00/0x00/0x00 PuckMan.Palette1.Colour2.RGB: 0xff/0x00/0x00 PuckMan.Palette1.Colour3.RGB: 0xde/0x97/0x47 PuckMan.Palette1.Colour4.RGB: 0xff/0xb8/0xde PuckMan.Palette1.Colour5.RGB: 0x00/0x00/0x00 PuckMan.Palette1.Colour6.RGB: 0x00/0xff/0xde PuckMan.Palette1.Colour7.RGB: 0x47/0xb8/0xde PuckMan.Palette1.Colour8.RGB: 0xff/0xb8/0x47 PuckMan.Palette1.Colour9.RGB: 0x00/0x00/0x00 PuckMan.Palette1.Colour10.RGB: 0xff/0xff/0x00 PuckMan.Palette1.Colour11.RGB: 0x00/0x00/0x00 PuckMan.Palette1.Colour12.RGB: 0x21/0x21/0xde PuckMan.Palette1.Colour13.RGB: 0x00/0xff/0x00 PuckMan.Palette1.Colour14.RGB: 0x47/0xb8/0x97 PuckMan.Palette1.Colour15.RGB: 0xff/0xb8/0x97 PuckMan.Palette1.Colour16.RGB: 0xde/0xde/0xde # # The colour lookup table. # PuckMan.NumColourTables: 1 PuckMan.ColourTable1.NumEntries: 128 PuckMan.ColourTable1.List: \ 0x00,0x00,0x00,0x00,0x00,0x0F,0x0B,0x01, \ 0x00,0x00,0x00,0x00,0x00,0x0F,0x0B,0x03, \ 0x00,0x00,0x00,0x00,0x00,0x0F,0x0B,0x05, \ 0x00,0x00,0x00,0x00,0x00,0x0F,0x0B,0x07, \ 0x00,0x00,0x00,0x00,0x00,0x0B,0x01,0x09, \ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ 0x00,0x0F,0x00,0x0E,0x00,0x01,0x0C,0x0F, \ 0x00,0x0E,0x00,0x0B,0x00,0x0C,0x0B,0x0E, \ 0x00,0x0C,0x0F,0x01,0x00,0x00,0x00,0x00, \ 0x00,0x01,0x02,0x0F,0x00,0x07,0x0C,0x02, \ 0x00,0x09,0x06,0x0F,0x00,0x0D,0x0C,0x0F, \ 0x00,0x05,0x03,0x09,0x00,0x0F,0x0B,0x00, \ 0x00,0x0E,0x00,0x0B,0x00,0x0E,0x00,0x0B, \ 0x00,0x00,0x00,0x00,0x00,0x0F,0x0E,0x01, \ 0x00,0x0F,0x0B,0x0E,0x00,0x0E,0x00,0x0F