コード例 #1
0
ファイル: Emulator.cs プロジェクト: gschizas/xnacpc
        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();
        }
コード例 #2
0
ファイル: PPI.cs プロジェクト: gschizas/xnacpc
        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();
        }