コード例 #1
0
 //-------------------------------------------------
 //  set_latch_written - helper to signal that latch
 //  has been written or has been read
 //-------------------------------------------------
 protected void set_latch_written(bool latch_written)
 {
     if (m_latch_written != latch_written)
     {
         m_latch_written = latch_written;
         m_data_pending_cb.op(latch_written ? 1 : 0);
     }
 }
コード例 #2
0
ファイル: m6502.cs プロジェクト: kwanboy/mcs
 protected override void device_reset()
 {
     inst_state      = STATE_RESET;
     inst_substate   = 0;
     inst_state_base = 0;
     nmi_state       = false;
     irq_state       = false;
     apu_irq_state   = false;
     irq_taken       = false;
     v_state         = false;
     sync            = false;
     sync_w.op(CLEAR_LINE);
     inhibit_interrupts = false;
 }
コード例 #3
0
ファイル: i8257.cs プロジェクト: kwanboy/mcs
 void set_hreq(int state)
 {
     LOG("{0}\n", "set_hreq");
     if (m_hreq != state)
     {
         m_out_hrq_cb.op(state);
         m_hreq = state;
     }
 }
コード例 #4
0
ファイル: i8257.cs プロジェクト: kwanboy/mcs
        void set_tc(int state)
        {
            LOG("{0}: {1}\n", "set_tc", state);
            if (m_tc != (state != 0))
            {
                m_out_tc_cb.op(state);

                m_tc = state != 0;
            }
        }
コード例 #5
0
ファイル: msm5205.cs プロジェクト: kwanboy/mcs
        // timer callback at VCK low edge on MSM5205 (at rising edge on MSM6585)
        void update_adpcm()
        {
            int val;
            int new_signal;

            // callback user handler and latch next data
            if (!m_vck_legacy_cb.isnull())
            {
                m_vck_legacy_cb.op(1);
            }

            // reset check at last hiedge of VCK
            if (m_reset)
            {
                new_signal = 0;
                m_step     = 0;
            }
            else
            {
                /* update signal */
                /* !! MSM5205 has internal 12bit decoding, signal width is 0 to 8191 !! */
                val        = m_data;
                new_signal = m_signal + m_diff_lookup[m_step * 16 + (val & 15)];

                if (new_signal > 2047)
                {
                    new_signal = 2047;
                }
                else if (new_signal < -2048)
                {
                    new_signal = -2048;
                }

                m_step += index_shift[val & 7];

                if (m_step > 48)
                {
                    m_step = 48;
                }
                else if (m_step < 0)
                {
                    m_step = 0;
                }
            }

            /* update when signal changed */
            if (m_signal != new_signal)
            {
                m_stream.update();
                m_signal = new_signal;
            }
        }
コード例 #6
0
ファイル: msm5205.cs プロジェクト: kwanboy/mcs
        protected override void device_timer(emu_timer timer, device_timer_id id, int param, object ptr)
        {
            switch (id)
            {
            case TIMER_VCK:
                m_vck = !m_vck;
                m_vck_cb.op(m_vck ? 1 : 0);
                if (!m_vck)
                {
                    m_capture_timer.adjust(attotime.from_nsec(15600));
                }
                break;

            case TIMER_ADPCM_CAPTURE:
                update_adpcm();
                break;
            }
        }
コード例 #7
0
ファイル: m6801.cs プロジェクト: kwanboy/mcs
        /*
         *  if change_pc() direccted these areas ,Call hd63701_trap_pc().
         *  'mode' is selected by the sense of p2.0,p2.1,and p2.3 at reset timming.
         *  mode 0,1,2,4,6 : $0000-$001f
         *  mode 5         : $0000-$001f,$0200-$efff
         *  mode 7         : $0000-$001f,$0100-$efff
         */

        void set_os3(int state)
        {
            LOG("OS3: {0}\n", state);

            m_out_sc2_func.op(state);
        }