コード例 #1
0
        /***
         * \brief To be called after monitor parameters are set
         */
        public void start()
        {
            // FIXME: once moved to netlist this may no longer be necessary.
            //        Only copies constructor init

            m_last_sync_val   = 0.0;
            m_col             = new rgb_t(0, 0, 0);
            m_last_x          = 0;
            m_last_y          = 0;
            m_last_sync_time  = (fixedfreq_monitor_state_time_type)0;
            m_line_time       = (fixedfreq_monitor_state_time_type)0;
            m_last_hsync_time = (fixedfreq_monitor_state_time_type)0;
            m_last_vsync_time = (fixedfreq_monitor_state_time_type)0;

            /* sync separator */
            m_vsync_filter = 0.0;

            m_sig_vsync     = 0;
            m_sig_composite = 0;
            m_sig_field     = 0;

            // htotal = m_desc.m_hbackporch;
            // vtotal = m_desc.m_vbackporch;

            /* sync separator */

            //m_vsync_threshold = (exp(- 3.0/(3.0+3.0))) - exp(-1.0);
            //printf("trigger %f with len %f\n", m_vsync_threshold, 1e6 / m_vsync_filter_timeconst);
            // Minimum frame period to be passed to video system ?

            m_fragments.clear();

            m_intf.vsync_end_cb(m_desc.clock_period() * m_desc.vtotal() * m_desc.htotal());
        }
コード例 #2
0
        public void vsync_end_cb(double refresh_time)
        {
            var expected_frame_period = m_monitor.clock_period() * m_monitor.vtotal() * m_monitor.htotal();

            var refresh_limited = std.min(4.0 * expected_frame_period,
                                          std.max(refresh_time, 0.25 * expected_frame_period));

            rectangle visarea = new rectangle(m_monitor.minh(), m_monitor.maxh(), m_monitor.minv(), m_monitor.maxv());

            m_divideo.screen().configure(m_monitor.htotal_scaled(), m_monitor.vtotal(), visarea, DOUBLE_TO_ATTOSECONDS(refresh_limited));
            m_divideo.screen().reset_origin(m_state.m_last_y - (m_monitor.vsync_width() + m_monitor.vbackporch_width()), 0);
        }