diff options
author | 2019-08-13 23:01:01 -0400 | |
---|---|---|
committer | 2019-08-13 23:01:01 -0400 | |
commit | 38a617583e2c3fd72cdceb42261bb0348ea0ba3d (patch) | |
tree | 70c9be5abcd5ceb52e7c5c52dd5a49feed1921c7 | |
parent | 091f89c750ef3fc5e81a202141fa38648306a031 (diff) |
mc68hc11: Add another register stub; remove vestigial declaration (nw)
-rw-r--r-- | src/devices/cpu/mc68hc11/mc68hc11.cpp | 20 | ||||
-rw-r--r-- | src/devices/cpu/mc68hc11/mc68hc11.h | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.cpp b/src/devices/cpu/mc68hc11/mc68hc11.cpp index c5ec9a1773a..d547c29e598 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.cpp +++ b/src/devices/cpu/mc68hc11/mc68hc11.cpp @@ -160,23 +160,35 @@ uint8_t mc68hc11_cpu_device::pioc_r() return 0; } +uint8_t mc68hc11_cpu_device::pactl_r() +{ + return m_pactl; +} + +void mc68hc11_cpu_device::pactl_w(uint8_t data) +{ + m_pactl = data & 0x73; +} + uint8_t mc68hc11a1_device::pactl_r() { - return ddr_r<0>() & 0x80; + return (ddr_r<0>() & 0x80) | mc68hc11_cpu_device::pactl_r(); } void mc68hc11a1_device::pactl_w(uint8_t data) { + mc68hc11_cpu_device::pactl_w(data & 0x73); ddr_w<0>((data & 0x80) | 0x78); } uint8_t mc68hc11d0_device::pactl_r() { - return ddr_r<0>() & 0x88; + return (ddr_r<0>() & 0x88) | mc68hc11_cpu_device::pactl_r(); } void mc68hc11d0_device::pactl_w(uint8_t data) { + mc68hc11_cpu_device::pactl_w(data & 0x73); ddr_w<0>((data & 0x88) | 0x70); } @@ -411,6 +423,7 @@ void mc68hc11k1_device::io_map(address_map &map) map(0x22, 0x22).rw(FUNC(mc68hc11k1_device::tmsk1_r), FUNC(mc68hc11k1_device::tmsk1_w)); // TMSK1 map(0x23, 0x23).rw(FUNC(mc68hc11k1_device::tflg1_r), FUNC(mc68hc11k1_device::tflg1_w)); // TFLG1 map(0x24, 0x24).w(FUNC(mc68hc11k1_device::tmsk2_w)); // TMSK2 + map(0x26, 0x26).rw(FUNC(mc68hc11k1_device::pactl_r), FUNC(mc68hc11k1_device::pactl_w)); // PACTL map(0x28, 0x28).r(FUNC(mc68hc11k1_device::spcr_r<0>)).nopw(); // SPCR map(0x29, 0x29).r(FUNC(mc68hc11k1_device::spsr_r<0>)).nopw(); // SPSR map(0x2a, 0x2a).rw(FUNC(mc68hc11k1_device::spdr_r<0>), FUNC(mc68hc11k1_device::spdr_w<0>)); // SPDR @@ -451,6 +464,7 @@ void mc68hc11m0_device::io_map(address_map &map) map(0x22, 0x22).rw(FUNC(mc68hc11m0_device::tmsk1_r), FUNC(mc68hc11m0_device::tmsk1_w)); // TMSK1 map(0x23, 0x23).rw(FUNC(mc68hc11m0_device::tflg1_r), FUNC(mc68hc11m0_device::tflg1_w)); // TFLG1 map(0x24, 0x24).w(FUNC(mc68hc11m0_device::tmsk2_w)); // TMSK2 + map(0x26, 0x26).rw(FUNC(mc68hc11m0_device::pactl_r), FUNC(mc68hc11m0_device::pactl_w)); // PACTL map(0x28, 0x28).r(FUNC(mc68hc11m0_device::spcr_r<0>)).nopw(); // SPCR1 map(0x29, 0x29).r(FUNC(mc68hc11m0_device::spsr_r<0>)).nopw(); // SPSR1 map(0x2a, 0x2a).rw(FUNC(mc68hc11m0_device::spdr_r<0>), FUNC(mc68hc11m0_device::spdr_w<0>)); // SPDR1 @@ -593,6 +607,7 @@ void mc68hc11_cpu_device::device_start() save_item(NAME(m_tcnt)); // save_item(NAME(m_por)); save_item(NAME(m_pr)); + save_item(NAME(m_pactl)); save_item(NAME(m_frc_base)); save_item(NAME(m_port_data)); save_item(NAME(m_port_dir)); @@ -657,6 +672,7 @@ void mc68hc11_cpu_device::device_reset() m_tcnt = 0xffff; // m_por = 1; // for first timer overflow / compare stuff m_pr = 3; // timer prescale + m_pactl = 0; m_frc_base = 0; std::fill(std::begin(m_port_dir), std::end(m_port_dir), 0x00); } diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h index 8623934bc2f..6452c20f8e3 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.h +++ b/src/devices/cpu/mc68hc11/mc68hc11.h @@ -85,6 +85,8 @@ protected: uint8_t tflg1_r(); void tflg1_w(uint8_t data); void tmsk2_w(uint8_t data); + uint8_t pactl_r(); + void pactl_w(uint8_t data); template <int N> uint8_t spcr_r(); template <int N> uint8_t spsr_r(); template <int N> uint8_t spdr_r(); @@ -163,6 +165,7 @@ private: uint16_t m_tcnt; // uint8_t m_por; uint8_t m_pr; + uint8_t m_pactl; uint64_t m_frc_base; @@ -181,7 +184,6 @@ private: ophandler hc11_optable_page4[256]; void ram_map(address_map &map); - void hc11_regs_w(uint32_t address, uint8_t value); uint8_t FETCH(); uint16_t FETCH16(); |