Previous 199869 Revisions Next

r31858 Monday 1st September, 2014 at 13:08:14 UTC by Robbbert
aftor and spectra: minor improvements (nw)

Af-tor: added missing inputs and mechanical sounds. Added notes. Fixed broken bank of switches.

Spectra: added slingshot sound and some notes. Fixed coin sound. Removed useless variable.
[src/mame/drivers]spectra.c wico.c

trunk/src/mame/drivers/wico.c
r31857r31858
2020        d d
2121
2222
23    Press 9 to enter service/selftest. Press 1 to step through the tests.
24    When you reach the audit stages, press 6 to advance and 5 to clear.
25    In the switch test, it will report any closed dip as a failure. You can
26    ignore these.
27    The game has 2 balls, for multiball feature, so the outhole doesn't
28    work because it thinks the 2nd ball is in play somewhere.
29
30
2331ToDo:
24- Outhole doesn't work
25- Add mechanical sounds
26- Fix failures in test mode
27- Find and add Clear and Advance buttons (behind front door)
32- Add outhole/saucer sound
2833
2934
35
36
3037***************************************************************************/
3138
3239#include "machine/genpin.h"
r31857r31858
4956   DECLARE_READ8_MEMBER(switch_r);
5057   DECLARE_WRITE8_MEMBER(muxen_w);
5158   DECLARE_WRITE8_MEMBER(muxld_w);
59   DECLARE_WRITE8_MEMBER(csols_w);
60   DECLARE_WRITE8_MEMBER(msols_w);
5261   DECLARE_WRITE8_MEMBER(dled0_w);
5362   DECLARE_WRITE8_MEMBER(dled1_w);
5463   DECLARE_WRITE8_MEMBER(zcres_w);
r31857r31858
6271   bool m_disp_on;
6372   bool m_diag_on;
6473   UINT8 m_firqtimer;
74   UINT8 m_diag_segments;
6575   virtual void machine_reset();
6676   required_device<cpu_device> m_ccpu;
6777   required_device<cpu_device> m_hcpu;
r31857r31858
7585   //AM_RANGE(0x1fe1, 0x1fe1) AM_WRITE(store_w)
7686   AM_RANGE(0x1fe2, 0x1fe2) AM_WRITE(muxen_w)
7787   //AM_RANGE(0x1fe3, 0x1fe3) AM_WRITE(csols_w)
78   AM_RANGE(0x1fe4, 0x1fe4) AM_READNOP //AM_WRITE(msols_w)
88   AM_RANGE(0x1fe4, 0x1fe4) AM_NOP
7989   AM_RANGE(0x1fe5, 0x1fe5) AM_DEVWRITE("sn76494", sn76494_device, write)
8090   AM_RANGE(0x1fe6, 0x1fe6) AM_WRITE(wdogcl_w)
8191   AM_RANGE(0x1fe7, 0x1fe7) AM_WRITE(zcres_w)
r31857r31858
93103// command cpu
94104static ADDRESS_MAP_START( ccpu_map, AS_PROGRAM, 8, wico_state )
95105   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("sharedram") // 2128  2k RAM
96   AM_RANGE(0x1fe0, 0x1fe0) AM_WRITE(muxld_w) // to display module
106   //AM_RANGE(0x1fe0, 0x1fe0) AM_WRITE(muxld_w) // to display module
97107   //AM_RANGE(0x1fe1, 0x1fe1) AM_WRITE(store_w) // enable save to nvram
98108   AM_RANGE(0x1fe2, 0x1fe2) AM_WRITE(muxen_w) // digit to display on diagnostic LED; d0=L will disable main displays
99   //AM_RANGE(0x1fe3, 0x1fe3) AM_WRITE(csols_w) // solenoid column
100   //AM_RANGE(0x1fe4, 0x1fe4) AM_READNOP AM_WRITE(msols_w) // solenoid row
109   AM_RANGE(0x1fe3, 0x1fe3) AM_WRITE(csols_w) // solenoid column
110   AM_RANGE(0x1fe4, 0x1fe4) AM_WRITE(msols_w) // solenoid row
101111   AM_RANGE(0x1fe5, 0x1fe5) AM_DEVWRITE("sn76494", sn76494_device, write)
102112   AM_RANGE(0x1fe6, 0x1fe6) AM_WRITE(wdogcl_w) // watchdog clear
103113   AM_RANGE(0x1fe7, 0x1fe7) AM_WRITE(zcres_w) // enable IRQ on hcpu
104114   AM_RANGE(0x1fe8, 0x1fe8) AM_WRITE(dled0_w) // turn off diagnostic LED
105115   AM_RANGE(0x1fe9, 0x1fe9) AM_WRITE(dled1_w) // turn on diagnostic LED
106116   AM_RANGE(0x1fea, 0x1fea) AM_READ(gentmrcl_r) // enable IRQ on ccpu
107   AM_RANGE(0x1feb, 0x1feb) AM_READ(lampst_r) // lamps?
117   //AM_RANGE(0x1feb, 0x1feb) AM_READ(lampst_r) // lamps?
108118   //AM_RANGE(0x1fec, 0x1fec) AM_READ(sast_r) // a pwron pulse to d0 L->H
109119   //AM_RANGE(0x1fed, 0x1fed) AM_READ(solst1_r) // switches
110120   //AM_RANGE(0x1fee, 0x1fee) AM_READ(solst0_r) // switches
111   AM_RANGE(0x1fef, 0x1fef) AM_READ(switch_r) // switches
121   //AM_RANGE(0x1fef, 0x1fef) AM_READ(switch_r) // switches
112122   AM_RANGE(0x4000, 0x40ff) AM_RAM AM_SHARE("nvram") // X2212 4bit x 256 NVRAM, stores only when store_w is active
113123   AM_RANGE(0x8000, 0x9fff) AM_ROM
114124   AM_RANGE(0xe000, 0xffff) AM_ROM
r31857r31858
116126
117127static INPUT_PORTS_START( wico )
118128   PORT_START("X0")
119   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1)
120   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN2)
129   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) // Clear button
130   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN2) // Advance button
121131   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1)
122132   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Top Lane 4") PORT_CODE(KEYCODE_Q)
123133   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Top Lane 3") PORT_CODE(KEYCODE_W)
r31857r31858
143153   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Rollunder") PORT_CODE(KEYCODE_N)
144154   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Spinner") PORT_CODE(KEYCODE_M)
145155   PORT_START("X5")
146   PORT_START("X6")
147156   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L SLingshot") PORT_CODE(KEYCODE_COMMA)
148157   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Slingshot") PORT_CODE(KEYCODE_STOP)
149158   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Drop Bank E") PORT_CODE(KEYCODE_A)
r31857r31858
152161   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Drop Bank C") PORT_CODE(KEYCODE_F)
153162   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Drop Bank S") PORT_CODE(KEYCODE_G)
154163   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Drop Bank E") PORT_CODE(KEYCODE_H)
164   PORT_START("X6")
155165   PORT_START("X7")
156   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone E")
157   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone D")
158   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone I")
159   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone")
160   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone T")
161   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone S")
162   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone A")
163   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone F")
166   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone E") PORT_CODE(KEYCODE_0_PAD)
167   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone D") PORT_CODE(KEYCODE_1_PAD)
168   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone I") PORT_CODE(KEYCODE_2_PAD)
169   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Target Zone R") PORT_CODE(KEYCODE_3_PAD)
170   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone T") PORT_CODE(KEYCODE_4_PAD)
171   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone S") PORT_CODE(KEYCODE_5_PAD)
172   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone A") PORT_CODE(KEYCODE_6_PAD)
173   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Target Zone F") PORT_CODE(KEYCODE_7_PAD)
164174   PORT_START("X8")
165175   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Outlane Target") PORT_CODE(KEYCODE_MINUS)
166176   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Outlane Target") PORT_CODE(KEYCODE_EQUALS)
r31857r31858
172182   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L Rollover L Outlane") PORT_CODE(KEYCODE_SLASH)
173183   PORT_START("X9")
174184   PORT_START("XA")
175   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam")
185   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_TILT1) PORT_NAME("Door Slam")
176186   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_TILT) PORT_NAME("Playfield Tilt")
177   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Pendulum Tilt")
178   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Flipper Lane Change")
179   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Ball Feed Middle")
180   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Ball Feed Lower")
187   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_TILT) PORT_NAME("Pendulum Tilt")
188   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("R Flipper Lane Change") PORT_CODE(KEYCODE_RSHIFT)
189   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Ball Feed Middle") PORT_CODE(KEYCODE_8_PAD)
190   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Ball Feed Lower") PORT_CODE(KEYCODE_9_PAD)
181191   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("10 points") PORT_CODE(KEYCODE_COLON)
182192   PORT_START("XB")
183193   PORT_START("XC")
r31857r31858
283293   PORT_DIPNAME( 0x40, 0x00, "Disable Match display" )
284294   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
285295   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
286   PORT_DIPNAME( 0x80, 0x00, "Self Test" )
287   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
288   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
296   // This is a dip and a pushbutton in parallel.
297   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Self Test")
289298INPUT_PORTS_END
290299
291void wico_state::machine_reset()
292{
293   m_hcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
294   m_zcen = 0;
295   m_gten = 0;
296   m_firqtimer = 0;
297   m_disp_on = 0;
298   m_diag_on = 0;
299}
300
301300// diagnostic display off
302301WRITE8_MEMBER( wico_state::dled0_w )
303302{
304303   m_diag_on = 0;
304   output_set_digit_value(9, 0);
305305}
306306
307307// diagnostic display on
308308WRITE8_MEMBER( wico_state::dled1_w )
309309{
310310   m_diag_on = 1;
311   output_set_digit_value(9, m_diag_segments);
311312}
312313
314WRITE8_MEMBER( wico_state::csols_w )
315{
316}
317
318WRITE8_MEMBER( wico_state::msols_w )
319{
320}
321
313322// write to diagnostic display
314323WRITE8_MEMBER( wico_state::muxen_w )
315324{
316325   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x71 }; // MC14495
317   UINT8 segments = 0;
326
327   m_diag_segments = patterns[data>>4];
328
318329   if (m_diag_on)
319      segments = patterns[data>>4];
320   output_set_digit_value(9, segments);
330      output_set_digit_value(9, m_diag_segments);
331   else
332      output_set_digit_value(9, 0);
333
321334   m_disp_on = BIT(data, 0);
322335}
323336
r31857r31858
343356READ8_MEMBER( wico_state::switch_r )
344357{
345358   char kbdrow[8];
346   sprintf(kbdrow,"X%X",m_shared_ram[0x95]);
347   return ioport(kbdrow)->read();
359   offset = m_shared_ram[0x95];
360   sprintf(kbdrow,"X%X",offset);
361   UINT8 data = ioport(kbdrow)->read();
362
363   // Reflex solenoids - operated directly by the switches without needing the cpu
364   if ((offset==2) && (data & 15))
365      m_samples->start(0, 0); // bumpers
366   else
367   if ((offset==5) && (data & 3))
368      m_samples->start(1, 7); // slings
369
370   return data;
348371}
349372
350373// write digits in main display
r31857r31858
389412   }
390413}
391414
415void wico_state::machine_reset()
416{
417   m_hcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
418   m_zcen = 0;
419   m_gten = 0;
420   m_firqtimer = 0;
421   m_disp_on = 0;
422   m_diag_on = 0;
423}
392424
425
393426static MACHINE_CONFIG_START( wico, wico_state )
394427   /* basic machine hardware */
395428   MCFG_CPU_ADD("ccpu", M6809, 10000000 / 8)
trunk/src/mame/drivers/spectra.c
r31857r31858
1515    There is a bug - if you score 1000 and had less than 100, the hundreds digit will
1616    be blank. It will of course fix itself during the course of the game.
1717
18    Setting up - if you do not set up the game, each player will get 255 balls.
19    Turn test switch to Setup. Press 1 to advance to next set. Press 5 to adjust the
20    set. Use the manual for a description of each set. After setting up set 16, do not
21    press 1, instead turn the dipswitch to Play. Exit (to save nvram), and restart.
22    Now the game is ready. Very quick guide to a reasonable setup:
23    06 - 30000 (1st award score)
24    07 - 50000 (2nd award score)
25    08 - 70000 (3rd award score)
26    09 - 90000 (high score)
27    11 - 1 (1 coin 1 credit)
28    13 - 3 (3 balls)
29    15 - 1 (award is a free game)
30    16 - 1 (match enabled)
1831
32ToDo:
33- Get good dump of u4 rom.
34
35
1936*******************************************************************************************/
2037
2138
r31857r31858
7289   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("R Bumper") PORT_CODE(KEYCODE_Y)
7390   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C Bumper") PORT_CODE(KEYCODE_U)
7491   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("L Bumper") PORT_CODE(KEYCODE_I)
75   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("R Triangle") PORT_CODE(KEYCODE_O)
92   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("R Sling") PORT_CODE(KEYCODE_O)
7693   PORT_START("X1")
77   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("L Triangle") PORT_CODE(KEYCODE_A)
94   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("L Sling") PORT_CODE(KEYCODE_A)
7895   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("R Outlane") PORT_CODE(KEYCODE_S)
7996   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("R Rollover") PORT_CODE(KEYCODE_D)
8097   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("L Rollover") PORT_CODE(KEYCODE_F)
r31857r31858
112129READ8_MEMBER( spectra_state::porta_r )
113130{
114131   char kbdrow[6];
115   UINT8 key=0, old=0, ret=0;
132   UINT8 key=0, ret=0;
116133   sprintf(kbdrow,"X%X",(m_porta & 0x18) >> 3);
117134   key = ioport(kbdrow)->read();
118135   ret = ((BIT(key, m_porta & 7)) ? 0x40 : 0) | (m_porta & 0xbf);
119136
120   if (ret == 0x1b && old != ret && m_p_ram[0x7b] < 0x1E)
121      m_samples->start(2, 4); // coin
122   old = ret;
137   if (ret == 0x1b && m_p_ram[0x7b] < 0x1E)
138      m_samples->start(3, 8); // coin
123139
124140   return ret;
125141}
r31857r31858
193209         m_samples->start(1, 0); // bumpers
194210   }
195211   else
212   if (m_out_offs < 0x79)
213   {
214      if (m_p_ram[m_out_offs])
215         m_samples->start(2, 7); // slings
216   }
217   else
196218      m_out_offs = 0xff;
197219}
198220
r31857r31858
226248
227249static MACHINE_CONFIG_START( spectra, spectra_state )
228250   /* basic machine hardware */
229   MCFG_CPU_ADD("maincpu", M6502, 3579545/4)  // actually a 6503
251   MCFG_CPU_ADD("maincpu", M6502, 3579545/4)  // actually a M6503
230252   MCFG_CPU_PROGRAM_MAP(spectra_map)
231253
232254   MCFG_DEVICE_ADD("riot", RIOT6532, 3579545/4)
r31857r31858
249271   MCFG_SPEAKER_STANDARD_MONO("mono")
250272   MCFG_SOUND_ADD("snsnd", SN76477, 0)
251273   MCFG_SOUND_CONFIG(sn76477_intf)
252   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
274   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
253275MACHINE_CONFIG_END
254276
255277/*--------------------------------
r31857r31858
263285ROM_END
264286
265287
266GAME(1979,  spectra,  0,  spectra,  spectra, driver_device, 0,  ROT0,  "Valley", "Spectra IV", GAME_MECHANICAL)
288GAME(1979,  spectra,  0,  spectra,  spectra, driver_device, 0,  ROT0,  "Valley", "Spectra IV", GAME_MECHANICAL )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team