コード例 #1
0
        //-------------------------------------------------
        //  interface_post_reset - work to be done after a
        //  device is reset
        //-------------------------------------------------
        public override void interface_post_reset()
        {
            // reset the interrupt vectors and queues
            for (int line = 0; line < m_input.Length; line++)
            {
                m_input[line].reset();
            }

            // reconfingure VBLANK interrupts
            if (!string.IsNullOrEmpty(m_vblank_interrupt_screen))
            {
                // get the screen that will trigger the VBLANK
                screen_device screen = device().siblingdevice <screen_device>(m_vblank_interrupt_screen);

                //assert(screen != NULL);
                screen.register_vblank_callback(on_vblank);
            }

            // reconfigure periodic interrupts
            if (m_timed_interrupt_period != attotime.zero)
            {
                attotime timedint_period = m_timed_interrupt_period;
                //assert(m_timedint_timer != NULL);
                m_timedint_timer.adjust(timedint_period, 0, timedint_period);
            }
        }
コード例 #2
0
        //-------------------------------------------------
        //  interface_post_reset - work to be done after a
        //  device is reset
        //-------------------------------------------------
        public override void interface_post_reset()
        {
            // reset the interrupt vectors and queues
            foreach (var elem in m_input)
            {
                elem.reset();
            }

            // reconfingure VBLANK interrupts
            if (!string.IsNullOrEmpty(m_vblank_interrupt_screen))
            {
                // get the screen that will trigger the VBLANK
                screen_device screen = device().siblingdevice <screen_device>(m_vblank_interrupt_screen);

                //throw new emu_unimplemented();
#if false
                assert(screen != nullptr);
#endif

                screen.register_vblank_callback(on_vblank);
            }

            // reconfigure periodic interrupts
            if (m_timed_interrupt_period != attotime.zero)
            {
                attotime timedint_period = m_timed_interrupt_period;

                //throw new emu_unimplemented();
#if false
                assert(m_timedint_timer != nullptr);
#endif

                m_timedint_timer.adjust(timedint_period, 0, timedint_period);
            }
        }