示例#1
0
        public HSC7800(DeserializationContext input)
        {
            if (input == null)
                throw new ArgumentNullException("input");

            input.CheckVersion(1);
            ROM = input.ReadExpectedBytes(4096);
            SRAM = input.ReadRAM6116();
 
            Size = Mask = (ushort)ROM.Length;
            Mask--;
        }
示例#2
0
        public HSC7800(DeserializationContext input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            input.CheckVersion(1);
            ROM  = input.ReadExpectedBytes(4096);
            SRAM = input.ReadRAM6116();

            Size = Mask = (ushort)ROM.Length;
            Mask--;
        }
示例#3
0
        public HSC7800(byte[] hscRom, byte[] ram)
        {
            if (hscRom == null)
                throw new ArgumentNullException("hscRom");
            if (ram == null)
                throw new ArgumentNullException("ram");
            if (hscRom.Length != 4096)
                throw new ArgumentException("ROM size not 4096", "hscRom");

            ROM = hscRom;
            SRAM = new RAM6116(ram);

            Size = Mask = (ushort)ROM.Length;
            Mask--;
        }
        public Machine7800(Cart cart, Bios7800 bios, HSC7800 hsc, ILogger logger, int scanlines, int startl, int fHZ, int sRate, ReadOnlyMemory <uint> p)
            : base(logger, scanlines, startl, fHZ, sRate, p, 320)
        {
            Mem = new AddressSpace(this, 16, 6);  // 7800: 16bit, 64byte pages

            CPU = new M6502(this, 4);

            Maria = new Maria(this, scanlines);
            Mem.Map(0x0000, 0x0040, Maria);
            Mem.Map(0x0100, 0x0040, Maria);
            Mem.Map(0x0200, 0x0040, Maria);
            Mem.Map(0x0300, 0x0040, Maria);

            PIA = new PIA(this);
            Mem.Map(0x0280, 0x0080, PIA);
            Mem.Map(0x0480, 0x0080, PIA);
            Mem.Map(0x0580, 0x0080, PIA);

            RAM1 = new RAM6116();
            RAM2 = new RAM6116();
            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 = bios;
            HSC  = hsc;

            if (HSC != HSC7800.Default)
            {
                Mem.Map(0x1000, 0x800, HSC.SRAM);
                Mem.Map(0x3000, 0x1000, HSC);
                Logger.WriteLine("7800 Highscore Cartridge Installed");
            }

            Cart = cart;
            Mem.Map(0x4000, 0xc000, Cart);
        }
示例#5
0
        public HSC7800(byte[] hscRom, byte[] ram)
        {
            if (hscRom == null)
            {
                throw new ArgumentNullException("hscRom");
            }
            if (ram == null)
            {
                throw new ArgumentNullException("ram");
            }
            if (hscRom.Length != 4096)
            {
                throw new ArgumentException("ROM size not 4096", "hscRom");
            }

            ROM  = hscRom;
            SRAM = new RAM6116(ram);

            Size = Mask = (ushort)ROM.Length;
            Mask--;
        }
 public RAM6116 ReadRAM6116()
 {
     var ram6116 = new RAM6116(this);
     return ram6116;
 }
        public RAM6116 ReadRAM6116()
        {
            var ram6116 = new RAM6116(this);

            return(ram6116);
        }
示例#8
0
 public void Write(RAM6116 ram6116)
 {
     ram6116.GetObjectData(this);
 }
示例#9
0
 public void Write(RAM6116 ram6116)
 {
     ram6116.GetObjectData(this);
 }