コード例 #1
0
ファイル: mfmhd.cpp プロジェクト: Chintiger/mame
void mfm_harddisk_device::device_start()
{
	m_index_timer = timer_alloc(INDEX_TM);
	m_spinup_timer = timer_alloc(SPINUP_TM);
	m_seek_timer = timer_alloc(SEEK_TM);
	m_cache_timer = timer_alloc(CACHE_TM);

	m_rev_time = attotime::from_hz(m_rpm/60);
	m_index_timer->adjust(attotime::from_hz(m_rpm/60), 0, attotime::from_hz(m_rpm/60));

	m_current_cylinder = m_landing_zone; // Park position
	m_spinup_timer->adjust(attotime::from_msec(m_spinupms));

	m_cache = global_alloc(mfmhd_trackimage_cache(machine()));

	// In 5 second periods, check whether the cache has dirty lines
	m_cache_timer->adjust(attotime::from_msec(5000), 0, attotime::from_msec(5000));
}
コード例 #2
0
ファイル: mfmhd.cpp プロジェクト: Robbbert/store1
void mfm_harddisk_device::device_start()
{
    m_index_timer = timer_alloc(INDEX_TM);
    m_spinup_timer = timer_alloc(SPINUP_TM);
    m_seek_timer = timer_alloc(SEEK_TM);
    m_cache_timer = timer_alloc(CACHE_TM);

    m_rev_time = attotime::from_hz(m_rpm/60);
    m_index_timer->adjust(attotime::from_hz(m_rpm/60), 0, attotime::from_hz(m_rpm/60));

    m_current_cylinder = m_landing_zone; // Park position
    m_spinup_timer->adjust(attotime::from_msec(m_spinupms));

    m_cache = global_alloc(mfmhd_trackimage_cache(machine()));

    // In 5 second periods, check whether the cache has dirty lines
    m_cache_timer->adjust(attotime::from_msec(5000), 0, attotime::from_msec(5000));

    save_item(NAME(m_max_cylinders));
    save_item(NAME(m_phys_cylinders));
    save_item(NAME(m_actual_cylinders));
    save_item(NAME(m_max_heads));
    save_item(NAME(m_landing_zone));
    save_item(NAME(m_precomp_cyl));
    save_item(NAME(m_redwc_cyl));
    save_item(NAME(m_maxseek_time));
    save_item(NAME(m_seeknext_time));
    save_item(NAME(m_cell_size));
    save_item(NAME(m_trackimage_size));
    save_item(NAME(m_spinupms));
    save_item(NAME(m_rpm));
    save_item(NAME(m_interleave));
    save_item(NAME(m_cachelines));
    save_item(NAME(m_ready));
    save_item(NAME(m_current_cylinder));
    save_item(NAME(m_current_head));
    save_item(NAME(m_track_delta));
    save_item(NAME(m_step_phase));
    save_item(NAME(m_seek_complete));
    save_item(NAME(m_seek_inward));
    save_item(NAME(m_autotruncation));
    save_item(NAME(m_recalibrated));
    save_item(NAME(m_spinup_time));
}