Previous 199869 Revisions Next

r18641 Sunday 21st October, 2012 at 10:17:40 UTC by Robbbert
williams system3 : added outhole sound and diagnostic switch.
[src/mame/drivers]s3.c

trunk/src/mame/drivers/s3.c
r18640r18641
55
66    Typical of Williams hardware: Motorola 8-bit CPUs, and lots of PIAs.
77
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.
109
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
1115ToDo:
12- Diagnostic switch
16- Diagnostic controls
1317
1418
19
1520************************************************************************************/
1621
1722
r18640r18641
4853   DECLARE_WRITE8_MEMBER(switch_w);
4954   DECLARE_READ_LINE_MEMBER(cb1_r);
5055   TIMER_DEVICE_CALLBACK_MEMBER(irq);
56   DECLARE_INPUT_CHANGED_MEMBER(nmi);
5157   DECLARE_MACHINE_RESET(s3);
5258   DECLARE_MACHINE_RESET(s3a);
5359protected:
r18640r18641
162168   PORT_START("SND")
163169   PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED )
164170   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)
165174INPUT_PORTS_END
166175
167176MACHINE_RESET_MEMBER( s3_state, s3 )
r18640r18641
176185   m_chimes = 0;
177186}
178187
188INPUT_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
179195WRITE8_MEMBER( s3_state::sol0_w )
180196{
197   if (BIT(data, 0))
198      m_samples->start(2, 5); // outhole
181199}
182200
183201WRITE8_MEMBER( s3_state::sol1_w )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team