Example #1
0
		public void HardReset()
		{
			// configure CPU defaults
			cpu.Reset();
			cpu.FlagI = true;
			cpu.BCD_Enabled = true;
			if (ReadMemory != null)
				cpu.PC = (ushort)(ReadMemory(0x0FFFC) | (ReadMemory(0x0FFFD) << 8));

			// configure data port defaults
			port = new LatchedPort();
			port.Direction = 0x00;
			port.Latch = 0xFF;

			// NMI is high on startup (todo: verify)
			pinNMILast = true;
		}
Example #2
0
        public void HardReset()
        {
            // configure CPU defaults
            cpu.Reset();
            cpu.FlagI       = true;
            cpu.BCD_Enabled = true;
            if (ReadMemory != null)
            {
                cpu.PC = (ushort)(ReadMemory(0x0FFFC) | (ReadMemory(0x0FFFD) << 8));
            }

            // configure data port defaults
            port           = new LatchedPort();
            port.Direction = 0x00;
            port.Latch     = 0xFF;

            // NMI is high on startup (todo: verify)
            pinNMILast = true;
        }
Example #3
0
        // ------------------------------------

        public MOS6526(Region region)
        {
            chipRegion      = region;
            enableIntTimer  = new bool[2];
            intTimer        = new bool[2];
            timerDelay      = new int[2];
            timerInMode     = new InMode[2];
            timerOutMode    = new OutMode[2];
            timerPortEnable = new bool[2];
            timerPulse      = new bool[2];
            timerRunMode    = new RunMode[2];
            tod             = new byte[4];
            todAlarm        = new byte[4];
            SetTodIn(chipRegion);

            portA      = new LatchedPort();
            portB      = new LatchedPort();
            timer      = new int[2];
            timerLatch = new int[2];
            timerOn    = new bool[2];
            underflow  = new bool[2];

            pinSP = true;
        }
Example #4
0
		// ------------------------------------

		public MOS6526(Region region)
		{
			chipRegion = region;
			enableIntTimer = new bool[2];
			intTimer = new bool[2];
			timerDelay = new int[2];
			timerInMode = new InMode[2];
			timerOutMode = new OutMode[2];
			timerPortEnable = new bool[2];
			timerPulse = new bool[2];
			timerRunMode = new RunMode[2];
			tod = new byte[4];
			todAlarm = new byte[4];
			SetTodIn(chipRegion);

			portA = new LatchedPort();
			portB = new LatchedPort();
			timer = new int[2];
			timerLatch = new int[2];
			timerOn = new bool[2];
			underflow = new bool[2];

			pinSP = true;
		}