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)
This commit is contained in:
hap 2024-03-03 22:33:00 +01:00
parent 4a05adbd2f
commit 9db9cc0300
10 changed files with 12 additions and 45 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));