public Machine7800(DeserializationContext input, int[] palette, int scanlines) : base(input, palette) { input.CheckVersion(1); Mem = input.ReadAddressSpace(this, 16, 6); // 7800: 16bit, 64byte pages CPU = input.ReadM6502(this, 4); Maria = input.ReadMaria(this, scanlines); Mem.Map(0x0000, 0x0040, Maria); Mem.Map(0x0100, 0x0040, Maria); Mem.Map(0x0200, 0x0040, Maria); Mem.Map(0x0300, 0x0040, Maria); PIA = input.ReadPIA(this); Mem.Map(0x0280, 0x0080, PIA); Mem.Map(0x0480, 0x0080, PIA); Mem.Map(0x0580, 0x0080, PIA); RAM1 = input.ReadRAM6116(); RAM2 = input.ReadRAM6116(); Mem.Map(0x1800, 0x0800, RAM1); Mem.Map(0x2000, 0x0800, RAM2); Mem.Map(0x0040, 0x00c0, RAM2); // page 0 shadow Mem.Map(0x0140, 0x00c0, RAM2); // page 1 shadow Mem.Map(0x2800, 0x0800, RAM2); // shadow1 Mem.Map(0x3000, 0x0800, RAM2); // shadow2 Mem.Map(0x3800, 0x0800, RAM2); // shadow3 BIOS = input.ReadOptionalBios7800(); HSC = input.ReadOptionalHSC7800(); if (HSC != null) { Mem.Map(0x1000, 0x800, HSC.SRAM); Mem.Map(0x3000, 0x1000, HSC); } Cart = input.ReadCart(this); Mem.Map(0x4000, 0xc000, Cart); using_bios = input.ReadBoolean(); if (using_bios && BIOS != null) { Mem.Map((ushort)(0x10000 - BIOS.Size), BIOS.Size, BIOS); } }
public Machine2600(DeserializationContext input, int[] palette) : base(input, palette) { input.CheckVersion(1); Mem = input.ReadAddressSpace(this, 13, 6); // 2600: 13bit, 64byte pages CPU = input.ReadM6502(this, 1); TIA = input.ReadTIA(this); for (ushort i = 0; i < 0x1000; i += 0x100) { Mem.Map(i, 0x0080, TIA); } PIA = input.ReadPIA(this); for (ushort i = 0x0080; i < 0x1000; i += 0x100) { Mem.Map(i, 0x0080, PIA); } Cart = input.ReadCart(this); Mem.Map(0x1000, 0x1000, Cart); }
public Machine7800(DeserializationContext input, int[] palette, int scanlines) : base(input, palette) { input.CheckVersion(1); Mem = input.ReadAddressSpace(this, 16, 6); // 7800: 16bit, 64byte pages CPU = input.ReadM6502(this, 4); Maria = input.ReadMaria(this, scanlines); Mem.Map(0x0000, 0x0040, Maria); Mem.Map(0x0100, 0x0040, Maria); Mem.Map(0x0200, 0x0040, Maria); Mem.Map(0x0300, 0x0040, Maria); PIA = input.ReadPIA(this); Mem.Map(0x0280, 0x0080, PIA); Mem.Map(0x0480, 0x0080, PIA); Mem.Map(0x0580, 0x0080, PIA); RAM1 = input.ReadRAM6116(); RAM2 = input.ReadRAM6116(); Mem.Map(0x1800, 0x0800, RAM1); Mem.Map(0x2000, 0x0800, RAM2); Mem.Map(0x0040, 0x00c0, RAM2); // page 0 shadow Mem.Map(0x0140, 0x00c0, RAM2); // page 1 shadow Mem.Map(0x2800, 0x0800, RAM2); // shadow1 Mem.Map(0x3000, 0x0800, RAM2); // shadow2 Mem.Map(0x3800, 0x0800, RAM2); // shadow3 BIOS = input.ReadOptionalBios7800(); HSC = input.ReadOptionalHSC7800(); if (HSC != null) { Mem.Map(0x1000, 0x800, HSC.SRAM); Mem.Map(0x3000, 0x1000, HSC); } Cart = input.ReadCart(this); Mem.Map(0x4000, 0xc000, Cart); }