trunk/src/mame/layout/s3.lay
| r0 | r18639 | |
| 1 | <!-- s3.lay --> |
| 2 | |
| 3 | <!-- 2012-10-21: Initial version. [Robbbert] --> |
| 4 | |
| 5 | <mamelayout version="2"> |
| 6 | |
| 7 | <element name="digit" defstate="0"> |
| 8 | <led7seg> |
| 9 | <color red="1.0" green="0.25" blue="0.0" /> |
| 10 | </led7seg> |
| 11 | </element> |
| 12 | |
| 13 | <element name="background"> |
| 14 | <rect> |
| 15 | <bounds left="0" top="0" right="1" bottom="1" /> |
| 16 | <color red="0.0" green="0.0" blue="0.0" /> |
| 17 | </rect> |
| 18 | </element> |
| 19 | <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 20 | <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 21 | <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 22 | <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 23 | <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 24 | <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 25 | |
| 26 | <view name="Default Layout"> |
| 27 | |
| 28 | <!-- Background --> |
| 29 | <backdrop element="background"> |
| 30 | <bounds left="0" top="20" right="274" bottom="394" /> |
| 31 | </backdrop> |
| 32 | |
| 33 | <!-- LEDs --> |
| 34 | |
| 35 | <!-- Player 1 Score --> |
| 36 | |
| 37 | <bezel name="digit0" element="digit"> |
| 38 | <bounds left="10" top="45" right="44" bottom="84" /> |
| 39 | </bezel> |
| 40 | <bezel name="digit1" element="digit"> |
| 41 | <bounds left="54" top="45" right="88" bottom="84" /> |
| 42 | </bezel> |
| 43 | <bezel name="digit2" element="digit"> |
| 44 | <bounds left="98" top="45" right="132" bottom="84" /> |
| 45 | </bezel> |
| 46 | <bezel name="digit3" element="digit"> |
| 47 | <bounds left="142" top="45" right="176" bottom="84" /> |
| 48 | </bezel> |
| 49 | <bezel name="digit4" element="digit"> |
| 50 | <bounds left="186" top="45" right="220" bottom="84" /> |
| 51 | </bezel> |
| 52 | <bezel name="digit5" element="digit"> |
| 53 | <bounds left="230" top="45" right="264" bottom="84" /> |
| 54 | </bezel> |
| 55 | |
| 56 | <!-- Player 2 Score --> |
| 57 | <bezel name="digit8" element="digit"> |
| 58 | <bounds left="10" top="105" right="44" bottom="144" /> |
| 59 | </bezel> |
| 60 | <bezel name="digit9" element="digit"> |
| 61 | <bounds left="54" top="105" right="88" bottom="144" /> |
| 62 | </bezel> |
| 63 | <bezel name="digit10" element="digit"> |
| 64 | <bounds left="98" top="105" right="132" bottom="144" /> |
| 65 | </bezel> |
| 66 | <bezel name="digit11" element="digit"> |
| 67 | <bounds left="142" top="105" right="176" bottom="144" /> |
| 68 | </bezel> |
| 69 | <bezel name="digit12" element="digit"> |
| 70 | <bounds left="186" top="105" right="220" bottom="144" /> |
| 71 | </bezel> |
| 72 | <bezel name="digit13" element="digit"> |
| 73 | <bounds left="230" top="105" right="264" bottom="144" /> |
| 74 | </bezel> |
| 75 | |
| 76 | <!-- Player 3 Score --> |
| 77 | <bezel name="digit16" element="digit"> |
| 78 | <bounds left="10" top="165" right="44" bottom="204" /> |
| 79 | </bezel> |
| 80 | <bezel name="digit17" element="digit"> |
| 81 | <bounds left="54" top="165" right="88" bottom="204" /> |
| 82 | </bezel> |
| 83 | <bezel name="digit18" element="digit"> |
| 84 | <bounds left="98" top="165" right="132" bottom="204" /> |
| 85 | </bezel> |
| 86 | <bezel name="digit19" element="digit"> |
| 87 | <bounds left="142" top="165" right="176" bottom="204" /> |
| 88 | </bezel> |
| 89 | <bezel name="digit20" element="digit"> |
| 90 | <bounds left="186" top="165" right="220" bottom="204" /> |
| 91 | </bezel> |
| 92 | <bezel name="digit21" element="digit"> |
| 93 | <bounds left="230" top="165" right="264" bottom="204" /> |
| 94 | </bezel> |
| 95 | |
| 96 | <!-- Player 4 Score --> |
| 97 | <bezel name="digit24" element="digit"> |
| 98 | <bounds left="10" top="225" right="44" bottom="264" /> |
| 99 | </bezel> |
| 100 | <bezel name="digit25" element="digit"> |
| 101 | <bounds left="54" top="225" right="88" bottom="264" /> |
| 102 | </bezel> |
| 103 | <bezel name="digit26" element="digit"> |
| 104 | <bounds left="98" top="225" right="132" bottom="264" /> |
| 105 | </bezel> |
| 106 | <bezel name="digit27" element="digit"> |
| 107 | <bounds left="142" top="225" right="176" bottom="264" /> |
| 108 | </bezel> |
| 109 | <bezel name="digit28" element="digit"> |
| 110 | <bounds left="186" top="225" right="220" bottom="264" /> |
| 111 | </bezel> |
| 112 | <bezel name="digit29" element="digit"> |
| 113 | <bounds left="230" top="225" right="264" bottom="264" /> |
| 114 | </bezel> |
| 115 | |
| 116 | <!-- Credits and Balls --> |
| 117 | <bezel name="digit14" element="digit"> |
| 118 | <bounds left="10" top="345" right="44" bottom="384" /> |
| 119 | </bezel> |
| 120 | <bezel name="digit15" element="digit"> |
| 121 | <bounds left="54" top="345" right="88" bottom="384" /> |
| 122 | </bezel> |
| 123 | <bezel name="digit8" element="digit"> |
| 124 | <bounds left="186" top="345" right="220" bottom="384" /> |
| 125 | </bezel> |
| 126 | <bezel name="digit7" element="digit"> |
| 127 | <bounds left="230" top="345" right="264" bottom="384" /> |
| 128 | </bezel> |
| 129 | <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel> |
| 130 | <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 131 | <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel> |
| 132 | <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel> |
| 133 | <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel> |
| 134 | <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel> |
| 135 | </view> |
| 136 | </mamelayout> |
trunk/src/mame/drivers/s3.c
| r18638 | r18639 | |
| 5 | 5 | |
| 6 | 6 | Typical of Williams hardware: Motorola 8-bit CPUs, and lots of PIAs. |
| 7 | 7 | |
| 8 | | Sound doesn't work because the diagram doesn't show where the sound data |
| 9 | | comes from. (variable m_sound_data needs to be written to). |
| 8 | When first used, the nvram gets initialised but is otherwise unusable. It will |
| 9 | work on the next use. |
| 10 | 10 | |
| 11 | ToDo: |
| 12 | - Diagnostic switch |
| 13 | |
| 14 | |
| 11 | 15 | ************************************************************************************/ |
| 12 | 16 | |
| 13 | 17 | |
| r18638 | r18639 | |
| 15 | 19 | #include "cpu/m6800/m6800.h" |
| 16 | 20 | #include "machine/6821pia.h" |
| 17 | 21 | #include "sound/dac.h" |
| 18 | | //#include "s3.lh" |
| 22 | #include "s3.lh" |
| 19 | 23 | |
| 20 | 24 | |
| 21 | 25 | class s3_state : public genpin_class |
| r18638 | r18639 | |
| 38 | 42 | DECLARE_WRITE8_MEMBER(dig1_w); |
| 39 | 43 | DECLARE_WRITE8_MEMBER(lamp0_w); |
| 40 | 44 | DECLARE_WRITE8_MEMBER(lamp1_w); |
| 45 | DECLARE_WRITE8_MEMBER(sol0_w); |
| 46 | DECLARE_WRITE8_MEMBER(sol1_w); |
| 41 | 47 | DECLARE_READ8_MEMBER(switch_r); |
| 42 | 48 | DECLARE_WRITE8_MEMBER(switch_w); |
| 43 | 49 | DECLARE_READ_LINE_MEMBER(cb1_r); |
| r18638 | r18639 | |
| 59 | 65 | UINT8 m_t_c; |
| 60 | 66 | UINT8 m_sound_data; |
| 61 | 67 | UINT8 m_strobe; |
| 68 | UINT8 m_kbdrow; |
| 62 | 69 | bool m_cb1; |
| 70 | bool m_data_ok; |
| 63 | 71 | }; |
| 64 | 72 | |
| 65 | 73 | static ADDRESS_MAP_START( s3_main_map, AS_PROGRAM, 8, s3_state ) |
| 66 | 74 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) |
| 67 | | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 75 | AM_RANGE(0x0000, 0x00ff) AM_RAM |
| 76 | AM_RANGE(0x0100, 0x017f) AM_RAM AM_SHARE("nvram") |
| 68 | 77 | AM_RANGE(0x2200, 0x2203) AM_DEVREADWRITE("pia0", pia6821_device, read, write) // solenoids |
| 69 | 78 | AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia1", pia6821_device, read, write) // lamps |
| 70 | 79 | AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia2", pia6821_device, read, write) // display |
| r18638 | r18639 | |
| 81 | 90 | ADDRESS_MAP_END |
| 82 | 91 | |
| 83 | 92 | static INPUT_PORTS_START( s3 ) |
| 93 | PORT_START("X0") |
| 94 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) |
| 95 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) |
| 96 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) |
| 97 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) |
| 98 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) |
| 99 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) |
| 100 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) |
| 101 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) |
| 102 | |
| 103 | PORT_START("X1") |
| 104 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) |
| 105 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) |
| 106 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) |
| 107 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 108 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 109 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 110 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) |
| 111 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) |
| 112 | |
| 113 | PORT_START("X2") |
| 114 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) |
| 115 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) |
| 116 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) |
| 117 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) |
| 118 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) |
| 119 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) |
| 120 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) |
| 121 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) |
| 122 | |
| 123 | PORT_START("X4") |
| 124 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) |
| 125 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) |
| 126 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) |
| 127 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) |
| 128 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) |
| 129 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) |
| 130 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) |
| 131 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) |
| 132 | |
| 133 | PORT_START("X8") |
| 134 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) |
| 135 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) |
| 136 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) |
| 137 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) |
| 138 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) |
| 139 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) |
| 140 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) |
| 141 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) |
| 142 | |
| 143 | PORT_START("X10") |
| 144 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) |
| 145 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) |
| 146 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) |
| 147 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) |
| 148 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) |
| 149 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) |
| 150 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) |
| 151 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) |
| 152 | |
| 153 | PORT_START("X20") |
| 154 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 155 | |
| 156 | PORT_START("X40") |
| 157 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 158 | |
| 159 | PORT_START("X80") |
| 160 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 161 | |
| 162 | PORT_START("SND") |
| 163 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 164 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Music") PORT_CODE(KEYCODE_9) PORT_TOGGLE |
| 84 | 165 | INPUT_PORTS_END |
| 85 | 166 | |
| 86 | 167 | void s3_state::machine_reset() |
| r18638 | r18639 | |
| 88 | 169 | m_t_c = 0; |
| 89 | 170 | } |
| 90 | 171 | |
| 172 | WRITE8_MEMBER( s3_state::sol0_w ) |
| 173 | { |
| 174 | |
| 175 | } |
| 176 | |
| 177 | WRITE8_MEMBER( s3_state::sol1_w ) |
| 178 | { |
| 179 | m_sound_data = ioport("SND")->read(); // 0xff or 0xbf |
| 180 | if (BIT(data, 0)) |
| 181 | m_sound_data &= 0xfe; |
| 182 | else |
| 183 | if (BIT(data, 1)) |
| 184 | m_sound_data &= 0xfd; |
| 185 | else |
| 186 | if (BIT(data, 2)) |
| 187 | m_sound_data &= 0xfb; |
| 188 | else |
| 189 | if (BIT(data, 3)) |
| 190 | m_sound_data &= 0xf7; |
| 191 | else |
| 192 | if (BIT(data, 4)) |
| 193 | m_sound_data &= 0x7f; |
| 194 | else |
| 195 | if (BIT(data, 5)) |
| 196 | m_samples->start(0, 6); // knocker |
| 197 | |
| 198 | if ((m_sound_data & 0xbf) == 0xbf) |
| 199 | { |
| 200 | m_cb1 = 0; |
| 201 | m_pia4->cb1_w(0); |
| 202 | } |
| 203 | else |
| 204 | { |
| 205 | m_cb1 = 1; |
| 206 | m_pia4->cb1_w(1); |
| 207 | } |
| 208 | } |
| 209 | |
| 91 | 210 | static const pia6821_interface pia0_intf = |
| 92 | 211 | { |
| 93 | 212 | DEVCB_NULL, /* port A in */ |
| r18638 | r18639 | |
| 96 | 215 | DEVCB_LINE_GND, /* line CB1 in */ |
| 97 | 216 | DEVCB_NULL, /* line CA2 in */ |
| 98 | 217 | DEVCB_NULL, /* line CB2 in */ |
| 99 | | DEVCB_NULL, /* port A out */ |
| 100 | | DEVCB_NULL, /* port B out */ |
| 218 | DEVCB_DRIVER_MEMBER(s3_state, sol0_w), /* port A out */ |
| 219 | DEVCB_DRIVER_MEMBER(s3_state, sol1_w), /* port B out */ |
| 101 | 220 | DEVCB_NULL, /* line CA2 out */ |
| 102 | 221 | DEVCB_NULL, /* port CB2 out */ |
| 103 | 222 | DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE), /* IRQA */ |
| r18638 | r18639 | |
| 111 | 230 | |
| 112 | 231 | WRITE8_MEMBER( s3_state::lamp1_w ) |
| 113 | 232 | { |
| 114 | | //printf("1=%X ",data); |
| 233 | |
| 115 | 234 | } |
| 116 | 235 | |
| 117 | 236 | static const pia6821_interface pia1_intf = |
| r18638 | r18639 | |
| 133 | 252 | WRITE8_MEMBER( s3_state::dig0_w ) |
| 134 | 253 | { |
| 135 | 254 | m_strobe = data; |
| 255 | m_data_ok = true; |
| 136 | 256 | } |
| 137 | 257 | |
| 138 | 258 | WRITE8_MEMBER( s3_state::dig1_w ) |
| 139 | 259 | { |
| 140 | | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 }; // MC14558 |
| 141 | | // player 1, 2, credits, balls |
| 142 | | output_set_digit_value(m_strobe, patterns[data&15]); |
| 143 | | // player 3 and 4 |
| 144 | | output_set_digit_value(m_strobe+20, patterns[data>>4]); |
| 260 | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // MC14558 |
| 261 | if (m_data_ok) |
| 262 | { |
| 263 | output_set_digit_value(m_strobe+16, patterns[data&15]); |
| 264 | output_set_digit_value(m_strobe, patterns[data>>4]); |
| 265 | } |
| 266 | m_data_ok = false; |
| 145 | 267 | } |
| 146 | 268 | |
| 147 | 269 | static const pia6821_interface pia2_intf = |
| r18638 | r18639 | |
| 162 | 284 | |
| 163 | 285 | READ8_MEMBER( s3_state::switch_r ) |
| 164 | 286 | { |
| 165 | | return 0xff; |
| 287 | char kbdrow[8]; |
| 288 | sprintf(kbdrow,"X%X",m_kbdrow); |
| 289 | return ioport(kbdrow)->read(); |
| 166 | 290 | } |
| 167 | 291 | |
| 168 | 292 | WRITE8_MEMBER( s3_state::switch_w ) |
| 169 | 293 | { |
| 170 | | |
| 294 | m_kbdrow = data; |
| 171 | 295 | } |
| 172 | 296 | |
| 173 | 297 | static const pia6821_interface pia3_intf = |
| r18638 | r18639 | |
| 193 | 317 | |
| 194 | 318 | READ8_MEMBER( s3_state::dac_r ) |
| 195 | 319 | { |
| 196 | | m_cb1 = (m_sound_data < 255); |
| 197 | | // add code to activate cb1 |
| 198 | 320 | return m_sound_data; |
| 199 | 321 | } |
| 200 | 322 | |
| r18638 | r18639 | |
| 236 | 358 | MCFG_TIMER_DRIVER_ADD_PERIODIC("irq", s3_state, irq, attotime::from_hz(1000)) |
| 237 | 359 | |
| 238 | 360 | /* Video */ |
| 239 | | //MCFG_DEFAULT_LAYOUT(layout_s3) |
| 361 | MCFG_DEFAULT_LAYOUT(layout_s3) |
| 240 | 362 | |
| 241 | 363 | /* Sound */ |
| 242 | 364 | MCFG_FRAGMENT_ADD( genpin_audio ) |
| 243 | 365 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 244 | 366 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 245 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 367 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 246 | 368 | |
| 247 | 369 | /* Devices */ |
| 248 | 370 | MCFG_PIA6821_ADD("pia0", pia0_intf) |
| r18638 | r18639 | |
| 250 | 372 | MCFG_PIA6821_ADD("pia2", pia2_intf) |
| 251 | 373 | MCFG_PIA6821_ADD("pia3", pia3_intf) |
| 252 | 374 | MCFG_PIA6821_ADD("pia4", pia4_intf) |
| 375 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 253 | 376 | MACHINE_CONFIG_END |
| 254 | 377 | |
| 255 | 378 | /*------------------------------------- |
| r18638 | r18639 | |
| 316 | 439 | ROM_END |
| 317 | 440 | |
| 318 | 441 | |
| 319 | | GAME( 1977, httip_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Hot Tip (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 320 | | GAME( 1977, lucky_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Lucky Seven (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 321 | | GAME( 1978, wldcp_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "World Cup Soccer (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 322 | | GAME( 1978, cntct_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Contact (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 323 | | GAME( 1978, disco_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Disco Fever (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 442 | GAME( 1977, httip_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Hot Tip (L-1)", GAME_MECHANICAL | GAME_NO_SOUND) |
| 443 | GAME( 1977, lucky_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Lucky Seven (L-1)", GAME_MECHANICAL | GAME_NO_SOUND) |
| 444 | GAME( 1978, wldcp_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "World Cup Soccer (L-1)", GAME_MECHANICAL | GAME_NOT_WORKING) |
| 445 | GAME( 1978, cntct_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Contact (L-1)", GAME_MECHANICAL) |
| 446 | GAME( 1978, disco_l1, 0, s3, s3, driver_device, 0, ROT0, "Williams", "Disco Fever (L-1)", GAME_MECHANICAL) |
trunk/src/mame/drivers/s4.c
| r18638 | r18639 | |
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | 5 | |
| 6 | | #include "emu.h" |
| 6 | #include "machine/genpin.h" |
| 7 | 7 | #include "cpu/m6800/m6800.h" |
| 8 | 8 | |
| 9 | | class williams_s4_state : public driver_device |
| 9 | class s4_state : public genpin_class |
| 10 | 10 | { |
| 11 | 11 | public: |
| 12 | | williams_s4_state(const machine_config &mconfig, device_type type, const char *tag) |
| 13 | | : driver_device(mconfig, type, tag), |
| 14 | | m_maincpu(*this, "maincpu") |
| 12 | s4_state(const machine_config &mconfig, device_type type, const char *tag) |
| 13 | : genpin_class(mconfig, type, tag), |
| 14 | m_maincpu(*this, "maincpu") |
| 15 | 15 | { } |
| 16 | 16 | |
| 17 | 17 | protected: |
| r18638 | r18639 | |
| 21 | 21 | |
| 22 | 22 | // driver_device overrides |
| 23 | 23 | virtual void machine_reset(); |
| 24 | | public: |
| 25 | | DECLARE_DRIVER_INIT(williams_s4); |
| 24 | private: |
| 26 | 25 | }; |
| 27 | 26 | |
| 28 | | static ADDRESS_MAP_START( williams_s4_map, AS_PROGRAM, 8, williams_s4_state ) |
| 27 | static ADDRESS_MAP_START( s4_main_map, AS_PROGRAM, 8, s4_state ) |
| 29 | 28 | AM_RANGE(0x0000, 0xffff) AM_NOP |
| 30 | 29 | ADDRESS_MAP_END |
| 31 | 30 | |
| 32 | | static INPUT_PORTS_START( williams_s4 ) |
| 31 | static INPUT_PORTS_START( s4 ) |
| 33 | 32 | INPUT_PORTS_END |
| 34 | 33 | |
| 35 | | void williams_s4_state::machine_reset() |
| 34 | void s4_state::machine_reset() |
| 36 | 35 | { |
| 37 | 36 | } |
| 38 | 37 | |
| 39 | | DRIVER_INIT_MEMBER(williams_s4_state,williams_s4) |
| 40 | | { |
| 41 | | } |
| 42 | | |
| 43 | | static MACHINE_CONFIG_START( williams_s4, williams_s4_state ) |
| 38 | static MACHINE_CONFIG_START( s4, s4_state ) |
| 44 | 39 | /* basic machine hardware */ |
| 45 | 40 | MCFG_CPU_ADD("maincpu", M6800, 1000000) |
| 46 | | MCFG_CPU_PROGRAM_MAP(williams_s4_map) |
| 41 | MCFG_CPU_PROGRAM_MAP(s4_main_map) |
| 47 | 42 | MACHINE_CONFIG_END |
| 48 | 43 | |
| 49 | 44 | /*-------------------------------- |
| r18638 | r18639 | |
| 57 | 52 | ROM_RELOAD( 0xf800, 0x0800) |
| 58 | 53 | ROM_LOAD("green1.716", 0x7000, 0x0800, CRC(2145f8ab) SHA1(ddf63208559a3a08d4e88327c55426b0eed27654)) |
| 59 | 54 | ROM_RELOAD( 0xf000, 0x0800) |
| 60 | | ROM_REGION(0x10000, "cpu2", 0) |
| 55 | |
| 56 | ROM_REGION(0x10000, "audiocpu", 0) |
| 61 | 57 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 62 | 58 | ROM_RELOAD( 0xf800, 0x0800) |
| 63 | 59 | ROM_END |
| r18638 | r18639 | |
| 70 | 66 | ROM_RELOAD( 0xf800, 0x0800) |
| 71 | 67 | ROM_LOAD("green1.716", 0x7000, 0x0800, CRC(2145f8ab) SHA1(ddf63208559a3a08d4e88327c55426b0eed27654)) |
| 72 | 68 | ROM_RELOAD( 0xf000, 0x0800) |
| 73 | | ROM_REGION(0x10000, "cpu2", 0) |
| 69 | |
| 70 | ROM_REGION(0x10000, "audiocpu", 0) |
| 74 | 71 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 75 | 72 | ROM_RELOAD( 0xf800, 0x0800) |
| 76 | 73 | ROM_END |
| r18638 | r18639 | |
| 86 | 83 | ROM_RELOAD( 0xf800, 0x0800) |
| 87 | 84 | ROM_LOAD("white1.716", 0x7000, 0x0800, CRC(9bbbf14f) SHA1(b0542ffdd683fa0ea4a9819576f3789cd5a4b2eb)) |
| 88 | 85 | ROM_RELOAD( 0xf000, 0x0800) |
| 89 | | ROM_REGION(0x10000, "cpu2", 0) |
| 86 | |
| 87 | ROM_REGION(0x10000, "audiocpu", 0) |
| 90 | 88 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 91 | 89 | ROM_RELOAD( 0xf800, 0x0800) |
| 92 | 90 | ROM_END |
| r18638 | r18639 | |
| 102 | 100 | ROM_RELOAD( 0xf800, 0x0800) |
| 103 | 101 | ROM_LOAD("white1.716", 0x7000, 0x0800, CRC(9bbbf14f) SHA1(b0542ffdd683fa0ea4a9819576f3789cd5a4b2eb)) |
| 104 | 102 | ROM_RELOAD( 0xf000, 0x0800) |
| 105 | | ROM_REGION(0x10000, "cpu2", 0) |
| 103 | |
| 104 | ROM_REGION(0x10000, "audiocpu", 0) |
| 106 | 105 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 107 | 106 | ROM_RELOAD( 0xf800, 0x0800) |
| 108 | 107 | ROM_END |
| r18638 | r18639 | |
| 118 | 117 | ROM_RELOAD( 0xf800, 0x0800) |
| 119 | 118 | ROM_LOAD("yellow1.716", 0x7000, 0x0800, CRC(d251738c) SHA1(65ddbf5c36e429243331a4c5d2339df87a8a7f64)) |
| 120 | 119 | ROM_RELOAD( 0xf000, 0x0800) |
| 121 | | ROM_REGION(0x10000, "cpu2", 0) |
| 120 | |
| 121 | ROM_REGION(0x10000, "audiocpu", 0) |
| 122 | 122 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 123 | 123 | ROM_RELOAD( 0xf800, 0x0800) |
| 124 | 124 | ROM_END |
| r18638 | r18639 | |
| 134 | 134 | ROM_RELOAD( 0xf800, 0x0800) |
| 135 | 135 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 136 | 136 | ROM_RELOAD( 0xf000, 0x0800) |
| 137 | | ROM_REGION(0x10000, "cpu2", 0) |
| 137 | |
| 138 | ROM_REGION(0x10000, "audiocpu", 0) |
| 138 | 139 | ROM_LOAD("soundx.716", 0x7800, 0x0800, CRC(539d64fb) SHA1(ff0d09c8d7c65e1072691b5b9e4fcaa3f38d67e8)) |
| 139 | 140 | ROM_RELOAD( 0xf800, 0x0800) |
| 140 | 141 | ROM_END |
| r18638 | r18639 | |
| 150 | 151 | ROM_RELOAD( 0xf800, 0x0800) |
| 151 | 152 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 152 | 153 | ROM_RELOAD( 0xf000, 0x0800) |
| 153 | | ROM_REGION(0x10000, "cpu2", 0) |
| 154 | |
| 155 | ROM_REGION(0x10000, "audiocpu", 0) |
| 154 | 156 | ROM_LOAD("soundx.716", 0x7800, 0x0800, CRC(539d64fb) SHA1(ff0d09c8d7c65e1072691b5b9e4fcaa3f38d67e8)) |
| 155 | 157 | ROM_RELOAD( 0xf800, 0x0800) |
| 156 | 158 | ROM_END |
| r18638 | r18639 | |
| 166 | 168 | ROM_RELOAD( 0xf800, 0x0800) |
| 167 | 169 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 168 | 170 | ROM_RELOAD( 0xf000, 0x0800) |
| 169 | | ROM_REGION(0x10000, "cpu2", 0) |
| 171 | |
| 172 | ROM_REGION(0x10000, "audiocpu", 0) |
| 170 | 173 | ROM_LOAD("sound1.716", 0x7800, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c)) |
| 171 | 174 | ROM_RELOAD( 0xf800, 0x0800) |
| 172 | 175 | ROM_END |
| r18638 | r18639 | |
| 182 | 185 | ROM_RELOAD( 0xf800, 0x0800) |
| 183 | 186 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 184 | 187 | ROM_RELOAD( 0xf000, 0x0800) |
| 185 | | ROM_REGION(0x10000, "cpu2", 0) |
| 188 | |
| 189 | ROM_REGION(0x10000, "audiocpu", 0) |
| 186 | 190 | ROM_LOAD("soundx.716", 0x7800, 0x0800, CRC(539d64fb) SHA1(ff0d09c8d7c65e1072691b5b9e4fcaa3f38d67e8)) |
| 187 | 191 | ROM_RELOAD( 0xf800, 0x0800) |
| 188 | 192 | ROM_END |
| r18638 | r18639 | |
| 198 | 202 | ROM_RELOAD( 0xf800, 0x0800) |
| 199 | 203 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 200 | 204 | ROM_RELOAD( 0xf000, 0x0800) |
| 201 | | ROM_REGION(0x10000, "cpu2", 0) |
| 205 | |
| 206 | ROM_REGION(0x10000, "audiocpu", 0) |
| 202 | 207 | ROM_LOAD("soundx.716", 0x7800, 0x0800, CRC(539d64fb) SHA1(ff0d09c8d7c65e1072691b5b9e4fcaa3f38d67e8)) |
| 203 | 208 | ROM_RELOAD( 0xf800, 0x0800) |
| 204 | 209 | ROM_END |
| r18638 | r18639 | |
| 214 | 219 | ROM_RELOAD( 0xf800, 0x0800) |
| 215 | 220 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 216 | 221 | ROM_RELOAD( 0xf000, 0x0800) |
| 217 | | ROM_REGION(0x10000, "cpu2", 0) |
| 222 | |
| 223 | ROM_REGION(0x10000, "audiocpu", 0) |
| 218 | 224 | ROM_LOAD("sound.716", 0x7800, 0x0800, CRC(db085cbb) SHA1(9a57abbad183ba16b3dba16d16923c3bfc46a0c3)) |
| 219 | 225 | ROM_RELOAD( 0xf800, 0x0800) |
| 220 | 226 | ROM_END |
| r18638 | r18639 | |
| 230 | 236 | ROM_RELOAD( 0xf800, 0x0800) |
| 231 | 237 | ROM_LOAD("b_ic20.716", 0x7000, 0x0800, CRC(c6f8e3b1) SHA1(cb78d42e1265162132a1ab2320148b6857106b0e)) |
| 232 | 238 | ROM_RELOAD( 0xf000, 0x0800) |
| 239 | |
| 240 | ROM_REGION(0x10000, "audiocpu", ROMREGION_ERASEFF) |
| 233 | 241 | ROM_END |
| 234 | 242 | |
| 235 | 243 | /*---------------------------- |
| r18638 | r18639 | |
| 243 | 251 | ROM_RELOAD( 0xf800, 0x0800) |
| 244 | 252 | ROM_LOAD("ic20.716", 0x7000, 0x0800, CRC(f163fc88) SHA1(988b60626f3d4dc8f4a1dbd0c99282418bc53aae)) |
| 245 | 253 | ROM_RELOAD( 0xf000, 0x0800) |
| 254 | |
| 255 | ROM_REGION(0x10000, "audiocpu", ROMREGION_ERASEFF) |
| 246 | 256 | ROM_END |
| 247 | 257 | |
| 248 | 258 | |
| 249 | | GAME(1979, flash_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Flash (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 250 | | GAME(1979, flash_t1, flash_l1, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Flash (T-1) Ted Estes", GAME_IS_SKELETON_MECHANICAL) |
| 251 | | GAME(1978, phnix_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Phoenix (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 252 | | GAME(1978, pkrno_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Pokerino (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 253 | | GAME(1979, stlwr_l2, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Stellar Wars (L-2)", GAME_IS_SKELETON_MECHANICAL) |
| 254 | | GAME(1978, pomp_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Pompeii (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 255 | | GAME(1978, arist_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Aristocrat (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 256 | | GAME(1978, topaz_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Topaz (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 257 | | GAME(1979, taurs_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Taurus (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 258 | | GAME(1979, kingt_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "King Tut (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 259 | | GAME(1980, omni_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Omni (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 260 | | GAME(1983, bstrk_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Big Strike (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 261 | | GAME(1983, tstrk_l1, 0, williams_s4, williams_s4, williams_s4_state, williams_s4, ROT0, "Williams", "Triple Strike (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 259 | GAME(1979,flash_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Flash (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 260 | GAME(1979,flash_t1, flash_l1, s4, s4, driver_device, 0, ROT0, "Williams", "Flash (T-1) Ted Estes", GAME_IS_SKELETON_MECHANICAL) |
| 261 | GAME(1978,phnix_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Phoenix (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 262 | GAME(1978,pkrno_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Pokerino (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 263 | GAME(1979,stlwr_l2, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Stellar Wars (L-2)", GAME_IS_SKELETON_MECHANICAL) |
| 264 | GAME(1978,pomp_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Pompeii (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 265 | GAME(1978,arist_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Aristocrat (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 266 | GAME(1978,topaz_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Topaz (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 267 | GAME(1979,taurs_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Taurus (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 268 | GAME(1979,kingt_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "King Tut (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 269 | GAME(1980,omni_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Omni (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 270 | GAME(1983,bstrk_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Big Strike (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |
| 271 | GAME(1983,tstrk_l1, 0, s4, s4, driver_device, 0, ROT0, "Williams", "Triple Strike (Shuffle) (L-1)", GAME_IS_SKELETON_MECHANICAL) |