trunk/src/mess/machine/a2ssc.c
| r20922 | r20923 | |
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | MACHINE_CONFIG_FRAGMENT( ssc ) |
| 29 | | MCFG_MOS6551_ADD(SSC_ACIA_TAG, XTAL_1_8432MHz, NULL) |
| 29 | MCFG_MOS6551_ADD(SSC_ACIA_TAG, XTAL_1_8432MHz, DEVWRITELINE(DEVICE_SELF, a2bus_ssc_device, acia_irq_w)) |
| 30 | 30 | MACHINE_CONFIG_END |
| 31 | 31 | |
| 32 | 32 | ROM_START( ssc ) |
| r20922 | r20923 | |
| 120 | 120 | a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 121 | 121 | device_t(mconfig, A2BUS_SSC, "Apple Super Serial Card", tag, owner, clock), |
| 122 | 122 | device_a2bus_card_interface(mconfig, *this), |
| 123 | m_dsw1(*this, "DSW1"), |
| 124 | m_dsw2(*this, "DSW2"), |
| 123 | 125 | m_acia(*this, SSC_ACIA_TAG) |
| 124 | 126 | { |
| 125 | 127 | m_shortname = "a2ssc"; |
| r20922 | r20923 | |
| 128 | 130 | a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 129 | 131 | device_t(mconfig, type, name, tag, owner, clock), |
| 130 | 132 | device_a2bus_card_interface(mconfig, *this), |
| 133 | m_dsw1(*this, "DSW1"), |
| 134 | m_dsw2(*this, "DSW2"), |
| 131 | 135 | m_acia(*this, SSC_ACIA_TAG) |
| 132 | 136 | { |
| 133 | 137 | m_shortname = "a2ssc"; |
| r20922 | r20923 | |
| 179 | 183 | switch (offset) |
| 180 | 184 | { |
| 181 | 185 | case 1: |
| 182 | | return device().ioport("DSW1")->read(); |
| 186 | return m_dsw1->read(); |
| 183 | 187 | case 2: |
| 184 | | return device().ioport("DSW2")->read(); |
| 188 | return m_dsw2->read(); |
| 185 | 189 | |
| 186 | 190 | case 8: |
| 187 | 191 | case 9: |
| r20922 | r20923 | |
| 211 | 215 | |
| 212 | 216 | } |
| 213 | 217 | } |
| 218 | |
| 219 | WRITE_LINE_MEMBER( a2bus_ssc_device::acia_irq_w ) |
| 220 | { |
| 221 | if (!(m_dsw2->read() & 4)) |
| 222 | { |
| 223 | if (state) |
| 224 | { |
| 225 | raise_slot_irq(); |
| 226 | } |
| 227 | else |
| 228 | { |
| 229 | lower_slot_irq(); |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | |