Previous 199869 Revisions Next

r18189 Friday 28th September, 2012 at 11:16:54 UTC by Robbbert
SPECTRA - added remaining sounds, game marked as WORKING [Robbbert]
[src/mame/drivers]spectra.c
[src/mame/layout]spectra.lay

trunk/src/mame/layout/spectra.lay
r18188r18189
1818   </element>
1919   <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2020   <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
21   <element name="P2"><text string="Player"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2122   <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2223   <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2324   <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
r18188r18189
134135      </bezel>
135136      <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
136137      <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
138      <bezel element="P2"><bounds left="100" right="180" top="330" bottom="342" /></bezel>
137139      <bezel element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel>
138140      <bezel element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
139141      <bezel element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
trunk/src/mame/drivers/spectra.c
r18188r18189
44
55    Rotating game, like Midway's "Rotation VIII".
66
7    2012-09-28 System working [Robbbert]
8
79    Schematic and PinMAME used as references.
10    Code for the sn76477 sound was derived from PinMAME.
811
12    There is a bug - if you score 1000 and had less than 100, the hundreds digit will
13    be blank. It will of course fix itself during the course of the game.
914
15
1016*******************************************************************************************/
1117
1218
r18188r18189
1420#include "cpu/m6502/m6502.h"
1521#include "machine/6532riot.h"
1622#include "machine/nvram.h"
23#include "sound/sn76477.h"
1724#include "spectra.lh"
1825
1926
r18188r18189
2330   spectra_state(const machine_config &mconfig, device_type type, const char *tag)
2431      : driver_device(mconfig, type, tag),
2532   m_maincpu(*this, "maincpu"),
33   m_snsnd(*this, "snsnd"),
2634   m_p_ram(*this, "ram"),
2735   m_samples(*this, "samples")
2836   { }
r18188r18189
3745
3846   // devices
3947   required_device<cpu_device> m_maincpu;
48   required_device<sn76477_device> m_snsnd;
4049   required_shared_ptr<UINT8> m_p_ram;
4150   required_device<samples_device> m_samples;
4251
r18188r18189
137146WRITE8_MEMBER( spectra_state::portb_w )
138147{
139148   m_portb = data;
149   float vco = 5.0;
150   if (BIT(data, 0)) vco -= 0.3125;
151   if (BIT(data, 1)) vco -= 0.625;
152   if (BIT(data, 2)) vco -= 1.25;
153   if (BIT(data, 3)) vco -= 2.5;
154   sn76477_vco_voltage_w(m_snsnd, 5.4 - vco);
155   sn76477_enable_w(m_snsnd, !BIT(data, 4)); // strobe: toggles enable
156   sn76477_envelope_1_w(m_snsnd, !BIT(data, 5)); //decay: toggles envelope
157   sn76477_vco_w(m_snsnd, BIT(data, 6)); // "phaser" sound: VCO toggled
158   sn76477_mixer_b_w(m_snsnd, BIT(data, 7)); // "pulse" sound: pins 25 & 27 changed
159   sn76477_mixer_c_w(m_snsnd, BIT(data, 7)); // "pulse" sound: pins 25 & 27 changed
140160}
141161
142162
r18188r18189
159179
160180// 00-27 displays
161181// 40-6F lamps
162// 70-7F solenoids (73=outhole) no knocker
182// 70-7F solenoids - no knocker
163183TIMER_DEVICE_CALLBACK_MEMBER( spectra_state::outtimer)
164184{
165185   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x5c, 0x63, 0x01, 0x40, 0x08, 0 }; // 74C912
r18188r18189
190210      m_out_offs = 0xff;
191211}
192212
213static const sn76477_interface sn76477_intf =
214{
215   RES_M(1000),   /*   4  noise_res      */
216   RES_M(1000),   /*   5  filter_res      */
217   CAP_N(0),   /*   6  filter_cap      */
218   RES_K(470),   /*   7  decay_res      */
219   CAP_N(1),   /*   8  attack_decay_cap */
220   RES_K(22),   /* 10  attack_res      */
221   RES_K(100),   /* 11  amplitude_res   */
222   RES_K(52),   /* 12  feedback_res    */
223   5.0,   /* 16  vco_voltage      */
224   CAP_U(0.01),   /* 17  vco_cap         */
225   RES_K(390),   /* 18  vco_res         */
226   0.0,  /* 19  pitch_voltage   */
227   RES_M(1),   /* 20  slf_res         */
228   CAP_U(0.1),   /* 21  slf_cap         */
229   CAP_U(0.47),   /* 23  oneshot_cap      */
230   RES_K(470),      /* 24  oneshot_res   */
231   0,             /* 22  vco (variable)               */
232   0,             /* 26  mixer A (grounded)           */
233   0,             /* 25  mixer B (variable)           */
234   0,             /* 27  mixer C (variable)           */
235   0,             /* 1   envelope 1 (variable)        */
236   0,             /* 28  envelope 2 (grounded)        */
237   1             /* 9   enable (variable)            */
238};
239
240
193241static MACHINE_CONFIG_START( spectra, spectra_state )
194242   /* basic machine hardware */
195243   MCFG_CPU_ADD("maincpu", M6502, 3579545/4)  // actually a 6503
r18188r18189
204252
205253   /* Sound */
206254   MCFG_FRAGMENT_ADD( genpin_audio )
255   MCFG_SOUND_ADD("snsnd", SN76477, 0)
256   MCFG_SOUND_CONFIG(sn76477_intf)
257   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
207258MACHINE_CONFIG_END
208259
209260/*--------------------------------
r18188r18189
218269ROM_END
219270
220271
221GAME(1979,  spectra,  0,  spectra,  spectra, driver_device, 0,  ROT0,  "Valley", "Spectra IV", GAME_IS_SKELETON_MECHANICAL)
272GAME(1979,  spectra,  0,  spectra,  spectra, driver_device, 0,  ROT0,  "Valley", "Spectra IV", GAME_MECHANICAL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team