private void onClock(object sender, CyclesEventArgs e)
        {
            uint cycles = (ushort)e.CycleCount;

            if (!_wdgEnable)
            {
                return;
            }

            if (_currentCycles > cycles)
            {
                _currentCycles -= cycles;
                return;
            }

            cycles -= (ushort)_currentCycles;
            this.ResetCurrentCycles();
            _currentCycles -= cycles;

            if (!_intEnable)
            {
                return;
            }

            _interuptController.InteruptNotify(mToken);
        }//onClock
        private void ButtonPressPortNotify(object sender, ARMSim.Plugins.UIControls.BlueButtonEventArgs args)
        {
            Array.Clear(mLocs, 0, mLocs.Length);
            byte bits = (byte)(0x01 << (3 - args.XPos));

            mLocs[args.YPos] = (byte)(~bits & 0x0f);
            mInteruptController.InteruptNotify(mToken);
        }
        private void ButtonPressPortNotify(object sender, ARMSim.Plugins.UIControls.BlackButtonEventArgs args)
        {
            //0x04 left, 0x08 right
            uint value = mIOPorts.RequestRead(IOPorts.PortNumbers.EXTPND);

            if (args.Button == ARMSim.Plugins.UIControls.BlackButtons.BlackButtonEnum.Left)
            {
                value |= 0x0004;
                mIOPorts.RequestWrite(IOPorts.PortNumbers.EXTPND, value);
            }
            else
            {
                value |= 0x0008;
                mIOPorts.RequestWrite(IOPorts.PortNumbers.EXTPND, value);
            }
            mInteruptController.InteruptNotify(mToken);
        }
Beispiel #4
0
        }//onMemoryAccessWrite

        private void TimerFired(InteruptController.InterruptTokens notifyToken)
        {
            mInteruptController.InteruptNotify(notifyToken);
        }