~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to mess/src/mame/drivers/centiped.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 
3
 
    Atari Centipede hardware
4
 
 
5
 
    Games supported:
6
 
        * Centipede (5 sets)
7
 
        * Warlords
8
 
        * Millipede
9
 
        * Maze Invaders (prototype)
10
 
        * Bulls Eye Darts
11
 
 
12
 
    Known ROMs (listed in the manual) that need to be dumped/verified:
13
 
 
14
 
    Centipede:
15
 
      136001-203.d1  <-- Are these the proper labels for the timed version???
16
 
      136001-204.e1
17
 
      136001-205.fh1
18
 
      136001-206.j1
19
 
 
20
 
      136001-303.d1  <-- Revision 3 set for the above listed roms
21
 
      136001-304.e1
22
 
      136001-305.fh1
23
 
      136001-306.j1
24
 
 
25
 
    Milipede:
26
 
      136013-109.5p
27
 
      136013-110.5r
28
 
 
29
 
The Two Bit Score "Dux" hack was circulated and common enough for inclusion
30
 
 
31
 
****************************************************************************
32
 
 
33
 
    Main clock: XTAL = 12.096 MHz
34
 
    6502 Clock: XTAL/8 = 1.512 MHz (0.756 when accessing playfield RAM)
35
 
    Horizontal video frequency: HSYNC = XTAL/256/3 = 15.75 kHz
36
 
    Video frequency: VSYNC = HSYNC/263 ?? = 59.88593 Hz (not sure, could be /262)
37
 
    VBlank duration: 1/VSYNC * (23/263) = 1460 us
38
 
 
39
 
 
40
 
                  Centipede Memory map and Dip Switches
41
 
                  -------------------------------------
42
 
 
43
 
    Memory map for Centipede directly from the Atari schematics (1981).
44
 
 
45
 
     Address  R/W  D7 D6 D5 D4 D3 D2 D1 D0   Function
46
 
    --------------------------------------------------------------------------------------
47
 
    0000-03FF       D  D  D  D  D  D  D  D   RAM
48
 
    --------------------------------------------------------------------------------------
49
 
    0400-07BF       D  D  D  D  D  D  D  D   Playfield RAM
50
 
    07C0-07CF       D  D  D  D  D  D  D  D   Motion Object Picture
51
 
    07D0-07DF       D  D  D  D  D  D  D  D   Motion Object Vert.
52
 
    07E0-07EF       D  D  D  D  D  D  D  D   Motion Object Horiz.
53
 
    07F0-07FF             D  D  D  D  D  D   Motion Object Color
54
 
    --------------------------------------------------------------------------------------
55
 
    0800       R    D  D  D  D  D  D  D  D   Option Switch 1 (0 = On)
56
 
    0801       R    D  D  D  D  D  D  D  D   Option Switch 2 (0 = On)
57
 
    --------------------------------------------------------------------------------------
58
 
    0C00       R    D           D  D  D  D   Horizontal Mini-Track Ball tm Inputs
59
 
               R       D                     VBLANK  (1 = VBlank)
60
 
               R          D                  Self-Test  (0 = On)
61
 
               R             D               Cocktail Cabinet  (1 = Cocktail)
62
 
    0C01       R    D  D  D                  R,C,L Coin Switches (0 = On)
63
 
               R             D               SLAM  (0 = On)
64
 
               R                D            Player 2 Fire Switch (0 = On)
65
 
               R                   D         Player 1 Fire Switch (0 = On)
66
 
               R                      D      Player 2 Start Switch (0 = On)
67
 
               R                         D   Player 1 Start Switch (0 = On)
68
 
 
69
 
    0C02       R    D           D  D  D  D   Vertical Mini-Track Ball tm Inputs
70
 
    0C03       R    D  D  D  D               Player 1 Joystick (R,L,Down,Up)
71
 
               R                D  D  D  D   Player 2 Joystick   (0 = On)
72
 
    --------------------------------------------------------------------------------------
73
 
    1000-100F R/W   D  D  D  D  D  D  D  D   Custom Audio Chip
74
 
    1404       W                D  D  D  D   Playfield Color RAM
75
 
    140C       W                D  D  D  D   Motion Object Color RAM
76
 
    --------------------------------------------------------------------------------------
77
 
    1600       W    D  D  D  D  D  D  D  D   EA ROM Address & Data Latch
78
 
    1680       W                D  D  D  D   EA ROM Control Latch
79
 
    1700       R    D  D  D  D  D  D  D  D   EA ROM Read Data
80
 
    --------------------------------------------------------------------------------------
81
 
    1800       W                             IRQ Acknowledge
82
 
    --------------------------------------------------------------------------------------
83
 
    1C00       W    D                        Left Coin Counter (1 = On)
84
 
    1C01       W    D                        Center Coin Counter (1 = On)
85
 
    1C02       W    D                        Right Coin Counter (1 = On)
86
 
    1C03       W    D                        Player 1 Start LED (0 = On)
87
 
    1C04       W    D                        Player 2 Start LED (0 = On)
88
 
    1C07       W    D                        Track Ball Flip Control (0 = Player 1)
89
 
    --------------------------------------------------------------------------------------
90
 
    2000       W                             WATCHDOG
91
 
    2400       W                             Clear Mini-Track Ball Counters
92
 
    --------------------------------------------------------------------------------------
93
 
    2000-3FFF  R                             Program ROM
94
 
    --------------------------------------------------------------------------------------
95
 
 
96
 
    -EA ROM is an Erasable Reprogrammable rom to save the top 3 high scores
97
 
      and other stuff.
98
 
 
99
 
 
100
 
     Dip switches at N9 on the PCB
101
 
 
102
 
     8    7    6    5    4    3    2    1    Option
103
 
    -------------------------------------------------------------------------------------
104
 
                                  On   On    English $
105
 
                                  On   Off   German
106
 
                                  Off  On    French
107
 
                                  Off  Off   Spanish
108
 
    -------------------------------------------------------------------------------------
109
 
                        On   On              2 lives per game
110
 
                        On   Off             3 lives per game $
111
 
                        Off  On              4 lives per game
112
 
                        Off  Off             5 lives per game
113
 
    -------------------------------------------------------------------------------------
114
 
                                             Bonus life granted at every:
115
 
              On   On                        10,000 points
116
 
              On   Off                       12.000 points $
117
 
              Off  On                        15,000 points
118
 
              Off  Off                       20,000 points
119
 
    -------------------------------------------------------------------------------------
120
 
         On                                  Hard game difficulty
121
 
         Off                                 Easy game difficulty $
122
 
    -------------------------------------------------------------------------------------
123
 
    On                                       1-credit minimum $
124
 
    Off                                      2-credit minimum
125
 
    -------------------------------------------------------------------------------------
126
 
 
127
 
    $ = Manufacturer's suggested settings
128
 
 
129
 
 
130
 
     Dip switches at N8 on the PCB
131
 
 
132
 
     8    7    6    5    4    3    2    1    Option
133
 
    -------------------------------------------------------------------------------------
134
 
                                  On   On    Free play
135
 
                                  On   Off   1 coin for 2 credits
136
 
                                  Off  On    1 coin for 1 credit $
137
 
                                  Off  Off   2 coins for 1 credit
138
 
    -------------------------------------------------------------------------------------
139
 
                        On   On              Right coin mech X 1 $
140
 
                        On   Off             Right coin mech X 4
141
 
                        Off  On              Right coin mech X 5
142
 
                        Off  Off             Right coin mech X 6
143
 
    -------------------------------------------------------------------------------------
144
 
                   On                        Left coin mech X 1 $
145
 
                   Off                       Left coin mech X 2
146
 
    -------------------------------------------------------------------------------------
147
 
    On   On   On                             No bonus coins $
148
 
    On   On   Off                            For every 2 coins inserted, game logic
149
 
                                              adds 1 more coin
150
 
    On   Off  On                             For every 4 coins inserted, game logic
151
 
                                              adds 1 more coin
152
 
    On   Off  Off                            For every 4 coins inserted, game logic
153
 
                                              adds 2 more coin
154
 
    Off  On   On                             For every 5 coins inserted, game logic
155
 
                                              adds 1 more coin
156
 
    Off  On   Off                            For every 3 coins inserted, game logic
157
 
                                              adds 1 more coin
158
 
    -------------------------------------------------------------------------------------
159
 
    $ = Manufacturer's suggested settings
160
 
 
161
 
    Changes:
162
 
        30 Apr 98 LBO
163
 
        * Fixed test mode
164
 
        * Changed high score to use earom routines
165
 
        * Added support for alternate rom set
166
 
 
167
 
****************************************************************************
168
 
 
169
 
     Millipede driver by Ivan Mackintosh
170
 
 
171
 
              Memory map for Millipede from the Atari schematics (SP-217 1982)
172
 
              ----------------------------------------------------------------
173
 
 
174
 
     Address  R/W  D7 D6 D5 D4 D3 D2 D1 D0   Function
175
 
    --------------------------------------------------------------------------------------
176
 
    0000-03FF       D  D  D  D  D  D  D  D   RAM
177
 
    --------------------------------------------------------------------------------------
178
 
    0400-0410  R    D  D  D  D  D  D  D  D   I/OSO (0400-040F POKEY 1)
179
 
    0408       R    D  D  D  D  D  D  D  D   Option Switch 0 (0 = On) (Bank at
180
 
    --------------------------------------------------------------------------------------
181
 
    0800-0810  R    D  D  D  D  D  D  D  D   I/OS1 (0800-080F POKEY 2)
182
 
    0808       R    D  D  D  D  D  D  D  D   Option Switch 1 (0 = On) (Bank at
183
 
    --------------------------------------------------------------------------------------
184
 
    1000-13BF       D  D  D  D  D  D  D  D   Playfield RAM (8x8 TILES, 32x30 SCREEN)
185
 
    13C0-13CF       D  D  D  D  D  D  D  D   Motion Object Picture
186
 
    13D0-13DF       D  D  D  D  D  D  D  D   Motion Object Vert.
187
 
    13E0-13EF       D  D  D  D  D  D  D  D   Motion Object Horiz.
188
 
    13F0-13FF             D  D  D  D  D  D   Motion Object Color
189
 
    --------------------------------------------------------------------------------------
190
 
    2000       R    D                        Horizontal Mini-Track Ball HORIZ DIR
191
 
               R       D                     VBLANK  (1 = VBlank)
192
 
               R          D                  Player 1 Start
193
 
               R             D               Player 1 Fire
194
 
               R                D  D  D  D   Horizontal Mini-Track Ball HORIZ COUNT
195
 
               R                D  D  D  D   Options Switch 2 (Bottom 4 switches at P8)
196
 
    --------------------------------------------------------------------------------------
197
 
    2001       R    D                        Horizontal Mini-Track Ball VERT DIR
198
 
               R          D                  Player 2 Start
199
 
               R             D               Player 2 Fire
200
 
               R                D  D  D  D   Horizontal Mini-Track Ball VERT COUNT
201
 
               R                D  D  D  D   Options Switch 2 (Top 4 switches at P8)
202
 
    --------------------------------------------------------------------------------------
203
 
    2010       R    D  D  D                  R,C,L Coin Switches (0 = On)
204
 
               R             D               SLAM  (0 = On)
205
 
               R                D  D  D  D   P1 Joystick Positions  (0 = On)
206
 
    --------------------------------------------------------------------------------------
207
 
    2011       R    D                        Self-Test Switch (0 = On)
208
 
               R          D                  Cabinet Select  (1 = Upright, 0 = Cocktail)
209
 
               R                D  D  D  D   P2 Joystick Positions  (Undocumented)
210
 
    --------------------------------------------------------------------------------------
211
 
    2030       R    D  D  D  D  D  D  D  D   EA ROM Read Data
212
 
    --------------------------------------------------------------------------------------
213
 
    2480-248F  W    D  D  D  D  D  D  D  D   STAMP COLOR RAM
214
 
    2490-249F  W    D  D  D  D  D  D  D  D   MOTION OBJECT COLOR RAM
215
 
    --------------------------------------------------------------------------------------
216
 
    2501       W    D                        COIN CNTR L
217
 
    2502       W    D                        COIN CNTR R
218
 
    2503       W    D                        START LED 1
219
 
    2504       W    D                        START LED 2
220
 
    2505       W    D                        TRACKBALL ENABLE (TBEN)
221
 
    2506       W    D                        VIDEO ROTATE (VIDROT)
222
 
    2507       W    D                        CONTROL SELECT (CNTRLSEL) - (P1 = 1, P2 = 0?)
223
 
    --------------------------------------------------------------------------------------
224
 
    2600       W                             !IRQRES   - IRQ Acknowledge
225
 
    2680       W                             !WATCHDOG - CLEAR WATCHDOG
226
 
    2700       W                D  D  D  D   !EAROMCON - earom control
227
 
    2780       W    D  D  D  D  D  D  D  D   !EAROMWR  - earom write
228
 
    --------------------------------------------------------------------------------------
229
 
    3000-3FFF  R    D  D  D  D  D  D  D  D   ROM (NOT USED) (Schems listed 300-3fff typo)
230
 
    4000-7FFF  R    D  D  D  D  D  D  D  D   ROM            (Schems listed 400-4fff typo)
231
 
    --------------------------------------------------------------------------------------
232
 
 
233
 
            Switch Settings for Millipede from the Atari schematics (TM-217 1982)
234
 
            ---------------------------------------------------------------------
235
 
 
236
 
    Switch Settings for Price Options / 8-Toggle Switches on Millipede PCB (at B5)
237
 
    --------------------------------------------------------------------------------------
238
 
     8    7    6    5    4    3    2    1    Option
239
 
    --------------------------------------------------------------------------------------
240
 
    On   On                       Off  Off   Demonstration Mode
241
 
    On   Off  On                             For every 3 coins inserted, game logic
242
 
                                              adds 1 more coin
243
 
    On   Off  Off                            For every 5 coins inserted, game logic
244
 
                                              adds 1 more coin
245
 
    Off  On   On                             For every 4 coins inserted, game logic
246
 
                                              adds 2 more coin
247
 
    Off  On   Off                            For every 4 coins inserted, game logic
248
 
                                              adds 1 more coin
249
 
    Off  Off  On                             For every 2 coins inserted, game logic
250
 
                                              adds 1 more coin
251
 
    Off  Off  Off                            No Bonus Coins $
252
 
    --------------------------------------------------------------------------------------
253
 
                   Off                       Left coin mech X 1 $
254
 
                   On                        Left coin mech X 2
255
 
    --------------------------------------------------------------------------------------
256
 
                        Off  Off             Right coin mech X 1 $
257
 
                        Off  On              Right coin mech X 4
258
 
                        On   Off             Right coin mech X 5
259
 
                        On   On              Right coin mech X 6
260
 
    --------------------------------------------------------------------------------------
261
 
                                  On   On    2 coins for 1 credit
262
 
                                  On   Off   1 coin for 1 credit $
263
 
                                  Off  On    1 coin for 2 credits
264
 
                                  Off  Off   Free play
265
 
    --------------------------------------------------------------------------------------
266
 
    $ = Manufacturer's suggested settings
267
 
 
268
 
 
269
 
    Switch Settings for Play Options / 8-Toggle Switches on Millipede PCB (at D5)
270
 
    --------------------------------------------------------------------------------------
271
 
 
272
 
     8    7    6    5    4    3    2    1    Option
273
 
    --------------------------------------------------------------------------------------
274
 
    Off                                      Select Mode $
275
 
    On                                       No Select Mode
276
 
         Off                                 Easy spider $
277
 
         On                                  Hard spider
278
 
    --------------------------------------------------------------------------------------
279
 
              Off  Off                       Bonus life every 12,000 points
280
 
              Off  On                        Bonus life every 15,000 points $
281
 
              On   Off                       Bonus life every 20,000 points
282
 
              On   On                        No bonus life
283
 
    --------------------------------------------------------------------------------------
284
 
                        Off  Off             2 lives per game
285
 
                        Off  On              3 lives per game $
286
 
                        On   Off             4 lives per game
287
 
                        On   On              5 lives per game
288
 
    --------------------------------------------------------------------------------------
289
 
                                  Off        Easy beetle $
290
 
                                  On         Hard beetle
291
 
    --------------------------------------------------------------------------------------
292
 
                                       Off   Easy millipede head $
293
 
                                       On    Hard millipede head
294
 
    --------------------------------------------------------------------------------------
295
 
    $ = Manufacturer's suggested settings
296
 
 
297
 
 
298
 
    Switch settings for Special Options / 8-Toggle Switches on Millipede PCB (at P8)
299
 
    --------------------------------------------------------------------------------------
300
 
 
301
 
     8    7    6    5    4    3    2    1    Option
302
 
    --------------------------------------------------------------------------------------
303
 
    On                                       1 coin counter
304
 
    Off                                      2 coin counters
305
 
    --------------------------------------------------------------------------------------
306
 
         On                                  1 credit minimum $
307
 
         Off                                 2 credit minimum
308
 
    --------------------------------------------------------------------------------------
309
 
         (Switches 5 and 6 unused)           Select Mode Starting Score
310
 
                        On   On              0 points
311
 
                        On   Off             0 and bonus life level
312
 
                        Off  On              0, bonus life level, and 2x bonus life level $
313
 
                        Off  Off             0, bonus life level, and 2x bonus life level,
314
 
                                                and 3x bonus life level
315
 
    --------------------------------------------------------------------------------------
316
 
                                  On   On    English $
317
 
                                  On   Off   German
318
 
                                  Off  On    French
319
 
                                  Off  Off   Spanish
320
 
    --------------------------------------------------------------------------------------
321
 
    $ = Manufacturer's suggested settings
322
 
 
323
 
 
324
 
    Notes: 15 Feb 2007 - MSH
325
 
        * Real Millipede boards do not have the Joystick circuit hooked up
326
 
          to the card edge.
327
 
        * The Joytick and T-Ball inputs are both swapped through LS157s by
328
 
          the CNTRLSEL signal at 0x2507.
329
 
        * How do we hookup TBEN signal at 0x2505?
330
 
 
331
 
    Changes: 15 Feb 2007 - MSH
332
 
        * Added corrected memory map and dip switch settings from Atari Manuals.
333
 
        * Added Cocktail mode (based on v0.36.1 driver from Scott Brasington)
334
 
        * Removed unused dip toggles, now set to IPT_UNKNOWN
335
 
        * Hooked up 2nd trackball
336
 
        * Map P2 Joy inputs to work correctly. (They don't work on a real board)
337
 
 
338
 
****************************************************************************
339
 
 
340
 
                  Warlords Memory map and Dip Switches
341
 
                  ------------------------------------
342
 
 
343
 
     Address  R/W  D7 D6 D5 D4 D3 D2 D1 D0   Function
344
 
    --------------------------------------------------------------------------------------
345
 
    0000-03FF       D  D  D  D  D  D  D  D   RAM
346
 
    --------------------------------------------------------------------------------------
347
 
    0400-07BF       D  D  D  D  D  D  D  D   Screen RAM (8x8 TILES, 32x32 SCREEN)
348
 
    07C0-07CF       D  D  D  D  D  D  D  D   Motion Object Picture
349
 
    07D0-07DF       D  D  D  D  D  D  D  D   Motion Object Vert.
350
 
    07E0-07EF       D  D  D  D  D  D  D  D   Motion Object Horiz.
351
 
    --------------------------------------------------------------------------------------
352
 
    0800       R    D  D  D  D  D  D  D  D   Option Switch 1 (0 = On) (DSW 1)
353
 
    0801       R    D  D  D  D  D  D  D  D   Option Switch 2 (0 = On) (DSW 2)
354
 
    --------------------------------------------------------------------------------------
355
 
    0C00       R    D                        Cocktail Cabinet  (0 = Cocktail)
356
 
               R       D                     VBLANK  (1 = VBlank)
357
 
               R          D                  SELF TEST
358
 
               R             D               DIAG STEP (Unused)
359
 
    0C01       R    D  D  D                  R,C,L Coin Switches (0 = On)
360
 
               R             D               Slam (0 = On)
361
 
               R                D            Player 4 Start Switch (0 = On)
362
 
               R                   D         Player 3 Start Switch (0 = On)
363
 
               R                      D      Player 2 Start Switch (0 = On)
364
 
               R                         D   Player 1 Start Switch (0 = On)
365
 
    --------------------------------------------------------------------------------------
366
 
    1000-100F  W   D  D  D  D  D  D  D  D    Pokey
367
 
    --------------------------------------------------------------------------------------
368
 
    1800       W                             IRQ Acknowledge
369
 
    --------------------------------------------------------------------------------------
370
 
    1C00-1C02  W    D  D  D  D  D  D  D  D   Coin Counters
371
 
    --------------------------------------------------------------------------------------
372
 
    1C03-1C06  W    D  D  D  D  D  D  D  D   LEDs
373
 
    --------------------------------------------------------------------------------------
374
 
    4000       W                             Watchdog
375
 
    --------------------------------------------------------------------------------------
376
 
    5000-7FFF  R                             Program ROM
377
 
    --------------------------------------------------------------------------------------
378
 
 
379
 
    Game Option Settings - J2 (DSW1)
380
 
    =========================
381
 
 
382
 
    8   7   6   5   4   3   2   1       Option
383
 
    ------------------------------------------
384
 
                            On  On      English
385
 
                            On  Off     French
386
 
                            Off On      Spanish
387
 
                            Off Off     German
388
 
                        On              Music at end of each game
389
 
                        Off             Music at end of game for new highscore
390
 
            On  On                      1 or 2 player game costs 1 credit
391
 
            On  Off                     1 player game=1 credit, 2 player=2 credits
392
 
            Off Off                     1 or 2 player game costs 2 credits
393
 
            Off On                      Not used
394
 
    -------------------------------------------
395
 
 
396
 
 
397
 
    Game Price Settings - M2 (DSW2)
398
 
    ========================
399
 
 
400
 
    8   7   6   5   4   3   2   1       Option
401
 
    ------------------------------------------
402
 
                            On  On      Free play
403
 
                            On  Off     1 coin for 2 credits
404
 
                            Off On      1 coin for 1 credit
405
 
                            Off Off     2 coins for 1 credit
406
 
                    On  On              Right coin mech x 1
407
 
                    On  Off             Right coin mech x 4
408
 
                    Off On              Right coin mech x 5
409
 
                    Off Off             Right coin mech x 6
410
 
                On                      Left coin mech x 1
411
 
                Off                     Left coin mech x 2
412
 
    On  On  On                          No bonus coins
413
 
    On  On  Off                         For every 2 coins, add 1 coin
414
 
    On  Off On                          For every 4 coins, add 1 coin
415
 
    On  Off Off                         For every 4 coins, add 2 coins
416
 
    Off On  On                          For every 5 coins, add 1 coin
417
 
    ------------------------------------------
418
 
 
419
 
Maze Invaders:
420
 
http://www.atarigames.com/safestuff/mazeinvaders.html
421
 
 
422
 
-  The controls are somewhat like Food Fight in the way that they need to be
423
 
'calibrated' as you play or before you start by pushing a couple seconds in
424
 
each direction to assign the boundries.
425
 
 
426
 
***************************************************************************/
427
 
 
428
 
#include "emu.h"
429
 
#include "cpu/m6502/m6502.h"
430
 
#include "cpu/s2650/s2650.h"
431
 
#include "machine/atari_vg.h"
432
 
#include "includes/centiped.h"
433
 
#include "sound/ay8910.h"
434
 
#include "sound/sn76496.h"
435
 
#include "sound/pokey.h"
436
 
 
437
 
/*************************************
438
 
 *
439
 
 *  Interrupts
440
 
 *
441
 
 *************************************/
442
 
 
443
 
static TIMER_DEVICE_CALLBACK( generate_interrupt )
444
 
{
445
 
        int scanline = param;
446
 
 
447
 
        /* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */
448
 
        if (scanline & 16)
449
 
                cputag_set_input_line(timer.machine(), "maincpu", 0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
450
 
 
451
 
        /* do a partial update now to handle sprite multiplexing (Maze Invaders) */
452
 
        timer.machine().primary_screen->update_partial(scanline);
453
 
}
454
 
 
455
 
 
456
 
static MACHINE_START( centiped )
457
 
{
458
 
        centiped_state *state = machine.driver_data<centiped_state>();
459
 
 
460
 
        state->save_item(NAME(state->m_oldpos));
461
 
        state->save_item(NAME(state->m_sign));
462
 
        state->save_item(NAME(state->m_dsw_select));
463
 
}
464
 
 
465
 
 
466
 
static MACHINE_RESET( centiped )
467
 
{
468
 
        centiped_state *state = machine.driver_data<centiped_state>();
469
 
 
470
 
        cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
471
 
        state->m_dsw_select = 0;
472
 
        state->m_control_select = 0;
473
 
}
474
 
 
475
 
 
476
 
static MACHINE_RESET( magworm )
477
 
{
478
 
        centiped_state *state = machine.driver_data<centiped_state>();
479
 
 
480
 
        MACHINE_RESET_CALL(centiped);
481
 
 
482
 
        /* kludge: clear RAM so that magworm can be reset cleanly */
483
 
        memset(state->m_rambase, 0, 0x400);
484
 
}
485
 
 
486
 
 
487
 
static WRITE8_HANDLER( irq_ack_w )
488
 
{
489
 
        cputag_set_input_line(space->machine(), "maincpu", 0, CLEAR_LINE);
490
 
}
491
 
 
492
 
 
493
 
 
494
 
/*************************************
495
 
 *
496
 
 *  Input ports
497
 
 *
498
 
 *************************************/
499
 
 
500
 
/*
501
 
 * This wrapper routine is necessary because Centipede requires a direction bit
502
 
 * to be set or cleared. The direction bit is held until the mouse is moved
503
 
 * again.
504
 
 *
505
 
 * There is a 4-bit counter, and two inputs from the trackball: DIR and CLOCK.
506
 
 * CLOCK makes the counter move in the direction of DIR. Since DIR is latched
507
 
 * only when a CLOCK arrives, the DIR bit in the input port doesn't change
508
 
 * until the trackball actually moves.
509
 
 *
510
 
 * There is also a CLR input to the counter which could be used by the game to
511
 
 * clear the counter, but Centipede doesn't use it (though it would be a good
512
 
 * idea to support it anyway).
513
 
 *
514
 
 * The counter is read 240 times per second. There is no provision whatsoever
515
 
 * to prevent the counter from wrapping around between reads.
516
 
 */
517
 
 
518
 
INLINE int read_trackball(running_machine &machine, int idx, int switch_port)
519
 
{
520
 
        centiped_state *state = machine.driver_data<centiped_state>();
521
 
        UINT8 newpos;
522
 
        static const char *const portnames[] = { "IN0", "IN1", "IN2" };
523
 
        static const char *const tracknames[] = { "TRACK0_X", "TRACK0_Y", "TRACK1_X", "TRACK1_Y" };
524
 
 
525
 
        /* adjust idx if we're cocktail flipped */
526
 
        if (state->m_flipscreen)
527
 
                idx += 2;
528
 
 
529
 
        /* if we're to read the dipswitches behind the trackball data, do it now */
530
 
        if (state->m_dsw_select)
531
 
                return (input_port_read(machine, portnames[switch_port]) & 0x7f) | state->m_sign[idx];
532
 
 
533
 
        /* get the new position and adjust the result */
534
 
        newpos = input_port_read(machine, tracknames[idx]);
535
 
        if (newpos != state->m_oldpos[idx])
536
 
        {
537
 
                state->m_sign[idx] = (newpos - state->m_oldpos[idx]) & 0x80;
538
 
                state->m_oldpos[idx] = newpos;
539
 
        }
540
 
 
541
 
        /* blend with the bits from the switch port */
542
 
        return (input_port_read(machine, portnames[switch_port]) & 0x70) | (state->m_oldpos[idx] & 0x0f) | state->m_sign[idx];
543
 
}
544
 
 
545
 
 
546
 
static READ8_HANDLER( centiped_IN0_r )
547
 
{
548
 
        return read_trackball(space->machine(), 0, 0);
549
 
}
550
 
 
551
 
 
552
 
static READ8_HANDLER( centiped_IN2_r )
553
 
{
554
 
        return read_trackball(space->machine(), 1, 2);
555
 
}
556
 
 
557
 
 
558
 
static READ8_HANDLER( milliped_IN1_r )
559
 
{
560
 
        return read_trackball(space->machine(), 1, 1);
561
 
}
562
 
 
563
 
static READ8_HANDLER( milliped_IN2_r )
564
 
{
565
 
        centiped_state *state = space->machine().driver_data<centiped_state>();
566
 
        UINT8 data = input_port_read(space->machine(), "IN2");
567
 
 
568
 
        /* MSH - 15 Feb, 2007
569
 
     * The P2 X Joystick inputs are not properly handled in
570
 
     * the Milliped code, so we are forcing the P2 inputs
571
 
     * into the P1 Joystick handler, this require remapping
572
 
     * the inputs, and has the good side effect of disabling
573
 
     * the actual Joy1 inputs while control_select is no zero.
574
 
     */
575
 
        if (0 != state->m_control_select) {
576
 
                /* Bottom 4 bits is our joystick inputs */
577
 
                UINT8 joy2data = input_port_read(space->machine(), "IN3") & 0x0f;
578
 
                data = data & 0xf0; /* Keep the top 4 bits */
579
 
                data |= (joy2data & 0x0a) >> 1; /* flip left and up */
580
 
                data |= (joy2data & 0x05) << 1; /* flip right and down */
581
 
        }
582
 
        return data;
583
 
}
584
 
 
585
 
static WRITE8_HANDLER( input_select_w )
586
 
{
587
 
        centiped_state *state = space->machine().driver_data<centiped_state>();
588
 
 
589
 
        state->m_dsw_select = (~data >> 7) & 1;
590
 
}
591
 
 
592
 
/* used P2 controls if 1, P1 controls if 0 */
593
 
static WRITE8_HANDLER( control_select_w )
594
 
{
595
 
        centiped_state *state = space->machine().driver_data<centiped_state>();
596
 
 
597
 
        state->m_control_select = (data >> 7) & 1;
598
 
}
599
 
 
600
 
 
601
 
static READ8_HANDLER( mazeinv_input_r )
602
 
{
603
 
        centiped_state *state = space->machine().driver_data<centiped_state>();
604
 
        static const char *const sticknames[] = { "STICK0", "STICK1", "STICK2", "STICK3" };
605
 
 
606
 
        return input_port_read(space->machine(), sticknames[state->m_control_select]);
607
 
}
608
 
 
609
 
 
610
 
static WRITE8_HANDLER( mazeinv_input_select_w )
611
 
{
612
 
        centiped_state *state = space->machine().driver_data<centiped_state>();
613
 
 
614
 
        state->m_control_select = offset & 3;
615
 
}
616
 
 
617
 
static READ8_HANDLER( bullsdrt_data_port_r )
618
 
{
619
 
        switch (cpu_get_pc(&space->device()))
620
 
        {
621
 
                case 0x0033:
622
 
                case 0x6b19:
623
 
                        return 0x01;
624
 
        }
625
 
 
626
 
        return 0;
627
 
}
628
 
 
629
 
 
630
 
 
631
 
/*************************************
632
 
 *
633
 
 *  Output ports
634
 
 *
635
 
 *************************************/
636
 
 
637
 
static WRITE8_HANDLER( led_w )
638
 
{
639
 
        set_led_status(space->machine(), offset, ~data & 0x80);
640
 
}
641
 
 
642
 
 
643
 
static READ8_DEVICE_HANDLER( caterplr_rand_r )
644
 
{
645
 
        return device->machine().rand() % 0xff;
646
 
}
647
 
 
648
 
 
649
 
static WRITE8_HANDLER( coin_count_w )
650
 
{
651
 
        coin_counter_w(space->machine(), offset, data);
652
 
}
653
 
 
654
 
 
655
 
static WRITE8_HANDLER( bullsdrt_coin_count_w )
656
 
{
657
 
        coin_counter_w(space->machine(), 0, data);
658
 
}
659
 
 
660
 
 
661
 
 
662
 
/*************************************
663
 
 *
664
 
 *  Bootleg sound
665
 
 *
666
 
 *************************************/
667
 
 
668
 
static WRITE8_DEVICE_HANDLER( caterplr_AY8910_w )
669
 
{
670
 
        ay8910_address_w(device, 0, offset);
671
 
        ay8910_data_w(device, 0, data);
672
 
}
673
 
 
674
 
 
675
 
static READ8_DEVICE_HANDLER( caterplr_AY8910_r )
676
 
{
677
 
        ay8910_address_w(device, 0, offset);
678
 
        return ay8910_r(device, 0);
679
 
}
680
 
 
681
 
 
682
 
 
683
 
/*************************************
684
 
 *
685
 
 *  Centipede CPU memory handlers
686
 
 *
687
 
 *************************************/
688
 
 
689
 
static ADDRESS_MAP_START( centiped_map, AS_PROGRAM, 8 )
690
 
        ADDRESS_MAP_GLOBAL_MASK(0x3fff)
691
 
        AM_RANGE(0x0000, 0x03ff) AM_RAM AM_BASE_MEMBER(centiped_state, m_rambase)
692
 
        AM_RANGE(0x0400, 0x07bf) AM_RAM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
693
 
        AM_RANGE(0x07c0, 0x07ff) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
694
 
        AM_RANGE(0x0800, 0x0800) AM_READ_PORT("DSW1")           /* DSW1 */
695
 
        AM_RANGE(0x0801, 0x0801) AM_READ_PORT("DSW2")           /* DSW2 */
696
 
        AM_RANGE(0x0c00, 0x0c00) AM_READ(centiped_IN0_r)        /* IN0 */
697
 
        AM_RANGE(0x0c01, 0x0c01) AM_READ_PORT("IN1")            /* IN1 */
698
 
        AM_RANGE(0x0c02, 0x0c02) AM_READ(centiped_IN2_r)        /* IN2 */
699
 
        AM_RANGE(0x0c03, 0x0c03) AM_READ_PORT("IN3")            /* IN3 */
700
 
        AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey", pokey_r, pokey_w)
701
 
        AM_RANGE(0x1400, 0x140f) AM_WRITE(centiped_paletteram_w) AM_BASE_GENERIC(paletteram)
702
 
        AM_RANGE(0x1600, 0x163f) AM_DEVWRITE("earom", atari_vg_earom_w)
703
 
        AM_RANGE(0x1680, 0x1680) AM_DEVWRITE("earom", atari_vg_earom_ctrl_w)
704
 
        AM_RANGE(0x1700, 0x173f) AM_DEVREAD("earom", atari_vg_earom_r)
705
 
        AM_RANGE(0x1800, 0x1800) AM_WRITE(irq_ack_w)
706
 
        AM_RANGE(0x1c00, 0x1c02) AM_WRITE(coin_count_w)
707
 
        AM_RANGE(0x1c03, 0x1c04) AM_WRITE(led_w)
708
 
        AM_RANGE(0x1c07, 0x1c07) AM_WRITE(centiped_flip_screen_w)
709
 
        AM_RANGE(0x2000, 0x2000) AM_WRITE(watchdog_reset_w)
710
 
        AM_RANGE(0x2000, 0x3fff) AM_ROM
711
 
ADDRESS_MAP_END
712
 
 
713
 
 
714
 
static ADDRESS_MAP_START( centipdb_map, AS_PROGRAM, 8 )
715
 
        ADDRESS_MAP_GLOBAL_MASK(0x7fff)
716
 
        AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x4000) AM_RAM
717
 
        AM_RANGE(0x0400, 0x07bf) AM_MIRROR(0x4000) AM_RAM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
718
 
        AM_RANGE(0x07c0, 0x07ff) AM_MIRROR(0x4000) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
719
 
        AM_RANGE(0x0800, 0x0800) AM_MIRROR(0x4000) AM_READ_PORT("DSW1")         /* DSW1 */
720
 
        AM_RANGE(0x0801, 0x0801) AM_MIRROR(0x4000) AM_READ_PORT("DSW2")         /* DSW2 */
721
 
        AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x4000) AM_READ(centiped_IN0_r)      /* IN0 */
722
 
        AM_RANGE(0x0c01, 0x0c01) AM_MIRROR(0x4000) AM_READ_PORT("IN1")          /* IN1 */
723
 
        AM_RANGE(0x0c02, 0x0c02) AM_MIRROR(0x4000) AM_READ(centiped_IN2_r)      /* IN2 */
724
 
        AM_RANGE(0x0c03, 0x0c03) AM_MIRROR(0x4000) AM_READ_PORT("IN3")          /* IN3 */
725
 
        AM_RANGE(0x1000, 0x1001) AM_MIRROR(0x4000) AM_DEVWRITE("pokey", ay8910_data_address_w)
726
 
        AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x4000) AM_DEVREAD("pokey", ay8910_r)
727
 
        AM_RANGE(0x1400, 0x140f) AM_MIRROR(0x4000) AM_WRITE(centiped_paletteram_w) AM_BASE_GENERIC(paletteram)
728
 
        AM_RANGE(0x1600, 0x163f) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_w)
729
 
        AM_RANGE(0x1680, 0x1680) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_ctrl_w)
730
 
        AM_RANGE(0x1700, 0x173f) AM_MIRROR(0x4000) AM_DEVREAD("earom", atari_vg_earom_r)
731
 
        AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x4000) AM_WRITE(irq_ack_w)
732
 
        AM_RANGE(0x1c00, 0x1c02) AM_MIRROR(0x4000) AM_WRITE(coin_count_w)
733
 
        AM_RANGE(0x1c03, 0x1c04) AM_MIRROR(0x4000) AM_WRITE(led_w)
734
 
        AM_RANGE(0x1c07, 0x1c07) AM_MIRROR(0x4000) AM_WRITE(centiped_flip_screen_w)
735
 
        AM_RANGE(0x2000, 0x27ff) AM_ROM
736
 
        AM_RANGE(0x2800, 0x3fff) AM_MIRROR(0x4000) AM_ROM
737
 
        AM_RANGE(0x6000, 0x67ff) AM_ROM
738
 
ADDRESS_MAP_END
739
 
 
740
 
 
741
 
 
742
 
/*************************************
743
 
 *
744
 
 *  Millipede CPU memory handlers
745
 
 *
746
 
 *************************************/
747
 
 
748
 
static ADDRESS_MAP_START( milliped_map, AS_PROGRAM, 8 )
749
 
        ADDRESS_MAP_GLOBAL_MASK(0x7fff)
750
 
        AM_RANGE(0x0000, 0x03ff) AM_RAM
751
 
        AM_RANGE(0x0400, 0x040f) AM_DEVREADWRITE("pokey", pokey_r, pokey_w)
752
 
        AM_RANGE(0x0800, 0x080f) AM_DEVREADWRITE("pokey2", pokey_r, pokey_w)
753
 
        AM_RANGE(0x1000, 0x13bf) AM_RAM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
754
 
        AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
755
 
        AM_RANGE(0x2000, 0x2000) AM_READ(centiped_IN0_r)
756
 
        AM_RANGE(0x2001, 0x2001) AM_READ(milliped_IN1_r)
757
 
        AM_RANGE(0x2010, 0x2010) AM_READ(milliped_IN2_r)
758
 
        AM_RANGE(0x2011, 0x2011) AM_READ_PORT("IN3")
759
 
        AM_RANGE(0x2030, 0x2030) AM_DEVREAD("earom", atari_vg_earom_r)
760
 
        AM_RANGE(0x2480, 0x249f) AM_WRITE(milliped_paletteram_w) AM_BASE_GENERIC(paletteram)
761
 
        AM_RANGE(0x2500, 0x2502) AM_WRITE(coin_count_w)
762
 
        AM_RANGE(0x2503, 0x2504) AM_WRITE(led_w)
763
 
        AM_RANGE(0x2505, 0x2505) AM_WRITE(input_select_w) /* TBEN */
764
 
        AM_RANGE(0x2506, 0x2506) AM_WRITE(centiped_flip_screen_w)
765
 
        AM_RANGE(0x2507, 0x2507) AM_WRITE(control_select_w) /* CNTRLSEL */
766
 
        AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
767
 
        AM_RANGE(0x2680, 0x2680) AM_WRITE(watchdog_reset_w)
768
 
        AM_RANGE(0x2700, 0x2700) AM_DEVWRITE("earom", atari_vg_earom_ctrl_w)
769
 
        AM_RANGE(0x2780, 0x27bf) AM_DEVWRITE("earom", atari_vg_earom_w)
770
 
        AM_RANGE(0x4000, 0x7fff) AM_ROM
771
 
ADDRESS_MAP_END
772
 
 
773
 
 
774
 
 
775
 
/*************************************
776
 
 *
777
 
 *  Warlords CPU memory handlers
778
 
 *
779
 
 *************************************/
780
 
 
781
 
static ADDRESS_MAP_START( warlords_map, AS_PROGRAM, 8 )
782
 
        ADDRESS_MAP_GLOBAL_MASK(0x7fff)
783
 
        AM_RANGE(0x0000, 0x03ff) AM_RAM
784
 
        AM_RANGE(0x0400, 0x07bf) AM_RAM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
785
 
        AM_RANGE(0x07c0, 0x07ff) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
786
 
        AM_RANGE(0x0800, 0x0800) AM_READ_PORT("DSW1")   /* DSW1 */
787
 
        AM_RANGE(0x0801, 0x0801) AM_READ_PORT("DSW2")   /* DSW2 */
788
 
        AM_RANGE(0x0c00, 0x0c00) AM_READ_PORT("IN0")    /* IN0 */
789
 
        AM_RANGE(0x0c01, 0x0c01) AM_READ_PORT("IN1")    /* IN1 */
790
 
        AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey", pokey_r, pokey_w)
791
 
        AM_RANGE(0x1800, 0x1800) AM_WRITE(irq_ack_w)
792
 
        AM_RANGE(0x1c00, 0x1c02) AM_WRITE(coin_count_w)
793
 
        AM_RANGE(0x1c03, 0x1c06) AM_WRITE(led_w)
794
 
        AM_RANGE(0x4000, 0x4000) AM_WRITE(watchdog_reset_w)
795
 
        AM_RANGE(0x5000, 0x7fff) AM_ROM
796
 
ADDRESS_MAP_END
797
 
 
798
 
 
799
 
 
800
 
/*************************************
801
 
 *
802
 
 *  Maze Invaders CPU memory handlers
803
 
 *
804
 
 *************************************/
805
 
 
806
 
static ADDRESS_MAP_START( mazeinv_map, AS_PROGRAM, 8 )
807
 
        ADDRESS_MAP_GLOBAL_MASK(0x7fff)
808
 
        AM_RANGE(0x0000, 0x03ff) AM_RAM
809
 
        AM_RANGE(0x0400, 0x040f) AM_DEVREADWRITE("pokey", pokey_r, pokey_w)
810
 
        AM_RANGE(0x0800, 0x080f) AM_DEVREADWRITE("pokey2", pokey_r, pokey_w)
811
 
        AM_RANGE(0x1000, 0x13bf) AM_RAM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
812
 
        AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
813
 
        AM_RANGE(0x2000, 0x2000) AM_READ_PORT("IN0")
814
 
        AM_RANGE(0x2001, 0x2001) AM_READ_PORT("IN1")
815
 
        AM_RANGE(0x2010, 0x2010) AM_READ_PORT("IN2")
816
 
        AM_RANGE(0x2011, 0x2011) AM_READ_PORT("IN3")
817
 
        AM_RANGE(0x2020, 0x2020) AM_READ(mazeinv_input_r)
818
 
        AM_RANGE(0x2030, 0x2030) AM_DEVREAD("earom", atari_vg_earom_r)
819
 
        AM_RANGE(0x2480, 0x249f) AM_WRITE(mazeinv_paletteram_w) AM_BASE_GENERIC(paletteram)
820
 
        AM_RANGE(0x2500, 0x2502) AM_WRITE(coin_count_w)
821
 
        AM_RANGE(0x2503, 0x2504) AM_WRITE(led_w)
822
 
        AM_RANGE(0x2505, 0x2505) AM_WRITE(input_select_w)
823
 
        AM_RANGE(0x2506, 0x2506) AM_WRITE(centiped_flip_screen_w)
824
 
        AM_RANGE(0x2580, 0x2583) AM_WRITE(mazeinv_input_select_w)
825
 
        AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
826
 
        AM_RANGE(0x2680, 0x2680) AM_WRITE(watchdog_reset_w)
827
 
        AM_RANGE(0x2700, 0x2700) AM_DEVWRITE("earom", atari_vg_earom_ctrl_w)
828
 
        AM_RANGE(0x2780, 0x27bf) AM_DEVWRITE("earom", atari_vg_earom_w)
829
 
        AM_RANGE(0x3000, 0x7fff) AM_ROM
830
 
ADDRESS_MAP_END
831
 
 
832
 
 
833
 
 
834
 
/****************************************
835
 
 *
836
 
 *  Bulls Eye Darts CPU memory handlers
837
 
 *
838
 
 ****************************************/
839
 
 
840
 
static ADDRESS_MAP_START( bullsdrt_map, AS_PROGRAM, 8 )
841
 
        AM_RANGE(0x0000, 0x0fff) AM_ROM
842
 
        AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x6000) AM_READ_PORT("DSW1")
843
 
        AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x6000) AM_READ(centiped_IN0_r)
844
 
        AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x6000) AM_READ_PORT("IN1")
845
 
        AM_RANGE(0x1082, 0x1082) AM_MIRROR(0x6000) AM_READ(centiped_IN2_r)
846
 
        AM_RANGE(0x1200, 0x123f) AM_MIRROR(0x6000) AM_DEVREADWRITE("earom", atari_vg_earom_r, atari_vg_earom_w)
847
 
        AM_RANGE(0x1280, 0x1280) AM_MIRROR(0x6000) AM_DEVWRITE("earom", atari_vg_earom_ctrl_w)
848
 
        AM_RANGE(0x1300, 0x1300) AM_MIRROR(0x6000) AM_READ_PORT("DSW2")
849
 
        AM_RANGE(0x1400, 0x140f) AM_MIRROR(0x6000) AM_WRITE(centiped_paletteram_w) AM_BASE_GENERIC(paletteram)
850
 
        AM_RANGE(0x1481, 0x1481) AM_MIRROR(0x6000) AM_WRITE(bullsdrt_coin_count_w)
851
 
        AM_RANGE(0x1483, 0x1484) AM_MIRROR(0x6000) AM_WRITE(led_w)
852
 
        AM_RANGE(0x1487, 0x1487) AM_MIRROR(0x6000) AM_WRITE(centiped_flip_screen_w)
853
 
        AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_WRITE(watchdog_reset_w)
854
 
        AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_NOP
855
 
        AM_RANGE(0x1800, 0x1bbf) AM_MIRROR(0x6000) AM_WRITE(centiped_videoram_w) AM_BASE_MEMBER(centiped_state, m_videoram)
856
 
        AM_RANGE(0x1bc0, 0x1bff) AM_MIRROR(0x6000) AM_RAM AM_BASE_MEMBER(centiped_state, m_spriteram)
857
 
        AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
858
 
        AM_RANGE(0x2000, 0x2fff) AM_ROM
859
 
        AM_RANGE(0x4000, 0x4fff) AM_ROM
860
 
        AM_RANGE(0x6000, 0x6fff) AM_ROM
861
 
ADDRESS_MAP_END
862
 
 
863
 
static ADDRESS_MAP_START( bullsdrt_port_map, AS_IO, 8 )
864
 
        AM_RANGE(0x00, 0x00) AM_WRITE(bullsdrt_sprites_bank_w)
865
 
        AM_RANGE(0x20, 0x3f) AM_WRITE(bullsdrt_tilesbank_w) AM_BASE_MEMBER(centiped_state, m_bullsdrt_tiles_bankram)
866
 
        AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(bullsdrt_data_port_r) AM_DEVWRITE("snsnd", sn76496_w)
867
 
ADDRESS_MAP_END
868
 
 
869
 
 
870
 
 
871
 
/*************************************
872
 
 *
873
 
 *  Port definitions
874
 
 *
875
 
 *************************************/
876
 
 
877
 
/* The input ports are identical for the real one and the bootleg one, except
878
 
   that one of the languages is Italian in the bootleg one instead of Spanish */
879
 
 
880
 
static INPUT_PORTS_START( centiped )
881
 
        PORT_START("IN0")
882
 
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball data */
883
 
        PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
884
 
        PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
885
 
        PORT_DIPSETTING(    0x10, DEF_STR( Cocktail ) )
886
 
        PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
887
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK )
888
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball sign bit */
889
 
 
890
 
        PORT_START("IN1")
891
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
892
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
893
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
894
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
895
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
896
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
897
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
898
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
899
 
 
900
 
        PORT_START("IN2")
901
 
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball data */
902
 
        PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_UNKNOWN )
903
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball sign bit */
904
 
 
905
 
        PORT_START("IN3")
906
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
907
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
908
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
909
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
910
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
911
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
912
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
913
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
914
 
 
915
 
        PORT_START("DSW1")
916
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("N9:!1,!2")
917
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
918
 
        PORT_DIPSETTING(    0x01, DEF_STR( German ) )
919
 
        PORT_DIPSETTING(    0x02, DEF_STR( French ) )
920
 
        PORT_DIPSETTING(    0x03, DEF_STR( Spanish ) )
921
 
        PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )            PORT_DIPLOCATION("N9:!3,!4")
922
 
        PORT_DIPSETTING(    0x00, "2" )
923
 
        PORT_DIPSETTING(    0x04, "3" )
924
 
        PORT_DIPSETTING(    0x08, "4" )
925
 
        PORT_DIPSETTING(    0x0c, "5" )
926
 
        PORT_DIPNAME( 0x30, 0x10, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("N9:!5,!6")
927
 
        PORT_DIPSETTING(    0x00, "10000" )
928
 
        PORT_DIPSETTING(    0x10, "12000" )
929
 
        PORT_DIPSETTING(    0x20, "15000" )
930
 
        PORT_DIPSETTING(    0x30, "20000" )
931
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("N9:!7")
932
 
        PORT_DIPSETTING(    0x40, DEF_STR( Easy ) )
933
 
        PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
934
 
        PORT_DIPNAME( 0x80, 0x00, "Credit Minimum" )            PORT_DIPLOCATION("N9:!8")
935
 
        PORT_DIPSETTING(    0x00, "1" )
936
 
        PORT_DIPSETTING(    0x80, "2" )
937
 
 
938
 
        PORT_START("DSW2")
939
 
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )          PORT_DIPLOCATION("N8:!1,!2")
940
 
        PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
941
 
        PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
942
 
        PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
943
 
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
944
 
        PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )                        PORT_DIPLOCATION("N8:!3,!4")
945
 
        PORT_DIPSETTING(    0x00, "*1" )
946
 
        PORT_DIPSETTING(    0x04, "*4" )
947
 
        PORT_DIPSETTING(    0x08, "*5" )
948
 
        PORT_DIPSETTING(    0x0c, "*6" )
949
 
        PORT_DIPNAME( 0x10, 0x00, "Left Coin" )                         PORT_DIPLOCATION("N8:!5")
950
 
        PORT_DIPSETTING(    0x00, "*1" )
951
 
        PORT_DIPSETTING(    0x10, "*2" )
952
 
        PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )                       PORT_DIPLOCATION("N8:!6,!7,!8")
953
 
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
954
 
        PORT_DIPSETTING(    0x20, "3 credits/2 coins" )
955
 
        PORT_DIPSETTING(    0x40, "5 credits/4 coins" )
956
 
        PORT_DIPSETTING(    0x60, "6 credits/4 coins" )
957
 
        PORT_DIPSETTING(    0x80, "6 credits/5 coins" )
958
 
        PORT_DIPSETTING(    0xa0, "4 credits/3 coins" )
959
 
 
960
 
        PORT_START("TRACK0_X")  /* IN6, fake trackball input port. */
961
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE
962
 
 
963
 
        PORT_START("TRACK0_Y")  /* IN7, fake trackball input port. */
964
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
965
 
 
966
 
        PORT_START("TRACK1_X")  /* IN8, fake trackball input port. */
967
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_COCKTAIL
968
 
 
969
 
        PORT_START("TRACK1_Y")  /* IN9, fake trackball input port. */
970
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL
971
 
INPUT_PORTS_END
972
 
 
973
 
static INPUT_PORTS_START( caterplr )
974
 
        PORT_INCLUDE( centiped )
975
 
 
976
 
        PORT_MODIFY("DSW1")
977
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("N9:!1,!2")
978
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
979
 
        PORT_DIPSETTING(    0x01, DEF_STR( German ) )
980
 
        PORT_DIPSETTING(    0x02, DEF_STR( French ) )
981
 
        PORT_DIPSETTING(    0x03, DEF_STR( Italian ) )
982
 
INPUT_PORTS_END
983
 
 
984
 
 
985
 
static INPUT_PORTS_START( centtime )
986
 
        PORT_INCLUDE( centiped )
987
 
 
988
 
        PORT_MODIFY("IN0")
989
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
990
 
 
991
 
        PORT_MODIFY("IN1")
992
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
993
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
994
 
 
995
 
        PORT_MODIFY("IN3")
996
 
        PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
997
 
 
998
 
        PORT_MODIFY("DSW1")
999
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("SW1:!1,!2")
1000
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
1001
 
        PORT_DIPSETTING(    0x01, DEF_STR( German ) )
1002
 
        PORT_DIPSETTING(    0x02, DEF_STR( French ) )
1003
 
        PORT_DIPSETTING(    0x03, DEF_STR( Spanish ) )
1004
 
        PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )            PORT_DIPLOCATION("SW1:!3,!4")
1005
 
        PORT_DIPSETTING(    0x00, "2" )
1006
 
        PORT_DIPSETTING(    0x04, "3" )
1007
 
        PORT_DIPSETTING(    0x08, "4" )
1008
 
        PORT_DIPSETTING(    0x0c, "5" )
1009
 
        PORT_DIPNAME( 0x30, 0x10, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("SW1:!5,!6")
1010
 
        PORT_DIPSETTING(    0x00, "10000" )
1011
 
        PORT_DIPSETTING(    0x10, "12000" )
1012
 
        PORT_DIPSETTING(    0x20, "15000" )
1013
 
        PORT_DIPSETTING(    0x30, "20000" )
1014
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("SW1:!7")
1015
 
        PORT_DIPSETTING(    0x40, DEF_STR( Easy ) )
1016
 
        PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
1017
 
        PORT_DIPNAME( 0x80, 0x00, "Credit Minimum" )            PORT_DIPLOCATION("SW1:!8")
1018
 
        PORT_DIPSETTING(    0x00, "1" )
1019
 
        PORT_DIPSETTING(    0x80, "2" )
1020
 
 
1021
 
        PORT_MODIFY("DSW2")
1022
 
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW2:!1,!2")
1023
 
        PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
1024
 
        PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
1025
 
        PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
1026
 
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
1027
 
        PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Game_Time ) )        PORT_DIPLOCATION("SW2:!3,!4,!5")
1028
 
        PORT_DIPSETTING(    0x00, "Untimed" )
1029
 
        PORT_DIPSETTING(    0x04, "1 Minute" )
1030
 
        PORT_DIPSETTING(    0x08, "2 Minutes" )
1031
 
        PORT_DIPSETTING(    0x0c, "3 Minutes" )
1032
 
        PORT_DIPSETTING(    0x10, "4 Minutes" )
1033
 
        PORT_DIPSETTING(    0x14, "5 Minutes" )
1034
 
        PORT_DIPSETTING(    0x18, "6 Minutes" )
1035
 
        PORT_DIPSETTING(    0x1c, "7 Minutes" )
1036
 
        PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )                       PORT_DIPLOCATION("SW2:!6,!7,!8")
1037
 
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
1038
 
        PORT_DIPSETTING(    0x20, "3 credits/2 coins" )
1039
 
        PORT_DIPSETTING(    0x40, "5 credits/4 coins" )
1040
 
        PORT_DIPSETTING(    0x60, "6 credits/4 coins" )
1041
 
        PORT_DIPSETTING(    0x80, "6 credits/5 coins" )
1042
 
        PORT_DIPSETTING(    0xa0, "4 credits/3 coins" )
1043
 
 
1044
 
        PORT_MODIFY("TRACK1_X") /* IN8, place for cocktail trackball (not used) */
1045
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
1046
 
 
1047
 
        PORT_MODIFY("TRACK1_Y") /* IN9, place for cocktail trackball (not used) */
1048
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
1049
 
INPUT_PORTS_END
1050
 
 
1051
 
 
1052
 
static INPUT_PORTS_START( magworm )
1053
 
        PORT_INCLUDE( centiped )
1054
 
 
1055
 
        PORT_MODIFY("IN1")
1056
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
1057
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
1058
 
 
1059
 
        PORT_MODIFY("IN3")
1060
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1061
 
 
1062
 
        PORT_MODIFY("DSW1")
1063
 
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW1:!1,!2")
1064
 
        PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
1065
 
        PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
1066
 
        PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
1067
 
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
1068
 
        PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )                        PORT_DIPLOCATION("SW1:!3,!4")
1069
 
        PORT_DIPSETTING(    0x00, "*3" )
1070
 
        PORT_DIPSETTING(    0x04, "*7" )
1071
 
        PORT_DIPSETTING(    0x08, "*1/2" )
1072
 
        PORT_DIPSETTING(    0x0c, "*6" )
1073
 
        PORT_DIPNAME( 0x30, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("SW1:!5,!6")
1074
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
1075
 
        PORT_DIPSETTING(    0x10, DEF_STR( German ) )
1076
 
        PORT_DIPSETTING(    0x20, DEF_STR( French ) )
1077
 
        PORT_DIPSETTING(    0x30, DEF_STR( Spanish ) )
1078
 
        PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) )            PORT_DIPLOCATION("SW1:!7,!8")
1079
 
        PORT_DIPSETTING(    0x00, "2" )
1080
 
        PORT_DIPSETTING(    0x40, "3" )
1081
 
        PORT_DIPSETTING(    0x80, "4" )
1082
 
        PORT_DIPSETTING(    0xc0, "5" )
1083
 
 
1084
 
        PORT_MODIFY("DSW2")
1085
 
        PORT_DIPNAME( 0x01, 0x00, "Left Coin" )                         PORT_DIPLOCATION("SW2:!1")
1086
 
        PORT_DIPSETTING(    0x00, "*1" )
1087
 
        PORT_DIPSETTING(    0x01, "*2" )
1088
 
        PORT_DIPNAME( 0x0e, 0x00, "Bonus Coins" )                       PORT_DIPLOCATION("SW2:!2,!3,!4")
1089
 
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
1090
 
        PORT_DIPSETTING(    0x02, "3 credits/2 coins" )
1091
 
        PORT_DIPSETTING(    0x04, "5 credits/4 coins" )
1092
 
        PORT_DIPSETTING(    0x06, "6 credits/4 coins" )
1093
 
        PORT_DIPSETTING(    0x08, "6 credits/5 coins" )
1094
 
        PORT_DIPSETTING(    0x0a, "4 credits/3 coins" )
1095
 
        PORT_DIPNAME( 0x30, 0x10, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("SW2:!5,!6")
1096
 
        PORT_DIPSETTING(    0x00, "10000" )
1097
 
        PORT_DIPSETTING(    0x10, "12000" )
1098
 
        PORT_DIPSETTING(    0x20, "15000" )
1099
 
        PORT_DIPSETTING(    0x30, "20000" )
1100
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("SW2:!7")
1101
 
        PORT_DIPSETTING(    0x40, DEF_STR( Easy ) )
1102
 
        PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
1103
 
        PORT_DIPNAME( 0x80, 0x00, "Credit Minimum" )            PORT_DIPLOCATION("SW2:!8")
1104
 
        PORT_DIPSETTING(    0x00, "1" )
1105
 
        PORT_DIPSETTING(    0x80, "2" )
1106
 
INPUT_PORTS_END
1107
 
 
1108
 
 
1109
 
static INPUT_PORTS_START( milliped )
1110
 
        PORT_START("IN0")       /* $2000 */ /* see port 6 for x trackball */
1111
 
        PORT_DIPNAME(0x03, 0x00, DEF_STR( Language ) )          PORT_DIPLOCATION("P8:!1,!2")
1112
 
        PORT_DIPSETTING(   0x00, DEF_STR( English ) )
1113
 
        PORT_DIPSETTING(   0x01, DEF_STR( German ) )
1114
 
        PORT_DIPSETTING(   0x02, DEF_STR( French ) )
1115
 
        PORT_DIPSETTING(   0x03, DEF_STR( Spanish ) )
1116
 
        PORT_DIPNAME(0x0c, 0x04, "Bonus" )                                      PORT_DIPLOCATION("P8:!3,!4")
1117
 
        PORT_DIPSETTING(   0x00, "0" )
1118
 
        PORT_DIPSETTING(   0x04, "0 1x" )
1119
 
        PORT_DIPSETTING(   0x08, "0 1x 2x" )
1120
 
        PORT_DIPSETTING(   0x0c, "0 1x 2x 3x" )
1121
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
1122
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
1123
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK )
1124
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )           /* trackball sign bit */
1125
 
 
1126
 
        PORT_START("IN1")       /* $2001 */ /* see port 7 for y trackball */
1127
 
        /* these bits are unused */
1128
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
1129
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1130
 
        PORT_DIPNAME(0x04, 0x00, "Credit Minimum" )                     PORT_DIPLOCATION("P8:!7")
1131
 
        PORT_DIPSETTING(   0x00, "1" )
1132
 
        PORT_DIPSETTING(   0x04, "2" )
1133
 
        PORT_DIPNAME(0x08, 0x00, "Coin Counters" )                      PORT_DIPLOCATION("P8:!8")
1134
 
        PORT_DIPSETTING(   0x00, "1" )
1135
 
        PORT_DIPSETTING(   0x08, "2" )
1136
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
1137
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
1138
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1139
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )           /* trackball sign bit */
1140
 
 
1141
 
        PORT_START("IN2")       /* $2010 */
1142
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
1143
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
1144
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
1145
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
1146
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
1147
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
1148
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1149
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
1150
 
 
1151
 
        PORT_START("IN3")       /* $2011 */
1152
 
        /* Note, joystick X input for player 2 are bad in software */
1153
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
1154
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
1155
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
1156
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
1157
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1158
 
        PORT_DIPNAME(0x20, 0x20, DEF_STR( Cabinet ) )
1159
 
        PORT_DIPSETTING(   0x20, DEF_STR( Upright ) )
1160
 
        PORT_DIPSETTING(   0x00, DEF_STR( Cocktail ) )
1161
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1162
 
        PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
1163
 
 
1164
 
        PORT_START("DSW1")      /* $0408 */
1165
 
        PORT_DIPNAME(0x01, 0x00, "Millipede Head" )                     PORT_DIPLOCATION("D5:!1")
1166
 
        PORT_DIPSETTING(   0x00, DEF_STR( Easy ) )
1167
 
        PORT_DIPSETTING(   0x01, DEF_STR( Hard ) )
1168
 
        PORT_DIPNAME(0x02, 0x00, "Beetle" )                                     PORT_DIPLOCATION("D5:!2")
1169
 
        PORT_DIPSETTING(   0x00, DEF_STR( Easy ) )
1170
 
        PORT_DIPSETTING(   0x02, DEF_STR( Hard ) )
1171
 
        PORT_DIPNAME(0x0c, 0x04, DEF_STR( Lives ) )                     PORT_DIPLOCATION("D5:!3,!4")
1172
 
        PORT_DIPSETTING(   0x00, "2" )
1173
 
        PORT_DIPSETTING(   0x04, "3" )
1174
 
        PORT_DIPSETTING(   0x08, "4" )
1175
 
        PORT_DIPSETTING(   0x0c, "5" )
1176
 
        PORT_DIPNAME(0x30, 0x10, DEF_STR( Bonus_Life ) )        PORT_DIPLOCATION("D5:!5,!6")
1177
 
        PORT_DIPSETTING(   0x00, "12000" )
1178
 
        PORT_DIPSETTING(   0x10, "15000" )
1179
 
        PORT_DIPSETTING(   0x20, "20000" )
1180
 
        PORT_DIPSETTING(   0x30, DEF_STR( None ) )
1181
 
        PORT_DIPNAME(0x40, 0x00, "Spider" )                                     PORT_DIPLOCATION("D5:!7")
1182
 
        PORT_DIPSETTING(   0x00, DEF_STR( Easy ) )
1183
 
        PORT_DIPSETTING(   0x40, DEF_STR( Hard ) )
1184
 
        PORT_DIPNAME(0x80, 0x00, "Starting Score Select" )      PORT_DIPLOCATION("D5:!8")
1185
 
        PORT_DIPSETTING(   0x80, DEF_STR( Off ) )
1186
 
        PORT_DIPSETTING(   0x00, DEF_STR( On ) )
1187
 
 
1188
 
        PORT_START("DSW2")      /* $0808 */
1189
 
        PORT_DIPNAME(0x03, 0x02, DEF_STR( Coinage ) )           PORT_DIPLOCATION("B5:!1,!2")
1190
 
        PORT_DIPSETTING(   0x03, DEF_STR( 2C_1C ) )
1191
 
        PORT_DIPSETTING(   0x02, DEF_STR( 1C_1C ) )
1192
 
        PORT_DIPSETTING(   0x01, DEF_STR( 1C_2C ) )
1193
 
        PORT_DIPSETTING(   0x00, DEF_STR( Free_Play ) )
1194
 
        PORT_DIPNAME(0x0c, 0x00, "Right Coin" )                         PORT_DIPLOCATION("B5:!3,!4")
1195
 
        PORT_DIPSETTING(   0x00, "*1" )
1196
 
        PORT_DIPSETTING(   0x04, "*4" )
1197
 
        PORT_DIPSETTING(   0x08, "*5" )
1198
 
        PORT_DIPSETTING(   0x0c, "*6" )
1199
 
        PORT_DIPNAME(0x10, 0x00, "Left Coin" )                          PORT_DIPLOCATION("B5:!5")
1200
 
        PORT_DIPSETTING(   0x00, "*1" )
1201
 
        PORT_DIPSETTING(   0x10, "*2" )
1202
 
        PORT_DIPNAME(0xe0, 0x00, "Bonus Coins" )                        PORT_DIPLOCATION("B5:!6,!7,!8")
1203
 
        PORT_DIPSETTING(   0x00, DEF_STR( None ) )
1204
 
        PORT_DIPSETTING(   0x20, "3 credits/2 coins" )
1205
 
        PORT_DIPSETTING(   0x40, "5 credits/4 coins" )
1206
 
        PORT_DIPSETTING(   0x60, "6 credits/4 coins" )
1207
 
        PORT_DIPSETTING(   0x80, "6 credits/5 coins" )
1208
 
        PORT_DIPSETTING(   0xa0, "4 credits/3 coins" )
1209
 
        PORT_DIPSETTING(   0xc0, "Demo Mode" )
1210
 
 
1211
 
        PORT_START("TRACK0_X")  /* IN6, fake trackball input port. */
1212
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE
1213
 
 
1214
 
        PORT_START("TRACK0_Y")  /* IN7, fake trackball input port. */
1215
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
1216
 
 
1217
 
        PORT_START("TRACK1_X")  /* IN8, fake trackball input port. */
1218
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_COCKTAIL
1219
 
 
1220
 
        PORT_START("TRACK1_Y")  /* IN9, fake trackball input port. */
1221
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL
1222
 
INPUT_PORTS_END
1223
 
 
1224
 
 
1225
 
static INPUT_PORTS_START( warlords )
1226
 
        PORT_START("IN0")
1227
 
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
1228
 
        PORT_DIPNAME( 0x10, 0x00, "Diag Step" )                         /* Not referenced */
1229
 
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1230
 
        PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1231
 
        PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
1232
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK )
1233
 
        PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
1234
 
        PORT_DIPSETTING(    0x80, "Upright (overlay)" )
1235
 
        PORT_DIPSETTING(    0x00, "Cocktail (no overlay)" )
1236
 
 
1237
 
        PORT_START("IN1")
1238
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
1239
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
1240
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
1241
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
1242
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
1243
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
1244
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1245
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
1246
 
 
1247
 
        PORT_START("DSW1")
1248
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("J2:1,2")
1249
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
1250
 
        PORT_DIPSETTING(    0x01, DEF_STR( French ) )
1251
 
        PORT_DIPSETTING(    0x02, DEF_STR( Spanish ) )
1252
 
        PORT_DIPSETTING(    0x03, DEF_STR( German ) )
1253
 
        PORT_DIPNAME( 0x04, 0x00, "Music" )                                     PORT_DIPLOCATION("J2:3")
1254
 
        PORT_DIPSETTING(    0x00, "End of game" )
1255
 
        PORT_DIPSETTING(    0x04, "High score only" )
1256
 
        PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "J2:4" )
1257
 
        PORT_DIPNAME( 0x30, 0x00, "Credits" )                           PORT_DIPLOCATION("J2:5,6")
1258
 
        PORT_DIPSETTING(    0x00, "1p/2p = 1 credit" )
1259
 
        PORT_DIPSETTING(    0x10, "1p = 1, 2p = 2" )
1260
 
        PORT_DIPSETTING(    0x20, "1p/2p = 2 credits" )
1261
 
        PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "J2:7" )
1262
 
        PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "J2:8" )
1263
 
 
1264
 
 
1265
 
        PORT_START("DSW2")
1266
 
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )          PORT_DIPLOCATION("M2:1,2")
1267
 
        PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
1268
 
        PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
1269
 
        PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
1270
 
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
1271
 
        PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )                        PORT_DIPLOCATION("M2:3,4")
1272
 
        PORT_DIPSETTING(    0x00, "*1" )
1273
 
        PORT_DIPSETTING(    0x04, "*4" )
1274
 
        PORT_DIPSETTING(    0x08, "*5" )
1275
 
        PORT_DIPSETTING(    0x0c, "*6" )
1276
 
        PORT_DIPNAME( 0x10, 0x00, "Left Coin" )                         PORT_DIPLOCATION("M2:5")
1277
 
        PORT_DIPSETTING(    0x00, "*1" )
1278
 
        PORT_DIPSETTING(    0x10, "*2" )
1279
 
        PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )                       PORT_DIPLOCATION("M2:6,7,8")
1280
 
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
1281
 
        PORT_DIPSETTING(    0x20, "3 credits/2 coins" )
1282
 
        PORT_DIPSETTING(    0x40, "5 credits/4 coins" )
1283
 
        PORT_DIPSETTING(    0x60, "6 credits/4 coins" )
1284
 
        PORT_DIPSETTING(    0x80, "6 credits/5 coins" )
1285
 
 
1286
 
        /* IN4-7 fake to control player paddles */
1287
 
        PORT_START("PADDLE0")
1288
 
        PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x1d,0xcb) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_PLAYER(1)
1289
 
 
1290
 
        PORT_START("PADDLE1")
1291
 
        PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x1d,0xcb) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_PLAYER(2)
1292
 
 
1293
 
        PORT_START("PADDLE2")
1294
 
        PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x1d,0xcb) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_PLAYER(3)
1295
 
 
1296
 
        PORT_START("PADDLE3")
1297
 
        PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x1d,0xcb) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_PLAYER(4)
1298
 
INPUT_PORTS_END
1299
 
 
1300
 
 
1301
 
static INPUT_PORTS_START( mazeinv )
1302
 
        PORT_START("IN0")
1303
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )         PORT_DIPLOCATION("SW0:!1,!2")
1304
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
1305
 
        PORT_DIPSETTING(    0x01, DEF_STR( German ) )
1306
 
        PORT_DIPSETTING(    0x02, DEF_STR( French ) )
1307
 
        PORT_DIPSETTING(    0x03, DEF_STR( Spanish ) )
1308
 
        PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW0:!3" )
1309
 
        PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW0:!4" )
1310
 
        PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW0:!5" )
1311
 
        PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW0:!6" )
1312
 
        PORT_DIPNAME( 0x40, 0x00, "Minimum credits" )           PORT_DIPLOCATION("SW0:!7")
1313
 
        PORT_DIPSETTING(    0x00, "1" )
1314
 
        PORT_DIPSETTING(    0x40, "2" )
1315
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
1316
 
 
1317
 
        PORT_START("IN1")
1318
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1319
 
 
1320
 
        PORT_START("IN2")
1321
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Reverse")
1322
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
1323
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Fire")
1324
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
1325
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )               // No Function?
1326
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
1327
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1328
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
1329
 
 
1330
 
        PORT_START("IN3")
1331
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P1 Reverse")
1332
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
1333
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Fire")
1334
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
1335
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
1336
 
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
1337
 
        PORT_DIPSETTING( 0x20, DEF_STR( Upright ) )
1338
 
        PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
1339
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
1340
 
        PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
1341
 
 
1342
 
        PORT_START("DSW1")
1343
 
        PORT_DIPNAME( 0x03, 0x00, "Doors for bonus" )           PORT_DIPLOCATION("SW1:!1,!2")
1344
 
        PORT_DIPSETTING(    0x00, "10" )
1345
 
        PORT_DIPSETTING(    0x01, "12" )
1346
 
        PORT_DIPSETTING(    0x02, "14" )
1347
 
        PORT_DIPSETTING(    0x03, "16" )
1348
 
        PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )            PORT_DIPLOCATION("SW1:!3,!4")
1349
 
        PORT_DIPSETTING(    0x00, "2" )
1350
 
        PORT_DIPSETTING(    0x04, "3" )
1351
 
        PORT_DIPSETTING(    0x08, "4" )
1352
 
        PORT_DIPSETTING(    0x0c, "5" )
1353
 
        PORT_DIPNAME( 0x30, 0x00, "Extra life at" )                     PORT_DIPLOCATION("SW1:!5,!6")
1354
 
        PORT_DIPSETTING(    0x00, "20000" )
1355
 
        PORT_DIPSETTING(    0x10, "25000" )
1356
 
        PORT_DIPSETTING(    0x20, "30000" )
1357
 
        PORT_DIPSETTING(    0x30, "Never" )
1358
 
        PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("SW1:!7,!8")
1359
 
        PORT_DIPSETTING(    0x00, DEF_STR( Easiest ) )
1360
 
        PORT_DIPSETTING(    0x40, DEF_STR( Easy ) )
1361
 
        PORT_DIPSETTING(    0x80, DEF_STR( Hard ) )
1362
 
        PORT_DIPSETTING(    0xc0, DEF_STR( Harder ) )
1363
 
 
1364
 
        PORT_START("DSW2")
1365
 
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW2:!1,!2")
1366
 
        PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
1367
 
        PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
1368
 
        PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
1369
 
        PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
1370
 
        PORT_DIPNAME( 0x0c, 0x00, "Coin 2" )                            PORT_DIPLOCATION("SW2:!3,!4")
1371
 
        PORT_DIPSETTING(    0x00, "*1" )
1372
 
        PORT_DIPSETTING(    0x04, "*4" )
1373
 
        PORT_DIPSETTING(    0x08, "*5" )
1374
 
        PORT_DIPSETTING(    0x0c, "*6" )
1375
 
        PORT_DIPNAME( 0x10, 0x00, "Coin 3" )                            PORT_DIPLOCATION("SW2:!5")
1376
 
        PORT_DIPSETTING(    0x00, "*1" )
1377
 
        PORT_DIPSETTING(    0x10, "*2" )
1378
 
        PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )                       PORT_DIPLOCATION("SW2:!6,!7,!8")
1379
 
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
1380
 
        PORT_DIPSETTING(    0x20, "3 credits/2 coins" )
1381
 
        PORT_DIPSETTING(    0x40, "5 credits/4 coins" )
1382
 
        PORT_DIPSETTING(    0x60, "6 credits/4 coins" )
1383
 
        PORT_DIPSETTING(    0x80, "6 credits/5 coins" )
1384
 
 
1385
 
        /* IN6-9 fake to control player joysticks */
1386
 
        PORT_START("STICK0")
1387
 
        PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
1388
 
 
1389
 
        PORT_START("STICK1")
1390
 
        PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
1391
 
 
1392
 
        PORT_START("STICK2")
1393
 
        PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
1394
 
 
1395
 
        PORT_START("STICK3")
1396
 
        PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x40, 0xbf) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2)
1397
 
INPUT_PORTS_END
1398
 
 
1399
 
 
1400
 
static INPUT_PORTS_START( bullsdrt )
1401
 
        PORT_START("IN0")
1402
 
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball data */
1403
 
        PORT_BIT( 0x30, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1404
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK )
1405
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball sign bit */
1406
 
 
1407
 
        PORT_START("IN1")
1408
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
1409
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
1410
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
1411
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1412
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1413
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
1414
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1415
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
1416
 
 
1417
 
        PORT_START("IN2")
1418
 
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball data */
1419
 
        PORT_BIT( 0x70, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1420
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* trackball sign bit */
1421
 
 
1422
 
        PORT_START("DSW1")
1423
 
        PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
1424
 
        PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1425
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1426
 
        PORT_DIPNAME( 0x02, 0x02, "Award Free Game" ) PORT_DIPLOCATION("SW1:2")
1427
 
        PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1428
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1429
 
        PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
1430
 
        PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1431
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1432
 
        PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
1433
 
        PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1434
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1435
 
        PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
1436
 
        PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1437
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1438
 
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
1439
 
        PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1440
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1441
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
1442
 
        PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1443
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1444
 
        PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
1445
 
        PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1446
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1447
 
 
1448
 
        PORT_START("DSW2")
1449
 
        PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1")
1450
 
        PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1451
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1452
 
        PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2")
1453
 
        PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1454
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1455
 
        PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3")
1456
 
        PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1457
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1458
 
        PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4")
1459
 
        PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1460
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1461
 
        PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5")
1462
 
        PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1463
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1464
 
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6")
1465
 
        PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1466
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1467
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7")
1468
 
        PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1469
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1470
 
        PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8")
1471
 
        PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1472
 
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1473
 
 
1474
 
        PORT_START("TRACK0_X")  /* fake trackball input port. */
1475
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE
1476
 
 
1477
 
        PORT_START("TRACK0_Y")  /* fake trackball input port. */
1478
 
        PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
1479
 
 
1480
 
        /* 2008-06 FP: was bullsdrt available as cocktail? If not, these can be removed */
1481
 
        PORT_START("TRACK1_X")
1482
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
1483
 
 
1484
 
        PORT_START("TRACK1_Y")
1485
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
1486
 
INPUT_PORTS_END
1487
 
 
1488
 
 
1489
 
 
1490
 
/*************************************
1491
 
 *
1492
 
 *  Graphics layouts: Centipede/Millipede
1493
 
 *
1494
 
 *************************************/
1495
 
 
1496
 
static const gfx_layout charlayout =
1497
 
{
1498
 
        8,8,
1499
 
        RGN_FRAC(1,2),
1500
 
        2,
1501
 
        { RGN_FRAC(1,2), 0 },
1502
 
        { 0, 1, 2, 3, 4, 5, 6, 7 },
1503
 
        { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1504
 
        8*8
1505
 
};
1506
 
 
1507
 
static const gfx_layout spritelayout =
1508
 
{
1509
 
        8,16,
1510
 
        RGN_FRAC(1,2),
1511
 
        2,
1512
 
        { RGN_FRAC(1,2), 0 },
1513
 
        { 0, 1, 2, 3, 4, 5, 6, 7 },
1514
 
        { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
1515
 
                        8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
1516
 
        16*8
1517
 
};
1518
 
 
1519
 
static GFXDECODE_START( centiped )
1520
 
        GFXDECODE_ENTRY( "gfx1", 0, charlayout,     0, 1 )
1521
 
        GFXDECODE_ENTRY( "gfx1", 0, spritelayout,   4, 4*4*4 )
1522
 
GFXDECODE_END
1523
 
 
1524
 
static GFXDECODE_START( milliped )
1525
 
        GFXDECODE_ENTRY( "gfx1", 0, charlayout,     0, 4 )
1526
 
        GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 4*4, 4*4*4*4 )
1527
 
GFXDECODE_END
1528
 
 
1529
 
 
1530
 
 
1531
 
/*************************************
1532
 
 *
1533
 
 *  Graphics layouts: Warlords
1534
 
 *
1535
 
 *************************************/
1536
 
 
1537
 
static const gfx_layout warlords_charlayout =
1538
 
{
1539
 
        8,8,
1540
 
        RGN_FRAC(1,4),
1541
 
        2,
1542
 
        { RGN_FRAC(1,2), 0 },
1543
 
        { 0, 1, 2, 3, 4, 5, 6, 7 },
1544
 
        { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1545
 
        8*8
1546
 
};
1547
 
 
1548
 
static GFXDECODE_START( warlords )
1549
 
        GFXDECODE_ENTRY( "gfx1", 0x000, warlords_charlayout, 0,   8 )
1550
 
        GFXDECODE_ENTRY( "gfx1", 0x200, warlords_charlayout, 8*4, 8*4 )
1551
 
GFXDECODE_END
1552
 
 
1553
 
 
1554
 
 
1555
 
/*************************************
1556
 
 *
1557
 
 *  Sound interfaces
1558
 
 *
1559
 
 *************************************/
1560
 
 
1561
 
static const ay8910_interface centipdb_ay8910_interface =
1562
 
{
1563
 
        AY8910_LEGACY_OUTPUT,
1564
 
        AY8910_DEFAULT_LOADS,
1565
 
        DEVCB_HANDLER(caterplr_rand_r)
1566
 
};
1567
 
 
1568
 
 
1569
 
static const pokey_interface milliped_pokey_interface_1 =
1570
 
{
1571
 
        { DEVCB_NULL },
1572
 
        DEVCB_INPUT_PORT("DSW1")
1573
 
};
1574
 
 
1575
 
 
1576
 
static const pokey_interface milliped_pokey_interface_2 =
1577
 
{
1578
 
        { DEVCB_NULL },
1579
 
        DEVCB_INPUT_PORT("DSW2")
1580
 
};
1581
 
 
1582
 
 
1583
 
static const pokey_interface warlords_pokey_interface =
1584
 
{
1585
 
        {
1586
 
                DEVCB_INPUT_PORT("PADDLE0"),
1587
 
                DEVCB_INPUT_PORT("PADDLE1"),
1588
 
                DEVCB_INPUT_PORT("PADDLE2"),
1589
 
                DEVCB_INPUT_PORT("PADDLE3")
1590
 
        }
1591
 
};
1592
 
 
1593
 
 
1594
 
 
1595
 
/*************************************
1596
 
 *
1597
 
 *  Machine drivers
1598
 
 *
1599
 
 *************************************/
1600
 
 
1601
 
static MACHINE_CONFIG_START( centiped, centiped_state )
1602
 
 
1603
 
        /* basic machine hardware */
1604
 
        MCFG_CPU_ADD("maincpu", M6502, 12096000/8)      /* 1.512 MHz (slows down to 0.75MHz while accessing playfield RAM) */
1605
 
        MCFG_CPU_PROGRAM_MAP(centiped_map)
1606
 
 
1607
 
        MCFG_MACHINE_START(centiped)
1608
 
        MCFG_MACHINE_RESET(centiped)
1609
 
 
1610
 
        MCFG_ATARIVGEAROM_ADD("earom")
1611
 
 
1612
 
        /* timer */
1613
 
        MCFG_TIMER_ADD_SCANLINE("32v", generate_interrupt, "screen", 0, 16)
1614
 
 
1615
 
        /* video hardware */
1616
 
        MCFG_SCREEN_ADD("screen", RASTER)
1617
 
        MCFG_SCREEN_REFRESH_RATE(60)
1618
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1619
 
        MCFG_SCREEN_SIZE(32*8, 32*8)
1620
 
        MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1)
1621
 
        MCFG_SCREEN_UPDATE(centiped)
1622
 
 
1623
 
        MCFG_GFXDECODE(centiped)
1624
 
        MCFG_PALETTE_LENGTH(4+4*4*4*4)
1625
 
 
1626
 
        MCFG_VIDEO_START(centiped)
1627
 
 
1628
 
        /* sound hardware */
1629
 
        MCFG_SPEAKER_STANDARD_MONO("mono")
1630
 
 
1631
 
        MCFG_SOUND_ADD("pokey", POKEY, 12096000/8)
1632
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1633
 
MACHINE_CONFIG_END
1634
 
 
1635
 
 
1636
 
static MACHINE_CONFIG_DERIVED( caterplr, centiped )
1637
 
 
1638
 
        /* basic machine hardware */
1639
 
 
1640
 
        /* sound hardware */
1641
 
        MCFG_SOUND_REPLACE("pokey", AY8910, 12096000/8)
1642
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1643
 
MACHINE_CONFIG_END
1644
 
 
1645
 
 
1646
 
static MACHINE_CONFIG_DERIVED( centipdb, centiped )
1647
 
 
1648
 
        /* basic machine hardware */
1649
 
        MCFG_CPU_MODIFY("maincpu")
1650
 
        MCFG_CPU_PROGRAM_MAP(centipdb_map)
1651
 
 
1652
 
        /* sound hardware */
1653
 
        MCFG_SOUND_REPLACE("pokey", AY8910, 12096000/8)
1654
 
        MCFG_SOUND_CONFIG(centipdb_ay8910_interface)
1655
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
1656
 
MACHINE_CONFIG_END
1657
 
 
1658
 
 
1659
 
static MACHINE_CONFIG_DERIVED( magworm, centiped )
1660
 
 
1661
 
        /* basic machine hardware */
1662
 
        MCFG_MACHINE_RESET(magworm)
1663
 
 
1664
 
        /* sound hardware */
1665
 
        MCFG_SOUND_REPLACE("pokey", AY8910, 12096000/8)
1666
 
        MCFG_SOUND_CONFIG(centipdb_ay8910_interface)
1667
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
1668
 
MACHINE_CONFIG_END
1669
 
 
1670
 
 
1671
 
static MACHINE_CONFIG_DERIVED( milliped, centiped )
1672
 
 
1673
 
        /* basic machine hardware */
1674
 
        MCFG_CPU_MODIFY("maincpu")
1675
 
        MCFG_CPU_PROGRAM_MAP(milliped_map)
1676
 
 
1677
 
        /* video hardware */
1678
 
        MCFG_GFXDECODE(milliped)
1679
 
        MCFG_PALETTE_LENGTH(4*4+4*4*4*4*4)
1680
 
 
1681
 
        MCFG_VIDEO_START(milliped)
1682
 
        MCFG_SCREEN_MODIFY("screen")
1683
 
        MCFG_SCREEN_UPDATE(milliped)
1684
 
 
1685
 
        /* sound hardware */
1686
 
        MCFG_SOUND_REPLACE("pokey", POKEY, 12096000/8)
1687
 
        MCFG_SOUND_CONFIG(milliped_pokey_interface_1)
1688
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1689
 
 
1690
 
        MCFG_SOUND_ADD("pokey2", POKEY, 12096000/8)
1691
 
        MCFG_SOUND_CONFIG(milliped_pokey_interface_2)
1692
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1693
 
MACHINE_CONFIG_END
1694
 
 
1695
 
 
1696
 
static MACHINE_CONFIG_DERIVED( warlords, centiped )
1697
 
 
1698
 
        /* basic machine hardware */
1699
 
        MCFG_CPU_MODIFY("maincpu")
1700
 
        MCFG_CPU_PROGRAM_MAP(warlords_map)
1701
 
 
1702
 
        /* video hardware */
1703
 
        MCFG_GFXDECODE(warlords)
1704
 
        MCFG_PALETTE_LENGTH(8*4+8*4)
1705
 
 
1706
 
        MCFG_PALETTE_INIT(warlords)
1707
 
        MCFG_VIDEO_START(warlords)
1708
 
        MCFG_SCREEN_MODIFY("screen")
1709
 
        MCFG_SCREEN_UPDATE(warlords)
1710
 
 
1711
 
        /* sound hardware */
1712
 
        MCFG_SOUND_REPLACE("pokey", POKEY, 12096000/8)
1713
 
        MCFG_SOUND_CONFIG(warlords_pokey_interface)
1714
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1715
 
MACHINE_CONFIG_END
1716
 
 
1717
 
 
1718
 
static MACHINE_CONFIG_DERIVED( mazeinv, milliped )
1719
 
 
1720
 
        /* basic machine hardware */
1721
 
        MCFG_CPU_MODIFY("maincpu")
1722
 
        MCFG_CPU_PROGRAM_MAP(mazeinv_map)
1723
 
        MCFG_SCREEN_MODIFY("screen")
1724
 
        MCFG_SCREEN_UPDATE(centiped)
1725
 
MACHINE_CONFIG_END
1726
 
 
1727
 
 
1728
 
static MACHINE_CONFIG_START( bullsdrt, centiped_state )
1729
 
 
1730
 
        /* basic machine hardware */
1731
 
        MCFG_CPU_ADD("maincpu", S2650, 12096000/8)
1732
 
        MCFG_CPU_PROGRAM_MAP(bullsdrt_map)
1733
 
        MCFG_CPU_IO_MAP(bullsdrt_port_map)
1734
 
 
1735
 
        MCFG_ATARIVGEAROM_ADD("earom")
1736
 
 
1737
 
        /* video hardware */
1738
 
        MCFG_SCREEN_ADD("screen", RASTER)
1739
 
        MCFG_SCREEN_REFRESH_RATE(60)
1740
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1741
 
        MCFG_SCREEN_SIZE(32*8, 32*8)
1742
 
        MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1)
1743
 
        MCFG_SCREEN_UPDATE(bullsdrt)
1744
 
 
1745
 
        MCFG_GFXDECODE(centiped)
1746
 
        MCFG_PALETTE_LENGTH(4+4*4*4*4)
1747
 
 
1748
 
        MCFG_VIDEO_START(bullsdrt)
1749
 
 
1750
 
        /* sound hardware */
1751
 
        MCFG_SPEAKER_STANDARD_MONO("mono")
1752
 
 
1753
 
        MCFG_SOUND_ADD("snsnd", SN76496, 12096000/8)
1754
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1755
 
MACHINE_CONFIG_END
1756
 
 
1757
 
 
1758
 
 
1759
 
/*************************************
1760
 
 *
1761
 
 *  ROM definitions
1762
 
 *
1763
 
 *************************************/
1764
 
 
1765
 
ROM_START( centiped )
1766
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1767
 
        ROM_LOAD( "136001-307.d1",  0x2000, 0x0800, CRC(5ab0d9de) SHA1(8ea6e3304202831aabaf31dbd0f970a7b3bfe421) )
1768
 
        ROM_LOAD( "136001-308.e1",  0x2800, 0x0800, CRC(4c07fd3e) SHA1(af4fdbf32c23b1864819d620a874e7f205da3cdb) )
1769
 
        ROM_LOAD( "136001-309.fh1", 0x3000, 0x0800, CRC(ff69b424) SHA1(689fa560d40a384dcbcad7c8095bc12e91875580) )
1770
 
        ROM_LOAD( "136001-310.j1",  0x3800, 0x0800, CRC(44e40fa4) SHA1(c557db83876afc8ab52047ab1a3c3bfef34d6351) )
1771
 
 
1772
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1773
 
        ROM_LOAD( "136001-211.f7",  0x0000, 0x0800, CRC(880acfb9) SHA1(6c862352c329776f2f9974a0df9dbe41f9dbc361) ) /* May be labeled "136001-201", same data */
1774
 
        ROM_LOAD( "136001-212.hj7", 0x0800, 0x0800, CRC(b1397029) SHA1(974c03d29aeca672fffa4dfc00a06be6a851aacb) ) /* May be labeled "136001-202", same data */
1775
 
 
1776
 
        ROM_REGION( 0x0100, "proms", 0 )
1777
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1778
 
ROM_END
1779
 
 
1780
 
 
1781
 
ROM_START( centipdd ) /* Centipede "Dux" graphics hack by Two Bit Score */
1782
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1783
 
        ROM_LOAD( "136001-307.d1",  0x2000, 0x0800, CRC(5ab0d9de) SHA1(8ea6e3304202831aabaf31dbd0f970a7b3bfe421) )
1784
 
        ROM_LOAD( "136001-308.e1",  0x2800, 0x0800, CRC(4c07fd3e) SHA1(af4fdbf32c23b1864819d620a874e7f205da3cdb) )
1785
 
        ROM_LOAD( "136001-309.fh1", 0x3000, 0x0800, CRC(ff69b424) SHA1(689fa560d40a384dcbcad7c8095bc12e91875580) )
1786
 
        ROM_LOAD( "136001-310.j1",  0x3800, 0x0800, CRC(44e40fa4) SHA1(c557db83876afc8ab52047ab1a3c3bfef34d6351) )
1787
 
 
1788
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1789
 
        ROM_LOAD( "dux-211.f7",  0x0000, 0x0800, CRC(fee15594) SHA1(1193c295b57904d1c19c7f0400ef4c1893a80f55) )
1790
 
        ROM_LOAD( "dux-212.hj7", 0x0800, 0x0800, CRC(f980c777) SHA1(3997a45ed38d7ae68dddf70b37da6e2e0c6a7710) )
1791
 
 
1792
 
        ROM_REGION( 0x0100, "proms", 0 )
1793
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1794
 
ROM_END
1795
 
 
1796
 
 
1797
 
ROM_START( centiped2 )
1798
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1799
 
        ROM_LOAD( "136001-207.d1",  0x2000, 0x0800, CRC(b2909e2f) SHA1(90ec90bd1e262861730afd5b113ec8dddd958ed8) )
1800
 
        ROM_LOAD( "136001-208.e1",  0x2800, 0x0800, CRC(110e04ff) SHA1(4cb481792411b6aefac561744cfbe107aba8bab3) )
1801
 
        ROM_LOAD( "136001-209.fh1", 0x3000, 0x0800, CRC(cc2edb26) SHA1(b3ea580afa6a1ac44662051fae19c1efc320fcd3) )
1802
 
        ROM_LOAD( "136001-210.j1",  0x3800, 0x0800, CRC(93999153) SHA1(8788c2b39fc5bfbb147a5e7c26ad360bba8d1063) )
1803
 
 
1804
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1805
 
        ROM_LOAD( "136001-211.f7",  0x0000, 0x0800, CRC(880acfb9) SHA1(6c862352c329776f2f9974a0df9dbe41f9dbc361) ) /* May be labeled "136001-201", same data */
1806
 
        ROM_LOAD( "136001-212.hj7", 0x0800, 0x0800, CRC(b1397029) SHA1(974c03d29aeca672fffa4dfc00a06be6a851aacb) ) /* May be labeled "136001-202", same data */
1807
 
 
1808
 
        ROM_REGION( 0x0100, "proms", 0 )
1809
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1810
 
ROM_END
1811
 
 
1812
 
 
1813
 
ROM_START( centtime )
1814
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1815
 
        ROM_LOAD( "cent_d1.bin",  0x2000, 0x0800, CRC(c4d995eb) SHA1(d0b2f0461cfa35842045d40ffb65e777703b773e) )
1816
 
        ROM_LOAD( "cent_e1.bin",  0x2800, 0x0800, CRC(bcdebe1b) SHA1(53f3bf88a79ce40661c0a9381928e55d8c61777a) )
1817
 
        ROM_LOAD( "cent_fh1.bin", 0x3000, 0x0800, CRC(66d7b04a) SHA1(8fa758095b618085090491dfb5ea114cdc87f9df) )
1818
 
        ROM_LOAD( "cent_j1.bin",  0x3800, 0x0800, CRC(33ce4640) SHA1(780c2eb320f64fad6b265c0dada961646ed30174) )
1819
 
 
1820
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1821
 
        ROM_LOAD( "136001-211.f7",  0x0000, 0x0800, CRC(880acfb9) SHA1(6c862352c329776f2f9974a0df9dbe41f9dbc361) ) /* May be labeled "136001-201", same data */
1822
 
        ROM_LOAD( "136001-212.hj7", 0x0800, 0x0800, CRC(b1397029) SHA1(974c03d29aeca672fffa4dfc00a06be6a851aacb) ) /* May be labeled "136001-202", same data */
1823
 
 
1824
 
        ROM_REGION( 0x0100, "proms", 0 )
1825
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1826
 
ROM_END
1827
 
 
1828
 
 
1829
 
ROM_START( caterplr )
1830
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1831
 
        ROM_LOAD( "olympia.c28",  0x2000, 0x0800, CRC(8a744e57) SHA1(0bc83fe01d929af4e5c7f2a8d1236560df41f9ce) )
1832
 
        ROM_LOAD( "olympia.c29",  0x2800, 0x0800, CRC(bb897b10) SHA1(bb1039fe64774277870f675eb72dd9f3f596f865) )
1833
 
        ROM_LOAD( "olympia.c30",  0x3000, 0x0800, CRC(2297c2ac) SHA1(129d111f80b837f7b44852162f4abfba31fc0d75) )
1834
 
        ROM_LOAD( "olympia.c31",  0x3800, 0x0800, CRC(cc529d6b) SHA1(80d86371b0f969b434af6ffb3834adaf11d05ac2) )
1835
 
 
1836
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1837
 
        ROM_LOAD( "olympia.c32",  0x0000, 0x0800, CRC(d91b9724) SHA1(5ff9ccb2769c853b44764bfe829ad1df08686dc6) )
1838
 
        ROM_LOAD( "olympia.c33",  0x0800, 0x0800, CRC(c2b08489) SHA1(9427e54537312ee0a70ec7bd1c039e92f8cfadad) )
1839
 
 
1840
 
        ROM_REGION( 0x0100, "proms", 0 )
1841
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1842
 
ROM_END
1843
 
 
1844
 
 
1845
 
ROM_START( centipdb )
1846
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1847
 
        ROM_LOAD( "d1",  0x2000, 0x0800, CRC(b17b8e0b) SHA1(01944cf040cf23aeb4c50d4f2e63181e08a07310) )
1848
 
        ROM_LOAD( "e1",  0x2800, 0x0800, CRC(7684398e) SHA1(eea8e05506a7af2fec55c2689e3caafc62ea524f) )
1849
 
        ROM_LOAD( "h1",  0x3000, 0x0800, CRC(74580fe4) SHA1(35b8a8675e4e020e234e51c3e4bd4ee5c24b79d2) )
1850
 
        ROM_LOAD( "j1",  0x3800, 0x0800, CRC(84600161) SHA1(e9a6801c6f59e2b34e692e9aa71845d2e64a2379) )
1851
 
        ROM_LOAD( "k1",  0x6000, 0x0800, CRC(f1aa329b) SHA1(e4689de0f94d11f125ee7548a3f8128ff8e8da51) )
1852
 
 
1853
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1854
 
        ROM_LOAD( "136001-211.f7",  0x0000, 0x0800, CRC(880acfb9) SHA1(6c862352c329776f2f9974a0df9dbe41f9dbc361) )
1855
 
        ROM_LOAD( "136001-212.hj7", 0x0800, 0x0800, CRC(b1397029) SHA1(974c03d29aeca672fffa4dfc00a06be6a851aacb) )
1856
 
 
1857
 
        ROM_REGION( 0x0100, "proms", 0 )
1858
 
        ROM_LOAD( "136001-213.p4",   0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1859
 
ROM_END
1860
 
 
1861
 
 
1862
 
ROM_START( millpac )
1863
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1864
 
        ROM_LOAD( "millpac1.1d",  0x2000, 0x0800, CRC(4dd6913d) SHA1(9eca634e1a827f9bbcf3c532d44e175ac4751755) )
1865
 
        ROM_LOAD( "millpac2.1e",  0x2800, 0x0800, CRC(411c81f1) SHA1(15184642522f0b7eab81301295d435c10ce2d78d) )
1866
 
        ROM_LOAD( "millpac3.1h",  0x3000, 0x0800, CRC(577076cc) SHA1(3124fcfb56f33ebd17d2c0da1098023474187066) )
1867
 
        ROM_LOAD( "millpac4.1j",  0x3800, 0x0800, CRC(89aedd75) SHA1(74635079e7103bf6fa9577f5980e1adaa34d9be0) )
1868
 
        ROM_LOAD( "millpac5.1k",  0x6000, 0x0800, CRC(67ac481b) SHA1(cef839d1c9dd207fdf41ae47d5f279b783f2f4cf) )
1869
 
 
1870
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1871
 
        ROM_LOAD( "millpac6.7f",  0x0000, 0x0800, CRC(79f05520) SHA1(25c9f3b4826f48830f5c42d41d4f030b49e58d6a) )
1872
 
        ROM_LOAD( "millpac7.7j",  0x0800, 0x0800, CRC(4880b2bd) SHA1(1909b8fb275f38f1b57bf53ba348b866cc48a599) )
1873
 
 
1874
 
        ROM_REGION( 0x0100, "proms", 0 )
1875
 
        ROM_LOAD( "millpac.4p",   0x0000, 0x0100, CRC(ba40e1a9) SHA1(f7914ba974e5bdd0c24d415a537b5fe567a4de50) ) /* not used */
1876
 
ROM_END
1877
 
 
1878
 
 
1879
 
ROM_START( magworm )
1880
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1881
 
        ROM_LOAD( "11005-0.k0",  0x2000, 0x0800, CRC(a88e970a) SHA1(f0cc6fdcdecf05f11cef7ebae4e11783a8bbc5ba) )
1882
 
        ROM_LOAD( "11005-1.k1",  0x2800, 0x0800, CRC(7a04047e) SHA1(3c00756c8ffbc5e78d4a7409802cc2ed8f668264) )
1883
 
        ROM_LOAD( "11005-2.k2",  0x3000, 0x0800, CRC(f127f1c3) SHA1(3fddcd6f458ac60eaebacef921b522dd2c7b8141) )
1884
 
        ROM_LOAD( "11005-3p.k3", 0x3800, 0x0800, CRC(478d92b4) SHA1(99cce957c50ca80ddde408d9188fc2ed04d8da68) )
1885
 
 
1886
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1887
 
        ROM_LOAD( "11005-4.c4",  0x0000, 0x0800, CRC(cea64e1a) SHA1(9022102124e1ad93f912ce8bdf85f8a886b0879b) )
1888
 
        ROM_LOAD( "11005-5.c5",  0x0800, 0x0800, CRC(24558ea5) SHA1(8cd7131e19afd7a96191b1b3c3fba7ae9a140f4b) )
1889
 
ROM_END
1890
 
 
1891
 
 
1892
 
ROM_START( milliped )
1893
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1894
 
        ROM_LOAD( "136013-104.1mn", 0x4000, 0x1000, CRC(40711675) SHA1(b595d6a0f5d3c611ade1b83a94c3b909d2124dc4) )
1895
 
        ROM_LOAD( "136013-103.1l",  0x5000, 0x1000, CRC(fb01baf2) SHA1(9c1d0bbc20bf25dd21761a311fd1ed80aa029241) )
1896
 
        ROM_LOAD( "136013-102.1jk", 0x6000, 0x1000, CRC(62e137e0) SHA1(9fe40db55ba1d20d4f11704f7f5df9ff75b87f30) )
1897
 
        ROM_LOAD( "136013-101.1h",  0x7000, 0x1000, CRC(46752c7d) SHA1(ab06b1fd80271849946f90757b3837b617394929) )
1898
 
 
1899
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1900
 
        ROM_LOAD( "136013-107.5r", 0x0000, 0x0800, CRC(68c3437a) SHA1(4c7ea33d9501456ee8f5a642da7d6c972f2bb90d) )
1901
 
        ROM_LOAD( "136013-106.5p", 0x0800, 0x0800, CRC(f4468045) SHA1(602fcc7290f9f4eacb841c76665961ebf4307f80) )
1902
 
 
1903
 
        ROM_REGION( 0x0100, "proms", 0 )
1904
 
        ROM_LOAD( "136001-213.7e", 0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) ) /* not used */
1905
 
ROM_END
1906
 
 
1907
 
 
1908
 
ROM_START( millipdd ) /* Millipede "Dux" graphics hack by Two Bit Score */
1909
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1910
 
        ROM_LOAD( "136013-104.1mn", 0x4000, 0x1000, CRC(40711675) SHA1(b595d6a0f5d3c611ade1b83a94c3b909d2124dc4) )
1911
 
        ROM_LOAD( "136013-103.1l",  0x5000, 0x1000, CRC(fb01baf2) SHA1(9c1d0bbc20bf25dd21761a311fd1ed80aa029241) )
1912
 
        ROM_LOAD( "136013-102.1jk", 0x6000, 0x1000, CRC(62e137e0) SHA1(9fe40db55ba1d20d4f11704f7f5df9ff75b87f30) )
1913
 
        ROM_LOAD( "136013-101.1h",  0x7000, 0x1000, CRC(46752c7d) SHA1(ab06b1fd80271849946f90757b3837b617394929) )
1914
 
 
1915
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1916
 
        ROM_LOAD( "mil-dux.5r", 0x0000, 0x0800, CRC(b6c617b6) SHA1(a672a9b35b773677aea6b9a5c4305939180f6854) )
1917
 
        ROM_LOAD( "mil-dux.5p", 0x0800, 0x0800, CRC(2a6ef4b0) SHA1(832dae8c1b1f959bb8582f9503d84bea9d50c08c) )
1918
 
 
1919
 
        ROM_REGION( 0x0100, "proms", 0 )
1920
 
        ROM_LOAD( "136001-213.7e", 0x0000, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) ) /* not used */
1921
 
ROM_END
1922
 
 
1923
 
 
1924
 
ROM_START( mazeinv )
1925
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1926
 
        ROM_LOAD( "005.011",      0x3000, 0x1000, CRC(37129536) SHA1(356cb986a40b332100e00fb72194fd4dade2cba7) )
1927
 
        ROM_LOAD( "004.011",      0x4000, 0x1000, CRC(2d0fbf2f) SHA1(9d4c2bc9f80604d1ff5c5bf5a4a78378efdd8b33) )
1928
 
        ROM_LOAD( "003.011",      0x5000, 0x1000, CRC(0ff3747c) SHA1(1a7e1c487c24875dada967fb3a9ceaca25b7e2a7) )
1929
 
        ROM_LOAD( "002.011",      0x6000, 0x1000, CRC(96478e07) SHA1(e99d9970dc12ed36520d91646f1955cce87b55b6) )
1930
 
        ROM_LOAD( "001.011",      0x7000, 0x1000, CRC(d5c29a01) SHA1(5201a6cd42e4954c6cd4298f7b6cee4a8c181248) )
1931
 
 
1932
 
        ROM_REGION( 0x1000, "gfx1", 0 )
1933
 
        ROM_LOAD( "007.011",      0x0000, 0x0800, CRC(16e738f4) SHA1(96335afc4510aae6b4ee6dfd8f5c1b2baa8c2798) )
1934
 
        ROM_LOAD( "006.011",      0x0800, 0x0800, CRC(d4705e4e) SHA1(e099f3df0d2f56d557631e69bc76ae2f09a80b42) )
1935
 
 
1936
 
        ROM_REGION( 0x0120, "proms", 0 )
1937
 
        ROM_LOAD( "009.011",      0x0000, 0x0020, CRC(dcc48de5) SHA1(5594568dd6a605d6d9d9646b1af645af72a7f53d) )
1938
 
        ROM_LOAD( "008.011",      0x0020, 0x0100, CRC(6fa3093a) SHA1(2b7aeca74c1ae4156bf1878453a047330f96f0a8) )
1939
 
ROM_END
1940
 
 
1941
 
 
1942
 
ROM_START( warlords )
1943
 
        ROM_REGION( 0x10000, "maincpu", 0 )
1944
 
        ROM_LOAD( "037154.1m",    0x5000, 0x0800, CRC(18006c87) SHA1(6b4aab1b1710819d29f4bbc29269eb9c915626c0) )
1945
 
        ROM_LOAD( "037153.1k",    0x5800, 0x0800, CRC(67758f4c) SHA1(b65ca677b54de7a8202838207d9a7bb0aed3e0f2) )
1946
 
        ROM_LOAD( "037158.1j",    0x6000, 0x0800, CRC(1f043a86) SHA1(b1e271c0979d62202ae86c4b6860fb67bbef6400) )
1947
 
        ROM_LOAD( "037157.1h",    0x6800, 0x0800, CRC(1a639100) SHA1(41ec333aee7192f8aeef49e5257f201f4db01cff) )
1948
 
        ROM_LOAD( "037156.1e",    0x7000, 0x0800, CRC(534f34b4) SHA1(1680982ded17350c2ae10bb47f7eb8908bb10db2) )
1949
 
        ROM_LOAD( "037155.1d",    0x7800, 0x0800, CRC(23b94210) SHA1(d74c1ca90caf15942805043b4ebe4ee077799da0) )
1950
 
 
1951
 
        ROM_REGION( 0x0800, "gfx1", 0 )
1952
 
        ROM_LOAD( "037159.6e",    0x0000, 0x0800, CRC(ff979a08) SHA1(422053473e41e3e1f71eb28e40eedc78f22326b3) )
1953
 
 
1954
 
        ROM_REGION( 0x0100, "proms", 0 )
1955
 
        /* Only the first 0x80 bytes are used by the hardware. A7 is grounded. */
1956
 
        /* Bytes 0x00-0x3f are used fore the color cocktail version. */
1957
 
        /* Bytes 0x40-0x7f are for the upright version of the cabinet with a */
1958
 
        /* mirror and painted background. */
1959
 
        ROM_LOAD( "warlord.clr",  0x0000, 0x0100, CRC(a2c5c277) SHA1(f04de9fb6ee9619b4a4aae10c92b16b3123046cf) )
1960
 
ROM_END
1961
 
 
1962
 
 
1963
 
ROM_START( bullsdrt )
1964
 
        ROM_REGION( 0x8000, "maincpu", 0 )
1965
 
        ROM_LOAD( "27128.bin", 0x0000, 0x1000, CRC(2729f585) SHA1(6ffbfa5b62c497c3932ab71d0e3f407cae99cb59) )
1966
 
        ROM_CONTINUE(          0x2000, 0x1000 )
1967
 
        ROM_CONTINUE(          0x4000, 0x1000 )
1968
 
        ROM_CONTINUE(          0x6000, 0x1000 )
1969
 
 
1970
 
        ROM_REGION( 0x4000, "gfx1", 0 )
1971
 
        ROM_LOAD( "2764_b.bin",   0x0000, 0x2000, CRC(49a19aba) SHA1(77869b7a7aae24dcbc4c7f1a3d4bcd26ea3f4fac) )
1972
 
        ROM_LOAD( "2764_a.bin",   0x2000, 0x2000, CRC(361ff09d) SHA1(4b57417085bc9ee174196ca638dc7e6d3626f801) )
1973
 
 
1974
 
        ROM_REGION( 0x0200, "proms", 0 ) /* unknown */
1975
 
        ROM_LOAD( "82s147.bin",   0x0000, 0x0200, CRC(d841b7e0) SHA1(aab32645a613cd027aed98437db24704763cc147) )
1976
 
ROM_END
1977
 
 
1978
 
 
1979
 
 
1980
 
/*************************************
1981
 
 *
1982
 
 *  Driver initialization
1983
 
 *
1984
 
 *************************************/
1985
 
 
1986
 
static DRIVER_INIT( caterplr )
1987
 
{
1988
 
        address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
1989
 
        device_t *device = machine.device("pokey");
1990
 
        space->install_legacy_readwrite_handler(*device, 0x1000, 0x100f, FUNC(caterplr_AY8910_r), FUNC(caterplr_AY8910_w));
1991
 
        space->install_legacy_read_handler(*device, 0x1780, 0x1780, FUNC(caterplr_rand_r));
1992
 
}
1993
 
 
1994
 
 
1995
 
static DRIVER_INIT( magworm )
1996
 
{
1997
 
        address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
1998
 
        device_t *device = machine.device("pokey");
1999
 
        space->install_legacy_write_handler(*device, 0x1001, 0x1001, FUNC(ay8910_address_w));
2000
 
        space->install_legacy_readwrite_handler(*device, 0x1003, 0x1003, FUNC(ay8910_r), FUNC(ay8910_data_w));
2001
 
}
2002
 
 
2003
 
 
2004
 
static DRIVER_INIT( bullsdrt )
2005
 
{
2006
 
        centiped_state *state = machine.driver_data<centiped_state>();
2007
 
 
2008
 
        state->m_dsw_select = 0;
2009
 
}
2010
 
 
2011
 
 
2012
 
 
2013
 
/*************************************
2014
 
 *
2015
 
 *  Game drivers
2016
 
 *
2017
 
 *************************************/
2018
 
 
2019
 
GAME( 1980, centiped, 0,        centiped, centiped, 0,        ROT270, "Atari",   "Centipede (revision 3)", GAME_SUPPORTS_SAVE)
2020
 
GAME( 1980, centiped2,centiped, centiped, centiped, 0,        ROT270, "Atari",   "Centipede (revision 2)", GAME_SUPPORTS_SAVE )
2021
 
GAME( 1980, centtime, centiped, centiped, centtime, 0,        ROT270, "Atari",   "Centipede (1 player, timed)", GAME_SUPPORTS_SAVE )
2022
 
GAME( 1980, centipdb, centiped, centipdb, centiped, 0,        ROT270, "bootleg", "Centipede (bootleg)", GAME_SUPPORTS_SAVE )
2023
 
GAME( 1980, centipdd, centiped, centiped, centiped, 0,        ROT270, "hack",    "Centipede Dux (hack)", GAME_SUPPORTS_SAVE )
2024
 
GAME( 1980, caterplr, centiped, caterplr, caterplr, caterplr, ROT270, "bootleg", "Caterpillar", GAME_SUPPORTS_SAVE )
2025
 
GAME( 1980, millpac,  centiped, centipdb, centiped, 0,        ROT270, "bootleg? (Valadon Automation)", "Millpac", GAME_SUPPORTS_SAVE )
2026
 
GAME( 1980, magworm,  centiped, magworm,  magworm,  magworm,  ROT270, "bootleg", "Magic Worm (bootleg)", GAME_SUPPORTS_SAVE )
2027
 
GAME( 1982, milliped, 0,        milliped, milliped, 0,        ROT270, "Atari",   "Millipede", GAME_SUPPORTS_SAVE )
2028
 
GAME( 1982, millipdd, milliped, milliped, milliped, 0,        ROT270, "hack",    "Millipede Dux (hack)", GAME_SUPPORTS_SAVE )
2029
 
 
2030
 
GAME( 1980, warlords, 0,        warlords, warlords, 0,        ROT0,   "Atari",   "Warlords", GAME_SUPPORTS_SAVE )
2031
 
GAME( 1981, mazeinv,  0,        mazeinv,  mazeinv,  0,        ROT270, "Atari",   "Maze Invaders (prototype)", 0 )
2032
 
 
2033
 
GAME( 1985, bullsdrt, 0,        bullsdrt, bullsdrt, bullsdrt, ROT270, "Shinkai Inc. (Magic Eletronics Inc. license)", "Bulls Eye Darts", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )