mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Added support for default NVRAM in MCCS1850. [Curt Coder]
This commit is contained in:
parent
5a49af2303
commit
4b896b641d
@ -350,8 +350,6 @@ void mccs1850_device::device_start()
|
||||
|
||||
void mccs1850_device::device_reset()
|
||||
{
|
||||
memset(m_ram, 0xff, RAM_SIZE);
|
||||
|
||||
m_ram[REGISTER_STATUS] = 0x80 | STATUS_FTU;
|
||||
m_ram[REGISTER_CONTROL] = 0x00;
|
||||
}
|
||||
@ -390,6 +388,14 @@ void mccs1850_device::rtc_set_time(int year, int month, int day, int day_of_week
|
||||
void mccs1850_device::nvram_default()
|
||||
{
|
||||
memset(m_ram, 0xff, RAM_SIZE);
|
||||
|
||||
if (machine().region(tag()) != NULL)
|
||||
{
|
||||
UINT8 *nvram = machine().region(tag())->base();
|
||||
|
||||
// initialize NVRAM
|
||||
memcpy(m_ram, nvram, 0x20);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user