public Emulator(Audio audio, TextureDisplay texture_display) { m_memory = new Memory(); m_processor = new CPU.Z80( m_memory.CPUWrite, m_memory.CPURead, OnIOWrite, OnIORead, OnInterruptAcknowledge, OnClock); m_gate_array = new GateArray(m_memory, m_processor); m_keyboard = new Keyboard(); m_crtc = new CRTC(m_gate_array); m_psg = new PSG(audio, m_keyboard); m_ppi = new PPI(m_crtc, m_gate_array, m_psg); m_monitor = new Monitor(texture_display, m_crtc, m_memory, m_gate_array); Reset(); }
public CRTC(GateArray gatearray) { // Implicitly hook up the gatearray to ourselves AddHSyncCallback(gatearray.OnHSync); AddVSyncCallback(gatearray.OnVSync); m_registers = new int[NUM_REGISTERS]; Reset(); }
public PPI(CRTC crtc, GateArray gatearray, PSG psg) { m_crtc = crtc; m_psg = psg; m_gatearray = gatearray; m_port_a = new PortState(); m_port_b = new PortState(); m_port_c_lower = new PortState(); m_port_c_upper = new PortState(); Reset(); }
public Monitor(TextureDisplay texture_display, CRTC crtc, Memory memory, GateArray gate_array) { m_texture_display = texture_display; m_crtc = crtc; m_memory = memory; m_gate_array = gate_array; m_pen_colours = new uint[GateArray.NUM_PEN_SETTINGS]; // Implicitly hookup the CRTC to the monitor. m_crtc.AddHSyncCallback(OnHSync); m_crtc.AddVSyncCallback(OnVSync); Reset(); }