trunk/src/mame/drivers/s3.c
| r18640 | r18641 | |
| 5 | 5 | |
| 6 | 6 | Typical of Williams hardware: Motorola 8-bit CPUs, and lots of PIAs. |
| 7 | 7 | |
| 8 | | When first used, the nvram gets initialised but is otherwise unusable. It will |
| 9 | | work on the next use. |
| 8 | Schematic and PinMAME used as references. |
| 10 | 9 | |
| 10 | Written during October 2012 [Robbbert] |
| 11 | |
| 12 | When first used, the nvram gets initialised but is otherwise unusable. A reboot |
| 13 | will get it going. |
| 14 | |
| 11 | 15 | ToDo: |
| 12 | | - Diagnostic switch |
| 16 | - Diagnostic controls |
| 13 | 17 | |
| 14 | 18 | |
| 19 | |
| 15 | 20 | ************************************************************************************/ |
| 16 | 21 | |
| 17 | 22 | |
| r18640 | r18641 | |
| 48 | 53 | DECLARE_WRITE8_MEMBER(switch_w); |
| 49 | 54 | DECLARE_READ_LINE_MEMBER(cb1_r); |
| 50 | 55 | TIMER_DEVICE_CALLBACK_MEMBER(irq); |
| 56 | DECLARE_INPUT_CHANGED_MEMBER(nmi); |
| 51 | 57 | DECLARE_MACHINE_RESET(s3); |
| 52 | 58 | DECLARE_MACHINE_RESET(s3a); |
| 53 | 59 | protected: |
| r18640 | r18641 | |
| 162 | 168 | PORT_START("SND") |
| 163 | 169 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 164 | 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Music") PORT_CODE(KEYCODE_9) PORT_TOGGLE |
| 171 | |
| 172 | PORT_START("DIAGS") |
| 173 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Diagnostic") PORT_CODE(KEYCODE_0) PORT_CHANGED_MEMBER(DEVICE_SELF, s3_state, nmi, 1) |
| 165 | 174 | INPUT_PORTS_END |
| 166 | 175 | |
| 167 | 176 | MACHINE_RESET_MEMBER( s3_state, s3 ) |
| r18640 | r18641 | |
| 176 | 185 | m_chimes = 0; |
| 177 | 186 | } |
| 178 | 187 | |
| 188 | INPUT_CHANGED_MEMBER( s3_state::nmi ) |
| 189 | { |
| 190 | // Diagnostic button sends a pulse to NMI pin |
| 191 | if (newval==CLEAR_LINE) |
| 192 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 193 | } |
| 194 | |
| 179 | 195 | WRITE8_MEMBER( s3_state::sol0_w ) |
| 180 | 196 | { |
| 197 | if (BIT(data, 0)) |
| 198 | m_samples->start(2, 5); // outhole |
| 181 | 199 | } |
| 182 | 200 | |
| 183 | 201 | WRITE8_MEMBER( s3_state::sol1_w ) |