コード例 #1
0
        public Machine(byte[] appleIIe, byte[] diskIIRom)
        {
            Events   = new MachineEvents();
            Services = new MachineServices();

            Cpu         = new Cpu(this);
            Memory      = new Memory(this, appleIIe);
            Keyboard    = new Keyboard(this);
            GamePort    = new GamePort(this);
            Cassette    = new Cassette(this);
            Speaker     = new Speaker(this);
            Video       = new Video(this);
            NoSlotClock = new NoSlotClock(this);

            var emptySlot = new PeripheralCard(this);

            Slot1 = emptySlot;
            Slot2 = emptySlot;
            Slot3 = emptySlot;
            Slot4 = emptySlot;
            Slot5 = emptySlot;
            Slot6 = new DiskIIController(this, diskIIRom);
            Slot7 = emptySlot;

            Slots = new Collection <PeripheralCard> {
                null, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7
            };
            Components = new Collection <MachineComponent> {
                Cpu, Memory, Keyboard, GamePort, Cassette, Speaker, Video, NoSlotClock, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7
            };

            BootDiskII = Slots.OfType <DiskIIController>().Last();

            //Thread = new Thread(Run) { Name = "Machine" };
        }
コード例 #2
0
ファイル: Machine.cs プロジェクト: CadeLaRen/BizHawk
		public Machine(byte[] appleIIe, byte[] diskIIRom)
		{
			Events = new MachineEvents();

			Cpu = new Cpu(this);
			Memory = new Memory(this, appleIIe);
			Keyboard = new Keyboard(this);
			GamePort = new GamePort(this);
			Cassette = new Cassette(this);
			Speaker = new Speaker(this);
			Video = new Video(this);
			NoSlotClock = new NoSlotClock(this);

			var emptySlot = new PeripheralCard(this);
			Slot1 = emptySlot;
			Slot2 = emptySlot;
			Slot3 = emptySlot;
			Slot4 = emptySlot;
			Slot5 = emptySlot;
			Slot6 = new DiskIIController(this, diskIIRom);
			Slot7 = emptySlot;

			Slots = new List<PeripheralCard> { null, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7 };
			Components = new List<MachineComponent> { Cpu, Memory, Keyboard, GamePort, Cassette, Speaker, Video, NoSlotClock, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7 };

			BootDiskII = Slots.OfType<DiskIIController>().Last();
		}
コード例 #3
0
ファイル: Memory.cs プロジェクト: cas1993per/bizhawk
        public override void Initialize()
        {
            _keyboard = Machine.Keyboard;
            _gamePort = Machine.GamePort;
            _cassette = Machine.Cassette;
            _speaker = Machine.Speaker;
            _video = Machine.Video;
            _noSlotClock = Machine.NoSlotClock;

            // TODO: this is a lazy and more compicated way to do this
            _romInternalRegionC1CF = _appleIIe
                .Skip(0x100)
                .Take(_romInternalRegionC1CF.Length)
                .ToArray();

            _romRegionD0DF = _appleIIe
                .Skip(0x100 + _romInternalRegionC1CF.Length)
                .Take(_romRegionD0DF.Length)
                .ToArray();

            _romRegionE0FF = _appleIIe
                .Skip(0x100 + _romInternalRegionC1CF.Length + _romRegionD0DF.Length)
                .Take(_romRegionE0FF.Length)
                .ToArray();

            if ((ReadRomRegionE0FF(0xFBB3) == 0x06) && (ReadRomRegionE0FF(0xFBBF) == 0xC1))
            {
                Monitor = MonitorType.Standard;
            }
            else if ((ReadRomRegionE0FF(0xFBB3) == 0x06) && (ReadRomRegionE0FF(0xFBBF) == 0x00) && (ReadRomRegionE0FF(0xFBC0) == 0xE0))
            {
                Monitor = MonitorType.Enhanced;
            }
        }