diff options
Diffstat (limited to 'src/mess/machine/amstrad.c')
-rw-r--r-- | src/mess/machine/amstrad.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 508ed6f2e82..2e7d5796894 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -2660,17 +2660,17 @@ READ8_MEMBER(amstrad_state::amstrad_psg_porta_read) { if(m_system_type != SYSTEM_GX4000) { - if((m_io_ctrltype->read_safe(0) == 1) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) + if(m_io_ctrltype && (m_io_ctrltype->read() == 1) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) { return m_amx_mouse_data; } - if((m_io_ctrltype->read_safe(0) == 2) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) + if(m_io_ctrltype && (m_io_ctrltype->read() == 2) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) { - return (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read_safe(0) & 0x80) | 0x7f; + return (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F] ? m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read() & 0x80 : 0) | 0x7f; } } - return m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read_safe(0) & 0xFF; + return m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F] ? m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read() : 0; } return 0xFF; } @@ -2705,14 +2705,14 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int) if(m_system_type != SYSTEM_GX4000) { // update AMX mouse inputs (normally done every 1/300th of a second) - if(m_io_ctrltype->read_safe(0) == 1) + if(m_io_ctrltype && m_io_ctrltype->read() == 1) { static UINT8 prev_x,prev_y; UINT8 data_x, data_y; m_amx_mouse_data = 0x0f; - data_x = m_io_mouse1->read_safe(0) & 0xff; - data_y = m_io_mouse2->read_safe(0) & 0xff; + data_x = m_io_mouse1 ? m_io_mouse1->read() : 0; + data_y = m_io_mouse2 ? m_io_mouse2->read() : 0; if(data_x > prev_x) m_amx_mouse_data &= ~0x08; @@ -2722,11 +2722,11 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int) m_amx_mouse_data &= ~0x02; if(data_y < prev_y) m_amx_mouse_data &= ~0x01; - m_amx_mouse_data |= (m_io_mouse3->read_safe(0) << 4); + m_amx_mouse_data |= ((m_io_mouse3 ? m_io_mouse3->read() : 0) << 4); prev_x = data_x; prev_y = data_y; - m_amx_mouse_data |= (m_io_kbrow[9]->read_safe(0) & 0x80); // DEL key + m_amx_mouse_data |= ((m_io_kbrow[9] ? m_io_kbrow[9]->read() : 0) & 0x80); // DEL key } } return 0xFF; |