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