summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h83032.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h8/h83032.cpp')
-rw-r--r--src/devices/cpu/h8/h83032.cpp49
1 files changed, 31 insertions, 18 deletions
diff --git a/src/devices/cpu/h8/h83032.cpp b/src/devices/cpu/h8/h83032.cpp
index 8a560c1882f..a4f23f27f43 100644
--- a/src/devices/cpu/h8/h83032.cpp
+++ b/src/devices/cpu/h8/h83032.cpp
@@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(H83032, h83032_device, "h83032", "Hitachi H8/3032")
DEFINE_DEVICE_TYPE(H83031, h83031_device, "h83031", "Hitachi H8/3031")
DEFINE_DEVICE_TYPE(H83030, h83030_device, "h83030", "Hitachi H8/3030")
-h83032_device::h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) :
+h83032_device::h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 start) :
h8h_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83032_device::map), this)),
m_intc(*this, "intc"),
m_adc(*this, "adc"),
@@ -35,17 +35,17 @@ h83032_device::h83032_device(const machine_config &mconfig, device_type type, co
m_mode_a20 = true;
}
-h83032_device::h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+h83032_device::h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
h83032_device(mconfig, H83032, tag, owner, clock, 0xf710)
{
}
-h83031_device::h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+h83031_device::h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
h83032_device(mconfig, H83031, tag, owner, clock, 0xfb10)
{
}
-h83030_device::h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+h83030_device::h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
h83032_device(mconfig, H83030, tag, owner, clock, 0xfd10)
{
}
@@ -104,25 +104,25 @@ void h83032_device::map(address_map &map)
map(base | 0xffb3, base | 0xffb3).rw(m_sci[0], FUNC(h8_sci_device::tdr_r), FUNC(h8_sci_device::tdr_w));
map(base | 0xffb4, base | 0xffb4).rw(m_sci[0], FUNC(h8_sci_device::ssr_r), FUNC(h8_sci_device::ssr_w));
map(base | 0xffb5, base | 0xffb5).r(m_sci[0], FUNC(h8_sci_device::rdr_r));
- map(base | 0xffc0, base | 0xffc0).w(m_port1, FUNC(h8_port_device::ddr_w));
- map(base | 0xffc1, base | 0xffc1).w(m_port2, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffc0, base | 0xffc0).rw(m_port1, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
+ map(base | 0xffc1, base | 0xffc1).rw(m_port2, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffc2, base | 0xffc2).rw(m_port1, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffc3, base | 0xffc3).rw(m_port2, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
- map(base | 0xffc4, base | 0xffc4).w(m_port3, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffc4, base | 0xffc4).rw(m_port3, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffc6, base | 0xffc6).rw(m_port3, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
- map(base | 0xffc8, base | 0xffc8).w(m_port5, FUNC(h8_port_device::ddr_w));
- map(base | 0xffc9, base | 0xffc9).w(m_port6, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffc8, base | 0xffc8).rw(m_port5, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
+ map(base | 0xffc9, base | 0xffc9).rw(m_port6, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffca, base | 0xffca).rw(m_port5, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffcb, base | 0xffcb).rw(m_port6, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
- map(base | 0xffcd, base | 0xffcd).w(m_port8, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffcd, base | 0xffcd).rw(m_port8, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffce, base | 0xffce).rw(m_port7, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffcf, base | 0xffcf).rw(m_port8, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
- map(base | 0xffd0, base | 0xffd0).w(m_port9, FUNC(h8_port_device::ddr_w));
- map(base | 0xffd1, base | 0xffd1).w(m_porta, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffd0, base | 0xffd0).rw(m_port9, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
+ map(base | 0xffd1, base | 0xffd1).rw(m_porta, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffd2, base | 0xffd2).rw(m_port9, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffd3, base | 0xffd3).rw(m_porta, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
- map(base | 0xffd4, base | 0xffd4).w(m_portb, FUNC(h8_port_device::ddr_w));
- map(base | 0xffd5, base | 0xffd5).w(m_portc, FUNC(h8_port_device::ddr_w));
+ map(base | 0xffd4, base | 0xffd4).rw(m_portb, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
+ map(base | 0xffd5, base | 0xffd5).rw(m_portc, FUNC(h8_port_device::ff_r), FUNC(h8_port_device::ddr_w));
map(base | 0xffd6, base | 0xffd6).rw(m_portb, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffd7, base | 0xffd7).rw(m_portc, FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
map(base | 0xffd8, base | 0xffd8).rw(m_port2, FUNC(h8_port_device::pcr_r), FUNC(h8_port_device::pcr_w));
@@ -212,9 +212,9 @@ void h83032_device::interrupt_taken()
standard_irq_callback(m_intc->interrupt_taken(m_taken_irq_vector), m_NPC);
}
-void h83032_device::internal_update(uint64_t current_time)
+void h83032_device::internal_update(u64 current_time)
{
- uint64_t event_time = 0;
+ u64 event_time = 0;
add_event(event_time, m_adc->internal_update(current_time));
add_event(event_time, m_sci[0]->internal_update(current_time));
@@ -228,9 +228,22 @@ void h83032_device::internal_update(uint64_t current_time)
recompute_bcount(event_time);
}
+void h83032_device::notify_standby(int state)
+{
+ m_adc->notify_standby(state);
+ m_sci[0]->notify_standby(state);
+ m_timer16_0->notify_standby(state);
+ m_timer16_1->notify_standby(state);
+ m_timer16_2->notify_standby(state);
+ m_timer16_3->notify_standby(state);
+ m_timer16_4->notify_standby(state);
+ m_watchdog->notify_standby(state);
+}
+
void h83032_device::device_start()
{
h8h_device::device_start();
+ save_item(NAME(m_syscr));
}
void h83032_device::device_reset()
@@ -239,12 +252,12 @@ void h83032_device::device_reset()
m_syscr = 0x0b;
}
-uint8_t h83032_device::syscr_r()
+u8 h83032_device::syscr_r()
{
return m_syscr;
}
-void h83032_device::syscr_w(uint8_t data)
+void h83032_device::syscr_w(u8 data)
{
m_syscr = data;
update_irq_filter();