Beispiel #1
0
        public void Init(IDebuggable debugTarget)
        {
            if (debugTarget != m_spectrum)
            {
                if (m_spectrum != null)
                {
                    m_spectrum.UpdateState -= new EventHandler(spectrum_OnUpdateState);
                    m_spectrum.Breakpoint -= new EventHandler(spectrum_OnBreakpoint);
                }
                if (debugTarget != null)
                {
                    m_spectrum = debugTarget;
                    // ZEK +++
                    bus = ((ZXMAK2.Engine.VirtualMachine)m_spectrum).Spectrum.BusManager;
                    sprint_mmu = bus.FindDevice<SprinterMMU>();
                    sprint_ula = bus.FindDevice<SprinterULA>();
                    //pevo_bdi = bus.FindDevice(typeof(BDI)) as BDI;
                    // ZEK ---

                    m_dasmUtils = new DasmUtils(m_spectrum.CPU, new OnRDBUS(debugTarget.ReadMemory));
                    m_spectrum.UpdateState += new EventHandler(spectrum_OnUpdateState);
                    m_spectrum.Breakpoint += new EventHandler(spectrum_OnBreakpoint);
                }
            }
        }
Beispiel #2
0
        private void Init(IDebuggable debugTarget)
        {
            if (debugTarget != m_spectrum)
            {
                if (m_spectrum != null)
                {
                    m_spectrum.UpdateState -= new EventHandler(spectrum_OnUpdateState);
                    m_spectrum.Breakpoint  -= new EventHandler(spectrum_OnBreakpoint);
                }
                if (debugTarget != null)
                {
                    m_spectrum = debugTarget;
                    // ZEK +++
                    sprint_mmu = m_spectrum.Bus.FindDevice <SprinterMMU>();
                    sprint_ula = m_spectrum.Bus.FindDevice <SprinterULA>();
                    //pevo_bdi = m_spectrum.Bus.FindDevice(typeof(BDI)) as BDI;
                    // ZEK ---

                    m_dasmTool              = new DasmTool(debugTarget.ReadMemory);
                    m_timingTool            = new TimingTool(m_spectrum.CPU, debugTarget.ReadMemory);
                    m_spectrum.UpdateState += new EventHandler(spectrum_OnUpdateState);
                    m_spectrum.Breakpoint  += new EventHandler(spectrum_OnBreakpoint);
                }
            }
        }