Previous 199869 Revisions Next

r19666 Tuesday 18th December, 2012 at 15:48:57 UTC by David Haywood
move work on ec_sphin (nw)
[src/mame/drivers]ecoinf3.c

trunk/src/mame/drivers/ecoinf3.c
r19665r19666
2727   {
2828      strobe_amount = 0;
2929      strobe_addr = 0;
30      m_percent_mux = 0;
3031   }
3132
3233   required_device<z180_device> m_maincpu;
r19665r19666
3839   int strobe_addr;
3940   int strobe_amount;
4041   int m_optic_pattern;
42   int m_percent_mux;
4143
4244   DECLARE_READ8_MEMBER(ppi8255_intf_a_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_a_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
4345   DECLARE_READ8_MEMBER(ppi8255_intf_a_read_b)
r19665r19666
102104   DECLARE_READ8_MEMBER(ppi8255_intf_e_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
103105   DECLARE_READ8_MEMBER(ppi8255_intf_e_read_b)
104106   {   // changing gives no % key error in sphinx
105      int ret = ioport("IN3")->read();
106      logerror("%04x - ppi8255_intf_e_(used)read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
107   
108      int ret;
109
110      if (m_percent_mux==1)
111      {
112         ret = ioport("PERKEY")->read();
113         logerror("%04x - ppi8255_intf_e_(used)read_b (PER KEY) %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
114      }
115      else if (m_percent_mux==0x80)
116      {
117         ret = ioport("BUTTONS")->read();
118         logerror("%04x - ppi8255_intf_e_(used)read_b (BUTTONS?) %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
119      }
120      else
121      {
122         ret = 0x00;
123         logerror("%04x - ppi8255_intf_e_(used)read_b (UNK MUX %02x) %02x\n", machine().device("maincpu")->safe_pcbase(), m_percent_mux, ret);
124      }
107125      return ret;
126
108127   }
109128
110129   DECLARE_READ8_MEMBER(ppi8255_intf_e_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
r19665r19666
224243
225244   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_a_alpha_display);
226245   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_b) { logerror("%04x - ppi8255_intf_e_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
227   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_c) { logerror("%04x - ppi8255_intf_e_write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
246   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_c)
247   {
248      m_percent_mux = data;
228249
250      logerror("%04x - ppi8255_intf_e_write_c %02x (INPUT MUX?)\n", machine().device("maincpu")->safe_pcbase(), data);
251   }
252
229253   DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_a) { logerror("%04x - ppi8255_intf_f_write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
230254   DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_b) { logerror("%04x - ppi8255_intf_f_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
231255   DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_c) { logerror("%04x - ppi8255_intf_f_write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
r19665r19666
559583   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
560584   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
561585
562   PORT_START("IN3")
586   PORT_START("PERKEY")
563587   PORT_DIPNAME( 0x0f, 0x00, "% Key?" )
564588   PORT_DIPSETTING(    0x00, "0x00" )
565589   PORT_DIPSETTING(    0x01, "0x01" )
r19665r19666
577601   PORT_DIPSETTING(    0x0d, "0x0d" )
578602   PORT_DIPSETTING(    0x0e, "0x0e" )
579603   PORT_DIPSETTING(    0x0f, "None" )
580
581   PORT_DIPNAME( 0x10, 0x00, "IN3:10" )
604   PORT_DIPNAME( 0x10, 0x10, "PER_KEY:10" )
582605   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
583606   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
584   PORT_DIPNAME( 0x20, 0x00, "IN3:20" )
607   PORT_DIPNAME( 0x20, 0x20, "PER_KEY:20" )
585608   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
586609   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
587   PORT_DIPNAME( 0x40, 0x00, "IN3:40" )
610   PORT_DIPNAME( 0x40, 0x40, "PER_KEY:40" )
588611   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
589612   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
590   PORT_DIPNAME( 0x80, 0x00, "IN3:80" )
613   PORT_DIPNAME( 0x80, 0x80, "PER_KEY:80" )
591614   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
592615   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
593616
594   PORT_START("IN4")
595   PORT_DIPNAME( 0x01, 0x01, "IN4:01" )
617   PORT_START("BUTTONS")
618   PORT_DIPNAME( 0x01, 0x01, "BT:01" )
596619   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
597620   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
621   PORT_DIPNAME( 0x02, 0x02, "BT:02" )
622   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
623   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
624   PORT_DIPNAME( 0x04, 0x04, "BT:04" )
625   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
626   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
627   PORT_DIPNAME( 0x08, 0x08, "BT:08" )
628   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
629   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
630   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
631   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
632   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
633   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // ?? advances through test items
634
635   PORT_START("IN4")
636   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) // causes various spins etc. (but also causes the whole thing to freak out?)
598637   PORT_DIPNAME( 0x02, 0x02, "IN4:02" )
599638   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
600639   PORT_DIPSETTING(    0x02, DEF_STR( On ) )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team