trunk/src/mame/drivers/ecoinf3.c
| r19665 | r19666 | |
| 27 | 27 | { |
| 28 | 28 | strobe_amount = 0; |
| 29 | 29 | strobe_addr = 0; |
| 30 | m_percent_mux = 0; |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | required_device<z180_device> m_maincpu; |
| r19665 | r19666 | |
| 38 | 39 | int strobe_addr; |
| 39 | 40 | int strobe_amount; |
| 40 | 41 | int m_optic_pattern; |
| 42 | int m_percent_mux; |
| 41 | 43 | |
| 42 | 44 | 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; } |
| 43 | 45 | DECLARE_READ8_MEMBER(ppi8255_intf_a_read_b) |
| r19665 | r19666 | |
| 102 | 104 | 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; } |
| 103 | 105 | DECLARE_READ8_MEMBER(ppi8255_intf_e_read_b) |
| 104 | 106 | { // 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 | } |
| 107 | 125 | return ret; |
| 126 | |
| 108 | 127 | } |
| 109 | 128 | |
| 110 | 129 | 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; } |
| r19665 | r19666 | |
| 224 | 243 | |
| 225 | 244 | DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_a_alpha_display); |
| 226 | 245 | 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; |
| 228 | 249 | |
| 250 | logerror("%04x - ppi8255_intf_e_write_c %02x (INPUT MUX?)\n", machine().device("maincpu")->safe_pcbase(), data); |
| 251 | } |
| 252 | |
| 229 | 253 | DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_a) { logerror("%04x - ppi8255_intf_f_write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); } |
| 230 | 254 | DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_b) { logerror("%04x - ppi8255_intf_f_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); } |
| 231 | 255 | DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_c) { logerror("%04x - ppi8255_intf_f_write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); } |
| r19665 | r19666 | |
| 559 | 583 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 560 | 584 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 561 | 585 | |
| 562 | | PORT_START("IN3") |
| 586 | PORT_START("PERKEY") |
| 563 | 587 | PORT_DIPNAME( 0x0f, 0x00, "% Key?" ) |
| 564 | 588 | PORT_DIPSETTING( 0x00, "0x00" ) |
| 565 | 589 | PORT_DIPSETTING( 0x01, "0x01" ) |
| r19665 | r19666 | |
| 577 | 601 | PORT_DIPSETTING( 0x0d, "0x0d" ) |
| 578 | 602 | PORT_DIPSETTING( 0x0e, "0x0e" ) |
| 579 | 603 | PORT_DIPSETTING( 0x0f, "None" ) |
| 580 | | |
| 581 | | PORT_DIPNAME( 0x10, 0x00, "IN3:10" ) |
| 604 | PORT_DIPNAME( 0x10, 0x10, "PER_KEY:10" ) |
| 582 | 605 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 583 | 606 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 584 | | PORT_DIPNAME( 0x20, 0x00, "IN3:20" ) |
| 607 | PORT_DIPNAME( 0x20, 0x20, "PER_KEY:20" ) |
| 585 | 608 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 586 | 609 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 587 | | PORT_DIPNAME( 0x40, 0x00, "IN3:40" ) |
| 610 | PORT_DIPNAME( 0x40, 0x40, "PER_KEY:40" ) |
| 588 | 611 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 589 | 612 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 590 | | PORT_DIPNAME( 0x80, 0x00, "IN3:80" ) |
| 613 | PORT_DIPNAME( 0x80, 0x80, "PER_KEY:80" ) |
| 591 | 614 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 592 | 615 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 593 | 616 | |
| 594 | | PORT_START("IN4") |
| 595 | | PORT_DIPNAME( 0x01, 0x01, "IN4:01" ) |
| 617 | PORT_START("BUTTONS") |
| 618 | PORT_DIPNAME( 0x01, 0x01, "BT:01" ) |
| 596 | 619 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 597 | 620 | 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?) |
| 598 | 637 | PORT_DIPNAME( 0x02, 0x02, "IN4:02" ) |
| 599 | 638 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 600 | 639 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |