From 9db9cc030074f35cb012f90ea6b09d55f34ffde5 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 3 Mar 2024 22:33:00 +0100 Subject: [PATCH] h8_adc: 2320 ADCR CKS1 is on bit 3, correct typo, h8s2320: does not have ICR registers, h8_intc: remove unneeded trampolines (maybe a leftover from the past when emumem didn't support it) --- src/devices/cpu/h8/h83217.h | 2 +- src/devices/cpu/h8/h8325.h | 2 +- src/devices/cpu/h8/h8_adc.cpp | 6 +++--- src/devices/cpu/h8/h8_intc.cpp | 20 -------------------- src/devices/cpu/h8/h8_intc.h | 4 ---- src/devices/cpu/h8/h8s2245.cpp | 3 +-- src/devices/cpu/h8/h8s2320.cpp | 5 +---- src/devices/cpu/h8/h8s2357.cpp | 3 +-- src/devices/cpu/h8/h8s2655.cpp | 6 ++---- src/devices/cpu/h8/swx00.cpp | 6 ++---- 10 files changed, 12 insertions(+), 45 deletions(-) diff --git a/src/devices/cpu/h8/h83217.h b/src/devices/cpu/h8/h83217.h index 9a6195aaf50..aba652de119 100644 --- a/src/devices/cpu/h8/h83217.h +++ b/src/devices/cpu/h8/h83217.h @@ -8,7 +8,7 @@ H8-300-based mcus. - Variant ROM RAM + Variant ROM RAM H8/3217 60K 2K H8/3216 48K 2K H8/3214 32K 1K diff --git a/src/devices/cpu/h8/h8325.h b/src/devices/cpu/h8/h8325.h index c046208b014..43c3a575ad6 100644 --- a/src/devices/cpu/h8/h8325.h +++ b/src/devices/cpu/h8/h8325.h @@ -8,7 +8,7 @@ H8-300-based mcus. - Variant ROM RAM + Variant ROM RAM H8/3257 60K 2K H8/3256 48K 2K H8/325 32K 1K diff --git a/src/devices/cpu/h8/h8_adc.cpp b/src/devices/cpu/h8/h8_adc.cpp index bab8bc6aa37..e88a0f015d2 100644 --- a/src/devices/cpu/h8/h8_adc.cpp +++ b/src/devices/cpu/h8/h8_adc.cpp @@ -368,12 +368,12 @@ int h8_adc_2320_device::conversion_time(bool first, bool poweron) { int tm; if(first) - if(m_adcr & 0x04) + if(m_adcr & 0x08) tm = m_adcsr & 0x08 ? 134 : 266; else - tm = m_adcsr & 0x08 ? 68 : 580; + tm = m_adcsr & 0x08 ? 68 : 530; else - if(m_adcr & 0x04) + if(m_adcr & 0x08) tm = m_adcsr & 0x08 ? 128 : 256; else tm = m_adcsr & 0x08 ? 64 : 512; diff --git a/src/devices/cpu/h8/h8_intc.cpp b/src/devices/cpu/h8/h8_intc.cpp index c84a0faa4a4..f599f5e93db 100644 --- a/src/devices/cpu/h8/h8_intc.cpp +++ b/src/devices/cpu/h8/h8_intc.cpp @@ -305,16 +305,6 @@ void h8h_intc_device::icr_w(offs_t offset, u8 data) logerror("icr %d = %02x\n", offset, data); } -u8 h8h_intc_device::icrc_r() -{ - return icr_r(2); -} - -void h8h_intc_device::icrc_w(u8 data) -{ - icr_w(2, data); -} - const int h8h_intc_device::vector_to_slot[64] = { -1, -1, -1, -1, -1, -1, -1, -1, // NMI at 7 -1, -1, -1, -1, 0, 1, 2, 2, // IRQ 0-3 @@ -371,16 +361,6 @@ void h8s_intc_device::ipr_w(offs_t offset, u8 data) logerror("ipr %d = %02x\n", offset, data); } -u8 h8s_intc_device::iprk_r() -{ - return ipr_r(10); -} - -void h8s_intc_device::iprk_w(u8 data) -{ - ipr_w(10, data); -} - u8 h8s_intc_device::iscrh_r() { return m_iscr >> 8; diff --git a/src/devices/cpu/h8/h8_intc.h b/src/devices/cpu/h8/h8_intc.h index 424137d7614..15fe2952f5f 100644 --- a/src/devices/cpu/h8/h8_intc.h +++ b/src/devices/cpu/h8/h8_intc.h @@ -98,8 +98,6 @@ public: void isr_w(u8 data); u8 icr_r(offs_t offset); void icr_w(offs_t offset, u8 data); - u8 icrc_r(); - void icrc_w(u8 data); protected: static const int vector_to_slot[]; @@ -125,8 +123,6 @@ public: u8 ipr_r(offs_t offset); void ipr_w(offs_t offset, u8 data); - u8 iprk_r(); - void iprk_w(u8 data); u8 iscrh_r(); void iscrh_w(u8 data); u8 iscrl_r(); diff --git a/src/devices/cpu/h8/h8s2245.cpp b/src/devices/cpu/h8/h8s2245.cpp index fe93cbca226..f03e2d77a92 100644 --- a/src/devices/cpu/h8/h8s2245.cpp +++ b/src/devices/cpu/h8/h8s2245.cpp @@ -73,8 +73,7 @@ void h8s2245_device::map(address_map &map) map(0xfffebd, 0xfffebd).w(m_porte, FUNC(h8_port_device::ddr_w)); map(0xfffebe, 0xfffebe).w(m_portf, FUNC(h8_port_device::ddr_w)); map(0xfffebf, 0xfffebf).w(m_portg, FUNC(h8_port_device::ddr_w)); - map(0xfffec0, 0xfffec1).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); - map(0xfffec2, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icrc_r), FUNC(h8s_intc_device::icrc_w)); + map(0xfffec0, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); map(0xffff2c, 0xffff2c).rw(m_intc, FUNC(h8s_intc_device::iscrh_r), FUNC(h8s_intc_device::iscrh_w)); map(0xffff2d, 0xffff2d).rw(m_intc, FUNC(h8s_intc_device::iscrl_r), FUNC(h8s_intc_device::iscrl_w)); map(0xffff2e, 0xffff2e).rw(m_intc, FUNC(h8s_intc_device::ier_r), FUNC(h8s_intc_device::ier_w)); diff --git a/src/devices/cpu/h8/h8s2320.cpp b/src/devices/cpu/h8/h8s2320.cpp index b853310a79e..8b22d7ebd9c 100644 --- a/src/devices/cpu/h8/h8s2320.cpp +++ b/src/devices/cpu/h8/h8s2320.cpp @@ -133,10 +133,7 @@ void h8s2320_device::map(address_map &map) map(0xfffebd, 0xfffebd).w(m_porte, FUNC(h8_port_device::ddr_w)); map(0xfffebe, 0xfffebe).w(m_portf, FUNC(h8_port_device::ddr_w)); map(0xfffebf, 0xfffebf).w(m_portg, FUNC(h8_port_device::ddr_w)); - map(0xfffec0, 0xfffec1).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); - map(0xfffec2, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icrc_r), FUNC(h8s_intc_device::icrc_w)); - map(0xfffec4, 0xfffecd).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); - map(0xfffece, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::iprk_r), FUNC(h8s_intc_device::iprk_w)); + map(0xfffec4, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); if(type() != H8S2321) { map(0xfffee0, 0xfffee1).rw(m_dma0, FUNC(h8s_dma_channel_device::marah_r), FUNC(h8s_dma_channel_device::marah_w)); diff --git a/src/devices/cpu/h8/h8s2357.cpp b/src/devices/cpu/h8/h8s2357.cpp index b8378575c84..73a9a8f06ea 100644 --- a/src/devices/cpu/h8/h8s2357.cpp +++ b/src/devices/cpu/h8/h8s2357.cpp @@ -111,8 +111,7 @@ void h8s2357_device::map(address_map &map) map(0xfffebd, 0xfffebd).w(m_porte, FUNC(h8_port_device::ddr_w)); map(0xfffebe, 0xfffebe).w(m_portf, FUNC(h8_port_device::ddr_w)); map(0xfffebf, 0xfffebf).w(m_portg, FUNC(h8_port_device::ddr_w)); - map(0xfffec4, 0xfffecd).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); - map(0xfffece, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::iprk_r), FUNC(h8s_intc_device::iprk_w)); + map(0xfffec4, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); map(0xfffee0, 0xfffee1).rw(m_dma0, FUNC(h8s_dma_channel_device::marah_r), FUNC(h8s_dma_channel_device::marah_w)); map(0xfffee2, 0xfffee3).rw(m_dma0, FUNC(h8s_dma_channel_device::maral_r), FUNC(h8s_dma_channel_device::maral_w)); map(0xfffee4, 0xfffee5).rw(m_dma0, FUNC(h8s_dma_channel_device::ioara_r), FUNC(h8s_dma_channel_device::ioara_w)); diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp index 54a644ded06..ba2423ce859 100644 --- a/src/devices/cpu/h8/h8s2655.cpp +++ b/src/devices/cpu/h8/h8s2655.cpp @@ -88,10 +88,8 @@ void h8s2655_device::map(address_map &map) map(0xfffebd, 0xfffebd).w(m_porte, FUNC(h8_port_device::ddr_w)); map(0xfffebe, 0xfffebe).w(m_portf, FUNC(h8_port_device::ddr_w)); map(0xfffebf, 0xfffebf).w(m_portg, FUNC(h8_port_device::ddr_w)); - map(0xfffec0, 0xfffec1).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); - map(0xfffec2, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icrc_r), FUNC(h8s_intc_device::icrc_w)); - map(0xfffec4, 0xfffecd).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); - map(0xfffece, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::iprk_r), FUNC(h8s_intc_device::iprk_w)); + map(0xfffec0, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); + map(0xfffec4, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); map(0xfffee0, 0xfffee1).rw(m_dma0, FUNC(h8s_dma_channel_device::marah_r), FUNC(h8s_dma_channel_device::marah_w)); map(0xfffee2, 0xfffee3).rw(m_dma0, FUNC(h8s_dma_channel_device::maral_r), FUNC(h8s_dma_channel_device::maral_w)); diff --git a/src/devices/cpu/h8/swx00.cpp b/src/devices/cpu/h8/swx00.cpp index c65a10e301c..7ddb1c85f10 100644 --- a/src/devices/cpu/h8/swx00.cpp +++ b/src/devices/cpu/h8/swx00.cpp @@ -81,10 +81,8 @@ void swx00_device::map(address_map &map) map(0xfffebd, 0xfffebd).w(m_porte, FUNC(h8_port_device::ddr_w)); map(0xfffebe, 0xfffebe).w(m_portf, FUNC(h8_port_device::ddr_w)); map(0xfffebf, 0xfffebf).w(m_portg, FUNC(h8_port_device::ddr_w)); - map(0xfffec0, 0xfffec1).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); - map(0xfffec2, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icrc_r), FUNC(h8s_intc_device::icrc_w)); - map(0xfffec4, 0xfffecd).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); - map(0xfffece, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::iprk_r), FUNC(h8s_intc_device::iprk_w)); + map(0xfffec0, 0xfffec2).rw(m_intc, FUNC(h8s_intc_device::icr_r), FUNC(h8s_intc_device::icr_w)); + map(0xfffec4, 0xfffece).rw(m_intc, FUNC(h8s_intc_device::ipr_r), FUNC(h8s_intc_device::ipr_w)); map(0xfffee0, 0xfffee1).rw(m_dma0, FUNC(h8s_dma_channel_device::marah_r), FUNC(h8s_dma_channel_device::marah_w)); map(0xfffee2, 0xfffee3).rw(m_dma0, FUNC(h8s_dma_channel_device::maral_r), FUNC(h8s_dma_channel_device::maral_w));