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); } } }
public void Init(IDebuggable debugTarget) { if (debugTarget == m_spectrum) return; if (m_spectrum != null) { m_spectrum.UpdateState -= spectrum_OnUpdateState; m_spectrum.Breakpoint -= spectrum_OnBreakpoint; } if (debugTarget != null) { m_spectrum = debugTarget; m_dasmUtils = new DasmUtils(m_spectrum.CPU, debugTarget.ReadMemory); m_spectrum.UpdateState += spectrum_OnUpdateState; m_spectrum.Breakpoint += spectrum_OnBreakpoint; } }