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