mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
next: Setup the time [O. Galibert]
This commit is contained in:
parent
c0f68e4d6b
commit
2ea3637444
@ -301,6 +301,15 @@ mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag,
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_counter - set the counter at startup time
|
||||
//-------------------------------------------------
|
||||
|
||||
void mccs1850_device::set_counter(UINT32 value)
|
||||
{
|
||||
m_counter = value;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -336,7 +345,10 @@ void mccs1850_device::device_start()
|
||||
|
||||
void mccs1850_device::device_reset()
|
||||
{
|
||||
m_ram[REGISTER_STATUS] = 0x80 | STATUS_FTU;
|
||||
if(!m_counter)
|
||||
m_ram[REGISTER_STATUS] = 0x80 | STATUS_FTU;
|
||||
else
|
||||
m_ram[REGISTER_STATUS] = 0x80;
|
||||
m_ram[REGISTER_CONTROL] = 0x00;
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,9 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( por_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( test_w );
|
||||
|
||||
// For setting the time at startup
|
||||
void set_counter(UINT32 value);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -842,6 +842,10 @@ void next_state::machine_start()
|
||||
}
|
||||
|
||||
timer_tm = timer_alloc(0);
|
||||
|
||||
system_time systime;
|
||||
machine().base_datetime(systime);
|
||||
rtc->set_counter(systime.time);
|
||||
}
|
||||
|
||||
void next_state::machine_reset()
|
||||
|
Loading…
Reference in New Issue
Block a user