############################################################################### # # File: mario.keg # # Description: # # This file contains the definition for Mario Bros. # # Author: Kevin Brisley # ############################################################################### # # The name of the game. # Mario.Name: Mario Bros. # # The desired FPS. # Mario.FramesPerSecond: 60 # # The history and anecdote files. # Mario.HistoryFile: mario.his Mario.TalesFile: mario.tal # # Address spaces. # Mario.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): Gfx Bank Select. # 0x10001-0x10001 (1Byte): Sprite Palette Select. # Mario.Space1.Size: 0x10002 Mario.Space1.NumROMs: 4 Mario.Space1.ROM1.Description: mario.7f @ 0x00000 Mario.Space1.ROM2.Description: mario.7e @ 0x02000 Mario.Space1.ROM3.Description: mario.7d @ 0x04000 Mario.Space1.ROM4.Description: mario.7c @ 0x0f000 # # CPUs. # Mario.NumCPUs: 1 # # CPU 1 (game). # Mario.CPU1.Description: Game Mario.CPU1.Type: Z80_OLD Mario.CPU1.ClockSpeed: 3072000 Mario.CPU1.Space: 1 Mario.CPU1.IValue: INT_NMI Mario.CPU1.IDisable: 0x07e84 # # The number of inputs. # Mario.NumInputs: 3 Mario.Input1.Description: Player 1 Controls Mario.Input1.CPU: 1 Mario.Input1.Location: 0x07c00 Mario.Input1.Default: 0x00 Mario.Input2.Description: Player 2 Controls Mario.Input2.CPU: 1 Mario.Input2.Location: 0x07c80 Mario.Input2.Default: 0x00 Mario.Input3.Description: Dip Switches Mario.Input3.CPU: 1 Mario.Input3.Location: 0x07f80 Mario.Input3.Default: 0x00 # # The number of outputs. # Mario.NumOutputs: 2 Mario.Output1.Description: Gfx Set Select Mario.Output1.CPU: 1 Mario.Output1.WLocation: 0x07e80 Mario.Output1.Location: 0x10000 Mario.Output1.NumConversions: 1 Mario.Output1.ConversionList: 0x00, 0x00 Mario.Output1.ConversionDefault: 0x01 Mario.Output2.Description: Sprite Palette Select Mario.Output2.CPU: 1 Mario.Output2.WLocation: 0x07e83 Mario.Output2.Location: 0x10001 Mario.Output2.NumConversions: 1 Mario.Output2.ConversionList: 0x00, 0x00 Mario.Output2.ConversionDefault: 0x01 # # The keys used in the game. # Mario.NumKeys: 14 # Player 2 Start Mario.Key1.Key: KEY_2 Mario.Key1.Mask: 0x40 Mario.Key1.Input: 1 Mario.Key1.Default: Off/0 # Player 1 Start Mario.Key2.Key: KEY_1 Mario.Key2.Mask: 0x20 Mario.Key2.Input: 1 Mario.Key2.Default: Off/0 # Player 1 Jump Mario.Key3.Key: KEY_SPACE Mario.Key3.Joy: JOY_B1 Mario.Key3.Mask: 0x10 Mario.Key3.Input: 1 Mario.Key3.Default: Off/0 # Player 1 Down Mario.Key4.Key: KEY_DOWN Mario.Key4.Joy: JOY_DOWN Mario.Key4.Mask: 0x08 Mario.Key4.Input: 1 Mario.Key4.Default: Off/0 # Player 1 Up Mario.Key5.Key: KEY_UP Mario.Key5.Joy: JOY_UP Mario.Key5.Mask: 0x04 Mario.Key5.Input: 1 Mario.Key5.Default: Off/0 # Player 1 Left Mario.Key6.Key: KEY_LEFT Mario.Key6.Joy: JOY_LEFT Mario.Key6.Mask: 0x02 Mario.Key6.Input: 1 Mario.Key6.Default: Off/0 # Player 1 Right Mario.Key7.Key: KEY_RIGHT Mario.Key7.Joy: JOY_RIGHT Mario.Key7.Mask: 0x01 Mario.Key7.Input: 1 Mario.Key7.Default: Off/0 # Coin 2 Mario.Key8.Key: KEY_4 Mario.Key8.Mask: 0x40 Mario.Key8.Input: 2 Mario.Key8.Default: Off/0 # Coin 1 Mario.Key9.Key: KEY_3 Mario.Key9.Mask: 0x20 Mario.Key9.Input: 2 Mario.Key9.Default: Off/0 # Player 2 Jump Mario.Key10.Key: KEY_A Mario.Key10.Mask: 0x10 Mario.Key10.Input: 2 Mario.Key10.Default: Off/0 # Player 2 Down Mario.Key11.Key: KEY_K Mario.Key11.Mask: 0x08 Mario.Key11.Input: 2 Mario.Key11.Default: Off/0 # Player 2 Up Mario.Key12.Key: KEY_I Mario.Key12.Mask: 0x04 Mario.Key12.Input: 2 Mario.Key12.Default: Off/0 # Player 2 Left Mario.Key13.Key: KEY_J Mario.Key13.Mask: 0x02 Mario.Key13.Input: 2 Mario.Key13.Default: Off/0 # Player 2 Right Mario.Key14.Key: KEY_L Mario.Key14.Mask: 0x01 Mario.Key14.Input: 2 Mario.Key14.Default: Off/0 # # The dip switches used in the game. # Mario.NumDips: 8 # Difficulty (1 of 2) Mario.Dip1.Description: Difficulty (1 of 2) Mario.Dip1.Mask: 0x80 Mario.Dip1.Input: 3 Mario.Dip1.Default: Off/0 # Difficulty (2 of 2) Mario.Dip2.Description: Difficulty (2 of 2) Mario.Dip2.Mask: 0x40 Mario.Dip2.Input: 3 Mario.Dip2.Default: On/1 # Bonus Life (1 of 2) Mario.Dip3.Description: Bonus Life (1 of 2) Mario.Dip3.Mask: 0x20 Mario.Dip3.Input: 3 Mario.Dip3.Default: Off/0 # Bonus Life (2 of 2) Mario.Dip4.Description: Bonus Life (2 of 2) Mario.Dip4.Mask: 0x10 Mario.Dip4.Input: 3 Mario.Dip4.Default: Off/0 # Coins Per Play (1 of 2) Mario.Dip5.Description: Coins Per Play (1 of 2) Mario.Dip5.Mask: 0x08 Mario.Dip5.Input: 3 Mario.Dip5.Default: Off/0 # Coins Per Play (2 of 2) Mario.Dip6.Description: Coins Per Play (2 of 2) Mario.Dip6.Mask: 0x04 Mario.Dip6.Input: 3 Mario.Dip6.Default: Off/0 # Number of Lives (1 of 2) Mario.Dip7.Description: Number of Lives (1 of 2) Mario.Dip7.Mask: 0x02 Mario.Dip7.Input: 3 Mario.Dip7.Default: Off/0 # Number of Lives (2 of 2) Mario.Dip8.Description: Number of Lives (2 of 2) Mario.Dip8.Mask: 0x01 Mario.Dip8.Input: 3 Mario.Dip8.Default: Off/0 # # Screen Resolution. # Mario.ScreenWidth: 256 Mario.ScreenHeight: 256 # # Graphics Sets. # Mario.NumGfxSets: 2 # # The first set contains the characters. # Mario.GfxSet1.Width: 8 Mario.GfxSet1.Height: 8 Mario.GfxSet1.Number: 512 Mario.GfxSet1.BPP: 2 Mario.GfxSet1.BPs: 0 32768 Mario.GfxSet1.XBits: 7 6 5 4 3 2 1 0 Mario.GfxSet1.YBits: 56 48 40 32 24 16 8 0 Mario.GfxSet1.Increment: 64 Mario.GfxSet1.NumROMs: 2 Mario.GfxSet1.ROM1.Description: mario.3f Mario.GfxSet1.ROM2.Description: mario.3j # # The second set contains the sprites. # Mario.GfxSet2.Width: 16 Mario.GfxSet2.Height: 16 Mario.GfxSet2.Number: 256 Mario.GfxSet2.BPP: 3 Mario.GfxSet2.BPs: 0 65536 131072 Mario.GfxSet2.XBits: 32775 32774 32773 32772 \ 32771 32770 32769 32768 \ 7 6 5 4 3 2 1 0 Mario.GfxSet2.YBits: 120 112 104 96 88 80 72 64 \ 56 48 40 32 24 16 8 0 Mario.GfxSet2.Increment: 128 Mario.GfxSet2.NumROMs: 6 Mario.GfxSet2.ROM1.Description: mario.7m Mario.GfxSet2.ROM2.Description: mario.7n Mario.GfxSet2.ROM3.Description: mario.7p Mario.GfxSet2.ROM4.Description: mario.7s Mario.GfxSet2.ROM5.Description: mario.7t Mario.GfxSet2.ROM6.Description: mario.7u # # Graphic Layers # Mario.NumGfxLayers: 2 ############################################################################### # The first layer renders the characters. # # The video RAM starts at 0x07400 and is used for the characters and the # colour. The value written to 0x07e80 indicates which graphic bank to # use. This is stored in 0x10000. The RAM is mapped as follows: # # 0x77ff 0x77fe 0x77fd ... 0x74e1 0x77e0 # 0x77df 0x77de 0x77dd ... 0x74c1 0x77c0 # ... ... ... ... ... # 0x741f 0x741e 0x741d ... 0x7401 0x7400 ############################################################################### Mario.GfxLayer1.Lightweight: Yes Mario.GfxLayer1.Space: 1 Mario.GfxLayer1.GfxSet: 1 Mario.GfxLayer1.Clipping: 0,255,16,239 Mario.GfxLayer1.Palette: 1 Mario.GfxLayer1.ColourTable: 1 Mario.GfxLayer1.Transparency: Off Mario.GfxLayer1.NumChars: 1024 Mario.GfxLayer1.NumDirty: 2 Mario.GfxLayer1.Dirty1.Start: 0x07400 Mario.GfxLayer1.Dirty1.End: 0x077ff Mario.GfxLayer1.Dirty1.CharsPerLoc: 1 Mario.GfxLayer1.Dirty1.Assign: # Mario.GfxLayer1.Dirty2.Start: 0x10000 Mario.GfxLayer1.Dirty2.End: 0x10000 Mario.GfxLayer1.Dirty2.CharsPerLoc: 1024 Mario.GfxLayer1.Dirty2.Assign: $ Mario.GfxLayer1.NumCharNums: 1 Mario.GfxLayer1.CharNum1.Value: @0x10000 * 256 + @(0x07400 + #) Mario.GfxLayer1.NumColours: 1 Mario.GfxLayer1.Colour1.Value: \ (@0x10000 * 256 + @(0x07400 + #)) >> 4 Mario.GfxLayer1.NumXPoss: 1 Mario.GfxLayer1.XPos1.Value: (31 - # % 32) * 8 Mario.GfxLayer1.NumYPoss: 1 Mario.GfxLayer1.YPos1.Value: (31 - # / 32) * 8 ############################################################################### # The second layer renders the sprites. # # The sprite RAM starts at 0x06900. There are 4 sequential bytes per # sprite and 96 sprites. The following describes the 4 bytes: # # 0 : Y Position & Enable. # 1 : bits 0-5 indicates sprite colour # bit 6 indicates vertical flip # bit 7 indicates horizontal flip # 2 : Sprite Number. # 3 : X Position. ############################################################################### Mario.GfxLayer2.Space: 1 Mario.GfxLayer2.GfxSet: 2 Mario.GfxLayer2.Palette: 1 Mario.GfxLayer2.ColourTable: 2 Mario.GfxLayer2.Clipping: 0,255,16,239 Mario.GfxLayer2.Transparency: On Mario.GfxLayer2.NumChars: 96 Mario.GfxLayer2.NumDirty: 1 Mario.GfxLayer2.Dirty1.Start: 0x06900 Mario.GfxLayer2.Dirty1.End: 0x06a7f Mario.GfxLayer2.Dirty1.CharsPerLoc: 1 Mario.GfxLayer2.Dirty1.Assign: # / 4 Mario.GfxLayer2.NumCharNums: 1 Mario.GfxLayer2.CharNum1.Value: @(0x6902 + 4 * #) Mario.GfxLayer2.NumColours: 1 Mario.GfxLayer2.Colour1.Value: \ (@(0x6901 + 4 * #) & 0x0f) + 0x10 * @0x10001 Mario.GfxLayer2.NumXPoss: 1 Mario.GfxLayer2.XPos1.Value: 248 - @(0x6903 + 4 * #) Mario.GfxLayer2.NumYPoss: 1 Mario.GfxLayer2.YPos1.Value: @(0x6900 + 4 * #) - 8 Mario.GfxLayer2.NumEnables: 1 Mario.GfxLayer2.Enable1.Value: @(0x6900 + 4 * #) Mario.GfxLayer2.NumHFlips: 1 Mario.GfxLayer2.HFlip1.Value: @(0x6901 + 4 * #) & 0x80 Mario.GfxLayer2.NumVFlips: 1 Mario.GfxLayer2.VFlip1.Value: @(0x6901 + 4 * #) & 0x40 # # Colour Palettes # Mario.NumPalettes: 1 Mario.Palette1.NumColours: 16 Mario.Palette1.MaxValue: 255 Mario.Palette1.Colour1.RGB: 0x00/0x00/0x00 Mario.Palette1.Colour2.RGB: 0xff/0xff/0xff Mario.Palette1.Colour3.RGB: 0xff/0x00/0x00 Mario.Palette1.Colour4.RGB: 0xff/0x00/0xff Mario.Palette1.Colour5.RGB: 0x00/0x00/0x7f Mario.Palette1.Colour6.RGB: 0x00/0xb4/0x00 Mario.Palette1.Colour7.RGB: 0xff/0x83/0x03 Mario.Palette1.Colour8.RGB: 0x00/0x00/0xff Mario.Palette1.Colour9.RGB: 0xff/0xff/0x00 Mario.Palette1.Colour10.RGB: 0x78/0x78/0xff Mario.Palette1.Colour11.RGB: 0x03/0xb4/0xef Mario.Palette1.Colour12.RGB: 0x00/0x50/0x00 Mario.Palette1.Colour13.RGB: 0x00/0xff/0x00 Mario.Palette1.Colour14.RGB: 0xa7/0x03/0x03 Mario.Palette1.Colour15.RGB: 0xff/0xb7/0x73 Mario.Palette1.Colour16.RGB: 0x00/0x7f/0x00 # # The colour lookup table. # Mario.NumColourTables: 2 Mario.ColourTable1.NumEntries: 128 Mario.ColourTable1.List: \ 0x00,0x07,0x01,0x00, 0x00,0x07,0x01,0x00, \ 0x00,0x07,0x01,0x00, 0x00,0x07,0x01,0x00, \ 0x00,0x0d,0x07,0x0e, 0x00,0x0d,0x0c,0x00, \ 0x00,0x0d,0x0c,0x0e, 0x00,0x0d,0x0c,0x00, \ 0x00,0x0d,0x02,0x01, 0x00,0x0d,0x02,0x01, \ 0x00,0x0d,0x02,0x01, 0x00,0x0d,0x02,0x01, \ 0x00,0x07,0x0a,0x01, 0x00,0x06,0x08,0x01, \ 0x00,0x06,0x08,0x01, 0x00,0x06,0x08,0x01, \ 0x00,0x07,0x01,0x00, 0x00,0x07,0x01,0x00, \ 0x00,0x07,0x01,0x00, 0x00,0x07,0x01,0x00, \ 0x00,0x0d,0x0c,0x00, 0x00,0x0d,0x0c,0x00, \ 0x00,0x0d,0x0c,0x00, 0x00,0x0d,0x0c,0x00, \ 0x00,0x0d,0x02,0x01, 0x00,0x0d,0x02,0x01, \ 0x00,0x0d,0x02,0x01, 0x00,0x0d,0x02,0x01, \ 0x00,0x06,0x08,0x01, 0x00,0x06,0x08,0x01, \ 0x00,0x06,0x08,0x01, 0x00,0x06,0x08,0x01 Mario.ColourTable2.NumEntries: 256 Mario.ColourTable2.List: \ 0x00,0x02,0x0c,0x0b,0x0f,0x05,0x01,0x00, \ 0x00,0x01,0x01,0x0d,0x0c,0x07,0x0e,0x0b, \ 0x00,0x01,0x01,0x0d,0x0a,0x07,0x0e,0x0b, \ 0x00,0x01,0x01,0x0d,0x02,0x0d,0x0e,0x0b, \ 0x00,0x0d,0x08,0x09,0x01,0x06,0x02,0x07, \ 0x00,0x04,0x08,0x09,0x01,0x0a,0x07,0x02, \ 0x00,0x04,0x08,0x09,0x01,0x0e,0x03,0x07, \ 0x00,0x0b,0x0c,0x09,0x01,0x05,0x0f,0x07, \ 0x00,0x0d,0x01,0x06,0x07,0x02,0x02,0x06, \ 0x00,0x0d,0x08,0x06,0x07,0x02,0x02,0x06, \ 0x00,0x01,0x0d,0x0d,0x07,0x02,0x0e,0x00, \ 0x00,0x01,0x0d,0x07,0x0c,0x07,0x0e,0x00, \ 0x00,0x01,0x02,0x05,0x01,0x0c,0x06,0x0b, \ 0x00,0x00,0x0d,0x02,0x02,0x0d,0x01,0x0d, \ 0x00,0x00,0x07,0x03,0x0a,0x05,0x01,0x03, \ 0x00,0x00,0x06,0x03,0x08,0x03,0x01,0x03, \ 0x00,0x01,0x0d,0x0d,0x07,0x02,0x0e,0x00, \ 0x00,0x01,0x0d,0x07,0x0c,0x07,0x0e,0x00, \ 0x00,0x01,0x01,0x0d,0x0a,0x07,0x0e,0x0b, \ 0x00,0x01,0x01,0x0d,0x02,0x0d,0x0e,0x0b, \ 0x00,0x0d,0x08,0x09,0x01,0x06,0x02,0x07, \ 0x00,0x04,0x08,0x09,0x01,0x0a,0x07,0x02, \ 0x00,0x04,0x08,0x09,0x01,0x0e,0x03,0x07, \ 0x00,0x0b,0x0c,0x09,0x01,0x05,0x0f,0x07, \ 0x00,0x01,0x00,0x07,0x00,0x0a,0x00,0x04, \ 0x00,0x0b,0x00,0x0a,0x00,0x01,0x00,0x07, \ 0x00,0x05,0x00,0x01,0x00,0x0b,0x00,0x0a, \ 0x00,0x0c,0x00,0x0b,0x00,0x05,0x00,0x01, \ 0x00,0x01,0x00,0x05,0x00,0x0c,0x00,0x0b, \ 0x00,0x04,0x00,0x0c,0x00,0x01,0x00,0x05, \ 0x00,0x07,0x00,0x01,0x00,0x04,0x00,0x0c, \ 0x00,0x0a,0x00,0x04,0x00,0x07,0x00,0x01