Exemplo n.º 1
0
        private bool StepCallbackMesa()
        {
            bool stopExecution = _singleStepMesa;

            if (!_system.CP.IOPWait)
            {
                // Check for execution breakpoints
                int mesaPC = ((((_system.CP.RH[5] & 0xf) << 16) | _system.CP.ALU.R[5]) << 1) | (_system.CP.PC16 ? 1 : 0);
                if (BreakpointManager.TestBreakpoint(BreakpointProcessor.Mesa, BreakpointType.Execution, mesaPC))
                {
                    BeginInvoke(new StatusDelegate(RefreshPostExecution), String.Format("* Mesa Execution breakpoint hit at PC=0x{0:x6} *", mesaPC));
                    stopExecution = true;
                }
            }

            return(stopExecution);
        }
Exemplo n.º 2
0
        private bool StepCallback8085()
        {
            bool stopExecution = _singleStepIOP;

            // Check for execution breakpoints
            if (BreakpointManager.TestBreakpoint(BreakpointProcessor.IOP, BreakpointType.Execution, _system.IOP.CPU.PC))
            {
                BeginInvoke(new StatusDelegate(RefreshPostExecution), String.Format("* IOP Execution breakpoint hit at PC=${0:x4} *", _system.IOP.CPU.PC));
                stopExecution = true;
            }

            // IOP processor still running?
            if (_system.IOP.CPU.Halted)
            {
                BeginInvoke(new StatusDelegate(RefreshPostExecution), String.Format("* 8085 halted at PC=${0:x4} *", _system.IOP.CPU.PC));
                stopExecution = true;
            }

            return(stopExecution);
        }
Exemplo n.º 3
0
        private bool StepCallbackCP()
        {
            bool stopExecution = false;

            if (!_debugSpecificTask)
            {
                // Stop after every step
                stopExecution = _singleStepCP;
            }
            else
            {
                //
                // Stop only if the current task is the task we're debugging or we've exhausted our cycle count
                // waiting for the task to wake up again.
                //
                _stepCount++;

                stopExecution = _singleStepCP && (_system.CP.CurrentTask == _debugTask || _stepCount > 1000);

                if (_stepCount > 1000)
                {
                    BeginInvoke(new StatusDelegate(RefreshPostExecution), String.Format("Timeout waiting for task {0} to wake.", _debugTask));
                }
            }

            if (!_system.CP.IOPWait)
            {
                // Check for execution breakpoints
                int tpc = _system.CP.TPC[(int)_system.CP.CurrentTask];
                if (BreakpointManager.TestBreakpoint(BreakpointProcessor.CP, BreakpointType.Execution, (ushort)tpc))
                {
                    BeginInvoke(new StatusDelegate(RefreshPostExecution), String.Format("* CP Execution breakpoint hit at TPC=0x{0:x3} *", tpc));
                    stopExecution = true;
                }
            }

            return(stopExecution);
        }