1 /***************************************************************************
2
3 Atari Major Havoc hardware
4
5 driver by Mike Appolo
6
7 Games supported:
8 * Alpha One
9 * Major Havoc
10 * Major Havoc: Return to Vax
11
12 Known bugs:
13 * none at this time
14
15 ****************************************************************************
16
17 MAJOR HAVOC (Driver)
18
19 Notes:
20
21 This game was provided in three configurations:
22 1) New Machine Purchase
23 2) Upgrade kit for Tempest (Kit "A")
24 3) Upgrade kit for Space Duel, Gravitar, and Black Window (Kit "B")
25
26 Controls on the machine were:
27 A backlit cylinder (roller) on new Major Havoc machines
28 or
29 A Tempest-like spinner on upgrades
30
31
32 Memory Map for Major Havoc
33
34 Alpha Processor
35 D D D D D D D D
36 Hex Address 7 6 5 4 3 2 1 0 Function
37 --------------------------------------------------------------------------------
38 0000-01FF | D D D D D D D D | R/W | Program RAM (1/2K)
39 0200-07FF | D D D D D D D D | R/W | Paged Program RAM (3K)
40 0800-09FF | D D D D D D D D | R/W | Program RAM (1/2K)
41 | | |
42 1000 | D D D D D D D D | R | Gamma Commuication Read Port
43 | | |
44 1200 | D | R | Right Coin (Player 1=0)
45 1200 | D | R | Left Coin (Player 1=0)
46 1200 | D | R | Aux. Coin (Player 1=0)
47 1200 | D | R | Diagnostic Step
48 1200 | D | R | Self Test Switch (Player 1=1)
49 1200 | D | R | Cabinet Switch (Player 1=1)
50 1200 | D | R | Aux. Coin Switch (Player 1=1)
51 1200 | D | R | Diagnostic Step
52 1200 | D | R | Gammma Rcvd Flag
53 1200 | D | R | Gamma Xmtd Flag
54 1200 | D | R | 2.4 KHz
55 1200 | D | R | Vector Generator Halt Flag
56 | | |
57 1400-141F | D D D D | W | ColorRAM
58 | | |
59 1600 | D | W | Invert X
60 1600 | D | W | Invert Y
61 1600 | D | W | Player 1
62 1600 | D | W | Not Used
63 1600 | D | W | Gamma Proc. Reset
64 1600 | D | W | Beta Proc. Reset
65 1600 | D | W | Not Used
66 1600 | D | W | Roller Controller Light
67 | | |
68 1640 | | W | Vector Generator Go
69 1680 | | W | Watchdog Clear
70 16C0 | | W | Vector Generator Reset
71 | | |
72 1700 | | W | IRQ Acknowledge
73 1740 | D D | W | Program ROM Page Select
74 1780 | D | W | Program RAM Page Select
75 17C0 | D D D D D D D D | W | Gamma Comm. Write Port
76 | | |
77 1800-1FFF | D D D D D D D D | R/W | Shared Beta RAM(not used)
78 | | |
79 2000-3FFF | D D D D D D D D | R | Paged Program ROM (32K)
80 4000-4FFF | D D D D D D D D | R/W | Vector Generator RAM (4K)
81 5000-5FFF | D D D D D D D D | R | Vector Generator ROM (4K)
82 6000-7FFF | D D D D D D D D | R | Paged Vector ROM (32K)
83 8000-FFFF | D D D D D D D D | R | Program ROM (32K)
84 -------------------------------------------------------------------------------
85
86 Gamma Processor
87
88 D D D D D D D D
89 Hex Address 7 6 5 4 3 2 1 0 Function
90 --------------------------------------------------------------------------------
91 0000-07FF | D D D D D D D D | R/W | Program RAM (2K)
92 2000-203F | D D D D D D D D | R/W | Quad-Pokey I/O
93 | | |
94 2800 | D | R | Fire 1 Switch
95 2800 | D | R | Shield 1 Switch
96 2800 | D | R | Fire 2 Switch
97 2800 | D | R | Shield 2 Switch
98 2800 | D | R | Not Used
99 2800 | D | R | Speech Chip Ready
100 2800 | D | R | Alpha Rcvd Flag
101 2800 | D | R | Alpha Xmtd Flag
102 | | |
103 3000 | D D D D D D D D | R | Alpha Comm. Read Port
104 | | |
105 3800-3803 | D D D D D D D D | R | Roller Controller Input
106 | | |
107 4000 | | W | IRQ Acknowledge
108 4800 | D | W | Left Coin Counter
109 4800 | D | W | Right Coin Counter
110 | | |
111 5000 | D D D D D D D D | W | Alpha Comm. Write Port
112 | | |
113 6000-61FF | D D D D D D D D | R/W | EEROM
114 8000-BFFF | D D D D D D D D | R | Program ROM (16K)
115 -----------------------------------------------------------------------------
116
117
118
119 MAJOR HAVOC DIP SWITCH SETTINGS
120
121 $=Default
122
123 DIP Switch at position 13/14S
124
125 1 2 3 4 5 6 7 8
126 STARTING LIVES _________________________________________
127 Free Play 1 Coin 2 Coin | | | | | | | | |
128 2 3 5 $|Off |Off | | | | | | |
129 3 4 4 | On | On | | | | | | |
130 4 5 6 | On |Off | | | | | | |
131 5 6 7 |Off | On | | | | | | |
132 GAME DIFFICULTY | | | | | | | | |
133 Hard | | | On | On | | | | |
134 Medium $| | |Off |Off | | | | |
135 Easy | | |Off | On | | | | |
136 Demo | | | On |Off | | | | |
137 BONUS LIFE | | | | | | | | |
138 50,000 | | | | | On | On | | |
139 100,000 $| | | | |Off |Off | | |
140 200,000 | | | | |Off | On | | |
141 No Bonus Life | | | | | On |Off | | |
142 ATTRACT MODE SOUND | | | | | | | | |
143 Silence | | | | | | | On | |
144 Sound $| | | | | | |Off | |
145 ADAPTIVE DIFFICULTY | | | | | | | | |
146 No | | | | | | | | On |
147 Yes $| | | | | | | |Off |
148 -----------------------------------------
149
150 DIP Switch at position 8S
151
152 1 2 3 4 5 6 7 8
153 _________________________________________
154 Free Play | | | | | | | On |Off |
155 1 Coin for 1 Game | | | | | | |Off |Off |
156 1 Coin for 2 Games | | | | | | | On | On |
157 2 Coins for 1 Game $| | | | | | |Off | On |
158 RIGHT COIN MECHANISM | | | | | | | | |
159 x1 $| | | | |Off |Off | | |
160 x4 | | | | |Off | On | | |
161 x5 | | | | | On |Off | | |
162 x6 | | | | | On | On | | |
163 LEFT COIN MECHANISM | | | | | | | | |
164 x1 $| | | |Off | | | | |
165 x2 | | | | On | | | | |
166 BONUS COIN ADDER | | | | | | | | |
167 No Bonus Coins $|Off |Off |Off | | | | | |
168 Every 4, add 1 |Off | On |Off | | | | | |
169 Every 4, add 2 |Off | On | On | | | | | |
170 Every 5, add 1 | On |Off |Off | | | | | |
171 Every 3, add 1 | On |Off | On | | | | | |
172 -----------------------------------------
173
174 2 COIN MINIMUM OPTION: Short pin 6 @13N to ground.
175
176 ***************************************************************************/
177
178 #include "driver.h"
179 #include "vidhrdw/generic.h"
180 #include "machine/mathbox.h"
181 #include "machine/atari_vg.h"
182 #include "vidhrdw/avgdvg.h"
183 #include "vidhrdw/vector.h"
184 #include "mhavoc.h"
185
186
187
188 /*************************************
189 *
190 * Alpha One: dual POKEY?
191 *
192 *************************************/
193
READ_HANDLER(dual_pokey_r)194 static READ_HANDLER( dual_pokey_r )
195 {
196 int pokey_num = (offset >> 3) & 0x01;
197 int control = (offset & 0x10) >> 1;
198 int pokey_reg = (offset % 8) | control;
199
200 if (pokey_num == 0)
201 return pokey1_r(pokey_reg);
202 else
203 return pokey2_r(pokey_reg);
204 }
205
206
WRITE_HANDLER(dual_pokey_w)207 static WRITE_HANDLER( dual_pokey_w )
208 {
209 int pokey_num = (offset >> 3) & 0x01;
210 int control = (offset & 0x10) >> 1;
211 int pokey_reg = (offset % 8) | control;
212
213 if (pokey_num == 0)
214 pokey1_w(pokey_reg, data);
215 else
216 pokey2_w(pokey_reg, data);
217 }
218
219
220
221 /*************************************
222 *
223 * Gamma RAM
224 *
225 *************************************/
226
227 static data8_t *gammaram;
228
READ_HANDLER(mhavoc_gammaram_r)229 static READ_HANDLER( mhavoc_gammaram_r )
230 {
231 return gammaram[offset & 0x7ff];
232 }
233
WRITE_HANDLER(mhavoc_gammaram_w)234 static WRITE_HANDLER( mhavoc_gammaram_w )
235 {
236 gammaram[offset & 0x7ff] = data;
237 }
238
239
240
241 /*************************************
242 *
243 * Alpha CPU memory handlers
244 *
245 *************************************/
246
MEMORY_READ_START(alpha_readmem)247 static MEMORY_READ_START( alpha_readmem )
248 { 0x0000, 0x01ff, MRA_RAM }, /* 0.5K Program Ram */
249 { 0x0200, 0x07ff, MRA_BANK1 }, /* 3K Paged Program RAM */
250 { 0x0800, 0x09ff, MRA_RAM }, /* 0.5K Program RAM */
251 { 0x1000, 0x1000, mhavoc_gamma_r }, /* Gamma Read Port */
252 { 0x1200, 0x1200, mhavoc_port_0_r }, /* Alpha Input Port 0 */
253 { 0x1800, 0x1fff, MRA_RAM }, /* Shared Beta Ram */
254 { 0x2000, 0x3fff, MRA_BANK2 }, /* Paged Program ROM (32K) */
255 { 0x4000, 0x4fff, MRA_RAM }, /* Vector RAM (4K) */
256 { 0x5000, 0x5fff, MRA_ROM }, /* Vector ROM (4K) */
257 { 0x6000, 0x7fff, MRA_BANK3 }, /* Paged Vector ROM (32K) */
258 { 0x8000, 0xffff, MRA_ROM }, /* Program ROM (32K) */
259 MEMORY_END
260
261
262 static MEMORY_WRITE_START( alpha_writemem )
263 { 0x0000, 0x01ff, MWA_RAM }, /* 0.5K Program Ram */
264 { 0x0200, 0x07ff, MWA_BANK1 }, /* 3K Paged Program RAM */
265 { 0x0800, 0x09ff, MWA_RAM }, /* 0.5K Program RAM */
266 { 0x1200, 0x1200, MWA_NOP }, /* don't care */
267 { 0x1400, 0x141f, mhavoc_colorram_w }, /* ColorRAM */
268 { 0x1600, 0x1600, mhavoc_out_0_w }, /* Control Signals */
269 { 0x1640, 0x1640, avgdvg_go_w }, /* Vector Generator GO */
270 { 0x1680, 0x1680, watchdog_reset_w }, /* Watchdog Clear */
271 { 0x16c0, 0x16c0, avgdvg_reset_w }, /* Vector Generator Reset */
272 { 0x1700, 0x1700, mhavoc_alpha_irq_ack_w },/* IRQ ack */
273 { 0x1740, 0x1740, mhavoc_rom_banksel_w },/* Program ROM Page Select */
274 { 0x1780, 0x1780, mhavoc_ram_banksel_w },/* Program RAM Page Select */
275 { 0x17c0, 0x17c0, mhavoc_gamma_w }, /* Gamma Communication Write Port */
276 { 0x1800, 0x1fff, MWA_RAM }, /* Shared Beta Ram */
277 { 0x2000, 0x3fff, MWA_ROM }, /* Major Havoc writes here.*/
278 { 0x4000, 0x4fff, MWA_RAM, &vectorram, &vectorram_size },/* Vector Generator RAM */
279 { 0x6000, 0xffff, MWA_ROM },
280 MEMORY_END
281
282
283
284 /*************************************
285 *
286 * Gamma CPU memory handlers
287 *
288 *************************************/
289
290 static MEMORY_READ_START( gamma_readmem )
291 { 0x0000, 0x07ff, MRA_RAM }, /* Program RAM (2K) */
292 { 0x0800, 0x1fff, mhavoc_gammaram_r }, /* wraps to 0x000-0x7ff */
293 { 0x2000, 0x203f, quad_pokey_r }, /* Quad Pokey read */
294 { 0x2800, 0x2800, mhavoc_port_1_r }, /* Gamma Input Port */
295 { 0x3000, 0x3000, mhavoc_alpha_r }, /* Alpha Comm. Read Port*/
296 { 0x3800, 0x3803, input_port_2_r }, /* Roller Controller Input*/
297 { 0x4000, 0x4000, input_port_4_r }, /* DSW at 8S */
298 { 0x6000, 0x61ff, MRA_RAM }, /* EEROM */
299 { 0x8000, 0xffff, MRA_ROM }, /* Program ROM (16K) */
300 MEMORY_END
301
302
303 static MEMORY_WRITE_START( gamma_writemem )
304 { 0x0000, 0x07ff, MWA_RAM }, /* Program RAM (2K) */
305 { 0x0800, 0x1fff, mhavoc_gammaram_w, &gammaram }, /* wraps to 0x000-0x7ff */
306 { 0x2000, 0x203f, quad_pokey_w }, /* Quad Pokey write */
307 { 0x4000, 0x4000, mhavoc_gamma_irq_ack_w }, /* IRQ Acknowledge */
308 { 0x4800, 0x4800, mhavoc_out_1_w }, /* Coin Counters */
309 { 0x5000, 0x5000, mhavoc_alpha_w }, /* Alpha Comm. Write Port */
310 { 0x6000, 0x61ff, MWA_RAM, &generic_nvram, &generic_nvram_size }, /* EEROM */
311 MEMORY_END
312
313
314
315 /*************************************
316 *
317 * Main CPU memory handlers (Alpha One)
318 *
319 *************************************/
320
321 static MEMORY_READ_START( alphaone_readmem )
322 { 0x0000, 0x01ff, MRA_RAM }, /* 0.5K Program Ram */
323 { 0x0200, 0x07ff, MRA_BANK1 }, /* 3K Paged Program RAM */
324 { 0x0800, 0x09ff, MRA_RAM }, /* 0.5K Program RAM */
325 { 0x1020, 0x103f, dual_pokey_r },
326 { 0x1040, 0x1040, alphaone_port_0_r }, /* Alpha Input Port 0 */
327 { 0x1060, 0x1060, input_port_1_r }, /* Gamma Input Port */
328 { 0x1080, 0x1080, input_port_2_r }, /* Roller Controller Input*/
329 { 0x1800, 0x18ff, MRA_RAM }, /* EEROM */
330 { 0x2000, 0x3fff, MRA_BANK2 }, /* Paged Program ROM (32K) */
331 { 0x4000, 0x4fff, MRA_RAM }, /* Vector RAM (4K) */
332 { 0x5000, 0x5fff, MRA_ROM }, /* Vector ROM (4K) */
333 { 0x6000, 0x7fff, MRA_BANK3 }, /* Paged Vector ROM (32K) */
334 { 0x8000, 0xffff, MRA_ROM }, /* Program ROM (32K) */
335 MEMORY_END
336
337
338 static MEMORY_WRITE_START( alphaone_writemem )
339 { 0x0000, 0x01ff, MWA_RAM }, /* 0.5K Program Ram */
340 { 0x0200, 0x07ff, MWA_BANK1 }, /* 3K Paged Program RAM */
341 { 0x0800, 0x09ff, MWA_RAM }, /* 0.5K Program RAM */
342 { 0x1020, 0x103f, dual_pokey_w },
343 { 0x1040, 0x1040, MWA_NOP }, /* Nothing here */
344 { 0x10a0, 0x10a0, alphaone_out_0_w }, /* Control Signals */
345 { 0x10a4, 0x10a4, avgdvg_go_w }, /* Vector Generator GO */
346 { 0x10a8, 0x10a8, watchdog_reset_w }, /* Watchdog Clear */
347 { 0x10ac, 0x10ac, avgdvg_reset_w }, /* Vector Generator Reset */
348 { 0x10b0, 0x10b0, mhavoc_alpha_irq_ack_w }, /* IRQ ack */
349 { 0x10b4, 0x10b4, mhavoc_rom_banksel_w },
350 { 0x10b8, 0x10b8, mhavoc_ram_banksel_w },
351 { 0x10e0, 0x10ff, mhavoc_colorram_w }, /* ColorRAM */
352 { 0x1800, 0x18ff, MWA_RAM, &generic_nvram, &generic_nvram_size }, /* EEROM */
353 { 0x2000, 0x3fff, MWA_ROM }, /* Major Havoc writes here.*/
354 { 0x4000, 0x4fff, MWA_RAM, &vectorram, &vectorram_size },/* Vector Generator RAM */
355 { 0x6000, 0xffff, MWA_ROM },
356 MEMORY_END
357
358
359
360 /*************************************
361 *
362 * Port definitions
363 *
364 *************************************/
365
366 INPUT_PORTS_START( mhavoc )
367 PORT_START /* IN0 - alpha (player_1 = 0) */
368 PORT_BIT ( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL )
369 PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
370 PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
371 PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
372 PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Diag Step/Coin C", KEYCODE_F1, IP_JOY_NONE )
373 PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Left Coin Switch */
374 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) /* Right Coin */
375
376 PORT_START /* IN1 - gamma */
377 PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
378 PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
379 PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
380 PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
381 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
382
383 PORT_START /* IN2 - gamma */
384 PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 100, 40, 0, 0 )
385
386 PORT_START /* DIP Switch at position 13/14S */
387 PORT_DIPNAME( 0x01, 0x00, "Adaptive Difficulty" )
388 PORT_DIPSETTING( 0x01, DEF_STR( Off ))
389 PORT_DIPSETTING( 0x00, DEF_STR( On ))
390 PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
391 PORT_DIPSETTING( 0x02, DEF_STR( Off ))
392 PORT_DIPSETTING( 0x00, DEF_STR( On ))
393 PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
394 PORT_DIPSETTING( 0x0c, "50000")
395 PORT_DIPSETTING( 0x00, "100000")
396 PORT_DIPSETTING( 0x04, "200000")
397 PORT_DIPSETTING( 0x08, "None")
398 PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )
399 PORT_DIPSETTING( 0x10, "Easy")
400 PORT_DIPSETTING( 0x00, "Medium")
401 PORT_DIPSETTING( 0x30, "Hard")
402 PORT_DIPSETTING( 0x20, "Demo")
403 PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) )
404 PORT_DIPSETTING( 0x00, "3 (2 in Free Play)")
405 PORT_DIPSETTING( 0xc0, "4 (3 in Free Play)")
406 PORT_DIPSETTING( 0x80, "5 (4 in Free Play)")
407 PORT_DIPSETTING( 0x40, "6 (5 in Free Play)")
408
409 PORT_START /* DIP Switch at position 8S */
410 PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
411 PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
412 PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
413 PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
414 PORT_DIPSETTING( 0x01, DEF_STR( Free_Play ) )
415 PORT_DIPNAME( 0x0c, 0x0c, "Right Coin Mechanism" )
416 PORT_DIPSETTING( 0x0c, "x1" )
417 PORT_DIPSETTING( 0x08, "x4" )
418 PORT_DIPSETTING( 0x04, "x5" )
419 PORT_DIPSETTING( 0x00, "x6" )
420 PORT_DIPNAME( 0x10, 0x10, "Left Coin Mechanism" )
421 PORT_DIPSETTING( 0x10, "x1" )
422 PORT_DIPSETTING( 0x00, "x2" )
423 PORT_DIPNAME( 0xe0, 0xe0, "Bonus Credits" )
424 PORT_DIPSETTING( 0x80, "2 each 4" )
425 PORT_DIPSETTING( 0x40, "1 each 3" )
426 PORT_DIPSETTING( 0xa0, "1 each 4" )
427 PORT_DIPSETTING( 0x60, "1 each 5" )
428 PORT_DIPSETTING( 0xe0, "None" )
429
430 PORT_START /* IN5 - dummy for player_1 = 1 on alpha */
431 PORT_BIT ( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL )
432 PORT_DIPNAME( 0x40, 0x40, "Credit to start" )
433 PORT_DIPSETTING( 0x40, "1" )
434 PORT_DIPSETTING( 0x00, "2" )
435 PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
436 INPUT_PORTS_END
437
438
439 INPUT_PORTS_START( mhavocp )
440 PORT_START /* IN0 - alpha (player_1 = 0) */
441 PORT_BIT ( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL )
442 PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
443 PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Diag Step/Coin C", KEYCODE_F1, IP_JOY_NONE )
444 PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Left Coin Switch */
445 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) /* Right Coin */
446
447 PORT_START /* IN1 - gamma */
448 PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
449 PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
450 PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
451 PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
452 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
453
454 PORT_START /* IN2 - gamma */
455 PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 100, 40, 0, 0 )
456
457 PORT_START /* DIP Switch at position 13/14S */
458 PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
459 PORT_DIPSETTING( 0x00, "1" )
460 PORT_DIPSETTING( 0x01, "2" )
461 PORT_DIPSETTING( 0x02, "3" )
462 PORT_DIPSETTING( 0x03, "4" )
463 PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
464 PORT_DIPSETTING( 0x0c, "50000")
465 PORT_DIPSETTING( 0x00, "100000")
466 PORT_DIPSETTING( 0x04, "200000")
467 PORT_DIPSETTING( 0x08, "None")
468 PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )
469 PORT_DIPSETTING( 0x10, "Easy")
470 PORT_DIPSETTING( 0x00, "Medium")
471 PORT_DIPSETTING( 0x30, "Hard")
472 PORT_DIPSETTING( 0x20, "Demo")
473 PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) )
474 PORT_DIPSETTING( 0x00, "3 (2 in Free Play)")
475 PORT_DIPSETTING( 0xc0, "4 (3 in Free Play)")
476 PORT_DIPSETTING( 0x80, "5 (4 in Free Play)")
477 PORT_DIPSETTING( 0x40, "6 (5 in Free Play)")
478
479 PORT_START /* DIP Switch at position 8S */
480 PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
481 PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
482 PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
483 PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
484 PORT_DIPSETTING( 0x01, DEF_STR( Free_Play ) )
485 PORT_DIPNAME( 0x0c, 0x0c, "Right Coin Mechanism" )
486 PORT_DIPSETTING( 0x0c, "x1" )
487 PORT_DIPSETTING( 0x08, "x4" )
488 PORT_DIPSETTING( 0x04, "x5" )
489 PORT_DIPSETTING( 0x00, "x6" )
490 PORT_DIPNAME( 0x10, 0x10, "Left Coin Mechanism" )
491 PORT_DIPSETTING( 0x10, "x1" )
492 PORT_DIPSETTING( 0x00, "x2" )
493 PORT_DIPNAME( 0xe0, 0xe0, "Bonus Credits" )
494 PORT_DIPSETTING( 0x80, "2 each 4" )
495 PORT_DIPSETTING( 0x40, "1 each 3" )
496 PORT_DIPSETTING( 0xa0, "1 each 4" )
497 PORT_DIPSETTING( 0x60, "1 each 5" )
498 PORT_DIPSETTING( 0xe0, "None" )
499
500 PORT_START /* IN5 - dummy for player_1 = 1 on alpha */
501 PORT_BIT ( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL )
502 PORT_DIPNAME( 0x40, 0x40, "Credit to start" )
503 PORT_DIPSETTING( 0x40, "1" )
504 PORT_DIPSETTING( 0x00, "2" )
505 PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
506 INPUT_PORTS_END
507
508
509 INPUT_PORTS_START( alphaone )
510 PORT_START /* IN0 - alpha (player_1 = 0) */
511 PORT_BIT ( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL )
512 PORT_BIT ( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
513 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
514
515 PORT_START /* IN1 - gamma */
516 PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
517 PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
518 PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )
519 PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
520 PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
521
522 PORT_START /* IN2 - gamma */
523 PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 100, 40, 0, 0 )
524 INPUT_PORTS_END
525
526
527
528 /*************************************
529 *
530 * Sound interfaces
531 *
532 *************************************/
533
534 static struct POKEYinterface pokey_interface =
535 {
536 4, /* 4 chips */
537 MHAVOC_CLOCK_1_25M, /* 1.25 MHz??? */
538 { 25, 25, 25, 25 },
539 /* The 8 pot handlers */
540 { 0, 0, 0, 0 },
541 { 0, 0, 0, 0 },
542 { 0, 0, 0, 0 },
543 { 0, 0, 0, 0 },
544 { 0, 0, 0, 0 },
545 { 0, 0, 0, 0 },
546 { 0, 0, 0, 0 },
547 { 0, 0, 0, 0 },
548 /* The allpot handler */
549 { input_port_3_r, 0, 0, 0 },
550 };
551
552
553 static struct POKEYinterface pokey_interface_alphaone =
554 {
555 2, /* 2 chips */
556 MHAVOC_CLOCK_1_25M, /* 1.25 MHz??? */
557 { 50, 50 },
558 /* The 8 pot handlers */
559 { 0, 0 },
560 { 0, 0 },
561 { 0, 0 },
562 { 0, 0 },
563 { 0, 0 },
564 { 0, 0 },
565 { 0, 0 },
566 { 0, 0 },
567 /* The allpot handler */
568 { 0, 0 },
569 };
570
571
572
573 /*************************************
574 *
575 * Machine drivers
576 *
577 *************************************/
578
579 static MACHINE_DRIVER_START( mhavoc )
580
581 /* basic machine hardware */
582 MDRV_CPU_ADD_TAG("alpha", M6502, MHAVOC_CLOCK_2_5M) /* 2.5 MHz */
583 MDRV_CPU_MEMORY(alpha_readmem,alpha_writemem)
584
585 MDRV_CPU_ADD_TAG("gamma", M6502, MHAVOC_CLOCK_1_25M) /* 1.25 MHz */
586 MDRV_CPU_MEMORY(gamma_readmem,gamma_writemem)
587
588 MDRV_FRAMES_PER_SECOND(50)
589 MDRV_MACHINE_INIT(mhavoc)
590 MDRV_NVRAM_HANDLER(generic_1fill)
591
592 /* video hardware */
593 MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_VECTOR | VIDEO_RGB_DIRECT)
594 MDRV_SCREEN_SIZE(400, 300)
595 MDRV_VISIBLE_AREA(0, 300, 0, 260)
596 MDRV_PALETTE_LENGTH(32768)
597
598 MDRV_PALETTE_INIT(avg_multi)
599 MDRV_VIDEO_START(avg_mhavoc)
600 MDRV_VIDEO_UPDATE(vector)
601
602 /* sound hardware */
603 MDRV_SOUND_ADD_TAG("pokey", POKEY, pokey_interface)
604 MACHINE_DRIVER_END
605
606
607 static MACHINE_DRIVER_START( alphaone )
608
609 /* basic machine hardware */
610 MDRV_IMPORT_FROM(mhavoc)
611 MDRV_CPU_MODIFY("alpha")
612 MDRV_CPU_MEMORY(alphaone_readmem,alphaone_writemem)
613 MDRV_CPU_REMOVE("gamma")
614
615 /* video hardware */
616 MDRV_VISIBLE_AREA(0, 580, 0, 500)
617 MDRV_VIDEO_START(avg_alphaone)
618
619 /* sound hardware */
620 MDRV_SOUND_REPLACE("pokey", POKEY, pokey_interface_alphaone)
621 MACHINE_DRIVER_END
622
623
624
625 /*************************************
626 *
627 * ROM definitions
628 *
629 *************************************/
630
631 /*
632 * Notes:
633 * the R3 roms are supported as "mhavoc", the R2 roms (with a bug in gameplay)
634 * are supported as "mhavoc2".
635 * "Return to Vax" - Jess Askey's souped up version (errors on self test)
636 * are supported as "mhavocrv".
637 * Prototype is supported as "mhavocp"
638 * Alpha one is a single-board prototype
639 */
640
641 ROM_START( mhavoc )
642 /* Alpha Processor ROMs */
643 ROM_REGION( 0x21000, REGION_CPU1, 0 ) /* 152KB for ROMs */
644 /* Vector Generator ROM */
645 ROM_LOAD( "136025.210", 0x05000, 0x2000, CRC(c67284ca) SHA1(d9adad80c266d36429444f483cac4ebcf1fec7b8) )
646
647 /* Program ROM */
648 ROM_LOAD( "136025.216", 0x08000, 0x4000, CRC(522a9cc0) SHA1(bbd75e01c45220e1c87bd1e013cf2c2fb9f376b2) )
649 ROM_LOAD( "136025.217", 0x0c000, 0x4000, CRC(ea3d6877) SHA1(27823c1b546c073b37ff11a8cb25312ea71673c2) )
650
651 /* Paged Program ROM */
652 ROM_LOAD( "136025.215", 0x10000, 0x4000, CRC(a4d380ca) SHA1(c3cdc76054be2f904b1fb6f28c3c027eba5c3a70) ) /* page 0+1 */
653 ROM_LOAD( "136025.318", 0x14000, 0x4000, CRC(ba935067) SHA1(05ad81e7a1982b9d8fddb48502546f48b5dc21b7) ) /* page 2+3 */
654
655 /* Paged Vector Generator ROM */
656 ROM_LOAD( "136025.106", 0x18000, 0x4000, CRC(2ca83c76) SHA1(cc1adca32f70af30c4590e9fd6b056b051ccdb38) ) /* page 0+1 */
657 ROM_LOAD( "136025.107", 0x1c000, 0x4000, CRC(5f81c5f3) SHA1(be4055727a2d4536e37ec20150deffdb5af5b01f) ) /* page 2+3 */
658
659 /* Gamma Processor ROM */
660 ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 16k for code */
661 ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) )
662 ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
663 ROM_END
664
665
666 ROM_START( mhavoc2 )
667 /* Alpha Processor ROMs */
668 ROM_REGION( 0x21000, REGION_CPU1, 0 )
669 /* Vector Generator ROM */
670 ROM_LOAD( "136025.110", 0x05000, 0x2000, CRC(16eef583) SHA1(277252bd716dd96d5b98ec5e33a3a6a3bc1a9abf) )
671
672 /* Program ROM */
673 ROM_LOAD( "136025.103", 0x08000, 0x4000, CRC(bf192284) SHA1(4c2dc3ba75122e521ebf2c42f89b31737613c2df) )
674 ROM_LOAD( "136025.104", 0x0c000, 0x4000, CRC(833c5d4e) SHA1(932861b2a329172247c1a5d0a6498a00a1fce814) )
675
676 /* Paged Program ROM - switched to 2000-3fff */
677 ROM_LOAD( "136025.101", 0x10000, 0x4000, CRC(2b3b591f) SHA1(39fd6fdd14367906bc0102bde15d509d3289206b) ) /* page 0+1 */
678 ROM_LOAD( "136025.109", 0x14000, 0x4000, CRC(4d766827) SHA1(7697bf6f92bff0e62850ed75ff66008a08583ef7) ) /* page 2+3 */
679
680 /* Paged Vector Generator ROM */
681 ROM_LOAD( "136025.106", 0x18000, 0x4000, CRC(2ca83c76) SHA1(cc1adca32f70af30c4590e9fd6b056b051ccdb38) ) /* page 0+1 */
682 ROM_LOAD( "136025.107", 0x1c000, 0x4000, CRC(5f81c5f3) SHA1(be4055727a2d4536e37ec20150deffdb5af5b01f) ) /* page 2+3 */
683
684 /* the last 0x1000 is used for the 2 RAM pages */
685
686 /* Gamma Processor ROM */
687 ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 16k for code */
688 ROM_LOAD( "136025.108", 0x08000, 0x4000, CRC(93faf210) SHA1(7744368a1d520f986d1c4246113a7e24fcdd6d04) )
689 ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
690 ROM_END
691
692
693 ROM_START( mhavocrv )
694 /* Alpha Processor ROMs */
695 ROM_REGION( 0x21000, REGION_CPU1, 0 ) /* 152KB for ROMs */
696 /* Vector Generator ROM */
697 ROM_LOAD( "136025.210", 0x05000, 0x2000, CRC(c67284ca) SHA1(d9adad80c266d36429444f483cac4ebcf1fec7b8) )
698
699 /* Program ROM */
700 ROM_LOAD( "136025.916", 0x08000, 0x4000, CRC(1255bd7f) SHA1(e277fe7b23ce8cf1294b6bfa5548b24a6c8952ce) )
701 ROM_LOAD( "136025.917", 0x0c000, 0x4000, CRC(21889079) SHA1(d1ad6d9fa1432912e376bca50ceeefac2bfd6ac3) )
702
703 /* Paged Program ROM */
704 ROM_LOAD( "136025.915", 0x10000, 0x4000, CRC(4c7235dc) SHA1(67cafc2ce438ec389550efb46c554a7fe7b45efc) ) /* page 0+1 */
705 ROM_LOAD( "136025.918", 0x14000, 0x4000, CRC(84735445) SHA1(21aacd862ce8911d257c6f48ead119ee5bb0b60d) ) /* page 2+3 */
706
707 /* Paged Vector Generator ROM */
708 ROM_LOAD( "136025.106", 0x18000, 0x4000, CRC(2ca83c76) SHA1(cc1adca32f70af30c4590e9fd6b056b051ccdb38) ) /* page 0+1 */
709 ROM_LOAD( "136025.907", 0x1c000, 0x4000, CRC(4deea2c9) SHA1(c4107581748a3f2d2084de2a4f120abd67a52189) ) /* page 2+3 */
710
711 /* Gamma Processor ROM */
712 ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 16k for code */
713 ROM_LOAD( "136025.908", 0x08000, 0x4000, CRC(c52ec664) SHA1(08120a385f71b17ec02a3c2ef856ff835a91773e) )
714 ROM_RELOAD( 0x0c000, 0x4000 ) /* reset+interrupt vectors */
715 ROM_END
716
717
718 ROM_START( mhavocp )
719 /* Alpha Processor ROMs */
720 ROM_REGION( 0x21000, REGION_CPU1, 0 )
721 /* Vector Generator ROM */
722 ROM_LOAD( "136025.010", 0x05000, 0x2000, CRC(3050c0e6) SHA1(f19a9538996d949cdca7e6abd4f04e8ff6e0e2c1) )
723
724 /* Program ROM */
725 ROM_LOAD( "136025.016", 0x08000, 0x4000, CRC(94caf6c0) SHA1(8734411280bd0484c99a59231b97ad64d6e787e8) )
726 ROM_LOAD( "136025.017", 0x0c000, 0x4000, CRC(05cba70a) SHA1(c069e6dec3e5bc278103156d0908ab93f3784be1) )
727
728 /* Paged Program ROM - switched to 2000-3fff */
729 ROM_LOAD( "136025.015", 0x10000, 0x4000, CRC(c567c11b) SHA1(23b89389f59bb6a040342adfe583818a91ce5bff) )
730 ROM_LOAD( "136025.018", 0x14000, 0x4000, CRC(a8c35ccd) SHA1(c243a5407557390a64c6560d857f5031f839973f) )
731
732 /* Paged Vector Generator ROM */
733 ROM_LOAD( "136025.006", 0x18000, 0x4000, CRC(e272ed41) SHA1(0de395d1c4300a64da7f45746d7b550779e36a21) )
734 ROM_LOAD( "136025.007", 0x1c000, 0x4000, CRC(e152c9d8) SHA1(79d0938fa9ad262c7f28c5a8ad21004a4dec9ed8) )
735
736 /* the last 0x1000 is used for the 2 RAM pages */
737
738 /* Gamma Processor ROM */
739 ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 16k for code */
740 ROM_LOAD( "136025.008", 0x8000, 0x4000, CRC(22ea7399) SHA1(eeda8cc40089506063835a62c3273e7dd3918fd5) )
741 ROM_RELOAD( 0xc000, 0x4000 )/* reset+interrupt vectors */
742 ROM_END
743
744
745 ROM_START( alphaone )
746 ROM_REGION( 0x21000, REGION_CPU1, 0 )
747 /* Vector Generator ROM */
748 ROM_LOAD( "vec5000.tw", 0x05000, 0x1000, CRC(2a4c149f) SHA1(b60a0b29958bee9b5f7c1d88163680b626bb76dd) )
749
750 /* Program ROM */
751 ROM_LOAD( "8000.tw", 0x08000, 0x2000, CRC(962d4da2) SHA1(2299f850aed7470a80a21526143f7b412a879cb1) )
752 ROM_LOAD( "a000.tw", 0x0a000, 0x2000, CRC(f739a791) SHA1(1e70e446fc7dd27683ad71e768ebb2bc1d4fedd3) )
753 ROM_LOAD( "twjk1.bin", 0x0c000, 0x2000, CRC(1ead0b34) SHA1(085e05526d029bcff7c8ae050cde73f52ee13846) )
754 ROM_LOAD( "e000.tw", 0x0e000, 0x1000, CRC(6b1d7d2b) SHA1(36ac8b53e2fe01ed281c94afec02484ef676ddad) )
755 ROM_RELOAD( 0x0f000, 0x1000 )
756
757 /* Paged Program ROM - switched to 2000-3fff */
758 ROM_LOAD( "page01.tw", 0x10000, 0x4000, CRC(cbf3b05a) SHA1(1dfaf9300a252c9c921f06167160a59cdf329726) )
759
760 /* Paged Vector Generator ROM */
761 ROM_LOAD( "vec_pg01.tw", 0x18000, 0x4000, CRC(e392a94d) SHA1(b5843da97d7aa5767c87c29660115efc5ad9ad54) )
762 ROM_LOAD( "vec_pg23.tw", 0x1c000, 0x4000, CRC(1ff74292) SHA1(90e61c48544c62d905e207bba5c67ae7694e86a5) )
763
764 /* the last 0x1000 is used for the 2 RAM pages */
765 ROM_END
766
767
768 ROM_START( alphaona )
769 ROM_REGION( 0x21000, REGION_CPU1, 0 )
770 /* Vector Generator ROM */
771 ROM_LOAD( "vec5000.tw", 0x05000, 0x1000, CRC(2a4c149f) SHA1(b60a0b29958bee9b5f7c1d88163680b626bb76dd) )
772
773 /* Program ROM */
774 ROM_LOAD( "8000.tw", 0x08000, 0x2000, CRC(962d4da2) SHA1(2299f850aed7470a80a21526143f7b412a879cb1) )
775 ROM_LOAD( "a000.tw", 0x0a000, 0x2000, CRC(f739a791) SHA1(1e70e446fc7dd27683ad71e768ebb2bc1d4fedd3) )
776 ROM_LOAD( "c000.tw", 0x0c000, 0x2000, CRC(f21fb1ac) SHA1(2590147e75611a3f87397e7b0baa7020e7528ac8) )
777 ROM_LOAD( "e000.tw", 0x0e000, 0x1000, CRC(6b1d7d2b) SHA1(36ac8b53e2fe01ed281c94afec02484ef676ddad) )
778 ROM_RELOAD( 0x0f000, 0x1000 )
779
780 /* Paged Program ROM - switched to 2000-3fff */
781 ROM_LOAD( "page01.tw", 0x10000, 0x4000, CRC(cbf3b05a) SHA1(1dfaf9300a252c9c921f06167160a59cdf329726) )
782
783 /* Paged Vector Generator ROM */
784 ROM_LOAD( "vec_pg01.tw", 0x18000, 0x4000, CRC(e392a94d) SHA1(b5843da97d7aa5767c87c29660115efc5ad9ad54) )
785 ROM_LOAD( "vec_pg23.tw", 0x1c000, 0x4000, CRC(1ff74292) SHA1(90e61c48544c62d905e207bba5c67ae7694e86a5) )
786
787 /* the last 0x1000 is used for the 2 RAM pages */
788 ROM_END
789
790
791
792 /*************************************
793 *
794 * Game drivers
795 *
796 *************************************/
797
798 GAME( 1983, mhavoc, 0, mhavoc, mhavoc, 0, ROT0, "Atari", "Major Havoc (rev 3)" )
799 GAME( 1983, mhavoc2, mhavoc, mhavoc, mhavoc, 0, ROT0, "Atari", "Major Havoc (rev 2)" )
800 GAME( 1983, mhavocrv, mhavoc, mhavoc, mhavoc, 0, ROT0, "hack", "Major Havoc (Return to Vax)" )
801 GAME( 1983, mhavocp, mhavoc, mhavoc, mhavocp, 0, ROT0, "Atari", "Major Havoc (prototype)" )
802 GAME( 1983, alphaone, mhavoc, alphaone, alphaone, 0, ROT0, "Atari", "Alpha One (prototype, 3 lives)" )
803 GAME( 1983, alphaona, mhavoc, alphaone, alphaone, 0, ROT0, "Atari", "Alpha One (prototype, 5 lives)" )
804