mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
mc146818: 24/12 default setting (nw)
This commit is contained in:
parent
75d08240a5
commit
e763499ac7
@ -39,7 +39,8 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag,
|
||||
m_century_index(-1),
|
||||
m_epoch(0),
|
||||
m_use_utc(false),
|
||||
m_binary(false)
|
||||
m_binary(false),
|
||||
m_hour(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -52,7 +53,8 @@ mc146818_device::mc146818_device(const machine_config &mconfig, device_type type
|
||||
m_century_index(-1),
|
||||
m_epoch(0),
|
||||
m_use_utc(false),
|
||||
m_binary(false)
|
||||
m_binary(false),
|
||||
m_hour(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -205,6 +207,8 @@ void mc146818_device::nvram_default()
|
||||
|
||||
if(m_binary)
|
||||
m_data[0x0b] |= REG_B_DM;
|
||||
if(m_hour)
|
||||
m_data[0x0b] |= REG_B_24_12;
|
||||
|
||||
set_base_datetime();
|
||||
update_timer();
|
||||
|
@ -37,6 +37,9 @@
|
||||
#define MCFG_MC146818_BINARY(_bin) \
|
||||
downcast<mc146818_device *>(device)->set_binary(_bin);
|
||||
|
||||
#define MCFG_MC146818_24_12(_hour) \
|
||||
downcast<mc146818_device *>(device)->set_hour(_hour);
|
||||
|
||||
#define MCFG_MC146818_EPOCH(_epoch) \
|
||||
downcast<mc146818_device *>(device)->set_epoch(_epoch);
|
||||
|
||||
@ -59,6 +62,7 @@ public:
|
||||
void set_century_index(int century_index) { m_century_index = century_index; }
|
||||
void set_use_utc(bool use_utc) { m_use_utc = use_utc; }
|
||||
void set_binary(bool binary) { m_binary = binary; }
|
||||
void set_hour(bool hour) { m_hour = hour; }
|
||||
void set_epoch(int epoch) { m_epoch = epoch; }
|
||||
|
||||
// read/write access
|
||||
@ -174,7 +178,7 @@ private:
|
||||
|
||||
devcb_write_line m_write_irq;
|
||||
int m_century_index, m_epoch;
|
||||
bool m_use_utc, m_binary;
|
||||
bool m_use_utc, m_binary, m_hour;
|
||||
};
|
||||
|
||||
|
||||
|
@ -539,6 +539,7 @@ static MACHINE_CONFIG_START( pcd, pcd_state )
|
||||
MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic1", pic8259_device, ir7_w))
|
||||
MCFG_MC146818_BINARY(true)
|
||||
MCFG_MC146818_EPOCH(1900)
|
||||
MCFG_MC146818_24_12(true)
|
||||
|
||||
MCFG_DEVICE_ADD("keyboard", PCD_KEYBOARD, 0)
|
||||
MCFG_PCD_KEYBOARD_OUT_TX_HANDLER(DEVWRITELINE("usart2", mc2661_device, rx_w))
|
||||
|
Loading…
Reference in New Issue
Block a user