示例#1
0
文件: i8257.cs 项目: kwanboy/mcs
        // device-level overrides
        protected override void device_start()
        {
            m_diexec = GetClassInterface <device_execute_interface_i8257>();


            LOG("{0}\n", "device_start"); //FUNCNAME);

            // set our instruction counter
            set_icountptr(m_icountRef);

            // resolve callbacks
            m_out_hrq_cb.resolve_safe();
            m_out_tc_cb.resolve_safe();
            m_in_memr_cb.resolve_safe(0);
            m_out_memw_cb.resolve_safe();
            foreach (var cb in m_in_ior_cb)
            {
                cb.resolve_safe(0);
            }
            foreach (var cb in m_out_iow_cb)
            {
                cb.resolve_safe();
            }
            foreach (var cb in m_out_dack_cb)
            {
                cb.resolve_safe();
            }

            // state saving
            save_item(m_msb, "m_msb");
            save_item(m_hreq, "m_hreq");
            save_item(m_hack, "m_hack");
            save_item(m_ready, "m_ready");
            save_item(m_state, "m_state");
            save_item(m_current_channel, "m_current_channel");
            save_item(m_last_channel, "m_last_channel");
            save_item(m_transfer_mode, "m_transfer_mode");
            save_item(m_status, "m_status");
            save_item(m_request, "m_request");

            save_item(m_channel[0].m_address, "m_channel[0].m_address");
            save_item(m_channel[0].m_count, "m_channel[0].m_count");
            save_item(m_channel[0].m_mode, "m_channel[0].m_mode");
            save_item(m_channel[1].m_address, "m_channel[1].m_address");
            save_item(m_channel[1].m_count, "m_channel[1].m_count");
            save_item(m_channel[1].m_mode, "m_channel[1].m_mode");
            save_item(m_channel[2].m_address, "m_channel[2].m_address");
            save_item(m_channel[2].m_count, "m_channel[2].m_count");
            save_item(m_channel[2].m_mode, "m_channel[2].m_mode");
            save_item(m_channel[3].m_address, "m_channel[3].m_address");
            save_item(m_channel[3].m_count, "m_channel[3].m_count");
            save_item(m_channel[3].m_mode, "m_channel[3].m_mode");
        }
示例#2
0
        // device-level overrides
        protected override void device_start()
        {
            m_diexec = GetClassInterface <device_execute_interface_i8257>();


            LOG("{0}\n", "device_start"); //FUNCNAME);

            // set our instruction counter
            set_icountptr(m_icount);

            // resolve callbacks
            m_out_hrq_cb.resolve_safe();
            m_out_tc_cb.resolve_safe();
            m_in_memr_cb.resolve_safe_u8(0);
            m_out_memw_cb.resolve_safe();
            m_in_ior_cb.resolve_all_safe_u8(0);
            m_out_iow_cb.resolve_all_safe();
            m_out_dack_cb.resolve_all_safe();

            // state saving
            save_item(NAME(new { m_msb }));
            save_item(NAME(new { m_hreq }));
            save_item(NAME(new { m_hack }));
            save_item(NAME(new { m_ready }));
            save_item(NAME(new { m_state }));
            save_item(NAME(new { m_current_channel }));
            save_item(NAME(new { m_last_channel }));
            save_item(NAME(new { m_transfer_mode }));
            save_item(NAME(new { m_status }));
            save_item(NAME(new { m_request }));

            //throw new emu_unimplemented();
#if false
            save_item(STRUCT_MEMBER(m_channel, m_address));
            save_item(STRUCT_MEMBER(m_channel, m_count));
            save_item(STRUCT_MEMBER(m_channel, m_mode));
#endif
        }