예제 #1
0
        public AppleII(CoreComm comm, GameInfo game, byte[] rom, Settings settings)
        {
            GameInfoSet = new List<GameInfo>();

            var ser = new BasicServiceProvider(this);
            ServiceProvider = ser;
            CoreComm = comm;

            _disk1 = rom;
            RomSet.Add(rom);

            _appleIIRom = comm.CoreFileProvider.GetFirmware(
                SystemId, "AppleIIe", true, "The Apple IIe BIOS firmware is required");
            _diskIIRom = comm.CoreFileProvider.GetFirmware(
                SystemId, "DiskII", true, "The DiskII firmware is required");

            _machine = new Machine(_appleIIRom, _diskIIRom);

            _machine.BizInitialize();

            //make a writeable memory stream cloned from the rom.
            //for junk.dsk the .dsk is important because it determines the format from that
            InitDisk();

            //trace logger stuff
            Tracer = new TraceBuffer();
            ser.Register<ITraceable>(Tracer);

            InitSaveStates();
            SetupMemoryDomains();
            PutSettings(settings ?? new Settings());
        }