Exemplo n.º 1
0
void mc146818_device::nvram_default()
{
	// populate from a memory region if present
	if (m_region != NULL)
	{
		UINT32 bytes = m_region->bytes();

		if (bytes > data_size())
			bytes = data_size();

		memcpy(&m_data[0], m_region->base(), bytes);
	}
	else
	{
		memset(&m_data[0], 0, data_size());
	}

	if(m_binary)
		m_data[REG_B] |= REG_B_DM;
	if(m_hour)
		m_data[REG_B] |= REG_B_24_12;

	set_base_datetime();
	update_timer();
	update_irq();
}
Exemplo n.º 2
0
void mc146818_device::nvram_read(emu_file &file)
{
	file.read(m_data, data_size());

	set_base_datetime();
	update_timer();
	update_irq();
}
Exemplo n.º 3
0
void mc146818_device::device_start()
{
	m_last_refresh = m_machine.time();
	emu_timer *timer = timer_alloc();
	if (m_config.m_type == mc146818_device_config::MC146818_UTC) {
		// hack: for apollo we increase the update frequency to stay in sync with real time
		timer->adjust(attotime::from_hz(2), 0, attotime::from_hz(2));
	} else {
		timer->adjust(attotime::from_hz(1), 0, attotime::from_hz(1));
	}
	set_base_datetime();
}
Exemplo n.º 4
0
void mc146818_device::device_start()
{
	m_last_refresh = machine().time();
	m_clock_timer = timer_alloc(TIMER_CLOCK);
	m_periodic_timer = timer_alloc(TIMER_PERIODIC);

	memset(m_data, 0, sizeof(m_data));

	m_clock_timer->adjust(attotime::from_hz(1), 0, attotime::from_hz(1));

	m_periodic_timer->adjust(attotime::never);
	m_period = attotime::never;

	set_base_datetime();

	m_out_irq_func.resolve(m_out_irq_cb, *this);
}
Exemplo n.º 5
0
void mc146818_device::nvram_default()
{
	// populate from a memory region if present
	if (m_region != NULL)
	{
		UINT32 bytes = m_region->bytes();

		if (bytes > data_size())
			bytes = data_size();

		memcpy(m_data, m_region->base(), bytes);
	}
	else
	{
		memset(m_data, 0, data_size());
	}

	set_base_datetime();
	update_timer();
	update_irq();
}
Exemplo n.º 6
0
void mc146818_device::device_start()
{
	m_last_refresh = machine().time();
	m_clock_timer = timer_alloc(TIMER_CLOCK);
	m_periodic_timer = timer_alloc(TIMER_PERIODIC);

	memset(m_data, 0, sizeof(m_data));

	if (m_type == MC146818_UTC) {
		// hack: for apollo we increase the update frequency to stay in sync with real time
		m_clock_timer->adjust(attotime::from_hz(2), 0, attotime::from_hz(2));
	} else {
		m_clock_timer->adjust(attotime::from_hz(1), 0, attotime::from_hz(1));
	}

	m_periodic_timer->adjust(attotime::never);
	m_period = attotime::never;

	set_base_datetime();

	m_out_irq_func.resolve(m_out_irq_cb, *this);
}
Exemplo n.º 7
0
void mc146818_device::nvram_read(emu_file &file)
{
	file.read(m_data, sizeof(m_data));
	set_base_datetime();
}
Exemplo n.º 8
0
void mc146818_device::nvram_default()
{
	set_base_datetime();
}