private AddressSpace CreateAndCheck(Machine m, int addrSpaceShift,
			int pageShift,
			int expectedAddrSpaceSize, int expectedPageSize,
			int expectedPageCount)
        {
            AddressSpace result = new AddressSpace(m, addrSpaceShift, pageShift);
            Assert.AreEqual(m, result.Machine);
            Assert.AreEqual(expectedAddrSpaceSize, result.AddrSpaceSize);
            Assert.AreEqual(expectedPageSize, result.PageSize);
            Assert.AreEqual(expectedPageCount, result.PageCount);
            return result;
        }
Пример #2
0
        public Machine2600(Cart c, InputAdapter ia, int slines, int startl, int fHZ, int sRate, int[] p)
            : base(ia, slines, startl, fHZ, sRate, p, 160)
        {
            mem = new AddressSpace(this, 13, 6);  // 2600: 13bit, 64byte pages

            cpu = new M6502(mem);
            cpu.RunClocksMultiple = 1;

            tia = new TIA(this);
            for (ushort i = 0; i < 0x1000; i += 0x100) {
                mem.Map(i, 0x0080, tia);
            }

            pia = new PIA(this);
            for (ushort i = 0x0080; i < 0x1000; i += 0x100) {
                mem.Map(i, 0x0080, pia);
            }

            mem.Map(0x1000, 0x1000, c);
        }
Пример #3
0
        public Machine7800(Cart c, InputAdapter ia, int slines, int startl, int fHZ, int sRate, int[] p)
            : base(ia, slines, startl, fHZ, sRate, p, 320)
        {
            mem = new AddressSpace(this, 16, 6);  // 7800: 16bit, 64byte pages

            cpu = new M6502(mem);
            cpu.RunClocksMultiple = 4;

            Maria = new Maria(this);
            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); // TODO : unsure about this one

            RAM1 = new RAM6116();
            mem.Map(0x1800, 0x0800, RAM1);

            RAM2 = new RAM6116();
            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

            // Insert the 7800 Highscore cartridge if requested
            if (EMU7800App.Instance.Settings.Use7800HSC) {
                HSC = new HSC7800();
                mem.Map(0x1000, 0x800, HSC.SRAM);
                mem.Map(0x3000, 0x1000, HSC);
                Trace.WriteLine("7800 Highscore Cartridge Installed");
            }

            Cart = c;
            mem.Map(0x4000, 0xc000, Cart);
        }
Пример #4
0
 public void Map(AddressSpace adrspc)
 {
     // Nothing to do.
 }
Пример #5
0
 public void Map(AddressSpace mem)
 {
     this.mem = mem;
 }
Пример #6
0
 public void Map(AddressSpace addressSpace)
 {
     // Nothing to do
 }
 public void Map(AddressSpace s)
 {
 }
Пример #8
0
 public void Map(AddressSpace mem)
 {
     ArgumentCheck.NotNull(mem, "mem");
     machine = mem.Machine;
 }
Пример #9
0
 public void Map(AddressSpace mem)
 {
 }