From 62424265439be6eaabe05f8c319cf698c5e87952 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Sun, 26 Feb 2023 13:52:34 +0100 Subject: pccard_sram: Fix write protect switch, remove unneeded function --- src/devices/machine/pccard_sram.cpp | 6 +++--- src/devices/machine/pccard_sram.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/devices/machine/pccard_sram.cpp b/src/devices/machine/pccard_sram.cpp index 317a8979b85..dcf7039c80a 100644 --- a/src/devices/machine/pccard_sram.cpp +++ b/src/devices/machine/pccard_sram.cpp @@ -37,7 +37,7 @@ static INPUT_PORTS_START( card ) PORT_DIPSETTING( 0x02, DEF_STR(Yes)) PORT_DIPSETTING( 0x00, DEF_STR(No)) PORT_DIPNAME(0x04, 0x04, "Write Protect") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, pccard_sram_device, write_protect_w) - PORT_DIPSETTING( 0x08, DEF_STR(No)) + PORT_DIPSETTING( 0x04, DEF_STR(No)) PORT_DIPSETTING( 0x00, DEF_STR(Yes)) INPUT_PORTS_END @@ -123,7 +123,7 @@ uint16_t pccard_sram_device::read_memory(offs_t offset, uint16_t mem_mask) void pccard_sram_device::write_memory(offs_t offset, uint16_t data, uint16_t mem_mask) { - if (m_card_detect && BIT(m_switches->read(), 3)) + if (m_card_detect && BIT(m_switches->read(), 2)) space(0).write_word(offset * 2, data, mem_mask); } @@ -143,7 +143,7 @@ void pccard_sram_device::write_reg(offs_t offset, uint16_t data, uint16_t mem_ma { LOGMASKED(LOG_ATTRIBUTE, "attribute memory w: %06x = %04x & %04x\n", offset, data, mem_mask); - if (m_card_detect && BIT(m_switches->read(), 3)) + if (m_card_detect && BIT(m_switches->read(), 2)) space(1).write_word(offset * 2, data & 0x00ff, mem_mask); } diff --git a/src/devices/machine/pccard_sram.h b/src/devices/machine/pccard_sram.h index c285e3d6d25..4cc6caac627 100644 --- a/src/devices/machine/pccard_sram.h +++ b/src/devices/machine/pccard_sram.h @@ -27,7 +27,6 @@ class pccard_sram_device : public device_pccard_interface { public: - void card_detect_w(int state) { m_slot->card_detect_w(state); } void battery_voltage_1_w(int state) { m_slot->battery_voltage_1_w(state); } void battery_voltage_2_w(int state) { m_slot->battery_voltage_2_w(state); } void write_protect_w(int state) { m_slot->write_protect_w(state); } -- cgit v1.2.3