1 // license:BSD-3-Clause
2 // copyright-holders:Brad Oliver, Bernd Wiebelt, Allard van der Bas
3 /***************************************************************************
4
5 Atari Black Widow hardware
6
7 Games supported:
8 * Space Duel
9 * Black Widow
10 * Gravitar
11
12 ****************************************************************************
13
14 Black Widow memory map (preliminary)
15
16 0000-04ff RAM
17 0800 COIN_IN
18 0a00 IN1
19 0c00 IN2
20
21 2000-27ff Vector generator RAM
22 5000-7fff ROM
23
24
25
26 BLACK WIDOW SWITCH SETTINGS (Atari, 1983)
27 -----------------------------------------
28
29 -------------------------------------------------------------------------------
30 Settings of 8-Toggle Switch on Black Widow CPU PCB (at D4)
31 8 7 6 5 4 3 2 1 Option
32 -------------------------------------------------------------------------------
33 Off Off 1 coin/1 credit <
34 On On 1 coin/2 credits
35 On Off 2 coins/1 credit
36 Off On Free play
37
38 Off Off Right coin mechanism x 1 <
39 On Off Right coin mechanism x 4
40 Off On Right coin mechanism x 5
41 On On Right coin mechanism x 6
42
43 Off Left coin mechanism x 1 <
44 On Left coin mechanism x 2
45
46 Off Off Off No bonus coins (0)* <
47 Off On On No bonus coins (6)
48 On On On No bonus coins (7)
49
50 On Off Off For every 2 coins inserted,
51 logic adds 1 more coin (1)
52 Off On Off For every 4 coins inserted,
53 logic adds 1 more coin (2)
54 On On Off For every 4 coins inserted,
55 logic adds 2 more coins (3)
56 Off Off On For every 5 coins inserted,
57 logic adds 1 more coin (4)
58 On Off On For every 3 coins inserted,
59 logic adds 1 more coin (5)
60
61 -------------------------------------------------------------------------------
62
63 * The numbers in parentheses will appear on the BONUS ADDER line in the
64 Operator Information Display (Figure 2-1) for these settings.
65 < Manufacturer's recommended setting
66
67 -------------------------------------------------------------------------------
68 Settings of 8-Toggle Switch on Black Widow CPU PCB (at B4)
69 8 7 6 5 4 3 2 1 Option
70
71 Note: The bits are the exact opposite of the switch numbers - switch 8 is bit 0.
72 -------------------------------------------------------------------------------
73 Off Off Maximum start at level 13
74 On Off Maximum start at level 21 <
75 Off On Maximum start at level 37
76 On On Maximum start at level 53
77
78 Off Off 3 spiders per game <
79 On Off 4 spiders per game
80 Off On 5 spiders per game
81 On On 6 spiders per game
82
83 Off Off Easy game play
84 On Off Medium game play <
85 Off On Hard game play
86 On On Demonstration mode
87
88 Off Off Bonus spider every 20,000 points <
89 On Off Bonus spider every 30,000 points
90 Off On Bonus spider every 40,000 points
91 On On No bonus
92
93 -------------------------------------------------------------------------------
94
95 < Manufacturer's recommended setting
96
97
98 GRAVITAR SWITCH SETTINGS (Atari, 1982)
99 --------------------------------------
100
101 -------------------------------------------------------------------------------
102 Settings of 8-Toggle Switch on Gravitar PCB (at B4)
103 8 7 6 5 4 3 2 1 Option
104 -------------------------------------------------------------------------------
105 Off On Free play
106 On On 1 coin for 2 credits
107 Off Off 1 coin for 1 credit <
108 On Off 2 coins for 1 credit
109
110 Off Off Right coin mechanism x 1 <
111 On Off Right coin mechanism x 4
112 Off On Right coin mechanism x 5
113 On On Right coin mechanism x 6
114
115 Off Left coin mechanism x 1 <
116 On Left coin mechanism x 2
117
118 Off Off Off No bonus coins <
119
120 Off On Off For every 4 coins inserted,
121 logic adds 1 more coin
122 On On Off For every 4 coins inserted,
123 logic adds 2 more coins
124 Off Off On For every 5 coins inserted,
125 logic adds 1 more coin
126 On Off On For every 3 coins inserted,
127 logic adds 1 more coin
128
129 Off On On No bonus coins
130 On Off Off ??? (not in manual!)
131 On On On No bonus coins
132
133 -------------------------------------------------------------------------------
134
135 < Manufacturer's recommended setting
136
137 -------------------------------------------------------------------------------
138 Settings of 8-Toggle Switch on Gravitar PCB (at D4)
139 8 7 6 5 4 3 2 1 Option
140 -------------------------------------------------------------------------------
141 On On No bonus
142 Off Off Bonus ship every 10,000 points <
143 d d d On Off Bonus ship every 20,000 points
144 e e e Off On Bonus ship every 30,000 points
145 s s s
146 U U On U Easy game play <
147 Off Hard game play
148 t t t
149 o o Off Off o 3 ships per game
150 N N On Off N 4 ships per game <
151 Off On 5 ships per game
152 On On 6 ships per game
153
154 -------------------------------------------------------------------------------
155
156 < Manufacturer's recommended setting
157
158 Space Duel Settings
159 -------------------
160
161 (Settings of 8-Toggle Switch on Space Duel game PCB at D4)
162 Note: The bits are the exact opposite of the switch numbers - switch 8 is bit 0.
163
164 8 7 6 5 4 3 2 1 Option
165 On Off 3 ships per game
166 Off Off 4 ships per game $
167 On On 5 ships per game
168 Off On 6 ships per game
169 On Off *Easy game difficulty
170 Off Off Normal game difficulty $
171 On On Medium game difficulty
172 Off On Hard game difficulty
173 Off Off English $
174 On Off German
175 On On Spanish
176 Off On French
177 Bonus life granted every:
178 Off On 8,000 points
179 Off Off 10,000 points
180 On Off 15,000 points
181 On On No bonus life
182
183 $Manufacturer's suggested settings
184 *Easy-In the beginning of the first wave, 3 targets appear on the
185 screen. Targets increase by one in each new wave.
186 Normal-Space station action is the same as 'Easy'. Fighter action has
187 4 targets in the beginning of the first wave. Targets increase by 2
188 in each new wave. Targets move faster and more targets enter.
189 Medium and Hard-In the beginning of the first wave, 4 targets appear
190 on the screen. Targets increase by 2 in each new wave. As difficulty
191 increases, targets move faster, and more targets enter.
192
193
194 (Settings of 8-Toggle Switch on Space Duel game PCB at B4)
195 8 7 6 5 4 3 2 1 Option
196 Off On Free play
197 Off Off *1 coin for 1 game (or 1 player) $
198 On On 1 coin for 2 game (or 2 players)
199 On Off 2 coins for 1 game (or 1 player)
200 Off Off Right coin mech x 1 $
201 On Off Right coin mech x 4
202 Off On Right coin mech x 5
203 On On Right coin mech x 6
204 Off Left coin mech x 1 $
205 On Left coin mech x 2
206 Off Off Off No bonus coins $
207 Off On Off For every 4 coins, game logic adds 1 more coin
208 On On Off For every 4 coins, game logic adds 2 more coin
209 Off On On For every 5 coins, game logic adds 1 more coin
210 On Off On**For every 3 coins, game logic adds 1 more coin
211
212 $Manufacturer's suggested settings
213
214 **In operator Information Display, this option displays same as no bonus.
215
216 2008-07
217 Dip locations added from the notes above
218
219 ***************************************************************************/
220
221 #include "emu.h"
222 #include "includes/bwidow.h"
223
224 #include "cpu/m6502/m6502.h"
225 #include "machine/watchdog.h"
226 #include "video/vector.h"
227 #include "video/avgdvg.h"
228 #include "sound/pokey.h"
229 #include "sound/discrete.h"
230
231 #include "screen.h"
232
233
234
235 #define IN_LEFT (1 << 0)
236 #define IN_RIGHT (1 << 1)
237 #define IN_FIRE (1 << 2)
238 #define IN_SHIELD (1 << 3)
239 #define IN_THRUST (1 << 4)
240 #define IN_P1 (1 << 5)
241 #define IN_P2 (1 << 6)
242 #define OPTION_1_PLAYER_GAME_ONLY (1 << 2)
243 #define OPTION_2_CREDIT_MINIMUM (1 << 1)
244 #define OPTION_CHARGE_BY_ (1 << 0)
245
246
247 /*************************************
248 *
249 * Input ports
250 *
251 *************************************/
252
253 /*
254
255 These 7 memory locations are used to read the 2 players' controls as well
256 as sharing some dipswitch info in the lower 4 bits pertaining to coins/credits
257 Typically, only the high 2 bits are read.
258
259 */
260
spacduel_IN3_r(offs_t offset)261 uint8_t bwidow_state::spacduel_IN3_r(offs_t offset)
262 {
263 int res;
264 int res1;
265 int res2;
266 int res3;
267
268 res1 = m_in3->read();
269 res2 = m_in4->read();
270 res3 = m_dsw2.read_safe(0);
271 res = 0x00;
272
273 switch (offset & 0x07)
274 {
275 case 0:
276 if (res1 & IN_SHIELD) res |= 0x80;
277 if (res1 & IN_FIRE) res |= 0x40;
278 break;
279 case 1: /* Player 2 */
280 if (res2 & IN_SHIELD) res |= 0x80;
281 if (res2 & IN_FIRE) res |= 0x40;
282 break;
283 case 2:
284 if (res1 & IN_LEFT) res |= 0x80;
285 if (res1 & IN_RIGHT) res |= 0x40;
286 break;
287 case 3: /* Player 2 */
288 if (res2 & IN_LEFT) res |= 0x80;
289 if (res2 & IN_RIGHT) res |= 0x40;
290 break;
291 case 4:
292 if (res1 & IN_THRUST) res |= 0x80;
293 if (res1 & IN_P1) res |= 0x40;
294 break;
295 case 5: /* Player 2 */
296 if (res2 & IN_THRUST) res |= 0x80;
297 if ((res3 & OPTION_CHARGE_BY_) == 0) res |= 0x40;
298 break;
299 case 6:
300 if (res1 & IN_P2) res |= 0x80;
301 if ((res3 & OPTION_2_CREDIT_MINIMUM) == 0) res |= 0x40;
302 break;
303 case 7:
304 res = (0x00 /* upright */ | (0 & 0x40));
305 if ((res3 & OPTION_1_PLAYER_GAME_ONLY) == 0) res |= 0x40;
306 break;
307 }
308
309 return res;
310 }
311
READ_LINE_MEMBER(bwidow_state::clock_r)312 READ_LINE_MEMBER(bwidow_state::clock_r)
313 {
314 return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
315 }
316
bwidowp_in_r()317 uint8_t bwidow_state::bwidowp_in_r()
318 {
319 return (m_in4->read() & 0x0f) | ((m_in3->read() & 0x0f) << 4);
320 }
321
322 /*************************************
323 *
324 * Output ports
325 *
326 *************************************/
327
bwidow_misc_w(uint8_t data)328 void bwidow_state::bwidow_misc_w(uint8_t data)
329 {
330 /*
331 0x10 = p1 led
332 0x20 = p2 led
333 0x01 = coin counter 1
334 0x02 = coin counter 2
335 */
336
337 if (data == m_lastdata) return;
338 m_leds[0] = BIT(~data, 4);
339 m_leds[1] = BIT(~data, 5);
340 machine().bookkeeping().coin_counter_w(0, data & 0x01);
341 machine().bookkeeping().coin_counter_w(1, data & 0x02);
342 m_lastdata = data;
343 }
344
spacduel_coin_counter_w(uint8_t data)345 void bwidow_state::spacduel_coin_counter_w(uint8_t data)
346 {
347 if (data == m_lastdata) return;
348 m_leds[0] = BIT(~data, 5); // start lamp
349 m_leds[1] = BIT(~data, 4); // select lamp
350 machine().bookkeeping().coin_lockout_w(0, !BIT(data,3));
351 machine().bookkeeping().coin_lockout_w(1, !BIT(data,3));
352 machine().bookkeeping().coin_lockout_w(2, !BIT(data,3));
353 machine().bookkeeping().coin_counter_w(0, BIT(data,0));
354 machine().bookkeeping().coin_counter_w(1, BIT(data,1));
355 machine().bookkeeping().coin_counter_w(2, BIT(data,2));
356 m_lastdata = data;
357 }
358
359 /*************************************
360 *
361 * High score EAROM
362 *
363 *************************************/
364
earom_read()365 uint8_t bwidow_state::earom_read()
366 {
367 return m_earom->data();
368 }
369
earom_write(offs_t offset,uint8_t data)370 void bwidow_state::earom_write(offs_t offset, uint8_t data)
371 {
372 m_earom->set_address(offset & 0x3f);
373 m_earom->set_data(data);
374 }
375
earom_control_w(uint8_t data)376 void bwidow_state::earom_control_w(uint8_t data)
377 {
378 // CK = DB0, C1 = /DB2, C2 = DB1, CS1 = DB3, /CS2 = GND
379 m_earom->set_control(BIT(data, 3), 1, !BIT(data, 2), BIT(data, 1));
380 m_earom->set_clk(BIT(data, 0));
381 }
382
machine_reset()383 void bwidow_state::machine_reset()
384 {
385 earom_control_w(0);
386 }
387
388
389 /*************************************
390 *
391 * Interrupt ack
392 *
393 *************************************/
394
irq_ack_w(uint8_t data)395 void bwidow_state::irq_ack_w(uint8_t data)
396 {
397 m_maincpu->set_input_line(0, CLEAR_LINE);
398 }
399
400
401 /*************************************
402 *
403 * Main CPU memory handlers
404 *
405 *************************************/
406
bwidow_map(address_map & map)407 void bwidow_state::bwidow_map(address_map &map)
408 {
409 map(0x0000, 0x07ff).ram();
410 map(0x2000, 0x27ff).ram().share("avg:vectorram").region("maincpu", 0x2000);
411 map(0x2800, 0x5fff).rom();
412 map(0x6000, 0x67ff).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
413 map(0x6800, 0x6fff).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
414 map(0x7000, 0x7000).r(FUNC(bwidow_state::earom_read));
415 map(0x7800, 0x7800).portr("IN0");
416 map(0x8000, 0x8000).portr("IN3");
417 map(0x8800, 0x8800).portr("IN4");
418 map(0x8800, 0x8800).w(FUNC(bwidow_state::bwidow_misc_w)); /* coin counters, leds */
419 map(0x8840, 0x8840).w("avg", FUNC(avg_device::go_w));
420 map(0x8880, 0x8880).w("avg", FUNC(avg_device::reset_w));
421 map(0x88c0, 0x88c0).w(FUNC(bwidow_state::irq_ack_w)); /* interrupt acknowledge */
422 map(0x8900, 0x8900).w(FUNC(bwidow_state::earom_control_w));
423 map(0x8940, 0x897f).w(FUNC(bwidow_state::earom_write));
424 map(0x8980, 0x89ed).nopw(); /* watchdog clear */
425 map(0x9000, 0xffff).rom();
426 }
427
bwidowp_map(address_map & map)428 void bwidow_state::bwidowp_map(address_map &map)
429 {
430 map(0x0000, 0x07ff).ram();
431 map(0x0800, 0x080f).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
432 map(0x0810, 0x081f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
433 map(0x1000, 0x1000).r(FUNC(bwidow_state::bwidowp_in_r));
434 map(0x1800, 0x1800).portr("IN0");
435 map(0x2000, 0x2000).w("avg", FUNC(avg_device::go_w));
436 map(0x2800, 0x2800).w("avg", FUNC(avg_device::reset_w));
437 map(0x3000, 0x3000).w("watchdog", FUNC(watchdog_timer_device::reset_w));
438 map(0x3800, 0x3800).w(FUNC(bwidow_state::bwidow_misc_w)); /* coin counters, leds */
439 map(0x4000, 0x47ff).ram().share("avg:vectorram").region("maincpu", 0x4000);
440 map(0x4800, 0x6fff).rom();
441 map(0x6000, 0x6000).w(FUNC(bwidow_state::irq_ack_w)); /* interrupt acknowledge */
442 map(0x8000, 0x803f).w(FUNC(bwidow_state::earom_write));
443 map(0x8800, 0x8800).w(FUNC(bwidow_state::earom_control_w));
444 map(0x9000, 0x9000).r(FUNC(bwidow_state::earom_read));
445 map(0x9800, 0x9800).nopw(); /* ? written once at startup */
446 map(0xa000, 0xffff).rom();
447 }
448
spacduel_map(address_map & map)449 void bwidow_state::spacduel_map(address_map &map)
450 {
451 map(0x0000, 0x03ff).ram();
452 map(0x0800, 0x0800).portr("IN0");
453 map(0x0900, 0x0907).r(FUNC(bwidow_state::spacduel_IN3_r)); /* IN1 */
454 map(0x0905, 0x0906).nopw(); /* ignore? */
455 map(0x0a00, 0x0a00).r(FUNC(bwidow_state::earom_read));
456 map(0x0c00, 0x0c00).w(FUNC(bwidow_state::spacduel_coin_counter_w)); /* coin out */
457 map(0x0c80, 0x0c80).w("avg", FUNC(avg_device::go_w));
458 map(0x0d00, 0x0d00).nopw(); /* watchdog clear */
459 map(0x0d80, 0x0d80).w("avg", FUNC(avg_device::reset_w));
460 map(0x0e00, 0x0e00).w(FUNC(bwidow_state::irq_ack_w)); /* interrupt acknowledge */
461 map(0x0e80, 0x0e80).w(FUNC(bwidow_state::earom_control_w));
462 map(0x0f00, 0x0f3f).w(FUNC(bwidow_state::earom_write));
463 map(0x1000, 0x10ff).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
464 map(0x1400, 0x14ff).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
465 map(0x2000, 0x27ff).ram().share("avg:vectorram").region("maincpu", 0x2000);
466 map(0x2800, 0x3fff).rom();
467 map(0x4000, 0xffff).rom();
468 }
469
470
471
472 /*************************************
473 *
474 * Port definitions
475 *
476 *************************************/
477
478 static INPUT_PORTS_START( bwidow )
479 PORT_START("IN0")
480 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) // To fit "Coin B" Dip Switch
481 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) // To fit "Coin A" Dip Switch
482 PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
483 PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
484 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
485 /* bit 6 is the VG HALT bit. We set it to "low" */
486 /* per default (busy vector processor). */
487 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
488 /* bit 7 is tied to a 3kHz clock */
PORT_READ_LINE_MEMBER(bwidow_state,clock_r)489 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
490
491 PORT_START("DSW0")
492 PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("D4:!7,!8")
493 PORT_DIPSETTING ( 0x01, DEF_STR( 2C_1C ) )
494 PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C ) )
495 PORT_DIPSETTING ( 0x03, DEF_STR( 1C_2C ) )
496 PORT_DIPSETTING ( 0x02, DEF_STR( Free_Play ) )
497 PORT_DIPNAME(0x0c, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("D4:!5,!6")
498 PORT_DIPSETTING ( 0x00, "*1" )
499 PORT_DIPSETTING ( 0x04, "*4" )
500 PORT_DIPSETTING ( 0x08, "*5" )
501 PORT_DIPSETTING ( 0x0c, "*6" )
502 PORT_DIPNAME(0x10, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("D4:!4")
503 PORT_DIPSETTING ( 0x00, "*1" )
504 PORT_DIPSETTING ( 0x10, "*2" )
505 PORT_DIPNAME(0xe0, 0x00, "Bonus Coins" ) PORT_DIPLOCATION("D4:!1,!2,!3")
506 PORT_DIPSETTING ( 0x80, "1 each 5" )
507 PORT_DIPSETTING ( 0x60, "2 each 4" )
508 PORT_DIPSETTING ( 0x40, "1 each 4" )
509 PORT_DIPSETTING ( 0xa0, "1 each 3" )
510 PORT_DIPSETTING ( 0x20, "1 each 2" )
511 PORT_DIPSETTING ( 0x00, DEF_STR( None ) )
512
513 PORT_START("DSW1")
514 PORT_DIPNAME(0x03, 0x01, "Max Start" ) PORT_DIPLOCATION("B4:!7,!8")
515 PORT_DIPSETTING ( 0x00, "Lev 13" )
516 PORT_DIPSETTING ( 0x01, "Lev 21" )
517 PORT_DIPSETTING ( 0x02, "Lev 37" )
518 PORT_DIPSETTING ( 0x03, "Lev 53" )
519 PORT_DIPNAME(0x0c, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("B4:!5,!6")
520 PORT_DIPSETTING ( 0x00, "3" )
521 PORT_DIPSETTING ( 0x04, "4" )
522 PORT_DIPSETTING ( 0x08, "5" )
523 PORT_DIPSETTING ( 0x0c, "6" )
524 PORT_DIPNAME(0x30, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("B4:!3,!4")
525 PORT_DIPSETTING ( 0x00, DEF_STR( Easy ) )
526 PORT_DIPSETTING ( 0x10, DEF_STR( Medium ) )
527 PORT_DIPSETTING ( 0x20, DEF_STR( Hard ) )
528 PORT_DIPSETTING ( 0x30, "Demo" )
529 PORT_DIPNAME(0xc0, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("B4:!1,!2")
530 PORT_DIPSETTING ( 0x00, "20000" )
531 PORT_DIPSETTING ( 0x40, "30000" )
532 PORT_DIPSETTING ( 0x80, "40000" )
533 PORT_DIPSETTING ( 0xc0, DEF_STR( None ) )
534
535 PORT_START("IN3") /* IN3 - Movement joystick */
536 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY
537 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
538 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY
539 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
540 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
541 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
542 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
543 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
544
545 PORT_START("IN4") /* IN4 - Firing joystick */
546 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
547 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
548 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY
549 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
550 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
551 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
552 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
553 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
554 INPUT_PORTS_END
555
556 static INPUT_PORTS_START( gravitar )
557 PORT_START("IN0")
558 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) // To fit "Coin B" Dip Switch
559 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) // To fit "Coin A" Dip Switch
560 PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
561 PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
562 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
563 /* bit 6 is the VG HALT bit. We set it to "low" */
564 /* per default (busy vector processor). */
565 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
566 /* bit 7 is tied to a 3kHz clock */
567 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
568
569 PORT_START("DSW0")
570 PORT_DIPUNUSED_DIPLOC( 0x03, IP_ACTIVE_HIGH, "D4:!7,!8" )
571 PORT_DIPNAME(0x0c, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!5,!6")
572 PORT_DIPSETTING ( 0x00, "3" )
573 PORT_DIPSETTING ( 0x04, "4" )
574 PORT_DIPSETTING ( 0x08, "5" )
575 PORT_DIPSETTING ( 0x0c, "6" )
576 PORT_DIPNAME(0x10, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("D4:!4")
577 PORT_DIPSETTING ( 0x00, DEF_STR( Easy ) )
578 PORT_DIPSETTING ( 0x10, DEF_STR( Hard ) )
579 PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_HIGH, "D4:!3" )
580 PORT_DIPNAME(0xc0, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("D4:!1,!2")
581 PORT_DIPSETTING ( 0x00, "10000" )
582 PORT_DIPSETTING ( 0x40, "20000" )
583 PORT_DIPSETTING ( 0x80, "30000" )
584 PORT_DIPSETTING ( 0xc0, DEF_STR( None ) )
585
586 PORT_START("DSW1")
587 PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("B4:!7,!8")
588 PORT_DIPSETTING ( 0x01, DEF_STR( 2C_1C ) )
589 PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C ) )
590 PORT_DIPSETTING ( 0x03, DEF_STR( 1C_2C ) )
591 PORT_DIPSETTING ( 0x02, DEF_STR( Free_Play ) )
592 PORT_DIPNAME(0x0c, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("B4:!5,!6")
593 PORT_DIPSETTING ( 0x00, "*1" )
594 PORT_DIPSETTING ( 0x04, "*4" )
595 PORT_DIPSETTING ( 0x08, "*5" )
596 PORT_DIPSETTING ( 0x0c, "*6" )
597 PORT_DIPNAME(0x10, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("B4:!4")
598 PORT_DIPSETTING ( 0x00, "*1" )
599 PORT_DIPSETTING ( 0x10, "*2" )
600 PORT_DIPNAME(0xe0, 0x00, "Bonus Coins" ) PORT_DIPLOCATION("B4:!1,!2,!3")
601 PORT_DIPSETTING ( 0x80, "1 each 5" )
602 PORT_DIPSETTING ( 0x60, "2 each 4" )
603 PORT_DIPSETTING ( 0x40, "1 each 4" )
604 PORT_DIPSETTING ( 0xa0, "1 each 3" )
605 PORT_DIPSETTING ( 0x20, "1 each 2" )
606 PORT_DIPSETTING ( 0x00, DEF_STR( None ) )
607
608 PORT_START("IN3")
609 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
610 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
611 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
612 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
613 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
614 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
615 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
616 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
617
618 PORT_START("IN4")
619 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
620 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
621 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
622 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
623 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
624 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
625 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
626 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
627 INPUT_PORTS_END
628
629
630 static INPUT_PORTS_START( lunarbat )
631 PORT_START("IN0")
632 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) // To be similar with other games
633 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) // To be similar with other games
634 PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
635 PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
636 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
637 /* bit 6 is the VG HALT bit. We set it to "low" */
638 /* per default (busy vector processor). */
639 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
640 /* bit 7 is tied to a 3kHz clock */
641 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
642
643 PORT_START("DSW0") /* DSW0 - Not read */
644 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
645
646 PORT_START("DSW1") /* DSW1 - Not read */
647 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
648
649 PORT_START("IN3")
650 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
651 PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
652 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
653 PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 )
654 PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
655 PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
656 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
657 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
658
659 PORT_START("IN4") /* IN4 - Not read */
660 PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
661 INPUT_PORTS_END
662
663
664 static INPUT_PORTS_START( spacduel )
665 PORT_START("IN0")
666 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) // To fit "Coin B" Dip Switch
667 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) // To fit "Coin A" Dip Switch
668 PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
669 PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
670 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
671 /* bit 6 is the VG HALT bit. We set it to "low" */
672 /* per default (busy vector processor). */
673 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
674 /* bit 7 is tied to a 3kHz clock */
675 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
676
677 PORT_START("DSW0")
678 PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!7,!8")
679 PORT_DIPSETTING ( 0x01, "3" )
680 PORT_DIPSETTING ( 0x00, "4" )
681 PORT_DIPSETTING ( 0x03, "5" )
682 PORT_DIPSETTING ( 0x02, "6" )
683 PORT_DIPNAME(0x0c, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("D4:!5,!6")
684 PORT_DIPSETTING ( 0x04, DEF_STR( Easy ) )
685 PORT_DIPSETTING ( 0x00, DEF_STR( Normal ) )
686 PORT_DIPSETTING ( 0x0c, DEF_STR( Medium ) )
687 PORT_DIPSETTING ( 0x08, DEF_STR( Hard ) )
688 PORT_DIPNAME(0x30, 0x00, DEF_STR( Language ) ) PORT_DIPLOCATION("D4:!3,!4")
689 PORT_DIPSETTING ( 0x00, DEF_STR( English ) )
690 PORT_DIPSETTING ( 0x10, DEF_STR( German ) )
691 PORT_DIPSETTING ( 0x20, DEF_STR( French ) )
692 PORT_DIPSETTING ( 0x30, DEF_STR( Spanish ) )
693 PORT_DIPNAME(0xc0, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("D4:!1,!2")
694 PORT_DIPSETTING ( 0xc0, "8000" )
695 PORT_DIPSETTING ( 0x00, "10000" )
696 PORT_DIPSETTING ( 0x40, "15000" )
697 PORT_DIPSETTING ( 0x80, DEF_STR( None ) )
698
699 PORT_START("DSW1")
700 PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("B4:!7,!8")
701 PORT_DIPSETTING ( 0x01, DEF_STR( 2C_1C ) )
702 PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C ) )
703 PORT_DIPSETTING ( 0x03, DEF_STR( 1C_2C ) )
704 PORT_DIPSETTING ( 0x02, DEF_STR( Free_Play ) )
705 PORT_DIPNAME(0x0c, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("B4:!5,!6")
706 PORT_DIPSETTING ( 0x00, "*1" )
707 PORT_DIPSETTING ( 0x04, "*4" )
708 PORT_DIPSETTING ( 0x08, "*5" )
709 PORT_DIPSETTING ( 0x0c, "*6" )
710 PORT_DIPNAME(0x10, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("B4:!4")
711 PORT_DIPSETTING ( 0x00, "*1" )
712 PORT_DIPSETTING ( 0x10, "*2" )
713 PORT_DIPNAME(0xe0, 0x00, "Bonus Coins" ) PORT_DIPLOCATION("B4:!1,!2,!3")
714 PORT_DIPSETTING ( 0x80, "1 each 5" )
715 PORT_DIPSETTING ( 0x60, "2 each 4" )
716 PORT_DIPSETTING ( 0x40, "1 each 4" )
717 PORT_DIPSETTING ( 0xa0, "1 each 3" )
718 PORT_DIPSETTING ( 0x20, "1 each 2" )
719 PORT_DIPSETTING ( 0x00, DEF_STR( None ) )
720
721 PORT_START("DSW2")
722 // Although a dip switch 1 setting is shown in the Space Duel - Operation, Maintenance, and Service Manual,
723 // this switch is not connected to anything on the PCB or in the schematics
724 PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "P10/11:!1")
725 PORT_DIPNAME( 0x04, 0x04, "1-player game only" ) PORT_DIPLOCATION("P10/11:!2")
726 PORT_DIPSETTING ( 0x04, DEF_STR( Off ) )
727 PORT_DIPSETTING ( 0x00, DEF_STR( On ) )
728 PORT_DIPNAME( 0x02, 0x02, "2-credit minimum" ) PORT_DIPLOCATION("P10/11:!3")
729 PORT_DIPSETTING ( 0x02, DEF_STR( Off ) )
730 PORT_DIPSETTING ( 0x00, DEF_STR( On ) )
731 PORT_DIPNAME( 0x01, 0x01, "Charge by ..." ) PORT_DIPLOCATION("P10/11:!4")
732 PORT_DIPSETTING ( 0x01, "player" )
733 PORT_DIPSETTING ( 0x00, "game" )
734
735 /* See machine/spacduel.c for more info on these 2 ports */
736 PORT_START("IN3") /* IN3 - Player 1 - spread over 8 memory locations */
737 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
738 PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
739 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
740 PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
741 PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
742 PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start")
743 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Select")
744 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
745
746 PORT_START("IN4") /* IN4 - Player 2 - spread over 8 memory locations */
747 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
748 PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
749 PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
750 PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
751 PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
752 PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
753 PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
754 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
755 INPUT_PORTS_END
756
757
758
759
760 /*************************************
761 *
762 * Machine drivers
763 *
764 *************************************/
765
766 void bwidow_state::bwidow(machine_config &config)
767 {
768 /* basic machine hardware */
769 M6502(config, m_maincpu, MASTER_CLOCK / 8);
770 m_maincpu->set_addrmap(AS_PROGRAM, &bwidow_state::bwidow_map);
771 m_maincpu->set_periodic_int(FUNC(bwidow_state::irq0_line_assert), attotime::from_hz(CLOCK_3KHZ / 12));
772
773 ER2055(config, m_earom);
774
775 /* video hardware */
776 VECTOR(config, "vector", 0);
777 screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR));
778 screen.set_refresh_hz(CLOCK_3KHZ / 12 / 4);
779 screen.set_size(400, 300);
780 screen.set_visarea(0, 480, 0, 440);
781 screen.set_screen_update("vector", FUNC(vector_device::screen_update));
782
783 avg_device &avg(AVG(config, "avg", 0));
784 avg.set_vector_tag("vector");
785
786 /* sound hardware */
787 bwidow_audio(config);
788
789 }
790
bwidowp(machine_config & config)791 void bwidow_state::bwidowp(machine_config &config)
792 {
793 bwidow(config);
794 m_maincpu->set_addrmap(AS_PROGRAM, &bwidow_state::bwidowp_map);
795
796 WATCHDOG_TIMER(config, "watchdog");
797 }
798
gravitar(machine_config & config)799 void bwidow_state::gravitar(machine_config &config)
800 {
801 bwidow(config);
802
803 /* basic machine hardware */
804
805 /* video hardware */
806 subdevice<screen_device>("screen")->set_visarea(0, 420, 0, 400);
807
808 /* sound hardware */
809 gravitar_audio(config);
810 }
811
812
lunarbat(machine_config & config)813 void bwidow_state::lunarbat(machine_config &config)
814 {
815 gravitar(config);
816
817 /* basic machine hardware */
818 m_maincpu->set_addrmap(AS_PROGRAM, &bwidow_state::spacduel_map);
819
820 /* video hardware */
821 subdevice<screen_device>("screen")->set_visarea(0, 500, 0, 440);
822 }
823
824
spacduel(machine_config & config)825 void bwidow_state::spacduel(machine_config &config)
826 {
827 gravitar(config);
828
829 /* basic machine hardware */
830 m_maincpu->set_addrmap(AS_PROGRAM, &bwidow_state::spacduel_map);
831
832 /* video hardware */
833 subdevice<screen_device>("screen")->set_visarea(0, 540, 0, 400);
834 }
835
836
837
838 /*************************************
839 *
840 * ROM definitions
841 *
842 *************************************/
843
844 ROM_START( bwidow )
845 ROM_REGION( 0x10000, "maincpu", 0 )
846 /* Vector ROM */
847 ROM_LOAD( "136017-107.l7", 0x2800, 0x0800, CRC(97f6000c) SHA1(bbae93058228820ee67b05f23e45fb54ee0963ff) )
848 ROM_LOAD( "136017-108.mn7", 0x3000, 0x1000, CRC(3da354ed) SHA1(935295d66ad40ad702eb7a694296e836f53d22ec) )
849 ROM_LOAD( "136017-109.np7", 0x4000, 0x1000, CRC(2fc4ce79) SHA1(2b324877bf55151747eaacd9a58f846712bfbc14) )
850 ROM_LOAD( "136017-110.r7", 0x5000, 0x1000, CRC(0dd52987) SHA1(72aa1d24f20cc86701189df486488edc434b1be1) )
851 /* Program ROM */
852 ROM_LOAD( "136017-101.d1", 0x9000, 0x1000, CRC(fe3febb7) SHA1(b62f7622ca60248e1b8376ee135ae3d94d0b4437) )
853 ROM_LOAD( "136017-102.ef1", 0xa000, 0x1000, CRC(10ad0376) SHA1(614c74daa468a7430ed965a3a9d07b6ad846016c) )
854 ROM_LOAD( "136017-103.h1", 0xb000, 0x1000, CRC(8a1430ee) SHA1(3aa6c40721a4289c1cf01f37c89b6b0a96336c68) )
855 ROM_LOAD( "136017-104.j1", 0xc000, 0x1000, CRC(44f9943f) SHA1(e83d8242e4592149719be6a68cf3aba46116072f) )
856 ROM_LOAD( "136017-105.kl1", 0xd000, 0x1000, CRC(1fdf801c) SHA1(33da2ba3cefa3d0dddc8647f9b6caf5d5bfe9b3b) )
857 ROM_LOAD( "136017-106.m1", 0xe000, 0x1000, CRC(ccc9b26c) SHA1(f1398e3ff2b62af1509bc117028845b671ff1ca2) )
858 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
859
860 /* AVG PROM */
861 ROM_REGION( 0x100, "avg:prom", 0 )
862 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
863 ROM_END
864
865 ROM_START( bwidowp )
866 ROM_REGION( 0x10000, "maincpu", 0 )
867 /* Vector ROM */
868 ROM_LOAD( "vg4800", 0x4800, 0x0800, CRC(12c0e382) SHA1(b0a899d013ad00ff5f861da9897780c5f0c5d221) )
869 ROM_LOAD( "vg5000", 0x5000, 0x1000, CRC(7009106a) SHA1(d41d147eccb2bb4e0a3e9bb184c2bfd09c80b92f) )
870 ROM_RELOAD( 0x6000, 0x1000 )
871 /* Program ROM */
872 ROM_LOAD( "a000", 0xa000, 0x1000, CRC(ebe0ace2) SHA1(fa919797c243d06761e3fa04b548679b310f0542) )
873 ROM_LOAD( "b000", 0xb000, 0x1000, CRC(b14f33e2) SHA1(f8b2c6cc6907b379786e246ccd559316d3edffb3) )
874 ROM_LOAD( "c000", 0xc000, 0x1000, CRC(79b8af00) SHA1(53e31962d2124bfe06afc6374d5fb2d87bf9e952) )
875 ROM_LOAD( "d000", 0xd000, 0x1000, CRC(10ac77c3) SHA1(f7b832974c224341f67fc4c3d151d8978774b462) )
876 ROM_LOAD( "e000", 0xe000, 0x1000, CRC(dfdda385) SHA1(ac77411722842033027b1717ac1b494507153e55) )
877 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
878
879 /* AVG PROM */
880 ROM_REGION( 0x100, "avg:prom", 0 )
881 ROM_LOAD( "avgsmr", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
882
883 /* Proms */
884 ROM_REGION( 0x100, "proms", 0 )
885 ROM_LOAD_NIB_LOW( "negrom.lo", 0x0000, 0x0100, CRC(aeb9cde1) SHA1(d4fe4f59481f21260b4c1ce9779574784eccb460) )
886 ROM_LOAD_NIB_HIGH( "negrom.hi", 0x0000, 0x0100, CRC(08f0112b) SHA1(a457f2968a343891818d271231f61b17b7826c53) )
887 ROM_END
888
889 ROM_START( gravitar )
890 ROM_REGION( 0x10000, "maincpu", 0 )
891 /* Vector ROM */
892 ROM_LOAD( "136010-210.l7", 0x2800, 0x0800, CRC(debcb243) SHA1(2c50cd38d60739c126f1d0d8e7fbd46a0bde6e1c) )
893 ROM_LOAD( "136010-207.mn7", 0x3000, 0x1000, CRC(4135629a) SHA1(301ddb7a34b38140a1fdffc060cb08ff57f10cf1) )
894 ROM_LOAD( "136010-208.np7", 0x4000, 0x1000, CRC(358f25d9) SHA1(9c2920cf2b73a93ac2808be654b08505037f53b1) )
895 ROM_LOAD( "136010-309.r7", 0x5000, 0x1000, CRC(4ac78df4) SHA1(5164f2a54244ce1e863d1ec0dd29bc9da7103a85) )
896 /* Program ROM */
897 ROM_LOAD( "136010-301.d1", 0x9000, 0x1000, CRC(a2a55013) SHA1(800b52ead9f56a3e372797fbc698c8fc791398da) )
898 ROM_LOAD( "136010-302.ef1", 0xa000, 0x1000, CRC(d3700b3c) SHA1(b9e846db14fa23f8d2def97030d8b072b2bbc0be) )
899 ROM_LOAD( "136010-303.h1", 0xb000, 0x1000, CRC(8e12e3e0) SHA1(e09f58f6f36de6bf6724a1ab14ab35acbb0b3876) )
900 ROM_LOAD( "136010-304.j1", 0xc000, 0x1000, CRC(467ad5da) SHA1(822b06be6f2d6298b2b10161fbabbb2caa74b2ef) )
901 ROM_LOAD( "136010-305.kl1", 0xd000, 0x1000, CRC(840603af) SHA1(4a7124f91d3ee940686c51374a861efe6cb5d282) )
902 ROM_LOAD( "136010-306.m1", 0xe000, 0x1000, CRC(3f3805ad) SHA1(baf080deaa8eea43af2f3be71dacc63e4666c453) )
903 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
904
905 /* AVG PROM */
906 ROM_REGION( 0x100, "avg:prom", 0 )
907 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
908
909 /* Address decoding */
910 ROM_REGION( 0x100, "proms", 0 )
911 ROM_LOAD( "136010-111.r1", 0x0000, 0x0020, CRC(6bf2dc46) SHA1(9961ac36978154cf0a4e1c40d41f867ce1f0b1da) )
912 ROM_LOAD( "136010-112.r2", 0x0020, 0x0020, CRC(b6af29d1) SHA1(62f9cbbe8dd04f3a81516198d2d8d6eafe1f0986) )
913 ROM_END
914
915 ROM_START( gravitar2 )
916 ROM_REGION( 0x10000, "maincpu", 0 )
917 /* Vector ROM */
918 ROM_LOAD( "136010-210.l7", 0x2800, 0x0800, CRC(debcb243) SHA1(2c50cd38d60739c126f1d0d8e7fbd46a0bde6e1c) )
919 ROM_LOAD( "136010-207.mn7", 0x3000, 0x1000, CRC(4135629a) SHA1(301ddb7a34b38140a1fdffc060cb08ff57f10cf1) )
920 ROM_LOAD( "136010-208.np7", 0x4000, 0x1000, CRC(358f25d9) SHA1(9c2920cf2b73a93ac2808be654b08505037f53b1) )
921 ROM_LOAD( "136010-209.r7", 0x5000, 0x1000, CRC(37034287) SHA1(4de7478fb566fd75f99533507228611cecb1f11a) )
922 /* Program ROM */
923 ROM_LOAD( "136010-201.d1", 0x9000, 0x1000, CRC(167315e4) SHA1(35613e5a503fac7f451c201675669f417e15241b) )
924 ROM_LOAD( "136010-202.ef1", 0xa000, 0x1000, CRC(aaa9e62c) SHA1(87fc660adb22f812a764efc46ffcf5f934d5e333) )
925 ROM_LOAD( "136010-203.h1", 0xb000, 0x1000, CRC(ae437253) SHA1(e2402dc5fa755a05fa1d531a31b78e39e67f5cbe) )
926 ROM_LOAD( "136010-204.j1", 0xc000, 0x1000, CRC(5d6bc29e) SHA1(fdd442644209ab858eb4ed1b4cdeb1db26f80108) )
927 ROM_LOAD( "136010-205.kl1", 0xd000, 0x1000, CRC(0db1ff34) SHA1(288d9ffff9d18025621be249ea25a7444f58f3a9) )
928 ROM_LOAD( "136010-206.m1", 0xe000, 0x1000, CRC(4521ca48) SHA1(5770cb46c4ac28d632ad5910723a9edda8283ce5) )
929 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
930
931 /* AVG PROM */
932 ROM_REGION( 0x100, "avg:prom", 0 )
933 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
934
935 /* Address decoding */
936 ROM_REGION( 0x100, "proms", 0 )
937 ROM_LOAD( "136010-111.r1", 0x0000, 0x0020, CRC(6bf2dc46) SHA1(9961ac36978154cf0a4e1c40d41f867ce1f0b1da) )
938 ROM_LOAD( "136010-112.r2", 0x0020, 0x0020, CRC(b6af29d1) SHA1(62f9cbbe8dd04f3a81516198d2d8d6eafe1f0986) )
939 ROM_END
940
941 ROM_START( gravitar1 )
942 ROM_REGION( 0x10000, "maincpu", 0 )
943 /* Vector ROM */
944 ROM_LOAD( "136010-110.l7", 0x2800, 0x0800, CRC(1da0d845) SHA1(99bccae0521c105388784175c475035bf19270a7) )
945 ROM_LOAD( "136010-107.mn7", 0x3000, 0x1000, CRC(650ba31e) SHA1(7f855ea13e2041a87b64fdff4b7ee0d7d97e4401) )
946 ROM_LOAD( "136010-108.np7", 0x4000, 0x1000, CRC(5119c0b2) SHA1(ec8a7072d2b8e2626a19c0451ea5ddb27ad80594) )
947 ROM_LOAD( "136010-109.r7", 0x5000, 0x1000, CRC(defa8cbc) SHA1(ffd618d846c219fb641311f1d95ffc9f6fb5a240) )
948 /* Program ROM */
949 ROM_LOAD( "136010-101.d1", 0x9000, 0x1000, CRC(acbc0e2c) SHA1(2e0ff3b7ac9c0813e71942492146372bba382f1f) )
950 ROM_LOAD( "136010-102.ef1", 0xa000, 0x1000, CRC(88f98f8f) SHA1(c2174deed61ae8519a02c2ac8e2969f357733cfd) )
951 ROM_LOAD( "136010-103.h1", 0xb000, 0x1000, CRC(68a85703) SHA1(8a7956578cb6ebbeb74facedcbcb46f86ec92000) )
952 ROM_LOAD( "136010-104.j1", 0xc000, 0x1000, CRC(33d19ef6) SHA1(68f95e237427959d6ef64a5b4dd1e03db7389271) )
953 ROM_LOAD( "136010-105.kl1", 0xd000, 0x1000, CRC(032b5806) SHA1(b719792a177e74ec49e6952e445b9cdeaca7505f) )
954 ROM_LOAD( "136010-106.m1", 0xe000, 0x1000, CRC(47fe97a0) SHA1(7cbde4b59abde679c28d7547700b342f25762e4a) )
955 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
956
957 /* AVG PROM */
958 ROM_REGION( 0x100, "avg:prom", 0 )
959 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
960
961 /* Address decoding */
962 ROM_REGION( 0x100, "proms", 0 )
963 ROM_LOAD( "136010-111.r1", 0x0000, 0x0020, CRC(6bf2dc46) SHA1(9961ac36978154cf0a4e1c40d41f867ce1f0b1da) )
964 ROM_LOAD( "136010-112.r2", 0x0020, 0x0020, CRC(b6af29d1) SHA1(62f9cbbe8dd04f3a81516198d2d8d6eafe1f0986) )
965 ROM_END
966
967 ROM_START( lunarbat )
968 ROM_REGION( 0x10000, "maincpu", 0 )
969 /* Vector ROM */
970 ROM_LOAD( "136010-010.l7", 0x2800, 0x0800, CRC(48fd38aa) SHA1(e6ec31e784c2965369161c33d00903ba027f7f20) )
971 ROM_LOAD( "136010-007.mn7", 0x3000, 0x1000, CRC(9754830e) SHA1(2e6885155a93d4eaf9a405f3eb740f2f4b30bc23) )
972 ROM_LOAD( "136010-008.np7", 0x4000, 0x1000, CRC(084aa8db) SHA1(80050f981b9a673d336bbcf712faf21b7be7e042) )
973 /* Program ROM */
974 ROM_LOAD( "136010-001.d1", 0x9000, 0x1000, CRC(cd7e1780) SHA1(92265a548485d140b73ef542ad66dc32cb52d42b) )
975 ROM_LOAD( "136010-002.ef1", 0xa000, 0x1000, CRC(dc813a54) SHA1(c543cae3a3ba5b00e5a8714a42b2557bc6e730cf) )
976 ROM_LOAD( "136010-003.h1", 0xb000, 0x1000, CRC(8e1fecd3) SHA1(a43cb4ea77e095227590fcefa778688093dcf135) )
977 ROM_LOAD( "136010-004.j1", 0xc000, 0x1000, CRC(c407764f) SHA1(f202a9fe6c10975bb124b4b1e902341da578da8f) )
978 ROM_LOAD( "136010-005.kl1", 0xd000, 0x1000, CRC(4feb6f81) SHA1(b852f1093e56343225c1b2b2554a93c88fc58637) )
979 ROM_LOAD( "136010-006.m1", 0xe000, 0x1000, CRC(f8ad139d) SHA1(e9e0dcb0872b19af09825a979f8b3747c9632091) )
980 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
981
982 /* AVG PROM */
983 ROM_REGION( 0x100, "avg:prom", 0 )
984 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
985
986 /* Address decoding */
987 ROM_REGION( 0x100, "proms", 0 )
988 ROM_LOAD( "136010-011.r1", 0x0000, 0x0020, CRC(6bf2dc46) SHA1(9961ac36978154cf0a4e1c40d41f867ce1f0b1da) )
989 ROM_LOAD( "136010-012.r2", 0x0020, 0x0020, CRC(b6af29d1) SHA1(62f9cbbe8dd04f3a81516198d2d8d6eafe1f0986) )
990 ROM_END
991
992 ROM_START( lunarba1 )
993 ROM_REGION( 0x10000, "maincpu", 0 )
994 /* Vector ROM */
995 ROM_LOAD( "vrom1.bin", 0x2800, 0x0800, CRC(c60634d9) SHA1(b94f056b5e73a2e015ba9a4be66dc2abee325016) )
996 ROM_LOAD( "vrom2.bin", 0x3000, 0x1000, CRC(53d9a8a2) SHA1(c33766658dd3523e99e664ef42a4ba4ab884fa80) )
997 /* Program ROM */
998 ROM_LOAD( "rom0.bin", 0x4000, 0x1000, CRC(cc4691c6) SHA1(72f75c75ec3f36c5c455c82593659961b5882f9f) )
999 ROM_LOAD( "rom1.bin", 0x5000, 0x1000, CRC(4df71d07) SHA1(5d71750594885641fb347bf4106b3b6ace822fb9) )
1000 ROM_LOAD( "rom2.bin", 0x6000, 0x1000, CRC(c6ff04cb) SHA1(33477abacb9dfeadca20f9b9c1c2840cf31be7c3) )
1001 ROM_LOAD( "rom3.bin", 0x7000, 0x1000, CRC(a7dc9d1b) SHA1(991f5b943f5c82027deadda0c4230b70f2a8ca10) )
1002 ROM_LOAD( "rom4.bin", 0x8000, 0x1000, CRC(788bf976) SHA1(4dc2d92bbd232625fd8e828c876c4182ddde125d) )
1003 ROM_LOAD( "rom5.bin", 0x9000, 0x1000, CRC(16121e13) SHA1(9ef59f4ffc22d5f9457b57d2f3a67d883995be98) )
1004 ROM_RELOAD( 0xa000, 0x1000 )
1005 ROM_RELOAD( 0xb000, 0x1000 )
1006 ROM_RELOAD( 0xc000, 0x1000 )
1007 ROM_RELOAD( 0xd000, 0x1000 )
1008 ROM_RELOAD( 0xe000, 0x1000 )
1009 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
1010
1011 /* AVG PROM */
1012 ROM_REGION( 0x100, "avg:prom", 0 )
1013 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
1014
1015 /* Address decoding */
1016 ROM_REGION( 0x100, "proms", 0 )
1017 ROM_LOAD( "136010-111.r1", 0x0000, 0x0020, CRC(6bf2dc46) SHA1(9961ac36978154cf0a4e1c40d41f867ce1f0b1da) )
1018 ROM_LOAD( "136010-112.r2", 0x0020, 0x0020, CRC(b6af29d1) SHA1(62f9cbbe8dd04f3a81516198d2d8d6eafe1f0986) )
1019 ROM_END
1020
1021 ROM_START( spacduel )
1022 ROM_REGION( 0x10000, "maincpu", 0 )
1023 /* Vector ROM */
1024 ROM_LOAD( "136006-106.r7", 0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
1025 ROM_LOAD( "136006-107.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
1026 /* Program ROM */
1027 ROM_LOAD( "136006-201.r1", 0x4000, 0x1000, CRC(f4037b6e) SHA1(9bacb64d257edd31f53db878477604f50681d78f) )
1028 ROM_LOAD( "136006-102.np1", 0x5000, 0x1000, CRC(4c451e8a) SHA1(c05c52bb08acccb60950a15f05c960c3bc163d3e) )
1029 ROM_LOAD( "136006-103.m1", 0x6000, 0x1000, CRC(ee72da63) SHA1(d36d62cdf7fe76ee9cdbfc2e76ac5d90f22986ba) )
1030 ROM_LOAD( "136006-104.kl1", 0x7000, 0x1000, CRC(e41b38a3) SHA1(9e8773e78d65d74db824cfd7108e7038f26757db) )
1031 ROM_LOAD( "136006-105.j1", 0x8000, 0x1000, CRC(5652710f) SHA1(b15891d22a47ac3448d2ced40c04d0ab80606c7d) )
1032 ROM_RELOAD( 0x9000, 0x1000 )
1033 ROM_RELOAD( 0xa000, 0x1000 )
1034 ROM_RELOAD( 0xb000, 0x1000 )
1035 ROM_RELOAD( 0xc000, 0x1000 )
1036 ROM_RELOAD( 0xd000, 0x1000 )
1037 ROM_RELOAD( 0xe000, 0x1000 )
1038 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
1039
1040 /* AVG PROM */
1041 ROM_REGION( 0x100, "avg:prom", 0 )
1042 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
1043 ROM_END
1044
1045 ROM_START( spacduel1 )
1046 ROM_REGION( 0x10000, "maincpu", 0 )
1047 /* Vector ROM */
1048 ROM_LOAD( "136006-106.r7", 0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
1049 ROM_LOAD( "136006-107.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
1050 /* Program ROM */
1051 ROM_LOAD( "136006-101.r1", 0x4000, 0x1000, CRC(cd239e6c) SHA1(b6143d979dd35a46bcb783bb0ac02d4dca30f0c2) )
1052 ROM_LOAD( "136006-102.np1", 0x5000, 0x1000, CRC(4c451e8a) SHA1(c05c52bb08acccb60950a15f05c960c3bc163d3e) )
1053 ROM_LOAD( "136006-103.m1", 0x6000, 0x1000, CRC(ee72da63) SHA1(d36d62cdf7fe76ee9cdbfc2e76ac5d90f22986ba) )
1054 ROM_LOAD( "136006-104.kl1", 0x7000, 0x1000, CRC(e41b38a3) SHA1(9e8773e78d65d74db824cfd7108e7038f26757db) )
1055 ROM_LOAD( "136006-105.j1", 0x8000, 0x1000, CRC(5652710f) SHA1(b15891d22a47ac3448d2ced40c04d0ab80606c7d) )
1056 ROM_RELOAD( 0x9000, 0x1000 )
1057 ROM_RELOAD( 0xa000, 0x1000 )
1058 ROM_RELOAD( 0xb000, 0x1000 )
1059 ROM_RELOAD( 0xc000, 0x1000 )
1060 ROM_RELOAD( 0xd000, 0x1000 )
1061 ROM_RELOAD( 0xe000, 0x1000 )
1062 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
1063
1064 /* AVG PROM */
1065 ROM_REGION( 0x100, "avg:prom", 0 )
1066 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
1067 ROM_END
1068
1069 ROM_START( spacduel0 )
1070 ROM_REGION( 0x10000, "maincpu", 0 )
1071 /* Vector ROM */
1072 ROM_LOAD( "136006-006.r7", 0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
1073 ROM_LOAD( "136006-007.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
1074 /* Program ROM */
1075 ROM_LOAD( "136006-001.r1", 0x4000, 0x1000, CRC(8f993ac8) SHA1(38b6d1ee3f19bb77b8aca24fbbae38684f194796) )
1076 ROM_LOAD( "136006-002.np1", 0x5000, 0x1000, CRC(32cca051) SHA1(a01982e4362ba3dcdafd02d5403f8a190042e314) )
1077 ROM_LOAD( "136006-003.m1", 0x6000, 0x1000, CRC(36624d57) SHA1(e66cbd747c2a298f402b91c2cf042a0697ff8296) )
1078 ROM_LOAD( "136006-004.kl1", 0x7000, 0x1000, CRC(b322bf0b) SHA1(d67bf4e1e9b5b14b0455f37f9be11167aa3575c2) )
1079 ROM_LOAD( "136006-005.j1", 0x8000, 0x1000, CRC(0edb1242) SHA1(5ec62e48d15c5baf0fb583e014cae2ec4bd5f5e4) )
1080 ROM_RELOAD( 0x9000, 0x1000 )
1081 ROM_RELOAD( 0xa000, 0x1000 )
1082 ROM_RELOAD( 0xb000, 0x1000 )
1083 ROM_RELOAD( 0xc000, 0x1000 )
1084 ROM_RELOAD( 0xd000, 0x1000 )
1085 ROM_RELOAD( 0xe000, 0x1000 )
1086 ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
1087
1088 /* AVG PROM */
1089 ROM_REGION( 0x100, "avg:prom", 0 )
1090 ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
1091 ROM_END
1092
1093
1094 /*************************************
1095 *
1096 * Game drivers
1097 *
1098 *************************************/
1099
1100 GAME( 1980, spacduel, 0, spacduel, spacduel, bwidow_state, empty_init, ROT0, "Atari", "Space Duel (version 2)", MACHINE_SUPPORTS_SAVE )
1101 GAME( 1980, spacduel1, spacduel, spacduel, spacduel, bwidow_state, empty_init, ROT0, "Atari", "Space Duel (version 1)", MACHINE_SUPPORTS_SAVE )
1102 GAME( 1980, spacduel0, spacduel, spacduel, spacduel, bwidow_state, empty_init, ROT0, "Atari", "Space Duel (prototype)", MACHINE_SUPPORTS_SAVE )
1103 GAME( 1982, bwidow, 0, bwidow, bwidow, bwidow_state, empty_init, ROT0, "Atari", "Black Widow", MACHINE_SUPPORTS_SAVE )
1104 GAME( 1982, bwidowp, bwidow, bwidowp, bwidow, bwidow_state, empty_init, ROT0, "Atari", "Black Widow (prototype)", MACHINE_NOT_WORKING )
1105 GAME( 1982, gravitar, 0, gravitar, gravitar, bwidow_state, empty_init, ROT0, "Atari", "Gravitar (version 3)", MACHINE_SUPPORTS_SAVE )
1106 GAME( 1982, gravitar2, gravitar, gravitar, gravitar, bwidow_state, empty_init, ROT0, "Atari", "Gravitar (version 2)", MACHINE_SUPPORTS_SAVE )
1107 GAME( 1982, gravitar1, gravitar, gravitar, gravitar, bwidow_state, empty_init, ROT0, "Atari", "Gravitar (version 1)", MACHINE_SUPPORTS_SAVE )
1108 GAME( 1982, lunarbat, gravitar, gravitar, gravitar, bwidow_state, empty_init, ROT0, "Atari", "Lunar Battle (prototype, later)", MACHINE_SUPPORTS_SAVE )
1109 GAME( 1982, lunarba1, gravitar, lunarbat, lunarbat, bwidow_state, empty_init, ROT0, "Atari", "Lunar Battle (prototype, earlier)", MACHINE_SUPPORTS_SAVE )
1110