trunk/src/mame/layout/gp_1.lay
| r31398 | r31399 | |
| 20 | 20 | </element> |
| 21 | 21 | <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 22 | 22 | <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 23 | <element name="P2"><text string="Players"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 23 | 24 | <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 24 | 25 | <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 25 | 26 | <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| r31398 | r31399 | |
| 36 | 37 | |
| 37 | 38 | <!-- Player 1 Score --> |
| 38 | 39 | |
| 39 | | <bezel name="digit0" element="digit"> |
| 40 | <bezel name="digit5" element="digit"> |
| 40 | 41 | <bounds left="10" top="45" right="44" bottom="84" /> |
| 41 | 42 | </bezel> |
| 42 | | <bezel name="digit1" element="digit"> |
| 43 | <bezel name="digit4" element="digit"> |
| 43 | 44 | <bounds left="54" top="45" right="88" bottom="84" /> |
| 44 | 45 | </bezel> |
| 45 | | <bezel name="digit2" element="digit"> |
| 46 | <bezel name="digit3" element="digit"> |
| 46 | 47 | <bounds left="98" top="45" right="132" bottom="84" /> |
| 47 | 48 | </bezel> |
| 48 | | <bezel name="digit3" element="digit"> |
| 49 | <bezel name="digit2" element="digit"> |
| 49 | 50 | <bounds left="142" top="45" right="176" bottom="84" /> |
| 50 | 51 | </bezel> |
| 51 | | <bezel name="digit4" element="digit"> |
| 52 | <bezel name="digit1" element="digit"> |
| 52 | 53 | <bounds left="186" top="45" right="220" bottom="84" /> |
| 53 | 54 | </bezel> |
| 54 | | <bezel name="digit5" element="digit"> |
| 55 | <bezel name="digit0" element="digit"> |
| 55 | 56 | <bounds left="230" top="45" right="264" bottom="84" /> |
| 56 | 57 | </bezel> |
| 57 | 58 | |
| 58 | 59 | <!-- Player 2 Score --> |
| 59 | | <bezel name="digit8" element="digit"> |
| 60 | <bezel name="digit13" element="digit"> |
| 60 | 61 | <bounds left="10" top="105" right="44" bottom="144" /> |
| 61 | 62 | </bezel> |
| 62 | | <bezel name="digit9" element="digit"> |
| 63 | <bezel name="digit12" element="digit"> |
| 63 | 64 | <bounds left="54" top="105" right="88" bottom="144" /> |
| 64 | 65 | </bezel> |
| 65 | | <bezel name="digit10" element="digit"> |
| 66 | <bezel name="digit11" element="digit"> |
| 66 | 67 | <bounds left="98" top="105" right="132" bottom="144" /> |
| 67 | 68 | </bezel> |
| 68 | | <bezel name="digit11" element="digit"> |
| 69 | <bezel name="digit10" element="digit"> |
| 69 | 70 | <bounds left="142" top="105" right="176" bottom="144" /> |
| 70 | 71 | </bezel> |
| 71 | | <bezel name="digit12" element="digit"> |
| 72 | <bezel name="digit9" element="digit"> |
| 72 | 73 | <bounds left="186" top="105" right="220" bottom="144" /> |
| 73 | 74 | </bezel> |
| 74 | | <bezel name="digit13" element="digit"> |
| 75 | <bezel name="digit8" element="digit"> |
| 75 | 76 | <bounds left="230" top="105" right="264" bottom="144" /> |
| 76 | 77 | </bezel> |
| 77 | 78 | |
| 78 | 79 | <!-- Player 3 Score --> |
| 79 | | <bezel name="digit16" element="digit"> |
| 80 | <bezel name="digit21" element="digit"> |
| 80 | 81 | <bounds left="10" top="165" right="44" bottom="204" /> |
| 81 | 82 | </bezel> |
| 82 | | <bezel name="digit17" element="digit"> |
| 83 | <bezel name="digit20" element="digit"> |
| 83 | 84 | <bounds left="54" top="165" right="88" bottom="204" /> |
| 84 | 85 | </bezel> |
| 85 | | <bezel name="digit18" element="digit"> |
| 86 | <bezel name="digit19" element="digit"> |
| 86 | 87 | <bounds left="98" top="165" right="132" bottom="204" /> |
| 87 | 88 | </bezel> |
| 88 | | <bezel name="digit19" element="digit"> |
| 89 | <bezel name="digit18" element="digit"> |
| 89 | 90 | <bounds left="142" top="165" right="176" bottom="204" /> |
| 90 | 91 | </bezel> |
| 91 | | <bezel name="digit20" element="digit"> |
| 92 | <bezel name="digit17" element="digit"> |
| 92 | 93 | <bounds left="186" top="165" right="220" bottom="204" /> |
| 93 | 94 | </bezel> |
| 94 | | <bezel name="digit21" element="digit"> |
| 95 | <bezel name="digit16" element="digit"> |
| 95 | 96 | <bounds left="230" top="165" right="264" bottom="204" /> |
| 96 | 97 | </bezel> |
| 97 | 98 | |
| 98 | 99 | <!-- Player 4 Score --> |
| 99 | | <bezel name="digit24" element="digit"> |
| 100 | <bezel name="digit29" element="digit"> |
| 100 | 101 | <bounds left="10" top="225" right="44" bottom="264" /> |
| 101 | 102 | </bezel> |
| 102 | | <bezel name="digit25" element="digit"> |
| 103 | <bezel name="digit28" element="digit"> |
| 103 | 104 | <bounds left="54" top="225" right="88" bottom="264" /> |
| 104 | 105 | </bezel> |
| 105 | | <bezel name="digit26" element="digit"> |
| 106 | <bezel name="digit27" element="digit"> |
| 106 | 107 | <bounds left="98" top="225" right="132" bottom="264" /> |
| 107 | 108 | </bezel> |
| 108 | | <bezel name="digit27" element="digit"> |
| 109 | <bezel name="digit26" element="digit"> |
| 109 | 110 | <bounds left="142" top="225" right="176" bottom="264" /> |
| 110 | 111 | </bezel> |
| 111 | | <bezel name="digit28" element="digit"> |
| 112 | <bezel name="digit25" element="digit"> |
| 112 | 113 | <bounds left="186" top="225" right="220" bottom="264" /> |
| 113 | 114 | </bezel> |
| 114 | | <bezel name="digit29" element="digit"> |
| 115 | <bezel name="digit24" element="digit"> |
| 115 | 116 | <bounds left="230" top="225" right="264" bottom="264" /> |
| 116 | 117 | </bezel> |
| 117 | 118 | |
| 118 | 119 | <!-- Credits and Balls --> |
| 119 | 120 | <bezel name="digit14" element="digit"> |
| 120 | | <bounds left="10" top="345" right="44" bottom="384" /> |
| 121 | <bounds left="39" top="345" right="73" bottom="384" /> |
| 121 | 122 | </bezel> |
| 122 | | <bezel name="digit15" element="digit"> |
| 123 | | <bounds left="54" top="345" right="88" bottom="384" /> |
| 124 | | </bezel> |
| 125 | 123 | <bezel name="digit6" element="digit"> |
| 126 | | <bounds left="186" top="345" right="220" bottom="384" /> |
| 124 | <bounds left="110" top="345" right="144" bottom="384" /> |
| 127 | 125 | </bezel> |
| 128 | | <bezel name="digit7" element="digit"> |
| 129 | | <bounds left="230" top="345" right="264" bottom="384" /> |
| 126 | <bezel name="digit30" element="digit"> |
| 127 | <bounds left="171" top="345" right="205" bottom="384" /> |
| 130 | 128 | </bezel> |
| 131 | | <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel> |
| 132 | | <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 129 | <bezel name="digit22" element="digit"> |
| 130 | <bounds left="210" top="345" right="244" bottom="384" /> |
| 131 | </bezel> |
| 132 | <bezel element="P2"><bounds left="100" right="158" top="330" bottom="342" /></bezel> |
| 133 | <bezel element="P1"><bounds left="200" right="258" top="330" bottom="342" /></bezel> |
| 134 | <bezel element="P0"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 133 | 135 | <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel> |
| 134 | 136 | <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel> |
| 135 | 137 | <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel> |
| 136 | 138 | <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel> |
| 137 | 139 | <bezel name="led0" element="red_led"> |
| 138 | | <bounds left="110" right="125" top="360" bottom="375" /></bezel> |
| 140 | <bounds left="10" right="25" top="360" bottom="375" /></bezel> |
| 139 | 141 | </view> |
| 140 | 142 | </mamelayout> |
trunk/src/mame/drivers/gp_1.c
| r31398 | r31399 | |
| 4 | 4 | Game Plan MPU-1 |
| 5 | 5 | These are "cocktail" cabinets, although there is only one seating position. |
| 6 | 6 | |
| 7 | ToDo: |
| 8 | - Player 4 score doesn't show |
| 9 | - Tens digit of credits doesn't show |
| 10 | - The machine awards 3 free credits per player at the start of ball 1. |
| 11 | - Nothing specific done with Family Fun / Star Trip, although they seem to work |
| 12 | just as well as the others. |
| 13 | |
| 7 | 14 | ********************************************************************************/ |
| 8 | 15 | |
| 9 | 16 | #include "machine/genpin.h" |
| r31398 | r31399 | |
| 11 | 18 | #include "cpu/z80/z80daisy.h" |
| 12 | 19 | #include "machine/i8255.h" |
| 13 | 20 | #include "machine/z80ctc.h" |
| 21 | #include "machine/nvram.h" |
| 14 | 22 | #include "gp_1.lh" |
| 15 | 23 | |
| 16 | 24 | class gp_1_state : public genpin_class |
| r31398 | r31399 | |
| 20 | 28 | : genpin_class(mconfig, type, tag) |
| 21 | 29 | , m_maincpu(*this, "maincpu") |
| 22 | 30 | , m_ctc(*this, "ctc") |
| 31 | , m_io_dsw0(*this, "DSW0") |
| 32 | , m_io_dsw1(*this, "DSW1") |
| 33 | , m_io_dsw2(*this, "DSW2") |
| 34 | , m_io_dsw3(*this, "DSW3") |
| 35 | , m_io_x7(*this, "X7") |
| 36 | , m_io_x8(*this, "X8") |
| 37 | , m_io_x9(*this, "X9") |
| 38 | , m_io_xa(*this, "XA") |
| 39 | , m_io_xb(*this, "XB") |
| 23 | 40 | { } |
| 24 | 41 | |
| 25 | 42 | DECLARE_DRIVER_INIT(gp_1); |
| r31398 | r31399 | |
| 30 | 47 | private: |
| 31 | 48 | UINT8 m_u14; |
| 32 | 49 | UINT8 m_digit; |
| 33 | | UINT8 m_segment; |
| 50 | UINT8 m_segment[16]; |
| 34 | 51 | virtual void machine_reset(); |
| 35 | 52 | required_device<cpu_device> m_maincpu; |
| 36 | 53 | required_device<z80ctc_device> m_ctc; |
| 54 | required_ioport m_io_dsw0; |
| 55 | required_ioport m_io_dsw1; |
| 56 | required_ioport m_io_dsw2; |
| 57 | required_ioport m_io_dsw3; |
| 58 | required_ioport m_io_x7; |
| 59 | required_ioport m_io_x8; |
| 60 | required_ioport m_io_x9; |
| 61 | required_ioport m_io_xa; |
| 62 | required_ioport m_io_xb; |
| 37 | 63 | }; |
| 38 | 64 | |
| 39 | 65 | |
| 40 | 66 | static ADDRESS_MAP_START( gp_1_map, AS_PROGRAM, 8, gp_1_state ) |
| 41 | 67 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 42 | | AM_RANGE(0x8c00, 0x8cff) AM_RAM |
| 68 | AM_RANGE(0x8c00, 0x8cff) AM_RAM AM_SHARE("nvram") |
| 43 | 69 | ADDRESS_MAP_END |
| 44 | 70 | |
| 45 | 71 | static ADDRESS_MAP_START( gp_1_io, AS_IO, 8, gp_1_state ) |
| r31398 | r31399 | |
| 50 | 76 | |
| 51 | 77 | static INPUT_PORTS_START( gp_1 ) |
| 52 | 78 | PORT_START("DSW0") |
| 53 | | PORT_DIPNAME( 0x01, 0x00, "S01") // S1-5: 32 combinations of coins/credits of coin slot 1. |
| 54 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 55 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 56 | | PORT_DIPNAME( 0x02, 0x02, "S02") |
| 57 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 58 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 59 | | PORT_DIPNAME( 0x04, 0x00, "S03") |
| 60 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 61 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 62 | | PORT_DIPNAME( 0x08, 0x00, "S04") |
| 63 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 64 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 65 | | PORT_DIPNAME( 0x10, 0x00, "S05") |
| 66 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 67 | | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| 79 | PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") |
| 80 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 |
| 81 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) |
| 82 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) |
| 83 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) |
| 84 | PORT_DIPSETTING( 0x05, DEF_STR( 2C_2C )) |
| 85 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C )) |
| 86 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C )) |
| 87 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C )) |
| 88 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_4C )) |
| 89 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C )) |
| 90 | PORT_DIPSETTING( 0x0b, DEF_STR( 2C_5C )) |
| 91 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C )) |
| 92 | PORT_DIPSETTING( 0x0d, DEF_STR( 2C_6C )) |
| 93 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_7C )) |
| 94 | PORT_DIPSETTING( 0x0f, DEF_STR( 2C_7C )) |
| 95 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) |
| 96 | PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) |
| 97 | PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) |
| 98 | PORT_DIPSETTING( 0x13, "2 coins 9 credits") |
| 99 | PORT_DIPSETTING( 0x14, "1 coin 10 credits") |
| 100 | PORT_DIPSETTING( 0x15, "2 coins 10 credits") |
| 101 | PORT_DIPSETTING( 0x16, "1 coin 11 credits") |
| 102 | PORT_DIPSETTING( 0x17, "2 coins 11 credits") |
| 103 | PORT_DIPSETTING( 0x18, "1 coin 12 credits") |
| 104 | PORT_DIPSETTING( 0x19, "2 coins 12 credits") |
| 105 | PORT_DIPSETTING( 0x1a, "1 coin 13 credits") |
| 106 | PORT_DIPSETTING( 0x1b, "2 coins 13 credits") |
| 107 | PORT_DIPSETTING( 0x1c, "1 coin 14 credits") |
| 108 | PORT_DIPSETTING( 0x1d, "2 coins 14 credits") |
| 109 | PORT_DIPSETTING( 0x1e, "1 coin 15 credits") |
| 110 | PORT_DIPSETTING( 0x1f, "2 coins 15 credits") |
| 68 | 111 | PORT_DIPNAME( 0x20, 0x00, "S06") |
| 69 | 112 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 70 | 113 | PORT_DIPSETTING( 0x20, DEF_STR( On )) |
| r31398 | r31399 | |
| 76 | 119 | PORT_DIPSETTING( 0x80, DEF_STR( On )) |
| 77 | 120 | |
| 78 | 121 | PORT_START("DSW1") |
| 79 | | PORT_DIPNAME( 0x01, 0x00, "S09") // S09-12 determine coinage for slot 2 |
| 80 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 81 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 82 | | PORT_DIPNAME( 0x02, 0x00, "S10") |
| 83 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 84 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 85 | | PORT_DIPNAME( 0x04, 0x00, "S11") |
| 86 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 87 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 88 | | PORT_DIPNAME( 0x08, 0x00, "S12") |
| 89 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 90 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 122 | PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2") // S09-12 determine coinage for slot 2 |
| 123 | PORT_DIPSETTING( 0x00, "Same as Slot 1") |
| 124 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C )) |
| 125 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C )) |
| 126 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C )) |
| 127 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C )) |
| 128 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_5C )) |
| 129 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_6C )) |
| 130 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_7C )) |
| 131 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C )) |
| 132 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_9C )) |
| 133 | PORT_DIPSETTING( 0x0a, "1 coin 10 credits") |
| 134 | PORT_DIPSETTING( 0x0b, "1 coin 11 credits") |
| 135 | PORT_DIPSETTING( 0x0c, "1 coin 12 credits") |
| 136 | PORT_DIPSETTING( 0x0d, "1 coin 13 credits") |
| 137 | PORT_DIPSETTING( 0x0e, "1 coin 14 credits") |
| 138 | PORT_DIPSETTING( 0x0f, "1 coin 15 credits") |
| 91 | 139 | PORT_DIPNAME( 0x10, 0x00, "S13") |
| 92 | 140 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 93 | 141 | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| r31398 | r31399 | |
| 102 | 150 | PORT_DIPSETTING( 0x80, DEF_STR( On )) |
| 103 | 151 | |
| 104 | 152 | PORT_START("DSW2") |
| 105 | | PORT_DIPNAME( 0x01, 0x00, "S17") // S17-21 coins for slot 3 |
| 106 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 107 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 108 | | PORT_DIPNAME( 0x02, 0x02, "S18") |
| 109 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 110 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 111 | | PORT_DIPNAME( 0x04, 0x00, "S19") |
| 112 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 113 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 114 | | PORT_DIPNAME( 0x08, 0x00, "S20") |
| 115 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 116 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 117 | | PORT_DIPNAME( 0x10, 0x00, "S21") |
| 118 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 119 | | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| 153 | PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3") |
| 154 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 |
| 155 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) |
| 156 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) |
| 157 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) |
| 158 | PORT_DIPSETTING( 0x05, DEF_STR( 2C_2C )) |
| 159 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C )) |
| 160 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C )) |
| 161 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C )) |
| 162 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_4C )) |
| 163 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C )) |
| 164 | PORT_DIPSETTING( 0x0b, DEF_STR( 2C_5C )) |
| 165 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C )) |
| 166 | PORT_DIPSETTING( 0x0d, DEF_STR( 2C_6C )) |
| 167 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_7C )) |
| 168 | PORT_DIPSETTING( 0x0f, DEF_STR( 2C_7C )) |
| 169 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) |
| 170 | PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) |
| 171 | PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) |
| 172 | PORT_DIPSETTING( 0x13, "2 coins 9 credits") |
| 173 | PORT_DIPSETTING( 0x14, "1 coin 10 credits") |
| 174 | PORT_DIPSETTING( 0x15, "2 coins 10 credits") |
| 175 | PORT_DIPSETTING( 0x16, "1 coin 11 credits") |
| 176 | PORT_DIPSETTING( 0x17, "2 coins 11 credits") |
| 177 | PORT_DIPSETTING( 0x18, "1 coin 12 credits") |
| 178 | PORT_DIPSETTING( 0x19, "2 coins 12 credits") |
| 179 | PORT_DIPSETTING( 0x1a, "1 coin 13 credits") |
| 180 | PORT_DIPSETTING( 0x1b, "2 coins 13 credits") |
| 181 | PORT_DIPSETTING( 0x1c, "1 coin 14 credits") |
| 182 | PORT_DIPSETTING( 0x1d, "2 coins 14 credits") |
| 183 | PORT_DIPSETTING( 0x1e, "1 coin 15 credits") |
| 184 | PORT_DIPSETTING( 0x1f, "2 coins 15 credits") |
| 120 | 185 | PORT_DIPNAME( 0x20, 0x00, "S22") |
| 121 | 186 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 122 | 187 | PORT_DIPSETTING( 0x20, DEF_STR( On )) |
| r31398 | r31399 | |
| 153 | 218 | PORT_DIPSETTING( 0xC0, "3") |
| 154 | 219 | |
| 155 | 220 | PORT_START("X7") |
| 156 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") |
| 221 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" |
| 157 | 222 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) |
| 158 | 223 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") |
| 159 | 224 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r31398 | r31399 | |
| 196 | 261 | switch (m_u14) |
| 197 | 262 | { |
| 198 | 263 | case 7: |
| 199 | | return ioport("X7")->read(); |
| 264 | return m_io_x7->read(); |
| 200 | 265 | case 8: |
| 201 | | return ioport("X8")->read(); |
| 266 | return m_io_x8->read(); |
| 202 | 267 | case 9: |
| 203 | | return ioport("X9")->read(); |
| 268 | return m_io_x9->read(); |
| 204 | 269 | case 10: |
| 205 | | return ioport("XA")->read(); |
| 270 | return m_io_xa->read(); |
| 206 | 271 | case 11: |
| 207 | | return ioport("XB")->read(); |
| 272 | return m_io_xb->read(); |
| 208 | 273 | case 12: |
| 209 | | return ioport("DSW0")->read(); |
| 274 | return m_io_dsw0->read(); |
| 210 | 275 | case 13: |
| 211 | | return ioport("DSW1")->read(); |
| 276 | return m_io_dsw1->read(); |
| 212 | 277 | case 14: |
| 213 | | return ioport("DSW2")->read(); |
| 278 | return m_io_dsw2->read(); |
| 214 | 279 | case 15: |
| 215 | | return ioport("DSW3")->read(); |
| 280 | return m_io_dsw3->read(); |
| 216 | 281 | } |
| 217 | | return 0xff; |
| 282 | return 0; |
| 218 | 283 | } |
| 219 | 284 | |
| 220 | 285 | WRITE8_MEMBER( gp_1_state::porta_w ) |
| 221 | 286 | { |
| 222 | 287 | m_u14 = data >> 4; |
| 223 | | /*if (m_u14 >= 8)*/ m_segment = data & 15; |
| 224 | 288 | if ((data > 0x0f) && (data < 0x30)) |
| 225 | 289 | { |
| 226 | 290 | switch (data) |
| 227 | 291 | { |
| 228 | | case 0x10: |
| 292 | case 0x10: // chime c |
| 293 | m_samples->start(0, 3); |
| 229 | 294 | break; |
| 230 | | case 0x11: |
| 231 | | m_samples->start(0, 5); |
| 295 | case 0x11: // chime b |
| 296 | m_samples->start(0, 2); |
| 232 | 297 | break; |
| 233 | | case 0x12: |
| 298 | case 0x12: // knocker |
| 234 | 299 | m_samples->start(0, 6); |
| 235 | 300 | break; |
| 236 | | case 0x13: |
| 301 | case 0x13: // not used |
| 302 | case 0x14: // not used |
| 303 | break; |
| 304 | case 0x15: // chime a |
| 237 | 305 | m_samples->start(0, 1); |
| 238 | 306 | break; |
| 239 | | case 0x14: |
| 240 | | m_samples->start(0, 2); |
| 307 | case 0x16: // chime d |
| 308 | m_samples->start(0, 4); |
| 241 | 309 | break; |
| 242 | | case 0x15: |
| 243 | | m_samples->start(0, 3); |
| 310 | case 0x17: // outhole |
| 311 | case 0x18: // r sling |
| 312 | case 0x19: // l sling |
| 313 | m_samples->start(0, 5); |
| 244 | 314 | break; |
| 245 | | case 0x16: |
| 246 | | m_samples->start(0, 4); |
| 315 | case 0x1a: // c kickout |
| 316 | m_samples->start(0, 5); |
| 247 | 317 | break; |
| 248 | | case 0x17: |
| 249 | | case 0x18: |
| 250 | | case 0x19: |
| 318 | case 0x1b: // r bumper |
| 319 | m_samples->start(0, 0); |
| 320 | break; |
| 321 | case 0x1c: // a kickout |
| 251 | 322 | m_samples->start(0, 5); |
| 252 | 323 | break; |
| 253 | | case 0x1a: |
| 254 | | case 0x1b: |
| 324 | case 0x1d: // l bumper |
| 255 | 325 | m_samples->start(0, 0); |
| 256 | 326 | break; |
| 257 | | case 0x1c: |
| 258 | | case 0x1d: |
| 327 | case 0x1e: // a kickout |
| 259 | 328 | m_samples->start(0, 5); |
| 260 | 329 | break; |
| 261 | | case 0x1e: |
| 262 | | case 0x1f: |
| 330 | case 0x1f: // not used |
| 263 | 331 | break; |
| 264 | 332 | } |
| 265 | 333 | } |
| 266 | | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; // 7448 |
| 267 | | if ((m_u14 >= 8) && (m_u14 <= 11)) |
| 334 | |
| 335 | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448 |
| 336 | if (m_u14 >= 8) |
| 268 | 337 | { |
| 269 | | output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment]); |
| 338 | if (m_digit == 7) |
| 339 | m_segment[m_u14] = data & 15; |
| 340 | else |
| 341 | output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment[m_u14]]); |
| 270 | 342 | } |
| 271 | 343 | } |
| 272 | 344 | |
| 273 | 345 | WRITE8_MEMBER( gp_1_state::portc_w ) |
| 274 | 346 | { |
| 275 | 347 | output_set_value("led0", BIT(data, 3)); |
| 276 | | |
| 277 | 348 | m_digit = data & 7; |
| 278 | | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; // 7448 |
| 279 | | if ((m_digit) && (m_u14 >= 8) && (m_u14 <= 11)) |
| 280 | | { |
| 281 | | output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment]); |
| 282 | | } |
| 283 | 349 | } |
| 284 | 350 | |
| 285 | 351 | void gp_1_state::machine_reset() |
| r31398 | r31399 | |
| 308 | 374 | MCFG_CPU_IO_MAP(gp_1_io) |
| 309 | 375 | MCFG_CPU_CONFIG(daisy_chain) |
| 310 | 376 | |
| 377 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 378 | |
| 311 | 379 | /* Video */ |
| 312 | 380 | MCFG_DEFAULT_LAYOUT(layout_gp_1) |
| 313 | 381 | |