############################################################################### # # File: pacplus.keg # # Description: # # This file contains the definition for Pac Man Plus. # # Author: Kevin Brisley # ############################################################################### # # The name of the game. # PacPlus.Name: Pac Man Plus # # The desired FPS. # PacPlus.FramesPerSecond: 60 # # The history and anecdote files. # PacPlus.HistoryFile: pacplus.his PacPlus.TalesFile: pacplus.tal # # Address spaces. # PacPlus.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. # PacPlus.Space1.Size: 0x10002 PacPlus.Space1.NumROMs: 4 PacPlus.Space1.ROM1.Description: pacplus.6e @ 0x00000 PacPlus.Space1.ROM2.Description: pacplus.6f @ 0x01000 PacPlus.Space1.ROM3.Description: pacplus.6h @ 0x02000 PacPlus.Space1.ROM4.Description: pacplus.6j @ 0x03000 # # CPUs. # PacPlus.NumCPUs: 1 # # CPU 1 (game). # PacPlus.CPU1.Description: Game PacPlus.CPU1.Type: Z80 PacPlus.CPU1.ClockSpeed: 3072000 PacPlus.CPU1.Space: 1 PacPlus.CPU1.IValue: 255 PacPlus.CPU1.ILocation: 0x10000 PacPlus.CPU1.IDisable: 0x10001 # # The number of inputs. # PacPlus.NumInputs: 3 PacPlus.Input1.Description: In Port 0 PacPlus.Input1.CPU: 1 PacPlus.Input1.Location: 0x5000 PacPlus.Input2.Description: In Port 1 PacPlus.Input2.CPU: 1 PacPlus.Input2.Location: 0x5040 PacPlus.Input3.Description: Dip Switches PacPlus.Input3.CPU: 1 PacPlus.Input3.Location: 0x5080 # # The number of outputs. # PacPlus.NumOutputs: 2 PacPlus.Output1.Description: Interrupt Vector PacPlus.Output1.CPU: 1 PacPlus.Output1.Port: 0x00 PacPlus.Output1.Location: 0x10000 PacPlus.Output2.Description: Interrupt Disable PacPlus.Output2.CPU: 1 PacPlus.Output2.WLocation: 0x5000 PacPlus.Output2.Location: 0x10001 # # The keys used in the game. # PacPlus.NumKeys: 16 # Insert Credit. PacPlus.Key1.Key: KEY_3 PacPlus.Key1.Joy: JOY_B3 PacPlus.Key1.Mask: 0x80 PacPlus.Key1.Input: 1 PacPlus.Key1.Default: Off/1 # Coin Slot 2 PacPlus.Key2.Key: KEY_8 PacPlus.Key2.Mask: 0x40 PacPlus.Key2.Input: 1 PacPlus.Key2.Default: Off/1 # Coin Slot 1 PacPlus.Key3.Key: KEY_9 PacPlus.Key3.Mask: 0x20 PacPlus.Key3.Input: 1 PacPlus.Key3.Default: Off/1 # Frame Skip. PacPlus.Key4.Key: KEY_F PacPlus.Key4.Mask: 0x10 PacPlus.Key4.Input: 1 PacPlus.Key4.Default: Off/1 # Player 1 Down. PacPlus.Key5.Key: KEY_DOWN PacPlus.Key5.Joy: JOY_DOWN PacPlus.Key5.Mask: 0x08 PacPlus.Key5.Input: 1 PacPlus.Key5.Default: Off/1 # Player 1 Right. PacPlus.Key6.Key: KEY_RIGHT PacPlus.Key6.Joy: JOY_RIGHT PacPlus.Key6.Mask: 0x04 PacPlus.Key6.Input: 1 PacPlus.Key6.Default: Off/1 # Player 1 Left. PacPlus.Key7.Key: KEY_LEFT PacPlus.Key7.Joy: JOY_LEFT PacPlus.Key7.Mask: 0x02 PacPlus.Key7.Input: 1 PacPlus.Key7.Default: Off/1 # Player 1 Up. PacPlus.Key8.Key: KEY_UP PacPlus.Key8.Joy: JOY_UP PacPlus.Key8.Mask: 0x01 PacPlus.Key8.Input: 1 PacPlus.Key8.Default: Off/1 # Table/Standup. PacPlus.Key9.Key: KEY_T PacPlus.Key9.Mask: 0x80 PacPlus.Key9.Input: 2 PacPlus.Key9.Default: Off/1 # 2 Player Start. PacPlus.Key10.Key: KEY_2 PacPlus.Key10.Joy: JOY_B2 PacPlus.Key10.Mask: 0x40 PacPlus.Key10.Input: 2 PacPlus.Key10.Default: Off/1 # 1 Player Start. PacPlus.Key11.Key: KEY_1 PacPlus.Key11.Joy: JOY_B1 PacPlus.Key11.Mask: 0x20 PacPlus.Key11.Input: 2 PacPlus.Key11.Default: Off/1 # Test. PacPlus.Key12.Key: KEY_X PacPlus.Key12.Mask: 0x10 PacPlus.Key12.Input: 2 PacPlus.Key12.Default: Off/1 # Player 2 Down. PacPlus.Key13.Key: KEY_K PacPlus.Key13.Mask: 0x08 PacPlus.Key13.Input: 2 PacPlus.Key13.Default: Off/1 # Player 2 Right. PacPlus.Key14.Key: KEY_L PacPlus.Key14.Mask: 0x04 PacPlus.Key14.Input: 2 PacPlus.Key14.Default: Off/1 # Player 2 Left. PacPlus.Key15.Key: KEY_J PacPlus.Key15.Mask: 0x02 PacPlus.Key15.Input: 2 PacPlus.Key15.Default: Off/1 # Player 2 Up. PacPlus.Key16.Key: KEY_I PacPlus.Key16.Mask: 0x01 PacPlus.Key16.Input: 2 PacPlus.Key16.Default: Off/1 # # The dip switches used in the game. # PacPlus.NumDips: 8 # Ghost Name. PacPlus.Dip1.Description: Ghost Names PacPlus.Dip1.Mask: 0x80 PacPlus.Dip1.Input: 3 PacPlus.Dip1.Default: Off/1 # Difficulty. PacPlus.Dip2.Description: Difficulty PacPlus.Dip2.Mask: 0x40 PacPlus.Dip2.Input: 3 PacPlus.Dip2.Default: Off/1 # Bonus Pacman (1 of 2). PacPlus.Dip3.Description: Bonus Pacman (1 of 2) PacPlus.Dip3.Mask: 0x20 PacPlus.Dip3.Input: 3 PacPlus.Dip3.Default: On/0 # Bonus Pacman (2 of 2). PacPlus.Dip4.Description: Bonus Pacman (2 of 2) PacPlus.Dip4.Mask: 0x10 PacPlus.Dip4.Input: 3 PacPlus.Dip4.Default: On/0 # Number of lives (1 of 2). PacPlus.Dip5.Description: Number of Lives (1 of 2) PacPlus.Dip5.Mask: 0x08 PacPlus.Dip5.Input: 3 PacPlus.Dip5.Default: Off/1 # Number of lives (2 of 2). PacPlus.Dip6.Description: Number of Lives (2 of 2) PacPlus.Dip6.Mask: 0x04 PacPlus.Dip6.Input: 3 PacPlus.Dip6.Default: On/0 # Play Mode (1 of 2). PacPlus.Dip7.Description: Play Mode (1 of 2) PacPlus.Dip7.Mask: 0x02 PacPlus.Dip7.Input: 3 PacPlus.Dip7.Default: On/0 # Play Mode (2 of 2). PacPlus.Dip8.Description: Play Mode (2 of 2) PacPlus.Dip8.Mask: 0x01 PacPlus.Dip8.Input: 3 PacPlus.Dip8.Default: Off/1 # # Screen Resolution. # PacPlus.ScreenWidth: 224 PacPlus.ScreenHeight: 288 # # Graphics Sets. # PacPlus.NumGfxSets: 2 # # The first set contains the characters. # PacPlus.GfxSet1.Width: 8 PacPlus.GfxSet1.Height: 8 PacPlus.GfxSet1.Number: 256 PacPlus.GfxSet1.BPP: 2 PacPlus.GfxSet1.BPs: 0 4 PacPlus.GfxSet1.XBits: 56 48 40 32 24 16 8 0 PacPlus.GfxSet1.YBits: 64 65 66 67 0 1 2 3 PacPlus.GfxSet1.Increment: 128 PacPlus.GfxSet1.NumROMs: 1 PacPlus.GfxSet1.ROM1.Description: pacplus.5e # # The second set contains the sprites. # PacPlus.GfxSet2.Width: 16 PacPlus.GfxSet2.Height: 16 PacPlus.GfxSet2.Number: 64 PacPlus.GfxSet2.BPP: 2 PacPlus.GfxSet2.BPs: 0 4 PacPlus.GfxSet2.XBits: 312 304 296 288 280 272 264 256 \ 56 48 40 32 24 16 8 0 PacPlus.GfxSet2.YBits: 64 65 66 67 128 129 130 131 \ 192 193 194 195 0 1 2 3 PacPlus.GfxSet2.Increment: 512 PacPlus.GfxSet2.NumROMs: 1 PacPlus.GfxSet2.ROM1.Description: pacplus.5f # # Graphic Layers # PacPlus.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/ # ############################################################################### PacPlus.GfxLayer1.Lightweight: Yes PacPlus.GfxLayer1.Space: 1 PacPlus.GfxLayer1.GfxSet: 1 PacPlus.GfxLayer1.Palette: 1 PacPlus.GfxLayer1.ColourTable: 1 PacPlus.GfxLayer1.Transparency: Off PacPlus.GfxLayer1.Clipping: 0,223,0,287 PacPlus.GfxLayer1.BlankChar: 64 PacPlus.GfxLayer1.NumChars: 1024 PacPlus.GfxLayer1.NumDirty: 2 PacPlus.GfxLayer1.Dirty1.Start: 0x04000 PacPlus.GfxLayer1.Dirty1.End: 0x043ff PacPlus.GfxLayer1.Dirty1.CharsPerLoc: 1 PacPlus.GfxLayer1.Dirty1.Assign: # PacPlus.GfxLayer1.Dirty2.Start: 0x04400 PacPlus.GfxLayer1.Dirty2.End: 0x047ff PacPlus.GfxLayer1.Dirty2.CharsPerLoc: 1 PacPlus.GfxLayer1.Dirty2.Assign: # PacPlus.GfxLayer1.NumCharNums: 1 PacPlus.GfxLayer1.CharNum1.Value: @(0x04000 + #) PacPlus.GfxLayer1.NumColours: 1 PacPlus.GfxLayer1.Colour1.Value: @(0x04400 + #) PacPlus.GfxLayer1.NumXPoss: 1 PacPlus.GfxLayer1.XPos1.Value: \ (# / 32) <= 1 ? (29 - # % 32) * 8 : \ (# / 32) >= 30 ? (29 - # % 32) * 8 : \ (29 - # / 32) * 8 PacPlus.GfxLayer1.NumYPoss: 1 PacPlus.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. ############################################################################### PacPlus.GfxLayer2.Space: 1 PacPlus.GfxLayer2.GfxSet: 2 PacPlus.GfxLayer2.Palette: 1 PacPlus.GfxLayer2.ColourTable: 1 PacPlus.GfxLayer2.Clipping: 0,223,16,271 PacPlus.GfxLayer2.Transparency: Map PacPlus.GfxLayer2.NumChars: 6 PacPlus.GfxLayer2.NumDirty: 2 PacPlus.GfxLayer2.Dirty1.Start: 0x04ff2 PacPlus.GfxLayer2.Dirty1.End: 0x04ffd PacPlus.GfxLayer2.Dirty1.CharsPerLoc: 1 PacPlus.GfxLayer2.Dirty1.Assign: 5 - # / 2 PacPlus.GfxLayer2.Dirty2.Start: 0x05062 PacPlus.GfxLayer2.Dirty2.End: 0x0506d PacPlus.GfxLayer2.Dirty2.CharsPerLoc: 1 PacPlus.GfxLayer2.Dirty2.Assign: 5 - # / 2 PacPlus.GfxLayer2.NumCharNums: 1 PacPlus.GfxLayer2.CharNum1.Value: @(0x04ff2 + 2 * (5 - #)) >> 2 PacPlus.GfxLayer2.NumColours: 1 PacPlus.GfxLayer2.Colour1.Value: @(0x04ff3 + 2 * (5 - #)) PacPlus.GfxLayer2.NumXPoss: 1 PacPlus.GfxLayer2.XPos1.Value: 239 - @(0x05062 + 2 * (5 - #)) PacPlus.GfxLayer2.NumYPoss: 1 PacPlus.GfxLayer2.YPos1.Value: 272 - @(0x05063 + 2 * (5 - #)) PacPlus.GfxLayer2.NumEnables: 1 PacPlus.GfxLayer2.Enable1.Value: 1 PacPlus.GfxLayer2.NumHFlips: 1 PacPlus.GfxLayer2.HFlip1.Value: @(0x4ff2 + 2 * (5 - #)) & 0x02 PacPlus.GfxLayer2.NumVFlips: 1 PacPlus.GfxLayer2.VFlip1.Value: @(0x4ff2 + 2 * (5 - #)) & 0x01 # # Colour Palettes # PacPlus.NumPalettes: 1 PacPlus.Palette1.NumColours: 16 PacPlus.Palette1.MaxValue: 255 PacPlus.Palette1.Colour1.RGB: 0x00/0x00/0x00 PacPlus.Palette1.Colour2.RGB: 0xff/0x00/0x00 PacPlus.Palette1.Colour3.RGB: 0xde/0x97/0x47 PacPlus.Palette1.Colour4.RGB: 0xff/0xb8/0xde PacPlus.Palette1.Colour5.RGB: 0x00/0x00/0x00 PacPlus.Palette1.Colour6.RGB: 0x00/0xff/0xde PacPlus.Palette1.Colour7.RGB: 0x47/0xb8/0xde PacPlus.Palette1.Colour8.RGB: 0xff/0xb8/0x47 PacPlus.Palette1.Colour9.RGB: 0x00/0x00/0x00 PacPlus.Palette1.Colour10.RGB: 0xff/0xff/0x00 PacPlus.Palette1.Colour11.RGB: 0x00/0x00/0x00 PacPlus.Palette1.Colour12.RGB: 0x21/0x21/0xde PacPlus.Palette1.Colour13.RGB: 0x00/0xff/0x00 PacPlus.Palette1.Colour14.RGB: 0x47/0xb8/0x97 PacPlus.Palette1.Colour15.RGB: 0xff/0xb8/0x97 PacPlus.Palette1.Colour16.RGB: 0xde/0xde/0xde # # The colour lookup table. # PacPlus.NumColourTables: 1 PacPlus.ColourTable1.NumEntries: 128 PacPlus.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