Previous 199869 Revisions Next

r20923 Monday 11th February, 2013 at 04:34:27 UTC by R. Belmont
(MESS) Some Super Serial Card cleanup for the new 6551 (nw)
[src/mess/machine]a2ssc.c a2ssc.h

trunk/src/mess/machine/a2ssc.c
r20922r20923
2626
2727
2828MACHINE_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))
3030MACHINE_CONFIG_END
3131
3232ROM_START( ssc )
r20922r20923
120120a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
121121      device_t(mconfig, A2BUS_SSC, "Apple Super Serial Card", tag, owner, clock),
122122      device_a2bus_card_interface(mconfig, *this),
123      m_dsw1(*this, "DSW1"),
124      m_dsw2(*this, "DSW2"),
123125      m_acia(*this, SSC_ACIA_TAG)
124126{
125127   m_shortname = "a2ssc";
r20922r20923
128130a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
129131      device_t(mconfig, type, name, tag, owner, clock),
130132      device_a2bus_card_interface(mconfig, *this),
133      m_dsw1(*this, "DSW1"),
134      m_dsw2(*this, "DSW2"),
131135      m_acia(*this, SSC_ACIA_TAG)
132136{
133137   m_shortname = "a2ssc";
r20922r20923
179183   switch (offset)
180184   {
181185      case 1:
182         return device().ioport("DSW1")->read();
186         return m_dsw1->read();
183187      case 2:
184         return device().ioport("DSW2")->read();
188         return m_dsw2->read();
185189
186190      case 8:
187191      case 9:
r20922r20923
211215
212216   }
213217}
218
219WRITE_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
trunk/src/mess/machine/a2ssc.h
r20922r20923
3131   virtual const rom_entry *device_rom_region() const;
3232   virtual ioport_constructor device_input_ports() const;
3333
34   required_ioport m_dsw1, m_dsw2;
35
36   DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
37
3438protected:
3539   virtual void device_start();
3640   virtual void device_reset();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team