예제 #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
        public GateArray(Memory memory, CPU.Z80 cpu)
        {
            m_memory = memory;
            m_cpu    = cpu;

            m_pen_colours = new int[NUM_PEN_SETTINGS];

            Reset();
        }