summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2007-12-17 15:19:59 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2007-12-17 15:19:59 +0000
commit7b77f1218624ea26dbb2efd85a19f795f5d4e02e (patch)
tree19209304095572b4fd61c2a2d6a5aa75c4e471ad /src/mame/drivers
parent3da7f476068b3ffef713218ba2fc1bd5030f2c38 (diff)
Initial checkin of MAME 0.121.mame0121
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/1942.c442
-rw-r--r--src/mame/drivers/1943.c464
-rw-r--r--src/mame/drivers/1945kiii.c309
-rw-r--r--src/mame/drivers/20pacgal.c289
-rw-r--r--src/mame/drivers/2mindril.c258
-rw-r--r--src/mame/drivers/39in1.c58
-rw-r--r--src/mame/drivers/40love.c1307
-rw-r--r--src/mame/drivers/4enraya.c216
-rw-r--r--src/mame/drivers/8080bw.c3246
-rw-r--r--src/mame/drivers/88games.c563
-rw-r--r--src/mame/drivers/ace.c363
-rw-r--r--src/mame/drivers/acefruit.c704
-rw-r--r--src/mame/drivers/acommand.c587
-rw-r--r--src/mame/drivers/actfancr.c692
-rw-r--r--src/mame/drivers/adp.c239
-rw-r--r--src/mame/drivers/aeroboto.c355
-rw-r--r--src/mame/drivers/aerofgt.c2492
-rw-r--r--src/mame/drivers/afega.c1928
-rw-r--r--src/mame/drivers/airbustr.c763
-rw-r--r--src/mame/drivers/ajax.c439
-rw-r--r--src/mame/drivers/aladbl.c164
-rw-r--r--src/mame/drivers/aleck64.c552
-rw-r--r--src/mame/drivers/alg.c863
-rw-r--r--src/mame/drivers/aliens.c542
-rw-r--r--src/mame/drivers/alpha68k.c3410
-rw-r--r--src/mame/drivers/ambush.c285
-rw-r--r--src/mame/drivers/amidar.c608
-rw-r--r--src/mame/drivers/ampoker.c1011
-rw-r--r--src/mame/drivers/amspdwy.c399
-rw-r--r--src/mame/drivers/angelkds.c766
-rw-r--r--src/mame/drivers/appoooh.c622
-rw-r--r--src/mame/drivers/aquarium.c444
-rw-r--r--src/mame/drivers/arabian.c441
-rw-r--r--src/mame/drivers/arcadecl.c435
-rw-r--r--src/mame/drivers/arcadia.c736
-rw-r--r--src/mame/drivers/argus.c1163
-rw-r--r--src/mame/drivers/arkanoid.c1177
-rw-r--r--src/mame/drivers/armedf.c1429
-rw-r--r--src/mame/drivers/artmagic.c903
-rw-r--r--src/mame/drivers/ashnojoe.c422
-rw-r--r--src/mame/drivers/asterix.c395
-rw-r--r--src/mame/drivers/asteroid.c948
-rw-r--r--src/mame/drivers/astinvad.c373
-rw-r--r--src/mame/drivers/astrocde.c1786
-rw-r--r--src/mame/drivers/astrof.c1043
-rw-r--r--src/mame/drivers/asuka.c1426
-rw-r--r--src/mame/drivers/atarifb.c782
-rw-r--r--src/mame/drivers/atarig1.c976
-rw-r--r--src/mame/drivers/atarig42.c788
-rw-r--r--src/mame/drivers/atarigt.c1136
-rw-r--r--src/mame/drivers/atarigx2.c2118
-rw-r--r--src/mame/drivers/atarisy1.c2246
-rw-r--r--src/mame/drivers/atarisy2.c3422
-rw-r--r--src/mame/drivers/ataxx.c848
-rw-r--r--src/mame/drivers/atetris.c504
-rw-r--r--src/mame/drivers/attckufo.c172
-rw-r--r--src/mame/drivers/avalnche.c297
-rw-r--r--src/mame/drivers/aztarac.c248
-rw-r--r--src/mame/drivers/backfire.c701
-rw-r--r--src/mame/drivers/badlands.c537
-rw-r--r--src/mame/drivers/bagman.c957
-rw-r--r--src/mame/drivers/balsente.c2470
-rw-r--r--src/mame/drivers/bankp.c377
-rw-r--r--src/mame/drivers/baraduke.c614
-rw-r--r--src/mame/drivers/batman.c349
-rw-r--r--src/mame/drivers/battlane.c382
-rw-r--r--src/mame/drivers/battlera.c375
-rw-r--r--src/mame/drivers/battlex.c298
-rw-r--r--src/mame/drivers/battlnts.c492
-rw-r--r--src/mame/drivers/bbusters.c938
-rw-r--r--src/mame/drivers/beaminv.c376
-rw-r--r--src/mame/drivers/beathead.c549
-rw-r--r--src/mame/drivers/beezer.c170
-rw-r--r--src/mame/drivers/berzerk.c896
-rw-r--r--src/mame/drivers/bestleag.c375
-rw-r--r--src/mame/drivers/bfcobra.c1622
-rw-r--r--src/mame/drivers/bfm_sc2.c3446
-rw-r--r--src/mame/drivers/bigevglf.c593
-rw-r--r--src/mame/drivers/bigfghtr.c626
-rw-r--r--src/mame/drivers/bigstrkb.c293
-rw-r--r--src/mame/drivers/bionicc.c550
-rw-r--r--src/mame/drivers/bishi.c345
-rw-r--r--src/mame/drivers/bishjan.c489
-rw-r--r--src/mame/drivers/bking2.c707
-rw-r--r--src/mame/drivers/bladestl.c522
-rw-r--r--src/mame/drivers/blktiger.c451
-rw-r--r--src/mame/drivers/blmbycar.c569
-rw-r--r--src/mame/drivers/blockade.c584
-rw-r--r--src/mame/drivers/blockhl.c360
-rw-r--r--src/mame/drivers/blockout.c497
-rw-r--r--src/mame/drivers/bloodbro.c724
-rw-r--r--src/mame/drivers/blstroid.c440
-rw-r--r--src/mame/drivers/blueprnt.c406
-rw-r--r--src/mame/drivers/bmcbowl.c553
-rw-r--r--src/mame/drivers/bnstars.c1489
-rw-r--r--src/mame/drivers/bogeyman.c291
-rw-r--r--src/mame/drivers/bombjack.c443
-rw-r--r--src/mame/drivers/boogwing.c478
-rw-r--r--src/mame/drivers/bottom9.c629
-rw-r--r--src/mame/drivers/boxer.c356
-rw-r--r--src/mame/drivers/brkthru.c680
-rw-r--r--src/mame/drivers/bsktball.c334
-rw-r--r--src/mame/drivers/btime.c1884
-rw-r--r--src/mame/drivers/btoads.c387
-rw-r--r--src/mame/drivers/bublbobl.c1353
-rw-r--r--src/mame/drivers/buggychl.c543
-rw-r--r--src/mame/drivers/bwidow.c923
-rw-r--r--src/mame/drivers/bwing.c628
-rw-r--r--src/mame/drivers/bzone.c840
-rw-r--r--src/mame/drivers/cabal.c863
-rw-r--r--src/mame/drivers/calorie.c472
-rw-r--r--src/mame/drivers/canyon.c325
-rw-r--r--src/mame/drivers/capbowl.c509
-rw-r--r--src/mame/drivers/cardline.c250
-rw-r--r--src/mame/drivers/carjmbre.c252
-rw-r--r--src/mame/drivers/carpolo.c325
-rw-r--r--src/mame/drivers/carrera.c338
-rw-r--r--src/mame/drivers/cave.c4511
-rw-r--r--src/mame/drivers/cball.c249
-rw-r--r--src/mame/drivers/cbasebal.c324
-rw-r--r--src/mame/drivers/cbuster.c591
-rw-r--r--src/mame/drivers/ccastles.c660
-rw-r--r--src/mame/drivers/cchasm.c286
-rw-r--r--src/mame/drivers/cclimber.c1643
-rw-r--r--src/mame/drivers/centiped.c1846
-rw-r--r--src/mame/drivers/chaknpop.c358
-rw-r--r--src/mame/drivers/cham24.c298
-rw-r--r--src/mame/drivers/champbas.c446
-rw-r--r--src/mame/drivers/champbwl.c385
-rw-r--r--src/mame/drivers/changela.c572
-rw-r--r--src/mame/drivers/cheekyms.c183
-rw-r--r--src/mame/drivers/cherrym.c430
-rw-r--r--src/mame/drivers/cherrym2.c428
-rw-r--r--src/mame/drivers/chinagat.c845
-rw-r--r--src/mame/drivers/chinsan.c535
-rw-r--r--src/mame/drivers/chqflag.c485
-rw-r--r--src/mame/drivers/cidelsa.c754
-rw-r--r--src/mame/drivers/cinemat.c1505
-rw-r--r--src/mame/drivers/circus.c542
-rw-r--r--src/mame/drivers/circusc.c520
-rw-r--r--src/mame/drivers/cischeat.c3214
-rw-r--r--src/mame/drivers/citycon.c368
-rw-r--r--src/mame/drivers/clayshoo.c344
-rw-r--r--src/mame/drivers/cliffhgr.c842
-rw-r--r--src/mame/drivers/cloak.c604
-rw-r--r--src/mame/drivers/cloud9.c555
-rw-r--r--src/mame/drivers/clshroad.c526
-rw-r--r--src/mame/drivers/cninja.c1841
-rw-r--r--src/mame/drivers/cntsteer.c970
-rw-r--r--src/mame/drivers/coinmstr.c823
-rw-r--r--src/mame/drivers/cojag.c1579
-rw-r--r--src/mame/drivers/combatsc.c934
-rw-r--r--src/mame/drivers/comebaby.c106
-rw-r--r--src/mame/drivers/commando.c548
-rw-r--r--src/mame/drivers/compgolf.c311
-rw-r--r--src/mame/drivers/contra.c456
-rw-r--r--src/mame/drivers/coolpool.c997
-rw-r--r--src/mame/drivers/coolridr.c253
-rw-r--r--src/mame/drivers/cop01.c618
-rw-r--r--src/mame/drivers/copsnrob.c324
-rw-r--r--src/mame/drivers/cosmic.c1529
-rw-r--r--src/mame/drivers/couple.c552
-rw-r--r--src/mame/drivers/cowrace.c220
-rw-r--r--src/mame/drivers/cps1.c7471
-rw-r--r--src/mame/drivers/cps2.c7444
-rw-r--r--src/mame/drivers/cps3.c3286
-rw-r--r--src/mame/drivers/crbaloon.c418
-rw-r--r--src/mame/drivers/crgolf.c607
-rw-r--r--src/mame/drivers/crimfght.c529
-rw-r--r--src/mame/drivers/crospang.c672
-rw-r--r--src/mame/drivers/crshrace.c757
-rw-r--r--src/mame/drivers/crystal.c926
-rw-r--r--src/mame/drivers/cshooter.c762
-rw-r--r--src/mame/drivers/csk.c714
-rw-r--r--src/mame/drivers/cubocd32.c400
-rw-r--r--src/mame/drivers/cultures.c452
-rw-r--r--src/mame/drivers/cvs.c1483
-rw-r--r--src/mame/drivers/cyberbal.c1045
-rw-r--r--src/mame/drivers/cybertnk.c690
-rw-r--r--src/mame/drivers/dacholer.c422
-rw-r--r--src/mame/drivers/dambustr.c271
-rw-r--r--src/mame/drivers/darius.c1266
-rw-r--r--src/mame/drivers/darkhors.c684
-rw-r--r--src/mame/drivers/darkmist.c500
-rw-r--r--src/mame/drivers/darkseal.c509
-rw-r--r--src/mame/drivers/dassault.c872
-rw-r--r--src/mame/drivers/dblewing.c646
-rw-r--r--src/mame/drivers/dbz.c585
-rw-r--r--src/mame/drivers/dcheese.c612
-rw-r--r--src/mame/drivers/dcon.c421
-rw-r--r--src/mame/drivers/dday.c364
-rw-r--r--src/mame/drivers/ddayjlc.c578
-rw-r--r--src/mame/drivers/ddealer.c269
-rw-r--r--src/mame/drivers/ddenlovr.c8511
-rw-r--r--src/mame/drivers/ddragon.c1914
-rw-r--r--src/mame/drivers/ddragon3.c815
-rw-r--r--src/mame/drivers/ddrible.c428
-rw-r--r--src/mame/drivers/ddz.c94
-rw-r--r--src/mame/drivers/deadang.c411
-rw-r--r--src/mame/drivers/dec0.c2382
-rw-r--r--src/mame/drivers/dec8.c3437
-rw-r--r--src/mame/drivers/deco156.c703
-rw-r--r--src/mame/drivers/deco32.c3288
-rw-r--r--src/mame/drivers/deco_mlc.c749
-rw-r--r--src/mame/drivers/decocass.c1187
-rw-r--r--src/mame/drivers/deniam.c492
-rw-r--r--src/mame/drivers/destroyr.c385
-rw-r--r--src/mame/drivers/dgpix.c606
-rw-r--r--src/mame/drivers/dietgo.c368
-rw-r--r--src/mame/drivers/discoboy.c569
-rw-r--r--src/mame/drivers/diverboy.c258
-rw-r--r--src/mame/drivers/djboy.c1046
-rw-r--r--src/mame/drivers/djmain.c1967
-rw-r--r--src/mame/drivers/dkong.c2962
-rw-r--r--src/mame/drivers/dlair.c1103
-rw-r--r--src/mame/drivers/dmndrby.c290
-rw-r--r--src/mame/drivers/docastle.c1068
-rw-r--r--src/mame/drivers/dogfgt.c349
-rw-r--r--src/mame/drivers/dominob.c306
-rw-r--r--src/mame/drivers/dooyong.c2013
-rw-r--r--src/mame/drivers/dorachan.c266
-rw-r--r--src/mame/drivers/dotrikun.c106
-rw-r--r--src/mame/drivers/dragrace.c375
-rw-r--r--src/mame/drivers/dreamwld.c524
-rw-r--r--src/mame/drivers/drgnmst.c529
-rw-r--r--src/mame/drivers/dribling.c377
-rw-r--r--src/mame/drivers/drmicro.c302
-rw-r--r--src/mame/drivers/drtomy.c306
-rw-r--r--src/mame/drivers/dunhuang.c730
-rw-r--r--src/mame/drivers/dwarfd.c782
-rw-r--r--src/mame/drivers/dynadice.c263
-rw-r--r--src/mame/drivers/dynax.c6070
-rw-r--r--src/mame/drivers/dynduke.c524
-rw-r--r--src/mame/drivers/egghunt.c443
-rw-r--r--src/mame/drivers/embargo.c279
-rw-r--r--src/mame/drivers/enigma2.c671
-rw-r--r--src/mame/drivers/eolith.c879
-rw-r--r--src/mame/drivers/eolith16.c258
-rw-r--r--src/mame/drivers/eolithsp.c101
-rw-r--r--src/mame/drivers/epos.c620
-rw-r--r--src/mame/drivers/eprom.c600
-rw-r--r--src/mame/drivers/equites.c1445
-rw-r--r--src/mame/drivers/ertictac.c456
-rw-r--r--src/mame/drivers/esd16.c980
-rw-r--r--src/mame/drivers/esh.c378
-rw-r--r--src/mame/drivers/espial.c443
-rw-r--r--src/mame/drivers/ettrivia.c380
-rw-r--r--src/mame/drivers/exctsccr.c615
-rw-r--r--src/mame/drivers/exedexes.c353
-rw-r--r--src/mame/drivers/exerion.c489
-rw-r--r--src/mame/drivers/exidy.c1469
-rw-r--r--src/mame/drivers/exidy440.c2087
-rw-r--r--src/mame/drivers/expro02.c490
-rw-r--r--src/mame/drivers/exprraid.c619
-rw-r--r--src/mame/drivers/exterm.c565
-rw-r--r--src/mame/drivers/exzisus.c413
-rw-r--r--src/mame/drivers/f-32.c244
-rw-r--r--src/mame/drivers/f1gp.c791
-rw-r--r--src/mame/drivers/fantland.c1123
-rw-r--r--src/mame/drivers/fastfred.c908
-rw-r--r--src/mame/drivers/fastlane.c340
-rw-r--r--src/mame/drivers/fcombat.c476
-rw-r--r--src/mame/drivers/fcrash.c387
-rw-r--r--src/mame/drivers/fgoal.c460
-rw-r--r--src/mame/drivers/filetto.c794
-rw-r--r--src/mame/drivers/finalizr.c508
-rw-r--r--src/mame/drivers/findout.c683
-rw-r--r--src/mame/drivers/firebeat.c2413
-rw-r--r--src/mame/drivers/firetrap.c784
-rw-r--r--src/mame/drivers/firetrk.c1213
-rw-r--r--src/mame/drivers/fitfight.c1007
-rw-r--r--src/mame/drivers/flkatck.c348
-rw-r--r--src/mame/drivers/flower.c363
-rw-r--r--src/mame/drivers/flstory.c1020
-rw-r--r--src/mame/drivers/flyball.c311
-rw-r--r--src/mame/drivers/foodf.c496
-rw-r--r--src/mame/drivers/fortecar.c177
-rw-r--r--src/mame/drivers/freekick.c1056
-rw-r--r--src/mame/drivers/frogger.c369
-rw-r--r--src/mame/drivers/fromanc2.c967
-rw-r--r--src/mame/drivers/fromance.c1390
-rw-r--r--src/mame/drivers/funkybee.c413
-rw-r--r--src/mame/drivers/funkyjet.c472
-rw-r--r--src/mame/drivers/funworld.c2031
-rw-r--r--src/mame/drivers/funybubl.c345
-rw-r--r--src/mame/drivers/fuukifg2.c783
-rw-r--r--src/mame/drivers/fuukifg3.c741
-rw-r--r--src/mame/drivers/gaelco.c1337
-rw-r--r--src/mame/drivers/gaelco2.c1384
-rw-r--r--src/mame/drivers/gaelco3d.c1156
-rw-r--r--src/mame/drivers/gaiden.c1537
-rw-r--r--src/mame/drivers/galaga.c3124
-rw-r--r--src/mame/drivers/galaxia.c190
-rw-r--r--src/mame/drivers/galaxian.c7070
-rw-r--r--src/mame/drivers/galivan.c1046
-rw-r--r--src/mame/drivers/galpani2.c888
-rw-r--r--src/mame/drivers/galpani3.c436
-rw-r--r--src/mame/drivers/galpanic.c1355
-rw-r--r--src/mame/drivers/galspnbl.c399
-rw-r--r--src/mame/drivers/gamecstl.c524
-rw-r--r--src/mame/drivers/gameplan.c1583
-rw-r--r--src/mame/drivers/gaplus.c1060
-rw-r--r--src/mame/drivers/gauntlet.c1730
-rw-r--r--src/mame/drivers/gberet.c695
-rw-r--r--src/mame/drivers/gbusters.c455
-rw-r--r--src/mame/drivers/gcpinbal.c444
-rw-r--r--src/mame/drivers/gdrawpkr.c700
-rw-r--r--src/mame/drivers/genesis.c814
-rw-r--r--src/mame/drivers/getrivia.c751
-rw-r--r--src/mame/drivers/ghosteo.c581
-rw-r--r--src/mame/drivers/gijoe.c462
-rw-r--r--src/mame/drivers/ginganin.c482
-rw-r--r--src/mame/drivers/gladiatr.c1047
-rw-r--r--src/mame/drivers/glass.c342
-rw-r--r--src/mame/drivers/gng.c646
-rw-r--r--src/mame/drivers/go2000.c205
-rw-r--r--src/mame/drivers/goal92.c416
-rw-r--r--src/mame/drivers/goindol.c448
-rw-r--r--src/mame/drivers/goldstar.c468
-rw-r--r--src/mame/drivers/gomoku.c231
-rw-r--r--src/mame/drivers/good.c316
-rw-r--r--src/mame/drivers/goodejan.c390
-rw-r--r--src/mame/drivers/gotcha.c394
-rw-r--r--src/mame/drivers/gottlieb.c2323
-rw-r--r--src/mame/drivers/gotya.c286
-rw-r--r--src/mame/drivers/gpworld.c499
-rw-r--r--src/mame/drivers/gradius3.c526
-rw-r--r--src/mame/drivers/grchamp.c790
-rw-r--r--src/mame/drivers/gridlee.c501
-rw-r--r--src/mame/drivers/groundfx.c523
-rw-r--r--src/mame/drivers/gstream.c471
-rw-r--r--src/mame/drivers/gstriker.c669
-rw-r--r--src/mame/drivers/gsword.c965
-rw-r--r--src/mame/drivers/gticlub.c1041
-rw-r--r--src/mame/drivers/gtipoker.c87
-rw-r--r--src/mame/drivers/gumbo.c462
-rw-r--r--src/mame/drivers/gunbustr.c451
-rw-r--r--src/mame/drivers/gundealr.c578
-rw-r--r--src/mame/drivers/gunpey.c169
-rw-r--r--src/mame/drivers/gunsmoke.c528
-rw-r--r--src/mame/drivers/gyruss.c560
-rw-r--r--src/mame/drivers/hal21.c975
-rw-r--r--src/mame/drivers/halleys.c2259
-rw-r--r--src/mame/drivers/hanaawas.c265
-rw-r--r--src/mame/drivers/hanaroku.c283
-rw-r--r--src/mame/drivers/harddriv.c3958
-rw-r--r--src/mame/drivers/hcastle.c424
-rw-r--r--src/mame/drivers/hexa.c204
-rw-r--r--src/mame/drivers/hexion.c341
-rw-r--r--src/mame/drivers/higemaru.c234
-rw-r--r--src/mame/drivers/hitme.c575
-rw-r--r--src/mame/drivers/hnayayoi.c772
-rw-r--r--src/mame/drivers/hng64.c1858
-rw-r--r--src/mame/drivers/holeland.c524
-rw-r--r--src/mame/drivers/homedata.c1871
-rw-r--r--src/mame/drivers/homerun.c254
-rw-r--r--src/mame/drivers/hornet.c1527
-rw-r--r--src/mame/drivers/hotblock.c220
-rw-r--r--src/mame/drivers/hshavoc.c327
-rw-r--r--src/mame/drivers/hyhoo.c343
-rw-r--r--src/mame/drivers/hyperspt.c660
-rw-r--r--src/mame/drivers/hyprduel.c889
-rw-r--r--src/mame/drivers/igs_180.c356
-rw-r--r--src/mame/drivers/igs_blit.c3022
-rw-r--r--src/mame/drivers/igs_m027.c601
-rw-r--r--src/mame/drivers/igs_m68.c316
-rw-r--r--src/mame/drivers/ikki.c296
-rw-r--r--src/mame/drivers/imolagp.c530
-rw-r--r--src/mame/drivers/intrscti.c137
-rw-r--r--src/mame/drivers/inufuku.c476
-rw-r--r--src/mame/drivers/iqblock.c610
-rw-r--r--src/mame/drivers/irobot.c395
-rw-r--r--src/mame/drivers/ironhors.c534
-rw-r--r--src/mame/drivers/istellar.c406
-rw-r--r--src/mame/drivers/itech32.c3949
-rw-r--r--src/mame/drivers/itech8.c2736
-rw-r--r--src/mame/drivers/jack.c1478
-rw-r--r--src/mame/drivers/jackal.c397
-rw-r--r--src/mame/drivers/jackpool.c234
-rw-r--r--src/mame/drivers/jailbrek.c420
-rw-r--r--src/mame/drivers/jalmah.c1955
-rw-r--r--src/mame/drivers/jchan.c872
-rw-r--r--src/mame/drivers/jcross.c344
-rw-r--r--src/mame/drivers/jedi.c611
-rw-r--r--src/mame/drivers/jollyjgr.c452
-rw-r--r--src/mame/drivers/jongkyo.c656
-rw-r--r--src/mame/drivers/jpmimpct.c1029
-rw-r--r--src/mame/drivers/jrpacman.c387
-rw-r--r--src/mame/drivers/junofrst.c455
-rw-r--r--src/mame/drivers/kaneko16.c3591
-rw-r--r--src/mame/drivers/kangaroo.c531
-rw-r--r--src/mame/drivers/karnov.c1029
-rw-r--r--src/mame/drivers/kchamp.c743
-rw-r--r--src/mame/drivers/kickgoal.c811
-rw-r--r--src/mame/drivers/kingobox.c900
-rw-r--r--src/mame/drivers/kingpin.c222
-rw-r--r--src/mame/drivers/kinst.c951
-rw-r--r--src/mame/drivers/kinstb.c286
-rw-r--r--src/mame/drivers/klax.c375
-rw-r--r--src/mame/drivers/kncljoe.c309
-rw-r--r--src/mame/drivers/koikoi.c312
-rw-r--r--src/mame/drivers/konamigq.c513
-rw-r--r--src/mame/drivers/konamigv.c903
-rw-r--r--src/mame/drivers/konamigx.c3665
-rw-r--r--src/mame/drivers/konamim2.c1132
-rw-r--r--src/mame/drivers/kopunch.c241
-rw-r--r--src/mame/drivers/ksayakyu.c320
-rw-r--r--src/mame/drivers/ksys573.c4423
-rw-r--r--src/mame/drivers/kyugo.c1278
-rw-r--r--src/mame/drivers/labyrunr.c337
-rw-r--r--src/mame/drivers/ladybug.c986
-rw-r--r--src/mame/drivers/ladyfrog.c341
-rw-r--r--src/mame/drivers/laserbas.c237
-rw-r--r--src/mame/drivers/laserbat.c943
-rw-r--r--src/mame/drivers/lasso.c1037
-rw-r--r--src/mame/drivers/lastduel.c804
-rw-r--r--src/mame/drivers/lastfght.c511
-rw-r--r--src/mame/drivers/lazercmd.c859
-rw-r--r--src/mame/drivers/legionna.c4391
-rw-r--r--src/mame/drivers/leland.c2575
-rw-r--r--src/mame/drivers/lemmings.c346
-rw-r--r--src/mame/drivers/lethal.c916
-rw-r--r--src/mame/drivers/lethalj.c764
-rw-r--r--src/mame/drivers/lgp.c462
-rw-r--r--src/mame/drivers/liberate.c963
-rw-r--r--src/mame/drivers/liberatr.c501
-rw-r--r--src/mame/drivers/limenko.c905
-rw-r--r--src/mame/drivers/littlerb.c392
-rw-r--r--src/mame/drivers/lkage.c568
-rw-r--r--src/mame/drivers/lockon.c762
-rw-r--r--src/mame/drivers/looping.c796
-rw-r--r--src/mame/drivers/lordgun.c745
-rw-r--r--src/mame/drivers/lsasquad.c806
-rw-r--r--src/mame/drivers/ltcasino.c727
-rw-r--r--src/mame/drivers/lucky8.c429
-rw-r--r--src/mame/drivers/lvcards.c589
-rw-r--r--src/mame/drivers/lwings.c1462
-rw-r--r--src/mame/drivers/m107.c676
-rw-r--r--src/mame/drivers/m62.c2629
-rw-r--r--src/mame/drivers/m72.c3530
-rw-r--r--src/mame/drivers/m79amb.c205
-rw-r--r--src/mame/drivers/m90.c1213
-rw-r--r--src/mame/drivers/m92.c2064
-rw-r--r--src/mame/drivers/m92.h242
-rw-r--r--src/mame/drivers/macrossp.c692
-rw-r--r--src/mame/drivers/macs.c617
-rw-r--r--src/mame/drivers/madalien.c776
-rw-r--r--src/mame/drivers/madmotor.c388
-rw-r--r--src/mame/drivers/magic10.c478
-rw-r--r--src/mame/drivers/magicfly.c715
-rw-r--r--src/mame/drivers/magmax.c457
-rw-r--r--src/mame/drivers/mainevt.c1031
-rw-r--r--src/mame/drivers/mainsnk.c493
-rw-r--r--src/mame/drivers/malzak.c558
-rw-r--r--src/mame/drivers/mappy.c2166
-rw-r--r--src/mame/drivers/marineb.c855
-rw-r--r--src/mame/drivers/marinedt.c646
-rw-r--r--src/mame/drivers/mario.c595
-rw-r--r--src/mame/drivers/markham.c280
-rw-r--r--src/mame/drivers/marvins.c771
-rw-r--r--src/mame/drivers/mastboy.c979
-rw-r--r--src/mame/drivers/matmania.c664
-rw-r--r--src/mame/drivers/maxaflex.c544
-rw-r--r--src/mame/drivers/mayumi.c327
-rw-r--r--src/mame/drivers/mazerbla.c1676
-rw-r--r--src/mame/drivers/mcatadv.c731
-rw-r--r--src/mame/drivers/mcr.c2588
-rw-r--r--src/mame/drivers/mcr3.c1575
-rw-r--r--src/mame/drivers/mcr68.c1428
-rw-r--r--src/mame/drivers/meadows.c851
-rw-r--r--src/mame/drivers/mediagx.c1058
-rw-r--r--src/mame/drivers/megadriv.c4851
-rw-r--r--src/mame/drivers/megadriv.h25
-rw-r--r--src/mame/drivers/megaplay.c1078
-rw-r--r--src/mame/drivers/megasys1.c3986
-rw-r--r--src/mame/drivers/megatech.c1319
-rw-r--r--src/mame/drivers/megazone.c616
-rw-r--r--src/mame/drivers/meijinsn.c367
-rw-r--r--src/mame/drivers/merit.c1230
-rw-r--r--src/mame/drivers/meritm.c321
-rw-r--r--src/mame/drivers/mermaid.c393
-rw-r--r--src/mame/drivers/metlclsh.c460
-rw-r--r--src/mame/drivers/metro.c5946
-rw-r--r--src/mame/drivers/mexico86.c611
-rw-r--r--src/mame/drivers/mgolf.c346
-rw-r--r--src/mame/drivers/mhavoc.c811
-rw-r--r--src/mame/drivers/micro3d.c1130
-rw-r--r--src/mame/drivers/midas.c587
-rw-r--r--src/mame/drivers/midtunit.c1298
-rw-r--r--src/mame/drivers/midvunit.c1438
-rw-r--r--src/mame/drivers/midwunit.c1207
-rw-r--r--src/mame/drivers/midxunit.c292
-rw-r--r--src/mame/drivers/midyunit.c2106
-rw-r--r--src/mame/drivers/midzeus.c823
-rw-r--r--src/mame/drivers/mikie.c365
-rw-r--r--src/mame/drivers/miniboy7.c314
-rw-r--r--src/mame/drivers/minivadr.c103
-rw-r--r--src/mame/drivers/mirage.c447
-rw-r--r--src/mame/drivers/mirax.c237
-rw-r--r--src/mame/drivers/missb2.c456
-rw-r--r--src/mame/drivers/missile.c1115
-rw-r--r--src/mame/drivers/mitchell.c2432
-rw-r--r--src/mame/drivers/mjkjidai.c425
-rw-r--r--src/mame/drivers/mjsister.c362
-rw-r--r--src/mame/drivers/mjsiyoub.c130
-rw-r--r--src/mame/drivers/mlanding.c444
-rw-r--r--src/mame/drivers/mnight.c476
-rw-r--r--src/mame/drivers/model1.c1629
-rw-r--r--src/mame/drivers/model2.c4013
-rw-r--r--src/mame/drivers/model3.c4660
-rw-r--r--src/mame/drivers/mogura.c253
-rw-r--r--src/mame/drivers/mole.c242
-rw-r--r--src/mame/drivers/momoko.c336
-rw-r--r--src/mame/drivers/moo.c942
-rw-r--r--src/mame/drivers/mosaic.c382
-rw-r--r--src/mame/drivers/mouser.c305
-rw-r--r--src/mame/drivers/mpatrol.c588
-rw-r--r--src/mame/drivers/mpu4.c1406
-rw-r--r--src/mame/drivers/mpu4drvr.c1950
-rw-r--r--src/mame/drivers/mquake.c464
-rw-r--r--src/mame/drivers/mrdo.c407
-rw-r--r--src/mame/drivers/mrflea.c421
-rw-r--r--src/mame/drivers/mrjong.c270
-rw-r--r--src/mame/drivers/ms32.c2268
-rw-r--r--src/mame/drivers/msisaac.c611
-rw-r--r--src/mame/drivers/mugsmash.c492
-rw-r--r--src/mame/drivers/multigam.c336
-rw-r--r--src/mame/drivers/munchmo.c379
-rw-r--r--src/mame/drivers/murogem.c262
-rw-r--r--src/mame/drivers/mustache.c316
-rw-r--r--src/mame/drivers/mw8080bw.c3109
-rw-r--r--src/mame/drivers/mwarr.c543
-rw-r--r--src/mame/drivers/mystston.c336
-rw-r--r--src/mame/drivers/mystwarr.c2147
-rw-r--r--src/mame/drivers/n8080.c650
-rw-r--r--src/mame/drivers/namcofl.c556
-rw-r--r--src/mame/drivers/namcoic.c1742
-rw-r--r--src/mame/drivers/namcona1.c1842
-rw-r--r--src/mame/drivers/namconb1.c1412
-rw-r--r--src/mame/drivers/namcond1.c412
-rw-r--r--src/mame/drivers/namcos1.c2367
-rw-r--r--src/mame/drivers/namcos10.c515
-rw-r--r--src/mame/drivers/namcos11.c1681
-rw-r--r--src/mame/drivers/namcos12.c2179
-rw-r--r--src/mame/drivers/namcos2.c4769
-rw-r--r--src/mame/drivers/namcos21.c2582
-rw-r--r--src/mame/drivers/namcos22.c4391
-rw-r--r--src/mame/drivers/namcos23.c1097
-rw-r--r--src/mame/drivers/namcos86.c1616
-rw-r--r--src/mame/drivers/naomi.c1888
-rw-r--r--src/mame/drivers/naughtyb.c789
-rw-r--r--src/mame/drivers/nbmj8688.c4236
-rw-r--r--src/mame/drivers/nbmj8891.c4169
-rw-r--r--src/mame/drivers/nbmj8991.c2505
-rw-r--r--src/mame/drivers/nbmj9195.c5054
-rw-r--r--src/mame/drivers/nemesis.c3001
-rw-r--r--src/mame/drivers/neodrvr.c7303
-rw-r--r--src/mame/drivers/neogeo.c1297
-rw-r--r--src/mame/drivers/news.c177
-rw-r--r--src/mame/drivers/ninjakd2.c703
-rw-r--r--src/mame/drivers/ninjakid.c336
-rw-r--r--src/mame/drivers/ninjaw.c976
-rw-r--r--src/mame/drivers/nitedrvr.c226
-rw-r--r--src/mame/drivers/niyanpai.c988
-rw-r--r--src/mame/drivers/nmg5.c1503
-rw-r--r--src/mame/drivers/nmk16.c5195
-rw-r--r--src/mame/drivers/nova2001.c270
-rw-r--r--src/mame/drivers/nss.c666
-rw-r--r--src/mame/drivers/nwk-tr.c1173
-rw-r--r--src/mame/drivers/nycaptor.c1309
-rw-r--r--src/mame/drivers/nyny.c777
-rw-r--r--src/mame/drivers/offtwall.c516
-rw-r--r--src/mame/drivers/ohmygod.c415
-rw-r--r--src/mame/drivers/ojankohs.c1197
-rw-r--r--src/mame/drivers/olibochu.c451
-rw-r--r--src/mame/drivers/omegaf.c885
-rw-r--r--src/mame/drivers/omegrace.c575
-rw-r--r--src/mame/drivers/oneshot.c498
-rw-r--r--src/mame/drivers/onetwo.c334
-rw-r--r--src/mame/drivers/opwolf.c816
-rw-r--r--src/mame/drivers/orbit.c326
-rw-r--r--src/mame/drivers/othldrby.c291
-rw-r--r--src/mame/drivers/othunder.c916
-rw-r--r--src/mame/drivers/overdriv.c503
-rw-r--r--src/mame/drivers/pacland.c596
-rw-r--r--src/mame/drivers/pacman.c5460
-rw-r--r--src/mame/drivers/pandoras.c487
-rw-r--r--src/mame/drivers/pangofun.c161
-rw-r--r--src/mame/drivers/panicr.c540
-rw-r--r--src/mame/drivers/paradise.c940
-rw-r--r--src/mame/drivers/parodius.c425
-rw-r--r--src/mame/drivers/pasha2.c464
-rw-r--r--src/mame/drivers/pass.c333
-rw-r--r--src/mame/drivers/pastelg.c263
-rw-r--r--src/mame/drivers/pbaction.c425
-rw-r--r--src/mame/drivers/pcktgal.c475
-rw-r--r--src/mame/drivers/pengo.c709
-rw-r--r--src/mame/drivers/peplus.c1138
-rw-r--r--src/mame/drivers/pgm.c4070
-rw-r--r--src/mame/drivers/phoenix.c1255
-rw-r--r--src/mame/drivers/pingpong.c617
-rw-r--r--src/mame/drivers/pipedrm.c769
-rw-r--r--src/mame/drivers/pipeline.c427
-rw-r--r--src/mame/drivers/pirates.c495
-rw-r--r--src/mame/drivers/pitnrun.c404
-rw-r--r--src/mame/drivers/pkscram.c328
-rw-r--r--src/mame/drivers/pktgaldx.c471
-rw-r--r--src/mame/drivers/pkunwar.c253
-rw-r--r--src/mame/drivers/playch10.c1746
-rw-r--r--src/mame/drivers/playmark.c1525
-rw-r--r--src/mame/drivers/plygonet.c824
-rw-r--r--src/mame/drivers/pmpoker.c1220
-rw-r--r--src/mame/drivers/pntnpuzl.c488
-rw-r--r--src/mame/drivers/pokechmp.c320
-rw-r--r--src/mame/drivers/polepos.c1715
-rw-r--r--src/mame/drivers/policetr.c746
-rw-r--r--src/mame/drivers/polyplay.c374
-rw-r--r--src/mame/drivers/poolshrk.c259
-rw-r--r--src/mame/drivers/pooyan.c360
-rw-r--r--src/mame/drivers/popeye.c709
-rw-r--r--src/mame/drivers/popper.c370
-rw-r--r--src/mame/drivers/portrait.c357
-rw-r--r--src/mame/drivers/powerbal.c593
-rw-r--r--src/mame/drivers/powerins.c685
-rw-r--r--src/mame/drivers/ppmast93.c400
-rw-r--r--src/mame/drivers/prehisle.c415
-rw-r--r--src/mame/drivers/progolf.c298
-rw-r--r--src/mame/drivers/psikyo.c2329
-rw-r--r--src/mame/drivers/psikyo4.c1120
-rw-r--r--src/mame/drivers/psikyosh.c1304
-rw-r--r--src/mame/drivers/psychic5.c622
-rw-r--r--src/mame/drivers/pturn.c527
-rw-r--r--src/mame/drivers/puckpkmn.c294
-rw-r--r--src/mame/drivers/punchout.c1226
-rw-r--r--src/mame/drivers/pushman.c643
-rw-r--r--src/mame/drivers/qdrmfgp.c807
-rw-r--r--src/mame/drivers/qix.c1222
-rw-r--r--src/mame/drivers/quantum.c342
-rw-r--r--src/mame/drivers/quasar.c523
-rw-r--r--src/mame/drivers/quizdna.c594
-rw-r--r--src/mame/drivers/quizo.c252
-rw-r--r--src/mame/drivers/quizpani.c298
-rw-r--r--src/mame/drivers/r2dtank.c585
-rw-r--r--src/mame/drivers/rabbit.c1291
-rw-r--r--src/mame/drivers/raiden.c528
-rw-r--r--src/mame/drivers/raiden2.c2305
-rw-r--r--src/mame/drivers/raiders5.c296
-rw-r--r--src/mame/drivers/rainbow.c823
-rw-r--r--src/mame/drivers/rallyx.c1235
-rw-r--r--src/mame/drivers/rampart.c547
-rw-r--r--src/mame/drivers/rastan.c576
-rw-r--r--src/mame/drivers/rbmk.c556
-rw-r--r--src/mame/drivers/rcasino.c346
-rw-r--r--src/mame/drivers/rcorsair.c160
-rw-r--r--src/mame/drivers/realbrk.c1083
-rw-r--r--src/mame/drivers/redalert.c553
-rw-r--r--src/mame/drivers/redclash.c526
-rw-r--r--src/mame/drivers/relief.c508
-rw-r--r--src/mame/drivers/renegade.c956
-rw-r--r--src/mame/drivers/retofinv.c529
-rw-r--r--src/mame/drivers/rmhaihai.c743
-rw-r--r--src/mame/drivers/rockola.c1611
-rw-r--r--src/mame/drivers/rockrage.c425
-rw-r--r--src/mame/drivers/rocnrope.c358
-rw-r--r--src/mame/drivers/rohga.c1450
-rw-r--r--src/mame/drivers/rollerg.c362
-rw-r--r--src/mame/drivers/rollrace.c435
-rw-r--r--src/mame/drivers/rotaryf.c181
-rw-r--r--src/mame/drivers/route16.c964
-rw-r--r--src/mame/drivers/royalmah.c4263
-rw-r--r--src/mame/drivers/rpunch.c876
-rw-r--r--src/mame/drivers/runaway.c436
-rw-r--r--src/mame/drivers/rungun.c660
-rw-r--r--src/mame/drivers/safarir.c322
-rw-r--r--src/mame/drivers/sandscrp.c475
-rw-r--r--src/mame/drivers/sangho.c338
-rw-r--r--src/mame/drivers/sauro.c484
-rw-r--r--src/mame/drivers/sbasketb.c392
-rw-r--r--src/mame/drivers/sbowling.c374
-rw-r--r--src/mame/drivers/sbrkout.c329
-rw-r--r--src/mame/drivers/sbugger.c293
-rw-r--r--src/mame/drivers/scobra.c2252
-rw-r--r--src/mame/drivers/scotrsht.c289
-rw-r--r--src/mame/drivers/scramble.c3466
-rw-r--r--src/mame/drivers/scregg.c402
-rw-r--r--src/mame/drivers/sderby.c343
-rw-r--r--src/mame/drivers/seattle.c2945
-rw-r--r--src/mame/drivers/segac2.c2205
-rw-r--r--src/mame/drivers/segae.c2398
-rw-r--r--src/mame/drivers/segae.h27
-rw-r--r--src/mame/drivers/segag80r.c1598
-rw-r--r--src/mame/drivers/segag80v.c1435
-rw-r--r--src/mame/drivers/segahang.c1683
-rw-r--r--src/mame/drivers/segald.c568
-rw-r--r--src/mame/drivers/segaorun.c1765
-rw-r--r--src/mame/drivers/segas16a.c3203
-rw-r--r--src/mame/drivers/segas16b.c6253
-rw-r--r--src/mame/drivers/segas18.c2264
-rw-r--r--src/mame/drivers/segas32.c4049
-rw-r--r--src/mame/drivers/segaxbd.c2435
-rw-r--r--src/mame/drivers/segaybd.c1809
-rw-r--r--src/mame/drivers/seibuspi.c3063
-rw-r--r--src/mame/drivers/seicross.c599
-rw-r--r--src/mame/drivers/sengokmj.c343
-rw-r--r--src/mame/drivers/senjyo.c967
-rw-r--r--src/mame/drivers/seta.c9093
-rw-r--r--src/mame/drivers/seta2.c2156
-rw-r--r--src/mame/drivers/sf.c1149
-rw-r--r--src/mame/drivers/sfkick.c157
-rw-r--r--src/mame/drivers/sg1000a.c340
-rw-r--r--src/mame/drivers/sgladiat.c301
-rw-r--r--src/mame/drivers/shadfrce.c653
-rw-r--r--src/mame/drivers/shangha3.c680
-rw-r--r--src/mame/drivers/shanghai.c1177
-rw-r--r--src/mame/drivers/shangkid.c999
-rw-r--r--src/mame/drivers/shaolins.c304
-rw-r--r--src/mame/drivers/shisen.c420
-rw-r--r--src/mame/drivers/shootout.c476
-rw-r--r--src/mame/drivers/shougi.c444
-rw-r--r--src/mame/drivers/shuuz.c375
-rw-r--r--src/mame/drivers/sidearms.c1222
-rw-r--r--src/mame/drivers/sidepckt.c444
-rw-r--r--src/mame/drivers/silkroad.c470
-rw-r--r--src/mame/drivers/simpl156.c1247
-rw-r--r--src/mame/drivers/simpsons.c479
-rw-r--r--src/mame/drivers/skullxbo.c630
-rw-r--r--src/mame/drivers/skyarmy.c311
-rw-r--r--src/mame/drivers/skychut.c442
-rw-r--r--src/mame/drivers/skydiver.c422
-rw-r--r--src/mame/drivers/skyfox.c436
-rw-r--r--src/mame/drivers/skykid.c553
-rw-r--r--src/mame/drivers/skylncr.c500
-rw-r--r--src/mame/drivers/skyraid.c318
-rw-r--r--src/mame/drivers/slapfght.c1696
-rw-r--r--src/mame/drivers/slapshot.c751
-rw-r--r--src/mame/drivers/sliver.c594
-rw-r--r--src/mame/drivers/smstrv.c310
-rw-r--r--src/mame/drivers/snk.c4497
-rw-r--r--src/mame/drivers/snk68.c1215
-rw-r--r--src/mame/drivers/snowbros.c2776
-rw-r--r--src/mame/drivers/solomon.c303
-rw-r--r--src/mame/drivers/sonson.c343
-rw-r--r--src/mame/drivers/spacefb.c567
-rw-r--r--src/mame/drivers/spaceg.c478
-rw-r--r--src/mame/drivers/spbactn.c443
-rw-r--r--src/mame/drivers/spcforce.c370
-rw-r--r--src/mame/drivers/spdodgeb.c604
-rw-r--r--src/mame/drivers/speedatk.c320
-rw-r--r--src/mame/drivers/speedbal.c292
-rw-r--r--src/mame/drivers/speedspn.c377
-rw-r--r--src/mame/drivers/speglsht.c331
-rw-r--r--src/mame/drivers/spiders.c792
-rw-r--r--src/mame/drivers/splash.c949
-rw-r--r--src/mame/drivers/sprcros2.c418
-rw-r--r--src/mame/drivers/sprint2.c693
-rw-r--r--src/mame/drivers/sprint4.c480
-rw-r--r--src/mame/drivers/sprint8.c591
-rw-r--r--src/mame/drivers/spy.c656
-rw-r--r--src/mame/drivers/srmp2.c1386
-rw-r--r--src/mame/drivers/srmp5.c683
-rw-r--r--src/mame/drivers/srmp6.c791
-rw-r--r--src/mame/drivers/srumbler.c445
-rw-r--r--src/mame/drivers/ssf2md.c33
-rw-r--r--src/mame/drivers/ssfindo.c722
-rw-r--r--src/mame/drivers/sshangha.c440
-rw-r--r--src/mame/drivers/ssingles.c285
-rw-r--r--src/mame/drivers/sslam.c973
-rw-r--r--src/mame/drivers/ssozumo.c331
-rw-r--r--src/mame/drivers/sspeedr.c263
-rw-r--r--src/mame/drivers/ssrj.c225
-rw-r--r--src/mame/drivers/sstrangr.c288
-rw-r--r--src/mame/drivers/ssv.c4696
-rw-r--r--src/mame/drivers/st0016.c661
-rw-r--r--src/mame/drivers/stactics.c313
-rw-r--r--src/mame/drivers/stadhero.c357
-rw-r--r--src/mame/drivers/starcrus.c242
-rw-r--r--src/mame/drivers/starfire.c422
-rw-r--r--src/mame/drivers/starshp1.c427
-rw-r--r--src/mame/drivers/starwars.c616
-rw-r--r--src/mame/drivers/statriv2.c922
-rw-r--r--src/mame/drivers/steaser.c123
-rw-r--r--src/mame/drivers/stepstag.c185
-rw-r--r--src/mame/drivers/stfight.c808
-rw-r--r--src/mame/drivers/stlforce.c423
-rw-r--r--src/mame/drivers/strnskil.c541
-rw-r--r--src/mame/drivers/stv.c3766
-rw-r--r--src/mame/drivers/stvinit.c1404
-rw-r--r--src/mame/drivers/subs.c291
-rw-r--r--src/mame/drivers/suna16.c1342
-rw-r--r--src/mame/drivers/suna8.c2415
-rw-r--r--src/mame/drivers/supbtime.c513
-rw-r--r--src/mame/drivers/supdrapo.c311
-rw-r--r--src/mame/drivers/superchs.c510
-rw-r--r--src/mame/drivers/superdq.c431
-rw-r--r--src/mame/drivers/superqix.c1305
-rw-r--r--src/mame/drivers/supertnk.c487
-rw-r--r--src/mame/drivers/suprgolf.c383
-rw-r--r--src/mame/drivers/suprloco.c298
-rw-r--r--src/mame/drivers/suprnova.c1607
-rw-r--r--src/mame/drivers/suprridr.c414
-rw-r--r--src/mame/drivers/suprslam.c396
-rw-r--r--src/mame/drivers/surpratk.c353
-rw-r--r--src/mame/drivers/system1.c4768
-rw-r--r--src/mame/drivers/system16.c2807
-rw-r--r--src/mame/drivers/system18.c1582
-rw-r--r--src/mame/drivers/system24.c2439
-rw-r--r--src/mame/drivers/tagteam.c376
-rw-r--r--src/mame/drivers/tail2nos.c378
-rw-r--r--src/mame/drivers/taito_b.c4028
-rw-r--r--src/mame/drivers/taito_f2.c5965
-rw-r--r--src/mame/drivers/taito_f3.c3589
-rw-r--r--src/mame/drivers/taito_h.c795
-rw-r--r--src/mame/drivers/taito_l.c3068
-rw-r--r--src/mame/drivers/taito_x.c1362
-rw-r--r--src/mame/drivers/taito_z.c4226
-rw-r--r--src/mame/drivers/taitoair.c747
-rw-r--r--src/mame/drivers/taitojc.c1642
-rw-r--r--src/mame/drivers/taitosj.c2711
-rw-r--r--src/mame/drivers/taitowlf.c537
-rw-r--r--src/mame/drivers/talbot.c280
-rw-r--r--src/mame/drivers/tank8.c544
-rw-r--r--src/mame/drivers/tankbatt.c334
-rw-r--r--src/mame/drivers/tankbust.c458
-rw-r--r--src/mame/drivers/taotaido.c446
-rw-r--r--src/mame/drivers/targeth.c235
-rw-r--r--src/mame/drivers/tarzan.c125
-rw-r--r--src/mame/drivers/tatsumi.c882
-rw-r--r--src/mame/drivers/tattack.c264
-rw-r--r--src/mame/drivers/taxidrvr.c447
-rw-r--r--src/mame/drivers/tbowl.c804
-rw-r--r--src/mame/drivers/tceptor.c698
-rw-r--r--src/mame/drivers/tcl.c200
-rw-r--r--src/mame/drivers/tecmo.c850
-rw-r--r--src/mame/drivers/tecmo16.c708
-rw-r--r--src/mame/drivers/tecmosys.c692
-rw-r--r--src/mame/drivers/tehkanwc.c1051
-rw-r--r--src/mame/drivers/tempest.c806
-rw-r--r--src/mame/drivers/terracre.c1021
-rw-r--r--src/mame/drivers/tetrisp2.c1638
-rw-r--r--src/mame/drivers/tetriunk.c245
-rw-r--r--src/mame/drivers/thayers.c514
-rw-r--r--src/mame/drivers/thedeep.c497
-rw-r--r--src/mame/drivers/thepit.c1058
-rw-r--r--src/mame/drivers/thief.c683
-rw-r--r--src/mame/drivers/thoop2.c241
-rw-r--r--src/mame/drivers/thunderj.c466
-rw-r--r--src/mame/drivers/thunderx.c1064
-rw-r--r--src/mame/drivers/tiamc1.c334
-rw-r--r--src/mame/drivers/tickee.c444
-rw-r--r--src/mame/drivers/tigeroad.c809
-rw-r--r--src/mame/drivers/timelimt.c372
-rw-r--r--src/mame/drivers/timeplt.c470
-rw-r--r--src/mame/drivers/tmaster.c573
-rw-r--r--src/mame/drivers/tmnt.c4378
-rw-r--r--src/mame/drivers/tnzs.c2142
-rw-r--r--src/mame/drivers/toaplan1.c2439
-rw-r--r--src/mame/drivers/toaplan2.c4738
-rw-r--r--src/mame/drivers/toki.c801
-rw-r--r--src/mame/drivers/toobin.c636
-rw-r--r--src/mame/drivers/topshoot.c310
-rw-r--r--src/mame/drivers/topspeed.c879
-rw-r--r--src/mame/drivers/toratora.c456
-rw-r--r--src/mame/drivers/tourtabl.c255
-rw-r--r--src/mame/drivers/toypop.c689
-rw-r--r--src/mame/drivers/tp84.c628
-rw-r--r--src/mame/drivers/trackfld.c1380
-rw-r--r--src/mame/drivers/travrusa.c521
-rw-r--r--src/mame/drivers/triplhnt.c376
-rw-r--r--src/mame/drivers/troangel.c295
-rw-r--r--src/mame/drivers/truco.c190
-rw-r--r--src/mame/drivers/trucocl.c202
-rw-r--r--src/mame/drivers/trvmadns.c334
-rw-r--r--src/mame/drivers/trvquest.c334
-rw-r--r--src/mame/drivers/tryout.c250
-rw-r--r--src/mame/drivers/tsamurai.c1297
-rw-r--r--src/mame/drivers/ttchamp.c330
-rw-r--r--src/mame/drivers/tubep.c1247
-rw-r--r--src/mame/drivers/tugboat.c468
-rw-r--r--src/mame/drivers/tumbleb.c3716
-rw-r--r--src/mame/drivers/tumblep.c422
-rw-r--r--src/mame/drivers/tunhunt.c441
-rw-r--r--src/mame/drivers/turbo.c1600
-rw-r--r--src/mame/drivers/turbosub.c464
-rw-r--r--src/mame/drivers/tutankhm.c435
-rw-r--r--src/mame/drivers/twin16.c1534
-rw-r--r--src/mame/drivers/twincobr.c1090
-rw-r--r--src/mame/drivers/twins.c314
-rw-r--r--src/mame/drivers/tx1.c1412
-rw-r--r--src/mame/drivers/ultraman.c350
-rw-r--r--src/mame/drivers/ultratnk.c351
-rw-r--r--src/mame/drivers/ultrsprt.c344
-rw-r--r--src/mame/drivers/undrfire.c741
-rw-r--r--src/mame/drivers/unico.c1138
-rw-r--r--src/mame/drivers/upscope.c395
-rw-r--r--src/mame/drivers/usgames.c452
-rw-r--r--src/mame/drivers/vamphalf.c1387
-rw-r--r--src/mame/drivers/vaportra.c830
-rw-r--r--src/mame/drivers/vastar.c443
-rw-r--r--src/mame/drivers/vball.c547
-rw-r--r--src/mame/drivers/vegaeo.c270
-rw-r--r--src/mame/drivers/vegas.c2601
-rw-r--r--src/mame/drivers/vendetta.c876
-rw-r--r--src/mame/drivers/vertigo.c236
-rw-r--r--src/mame/drivers/vicdual.c3248
-rw-r--r--src/mame/drivers/victory.c441
-rw-r--r--src/mame/drivers/videopin.c416
-rw-r--r--src/mame/drivers/vigilant.c980
-rw-r--r--src/mame/drivers/vindictr.c561
-rw-r--r--src/mame/drivers/viper.c1047
-rw-r--r--src/mame/drivers/vmetal.c499
-rw-r--r--src/mame/drivers/volfied.c381
-rw-r--r--src/mame/drivers/vroulet.c303
-rw-r--r--src/mame/drivers/vsnes.c2852
-rw-r--r--src/mame/drivers/vulgus.c409
-rw-r--r--src/mame/drivers/wallc.c340
-rw-r--r--src/mame/drivers/wardner.c677
-rw-r--r--src/mame/drivers/warpwarp.c1090
-rw-r--r--src/mame/drivers/warriorb.c757
-rw-r--r--src/mame/drivers/wc90.c493
-rw-r--r--src/mame/drivers/wc90b.c471
-rw-r--r--src/mame/drivers/wecleman.c1478
-rw-r--r--src/mame/drivers/welltris.c882
-rw-r--r--src/mame/drivers/wgp.c1302
-rw-r--r--src/mame/drivers/wheelfir.c683
-rw-r--r--src/mame/drivers/williams.c2768
-rw-r--r--src/mame/drivers/wilytowr.c731
-rw-r--r--src/mame/drivers/wink.c416
-rw-r--r--src/mame/drivers/wiping.c412
-rw-r--r--src/mame/drivers/witch.c859
-rw-r--r--src/mame/drivers/wiz.c1078
-rw-r--r--src/mame/drivers/wldarrow.c464
-rw-r--r--src/mame/drivers/wolfpack.c425
-rw-r--r--src/mame/drivers/wrally.c337
-rw-r--r--src/mame/drivers/wwfsstar.c625
-rw-r--r--src/mame/drivers/wwfwfest.c602
-rw-r--r--src/mame/drivers/xain.c725
-rw-r--r--src/mame/drivers/xexex.c657
-rw-r--r--src/mame/drivers/xmen.c917
-rw-r--r--src/mame/drivers/xorworld.c276
-rw-r--r--src/mame/drivers/xtheball.c415
-rw-r--r--src/mame/drivers/xxmissio.c357
-rw-r--r--src/mame/drivers/xybots.c405
-rw-r--r--src/mame/drivers/xyonix.c293
-rw-r--r--src/mame/drivers/yamato.c728
-rw-r--r--src/mame/drivers/yard.c367
-rw-r--r--src/mame/drivers/yiear.c347
-rw-r--r--src/mame/drivers/yumefuda.c449
-rw-r--r--src/mame/drivers/yunsun16.c833
-rw-r--r--src/mame/drivers/yunsung8.c710
-rw-r--r--src/mame/drivers/zac2650.c402
-rw-r--r--src/mame/drivers/zaccaria.c872
-rw-r--r--src/mame/drivers/zaxxon.c1520
-rw-r--r--src/mame/drivers/zerozone.c267
-rw-r--r--src/mame/drivers/zn.c4657
-rw-r--r--src/mame/drivers/zodiack.c629
-rw-r--r--src/mame/drivers/zr107.c788
956 files changed, 926809 insertions, 0 deletions
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
new file mode 100644
index 00000000000..4b4a4a27c66
--- /dev/null
+++ b/src/mame/drivers/1942.c
@@ -0,0 +1,442 @@
+/***************************************************************************
+
+1942
+
+driver by Paul Leaman
+
+
+MAIN CPU:
+
+0000-bfff ROM (8000-bfff banked)
+cc00-cc7f Sprites
+d000-d3ff Video RAM
+d400-d7ff Color RAM
+d800-dbff Background RAM (groups of 32 bytes, 16 code, 16 color/attribute)
+e000-efff RAM
+
+read:
+c000 IN0
+c001 IN1
+c002 IN2
+c003 DSW0
+c004 DSW1
+
+write:
+c800 command for the audio CPU
+c802-c803 background scroll
+c804 bit 7: flip screen
+ bit 4: cpu B reset
+ bit 0: coin counter
+c805 background palette bank selector
+c806 bit 0-1 ROM bank selector 00=1-N5.BIN
+ 01=1-N6.BIN
+ 10=1-N7.BIN
+
+
+
+SOUND CPU:
+
+0000-3fff ROM
+4000-47ff RAM
+6000 command from the main CPU
+8000 8910 #1 control
+8001 8910 #1 write
+c000 8910 #2 control
+c001 8910 #2 write
+
+
+
+Game runs in interrupt mode 0 (the devices supply the interrupt number).
+
+Two interrupts must be triggered per refresh for the game to function
+correctly.
+
+0x10 is the video retrace. This controls the speed of the game and generally
+ drives the code. This must be triggerd for each video retrace.
+0x08 is the sound card service interupt. The game uses this to throw sounds
+ at the sound CPU.
+
+
+SAVE STATE (lee@lmservers.com):
+1942 uses the Z80 and AY8910 which both support save state.
+
+The global variables in drivers/1942.c are extern and defined in video/1942.c
+The rationale for saving/not saving are as follows:
+UINT8 *c1942_fgvideoram; Saved via reference to AM_BASE
+UINT8 *c1942_bgvideoram; Saved via reference to AM_BASE
+
+static int c1942_palette_bank; Explicitly saved
+static tilemap *fg_tilemap, *bg_tilemap; Saved due to tilemap supporting save
+
+There are no static local variables.
+
+***************************************************************************/
+
+#include "driver.h"
+#include "sound/ay8910.h"
+
+
+extern UINT8 *c1942_fgvideoram;
+extern UINT8 *c1942_bgvideoram;
+
+
+extern WRITE8_HANDLER( c1942_fgvideoram_w );
+extern WRITE8_HANDLER( c1942_bgvideoram_w );
+extern WRITE8_HANDLER( c1942_scroll_w );
+extern WRITE8_HANDLER( c1942_c804_w );
+extern WRITE8_HANDLER( c1942_palette_bank_w );
+
+extern PALETTE_INIT( 1942 );
+extern VIDEO_START( 1942 );
+extern VIDEO_UPDATE( 1942 );
+
+
+
+static WRITE8_HANDLER( c1942_bankswitch_w )
+{
+ memory_set_bank(1, data & 0x03);
+}
+
+
+
+static INTERRUPT_GEN( c1942_interrupt )
+{
+ if (cpu_getiloops() != 0)
+ cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xcf);/* RST 08h */
+ else
+ cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+}
+
+
+
+static ADDRESS_MAP_START( c1942_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
+ AM_RANGE(0xc000, 0xc000) AM_READ(input_port_0_r) /* IN0 */
+ AM_RANGE(0xc001, 0xc001) AM_READ(input_port_1_r) /* IN1 */
+ AM_RANGE(0xc002, 0xc002) AM_READ(input_port_2_r) /* IN2 */
+ AM_RANGE(0xc003, 0xc003) AM_READ(input_port_3_r) /* DSW0 */
+ AM_RANGE(0xc004, 0xc004) AM_READ(input_port_4_r) /* DSW1 */
+ AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w)
+ AM_RANGE(0xc802, 0xc803) AM_WRITE(c1942_scroll_w)
+ AM_RANGE(0xc804, 0xc804) AM_WRITE(c1942_c804_w)
+ AM_RANGE(0xc805, 0xc805) AM_WRITE(c1942_palette_bank_w)
+ AM_RANGE(0xc806, 0xc806) AM_WRITE(c1942_bankswitch_w)
+ AM_RANGE(0xcc00, 0xcc7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
+ AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_WRITE(c1942_fgvideoram_w) AM_BASE(&c1942_fgvideoram)
+ AM_RANGE(0xd800, 0xdbff) AM_RAM AM_WRITE(c1942_bgvideoram_w) AM_BASE(&c1942_bgvideoram)
+ AM_RANGE(0xe000, 0xefff) AM_RAM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x3fff) AM_ROM
+ AM_RANGE(0x4000, 0x47ff) AM_RAM
+ AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r)
+ AM_RANGE(0x8000, 0x8000) AM_WRITE(AY8910_control_port_0_w)
+ AM_RANGE(0x8001, 0x8001) AM_WRITE(AY8910_write_port_0_w)
+ AM_RANGE(0xc000, 0xc000) AM_WRITE(AY8910_control_port_1_w)
+ AM_RANGE(0xc001, 0xc001) AM_WRITE(AY8910_write_port_1_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( 1942 )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("DSWA")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:8,7,6")
+ PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4,3")
+ PORT_DIPSETTING( 0x30, "20K 80K 80K+" )
+ PORT_DIPSETTING( 0x20, "20K 100K 100K+" )
+ PORT_DIPSETTING( 0x10, "30K 80K 80K+" )
+ PORT_DIPSETTING( 0x00, "30K 100K 100K+" )
+ PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:2,1")
+ PORT_DIPSETTING( 0x80, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_DIPSETTING( 0xc0, "3" )
+ PORT_DIPSETTING( 0x00, "5" )
+
+ PORT_START_TAG("DSWB")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:8,7,6")
+ PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
+ PORT_SERVICE_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:5" )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,2")
+ PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x20, "Difficult" )
+ PORT_DIPSETTING( 0x00, "Very Difficult" )
+ PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
+
+static const gfx_layout charlayout =
+{
+ 8,8,
+ RGN_FRAC(1,1),
+ 2,
+ { 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
+ 16*8
+};
+
+static const gfx_layout tilelayout =
+{
+ 16,16,
+ RGN_FRAC(1,3),
+ 3,
+ { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
+ { 0, 1, 2, 3, 4, 5, 6, 7,
+ 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
+ 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ 32*8
+};
+
+static const gfx_layout spritelayout =
+{
+ 16,16,
+ RGN_FRAC(1,2),
+ 4,
+ { RGN_FRAC(1,2)+4, RGN_FRAC(1,2)+0, 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
+ 16*16+0, 16*16+1, 16*16+2, 16*16+3, 16*16+8+0, 16*16+8+1, 16*16+8+2, 16*16+8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
+ 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
+ 64*8
+};
+
+static GFXDECODE_START( 1942 )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 64 )
+ GFXDECODE_ENTRY( REGION_GFX2, 0, tilelayout, 64*4, 4*32 )
+ GFXDECODE_ENTRY( REGION_GFX3, 0, spritelayout, 64*4+4*32*8, 16 )
+GFXDECODE_END
+
+
+
+static MACHINE_DRIVER_START( 1942 )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z80, 4000000) /* 4 MHz (?) */
+ MDRV_CPU_PROGRAM_MAP(c1942_map, 0)
+ MDRV_CPU_VBLANK_INT(c1942_interrupt,2)
+
+ MDRV_CPU_ADD(Z80, 3000000) /* 3 MHz ??? */
+ MDRV_CPU_PROGRAM_MAP(sound_map, 0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,4)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_GFXDECODE(1942)
+ MDRV_PALETTE_LENGTH(64*4+4*32*8+16*16)
+
+ MDRV_SCREEN_ADD("main", 0)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+
+ MDRV_PALETTE_INIT(1942)
+ MDRV_VIDEO_START(1942)
+ MDRV_VIDEO_UPDATE(1942)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(AY8910, 1500000)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MDRV_SOUND_ADD(AY8910, 1500000)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_DRIVER_END
+
+
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( 1942 )
+ ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */
+ ROM_LOAD( "1-n3a.bin", 0x00000, 0x4000, CRC(40201bab) SHA1(4886c07a4602223c21419118e10aadce9c99fa5a) )
+ ROM_LOAD( "1-n4.bin", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) )
+ ROM_LOAD( "1-n5.bin", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) )
+ ROM_LOAD( "1-n6.bin", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) )
+ ROM_LOAD( "1-n7.bin", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1-c11.bin", 0x0000, 0x4000, CRC(bd87f06b) SHA1(821f85cf157f81117eeaba0c3cf0337eac357e58) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1-f2.bin", 0x0000, 0x2000, CRC(6ebca191) SHA1(0dbddadde54a0ab66994c4a8726be05c6ca88a0e) ) /* characters */
+
+ ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */
+ ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) )
+ ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) )
+ ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) )
+ ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) )
+ ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */
+ ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) )
+ ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) )
+ ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) )
+
+ ROM_REGION( 0x0a00, REGION_PROMS, 0 )
+ ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */
+ ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */
+ ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */
+ ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */
+ ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */
+ ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */
+ ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */
+ ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */
+ROM_END
+
+ROM_START( 1942a )
+ ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */
+ ROM_LOAD( "1-n3.bin", 0x00000, 0x4000, CRC(612975f2) SHA1(f3744335862dd4c53925cc32792badd4a378c837) )
+ ROM_LOAD( "1-n4.bin", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) )
+ ROM_LOAD( "1-n5.bin", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) )
+ ROM_LOAD( "1-n6.bin", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) )
+ ROM_LOAD( "1-n7.bin", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1-c11.bin", 0x0000, 0x4000, CRC(bd87f06b) SHA1(821f85cf157f81117eeaba0c3cf0337eac357e58) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1-f2.bin", 0x0000, 0x2000, CRC(6ebca191) SHA1(0dbddadde54a0ab66994c4a8726be05c6ca88a0e) ) /* characters */
+
+ ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */
+ ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) )
+ ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) )
+ ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) )
+ ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) )
+ ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */
+ ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) )
+ ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) )
+ ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) )
+
+ ROM_REGION( 0x0a00, REGION_PROMS, 0 )
+ ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */
+ ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */
+ ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */
+ ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */
+ ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */
+ ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */
+ ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */
+ ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */
+ROM_END
+
+ROM_START( 1942b )
+ ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */
+ ROM_LOAD( "srb-03.n3", 0x00000, 0x4000, CRC(d9dafcc3) SHA1(a089a9bc55fb7d6d0ac53f91b258396d5d62677a) )
+ ROM_LOAD( "srb-04.n4", 0x04000, 0x4000, CRC(da0cf924) SHA1(856fbb302c9a4ec7850a26ab23dab8467f79bba4) )
+ ROM_LOAD( "srb-05.n5", 0x10000, 0x4000, CRC(d102911c) SHA1(35ba1d82bd901940f61d8619273463d02fc0a952) )
+ ROM_LOAD( "srb-06.n6", 0x14000, 0x2000, CRC(466f8248) SHA1(2ccc8fc59962d3001fbc10e8d2f20a254a74f251) )
+ ROM_LOAD( "srb-07.n7", 0x18000, 0x4000, CRC(0d31038c) SHA1(b588eaf6fddd66ecb2d9832dc197f286f1ccd846) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1-c11.bin", 0x0000, 0x4000, CRC(bd87f06b) SHA1(821f85cf157f81117eeaba0c3cf0337eac357e58) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1-f2.bin", 0x0000, 0x2000, CRC(6ebca191) SHA1(0dbddadde54a0ab66994c4a8726be05c6ca88a0e) ) /* characters */
+
+ ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */
+ ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) )
+ ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) )
+ ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) )
+ ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) )
+ ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */
+ ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) )
+ ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) )
+ ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) )
+
+ ROM_REGION( 0x0a00, REGION_PROMS, 0 )
+ ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */
+ ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */
+ ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */
+ ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */
+ ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */
+ ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */
+ ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */
+ ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */
+ ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */
+ROM_END
+
+
+static DRIVER_INIT( 1942 )
+{
+ UINT8 *ROM = memory_region(REGION_CPU1);
+ memory_configure_bank(1, 0, 3, &ROM[0x10000], 0x4000);
+}
+
+
+GAME( 1984, 1942, 0, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 1)", GAME_SUPPORTS_SAVE )
+GAME( 1984, 1942a, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1984, 1942b, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 3)", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/1943.c b/src/mame/drivers/1943.c
new file mode 100644
index 00000000000..6c88de25cfc
--- /dev/null
+++ b/src/mame/drivers/1943.c
@@ -0,0 +1,464 @@
+/***************************************************************************
+
+ 1943: The Battle of Midway
+ Capcom
+
+ driver by Paul Leaman
+
+ Games supported:
+ * 1943: The Battle of Midway (US)
+ * 1943: Midway Kaisen (Japan)
+ * 1943 Kai: Midway Kaisen (Japan)
+
+***************************************************************************/
+
+/*
+
+ TODO:
+
+ - use priority PROM for drawing sprites
+
+*/
+
+#include "driver.h"
+#include "cpu/z80/z80.h"
+#include "sound/2203intf.h"
+
+extern UINT8 *c1943_scrollx;
+extern UINT8 *c1943_scrolly;
+extern UINT8 *c1943_bgscrollx;
+
+extern WRITE8_HANDLER( c1943_c804_w );
+extern WRITE8_HANDLER( c1943_d806_w );
+extern WRITE8_HANDLER( c1943_videoram_w );
+extern WRITE8_HANDLER( c1943_colorram_w );
+
+extern PALETTE_INIT( 1943 );
+extern VIDEO_START( 1943 );
+extern VIDEO_UPDATE( 1943 );
+
+/* Read/Write Handlers */
+
+static READ8_HANDLER( c1943_protection_r )
+{
+ /*
+ This is a protection check. The game crashes (thru a jump to 0x8000)
+ if a read from this address doesn't return the value it expects.
+ */
+
+ int data = activecpu_get_reg(Z80_BC) >> 8;
+// logerror("protection read, PC: %04x Result:%02x\n",activecpu_get_pc(),data);
+ return data;
+}
+
+/* Memory Maps */
+
+static ADDRESS_MAP_START( c1943_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
+ AM_RANGE(0xc000, 0xc000) AM_READ(input_port_0_r)
+ AM_RANGE(0xc001, 0xc001) AM_READ(input_port_1_r)
+ AM_RANGE(0xc002, 0xc002) AM_READ(input_port_2_r)
+ AM_RANGE(0xc003, 0xc003) AM_READ(input_port_3_r)
+ AM_RANGE(0xc004, 0xc004) AM_READ(input_port_4_r)
+ AM_RANGE(0xc007, 0xc007) AM_READ(c1943_protection_r)
+ AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w)
+ AM_RANGE(0xc804, 0xc804) AM_WRITE(c1943_c804_w) // ROM bank switch, screen flip
+ AM_RANGE(0xc806, 0xc806) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0xc807, 0xc807) AM_WRITENOP // ???
+ AM_RANGE(0xd000, 0xd3ff) AM_RAM AM_WRITE(c1943_videoram_w) AM_BASE(&videoram)
+ AM_RANGE(0xd400, 0xd7ff) AM_RAM AM_WRITE(c1943_colorram_w) AM_BASE(&colorram)
+ AM_RANGE(0xd800, 0xd801) AM_RAM AM_BASE(&c1943_scrollx)
+ AM_RANGE(0xd802, 0xd802) AM_RAM AM_BASE(&c1943_scrolly)
+ AM_RANGE(0xd803, 0xd804) AM_RAM AM_BASE(&c1943_bgscrollx)
+ AM_RANGE(0xd806, 0xd806) AM_WRITE(c1943_d806_w) // sprites, bg1, bg2 enable
+ AM_RANGE(0xd808, 0xd808) AM_WRITENOP // ???
+ AM_RANGE(0xd868, 0xd868) AM_WRITENOP // ???
+ AM_RANGE(0xd888, 0xd888) AM_WRITENOP // ???
+ AM_RANGE(0xd8a8, 0xd8a8) AM_WRITENOP // ???
+ AM_RANGE(0xe000, 0xefff) AM_RAM
+ AM_RANGE(0xf000, 0xffff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0xc000, 0xc7ff) AM_RAM
+ AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r)
+ AM_RANGE(0xe000, 0xe000) AM_WRITE(YM2203_control_port_0_w)
+ AM_RANGE(0xe001, 0xe001) AM_WRITE(YM2203_write_port_0_w)
+ AM_RANGE(0xe002, 0xe002) AM_WRITE(YM2203_control_port_1_w)
+ AM_RANGE(0xe003, 0xe003) AM_WRITE(YM2203_write_port_1_w)
+ADDRESS_MAP_END
+
+/* Input Ports */
+
+static INPUT_PORTS_START( 1943 )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) // VBLANK
+ PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x0f, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:5,6,7,8")
+ PORT_DIPSETTING( 0x0f, "1 (Easy)" )
+ PORT_DIPSETTING( 0x0e, "2" )
+ PORT_DIPSETTING( 0x0d, "3" )
+ PORT_DIPSETTING( 0x0c, "4" )
+ PORT_DIPSETTING( 0x0b, "5" )
+ PORT_DIPSETTING( 0x0a, "6" )
+ PORT_DIPSETTING( 0x09, "7" )
+ PORT_DIPSETTING( 0x08, "8 (Normal)" )
+ PORT_DIPSETTING( 0x07, "9" )
+ PORT_DIPSETTING( 0x06, "10" )
+ PORT_DIPSETTING( 0x05, "11" )
+ PORT_DIPSETTING( 0x04, "12" )
+ PORT_DIPSETTING( 0x03, "13" )
+ PORT_DIPSETTING( 0x02, "14" )
+ PORT_DIPSETTING( 0x01, "15" )
+ PORT_DIPSETTING( 0x00, "16 (Difficult)" )
+ PORT_DIPNAME( 0x10, 0x10, "2 Player Game" ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPSETTING( 0x00, "1 Credit/2 Players" )
+ PORT_DIPSETTING( 0x10, "2 Credits/2 Players" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x00, DEF_STR( On ))
+ PORT_DIPNAME( 0x40, 0x40, "Freeze" ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:1" )
+
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:6,7,8")
+ PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ))
+ PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_5C ) )
+ PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:3,4,5")
+ PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ))
+ PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:2")
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+INPUT_PORTS_END
+
+/* Graphics Layouts */
+
+static const gfx_layout charlayout =
+{
+ 8,8, /* 8*8 characters */
+ 2048, /* 2048 characters */
+ 2, /* 2 bits per pixel */
+ { 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
+ 16*8 /* every char takes 16 consecutive bytes */
+};
+
+static const gfx_layout tilelayout =
+{
+ 32,32, /* 32*32 tiles */
+ 512, /* 512 tiles */
+ 4, /* 4 bits per pixel */
+ { 512*256*8+4, 512*256*8+0, 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
+ 64*8+0, 64*8+1, 64*8+2, 64*8+3, 65*8+0, 65*8+1, 65*8+2, 65*8+3,
+ 128*8+0, 128*8+1, 128*8+2, 128*8+3, 129*8+0, 129*8+1, 129*8+2, 129*8+3,
+ 192*8+0, 192*8+1, 192*8+2, 192*8+3, 193*8+0, 193*8+1, 193*8+2, 193*8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
+ 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16,
+ 16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16,
+ 24*16, 25*16, 26*16, 27*16, 28*16, 29*16, 30*16, 31*16 },
+ 256*8 /* every tile takes 256 consecutive bytes */
+};
+
+static const gfx_layout bgtilelayout =
+{
+ 32,32, /* 32*32 tiles */
+ 128, /* 128 tiles */
+ 4, /* 4 bits per pixel */
+ { 128*256*8+4, 128*256*8+0, 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
+ 64*8+0, 64*8+1, 64*8+2, 64*8+3, 65*8+0, 65*8+1, 65*8+2, 65*8+3,
+ 128*8+0, 128*8+1, 128*8+2, 128*8+3, 129*8+0, 129*8+1, 129*8+2, 129*8+3,
+ 192*8+0, 192*8+1, 192*8+2, 192*8+3, 193*8+0, 193*8+1, 193*8+2, 193*8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
+ 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16,
+ 16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16,
+ 24*16, 25*16, 26*16, 27*16, 28*16, 29*16, 30*16, 31*16 },
+ 256*8 /* every tile takes 256 consecutive bytes */
+};
+
+static const gfx_layout spritelayout =
+{
+ 16,16, /* 16*16 sprites */
+ 2048, /* 2048 sprites */
+ 4, /* 4 bits per pixel */
+ { 2048*64*8+4, 2048*64*8+0, 4, 0 },
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
+ 32*8+0, 32*8+1, 32*8+2, 32*8+3, 33*8+0, 33*8+1, 33*8+2, 33*8+3 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
+ 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
+ 64*8 /* every sprite takes 64 consecutive bytes */
+};
+
+/* Graphics Decode Info */
+
+static GFXDECODE_START( 1943 )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 )
+ GFXDECODE_ENTRY( REGION_GFX2, 0, tilelayout, 32*4, 16 )
+ GFXDECODE_ENTRY( REGION_GFX3, 0, bgtilelayout, 32*4+16*16, 16 )
+ GFXDECODE_ENTRY( REGION_GFX4, 0, spritelayout, 32*4+16*16+16*16, 16 )
+GFXDECODE_END
+
+/* Machine Driver */
+
+static MACHINE_DRIVER_START( 1943 )
+ // basic machine hardware
+ MDRV_CPU_ADD(Z80, 6000000) // 6 MHz
+ MDRV_CPU_PROGRAM_MAP(c1943_map, 0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold, 1)
+
+ MDRV_CPU_ADD(Z80, 3000000) // 3 MHz
+ /* audio CPU */
+ MDRV_CPU_PROGRAM_MAP(sound_map, 0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold, 4)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ // video hardware
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+ MDRV_GFXDECODE(1943)
+ MDRV_PALETTE_LENGTH(256)
+ MDRV_COLORTABLE_LENGTH(32*4+16*16+16*16+16*16)
+
+ MDRV_PALETTE_INIT(1943)
+ MDRV_VIDEO_START(1943)
+ MDRV_VIDEO_UPDATE(1943)
+
+ // sound hardware
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(YM2203, 1500000)
+ MDRV_SOUND_ROUTE(0, "mono", 0.15)
+ MDRV_SOUND_ROUTE(1, "mono", 0.15)
+ MDRV_SOUND_ROUTE(2, "mono", 0.15)
+ MDRV_SOUND_ROUTE(3, "mono", 0.10)
+
+ MDRV_SOUND_ADD(YM2203, 1500000)
+ MDRV_SOUND_ROUTE(0, "mono", 0.15)
+ MDRV_SOUND_ROUTE(1, "mono", 0.15)
+ MDRV_SOUND_ROUTE(2, "mono", 0.15)
+ MDRV_SOUND_ROUTE(3, "mono", 0.10)
+MACHINE_DRIVER_END
+
+/* ROMs */
+
+ROM_START( 1943 )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 64k for code + 128k for the banked ROMs images */
+ ROM_LOAD( "1943.01", 0x00000, 0x08000, CRC(c686cc5c) SHA1(5efb2d9df737564d599f71b71a6438f7624b27c3) )
+ ROM_LOAD( "1943.02", 0x10000, 0x10000, CRC(d8880a41) SHA1(2f9b6a3922efa05eed66c63284bace5f337304ac) )
+ ROM_LOAD( "1943.03", 0x20000, 0x10000, CRC(3f0ee26c) SHA1(8da74fe91a6be3f23fc625f2a433f1f79c424994) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1943.05", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.04", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) ) /* characters */
+
+ ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.15", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) ) /* bg tiles */
+ ROM_LOAD( "1943.16", 0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
+ ROM_LOAD( "1943.17", 0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
+ ROM_LOAD( "1943.18", 0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
+ ROM_LOAD( "1943.19", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
+ ROM_LOAD( "1943.20", 0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
+ ROM_LOAD( "1943.21", 0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
+ ROM_LOAD( "1943.22", 0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.24", 0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) ) /* fg tiles */
+ ROM_LOAD( "1943.25", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
+
+ ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.06", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) ) /* sprites */
+ ROM_LOAD( "1943.07", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
+ ROM_LOAD( "1943.08", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
+ ROM_LOAD( "1943.09", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
+ ROM_LOAD( "1943.10", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
+ ROM_LOAD( "1943.11", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
+ ROM_LOAD( "1943.12", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
+ ROM_LOAD( "1943.13", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
+
+ ROM_REGION( 0x10000, REGION_GFX5, 0 ) /* tilemaps */
+ ROM_LOAD( "1943.14", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) ) /* front background */
+ ROM_LOAD( "1943.23", 0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) ) /* back background */
+
+ ROM_REGION( 0x0c00, REGION_PROMS, 0 )
+ ROM_LOAD( "bmprom.01", 0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) ) /* red component */
+ ROM_LOAD( "bmprom.02", 0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) ) /* green component */
+ ROM_LOAD( "bmprom.03", 0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) ) /* blue component */
+ ROM_LOAD( "bmprom.05", 0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) ) /* char lookup table */
+ ROM_LOAD( "bmprom.10", 0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) ) /* foreground lookup table */
+ ROM_LOAD( "bmprom.09", 0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) ) /* foreground palette bank */
+ ROM_LOAD( "bmprom.12", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) ) /* background lookup table */
+ ROM_LOAD( "bmprom.11", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) ) /* background palette bank */
+ ROM_LOAD( "bmprom.08", 0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) ) /* sprite lookup table */
+ ROM_LOAD( "bmprom.07", 0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) ) /* sprite palette bank */
+ ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */
+ ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
+ROM_END
+
+ROM_START( 1943j )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 64k for code + 128k for the banked ROMs images */
+ ROM_LOAD( "1943jap.001", 0x00000, 0x08000, CRC(f6935937) SHA1(6fe8885d734447c2a667cf80dd545200aad6c767) )
+ ROM_LOAD( "1943jap.002", 0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) )
+ ROM_LOAD( "1943jap.003", 0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1943.05", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.04", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) ) /* characters */
+
+ ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.15", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) ) /* bg tiles */
+ ROM_LOAD( "1943.16", 0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
+ ROM_LOAD( "1943.17", 0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
+ ROM_LOAD( "1943.18", 0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
+ ROM_LOAD( "1943.19", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
+ ROM_LOAD( "1943.20", 0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
+ ROM_LOAD( "1943.21", 0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
+ ROM_LOAD( "1943.22", 0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.24", 0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) ) /* fg tiles */
+ ROM_LOAD( "1943.25", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
+
+ ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943.06", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) ) /* sprites */
+ ROM_LOAD( "1943.07", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
+ ROM_LOAD( "1943.08", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
+ ROM_LOAD( "1943.09", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
+ ROM_LOAD( "1943.10", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
+ ROM_LOAD( "1943.11", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
+ ROM_LOAD( "1943.12", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
+ ROM_LOAD( "1943.13", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
+
+ ROM_REGION( 0x10000, REGION_GFX5, 0 ) /* tilemaps */
+ ROM_LOAD( "1943.14", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) ) /* front background */
+ ROM_LOAD( "1943.23", 0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) ) /* back background */
+
+ ROM_REGION( 0x0c00, REGION_PROMS, 0 )
+ ROM_LOAD( "bmprom.01", 0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) ) /* red component */
+ ROM_LOAD( "bmprom.02", 0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) ) /* green component */
+ ROM_LOAD( "bmprom.03", 0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) ) /* blue component */
+ ROM_LOAD( "bmprom.05", 0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) ) /* char lookup table */
+ ROM_LOAD( "bmprom.10", 0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) ) /* foreground lookup table */
+ ROM_LOAD( "bmprom.09", 0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) ) /* foreground palette bank */
+ ROM_LOAD( "bmprom.12", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) ) /* background lookup table */
+ ROM_LOAD( "bmprom.11", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) ) /* background palette bank */
+ ROM_LOAD( "bmprom.08", 0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) ) /* sprite lookup table */
+ ROM_LOAD( "bmprom.07", 0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) ) /* sprite palette bank */
+ ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */
+ ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
+ROM_END
+
+ROM_START( 1943kai )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 64k for code + 128k for the banked ROMs images */
+ ROM_LOAD( "1943kai.01", 0x00000, 0x08000, CRC(7d2211db) SHA1(b02a0b3daf7e1e224b7cad8fbe93439bd5ec9f0b) )
+ ROM_LOAD( "1943kai.02", 0x10000, 0x10000, CRC(2ebbc8c5) SHA1(3be5ad061411642723e3f2bcb7b3c3caa11ee15f) )
+ ROM_LOAD( "1943kai.03", 0x20000, 0x10000, CRC(475a6ac5) SHA1(fa07a855ba9173b6f81641c806ec7d938b0c282e) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 )
+ ROM_LOAD( "1943kai.05", 0x00000, 0x8000, CRC(25f37957) SHA1(1e50c2a920eb3b5c881843686db857e9fee5ba1d) )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943kai.04", 0x00000, 0x8000, CRC(884a8692) SHA1(027aa8c868dc07ccd9e27705031107881aef4b91) ) /* characters */
+
+ ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943kai.15", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) ) /* bg tiles */
+ ROM_LOAD( "1943kai.16", 0x08000, 0x8000, CRC(9416fe0d) SHA1(92fbc8fffa4497747ab80abe20eef361f6525114) )
+ ROM_LOAD( "1943kai.17", 0x10000, 0x8000, CRC(3d5acab9) SHA1(887d45b648fda952ae2137579f383ab8ede1facd) )
+ ROM_LOAD( "1943kai.18", 0x18000, 0x8000, CRC(7b62da1d) SHA1(1926109a2ab2f550ca87b0d2af73abd2b4a7498d) )
+ ROM_LOAD( "1943kai.19", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
+ ROM_LOAD( "1943kai.20", 0x28000, 0x8000, CRC(b90364c1) SHA1(104bc02237eeead84c7f35462186d0a1af8761bc) )
+ ROM_LOAD( "1943kai.21", 0x30000, 0x8000, CRC(8c7fe74a) SHA1(8846b57d7f47c10ab1f505c359ecf36dcbacb011) )
+ ROM_LOAD( "1943kai.22", 0x38000, 0x8000, CRC(d5ef8a0e) SHA1(2e42b1fbbfe823a33740a56d1334657db56d24d2) )
+
+ ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943kai.24", 0x00000, 0x8000, CRC(bf186ef2) SHA1(cacbb8a61f8a64c3ba4ffde5ca6f07fe120b9a7e) ) /* fg tiles */
+ ROM_LOAD( "1943kai.25", 0x08000, 0x8000, CRC(a755faf1) SHA1(8ee286d6ad7454ae34971f5891ddba4b76c244b0) )
+
+ ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
+ ROM_LOAD( "1943kai.06", 0x00000, 0x8000, CRC(5f7e38b3) SHA1(33f69ebe91a0ee45d9107171fed26da475aaab3a) ) /* sprites */
+ ROM_LOAD( "1943kai.07", 0x08000, 0x8000, CRC(ff3751fd) SHA1(bc942ddd46e7b147115e8ac22d24c2d018a7c373) )
+ ROM_LOAD( "1943kai.08", 0x10000, 0x8000, CRC(159d51bd) SHA1(746aa49b18aff0eaf2fb875c573d455416d45a1d) )
+ ROM_LOAD( "1943kai.09", 0x18000, 0x8000, CRC(8683e3d2) SHA1(591dc4811b226fe11cd5441ecb51aa3e95e68ac5) )
+ ROM_LOAD( "1943kai.10", 0x20000, 0x8000, CRC(1e0d9571) SHA1(44ea9603020e9ab717e3e506f7ecf288506c0502) )
+ ROM_LOAD( "1943kai.11", 0x28000, 0x8000, CRC(f1fc5ee1) SHA1(4ffc8e57734d3b59df695b86070511f1c447b992) )
+ ROM_LOAD( "1943kai.12", 0x30000, 0x8000, CRC(0f50c001) SHA1(0e6367d3f0ba39a00ee0fa6e42ae9d43d12da23d) )
+ ROM_LOAD( "1943kai.13", 0x38000, 0x8000, CRC(fd1acf8e) SHA1(88477ff1e5fbbca251d8cd4f241b42618ba64a80) )
+
+ ROM_REGION( 0x10000, REGION_GFX5, 0 ) /* tilemaps */
+ ROM_LOAD( "1943kai.14", 0x0000, 0x8000, CRC(cf0f5a53) SHA1(dc50f3f937f52910dbd0cedbc232acfed0aa6a42) ) /* front background */
+ ROM_LOAD( "1943kai.23", 0x8000, 0x8000, CRC(17f77ef9) SHA1(8ebb4b440042436ec2db52bad808cced832db77c) ) /* back background */
+
+ ROM_REGION( 0x0c00, REGION_PROMS, 0 )
+ ROM_LOAD( "bmk01.bin", 0x0000, 0x0100, CRC(e001ea33) SHA1(4204bdf87820ac84bab2a1b5571a2ee28c4cdfc5) ) /* red component */
+ ROM_LOAD( "bmk02.bin", 0x0100, 0x0100, CRC(af34d91a) SHA1(94bc6514c980fdd1cb013ff0819d6f32464c581c) ) /* green component */
+ ROM_LOAD( "bmk03.bin", 0x0200, 0x0100, CRC(43e9f6ef) SHA1(e1f58368fe0bd9b53f6c286ce5009b218a5197dc) ) /* blue component */
+ ROM_LOAD( "bmk05.bin", 0x0300, 0x0100, CRC(41878934) SHA1(8f28210ab1d409c89600169a136b74a706001cdf) ) /* char lookup table */
+ ROM_LOAD( "bmk10.bin", 0x0400, 0x0100, CRC(de44b748) SHA1(0694fb19d98ccda728424436fc7350da7b5bd05e) ) /* foreground lookup table */
+ ROM_LOAD( "bmk09.bin", 0x0500, 0x0100, CRC(59ea57c0) SHA1(f961c7e9981cc819c2adf4efdc977841d284a3a2) ) /* foreground palette bank */
+ ROM_LOAD( "bmk12.bin", 0x0600, 0x0100, CRC(8765f8b0) SHA1(f32bab8e3587434b864fe97da9423f2335ccba2e) ) /* background lookup table */
+ ROM_LOAD( "bmk11.bin", 0x0700, 0x0100, CRC(87a8854e) SHA1(0cbc601b736d566d625867d65e0f7b2abb535c65) ) /* background palette bank */
+ ROM_LOAD( "bmk08.bin", 0x0800, 0x0100, CRC(dad17e2d) SHA1(fdb18ddc7574153bb7e27ba08b04b9dc87061c02) ) /* sprite lookup table */
+ ROM_LOAD( "bmk07.bin", 0x0900, 0x0100, CRC(76307f8d) SHA1(8d655e2a5c50541795316d924b2f18b55f4b9571) ) /* sprite palette bank */
+ ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */
+ ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
+ROM_END
+
+/* Game Drivers */
+
+GAME( 1987, 1943, 0, 1943, 1943, 0, ROT270, "Capcom", "1943: The Battle of Midway (US)", 0 )
+GAME( 1987, 1943j, 1943, 1943, 1943, 0, ROT270, "Capcom", "1943: Midway Kaisen (Japan)", 0 )
+GAME( 1987, 1943kai, 0, 1943, 1943, 0, ROT270, "Capcom", "1943 Kai: Midway Kaisen (Japan)", 0 )
diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c
new file mode 100644
index 00000000000..94c10d43d5a
--- /dev/null
+++ b/src/mame/drivers/1945kiii.c
@@ -0,0 +1,309 @@
+/*
+
+1945 K-3 driver
+---------------
+
+1945K-III
+Oriental, 2000
+
+This game is a straight rip-off of Psikyo's Strikers 1945 III.
+
+PCB Layout
+----------
+
+ORIENTAL SOFT INC., -OPCX2-
+|--------------------------------------------|
+| AD-65 SND-1.SU7 M16M-1.U62 |
+| PAL |
+| AD-65 SND-2.SU4 |
+| M16M-2.U63 |
+| |
+| KM681000 |
+|J KM681000 6116 |
+|A |
+|M 62256 |-------| 6116 |
+|M 62256 |SPR800E| |
+|A |OP-CX1 | 6116 6116 |
+| 6116 PRG-1.U51|QFP208 | |
+| |-------| 6116 6116 |
+| 6116 PRG-2.U52 |
+| |-----| |------| |
+| PAL | | |QL2003| M16M-3.U61|
+| PAL |68000| |PLCC84| |
+|DSW1 DSW2 |-----| |------| PAL |
+| 16MHz 27MHz |
+|--------------------------------------------|
+Notes:
+ 68000 clock : 16.000MHz
+ M6295 clocks : 1.000MHz (both), sample rate = 1000000 / 132
+ VSync : 60Hz
+
+
+SAVE STATE (lee@lmservers.com):
+No code changes required to support save state
+1945kiii uses the 68000 and OKIM6295 which both support save state.
+The rationale for saving/not saving are as follows:
+
+static UINT16* k3_spriteram_1; Saved via reference to AM_BASE
+static UINT16* k3_spriteram_2; Saved via reference to AM_BASE
+static UINT16* k3_bgram; Saved via reference to AM_BASE
+static tilemap *k3_bg_tilemap; Saved due to tilemap supporting save
+
+There are no static local variables.
+
+*/
+
+#include "driver.h"
+#include "sound/okim6295.h"
+
+static UINT16* k3_spriteram_1;
+static UINT16* k3_spriteram_2;
+static UINT16* k3_bgram;
+static tilemap *k3_bg_tilemap;
+
+static WRITE16_HANDLER( k3_bgram_w )
+{
+ COMBINE_DATA(&k3_bgram[offset]);
+ tilemap_mark_tile_dirty(k3_bg_tilemap,offset);
+}
+
+static TILE_GET_INFO( get_k3_bg_tile_info )
+{
+ int tileno;
+ tileno = k3_bgram[tile_index];
+ SET_TILE_INFO(1,tileno,0,0);
+}
+
+static VIDEO_START(k3)
+{
+ k3_bg_tilemap = tilemap_create(get_k3_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16, 32,64);
+}
+
+static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
+{
+ const gfx_element *gfx = machine->gfx[0];
+ UINT16 *source = k3_spriteram_1;
+ UINT16 *source2 = k3_spriteram_2;
+ UINT16 *finish = source + 0x1000/2;
+
+ while( source<finish )
+ {
+ int xpos, ypos;
+ int tileno;
+ xpos = (source[0] & 0xff00) >> 8;
+ ypos = (source[0] & 0x00ff) >> 0;
+ tileno = (source2[0] & 0x7ffe) >> 1;
+ xpos |= (source2[0] & 0x0001) << 8;
+ drawgfx(bitmap,gfx, tileno,1,0,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,0);
+ drawgfx(bitmap,gfx, tileno,1,0,0,xpos,ypos-0x100,cliprect,TRANSPARENCY_PEN,0); // wrap
+ drawgfx(bitmap,gfx, tileno,1,0,0,xpos-0x200,ypos,cliprect,TRANSPARENCY_PEN,0); // wrap
+ drawgfx(bitmap,gfx, tileno,1,0,0,xpos-0x200,ypos-0x100,cliprect,TRANSPARENCY_PEN,0); // wrap
+
+ source++;source2++;
+ }
+}
+
+static VIDEO_UPDATE(k3)
+{
+ tilemap_draw(bitmap,cliprect,k3_bg_tilemap,0,0);
+ draw_sprites(machine,bitmap,cliprect);
+ return 0;
+}
+
+
+static WRITE16_HANDLER( k3_scrollx_w )
+{
+ tilemap_set_scrollx( k3_bg_tilemap,0, data);
+}
+
+static WRITE16_HANDLER( k3_scrolly_w )
+{
+ tilemap_set_scrolly( k3_bg_tilemap,0, data);
+}
+
+static WRITE16_HANDLER( k3_soundbanks_w )
+{
+ OKIM6295_set_bank_base(0, (data & 4) ? 0x40000 : 0);
+ OKIM6295_set_bank_base(1, (data & 2) ? 0x40000 : 0);
+}
+
+
+
+static ADDRESS_MAP_START( k3_readmem, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x0fffff) AM_READ(MRA16_ROM)
+ AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM)
+ AM_RANGE(0x200000, 0x200fff) AM_READ(MRA16_RAM)
+ AM_RANGE(0x240000, 0x240fff) AM_READ(MRA16_RAM)
+ AM_RANGE(0x280000, 0x280fff) AM_READ(MRA16_RAM)
+ AM_RANGE(0x2c0000, 0x2c0fff) AM_READ(MRA16_RAM)
+ AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r)
+ AM_RANGE(0x440000, 0x440001) AM_READ(input_port_1_word_r)
+ AM_RANGE(0x480000, 0x480001) AM_READ(input_port_2_word_r)
+ AM_RANGE(0x4c0000, 0x4c0001) AM_READ(OKIM6295_status_1_msb_r)
+ AM_RANGE(0x500000, 0x500001) AM_READ(OKIM6295_status_0_msb_r)
+ AM_RANGE(0x8c0000, 0x8cffff) AM_READ(MRA16_RAM)// not used?
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( k3_writemem, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x0009CE, 0x0009CF) AM_WRITE(MWA16_NOP) // bug in code? (clean up log)
+ AM_RANGE(0x0009D2, 0x0009D3) AM_WRITE(MWA16_NOP) // bug in code? (clean up log)
+
+ AM_RANGE(0x000000, 0x0fffff) AM_WRITE(MWA16_ROM) // ROM
+ AM_RANGE(0x100000, 0x10ffff) AM_WRITE(MWA16_RAM) // Main Ram
+ AM_RANGE(0x200000, 0x200fff) AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) // palette
+ AM_RANGE(0x240000, 0x240fff) AM_WRITE(MWA16_RAM) AM_BASE(&k3_spriteram_1)
+ AM_RANGE(0x280000, 0x280fff) AM_WRITE(MWA16_RAM) AM_BASE(&k3_spriteram_2)
+ AM_RANGE(0x2c0000, 0x2c0fff) AM_WRITE(k3_bgram_w) AM_BASE(&k3_bgram)
+ AM_RANGE(0x340000, 0x340001) AM_WRITE(k3_scrollx_w)
+ AM_RANGE(0x380000, 0x380001) AM_WRITE(k3_scrolly_w)
+ AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w)
+ AM_RANGE(0x4c0000, 0x4c0001) AM_WRITE(OKIM6295_data_1_msb_w)
+ AM_RANGE(0x500000, 0x500001) AM_WRITE(OKIM6295_data_0_msb_w)
+ AM_RANGE(0x8c0000, 0x8cffff) AM_WRITE(MWA16_RAM) // not used?
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( k3 )
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Are these used at all? */
+
+
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3")
+ PORT_DIPSETTING( 0x0002, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x0003, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5")
+ PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x0008, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x0010, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x0018, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
+ PORT_DIPSETTING( 0x0040, "2" )
+ PORT_DIPSETTING( 0x0060, "3" )
+ PORT_DIPSETTING( 0x0020, "4" )
+ PORT_DIPSETTING( 0x0000, "5" )
+ PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" )
+ PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:2")
+ PORT_DIPSETTING( 0x0000, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x0200, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7")
+ PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
+static const gfx_layout k3_layout =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 8,
+ { 0,1,2,3,4,5,6,7 },
+ { 0,8,16,24,32,40,48,56, 64, 72, 80, 88, 96, 104, 112, 120 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128,
+ 8*128, 9*128,10*128,11*128,12*128,13*128,14*128,15*128 },
+ 16*128
+};
+
+static GFXDECODE_START( 1945kiii )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, k3_layout, 0x0, 2 ) /* bg tiles */
+ GFXDECODE_ENTRY( REGION_GFX2, 0, k3_layout, 0x0, 2 ) /* bg tiles */
+GFXDECODE_END
+
+
+static MACHINE_DRIVER_START( k3 )
+ MDRV_CPU_ADD(M68000, 16000000)
+ MDRV_CPU_PROGRAM_MAP(k3_readmem,k3_writemem)
+ MDRV_CPU_VBLANK_INT(irq4_line_hold,1)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ MDRV_GFXDECODE(1945kiii)
+
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(64*8, 64*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
+ MDRV_PALETTE_LENGTH(0x800)
+
+ MDRV_VIDEO_START(k3)
+ MDRV_VIDEO_UPDATE(k3)
+
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(OKIM6295, 1000000)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_2_pin7high)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MDRV_SOUND_ADD(OKIM6295, 1000000)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_DRIVER_END
+
+
+
+ROM_START( 1945kiii )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 Code */
+ ROM_LOAD16_BYTE( "prg-1.u51", 0x00001, 0x80000, CRC(6b345f27) SHA1(60867fa0e2ea7ebdd4b8046315ee0c83e5cf0d74) )
+ ROM_LOAD16_BYTE( "prg-2.u52", 0x00000, 0x80000, CRC(ce09b98c) SHA1(a06bb712b9cf2249cc535de4055b14a21c68e0c5) )
+
+ ROM_REGION( 0x080000, REGION_SOUND1, 0 ) /* Samples */
+ ROM_LOAD( "snd-1.su7", 0x00000, 0x80000, CRC(bbb7f0ff) SHA1(458cf3a0c2d42110bc2427db675226c6b8d30999) )
+
+ ROM_REGION( 0x080000, REGION_SOUND2, 0 ) /* Samples */
+ ROM_LOAD( "snd-2.su4", 0x00000, 0x80000, CRC(47e3952e) SHA1(d56524621a3f11981e4434e02f5fdb7e89fff0b4) )
+
+ ROM_REGION( 0x400000, REGION_GFX1, 0 ) // sprites
+ ROM_LOAD32_WORD( "m16m-1.u62", 0x000000, 0x200000, CRC(0b9a6474) SHA1(6110ecb17d0fef25935986af9a251fc6e88e3993) )
+ ROM_LOAD32_WORD( "m16m-2.u63", 0x000002, 0x200000, CRC(368a8c2e) SHA1(4b1f360c4a3a86d922035774b2c712be810ec548) )
+
+ ROM_REGION( 0x200000, REGION_GFX2, 0 ) // bg tiles
+ ROM_LOAD( "m16m-3.u61", 0x00000, 0x200000, CRC(32fc80dd) SHA1(bee32493a250e9f21997114bba26b9535b1b636c) )
+ROM_END
+
+GAME( 2000, 1945kiii, 0, k3, k3, 0, ROT270, "Oriental", "1945k III", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c
new file mode 100644
index 00000000000..9a2fb76115c
--- /dev/null
+++ b/src/mame/drivers/20pacgal.c
@@ -0,0 +1,289 @@
+/***************************************************************************
+
+Ms.Pac-Man/Galaga - 20 Year Reunion
+
+driver by Nicola Salmoria
+
+Notes:
+- There are four start buttons: the first two are for Ms. Pac-Man, the other two
+ for Galaga.
+
+- To play Pac-Man instead of Ms. Pac-Man, insert coins then enter the following
+ sequence: U U U D D D L R L R L. A sound will play and the ghost will change
+ from red to pink.
+
+- Writes to the Z180 ASCI port:
+ MS PAC-MAN/GALAGA
+ arcade video system
+ version 1.01
+ (c) 2000 Cosmodog, Ltd.
+ >
+ and it listens for incoming characters.
+
+
+TODO:
+- Starfield.
+
+- Convert to tilemaps & optimize video rendering, I was just too lazy to do it for now.
+
+- Check the ASCI interface, there probably is fully working debug code.
+
+- The timed interrupt is a kludge; it is supposed to be generated internally by
+ the Z180, but the cpu core doesn't support that yet.
+
+- Correct CPU speed... Zilog says Z180 comes in 6, 8, 10, 20 & 33MHz.
+ 20MHz is used as it "seems" right based on the music in Galaga
+
+***************************************************************************/
+
+#include "driver.h"
+#include "machine/eeprom.h"
+#include "cpu/z180/z180.h"
+#include "pacman.h"
+#include "sound/namco.h"
+#include "sound/dac.h"
+
+extern UINT8 *pacgal_charram,*pacgal_sprram;
+extern UINT8 *pacgal_videoram,*pacgal_videoram2;
+PALETTE_INIT( 20pacgal );
+VIDEO_START( 20pacgal );
+WRITE8_HANDLER( pacgal_lookup_w );
+WRITE8_HANDLER( pacgal_active_game_w );
+WRITE8_HANDLER( pacgal_videoram2_w );
+WRITE8_HANDLER( pacgal_charram_w );
+WRITE8_HANDLER( pacgal_sprram_w );
+VIDEO_UPDATE( 20pacgal );
+
+
+
+static struct EEPROM_interface eeprom_interface =
+{
+ 7, /* address bits */
+ 8, /* data bits */
+ "*110", /* read command */
+ "*101", /* write command */
+ 0, /* erase command */
+ "*10000xxxxx", /* lock command */
+ "*10011xxxxx", /* unlock command */
+};
+
+static NVRAM_HANDLER( eeprom )
+{
+ if (read_or_write)
+ EEPROM_save(file);
+ else
+ {
+ EEPROM_init(&eeprom_interface);
+
+ if (file)
+ EEPROM_load(file);
+ }
+}
+
+static READ8_HANDLER( eeprom_r )
+{
+ int res;
+
+ /* bit 7 is EEPROM data */
+ res = EEPROM_read_bit() << 7;
+ return res;
+}
+
+static WRITE8_HANDLER( eeprom_w )
+{
+ /* bit 7 is data */
+ /* bit 6 is clock (active high) */
+ /* bit 5 is cs (active low) */
+ EEPROM_write_bit(data & 0x80);
+ EEPROM_set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
+ EEPROM_set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
+}
+
+static WRITE8_HANDLER( irqack_w )
+{
+ int bit = data & 1;
+ cpu_interrupt_enable(0,bit);
+ if (!bit)
+ cpunum_set_input_line( 0, 0, CLEAR_LINE );
+}
+
+static WRITE8_HANDLER( flipscreen_w )
+{
+ flip_screen_set(data & 1);
+}
+
+static WRITE8_HANDLER( pacgal_dac_w )
+{
+ DAC_signed_data_w(0, data);
+}
+
+static WRITE8_HANDLER( coin_w )
+{
+ coin_counter_w(0,data & 1);
+}
+
+
+
+static ADDRESS_MAP_START( 20pacgal_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x00000, 0x03fff) AM_ROM
+ AM_RANGE(0x08000, 0x09fff) AM_ROM
+ AM_RANGE(0x0a000, 0x0ffff) AM_MIRROR(0x40000) AM_ROM
+ AM_RANGE(0x10000, 0x3ffff) AM_ROM
+ AM_RANGE(0x44000, 0x447ff) AM_RAM AM_BASE(&pacgal_videoram) // mspacman tilemap
+ AM_RANGE(0x45040, 0x4505f) AM_WRITE(pacman_sound_w) AM_BASE(&namco_soundregs)
+ AM_RANGE(0x44800, 0x45eff) AM_RAM
+ AM_RANGE(0x45f00, 0x45fff) AM_WRITE(_20pacgal_wavedata_w) AM_BASE(&namco_wavedata) // sound wave data
+ AM_RANGE(0x46000, 0x46fff) AM_WRITE(pacgal_charram_w) AM_BASE(&pacgal_charram) // char gfx data
+ AM_RANGE(0x47100, 0x47100) AM_RAM // leftover from original Galaga code
+ AM_RANGE(0x48000, 0x49fff) AM_ROM AM_BASE(&pacgal_videoram2)
+ AM_RANGE(0x48000, 0x49fff) AM_WRITE(pacgal_videoram2_w) // ROM or galaga tilemap (banked)
+ AM_RANGE(0x4c000, 0x4dfff) AM_WRITE(pacgal_sprram_w) AM_BASE(&pacgal_sprram) // sprite gfx data
+ AM_RANGE(0x4e000, 0x4e17f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) // sprite registers
+ AM_RANGE(0x4ff00, 0x4ffff) AM_WRITE(pacgal_lookup_w) // sprite color lookup table
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( 20pacgal_port, ADDRESS_SPACE_IO, 8 )
+ ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
+ AM_RANGE(0x00, 0x3f) AM_NOP /* Z180 internal registers */
+ AM_RANGE(0x40, 0x7f) AM_NOP /* Z180 internal registers */
+ AM_RANGE(0x80, 0x80) AM_READ(input_port_0_r)
+ AM_RANGE(0x81, 0x81) AM_READ(input_port_1_r)
+ AM_RANGE(0x82, 0x82) AM_READ(input_port_2_r)
+ AM_RANGE(0x80, 0x80) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x81, 0x81) AM_WRITE(MWA8_NOP) // ??? pulsed by the timer irq
+ AM_RANGE(0x82, 0x82) AM_WRITE(irqack_w)
+ AM_RANGE(0x85, 0x86) AM_WRITE(MWA8_NOP) // stars: rng seed (lo/hi)
+ AM_RANGE(0x87, 0x87) AM_READWRITE(eeprom_r, eeprom_w)
+ AM_RANGE(0x88, 0x88) AM_WRITE(pacgal_active_game_w)
+ AM_RANGE(0x89, 0x89) AM_WRITE(pacgal_dac_w)
+ AM_RANGE(0x8a, 0x8a) AM_WRITE(MWA8_NOP) // stars: bits 3-4 = active set; bit 5 = enable
+ AM_RANGE(0x8b, 0x8b) AM_WRITE(flipscreen_w)
+ AM_RANGE(0x8f, 0x8f) AM_WRITE(coin_w) // coin counter
+ADDRESS_MAP_END
+
+
+
+static INPUT_PORTS_START( 20pacgal )
+ PORT_START
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
+
+ PORT_START
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
+
+ PORT_START
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
+INPUT_PORTS_END
+
+
+
+static const gfx_layout charlayout =
+{
+ 8,8,
+ 256,
+ 2,
+ { 0, 4 },
+ { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 16*8
+};
+
+
+static const gfx_layout spritelayout =
+{
+ 16,16,
+ 128,
+ 2,
+ { 0, 1 },
+ { 0*2, 1*2, 2*2, 3*2, 4*2, 5*2, 6*2, 7*2, 8*2, 9*2, 10*2, 11*2, 12*2, 13*2, 14*2, 15*2 },
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
+ 16*32
+};
+
+static GFXDECODE_START( 20pacgal )
+ /* the game dynamically modifies these */
+ GFXDECODE_ENTRY( 0, 0, charlayout, 0, 64 )
+ GFXDECODE_ENTRY( 0, 0, spritelayout, 0, 64 )
+GFXDECODE_END
+
+static struct namco_interface namco_interface =
+{
+ 3, /* number of voices */
+ -1, /* memory region */
+};
+
+static MACHINE_DRIVER_START( 20pacgal )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z180,20000000) /* 20MHz ??? Needs to be verified! */
+ MDRV_CPU_PROGRAM_MAP(20pacgal_map,0)
+ MDRV_CPU_IO_MAP(20pacgal_port,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_assert,1)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ MDRV_NVRAM_HANDLER(eeprom)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(36*8, 28*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
+ MDRV_GFXDECODE(20pacgal)
+ MDRV_PALETTE_LENGTH(0x1000)
+ MDRV_COLORTABLE_LENGTH(0x100)
+ MDRV_PALETTE_INIT(20pacgal)
+ MDRV_VIDEO_START(20pacgal)
+ MDRV_VIDEO_UPDATE(20pacgal)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(NAMCO, 18432000/6/32)
+ MDRV_SOUND_CONFIG(namco_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MDRV_SOUND_ADD(DAC, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_DRIVER_END
+
+
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( 20pacgal )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 1024k for Z180 address space */
+ ROM_LOAD( "20th_101.u13", 0x00000, 0x40000, CRC(77159582) SHA1(c05e005a941cbdc806dcd76b315069362c792a72) )
+
+ ROM_REGION( 0x8000, REGION_PROMS, 0 ) /* palette */
+ ROM_LOAD( "20th_101.u14", 0x0000, 0x8000, CRC(c19d9ad0) SHA1(002581fbc2c32cdf7cfb0b0f64061591a462ec14) )
+ROM_END
+
+
+
+GAME( 2000, 20pacgal, 0, 20pacgal, 20pacgal, 0, ROT90, "Namco", "Ms. Pac-Man/Galaga - 20 Year Reunion", GAME_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
new file mode 100644
index 00000000000..8c40edf5574
--- /dev/null
+++ b/src/mame/drivers/2mindril.c
@@ -0,0 +1,258 @@
+/*
+ Two Minute Drill - Taito 1993
+ -----------------------------
+ Half Video, Half Mechanical?
+(video hw + motion/acceleration sensor ?)
+
+ preliminary driver by
+ David Haywood
+ Tomasz Slanina
+
+TODO:
+ - simulate the sensors (and remove rom hack)
+ - controls/dips
+ - find video control regs (layer enable, scroll)
+
+BG scroll:
+BG maps are 2048x256 (128x16 16x16 tiles).
+There's some kind of double buffering - odd/even screens are at
+x offsets 0 and 512 (it's visible during distance count after throw (odd/even numbers))
+
+looks like regs @460000 are used, pairs at N, and N+8, so
+460000, 460008
+460002, 46000a
+460004, 46000c
+460006, 46000e
+
+*/
+
+/*
+
+TWO MINUTE DRILL - Taito 1993?
+
+No idea what this game is... I do not have the pinout
+See pic for more details
+
+ Brief hardware overview:
+ ------------------------
+
+ Main processor - 68000 16Mhz
+
+ Sound - Yamaha YM2610B
+
+ Taito custom ICs - TC0400YSC
+ - TC0260DAR
+ - TC0630FDP
+ - TC0510NI0
+
+DAC -26.6860Mhz
+ -32.0000Mhz
+
+*/
+
+#include "driver.h"
+#include "sound/2610intf.h"
+
+static UINT16 *unkram;
+
+static UINT16 *map1ram;
+static UINT16 *map2ram;
+static UINT16 *map3ram;
+static UINT16 *map4ram;
+static UINT16 *charram;
+static UINT16 *textram;
+
+#define DRAW_MAP(map,num) { int x,y; \
+ for(y=0;y<16;y++) \
+ for(x=0;x<128;x++) \
+ { \
+ UINT16 data0=map[y*128+x*2]; \
+ UINT16 data1=map[y*128+x*2+1]; \
+ drawgfx(bitmap,machine->gfx[0], data1, \
+ data0&0xff, \
+ data0&0x4000, data0&0x8000, \
+ x*16-512/*+(((INT16)(unkram[0x60000/2+num]))/32)*/, y*16/*+(((INT16)(unkram[0x60008/2+num]))/32)*/, \
+ cliprect,TRANSPARENCY_PEN,0); \
+ } \
+ }
+
+static VIDEO_UPDATE( drill )
+{
+ int i;
+ fillbitmap(bitmap,0,NULL);
+
+ for (i=0; i<256; i++)
+ {
+ decodechar(machine->gfx[1],i,(UINT8*)&charram[0],machine->drv->gfxdecodeinfo[1].gfxlayout);
+ }
+
+ DRAW_MAP(map1ram,0)
+ DRAW_MAP(map2ram,1)
+ DRAW_MAP(map3ram,2)
+ DRAW_MAP(map4ram,3)
+
+
+ {
+ int x,y;
+ for(y=0;y<64;y++)
+ for(x=0;x<64;x++)
+ {
+ drawgfx( bitmap,
+ machine->gfx[1],
+ textram[y*64+x]&0xff, //1ff ??
+ ((textram[y*64+x]>>9)&0xf),
+ 0, 0,
+ x*8,y*8,
+ cliprect,
+ TRANSPARENCY_PEN,0);
+ }
+ }
+ //printf("%.4X %.4X %.4X %.4X %.4X %.4X\n", unkram[0x60000/2],unkram[0x60000/2+1],unkram[0x60000/2+2],unkram[0x60000/2+3],unkram[0x60000/2+4],unkram[0x60000/2+5]);
+ return 0;
+}
+
+static VIDEO_START( drill )
+{
+ machine->gfx[0]->color_granularity=16;
+}
+
+static READ16_HANDLER( drill_unk_r )
+{
+ return 0xffff;
+}
+
+static ADDRESS_MAP_START( drill_map, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x07ffff) AM_ROM
+ AM_RANGE(0x200000, 0x20ffff) AM_RAM
+ AM_RANGE(0x300000, 0x3000ff) AM_RAM
+ AM_RANGE(0x410000, 0x411fff) AM_RAM AM_BASE(&map1ram)
+ AM_RANGE(0x412000, 0x413fff) AM_RAM AM_BASE(&map2ram)
+ AM_RANGE(0x414000, 0x415fff) AM_RAM AM_BASE(&map3ram)
+ AM_RANGE(0x416000, 0x417fff) AM_RAM AM_BASE(&map4ram)
+ AM_RANGE(0x41c000, 0x41dfff) AM_RAM AM_BASE(&textram)
+ AM_RANGE(0x41e000, 0x41ffff) AM_RAM AM_BASE(&charram)
+ AM_RANGE(0x400000, 0x4fffff) AM_RAM AM_BASE(&unkram)// video stuff, 460000 - video regs ?
+ AM_RANGE(0x500000, 0x501fff) AM_RAM AM_WRITE(paletteram16_RRRRGGGGBBBBRGBx_word_w) AM_BASE(&paletteram16)
+ AM_RANGE(0x502000, 0x503fff) AM_RAM
+ AM_RANGE(0x700000, 0x70000f) AM_READ(drill_unk_r) AM_WRITE(MWA16_NOP) // i/o
+ AM_RANGE(0x600000, 0x600001) AM_READ(YM2610_status_port_0_A_lsb_r) AM_WRITE(YM2610_control_port_0_A_lsb_w)
+ AM_RANGE(0x600002, 0x600003) AM_READ(YM2610_read_port_0_lsb_r) AM_WRITE(YM2610_data_port_0_A_lsb_w)
+ AM_RANGE(0x600004, 0x600005) AM_READ(YM2610_status_port_0_B_lsb_r) AM_WRITE(YM2610_control_port_0_B_lsb_w)
+ AM_RANGE(0x600006, 0x600007) AM_WRITE(YM2610_data_port_0_B_lsb_w)
+ AM_RANGE(0x60000c, 0x60000d) AM_READ(MRA16_NOP) AM_WRITE(MWA16_NOP)
+ AM_RANGE(0x60000e, 0x60000f) AM_READ(MRA16_NOP) AM_WRITE(MWA16_NOP)
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( drill )
+INPUT_PORTS_END
+
+static const gfx_layout drill_layout =
+{
+ 16,16,
+ RGN_FRAC(1,2),
+ 6,
+ { RGN_FRAC(1,2)+1, RGN_FRAC(1,2)+0 ,0,1,2,3 },
+ { 20, 16, 28, 24, 4, 0, 12, 8, 52, 48, 60, 56, 36, 32, 44, 40 },
+ { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
+ 16*64
+};
+
+static const gfx_layout vramlayout=
+{
+ 8,8,
+ 256,
+ 4,
+ { 0, 1, 2, 3 },
+ {20,16,28,24,4,0,12,8},
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
+ 32*8
+};
+
+static GFXDECODE_START( 2mindril )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, drill_layout, 0, 256 )
+ GFXDECODE_ENTRY( 0, 0, vramlayout, 0, 256 )
+GFXDECODE_END
+
+
+static INTERRUPT_GEN( drill_interrupt )
+{
+ cpunum_set_input_line(0, 4, HOLD_LINE);
+}
+
+static void irqhandler(int irq)
+{
+ cpunum_set_input_line(0,5,irq ? ASSERT_LINE : CLEAR_LINE);
+}
+
+static struct YM2610interface ym2610_interface =
+{
+ irqhandler,
+ 0,
+ REGION_SOUND1
+};
+
+static MACHINE_DRIVER_START( drill )
+ MDRV_CPU_ADD_TAG("main", M68000, 16000000 )
+ MDRV_CPU_PROGRAM_MAP(drill_map,0)
+ MDRV_CPU_VBLANK_INT(drill_interrupt,1)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+ MDRV_GFXDECODE(2mindril)
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(128*16, 64*8)
+ MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239-16)
+ MDRV_PALETTE_LENGTH(0x1000)
+
+ MDRV_VIDEO_START(drill)
+ MDRV_VIDEO_UPDATE(drill)
+
+ MDRV_SPEAKER_STANDARD_STEREO("left", "right")
+
+ MDRV_SOUND_ADD(YM2610, 16000000/2)
+ MDRV_SOUND_CONFIG(ym2610_interface)
+ MDRV_SOUND_ROUTE(0, "left", 0.25)
+ MDRV_SOUND_ROUTE(0, "right", 0.25)
+ MDRV_SOUND_ROUTE(1, "left", 1.0)
+ MDRV_SOUND_ROUTE(2, "right", 1.0)
+MACHINE_DRIVER_END
+
+
+ROM_START( 2mindril )
+ ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 68000 Code */
+ ROM_LOAD16_BYTE( "d58-38.ic11", 0x00000, 0x40000, CRC(c58e8e4f) SHA1(648db679c3bfb5de1cd6c1b1217773a2fe56f11b) )
+ ROM_LOAD16_BYTE( "d58-37.ic9", 0x00001, 0x40000, CRC(19e5cc3c) SHA1(04ac0eef893c579fe90d91d7fd55c5741a2b7460) )
+
+ ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* Samples */
+ ROM_LOAD( "d58-11.ic31", 0x000000, 0x200000, CRC(dc26d58d) SHA1(cffb18667da18f5367b02af85a2f7674dd61ae97) )
+
+ ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_ERASE00 )
+ ROM_LOAD32_WORD( "d58-09.ic28", 0x000000, 0x200000, CRC(d8f6a86a) SHA1(d6b2ec309e21064574ee63e025ae4716b1982a98) )
+ ROM_LOAD32_WORD( "d58-08.ic27", 0x000002, 0x200000, CRC(9f5a3f52) SHA1(7b696bd823819965b974c853cebc1660750db61e) )
+
+ ROM_REGION( 0x400000, REGION_GFX2, 0 )
+ ROM_LOAD32_WORD( "d58-10.ic29", 0x000000, 0x200000, CRC(74c87e08) SHA1(f39b3a64f8338ccf5ca6eb76cee92a10fe0aad8f) )
+ROM_END
+
+static DRIVER_INIT( drill )
+{
+ // rearrange gfx roms to something we can decode, two of the roms form 4bpp of the graphics, the third forms another 2bpp but is in a different format
+ UINT32 *src = (UINT32*)memory_region ( REGION_GFX2 );
+ UINT32 *dst = (UINT32*)memory_region ( REGION_GFX1 );// + 0x400000;
+ int i;
+
+ for (i=0; i< 0x400000/4; i++)
+ {
+ UINT32 dat1 = src[i];
+ dat1 = BITSWAP32(dat1, 3, 11, 19, 27, 2, 10, 18, 26, 1, 9, 17, 25, 0, 8, 16, 24, 7, 15, 23, 31, 6, 14, 22, 30, 5, 13, 21, 29, 4, 12, 20, 28 );
+ dst[(0x400000/4)+i] = dat1;
+ }
+
+ //enable some kind of debug mode (ignore errors)
+ memory_region( REGION_CPU1)[0x7fffb]=0;
+ memory_region( REGION_CPU1)[0x7fffc]=0;
+ memory_region( REGION_CPU1)[0x7fffd]=0;
+ memory_region( REGION_CPU1)[0x7fffe]=0;
+}
+
+GAME( 1993, 2mindril, 0, drill, drill, drill, ROT0, "Taito", "Two Minute Drill", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
new file mode 100644
index 00000000000..78ed217e408
--- /dev/null
+++ b/src/mame/drivers/39in1.c
@@ -0,0 +1,58 @@
+/**************************************************************************
+ *
+ * 39in1.c - bootleg MAME-based "39-in-1" arcade PCB
+ * Skeleton by R. Belmont, thanks to the Guru
+ *
+ * The program ROM appears to be encrypted, please help if you can!
+ *
+ * CPU: Intel Xscale PXA255 series @ 200 MHz, configured little-endian
+ * Xscale PXA consists of:
+ * ARMv5 instruction set without the FPU
+ * ARM DSP extensions
+ * VGA-ish frame buffer with some 2D acceleration features
+ * AC97 stereo audio CODEC
+ *
+ * PCB also contains a custom ASIC, probably used for the decryption
+ *
+ **************************************************************************/
+
+#include "driver.h"
+#include "video/generic.h"
+#include "cpu/arm7/arm7.h"
+
+static ADDRESS_MAP_START( 39in1_map, ADDRESS_SPACE_PROGRAM, 32 )
+ AM_RANGE(0x00000000, 0x0007ffff) AM_ROM
+ AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION(REGION_CPU1, 0) // mirror to prevent crashing
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( 39in1 )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( 39in1 )
+ MDRV_CPU_ADD(ARM7, 200000000) // actually Xscale PXA255, but ARM7 is a compatible subset
+ MDRV_CPU_PROGRAM_MAP(39in1_map,0)
+
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_PALETTE_LENGTH(32768)
+
+ MDRV_SCREEN_ADD("main", 0) // htot hst vwid vtot vst vis
+ MDRV_SCREEN_RAW_PARAMS(16777216/4, 308, 0, 240, 228, 0, 160) // completely bogus for this h/w
+
+ MDRV_VIDEO_START(generic_bitmapped)
+ MDRV_VIDEO_UPDATE(generic_bitmapped)
+
+ MDRV_SPEAKER_STANDARD_STEREO("left", "right")
+MACHINE_DRIVER_END
+
+ROM_START( 39in1 )
+ // main program, appears to be encrypted
+ ROM_REGION( 0x80000, REGION_CPU1, 0 )
+ ROM_LOAD( "27c4096_plz-v001_ver.300.bin", 0x000000, 0x080000, CRC(9149dbc4) SHA1(40efe1f654f11474f75ae7fee1613f435dbede38) )
+
+ // data ROM - contains a filesystem with ROMs, fonts, graphics, etc. in an unknown compressed format
+ ROM_REGION32_LE( 0x200000, REGION_USER1, 0 )
+ ROM_LOAD( "16mflash.bin", 0x000000, 0x200000, CRC(a089f0f8) SHA1(e975eadd9176a8b9e416229589dfe3158cba22cb) )
+ROM_END
+
+GAME(2004, 39in1, 0, 39in1, 39in1, 0, ROT0, "????", "39 in 1 MAME bootleg", GAME_NOT_WORKING|GAME_NO_SOUND)
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
new file mode 100644
index 00000000000..85875dbbfac
--- /dev/null
+++ b/src/mame/drivers/40love.c
@@ -0,0 +1,1307 @@
+/****************************************************************************
+
+ Forty-Love (c) Taito 1984
+
+ driver by Jaroslaw Burczynski
+
+****************************************************************************/
+
+/*
+ TO DO:
+ - sprites graphics decoding could be changed to only use
+ color codes 8-15 (now it decodes all 64 colors). Perhaps the same
+ applies to character graphics (colors 0-7 only),
+
+ - sprite memory needs to be buffered ?
+
+ - controls may be wrong (BUTTON 3 - not used ?)
+
+ - palette has 1024 colors, but only first 256 are used at the moment
+
+ - pixel layer needs priority ?
+*/
+
+/*
+Game : 40-0 (Forty-Love Tennis game)
+Manufacturer : Taito
+Game number : A30
+Vintage : 1984
+Game serial/model number : M4300006B ?
+
+I dont have the wiring harness for this board, so dont know if it works.
+One GFX ROM is bad though.
+See A30-26.u23\A30-26.txt for details about the bad ROM.
+
+This is a four board system - Main, Video, ROM, and Sound boards.
+
+Details:
+ Main board: J1100004A / K1100010A <--label with K1100026A covers these
+ 1 x NEC D780C-1 (Z80) CPU
+ 1 x Motorola M68705P5S MCU
+ 1 x Mitsubishi M5517P SRAM chip 1 x (8bit x 2048) used
+ 1 x Fujitsu MB14241 ??? chip ( DAC ????? )
+ 4 x Fujitsu MB81416-10 DRAM chips 4 x (4bit x 16384) 1/2 used
+ 1 x TD62003P (lamps/LEDs driver)
+ 1 x 8MHz xtal
+ 3 x 8way DSW
+
+ Sound board: J1100005A / K1100011A
+ 1 x NEC D780C-1 (Z80) CPU
+ 1 x Mitsubishi M5517P SRAM chip 1 x (8bit x 2048) used
+ 1 x Yamaha YM2149
+ 1 x OKI M5232
+ 1 x Fujitsu MB3731 Audio amp
+ 1 x 8MHz xtal
+
+ Video board: J1100008A / K1100025A
+ 4 x AMD AM93422 RAM chips 4 x (4bit x 256) 1/2 used
+ 2 x Mitsubishi M5517P SRAM chips 2 x (8bit x 2048) 1/2 used
+ 6 x Mitsubishi M53357P (=LS157)
+ 1 x 18.432MHz xtal
+
+ ROM board: J9100005A / K9100008A
+
+
+ROMS: Programmer Device Legend:
+ Checksum ___
+A30-08.u08 AD5C 2764 \
+A30-09.u09 C1E4 2764 \
+A30-10.u10 C6B1 2764 \ Sound Board ROMs
+A30-11.u37 ACD8 2764 /
+A30-12.u38 B7C4 2764 /
+A30-13.u39 6B43 2764 ___/
+A30-14.u41 M68705P5S ___> Main board MCU
+A30-15.u03 2F6E 6353 \
+A30-16.u01 2E97 6353 \ Video board BPROMs
+A30-17.u02 2CD3 6353 / All read as 82S137
+A30-18.u13 15E5 7643 ___/
+A30-19.ic1 C88C 2764 \
+A30-20.ic2 7B40 2764 \ ROM board ROMs.
+A30-21.ic3 E2B4 2764 \ These are Program ROMs for
+A30-22.ic4 8937 2764 / the main board
+A30-23.ic5 A6F6 2764 /
+A30-24.ic6 75DC 2764 ___/
+A30-25.u22 1903 2764 \
+A30-26.u23 ?? 2764 BAD ! \
+A30-27.u24 005B 2764 \
+A30-28.u25 279F 2764 \ Video board GFX ROMs
+A30-29.u62 BAA4 2764 /
+A30-30.u63 0BB6 2764 /
+A30-31.u64 461C 2764 /
+A30-32.u65 E764 2764 ___/
+
+Notes,
+Programmer used: HiLo All-08A programmer.
+
+Q and P connectors, provide connection between the main and video board,
+via ribbon cables.
+The following are board layouts, and component locations.
+
+ Main-Board J1100004A / K1100010A <--label with K1100026A covers these
+ +--------------------------------------------------+
+ | DSW1 DSW2 DSW3 |
+ | 5517 Z80 |
+ = |
+ = ROMskt |
+ P ==
+ = ROMskt 68705P5 (A30-14) ==
+ = == Wiring harness
+ | ROMskt MB14241 TD62003 == connector
+ | ==
+ = ==
+ = ==
+ Q 81416 Ribbon = |
+ = 81416 cable = === Wiring harness
+ = 81416 to sound S === connector
+ | 81416 board --> = ===
+ | 8MHz = |
+ +--------------------------------------------------+
+
+ ROM board J9100005A / K9100008A
+
+ +------------------------+
+ | |
+ | ROMskt A30-23 A30-24 |
+ | |
+ | ROMskt A30-21 A30-22 |
+ | |
+ | ROMskt A30-19 A30-20 |
+ +------------------------+
+
+
+ Video Board J1100008A / K1100025A
+ +--------------------------------------------------+
+ | A30-32 A30-15 |
+ | A30-28 A30-18 A30-17 |
+ = A30-31 A30-16 |
+ = A30-27 |
+ Q A30-30 |
+ = A30-26 ==
+ =18.432MHz A30-29 ==
+ | 53357 53357 A30-25 == Wiring harness
+ | == connector
+ = 53357 5517 ==
+ = 53357 53357 ==
+ P 53357 93422 |
+ = 93422 |
+ = 93422 |
+ | 5517 93422 |
+ | |
+ +--------------------------------------------------+
+
+ Sound Board J1100005A / K1100011A
+ (The following representation is rotated 90 degrees anti-clockwise)
+ _______ Ribbon cable
+ +------------------------+ \|/ to main board
+ | A30-13 A30-14 A30-15 +----------+
+ | |||S||| |
+ | Z80 |
+ | YM2149 MB3731 |
+ | A30-08 |
+ | A30-09 |
+ | M5232 A30-10 |
+ | 5517 |
+ | |
+ | |
+ | 8MHz |
+ +-----------------------------------+
+
+ Side view
+
+ --Sound board-------------------
+ -----ROM board---
+ --------Main board--------------------------------
+ --------Video board-------------------------------
+
+Details by Quench
+
+*************************************************************
+
+FieldDay by Taito
+
+Same board as 40-Love
+
+M4300048A
+
+18.432 mhz crystal
+2x m5m5517
+4x am93422 (2101)
+
+A17-15->18 6353 1024x4 prom
+
+M4300049A (relabeled J1100004A/K1100010A)
+
+8 mhz crystal
+4x 4416
+1x m5m5517
+z80c
+
+a17_14 protection processor. 28 Pin Motorolla 15-00011-01 DA68235 (Labeled 8909)
+Next to MB14241
+
+Rom Daughterboard
+
+K9100013A (relabeled J9100005A/K9100008A)
+
+Sound Board
+
+K1100024A (relabeled J1100005A/K1100011A)
+
+8 Mhz crystal
+DZ80C
+YM2149
+Oki M5232 (6532?)
+
+Notes - Has jumper setting for 122HZ or 61HZ)
+
+*/
+
+#include <math.h>
+#include "driver.h"
+#include "cpu/z80/z80.h"
+#include "cpu/m6805/m6805.h"
+#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/msm5232.h"
+
+/* in machine/buggychl.c */
+READ8_HANDLER( buggychl_68705_portA_r );
+WRITE8_HANDLER( buggychl_68705_portA_w );
+WRITE8_HANDLER( buggychl_68705_ddrA_w );
+READ8_HANDLER( buggychl_68705_portB_r );
+WRITE8_HANDLER( buggychl_68705_portB_w );
+WRITE8_HANDLER( buggychl_68705_ddrB_w );
+READ8_HANDLER( buggychl_68705_portC_r );
+WRITE8_HANDLER( buggychl_68705_portC_w );
+WRITE8_HANDLER( buggychl_68705_ddrC_w );
+WRITE8_HANDLER( buggychl_mcu_w );
+READ8_HANDLER( buggychl_mcu_r );
+READ8_HANDLER( buggychl_mcu_status_r );
+
+
+extern VIDEO_START( fortyl );
+extern VIDEO_UPDATE( fortyl );
+extern PALETTE_INIT( fortyl );
+
+extern WRITE8_HANDLER( fortyl_bg_videoram_w );
+extern WRITE8_HANDLER( fortyl_bg_colorram_w );
+extern READ8_HANDLER ( fortyl_bg_videoram_r );
+extern READ8_HANDLER ( fortyl_bg_colorram_r );
+extern WRITE8_HANDLER( fortyl_pixram_sel_w );
+extern READ8_HANDLER( fortyl_pixram_r );
+extern WRITE8_HANDLER( fortyl_pixram_w );
+
+extern UINT8 *fortyl_video_ctrl;
+extern int fortyl_pix_color[4];
+
+static UINT8 *undoukai_ram;
+
+static int sound_nmi_enable,pending_nmi;
+
+static TIMER_CALLBACK( nmi_callback )
+{
+ if (sound_nmi_enable) cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
+ else pending_nmi = 1;
+}
+
+static WRITE8_HANDLER( sound_command_w )
+{
+ soundlatch_w(0,data);
+ timer_call_after_resynch(data,nmi_callback);
+}
+
+static WRITE8_HANDLER( nmi_disable_w )
+{
+ sound_nmi_enable = 0;
+}
+
+static WRITE8_HANDLER( nmi_enable_w )
+{
+ sound_nmi_enable = 1;
+ if (pending_nmi)
+ {
+ cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
+ pending_nmi = 0;
+ }
+}
+
+
+
+#if 0
+static WRITE8_HANDLER( fortyl_coin_counter_w )
+{
+ coin_counter_w(offset,data);
+}
+#endif
+
+
+static READ8_HANDLER( fortyl_mcu_r )
+{
+ return buggychl_mcu_r(offset);
+}
+
+static READ8_HANDLER( fortyl_mcu_status_r )
+{
+ return buggychl_mcu_status_r(offset);
+}
+
+static WRITE8_HANDLER( fortyl_mcu_w )
+{
+ buggychl_mcu_w(offset,data);
+}
+
+static WRITE8_HANDLER( bank_select_w )
+{
+
+ if ((data!=0x02) && (data!=0xfd))
+ {
+// logerror("WRONG BANK SELECT = %x !!!!\n",data);
+// popmessage("WRONG BANK SELECT = %x !!!!\n",data);
+ }
+
+ memory_set_bank( 1, data&1 );
+}
+
+
+static UINT8 pix1;
+static UINT8 pix2[2];
+
+static WRITE8_HANDLER( pix1_w )
+{
+// if ( data > 7 )
+// logerror("pix1 = %2x\n",data);
+
+ pix1 = data;
+}
+static WRITE8_HANDLER( pix2_w )
+{
+// if ( (data!=0x00) && (data!=0xff) )
+// logerror("pix2 = %2x\n",data);
+
+ pix2[0] = pix2[1];
+ pix2[1] = data;
+}
+
+#if 0
+static READ8_HANDLER( pix1_r )
+{
+ return pix1;
+}
+#endif
+
+static READ8_HANDLER( pix2_r )
+{
+ int res;
+ int d1 = pix1 & 7;
+
+ res = (((pix2[1] << (d1+8)) | (pix2[0] << d1)) & 0xff00) >> 8;
+
+ return res;
+}
+
+
+/****************************************************************************
+ fake MCU (undoukai and field day)
+****************************************************************************/
+
+static int from_mcu;
+static int mcu_cmd;
+
+static UINT8 mcu_in[2][16],mcu_out[2][16];
+
+static const UINT8 mcu_data0[0x80] =
+{
+ 0x0a,0x08,0x0f,0x07,0x06,0x05,0x04,0x00,
+ 0x0a,0x0b,0x15,0x02,0x03,0x15,0x0a,0x08,
+ 0x0f,0x07,0x06,0x05,0x04,0x0c,0x01,0x0c,
+ 0x01,0x15,0x0b,0x0a,0x00,0x0d,0x0e,0x15,
+ 0x0a,0x08,0x0f,0x07,0x06,0x05,0x04,0x0b,
+ 0x09,0x0c,0x01,0x0c,0x01,0x15,0x0a,0x08,
+ 0x0f,0x07,0x06,0x05,0x04,0x0c,0x0c,0x01,
+ 0x0c,0x0c,0xff,0xe1,0x23,0xc5,0xc9,0x15,
+
+ 0x3e,0x4a,0xcd,0x2b,0x00,0x4e,0x79,0xf6,
+ 0xa0,0xe6,0xa2,0xcb,0xcf,0xf5,0x0e,0x62,
+ 0xcd,0x35,0x00,0xcb,0xc9,0x79,0xe6,0x02,
+ 0x5f,0xe1,0x4b,0x69,0x3e,0x00,0x2e,0x38,
+ 0xb5,0x6f,0x06,0x23,0x11,0xfe,0xdf,0x1a,
+ 0x27,0x77,0xe6,0x01,0x5f,0x16,0x00,0xcb,
+ 0xfe,0x19,0x05,0x78,0x20,0xee,0xc1,0xe1,
+ 0x23,0xc5,0xc9,0xee,0x37,0x28,0xc0,0xc5
+};
+
+static const UINT8 mcu_data1[0x80] =
+{
+ 0x00,0x78,0xef,0x66,0xdc,0x50,0xc2,0x33,
+ 0xa1,0x0c,0x74,0xd9,0x3a,0x96,0xef,0x42,
+ 0x90,0xd9,0x1c,0x58,0x8f,0xbe,0xe6,0x07,
+ 0x20,0x31,0x39,0x39,0x2f,0x1c,0x00,0xda,
+ 0xa9,0x6d,0x27,0xd6,0x79,0x11,0x9c,0x1b,
+ 0x8e,0xf3,0x4c,0x97,0xd5,0x05,0x27,0x3a,
+ 0x3f,0x35,0x1b,0xf3,0xbb,0x73,0x1c,0xb4,
+ 0x3c,0xb3,0x1a,0x6f,0xb4,0xe7,0x09,0x19,
+ 0x17,0x04,0xde,0xa6,0x5c,0xff,0x90,0x0e,
+ 0x78,0xd0,0x15,0x47,0x65,0x70,0x68,0x4c,
+ 0x1c,0xd9,0x82,0x18,0x99,0x07,0x60,0xa6,
+ 0xd8,0xf6,0x00,0x30,0x08,0x31,0x02,0xb7,
+ 0x81,0xfa,0x30,0x02,0x01,0x01,0x14,0x30,
+ 0x07,0xd6,0x7e,0x30,0x1d,0x15,0x25,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
+};
+
+static const UINT8 mcu_data2[0x80] =
+{
+ 0x00,0x04,0x08,0x00,0x11,0x16,0x1a,0x1f,
+ 0x23,0x28,0x2c,0x30,0x35,0x39,0x3d,0x42,
+ 0x46,0x4a,0x4f,0x53,0x57,0x5b,0x5f,0x64,
+ 0x68,0x6c,0x70,0x74,0x78,0x7c,0x80,0x83,
+ 0x87,0x8b,0x8f,0x92,0x96,0x9a,0x90,0xa1,
+ 0xa4,0xa7,0xa8,0xae,0xb1,0xb5,0xb8,0xbb,
+ 0xbe,0xc1,0xc4,0xc6,0xc9,0xcc,0xcf,0xd1,
+ 0xd4,0xd6,0xd9,0xdb,0xdd,0xdf,0xe2,0xe4,
+ 0xe6,0xe8,0xe9,0xeb,0xed,0xee,0xf0,0xf2,
+ 0xf3,0xf4,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
+ 0xfc,0xfc,0xfd,0xfe,0xfe,0xff,0xff,0xff,
+ 0xff,0xff,0x00,0x3d,0x26,0xbe,0xd6,0x6c,
+ 0x30,0xa6,0xb7,0x81,0x01,0x04,0x14,0xb6,
+ 0xa4,0x97,0x02,0xb7,0x81,0x1b,0x13,0x23,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
+};
+
+
+static WRITE8_HANDLER( undoukai_mcu_w )
+{
+ int ram_adr = undoukai_ram[0x1b5]*0x100 + undoukai_ram[0x1b4];
+
+ int d;
+ int i;
+
+// logerror("mcu_w %02x\n",data);
+
+
+ if (mcu_cmd != -1)
+ {
+ mcu_in[(mcu_cmd & 0x10)>>4][mcu_cmd & 0x0f] = data;
+ mcu_cmd = -1;
+ }
+ else
+ {
+ switch (data)
+ {
+ case 0xc0:
+ case 0xc1:
+ case 0xc2:
+ case 0xc3:
+ case 0xc4:
+ case 0xc5:
+ case 0xc6:
+ case 0xc7:
+ mcu_cmd = (data & 0x0f) | 0x10;
+ break;
+
+ case 0xb0:
+ case 0xb1:
+ case 0xb2:
+ case 0xb3:
+ mcu_cmd = data & 0x0f;
+ break;
+
+
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
+ case 0x34:
+ case 0x35:
+ case 0x36:
+ case 0x37:
+ case 0x38:
+ case 0x39:
+ from_mcu = mcu_out[0][data & 0x0f];
+ break;
+
+ case 0x40:
+ case 0x41:
+ case 0x42:
+ from_mcu = mcu_out[1][data & 0x0f];
+ break;
+
+
+ case 0x01:
+ mcu_out[0][0] = (mcu_in[0][0] ^ (mcu_in[0][0] >> 4)) & 0x0f;
+ break;
+
+ case 0x02:
+ if (mcu_in[0][3] != 0x00)
+ {
+ mcu_out[0][1] = 0x0c;
+ mcu_out[0][2] = 0x00;
+ }
+ else
+ {
+ mcu_out[0][2] = 0xa2;
+ switch (mcu_in[0][0] & 0x03)
+ {
+ case 0: mcu_out[0][1] = 0x55; break;
+ case 1: mcu_out[0][1] = 0x3d; break;
+ case 2: mcu_out[0][1] = 0x45; break;
+ case 3: mcu_out[0][1] = 0x4d; break;
+ }
+ }
+ break;
+
+ case 0x03:
+ mcu_out[0][1] = (((mcu_in[0][0] * 8) & 0x38) -1) & 0xff ;
+
+ if (mcu_in[0][1] | mcu_in[0][2])
+ d = 0x40;
+ else
+ d = 0x00;
+
+ for (i=0;i<8;i++)
+ mcu_out[0][i+2] = mcu_data0[((mcu_out[0][1] + i) & 0x3f) + d];
+ break;
+
+ case 0x04:
+ mcu_out[0][0] = ((mcu_in[0][0] & 0x0f) << 4) + (mcu_in[0][1] & 0x0f);
+ mcu_out[0][1] = ((mcu_in[0][2] & 0x0f) << 4) + (mcu_in[0][3] & 0x0f);
+ break;
+
+ case 0x05:
+// mcu_out[0][0] = 255*cos(PI*mcu_in[0][0]/180);
+// mcu_out[0][1] = 255*sin(PI*mcu_in[0][0]/180);
+
+ d = mcu_in[0][0] & 0x7f;
+ mcu_out[0][0] = mcu_data1[d];
+ mcu_out[0][1] = mcu_data2[d];
+ break;
+
+ case 0x06:
+ if (mcu_in[0][0] != 0x00)
+ mcu_out[0][0] = 0xfa;
+ else
+ switch (mcu_in[0][1])
+ {
+ case 0x00: mcu_out[0][0] = 0x02; break;
+ case 0x01: mcu_out[0][0] = 0x01; break;
+ case 0x02: mcu_out[0][0] = 0x01; break;
+ case 0x03: mcu_out[0][0] = 0x04; break;
+ case 0x04: mcu_out[0][0] = 0x01; break;
+ case 0x05: mcu_out[0][0] = 0x14; break;
+ case 0x06: mcu_out[0][0] = 0x14; break;
+ case 0x07: mcu_out[0][0] = 0xb6; break;
+ default:
+ // popmessage("cmd06: %02x %02x",mcu_in[0][0],mcu_in[0][1]);
+ logerror("cmd06: %02x %02x\n",mcu_in[0][0],mcu_in[0][1]);
+ }
+ break;
+
+ case 0x07:
+ switch (mcu_in[0][0] & 7)
+ {
+ case 0: mcu_out[0][0] = 0x1d; break;
+ case 1: mcu_out[0][0] = 0x1b; break;
+ case 2: mcu_out[0][0] = 0x15; break;
+ case 3: mcu_out[0][0] = 0x13; break;
+ case 4: mcu_out[0][0] = 0x25; break;
+ case 5: mcu_out[0][0] = 0x23; break;
+ case 6: mcu_out[0][0] = 0xff; break;
+ case 7: mcu_out[0][0] = 0xff; break;
+ }
+ break;
+
+ case 0x0e:
+
+ if(ram_adr >= 0xa000 && ram_adr < 0xa800)
+ {
+ ram_adr = ram_adr - 0xa000;
+ mcu_out[1][0] = undoukai_ram[ram_adr];
+ mcu_out[1][1] = undoukai_ram[ram_adr+1];
+ mcu_out[1][2] = undoukai_ram[ram_adr+2] & 0x0f;
+ }
+ break;
+
+ default:
+ from_mcu = 0x5d;
+
+// popmessage("unknown cmd%02x: %02x %02x %02x %02x",data,mcu_in[0][0],mcu_in[0][1],mcu_in[0][2],mcu_in[0][3]);
+// logerror("unknown cmd%02x: %02x %02x %02x %02x\n",data,mcu_in[0][0],mcu_in[0][1],mcu_in[0][2],mcu_in[0][3]);
+ }
+ }
+}
+
+static READ8_HANDLER( undoukai_mcu_r )
+{
+
+// logerror("mcu_r %02x\n",from_mcu);
+
+ return from_mcu;
+}
+
+static READ8_HANDLER( undoukai_mcu_status_r )
+{
+ int res = 3;
+
+ return res;
+}
+
+/***************************************************************************/
+
+static DRIVER_INIT( undoukai )
+{
+ UINT8 *ROM = memory_region(REGION_CPU1);
+ memory_configure_bank(1, 0, 2, &ROM[0x10000], 0x2000);
+
+ from_mcu = 0xff;
+ mcu_cmd = -1;
+
+ fortyl_pix_color[0] = 0x000;
+ fortyl_pix_color[1] = 0x1e3;
+ fortyl_pix_color[2] = 0x16c;
+ fortyl_pix_color[3] = 0x1ec;
+}
+
+static DRIVER_INIT( 40love )
+{
+ UINT8 *ROM = memory_region(REGION_CPU1);
+ memory_configure_bank(1, 0, 2, &ROM[0x10000], 0x2000);
+
+ #if 0
+ /* character ROM hack
+ to show a white line on the opponent side */
+
+ UINT8 *ROM = memory_region(REGION_GFX2);
+ int adr = 0x10 * 0x022b;
+ ROM[adr+0x000a] = 0x00;
+ ROM[adr+0x000b] = 0x00;
+ ROM[adr+0x400a] = 0x00;
+ ROM[adr+0x400b] = 0x00;
+ #endif
+
+ fortyl_pix_color[0] = 0x000;
+ fortyl_pix_color[1] = 0x1e3;
+ fortyl_pix_color[2] = 0x16c;
+ fortyl_pix_color[3] = 0x1ec;
+}
+
+/***************************************************************************/
+
+static UINT8 snd_data;
+static UINT8 snd_flag;
+
+static READ8_HANDLER( from_snd_r )
+{
+ snd_flag = 0;
+ return snd_data;
+}
+
+static READ8_HANDLER( snd_flag_r )
+{
+ return snd_flag | 0xfd;
+}
+
+static WRITE8_HANDLER( to_main_w )
+{
+ snd_data = data;
+ snd_flag = 2;
+}
+
+/***************************************************************************/
+
+static ADDRESS_MAP_START( 40love_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0x87ff) AM_RAM /* M5517P on main board */
+ AM_RANGE(0x8800, 0x8800) AM_READWRITE(fortyl_mcu_r, fortyl_mcu_w)
+ AM_RANGE(0x8801, 0x8801) AM_READWRITE(fortyl_mcu_status_r, pix1_w) //pixel layer related
+ AM_RANGE(0x8802, 0x8802) AM_WRITE(bank_select_w)
+ AM_RANGE(0x8803, 0x8803) AM_READWRITE(pix2_r, pix2_w) //pixel layer related
+ AM_RANGE(0x8804, 0x8804) AM_READWRITE(from_snd_r, sound_command_w)
+ AM_RANGE(0x8805, 0x8805) AM_READ(snd_flag_r) AM_WRITENOP /*sound_reset*/ //????
+ AM_RANGE(0x8807, 0x8807) AM_READNOP /* unknown */
+ AM_RANGE(0x8808, 0x8808) AM_READ(input_port_2_r)
+ AM_RANGE(0x8809, 0x8809) AM_READ(input_port_4_r)
+ AM_RANGE(0x880a, 0x880a) AM_READ(input_port_3_r)
+ AM_RANGE(0x880b, 0x880b) AM_READ(input_port_5_r)
+ AM_RANGE(0x880c, 0x880c) AM_READWRITE(input_port_0_r,fortyl_pixram_sel_w) /* pixram bank select */
+ AM_RANGE(0x880d, 0x880d) AM_READ(input_port_1_r) AM_WRITENOP /* unknown */
+ AM_RANGE(0xa000, 0xbfff) AM_ROMBANK(1)
+ AM_RANGE(0x9000, 0x97ff) AM_READWRITE(fortyl_bg_videoram_r, fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */
+ AM_RANGE(0x9800, 0x983f) AM_RAM AM_BASE(&fortyl_video_ctrl) /* video control area */
+ AM_RANGE(0x9840, 0x987f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */
+ AM_RANGE(0x9880, 0x98bf) AM_READWRITE(fortyl_bg_colorram_r, fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */
+ AM_RANGE(0x98c0, 0x98ff) AM_RAM AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size)/* sprites part 2 */
+ AM_RANGE(0xc000, 0xffff) AM_READWRITE(fortyl_pixram_r, fortyl_pixram_w) /* banked pixel layer */
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( undoukai_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0x9fff) AM_ROMBANK(1)
+ AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_BASE(&undoukai_ram) /* M5517P on main board */
+ AM_RANGE(0xa800, 0xa800) AM_READWRITE(undoukai_mcu_r, undoukai_mcu_w)
+ AM_RANGE(0xa801, 0xa801) AM_READWRITE(undoukai_mcu_status_r, pix1_w) //pixel layer related
+ AM_RANGE(0xa802, 0xa802) AM_WRITE(bank_select_w)
+ AM_RANGE(0xa803, 0xa803) AM_READWRITE(pix2_r, pix2_w) //pixel layer related
+ AM_RANGE(0xa804, 0xa804) AM_READWRITE(from_snd_r, sound_command_w)
+ AM_RANGE(0xa805, 0xa805) AM_READ(snd_flag_r) AM_WRITENOP /*sound_reset*/ //????
+ AM_RANGE(0xa807, 0xa807) AM_READNOP AM_WRITENOP /* unknown */
+ AM_RANGE(0xa808, 0xa808) AM_READ(input_port_2_r)
+ AM_RANGE(0xa809, 0xa809) AM_READ(input_port_4_r)
+ AM_RANGE(0xa80a, 0xa80a) AM_READ(input_port_3_r)
+ AM_RANGE(0xa80b, 0xa80b) AM_READ(input_port_5_r)
+ AM_RANGE(0xa80c, 0xa80c) AM_READWRITE(input_port_0_r, fortyl_pixram_sel_w) /* pixram bank select */
+ AM_RANGE(0xa80d, 0xa80d) AM_READ(input_port_1_r) AM_WRITENOP /* unknown */
+ AM_RANGE(0xb000, 0xb7ff) AM_READWRITE(fortyl_bg_videoram_r, fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */
+ AM_RANGE(0xb800, 0xb83f) AM_RAM AM_BASE(&fortyl_video_ctrl) /* video control area */
+ AM_RANGE(0xb840, 0xb87f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */
+ AM_RANGE(0xb880, 0xb8bf) AM_READWRITE(fortyl_bg_colorram_r, fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */
+ AM_RANGE(0xb8e0, 0xb8ff) AM_RAM AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size) /* sprites part 2 */
+ AM_RANGE(0xc000, 0xffff) AM_READWRITE(fortyl_pixram_r, fortyl_pixram_w)
+ADDRESS_MAP_END
+
+
+static int vol_ctrl[16];
+
+static MACHINE_RESET( ta7630 )
+{
+ int i;
+
+ double db = 0.0;
+ double db_step = 1.50; /* 1.50 dB step (at least, maybe more) */
+ double db_step_inc = 0.125;
+ for (i=0; i<16; i++)
+ {
+ double max = 100.0 / pow(10.0, db/20.0 );
+ vol_ctrl[ 15-i ] = max;
+ /*logerror("vol_ctrl[%x] = %i (%f dB)\n",15-i,vol_ctrl[ 15-i ],db);*/
+ db += db_step;
+ db_step += db_step_inc;
+ }
+
+ /* for (i=0; i<8; i++)
+ logerror("SOUND Chan#%i name=%s\n", i, mixer_get_name(i) ); */
+/*
+ channels 0-2 AY#0
+ channels 3,4 MSM5232 group1,group2
+*/
+}
+
+static UINT8 snd_ctrl0=0;
+static UINT8 snd_ctrl1=0;
+static UINT8 snd_ctrl2=0;
+static UINT8 snd_ctrl3=0;
+
+static WRITE8_HANDLER( sound_control_0_w )
+{
+ snd_ctrl0 = data & 0xff;
+// popmessage("SND0 0=%02x 1=%02x 2=%02x 3=%02x", snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3);
+
+ /* this definitely controls main melody voice on 2'-1 and 4'-1 outputs */
+ sndti_set_output_gain(SOUND_MSM5232, 0, 0, vol_ctrl[ (snd_ctrl0>>4) & 15 ] / 100.0); /* group1 from msm5232 */
+
+}
+static WRITE8_HANDLER( sound_control_1_w )
+{
+ snd_ctrl1 = data & 0xff;
+// popmessage("SND1 0=%02x 1=%02x 2=%02x 3=%02x", snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3);
+ sndti_set_output_gain(SOUND_MSM5232, 0, 1, vol_ctrl[ (snd_ctrl1>>4) & 15 ] / 100.0); /* group2 from msm5232 */
+}
+
+static WRITE8_HANDLER( sound_control_2_w )
+{
+ int i;
+
+ snd_ctrl2 = data & 0xff;
+// popmessage("SND2 0=%02x 1=%02x 2=%02x 3=%02x", snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3);
+
+ for (i=0; i<3; i++)
+ sndti_set_output_gain(SOUND_AY8910, 0, i, vol_ctrl[ (snd_ctrl2>>4) & 15 ] / 100.0); /* ym2149f all */
+}
+
+static WRITE8_HANDLER( sound_control_3_w ) /* unknown */
+{
+ snd_ctrl3 = data & 0xff;
+// popmessage("SND3 0=%02x 1=%02x 2=%02x 3=%02x", snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3);
+}
+
+static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0xbfff) AM_ROM
+ AM_RANGE(0xc000, 0xc7ff) AM_RAM
+ AM_RANGE(0xc800, 0xc800) AM_WRITE(AY8910_control_port_0_w)
+ AM_RANGE(0xc801, 0xc801) AM_WRITE(AY8910_write_port_0_w)
+ AM_RANGE(0xca00, 0xca0d) AM_WRITE(MSM5232_0_w)
+ AM_RANGE(0xcc00, 0xcc00) AM_WRITE(sound_control_0_w)
+ AM_RANGE(0xce00, 0xce00) AM_WRITE(sound_control_1_w)
+ AM_RANGE(0xd800, 0xd800) AM_READWRITE(soundlatch_r, to_main_w)
+ AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read */
+ AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w)
+ AM_RANGE(0xde00, 0xde00) AM_READNOP AM_WRITE(DAC_0_signed_data_w) /* signed 8-bit DAC - unknown read */
+ AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostics ROM */
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
+ ADDRESS_MAP_FLAGS( AMEF_ABITS(11) )
+ AM_RANGE(0x0000, 0x0000) AM_READWRITE(buggychl_68705_portA_r, buggychl_68705_portA_w)
+ AM_RANGE(0x0001, 0x0001) AM_READWRITE(buggychl_68705_portB_r, buggychl_68705_portB_w)
+ AM_RANGE(0x0002, 0x0002) AM_READWRITE(buggychl_68705_portC_r, buggychl_68705_portC_w)
+ AM_RANGE(0x0004, 0x0004) AM_WRITE(buggychl_68705_ddrA_w)
+ AM_RANGE(0x0005, 0x0005) AM_WRITE(buggychl_68705_ddrB_w)
+ AM_RANGE(0x0006, 0x0006) AM_WRITE(buggychl_68705_ddrC_w)
+ AM_RANGE(0x0010, 0x007f) AM_RAM
+ AM_RANGE(0x0080, 0x07ff) AM_ROM
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( 40love )
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x01, 0x00, "DSW1 Unknown 0" ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, "DSW1 Unknown 1" ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x18, 0x10, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4,5")
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x08, "2" )
+ PORT_DIPSETTING( 0x10, "3" )
+ PORT_DIPSETTING( 0x18, "4" )
+ PORT_DIPNAME( 0x20, 0x00, "DSW1 Unknown 5" ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("DSW2") /* All OK */
+ PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3,4")
+ PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) )
+ PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) )
+ PORT_DIPSETTING( 0x0d, DEF_STR( 7C_1C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 6C_1C ) )
+ PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x09, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_8C ) )
+ PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:5,6,7,8")
+ PORT_DIPSETTING( 0xf0, DEF_STR( 9C_1C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 8C_1C ) )
+ PORT_DIPSETTING( 0xd0, DEF_STR( 7C_1C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 6C_1C ) )
+ PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0xa0, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) )
+
+ PORT_START_TAG("DSW3")
+ PORT_DIPNAME( 0x03, 0x00, "DSW3 Unknown 0" ) PORT_DIPLOCATION("SW3:1,2")
+ PORT_DIPSETTING( 0x00, "00" )
+ PORT_DIPSETTING( 0x01, "01" )
+ PORT_DIPSETTING( 0x02, "02" )
+ PORT_DIPSETTING( 0x03, "03" )
+ PORT_DIPNAME( 0x0c, 0x0c, "DSW3 Unknown 1" ) PORT_DIPLOCATION("SW3:3,4")
+ PORT_DIPSETTING( 0x00, "00" )
+ PORT_DIPSETTING( 0x04, "04" )
+ PORT_DIPSETTING( 0x08, "08" )
+ PORT_DIPSETTING( 0x0c, "0c" )
+ PORT_DIPNAME( 0x10, 0x10, "Display Credit Settings" ) PORT_DIPLOCATION("SW3:5")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SW3:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, "Score points to: (Cheat)") PORT_DIPLOCATION("SW3:7")
+ PORT_DIPSETTING( 0x40, "Winner" )
+ PORT_DIPSETTING( 0x00, "Human" )
+ PORT_DIPNAME( 0x80, 0x00, "Coin Door Type" ) PORT_DIPLOCATION("SW3:8")
+ PORT_DIPSETTING( 0x00, "Single Slot" )
+ PORT_DIPSETTING( 0x80, "Double Slot" )
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) //??
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) //??
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_COIN1 ) //OK
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_COIN2 ) //OK
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) //OK
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) //OK
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) //OK
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) //OK
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( undoukai )
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
+ PORT_DIPSETTING( 0x00, "4 (Hard)" )
+ PORT_DIPSETTING( 0x01, "3" )
+ PORT_DIPSETTING( 0x02, "2" )
+ PORT_DIPSETTING( 0x03, "1 (Easy)" )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x08, "1" )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( None ) )
+ PORT_DIPSETTING( 0x00, "100000 200000" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Players ) )
+ PORT_DIPSETTING( 0x20, "1 or 2" )
+ PORT_DIPSETTING( 0x00, "1 to 4" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("DSW2") /*All OK */
+ PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) )
+ PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) )
+ PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) )
+ PORT_DIPSETTING( 0x0d, DEF_STR( 7C_1C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 6C_1C ) )
+ PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x09, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_8C ) )
+ PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) )
+ PORT_DIPSETTING( 0xf0, DEF_STR( 9C_1C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 8C_1C ) )
+ PORT_DIPSETTING( 0xd0, DEF_STR( 7C_1C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 6C_1C ) )
+ PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0xa0, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) )
+
+ PORT_START_TAG("DSW3") /* & START */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Freeze" )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, "Display Credit Settings" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, "Year Display" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, "No Qualify (Cheat)")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, "Coin Door Type" )
+ PORT_DIPSETTING( 0x00, "Single Slot" )
+ PORT_DIPSETTING( 0x80, "Double Slot" )
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_COIN1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_COIN2 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START4 )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+static const gfx_layout char_layout =
+{
+ 8,8,
+ 0x400,
+ 4,
+ { 2*0x2000*8+0, 2*0x2000*8+4, 0,4 },
+ { 3,2,1,0, 11,10,9,8 },
+ { 0*8,2*8,4*8,6*8,8*8,10*8,12*8,14*8 },
+ 16*8
+};
+
+static const gfx_layout sprite_layout =
+{
+ 16,16,
+ RGN_FRAC(1,2),
+ 4,
+ { RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4, 0,4 },
+
+ { 3,2,1,0, 11,10,9,8,
+ 16*8+3, 16*8+2, 16*8+1, 16*8+0, 16*8+11, 16*8+10, 16*8+9, 16*8+8 },
+
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
+ 16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 },
+ 64*8
+};
+
+
+static GFXDECODE_START( 40love )
+ GFXDECODE_ENTRY( REGION_GFX2, 0, char_layout, 0, 64 )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, sprite_layout, 0, 64 )
+GFXDECODE_END
+
+static struct AY8910interface ay8910_interface =
+{
+ 0,
+ 0,
+ sound_control_2_w,
+ sound_control_3_w
+};
+
+static struct MSM5232interface msm5232_interface =
+{
+ { 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6 } /* 1.0 uF capacitors (verified on real PCB) */
+};
+
+/*******************************************************************************/
+
+static MACHINE_DRIVER_START( 40love )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z80,8000000/2) /* OK */
+ MDRV_CPU_PROGRAM_MAP(40love_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
+
+ MDRV_CPU_ADD(Z80,8000000/2)
+ /* audio CPU */ /* OK */
+ MDRV_CPU_PROGRAM_MAP(sound_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */
+
+ MDRV_CPU_ADD(M68705,18432000/6/M68705_CLOCK_DIVIDER) /* OK */
+ MDRV_CPU_PROGRAM_MAP(mcu_map,0)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
+ MDRV_INTERLEAVE(100) /* high interleave to ensure proper synchronization of CPUs */
+ MDRV_MACHINE_RESET(ta7630) /* init machine */
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(64*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1)
+ MDRV_GFXDECODE(40love)
+ MDRV_PALETTE_LENGTH(1024)
+
+ MDRV_PALETTE_INIT(fortyl)
+ MDRV_VIDEO_START(fortyl)
+ MDRV_VIDEO_UPDATE(fortyl)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(AY8910, 2000000)
+ MDRV_SOUND_CONFIG(ay8910_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+
+ MDRV_SOUND_ADD(MSM5232, 8000000/4)
+ MDRV_SOUND_CONFIG(msm5232_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MDRV_SOUND_ADD(DAC, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+MACHINE_DRIVER_END
+
+static MACHINE_DRIVER_START( undoukai )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z80,8000000/2)
+ MDRV_CPU_PROGRAM_MAP(undoukai_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
+
+ MDRV_CPU_ADD(Z80,8000000/2)
+ /* audio CPU */
+ MDRV_CPU_PROGRAM_MAP(sound_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */
+
+// MDRV_CPU_ADD(M68705,18432000/6/M68705_CLOCK_DIVIDER)
+// MDRV_CPU_PROGRAM_MAP(mcu_map,0)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
+ MDRV_MACHINE_RESET(ta7630) /* init machine */
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(64*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1)
+ MDRV_GFXDECODE(40love)
+ MDRV_PALETTE_LENGTH(1024)
+
+ MDRV_PALETTE_INIT(fortyl)
+ MDRV_VIDEO_START(fortyl)
+ MDRV_VIDEO_UPDATE(fortyl)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(AY8910, 2000000)
+ MDRV_SOUND_CONFIG(ay8910_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+
+ MDRV_SOUND_ADD(MSM5232, 8000000/4)
+ MDRV_SOUND_CONFIG(msm5232_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MDRV_SOUND_ADD(DAC, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+MACHINE_DRIVER_END
+
+/*******************************************************************************/
+
+ROM_START( 40love )
+ ROM_REGION( 0x14000, REGION_CPU1, 0 ) /* Z80 main CPU */
+ ROM_LOAD( "a30-19.ic1", 0x00000, 0x2000, CRC(7baca598) SHA1(b1767f5af9b3f484afb4423afe1f9c15db92c2ac) )
+ ROM_LOAD( "a30-20.ic2", 0x02000, 0x2000, CRC(a7b4f2cc) SHA1(67f570874fa0feb21f2a9a0712fadf78ebaad91c) )
+ ROM_LOAD( "a30-21.ic3", 0x04000, 0x2000, CRC(49a372e8) SHA1(7c15fac65369d2e90b432c0f5c8e1d7295c379d1) )
+ ROM_LOAD( "a30-22.ic4", 0x06000, 0x2000, CRC(0c06d2b3) SHA1(e5b0c8e57b0a6d131496e168023e12bacc17e93e) )
+ ROM_LOAD( "a30-23.ic5", 0x10000, 0x2000, CRC(6dcd186e) SHA1(c8d88a2f35ba77ea822bdd8133033c8eb0bb5f72) ) /* banked at 0xa000 */
+ ROM_LOAD( "a30-24.ic6", 0x12000, 0x2000, CRC(590c20c8) SHA1(93689d6a299dfbe33ffec42d13378091d8589b34) ) /* banked at 0xa000 */
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 sound CPU */
+ ROM_LOAD( "a30-08.u08", 0x0000, 0x2000, CRC(2fc42ee1) SHA1(b56e5f9acbcdc476252e188f41ad7249dba6f8e1) )
+ ROM_LOAD( "a30-09.u09", 0x2000, 0x2000, CRC(3a75abce) SHA1(ad2df26789d38196c0677c22ab8f176e99604b18) )
+ ROM_LOAD( "a30-10.u10", 0x4000, 0x2000, CRC(393c4b5b) SHA1(a8e1dd5c33e929bc832cccc13b85ecd13fff1eb2) )
+ ROM_LOAD( "a30-11.u37", 0x6000, 0x2000, CRC(11b2c6d2) SHA1(d55690512a37c4df2386a845e0cfb14f8052295b) )
+ ROM_LOAD( "a30-12.u38", 0x8000, 0x2000, CRC(f7afd475) SHA1(dd09d5ca7fec5e0454f9efb8ebc722561010f124) )
+ ROM_LOAD( "a30-13.u39", 0xa000, 0x2000, CRC(e806630f) SHA1(09022aae88ea0171a0aacf3260fa3a95e8faeb21) )
+
+ ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */
+ ROM_LOAD( "a30-14" , 0x0000, 0x0800, CRC(c4690279) SHA1(60bc77e03b9be434bb97a374a2fedeb8d049a660) )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "a30-25.u22", 0x0000, 0x2000, CRC(15e594cf) SHA1(d2d506a55f6ac2c191e5d5b3127021cde366c71c) )
+ ROM_LOAD( "415f.26", 0x2000, 0x2000, BAD_DUMP CRC(3a45a205) SHA1(0939ecaabbb9be2a0719ef252e3f244299734ba6) ) /* this actually seems good, but we need to find another one to verify */
+ ROM_LOAD( "a30-27.u24", 0x4000, 0x2000, CRC(57c67f6f) SHA1(293e5bfa7c859886abd70f78fe2e4b13a3fce3f5) )
+ ROM_LOAD( "a30-28.u25", 0x6000, 0x2000, CRC(d581d067) SHA1(ce132cf2503917f0846b838c6ce4ad4183181bf9) )
+
+ ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "a30-29.u62", 0x0000, 0x2000, CRC(02deaf40) SHA1(fb424a40bd9d959664a6d1ddf477fc16e694b9fa) )
+ ROM_LOAD( "a30-30.u63", 0x2000, 0x2000, CRC(439f3731) SHA1(4661149baa8472989cc8ac85c51e55df69957d99) )
+ ROM_LOAD( "a30-31.u64", 0x4000, 0x2000, CRC(7ed70e81) SHA1(f90a3ce701ebe746803cf01ea1f6725c552007de) )
+ ROM_LOAD( "a30-32.u65", 0x6000, 0x2000, CRC(0434655b) SHA1(261c5e60e830967564c053dc1d40fbf1e7194fc8) )
+
+ ROM_REGION( 0x1000, REGION_PROMS, 0 )
+ ROM_LOAD( "a30-15.u03", 0x0000, 0x0400, CRC(55e38cc7) SHA1(823a6d7f29eadf5d12702d782d4297b0d4c65a0e) ) /* red */
+ ROM_LOAD( "a30-16.u01", 0x0400, 0x0400, CRC(13997e20) SHA1(9fae1cf633409a88263dc66a17b1c2eeccd05f4f) ) /* green */
+ ROM_LOAD( "a30-17.u02", 0x0800, 0x0400, CRC(5031f2f3) SHA1(1836d82fdc9f39cb318a791af2a935c27baabfd7) ) /* blue */
+ ROM_LOAD( "a30-18.u13", 0x0c00, 0x0400, CRC(78697c0f) SHA1(31382ed4c0d44024f7f57a9de6407527f4d5b0d1) ) /* ??? */
+
+ROM_END
+
+ROM_START( fieldday )
+ ROM_REGION( 0x14000, REGION_CPU1, 0 ) /* Z80 main CPU */
+ ROM_LOAD( "a17_44.bin", 0x00000, 0x2000, CRC(d59812e1) SHA1(f3e7e2f09fba5964c92813cd652aa093fe3e4415) )
+ ROM_LOAD( "a17_45.bin", 0x02000, 0x2000, CRC(828bfb9a) SHA1(0be24ec076b715d65e9c8e01e3be76628e4f60ed) )
+ ROM_LOAD( "a23_05.bin", 0x04000, 0x2000, CRC(2670cad3) SHA1(8ba3a6b788fa4e997f9153226f6f13b32fc33124) )
+ ROM_LOAD( "a23_06.bin", 0x06000, 0x2000, CRC(737ce7de) SHA1(52a46fe14978e217de81dcd529d16d62fb5a4e46) )
+ ROM_LOAD( "a23_07.bin", 0x10000, 0x2000, CRC(ee2fb306) SHA1(f2b0a6af279b459fe61d56ba4d36d519318376fb) )
+ ROM_LOAD( "a23_08.bin", 0x12000, 0x2000, CRC(1ed2f1ad) SHA1(e3cf954dd2c34759147d0c85da7a716a8eb0e820) )
+ ROM_COPY( REGION_CPU1 , 0x10000, 0x8000, 0x2000 ) /* to avoid 'bank bug' */
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 sound CPU */
+ ROM_LOAD( "a17_24.bin", 0x0000, 0x2000, CRC(6bac6b7f) SHA1(eb95192204a868737d609b789312ac37c31d3071) )
+ ROM_LOAD( "a17_25.bin", 0x2000, 0x2000, CRC(570b90b1) SHA1(2a8c3bebd15655ffbfeaf40c2db90292afbb11ef) )
+ ROM_LOAD( "a17_26.bin", 0x4000, 0x2000, CRC(7a8ea7f4) SHA1(1d9d2b54645266f95aa89cdbec6f82d4ac20d6e4) )
+ ROM_LOAD( "a17_27.bin", 0x6000, 0x2000, CRC(e10594d9) SHA1(3df15b8b0c7af9fed93eca27237e15e6a7a8f835) )
+ ROM_LOAD( "a17_28.bin", 0x8000, 0x2000, CRC(1a4d1dae) SHA1(fbc3c55ad9f15ead432c136eec648fe22e523ea7) )
+ ROM_LOAD( "a17_29.bin", 0xa000, 0x2000, CRC(3c540007) SHA1(549e7ff260214c538913ff548dcb088987845911) )
+
+ ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */
+ ROM_LOAD( "a17_14.bin", 0x0000, 0x0800, NO_DUMP )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "a17_36.bin", 0x0000, 0x2000, CRC(e3dd51f7) SHA1(95a97ea925c5bc7bdc00887e6d17d817b36befc4) )
+ ROM_LOAD( "a17_37.bin", 0x2000, 0x2000, CRC(1623f71f) SHA1(f5df7498b9a08e82ea11cb1b1fcdabca48cbf33a) )
+ ROM_LOAD( "a17_38.bin", 0x4000, 0x2000, CRC(ca9f74db) SHA1(a002f1dfa9497793bfb18292e7a71ae12d70fb88) )
+ ROM_LOAD( "a17_39.bin", 0x6000, 0x2000, CRC(fb6c667c) SHA1(da56be8d997db199588ee22fae30cc6d87e80704) )
+
+
+ ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "a23_09.bin", 0x0000, 0x2000, CRC(1e430be5) SHA1(9296e1a0d820bb218578d55b739b4fc5fdafb125) )
+ ROM_LOAD( "a23_10.bin", 0x2000, 0x2000, CRC(ee2e54f0) SHA1(0a92fa39696a8005f9441131b6d98205b7c26e7b) )
+ ROM_LOAD( "a23_11.bin", 0x4000, 0x2000, CRC(6d37f15c) SHA1(3eb9a2e230d88f2871e6972a01d8e7cc7db1b123) )
+ ROM_LOAD( "a23_12.bin", 0x6000, 0x2000, CRC(86da42d2) SHA1(aa79cd954c96217ca2daf37addac168f8cca24f9) )
+
+ ROM_REGION( 0x1000, REGION_PROMS, 0 )
+ ROM_LOAD( "a17-15.10v", 0x0000, 0x0400, CRC(9df472b7) SHA1(0cd9dd735238daf8e8228ba9481df57fb8925328) ) /* red */
+ ROM_LOAD( "a17-16.8v", 0x0400, 0x0400, CRC(3bf1ff5f) SHA1(a0453851aefa9acdba4a86aaca8c442cb8550987) ) /* green */
+ ROM_LOAD( "a17-17.9v", 0x0800, 0x0400, CRC(c42ae956) SHA1(057ce3783305c98622f7dfc0ee7d4882137a2ef8) ) /* blue */
+ ROM_LOAD( "a17-18.23v", 0x0c00, 0x0400, CRC(3023a1da) SHA1(08ce4c6e99d04b358d66f0588852311d07183619) ) /* ??? */
+ROM_END
+
+ROM_START( undoukai )
+ ROM_REGION( 0x14000, REGION_CPU1, 0 ) /* Z80 main CPU */
+ ROM_LOAD( "a17-01.70c", 0x00000, 0x4000, CRC(6ce324d9) SHA1(9c5207ac897eaae5a6aa1a05a918c9cb58544664) )
+ ROM_LOAD( "a17-02.71c", 0x04000, 0x4000, CRC(055c7ef1) SHA1(f974bd441b8e3621ac5f8d36104791c97051a97a) )
+ ROM_LOAD( "a17-03.72c", 0x10000, 0x4000, CRC(9034a5c5) SHA1(bc3dae0dee08b6989275ac220fc76bfe61367154) ) /* banked at 0x8000 */
+ ROM_COPY( REGION_CPU1 , 0x10000, 0x8000, 0x2000 ) /* to avoid 'bank bug' */
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 sound CPU */
+ ROM_LOAD( "a17-08.8s", 0x0000, 0x2000, CRC(2545aa0e) SHA1(190ef99890251e1e49b14ffd28f2badb4d0d8fbe) )
+ ROM_LOAD( "a17-09.9s", 0x2000, 0x2000, CRC(57e2cdbb) SHA1(ae6187d62fb36a37be06040e0fd85e0252cdf750) )
+ ROM_LOAD( "a17-10.10s", 0x4000, 0x2000, CRC(38a288fe) SHA1(af4979cae59ca2569a3663132451b9b554552a79) )
+ ROM_LOAD( "a17-11.37s", 0x6000, 0x2000, CRC(036d6969) SHA1(20e03dab14d44bf3c7c6aace3b28b2826581d1c7) )
+ ROM_LOAD( "a17-12.38s", 0x8000, 0x2000, CRC(cb7e6dcd) SHA1(5286c6d340c1d465caebae5dd7e3d4ff8b7f8f5e) )
+ ROM_LOAD( "a17-13.39s", 0xa000, 0x2000, CRC(0a40930e) SHA1(8c4b9fa0aed67a3e269c2136ef81791fc8acd1da) )
+
+ ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */
+ ROM_LOAD( "a17-14.41c", 0x0000, 0x0800, NO_DUMP )
+
+ ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "a17-04.18v", 0x0000, 0x4000, CRC(84dabee2) SHA1(698f12ee4201665988248853dafbf4b16dfc6517) )
+ ROM_LOAD( "a17-05.19v", 0x4000, 0x4000, CRC(10bf3451) SHA1(23ebb1409c90d225ff5a13ad23d4dff1acaf904a) )
+
+ ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "a17-06.59v", 0x0000, 0x4000, CRC(50f28ad9) SHA1(001555ad123ac85000999b1aa39c1b2568e26f46) )
+ ROM_LOAD( "a17-07.60v", 0x4000, 0x4000, CRC(7a4b4238) SHA1(8e58803645e61a7144a659d403f318a8899d36e2) )
+
+ ROM_REGION( 0x1000, REGION_PROMS, 0 )
+ ROM_LOAD( "a17-15.10v", 0x0000, 0x0400, CRC(9df472b7) SHA1(0cd9dd735238daf8e8228ba9481df57fb8925328) ) /* red */
+ ROM_LOAD( "a17-16.8v", 0x0400, 0x0400, CRC(3bf1ff5f) SHA1(a0453851aefa9acdba4a86aaca8c442cb8550987) ) /* green */
+ ROM_LOAD( "a17-17.9v", 0x0800, 0x0400, CRC(c42ae956) SHA1(057ce3783305c98622f7dfc0ee7d4882137a2ef8) ) /* blue */
+ ROM_LOAD( "a17-18.23v", 0x0c00, 0x0400, CRC(3023a1da) SHA1(08ce4c6e99d04b358d66f0588852311d07183619) ) /* ??? */
+ROM_END
+
+GAME( 1984, 40love, 0, 40love, 40love, 40love, ROT0, "Taito Corporation", "Forty-Love", GAME_IMPERFECT_GRAPHICS )
+GAME( 1984, fieldday, 0, undoukai, undoukai, undoukai, ROT0, "Taito Corporation", "Field Day", 0 )
+GAME( 1984, undoukai, fieldday, undoukai, undoukai, undoukai, ROT0, "Taito Corporation", "The Undoukai (Japan)", 0 )
diff --git a/src/mame/drivers/4enraya.c b/src/mame/drivers/4enraya.c
new file mode 100644
index 00000000000..2be92d5263b
--- /dev/null
+++ b/src/mame/drivers/4enraya.c
@@ -0,0 +1,216 @@
+/***************************************************************************
+
+Driver by Tomasz Slanina dox@space.pl
+
+***************************************************************************
+
+RAM :
+ 1 x GM76c28-10 (6116) RAM
+ 3 x 2114 - VRAM (only 10 bits are used )
+
+ROM:
+ 27256 + 27128 for code/data
+ 3x2764 for gfx
+
+PROM:
+ 82S123 32x8
+ Used for system control
+ (d0 - connected to ROM5 /CS , d1 - ROM4 /CS, d2 - RAM /CS , d3 - to some logic(gfx control), and Z80 WAIT )
+
+Memory Map :
+ 0x0000 - 0xbfff - ROM
+ 0xc000 - 0xcfff - RAM
+ 0xd000 - 0xdfff - VRAM mirrored write,
+ tilemap offset = address & 0x3ff
+ tile number = bits 0-7 = data, bits 8,9 = address bits 10,11
+
+Video :
+ No scrolling , no sprites.
+ 32x32 Tilemap stored in VRAM (10 bits/tile (tile numebr 0-1023))
+
+ 3 gfx ROMS
+ ROM1 - R component (ROM ->(parallel in) shift register 74166 (serial out) -> jamma output
+ ROM2 - B component
+ ROM3 - G component
+
+ Default MAME color palette is used
+
+Sound :
+ AY 3 8910
+
+ sound_control :
+
+ bit 0 - BC1
+ bit 1 - BC2
+ bit 2 - BDIR
+
+ bits 3-7 - not connected
+
+***************************************************************************/
+
+#include "driver.h"
+#include "cpu/z80/z80.h"
+#include "sound/ay8910.h"
+
+VIDEO_START( 4enraya );
+VIDEO_UPDATE( 4enraya );
+
+WRITE8_HANDLER( fenraya_videoram_w );
+
+static int soundlatch;
+
+static WRITE8_HANDLER( sound_data_w )
+{
+ soundlatch = data;
+}
+
+static WRITE8_HANDLER( sound_control_w )
+{
+ static int last;
+ if ((last & 0x04) == 0x04 && (data & 0x4) == 0x00)
+ {
+ if (last & 0x01)
+ AY8910_control_port_0_w(0,soundlatch);
+ else
+ AY8910_write_port_0_w(0,soundlatch);
+ }
+ last=data;
+}
+
+static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM)
+ AM_RANGE(0xc000, 0xcfff) AM_READ(MRA8_RAM)
+ AM_RANGE(0xd000, 0xffff) AM_READ(MRA8_NOP)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
+ AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM)
+ AM_RANGE(0xd000, 0xdfff) AM_WRITE(fenraya_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 )
+ ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 )
+ ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
+ AM_RANGE(0x23, 0x23) AM_WRITE(sound_data_w)
+ AM_RANGE(0x33, 0x33) AM_WRITE(sound_control_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( 4enraya )
+ PORT_START_TAG("DSW")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, "Pieces" ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x04, "30" )
+ PORT_DIPSETTING( 0x00, "16" )
+ PORT_DIPNAME( 0x08, 0x08, "Speed" ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPSETTING( 0x08, "Slow" )
+ PORT_DIPSETTING( 0x00, "Fast" )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:7,8")
+ PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Down") // "drop" ("down")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Down") // "drop" ("down")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Shot") // "fire" ("shot")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Shot") // "fire" ("shot")
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
+INPUT_PORTS_END
+
+static const gfx_layout charlayout =
+{
+ 8,8, /* 8*8 characters */
+ RGN_FRAC(1,3), /* 1024 characters */
+ 3, /* 3 bits per pixel */
+ { RGN_FRAC(1,3), RGN_FRAC(2,3), RGN_FRAC(0,3) }, /* the bitplanes are separated */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8*8 /* every char takes 8 consecutive bytes */
+};
+
+static GFXDECODE_START( 4enraya )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 8 )
+GFXDECODE_END
+
+
+static MACHINE_DRIVER_START( 4enraya )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z80,8000000/2)
+ MDRV_CPU_PROGRAM_MAP(readmem,writemem)
+ MDRV_CPU_IO_MAP(readport,writeport)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,4)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+ MDRV_GFXDECODE(4enraya)
+ MDRV_PALETTE_LENGTH(512)
+
+ MDRV_VIDEO_START(4enraya)
+ MDRV_VIDEO_UPDATE(4enraya)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ADD(AY8910, 8000000/4 /* guess */)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+MACHINE_DRIVER_END
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( 4enraya )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "5.bin", 0x0000, 0x8000, CRC(cf1cd151) SHA1(3920b0a6ed5798859158871b578b01ec742b0d13) )
+ ROM_LOAD( "4.bin", 0x8000, 0x4000, CRC(f9ec1be7) SHA1(189159129ecbc4f6909c086867b0e02821f5b976) )
+
+ ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "1.bin", 0x0000, 0x2000, CRC(87f92552) SHA1(d16afd963c30f2e60951876b843e5c1dcbee1cfc) )
+ ROM_LOAD( "2.bin", 0x2000, 0x2000, CRC(2b0a3793) SHA1(2c3d224251557824bb9641dc2f98a000ab72c4a2) )
+ ROM_LOAD( "3.bin", 0x4000, 0x2000, CRC(f6940836) SHA1(afde21ffa0c141cf73243e50da62ecfd474aaac2) )
+
+ ROM_REGION( 0x0020, REGION_PROMS, 0 )
+ ROM_LOAD( "1.bpr", 0x0000, 0x0020, CRC(dcbd2352) SHA1(ce72e84129ed1b455aaf648e1dfaa4333e7e7628) ) /* not used */
+ROM_END
+
+GAME( 1990, 4enraya, 0, 4enraya, 4enraya, 0, ROT0, "IDSA", "4 En Raya", 0 )
diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c
new file mode 100644
index 00000000000..f98f71eb5e1
--- /dev/null
+++ b/src/mame/drivers/8080bw.c
@@ -0,0 +1,3246 @@
+/****************************************************************************/
+/* */
+/* 8080bw.c */
+/* */
+/* Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni */
+/* Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari and others */
+/* */
+/* */
+/* Notes: */
+/* ----- */
+/* */
+/* - Space Invaders Deluxe still says Space Invaders Part II, */
+/* because according to KLOV, Midway was only allowed to make minor */
+/* modifications of the Taito code. */
+/* */
+/* */
+/* To Do: */
+/* ----- */
+/* */
+/* - Space Chaser (schaser) */
+/* 1. The "missile" sound is incorrect. This is how it should be: */
+/* It should be a constant "klunkity-klunk", and should only be */
+/* heard while missiles are seen to be moving. When the red */
+/* missiles speed up, there should be more "klunks per second" */
+/* with the pitch staying constant. */
+/* 2. If "Hard" mode is selected, numerous bugs appear which */
+/* could be either an emulation fault or a bad rom. Some */
+/* bugs are: */
+/* a. Graphic error halfway up the left side */
+/* b. Score adds or subtracts random amounts */
+/* c. Score not cleared when starting a new game */
+/* d. Game begins on the wrong level */
+/* */
+/* - Space War (Sanritsu) */
+/* */
+/* 1. I seem to recall that the flashing ufo had its own sample */
+/* sound, a sort of rattling noise. Unable to find evidence */
+/* of this (so far). */
+/* */
+/* */
+/* Change Log: */
+/* ---------- */
+/* */
+/* 24 Dec 1998 - added sitv [LT] */
+/* */
+/* 21 Nov 1999 - added spacewar3 [LT] */
+/* */
+/* 26 May 2001 - added galxwars */
+/* galxwar2 */
+/* jspectr2 */
+/* ozmawar2 */
+/* spaceatt */
+/* sstrangr */
+/* */
+/* 26 May 2001 - changed galxwars input port so the new sets work */
+/* */
+/* 30 Jul 2001 - added sstrngr2 */
+/* */
+/* 17 Jul 2006 - schaser - connect up prom - fix dipswitches */
+/* schasrcv - allow bottom line to show on screen */
+/* */
+/* */
+/* 10 Sep 2006 - invadpt2 - add name reset button */
+/* spcewars - add bitstream circuit, fix dipswitches */
+/* */
+/* */
+/* 13 Dec 2006 - add PRELIMINARY sound support and documentation to */
+/* rollingc, spcenctr, gunfight, m4, gmissile, schasrcv, */
+/* 280zzzap, lagunar, lupin3, phantom2, blueshrk, desertgu, */
+/* ballbomb, yasokdon/yosakdoa, shuttlei, invrvnge/invrvnga. */
+/* Documented indianbt sound. Removed NO_SOUND flag from */
+/* cosmo and dogpatch as the sound was already working. */
+/* [Robert] */
+/* */
+/* 02 May 2007 - Major clean-up of driver and video system */
+/* */
+/****************************************************************************/
+
+#include "driver.h"
+#include "8080bw.h"
+#include "mw8080bw.h"
+#include "machine/mb14241.h"
+
+#include "invrvnge.lh"
+
+/*******************************************************/
+/* */
+/* Space Invaders CV Version (Taito) */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( sicv )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1000" )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+/*******************************************************/
+/* */
+/* Space Invaders TV Version (Taito) */
+/* */
+/*******************************************************/
+
+/* same as the CV version with a test mode switch */
+
+static INPUT_PORTS_START( sitv )
+ PORT_START_TAG("IN0")
+ PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1000" )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+/*******************************************************/
+/* */
+/* Space Invaders Model Racing */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( invadrmr )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_DIPSETTING( 0x08, "3000" ) /* This is different to invaders */
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+/*******************************************************/
+/* */
+/* Midway "Space Invaders Part II" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( invadpt2_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invadpt2_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
+ AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( invadpt2 )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ // Name Reset - if name of high scorer was rude, owner can press this button
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Name Reset") PORT_CODE(KEYCODE_F1)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, "High Score Preset Mode" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/* same as regular invaders, but with a color board added */
+
+static MACHINE_DRIVER_START( invadpt2 )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(invadpt2_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(invadpt2)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+/*******************************************************/
+/* */
+/* Space Wars (Sanritsu) */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( spcewars_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, spcewars_sh_port_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( spcewars )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_DIPSETTING( 0x08, "2000" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG) /* Dummy port for cocktail mode (not used) */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( spcewars )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(spcewars_io_map,0)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+ /* extra audio channel */
+ MDRV_SOUND_ADD(SPEAKER, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+MACHINE_DRIVER_END
+
+/*******************************************************/
+/* */
+/* Cosmo */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( cosmo_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x4000, 0x57ff) AM_ROM
+ AM_RANGE(0x5c00, 0x5fff) AM_RAM AM_BASE(&c8080bw_colorram)
+ADDRESS_MAP_END
+
+/* at least one of these MWA8_NOPs must be sound related */
+static ADDRESS_MAP_START( cosmo_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, MWA8_NOP)
+ AM_RANGE(0x01, 0x01) AM_READWRITE(input_port_1_r, MWA8_NOP)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, MWA8_NOP)
+ AM_RANGE(0x03, 0x03) AM_WRITE(invadpt2_sh_port_1_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(cosmo_sh_port_2_w)
+ AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x07, 0x07) AM_WRITE(MWA8_NOP)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( cosmo )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "5" )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* must be HIGH normally or the joystick won't work */
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( cosmo )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(cosmo_map, 0)
+ MDRV_CPU_IO_MAP(cosmo_io_map, 0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(cosmo)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+/*******************************************************/
+/* */
+/* ?????? "Super Earth Invasion" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( searthin )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x01, "3" )
+ PORT_DIPNAME( 0x02, 0x02, "Pence Coinage" )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) /* Pence Coin */
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* Not bonus */
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, "2C/1C 50p/3C (+ Bonus Life)" )
+ PORT_DIPSETTING( 0x80, "1C/1C 50p/5C" )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy port for cocktail mode */
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* ?????? "Space Attack II" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( spaceatt )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1000" )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG) /* Dummy port for cocktail mode (not used) */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Zenitone Microsec "Invaders Revenge" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( invrvnge_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invrvnge_sh_port_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( invrvnge )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+
+ PORT_START_TAG(CABINET_PORT_TAG)
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+static MACHINE_DRIVER_START( invrvnge )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(invrvnge_io_map,0)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Space Laser" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( spclaser )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2) /* This is not 2 Player ??? */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR(Coinage) )
+ PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Players" )
+ PORT_DIPSETTING( 0x80, "1 Coin/1 Player 2 Coins/2 Players" ) /* Irrelevant, causes bugs */
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode (not used) */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+/*******************************************************/
+/* */
+/* Space War (Leijac) */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( spcewarl )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR(Coinage) )
+ PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Players" )
+ PORT_DIPSETTING( 0x80, "1 Coin/1 Player 2 Coins/2 Players" )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode (not used) */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Galaxy Wars" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( galxwars )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* must be IP_ACTIVE_LOW for Universal Sets */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x01, "3" )
+ PORT_DIPSETTING( 0x02, "4" )
+ PORT_DIPSETTING( 0x03, "5" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x00, "3000" )
+ PORT_DIPSETTING( 0x08, "5000" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Lunar Rescue" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( lrescue_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lrescue_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(lrescue_sh_port_2_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( lrescue )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( lrescue )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(lrescue_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(invadpt2)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(SAMPLES, 0)
+ MDRV_SOUND_CONFIG(lrescue_samples_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+
+ /* extra audio channel */
+ MDRV_SOUND_ADD(SPEAKER, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Universal "Cosmic Monsters" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( cosmicmo )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x01, "3" )
+ PORT_DIPSETTING( 0x02, "4" )
+ PORT_DIPSETTING( 0x03, "5" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Sidam "Invasion" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( invasion )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1500" )
+ PORT_DIPSETTING( 0x00, "2500" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Laser Bonus Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* bootleg "Super Invaders" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( superinv )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Must be high or game instantly crashes */
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1500" )
+ PORT_DIPSETTING( 0x00, "2500" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Nichibutsu "Rolling Crash" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( rollingc_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x4000, 0x5fff) AM_ROM
+ AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x00e0) AM_RAM AM_BASE(&c8080bw_colorram)
+ AM_RANGE(0xe400, 0xffff) AM_RAM
+ADDRESS_MAP_END
+
+
+static ADDRESS_MAP_START( rollingc_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, rollingc_sh_port_w)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READ(mb14241_0_shift_result_r)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( rollingc )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) /* Game Select */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) /* Game Select */
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( rollingc )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(rollingc_map,0)
+ MDRV_CPU_IO_MAP(rollingc_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(rollingc)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+
+/*******************************************************/
+/* */
+/* Taito "Space Chaser" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( schaser_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x4000, 0x5fff) AM_ROM
+ AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x00e0) AM_RAM AM_BASE(&c8080bw_colorram)
+ADDRESS_MAP_END
+
+
+static ADDRESS_MAP_START( schaser_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schaser_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(schaser_sh_port_2_w)
+ AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( schaser )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_DIPNAME(0x20, 0x20, "Dipswitch 5")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME(0x40, 0x40, "Dipswitch 7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+
+ PORT_START_TAG("DSW0") // port 2
+ // dipswitch 1 and 2
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ // dipswitch 3
+ PORT_DIPNAME( 0x04, 0x04, "Dipswitch 3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ // dipswitch 4
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
+ // Name Reset - if name of high scorer was rude, owner can press this button
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Name Reset") PORT_CODE(KEYCODE_F1)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
+ // dipswitch 6
+ PORT_DIPNAME( 0x40, 0x00, "Number of Controllers" )
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ // port 3 (all 8 bits) connected to custom chip MB14241 driven by out port 2 and 4
+ // To get cocktail mode, turn this on, and choose 2 controllers.
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("VR1")
+ PORT_ADJUSTER( 70, "VR1 - Music Volume" )
+
+ PORT_START_TAG("VR2")
+ PORT_ADJUSTER( 90, "VR2 - Explosion/Effect Volume" )
+
+ PORT_START_TAG("VR3")
+ PORT_ADJUSTER( 70, "VR3 - Dot Volume" )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( schaser )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_REPLACE("main",8080,1996800) /* 19.968MHz / 10 */
+ MDRV_CPU_PROGRAM_MAP(schaser_map,0)
+ MDRV_CPU_IO_MAP(schaser_io_map,0)
+ MDRV_WATCHDOG_VBLANK_INIT(255)
+ MDRV_MACHINE_START(schaser)
+ MDRV_MACHINE_RESET(schaser)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(schaser)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(SN76477, 0)
+ MDRV_SOUND_CONFIG(schaser_sn76477_interface)
+ // This will be routed to the discrete system when that feature is working.
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+
+ MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
+ MDRV_SOUND_CONFIG_DISCRETE(schaser)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Space Chaser" (CV version) */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( schasrcv_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schasrcv_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(schasrcv_sh_port_2_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( schasrcv )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( schasrcv )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(schaser_map,0)
+ MDRV_CPU_IO_MAP(schasrcv_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(schasrcv)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+ MDRV_SOUND_ADD(SPEAKER, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Straight Flush" */
+/* */
+/*******************************************************/
+
+static int sfl_int=0;
+
+static READ8_HANDLER( sfl_input_r )
+{
+ sfl_int^=0x80;//vblank flag ?
+ return sfl_int|input_port_1_r(0);
+}
+
+static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_RAM
+ AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x8008, 0x8008) AM_READ(input_port_2_r)
+ AM_RANGE(0x8009, 0x8009) AM_READ(mb14241_0_shift_result_r)
+ AM_RANGE(0x800a, 0x800a) AM_READ(sfl_input_r)
+ AM_RANGE(0x800b, 0x800b) AM_READ(input_port_0_r)
+ AM_RANGE(0x8018, 0x8018) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x8019, 0x8019) AM_WRITE(mb14241_0_shift_count_w)
+ AM_RANGE(0x801a, 0x801a) AM_WRITE(MWA8_NOP)
+ AM_RANGE(0x801c, 0x801c) AM_WRITE(MWA8_NOP)
+ AM_RANGE(0x801d, 0x801d) AM_WRITE(MWA8_NOP)
+ AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x00e0) AM_RAM AM_BASE(&c8080bw_colorram)
+ AM_RANGE(0xd800, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+static MACHINE_DRIVER_START( sflush )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_REPLACE("main",M6800,2000000) /* ?? */
+ MDRV_CPU_PROGRAM_MAP(sflush_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_pulse,2)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(sflush)
+
+MACHINE_DRIVER_END
+
+static INPUT_PORTS_START( sflush )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_DIPNAME( 0x08, 0x00, "Hiscore" )
+ PORT_DIPSETTING( 0x00, "0" )
+ PORT_DIPSETTING( 0x08, "30 000" )
+ PORT_DIPNAME( 0x40, 0x00, "Coinage Display" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0xff, 0x6a, IPT_PADDLE ) PORT_MINMAX(0x16,0xbf) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_CENTERDELTA(0)
+INPUT_PORTS_END
+
+
+
+/*******************************************************/
+/* */
+/* Taito "Lupin III" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( lupin3_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lupin3_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(lupin3_sh_port_2_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( lupin3 )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* selects color mode (dynamic vs. static) */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* something has to do with sound */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x08, 0x00, "Bags to Collect" )
+ PORT_DIPSETTING( 0x08, "2" )
+ PORT_DIPSETTING( 0x00, "8" )
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Language ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( English ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Japanese ) )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_DIPNAME(0x80, 0x00, "Invulnerability (Cheat)")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( lupin3 )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(schaser_map,0)
+ MDRV_CPU_IO_MAP(lupin3_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(lupin3)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Polaris" */
+/* */
+/*******************************************************/
+
+static UINT8 polaris_cloud_speed;
+static UINT8 polaris_cloud_pos;
+
+
+static INTERRUPT_GEN( polaris_interrupt )
+{
+ polaris_cloud_speed++;
+
+ if (polaris_cloud_speed >= 4) /* every 4 frames - this was verified against real machine */
+ {
+ polaris_cloud_speed = 0;
+
+ polaris_cloud_pos++;
+ }
+}
+
+
+UINT8 polaris_get_cloud_pos(void)
+{
+ return polaris_cloud_pos;
+}
+
+
+// Port 5 is used to reset the watchdog timer.
+// This port is also written to when the boss plane is going up and down.
+// If you write this value to a note ciruit similar to the music,
+// you will get a nice sound that accurately follows the plane.
+// It sounds better then the actual circuit used.
+// Probably an unfinished feature.
+static ADDRESS_MAP_START( polaris_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, polaris_sh_port_1_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, mb14241_0_shift_data_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(polaris_sh_port_2_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x06, 0x06) AM_WRITE(polaris_sh_port_3_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( polaris )
+
+ PORT_START_TAG("IN0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ /* 0x04 should be Cabinet - Upright/Cocktail,
+ but until the cocktail hack is changed,
+ this will have to do. */
+ PORT_DIPNAME( 0x04, 0x00, "Number of Controls" )
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x04, "2" )
+ PORT_DIPNAME( 0x08, 0x00, "Invincible Test" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ /* The Demo Sounds dip switch does function.
+ * It allows the sonar sounds to play in demo mode. */
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, "Not Used" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, "Not Used" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, "High Score Preset Mode" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("VR1")
+ PORT_ADJUSTER( 80, "Sub Volume VR1" )
+
+ PORT_START_TAG("VR2")
+ PORT_ADJUSTER( 70, "Sub Volume VR2" )
+
+ PORT_START_TAG("VR3")
+ PORT_ADJUSTER( 90, "Sub Volume VR3" )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( polaris )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_REPLACE("main",8080,1996800) /* 19.968MHz / 10 */
+ MDRV_CPU_PROGRAM_MAP(schaser_map,0)
+ MDRV_CPU_IO_MAP(polaris_io_map,0)
+ MDRV_WATCHDOG_VBLANK_INIT(255)
+ MDRV_CPU_VBLANK_INT(polaris_interrupt,1)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(polaris)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
+ MDRV_SOUND_CONFIG_DISCRETE(polaris)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Ozma Wars" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( ozmawars )
+ PORT_START_TAG("IN0")
+
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, "Energy" )
+ PORT_DIPSETTING( 0x00, "15000" )
+ PORT_DIPSETTING( 0x01, "20000" )
+ PORT_DIPSETTING( 0x02, "25000" )
+ PORT_DIPSETTING( 0x03, "35000" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, "Bonus Energy" )
+ PORT_DIPSETTING( 0x00, "15000" )
+ PORT_DIPSETTING( 0x08, "10000" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+static INPUT_PORTS_START( spaceph )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_DIPNAME( 0x03, 0x00, "Energy" )
+ PORT_DIPSETTING( 0x00, "15000" )
+ PORT_DIPSETTING( 0x01, "20000" )
+ PORT_DIPSETTING( 0x02, "25000" )
+ PORT_DIPSETTING( 0x03, "35000" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, "Bonus Energy" )
+ PORT_DIPSETTING( 0x08, "10000" )
+ PORT_DIPSETTING( 0x00, "15000" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+
+/*******************************************************/
+/* */
+/* Emag "Super Invaders" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( sinvemag )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "2000" )
+ PORT_DIPSETTING( 0x00, "3000" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(INVADERS_CAB_TYPE_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+
+/*******************************************************/
+/* */
+/* Jatre Specter (Taito?) */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( jspecter )
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPSETTING( 0x08, "1000" )
+ PORT_DIPSETTING( 0x00, "1500" )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_DIPNAME( 0x80, 0x00, "Coin Info" )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Balloon Bomber" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( ballbomb_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, ballbomb_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(ballbomb_sh_port_2_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( ballbomb )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( ballbomb )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(ballbomb_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(ballbomb)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Wing "Yosaku To Donbei" */
+/* */
+/*******************************************************/
+
+static ADDRESS_MAP_START( yosakdon_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8_RAM) /* what's this? */
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( yosakdon_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_0_r)
+ AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r)
+ AM_RANGE(0x03, 0x03) AM_WRITE(yosakdon_sh_port_1_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(yosakdon_sh_port_2_w)
+ AM_RANGE(0x06, 0x06) AM_WRITE(MWA8_NOP) /* character numbers */
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( yosakdon )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG("IN1")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P1 */
+ PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ /* Dummy controls port, P2 */
+ PORT_START_TAG(INVADERS_P2_CONTROL_PORT_TAG)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+static MACHINE_DRIVER_START( yosakdon )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(yosakdon_map,0)
+ MDRV_CPU_IO_MAP(yosakdon_io_map,0)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+/*******************************************************/
+/* */
+/* Taito "Indian battle" */
+/* */
+/*******************************************************/
+
+static INPUT_PORTS_START( indianbt )
+
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x03, "6" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
+ PORT_DIPNAME( 0x08, 0x00, "Number of Catch Animals" )
+ PORT_DIPSETTING( 0x00, "6" )
+ PORT_DIPSETTING( 0x08, "3" )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_DIPNAME(0x80, 0x00, "Invulnerability (Cheat)")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START_TAG("DUMMY") /* cabinet fake port must be 4th */
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+/*
+ Protection / sound hw checks ?
+
+ ld a ,$b
+ out ($03),a
+ out ($01),a
+ in a,($00)
+ and $f0
+ cp $10
+ jp nz,$3000
+ ld a,$03
+ out ($03),a
+ out ($01),a
+ in a,($00)
+ jp $5de7
+ and $f0
+ jp z,$052b
+ jp $3000
+
+*/
+
+static READ8_HANDLER(indianbt_r)
+{
+ switch(activecpu_get_pc())
+ {
+ case 0x5fed: return 0x10;
+ case 0x5ffc: return 0;
+ }
+ logerror("unknown port 0 read @ %x\n",activecpu_get_pc());
+ return mame_rand(Machine);
+}
+
+static ADDRESS_MAP_START( indianbt_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(indianbt_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_0_r)
+ AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r) AM_WRITE(mb14241_0_shift_count_w)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, indianbt_sh_port_1_w)
+ AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
+ AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w)
+ AM_RANGE(0x06, 0x06) AM_WRITENOP /* sound ? */
+ AM_RANGE(0x07, 0x07) AM_WRITE(indianbt_sh_port_3_w)
+ADDRESS_MAP_END
+
+
+static MACHINE_DRIVER_START( indianbt )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(indianbt_io_map,0)
+
+ /* video hardware */
+ MDRV_VIDEO_UPDATE(indianbt)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+ MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
+ MDRV_SOUND_CONFIG_DISCRETE(indianbt)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+MACHINE_DRIVER_END
+
+/*****************************************************
+
+ Omori "Shuttle Invader" ??
+
+ 8080 CPU
+
+ 1x SN76477
+g 2x SN75452
+ 4x 8216 RAM
+ 2x TMS4045 RAM
+ 16x MCM4027 RAM
+ 1x empty small socket. maybe (missing) PROM?
+ 1x 8 position dipsw
+ 1x 556
+ 1x 458
+ 1x lm380 (amp chip)
+
+ xtal 18MHz
+ xtal 5.545MHz
+
+******************************************************/
+
+static INPUT_PORTS_START( shuttlei )
+ PORT_START_TAG("DSW")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+
+ PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x02, "4" )
+ PORT_DIPSETTING( 0x04, "5" )
+ PORT_DIPSETTING( 0x06, "6" )
+
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START_TAG("IN1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VBLANK )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+INPUT_PORTS_END
+
+static ADDRESS_MAP_START( shuttlei_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x13ff) AM_ROM
+ AM_RANGE(0x1c00, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ AM_RANGE(0x4000, 0x43ff) AM_RAM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( shuttlei_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0xfc, 0xfc) AM_WRITENOP /* game writes 0xAA every so often (perhaps when base hit?) */
+ AM_RANGE(0xfd, 0xfd) AM_WRITE(shuttlei_sh_port_1_w)
+ AM_RANGE(0xfe, 0xfe) AM_READWRITE(input_port_0_r, shuttlei_sh_port_2_w)
+ AM_RANGE(0xff, 0xff) AM_READ(input_port_1_r)
+// port fd (write) is for sound
+ADDRESS_MAP_END
+
+
+static MACHINE_DRIVER_START( shuttlei )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(shuttlei_map,0)
+ MDRV_CPU_IO_MAP(shuttlei_io_map,0)
+
+ /* video hardware */
+// MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1)
+ MDRV_VIDEO_UPDATE(shuttlei)
+
+ /* sound hardware */
+ MDRV_IMPORT_FROM(invaders_samples_audio)
+
+MACHINE_DRIVER_END
+
+
+
+/*
+
+------------------------------------
+Darth Vader - Space Invaders bootleg
+------------------------------------
+
+Location Device File ID Checksum
+--------------------------------------------
+0 2708 ROM0 6F9A
+1 2708 ROM1 7D2A
+2 2708 ROM2 67AA
+3 2708 ROM3 7D8D
+4 2708 ROM4 493D
+5 2708 ROM5 12CE
+
+
+Notes: PCB No. DV-SI-7811M2a
+ CPU - 8080
+
+Another (same checksums) dump came from board labeled SI-7811M-2
+
+*/
+
+
+
+static MACHINE_START( darthvdr )
+{
+ /* do nothing for now - different interrupt system */
+}
+
+
+static MACHINE_RESET( darthvdr )
+{
+ /* do nothing for now - different interrupt system */
+}
+
+
+static ADDRESS_MAP_START( darthvdr_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x17ff) AM_ROM
+ AM_RANGE(0x1800, 0x1fff) AM_RAM
+ AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( darthvdr_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r)
+ AM_RANGE(0x00, 0x0f) AM_WRITENOP
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( darthvdr )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "4" )
+ PORT_DIPSETTING( 0x80, "6" )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START_TAG(CABINET_PORT_TAG) /* Dummy port for cocktail mode */
+ PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
+ PORT_CONFSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( darthvdr )
+
+ /* basic machine hardware */
+ MDRV_IMPORT_FROM(mw8080bw_root)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(darthvdr_map,0)
+ MDRV_CPU_IO_MAP(darthvdr_io_map,0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
+
+ MDRV_MACHINE_START(darthvdr)
+ MDRV_MACHINE_RESET(darthvdr)
+
+MACHINE_DRIVER_END
+
+
+ROM_START( searthin )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "earthinv.h", 0x0000, 0x0800, CRC(58a750c8) SHA1(90bfa4ea06f38e67fe4286d37d151632439249d2) )
+ ROM_LOAD( "earthinv.g", 0x0800, 0x0800, CRC(b91742f1) SHA1(8d9ca92405fbaf1d5a7138d400986616378d061e) )
+ ROM_LOAD( "earthinv.f", 0x1000, 0x0800, CRC(4acbbc60) SHA1(b8c1efb4251a1e690ff6936ec956d6f66136a085) )
+ ROM_LOAD( "earthinv.e", 0x1800, 0x0800, CRC(df397b12) SHA1(e7e8c080cb6baf342ec637532e05d38129ae73cf) )
+ROM_END
+
+ROM_START( searthia )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "unkh.h1", 0x0000, 0x0400, CRC(272b9bf3) SHA1(dd57d6a88d42024a39640931114107b547b4c520) )
+ ROM_LOAD( "unkg.g1", 0x0400, 0x0400, CRC(61bb6101) SHA1(8fc8bbd8ac93d239e0cf0e4881f709860ec2c973) )
+ ROM_LOAD( "unkf.f1", 0x0800, 0x0400, CRC(2a8d9cd5) SHA1(7948d79b326e729bcb629607c8797156ff9fb0e8) )
+ ROM_LOAD( "unke.e1", 0x0c00, 0x0400, CRC(1938d349) SHA1(3bd2a0deb126cf2e22bc3cb53e9a59c3875be260) )
+ ROM_LOAD( "unkd.d1", 0x1000, 0x0400, CRC(9bc2ab88) SHA1(1e9f3b780135827d16ba25978382b097a8110828) )
+ ROM_LOAD( "unkc.c1", 0x1400, 0x0400, CRC(d4e2dada) SHA1(e98271212fc89e240fdf97d292edd17dc8dd4191) )
+ ROM_LOAD( "unkb.b1", 0x1800, 0x0400, CRC(ab645a9c) SHA1(9c286f8a031a8babfb8e9b594e05e133c338b342) )
+ ROM_LOAD( "unka.a1", 0x1c00, 0x0400, CRC(4b65bd7c) SHA1(3931f9f5b0e3339ab484eee14473d3a474935fd9) )
+ROM_END
+
+
+ROM_START( invadrmr )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ /* yes, this rom is really on the PCB twice?! */
+ ROM_LOAD( "11.1s", 0x0000, 0x0400, CRC(389d44b6) SHA1(5d2581b8bc0da918ce57cf319e06b5b31989c681) )
+ ROM_LOAD( "11.1t", 0x0000, 0x0400, CRC(389d44b6) SHA1(5d2581b8bc0da918ce57cf319e06b5b31989c681) )
+
+ ROM_LOAD( "sv02.1p", 0x0400, 0x0400, CRC(0e159534) SHA1(94b2015a9d38ca738705b8d024a79fd2f9855b98) )
+ ROM_LOAD( "20.1n", 0x0800, 0x0400, CRC(805b04f0) SHA1(209f42dfde1593699ccf3755e9267d425416d910) )
+ ROM_LOAD( "sv04.1j", 0x1400, 0x0400, CRC(1293b826) SHA1(165cd5d08a19eadbe954145b12807f10df9e691a) )
+ ROM_LOAD( "13.1h", 0x1800, 0x0400, CRC(76b4a6ea) SHA1(076f8d12ba7ebe66b83a40d9a848075627776554) )
+ ROM_LOAD( "sv06.1g", 0x1c00, 0x0400, CRC(2c68e0b4) SHA1(a5e5357120102ad32792bf3ef6362f45b7ba7070) )
+ROM_END
+
+ROM_START( spaceatt )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "h", 0x0000, 0x0400, CRC(d0c32d72) SHA1(b3bd950b1ba940fbeb5d95e55113ed8f4c311434) )
+ ROM_LOAD( "sv02.bin", 0x0400, 0x0400, CRC(0e159534) SHA1(94b2015a9d38ca738705b8d024a79fd2f9855b98) )
+ ROM_LOAD( "f", 0x0800, 0x0400, CRC(483e651e) SHA1(ae795ee3bc53ac3936f6cf2c72cca7a890783513) )
+ ROM_LOAD( "c", 0x1400, 0x0400, CRC(1293b826) SHA1(165cd5d08a19eadbe954145b12807f10df9e691a) )
+ ROM_LOAD( "b", 0x1800, 0x0400, CRC(6fc782aa) SHA1(0275adbeec455e146f4443b0b836b1171436b79b) )
+ ROM_LOAD( "a", 0x1c00, 0x0400, CRC(211ac4a3) SHA1(e08e90a4e77cfa30400626a484c9f37c87ea13f9) )
+ROM_END
+
+ROM_START( spaceat2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "spaceatt.h", 0x0000, 0x0800, CRC(a31d0756) SHA1(2b76929654ed0b180091348546dac29fc6e5438e) )
+ ROM_LOAD( "spaceatt.g", 0x0800, 0x0800, CRC(f41241f7) SHA1(d93cead75922510075433849c4f7099279eafc18) )
+ ROM_LOAD( "spaceatt.f", 0x1000, 0x0800, CRC(4c060223) SHA1(957e75a978aa600627399061cae0a6525e92ad11) )
+ ROM_LOAD( "spaceatt.e", 0x1800, 0x0800, CRC(7cf6f604) SHA1(469557de15178c4b2d686e5724e1006f7c20d7a4) )
+ROM_END
+
+ROM_START( sinvzen )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1.bin", 0x0000, 0x0400, CRC(9b0da779) SHA1(a52ccdb252eb69c497aa5eafb35d7f25a311b44e) )
+ ROM_LOAD( "2.bin", 0x0400, 0x0400, CRC(9858ccab) SHA1(5ad8e5ef0d95779f0e513634b97bc330c9269ce4) )
+ ROM_LOAD( "3.bin", 0x0800, 0x0400, CRC(a1cc38b5) SHA1(45fc9466b548d511b8174f6f3a4783164dd59489) )
+ ROM_LOAD( "4.bin", 0x0c00, 0x0400, CRC(1f2db7a8) SHA1(354ad155743f724f2bebcab422f1ef96cb57c683) )
+ ROM_LOAD( "5.bin", 0x1000, 0x0400, CRC(9b505fcd) SHA1(7461b7087d31dbe09f7b3078584ccaa2c9122c95) )
+ ROM_LOAD( "6.bin", 0x1400, 0x0400, CRC(de0ca0ae) SHA1(a15d1218361839a2a2bf8da3f78d81621251fe1c) )
+ ROM_LOAD( "7.bin", 0x1800, 0x0400, CRC(25a296f6) SHA1(37df98384c1513f0e33a350dfcaa99655f91c9ba) )
+ ROM_LOAD( "8.bin", 0x1c00, 0x0400, CRC(f4bc4a98) SHA1(bff3806750a3695a136f398c7dbb69a0b7daa88a) )
+ROM_END
+
+ROM_START( sinvemag )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, CRC(86bb8cb6) SHA1(a75648e7f2446c756d86624b15d387d25ce47b66) )
+ ROM_LOAD( "emag_si.b", 0x0400, 0x0400, CRC(febe6d1a) SHA1(e1c3a24b4fa5862107ada1f9d7249466e8c3f06a) )
+ ROM_LOAD( "emag_si.c", 0x0800, 0x0400, CRC(aafb24f7) SHA1(6718cdfae09f77d735be5145b9d202a73d8ed9db) )
+ ROM_LOAD( "emag_si.d", 0x1400, 0x0400, CRC(68c4b9da) SHA1(8953dc0427b09b71bd763e65caa7deaca09a15da) )
+ ROM_LOAD( "emag_si.e", 0x1800, 0x0400, CRC(c4e80586) SHA1(3d427d5a2eea3c911ec7bd055e06e6747ce5e84d) )
+ ROM_LOAD( "emag_si.f", 0x1c00, 0x0400, CRC(077f5ef2) SHA1(625de6839073ac4c904f949efc1b2e0afea5d676) )
+ROM_END
+
+ROM_START( tst_invd )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "test.h", 0x0000, 0x0800, CRC(f86a2eea) SHA1(4a72ff01f3e6d16bbe9bf7f123cd98895bfbed9a) ) /* The Test ROM */
+ ROM_LOAD( "invaders.g", 0x0800, 0x0800, CRC(6bfaca4a) SHA1(16f48649b531bdef8c2d1446c429b5f414524350) )
+ ROM_LOAD( "invaders.f", 0x1000, 0x0800, CRC(0ccead96) SHA1(537aef03468f63c5b9e11dd61e253f7ae17d9743) )
+ ROM_LOAD( "invaders.e", 0x1800, 0x0800, CRC(14e538b0) SHA1(1d6ca0c99f9df71e2990b610deb9d7da0125e2d8) )
+ROM_END
+
+ROM_START( alieninv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1h.bin", 0x0000, 0x0800, CRC(c46df7f4) SHA1(eec34b3d5585bae03c7b80585daaa05ddfcc2164) )
+ ROM_LOAD( "1g.bin", 0x0800, 0x0800, CRC(4b1112d6) SHA1(b693667656e5d8f44eeb2ea730f4d4db436da579) )
+ ROM_LOAD( "1f.bin", 0x1000, 0x0800, CRC(adca18a5) SHA1(7e02651692113db31fd469868ae5ffdb0f941ecf) )
+ ROM_LOAD( "1e.bin", 0x1800, 0x0800, CRC(0449cb52) SHA1(8adcb7cd4492fa6649d9ee81172d8dff56621d64) )
+ROM_END
+
+ROM_START( sitv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "tv0h.s1", 0x0000, 0x0800, CRC(fef18aad) SHA1(043edeefe6a6d4934bd384eafea19326de1dbeec) )
+ ROM_LOAD( "tv02.rp1", 0x0800, 0x0800, CRC(3c759a90) SHA1(d847d592dee592b1d3a575c21d89eaf3f7f6ae1b) )
+ ROM_LOAD( "tv03.n1", 0x1000, 0x0800, CRC(0ad3657f) SHA1(a501f316535c50f7d7a20ef8e6dede1526a3f2a8) )
+ ROM_LOAD( "tv04.m1", 0x1800, 0x0800, CRC(cd2c67f6) SHA1(60f9d8fe2d36ff589277b607f07c1edc917c755c) )
+ROM_END
+
+ROM_START( sicv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "cv17.bin", 0x0000, 0x0800, CRC(3dfbe9e6) SHA1(26487df7fa0bbd0b9b7f74347c4b9318b0a73b89) )
+ ROM_LOAD( "cv18.bin", 0x0800, 0x0800, CRC(bc3c82bf) SHA1(33e39fc97bd46699be1f9b9741a86f433efdc911) )
+ ROM_LOAD( "cv19.bin", 0x1000, 0x0800, CRC(d202b41c) SHA1(868fe938ef768655c894ec95b7d9a81bf21f69ca) )
+ ROM_LOAD( "cv20.bin", 0x1800, 0x0800, CRC(c74ee7b6) SHA1(4f52db274a2d4433ab67c099ee805e8eb8516c0f) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
+ ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
+ROM_END
+
+ROM_START( sisv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, CRC(86bb8cb6) SHA1(a75648e7f2446c756d86624b15d387d25ce47b66) )
+ ROM_LOAD( "sv02.bin", 0x0400, 0x0400, CRC(0e159534) SHA1(94b2015a9d38ca738705b8d024a79fd2f9855b98) )
+ ROM_LOAD( "invaders.g", 0x0800, 0x0800, CRC(6bfaca4a) SHA1(16f48649b531bdef8c2d1446c429b5f414524350) )
+ ROM_LOAD( "invaders.f", 0x1000, 0x0800, CRC(0ccead96) SHA1(537aef03468f63c5b9e11dd61e253f7ae17d9743) )
+ ROM_LOAD( "tv04.m1", 0x1800, 0x0800, CRC(cd2c67f6) SHA1(60f9d8fe2d36ff589277b607f07c1edc917c755c) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
+ ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
+ROM_END
+
+ROM_START( sisv2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, CRC(86bb8cb6) SHA1(a75648e7f2446c756d86624b15d387d25ce47b66) )
+ ROM_LOAD( "emag_si.b", 0x0400, 0x0400, CRC(febe6d1a) SHA1(e1c3a24b4fa5862107ada1f9d7249466e8c3f06a) )
+ ROM_LOAD( "sv12", 0x0800, 0x0400, CRC(a08e7202) SHA1(de9f7c851d1b894915e720cfc5d794cdb31752f6) )
+ ROM_LOAD( "invaders.f", 0x1000, 0x0800, CRC(0ccead96) SHA1(537aef03468f63c5b9e11dd61e253f7ae17d9743) )
+ ROM_LOAD( "sv13", 0x1800, 0x0400, CRC(a9011634) SHA1(1f1369ecb02078042cfdf17a497b8dda6dd23793) )
+ ROM_LOAD( "sv14", 0x1c00, 0x0400, CRC(58730370) SHA1(13dc806bcecd2d6089a85dd710ac2869413f7475) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
+ ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
+ROM_END
+
+ROM_START( spceking )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "invaders.h", 0x0000, 0x0800, CRC(734f5ad8) SHA1(ff6200af4c9110d8181249cbcef1a8a40fa40b7f) )
+ ROM_LOAD( "spcekng2", 0x0800, 0x0800, CRC(96dcdd42) SHA1(e18d7ffca92e863ef40e235b2be973d8c5879fdb) )
+ ROM_LOAD( "spcekng3", 0x1000, 0x0800, CRC(95fc96ad) SHA1(38175edad0e538a1561cec8f7613f15ae274dd14) )
+ ROM_LOAD( "spcekng4", 0x1800, 0x0800, CRC(54170ada) SHA1(1e8b3774355ec0d448f04805a917f4c1fe64bceb) )
+ROM_END
+
+ROM_START( spcewars )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "sanritsu.1", 0x0000, 0x0400, CRC(ca331679) SHA1(5c362c3d1c721d293bcddbef4033533769c8f0e0) )
+ ROM_LOAD( "sanritsu.2", 0x0400, 0x0400, CRC(48dc791c) SHA1(91a98205c83ca38961e6ba2ac43a41e6e8bc2675) )
+ ROM_LOAD( "ic35.bin", 0x0800, 0x0800, CRC(40c2d55b) SHA1(b641b63046d242ad23911143ed840011fc98eaff) )
+ ROM_LOAD( "sanritsu.5", 0x1000, 0x0400, CRC(77475431) SHA1(15a04a2655847ee462be65d1065d643c872bb47c) )
+ ROM_LOAD( "sanritsu.6", 0x1400, 0x0400, CRC(392ef82c) SHA1(77c98c11ee727ed3ed6e118f13d97aabdb555540) )
+ ROM_LOAD( "sanritsu.7", 0x1800, 0x0400, CRC(b3a93df8) SHA1(3afc96814149d4d5343fe06eac09f808384d02c4) )
+ ROM_LOAD( "sanritsu.8", 0x1c00, 0x0400, CRC(64fdc3e1) SHA1(c3c278bc236ced7fc85e1a9b018e80be6ab33402) )
+ ROM_LOAD( "sanritsu.9", 0x4000, 0x0400, CRC(b2f29601) SHA1(ce855e312f50df7a74682974803cb4f9b2d184f3) )
+ROM_END
+
+ROM_START( spacewr3 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ic36.bin", 0x0000, 0x0800, CRC(9e30f88a) SHA1(314dfb2920d9b43b977cc19e40ac315e6933c3b9) )
+ ROM_LOAD( "ic35.bin", 0x0800, 0x0800, CRC(40c2d55b) SHA1(b641b63046d242ad23911143ed840011fc98eaff) )
+ ROM_LOAD( "ic34.bin", 0x1000, 0x0800, CRC(b435f021) SHA1(2d0d813b99d571b53770fa878a1f82ca67827caa) )
+ ROM_LOAD( "ic33.bin", 0x1800, 0x0800, CRC(cbdc6fe8) SHA1(63038ea09d320c54e3d1cf7f043c17bba71bf13c) )
+ ROM_LOAD( "ic32.bin", 0x4000, 0x0800, CRC(1e5a753c) SHA1(5b7cd7b347203f4edf816f02c366bd3b1b9517c4) )
+ROM_END
+
+ROM_START( invaderl )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "c01", 0x0000, 0x0400, CRC(499f253a) SHA1(e13353194277f5d35e92db9b11912b5f392f51b7) )
+ ROM_LOAD( "c02", 0x0400, 0x0400, CRC(2d0b2e1f) SHA1(2e0262d9dba607824fcd720d2995531649bdd03d) )
+ ROM_LOAD( "c03", 0x0800, 0x0400, CRC(03033dc2) SHA1(87d7838e6a6542c2c5510af593df45137cb397c6) )
+ ROM_LOAD( "c07", 0x1000, 0x0400, CRC(5a7bbf1f) SHA1(659f2a8c646660d316d6e70f1d9548375f1da63f) )
+ ROM_LOAD( "c04", 0x1400, 0x0400, CRC(455b1fa7) SHA1(668800a0a3ba18d8b54c2aa4dfd4bd01a667d679) )
+ ROM_LOAD( "c05", 0x1800, 0x0400, CRC(40cbef75) SHA1(15994ed8bb8ab8faed6198926873851062c9d95f) )
+ ROM_LOAD( "sv06.bin", 0x1c00, 0x0400, CRC(2c68e0b4) SHA1(a5e5357120102ad32792bf3ef6362f45b7ba7070) )
+ROM_END
+
+ROM_START( invader4 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "spin4.a", 0x0000, 0x0800, CRC(bb386dfe) SHA1(cc00f3e4f6ca4c05bae038a24ccdb213fb951cfc) )
+ ROM_LOAD( "spin4.b", 0x0800, 0x0800, CRC(63afa11d) SHA1(d8cedfa010a49237e31f6ebaed35134cb1c3ce68) )
+ ROM_LOAD( "spin4.c", 0x1000, 0x0800, CRC(22b0317c) SHA1(8fd037bf5f89a7bcb06042697410566d5180912a) )
+ ROM_LOAD( "spin4.d", 0x1800, 0x0800, CRC(9102fd68) SHA1(3523e69314844fcd1863b1e9a9d7fcebe9ee174b) )
+ROM_END
+
+ROM_START( jspecter )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "3305.u6", 0x0000, 0x1000, CRC(ab211a4f) SHA1(d675ed29c3479d7318f8559bd56dd619cf631b6a) )
+ ROM_LOAD( "3306.u7", 0x1400, 0x1000, CRC(0df142a7) SHA1(2f1c32d6fe7eafb7808fef0bdeb69b4909427417) )
+ROM_END
+
+ROM_START( jspectr2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "unksi.b2", 0x0000, 0x1000, CRC(0584b6c4) SHA1(c130021b878bde2beda4a189f71bbfed61088535) )
+ ROM_LOAD( "unksi.a2", 0x1400, 0x1000, CRC(58095955) SHA1(545df3bb9ee4ff09f491d7a4b704e31aa311a8d7) )
+ROM_END
+
+ROM_START( invadpt2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "pv01", 0x0000, 0x0800, CRC(7288a511) SHA1(ff617872784c28ed03591aefa9f0519e5651701f) )
+ ROM_LOAD( "pv02", 0x0800, 0x0800, CRC(097dd8d5) SHA1(8d68654d54d075c0f0d7f63c87ff4551ce8b7fbf) )
+ ROM_LOAD( "pv03", 0x1000, 0x0800, CRC(1766337e) SHA1(ea959bf06c9930d83a07559e191a28641efb07ac) )
+ ROM_LOAD( "pv04", 0x1800, 0x0800, CRC(8f0e62e0) SHA1(a967b155f15f8432222fcc78b23121b00c405c5c) )
+ ROM_LOAD( "pv05", 0x4000, 0x0800, CRC(19b505e9) SHA1(6a31a37586782ce421a7d2cffd8f958c00b7b415) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "pv06.1", 0x0000, 0x0400, CRC(a732810b) SHA1(a5fabffa73ca740909e23b9530936f9274dff356) )
+ ROM_LOAD( "pv07.2", 0x0400, 0x0400, CRC(2c5b91cb) SHA1(7fa4d4aef85473b1b4f18734230c164e72be44e7) )
+ROM_END
+
+ROM_START( invaddlx )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "invdelux.h", 0x0000, 0x0800, CRC(e690818f) SHA1(0860fb03a64d34a9704a1459a5e96929eafd39c7) )
+ ROM_LOAD( "invdelux.g", 0x0800, 0x0800, CRC(4268c12d) SHA1(df02419f01cf0874afd1f1aa16276751acd0604a) )
+ ROM_LOAD( "invdelux.f", 0x1000, 0x0800, CRC(f4aa1880) SHA1(995d77b67cb4f2f3781c2c8747cb058b7c1b3412) )
+ ROM_LOAD( "invdelux.e", 0x1800, 0x0800, CRC(408849c1) SHA1(f717e81017047497a2e9f33f0aafecfec5a2ed7d) )
+ ROM_LOAD( "invdelux.d", 0x4000, 0x0800, CRC(e8d5afcd) SHA1(91fde9a9e7c3dd53aac4770bd169721a79b41ed1) )
+ROM_END
+
+ROM_START( moonbase )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ze3-1.bin", 0x0000, 0x0400, CRC(82dbf2c7) SHA1(c767d8b866db4a5059bd79f962a90ce3a962e1e6) )
+ ROM_LOAD( "ze3-2.bin", 0x0400, 0x0400, CRC(c867f5b4) SHA1(686318fda6edde297aecaf33f480bfa075fa6eca) )
+ ROM_LOAD( "ze3-3.bin", 0x0800, 0x0400, CRC(cb23ccc1) SHA1(86be2d14d52b3404e1a25c573bd25b97729d82a1) )
+ ROM_LOAD( "ze3-4.bin", 0x0c00, 0x0400, CRC(9a11abe2) SHA1(f5337183c7f279d75ddeeab24f4f132aa2ee103b) )
+ ROM_LOAD( "ze3-5.bin", 0x1000, 0x0400, CRC(2b105ed3) SHA1(fa0767089b3aaec25be39e950e7163ecbdc2f39f) )
+ ROM_LOAD( "ze3-6.bin", 0x1400, 0x0400, CRC(cb3d6dcb) SHA1(b4923b12a141c76b7d50274f19a3224db26a5669) )
+ ROM_LOAD( "ze3-7.bin", 0x1800, 0x0400, CRC(774b52c9) SHA1(ddbbba874ac069fb930b364a890c45675ec389f7) )
+ ROM_LOAD( "ze3-8.bin", 0x1c00, 0x0400, CRC(e88ea83b) SHA1(ef05be4783c860369ee5ecd4844837207e99ad9f) )
+ ROM_LOAD( "ze3-9.bin", 0x4000, 0x0400, CRC(2dd5adfa) SHA1(62cb98cad1e48de0e0cbf30392d35834b38dadbd) )
+ ROM_LOAD( "ze3-10.bin", 0x4400, 0x0400, CRC(1e7c22a4) SHA1(b34173375494ffbf5400dd4014a683a9807f4f08) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "n02prm.6a", 0x0000, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
+ ROM_LOAD( "n01prm.6b", 0x0400, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
+ROM_END
+
+ROM_START( invrvnge )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "invrvnge.h", 0x0000, 0x0800, CRC(aca41bbb) SHA1(ca71f792abd6d9a44d15b19d2ccf678e82ccba4f) )
+ ROM_LOAD( "invrvnge.g", 0x0800, 0x0800, CRC(cfe89dad) SHA1(218b6a0b636c49c4cdc3667e8b1387ef0e257115) )
+ ROM_LOAD( "invrvnge.f", 0x1000, 0x0800, CRC(e350de2c) SHA1(e845565e2f96f9dec3242ec5ab75910a515428c9) )
+ ROM_LOAD( "invrvnge.e", 0x1800, 0x0800, CRC(1ec8dfc8) SHA1(fc8fbe1161958f57c9f4ccbcab8a769184b1c562) )
+ROM_END
+
+ROM_START( invrvnga )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "5m.bin", 0x0000, 0x0800, CRC(b145cb71) SHA1(127eb11de7ab9835f06510fb12838c0b728c0d42) )
+ ROM_LOAD( "5n.bin", 0x0800, 0x0800, CRC(660e8af3) SHA1(bd52eadf4ee3d717fd5bd7206e1e87d729250c92) )
+ ROM_LOAD( "5p.bin", 0x1000, 0x0800, CRC(6ec5a9ad) SHA1(d1e84d2d60c6128c092f2cd20a2b87216df3034b) )
+ ROM_LOAD( "5r.bin", 0x1800, 0x0800, CRC(74516811) SHA1(0f595c7b0fae5f3f83fdd1ffed5a408ee77c9438) )
+ROM_END
+
+ROM_START( spclaser )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "la01", 0x0000, 0x0800, CRC(bedc0078) SHA1(a5bb0cbbb8e3f27d03beb8101b2be1111d73689d) )
+ ROM_LOAD( "spcewarl.2", 0x0800, 0x0800, CRC(43bc65c5) SHA1(5f9827c02c2d221e1607359c840374ff7fb92fbf) )
+ ROM_LOAD( "la03", 0x1000, 0x0800, CRC(1083e9cc) SHA1(7ad45c6230c9e02fcf51e3414c15e2237eebbd7a) )
+ ROM_LOAD( "la04", 0x1800, 0x0800, CRC(5116b234) SHA1(b165b2574cbcb26a5bb43f91df5f8be5f111f486) )
+ROM_END
+
+ROM_START( laser )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1.u36", 0x0000, 0x0800, CRC(b44e2c41) SHA1(00e0b2e088495d6f3bc175e8a53dcb3686ea8484) )
+ ROM_LOAD( "2.u35", 0x0800, 0x0800, CRC(9876f331) SHA1(14e36b26d186d9a195492834ef989ed5664d7b65) )
+ ROM_LOAD( "3.u34", 0x1000, 0x0800, CRC(ed79000b) SHA1(bfe0407e833ce61aa909f5f1f93c3fc1d46605e9) )
+ ROM_LOAD( "4.u33", 0x1800, 0x0800, CRC(10a160a1) SHA1(e2d4208af11b65fc42d2856e57ee3c196f89d360) )
+ROM_END
+
+ROM_START( spcewarl )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "spcewarl.1", 0x0000, 0x0800, CRC(1fcd34d2) SHA1(674139944e0d842a85bd21b326bd735e15453038) )
+ ROM_LOAD( "spcewarl.2", 0x0800, 0x0800, CRC(43bc65c5) SHA1(5f9827c02c2d221e1607359c840374ff7fb92fbf) )
+ ROM_LOAD( "spcewarl.3", 0x1000, 0x0800, CRC(7820df3a) SHA1(53315857f4282c68624b338b068d80ee6828af4c) )
+ ROM_LOAD( "spcewarl.4", 0x1800, 0x0800, CRC(adc05b8d) SHA1(c4acf75537c0662a4785d5d6a90643239a54bf43) )
+ROM_END
+
+ROM_START( galxwars )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "univgw3.0", 0x0000, 0x0400, CRC(937796f4) SHA1(88e9494cc532498e51e3a68fa1122c40f22b27dd) )
+ ROM_LOAD( "univgw4.1", 0x0400, 0x0400, CRC(4b86e7a6) SHA1(167f9f7491a2de39d08e3e6f7057cc75b36c9340) )
+ ROM_LOAD( "univgw5.2", 0x0800, 0x0400, CRC(47a187cd) SHA1(640c896ba25f34d323624005bd676257ad17b687) )
+ ROM_LOAD( "univgw6.3", 0x0c00, 0x0400, CRC(7b7d22ff) SHA1(74364cf2b04dcfbbc8e0131fa12c0e574f693d34) )
+ ROM_LOAD( "univgw1.4", 0x4000, 0x0400, CRC(0871156e) SHA1(3726d0bfe153a0afc62ea56737662074986064b0) )
+ ROM_LOAD( "univgw2.5", 0x4400, 0x0400, CRC(6036d7bf) SHA1(36c2ad2ffdb47bbecc40fd67ced6ab51a5cd2f3e) )
+ROM_END
+
+ROM_START( galxwar2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "3192.h6", 0x0000, 0x1000, CRC(bde6860b) SHA1(e04b8add32d8f7ea588fae6d6a387f1d40495f1b) )
+ ROM_LOAD( "3193.h7", 0x4000, 0x1000, CRC(a17cd507) SHA1(554ab0e8bdc0e7af4a30b0ddc8aa053c8e70255c) ) /* 2nd half unused */
+ROM_END
+
+ROM_START( galxwart )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "galxwars.0", 0x0000, 0x0400, CRC(608bfe7f) SHA1(a41a40a2f0a1bb61a70b9ff8a7da925ab1db7f74) )
+ ROM_LOAD( "galxwars.1", 0x0400, 0x0400, CRC(a810b258) SHA1(030a72fffcf240f643bc3006028cb4883cf58bbc) )
+ ROM_LOAD( "galxwars.2", 0x0800, 0x0400, CRC(74f31781) SHA1(1de70e8ebbb26eea20ffedb7bd0ca051a67f45e7) )
+ ROM_LOAD( "galxwars.3", 0x0c00, 0x0400, CRC(c88f886c) SHA1(4d705fbb97e3868c3f6c90c5e5753ad17cfbf5d6) )
+ ROM_LOAD( "galxwars.4", 0x4000, 0x0400, CRC(ae4fe8fb) SHA1(494f44167dc84e4515b769c12f6e24419461dce4) )
+ ROM_LOAD( "galxwars.5", 0x4400, 0x0400, CRC(37708a35) SHA1(df6fd521ddfa146ef93e390e47741bdbfda1e7ba) )
+ROM_END
+
+ROM_START( starw )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "roma", 0x0000, 0x0400, CRC(60e8993c) SHA1(0bdf163ff0f2e6a8771987d4e7ac604c45af21b8) )
+ ROM_LOAD( "romb", 0x0400, 0x0400, CRC(b8060773) SHA1(92aa358c338ef8f5773bccada8988d068764e7ea) )
+ ROM_LOAD( "romc", 0x0800, 0x0400, CRC(307ce6b8) SHA1(f4b6f54db3d2377ec27d62d33fa1c4946559a092) )
+ ROM_LOAD( "romd", 0x1400, 0x0400, CRC(2b0d0a88) SHA1(d079d12b6d4136519ded32415d668a02147b7601) )
+ ROM_LOAD( "rome", 0x1800, 0x0400, CRC(5b1c3ad0) SHA1(edb42eec59c3dd7e274e2ea08fed0f3e8fc72e9e) )
+ ROM_LOAD( "romf", 0x1c00, 0x0400, CRC(c8e42d3d) SHA1(841b27af251b9c3a964972e864fb7c88acc742e0) )
+ROM_END
+
+ROM_START( lrescue )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "lrescue.1", 0x0000, 0x0800, CRC(2bbc4778) SHA1(0167f1ac1501ab0b4c4e555023fa5efed59d56ae) )
+ ROM_LOAD( "lrescue.2", 0x0800, 0x0800, CRC(49e79706) SHA1(bed675bb97d59ae0132c007ccead0d096ed2ddf1) )
+ ROM_LOAD( "lrescue.3", 0x1000, 0x0800, CRC(1ac969be) SHA1(67ac47f45b9fa5c530bf6047bb7d5776b52847be) )
+ ROM_LOAD( "lrescue.4", 0x1800, 0x0800, CRC(782fee3c) SHA1(668295e9d6d99084bb4e7c5491f00fe75f4f5a88) )
+ ROM_LOAD( "lrescue.5", 0x4000, 0x0800, CRC(58fde8bc) SHA1(663665ac5254204c1eba18357d9867034eae55eb) )
+ ROM_LOAD( "lrescue.6", 0x4800, 0x0800, CRC(bfb0f65d) SHA1(ea0943d764a16094b6e2289f62ef117c9f838c98) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color map */
+ ROM_LOAD( "7643-1.cpu", 0x0000, 0x0400, CRC(8b2e38de) SHA1(d6a757be31c3a179d31bd3709e71f9e38ec632e9) )
+ ROM_RELOAD( 0x0400, 0x0400 )
+ROM_END
+
+ROM_START( grescue )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "lrescue.1", 0x0000, 0x0800, CRC(2bbc4778) SHA1(0167f1ac1501ab0b4c4e555023fa5efed59d56ae) )
+ ROM_LOAD( "lrescue.2", 0x0800, 0x0800, CRC(49e79706) SHA1(bed675bb97d59ae0132c007ccead0d096ed2ddf1) )
+ ROM_LOAD( "lrescue.3", 0x1000, 0x0800, CRC(1ac969be) SHA1(67ac47f45b9fa5c530bf6047bb7d5776b52847be) )
+ ROM_LOAD( "grescue.4", 0x1800, 0x0800, CRC(ca412991) SHA1(41b59f338a6c246e0942a8bfa3c0bca2c24c7f81) )
+ ROM_LOAD( "grescue.5", 0x4000, 0x0800, CRC(a419a4d6) SHA1(8eeeb31cbebffc98d2c6c5b964f9b320fcf303d2) )
+ ROM_LOAD( "lrescue.6", 0x4800, 0x0800, CRC(bfb0f65d) SHA1(ea0943d764a16094b6e2289f62ef117c9f838c98) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color map */
+ ROM_LOAD( "7643-1.cpu", 0x0000, 0x0400, CRC(8b2e38de) SHA1(d6a757be31c3a179d31bd3709e71f9e38ec632e9) )
+ ROM_RELOAD( 0x0400, 0x0400 )
+ROM_END
+
+ROM_START( desterth )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "36_h.bin", 0x0000, 0x0800, CRC(f86923e5) SHA1(d19935ba3d2c1c2553b3779f1a7ad8856c003dae) )
+ ROM_LOAD( "35_g.bin", 0x0800, 0x0800, CRC(797f440d) SHA1(a96917f2296ae467acc795eacc1533a2a2d2f401) )
+ ROM_LOAD( "34_f.bin", 0x1000, 0x0800, CRC(993d0846) SHA1(6be0c45add41fa7e43cac96c776cd0ebb45ade7b) )
+ ROM_LOAD( "33_e.bin", 0x1800, 0x0800, CRC(8d155fc5) SHA1(1ef5e62d71abbf870c027fa1e477121ff124b8da) )
+ ROM_LOAD( "32_d.bin", 0x4000, 0x0800, CRC(3f531b6f) SHA1(2fc1f4912688986650e20a050a5d63ddecd4267e) )
+ ROM_LOAD( "31_c.bin", 0x4800, 0x0800, CRC(ab019c30) SHA1(33931510a722168bcf7c30d22eac9345576b6631) )
+ ROM_LOAD( "42_b.bin", 0x5000, 0x0800, CRC(ed9dbac6) SHA1(4553f445ac32ebb1be490b02df4924f76557e8f9) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color map */
+ ROM_LOAD( "7643-1.cpu", 0x0000, 0x0400, CRC(8b2e38de) SHA1(d6a757be31c3a179d31bd3709e71f9e38ec632e9) )
+ ROM_RELOAD( 0x0400, 0x0400 )
+ROM_END
+
+ROM_START( lrescuem )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "48.ic36", 0x0000, 0x0400, CRC(bad5ba48) SHA1(6d8a2df172e058d16f196ad7f29430e9fd1fdaa8) )
+ ROM_LOAD( "49.ic35", 0x0400, 0x0400, CRC(a6dc23d6) SHA1(76b9105935bf239ae90b47900f64dac3032ceecd) )
+ ROM_LOAD( "50.ic34", 0x0800, 0x0400, CRC(90179fee) SHA1(35059f7399229b8d9588d34f79073fa4d3301614) )
+ ROM_LOAD( "51.ic33", 0x0c00, 0x0400, CRC(1d197d87) SHA1(21e049f9c2a0fe1c0403d9d1a2dc695c4ee764f9) )
+ ROM_LOAD( "52.ic32", 0x1000, 0x0400, CRC(4326d338) SHA1(ac31645bdf292f28dfcfcb9d5e158e5df7a6f95d) )
+ ROM_LOAD( "53.ic31", 0x1400, 0x0400, CRC(3b272372) SHA1(39b807c810d093d7a34b102eec16f3d9baeb21f1) )
+ ROM_LOAD( "54.ic42", 0x1800, 0x0400, CRC(a877c5b6) SHA1(862871c3dd18221d5713fe1fd2dc4f5b7cb913c1) )
+ ROM_LOAD( "55.ic41", 0x1c00, 0x0400, CRC(c9a93407) SHA1(604bcace8e3bec07db6ca8a8918b306b77643e14) )
+ ROM_LOAD( "56.ic40", 0x4000, 0x0400, CRC(3398798f) SHA1(d7dd9e65a1048df8edd217f4206b19cd01f143f4) )
+ ROM_LOAD( "57.ic39", 0x4400, 0x0400, CRC(37c5bfc6) SHA1(b0aec85e6f979cdf7a3a985830c8530302804837) )
+ ROM_LOAD( "58.ic38", 0x4800, 0x0400, CRC(1b7a5644) SHA1(d26530ea11ada86f7c99b11d6faf4416a8f5a9eb) )
+ ROM_LOAD( "59.ic37", 0x4c00, 0x0400, CRC(c342b907) SHA1(327da029420c4eedabc2a0534199a008a3f341b8) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 - these don't really fit this game, but were on the PCB */
+ ROM_LOAD( "cv01-7643.2c", 0x0000, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
+ ROM_LOAD( "cv02-7643.1c", 0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
+ROM_END
+
+ROM_START( cosmo )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1.36", 0x0000, 0x0800, CRC(445c9a98) SHA1(89bce80a061e9c12544231f970d9dec801eb1b94) )
+ ROM_LOAD( "2.35", 0x0800, 0x0800, CRC(df3eb731) SHA1(fb90c1d0f2518195dd49062c9f0fd890536d89f4) )
+ ROM_LOAD( "3.34", 0x1000, 0x0800, CRC(772c813f) SHA1(a1c0d857c660fb0b838dd0466af7bf5d73bcd55d) )
+ ROM_LOAD( "4.33", 0x1800, 0x0800, CRC(279f66e6) SHA1(8ce71c08cca0bdde2f2e0ef21622731c4610c030) )
+ ROM_LOAD( "5.32", 0x4000, 0x0800, CRC(cefb18df) SHA1(bb500cf3f7d1a54045a165d3613a92ab3f11d3e8) )
+ ROM_LOAD( "6.31", 0x4800, 0x0800, CRC(b037f6c4) SHA1(b9a42948052b8cda8d2e4575e59909589f4e7a8d) )
+ ROM_LOAD( "7.42", 0x5000, 0x0800, CRC(c3831ea2) SHA1(8c67ef0312656ef0eeff34b8463376c736bd8ea1) )
+
+ ROM_REGION( 0x1000, REGION_PROMS, 0 ) /* color map */
+ ROM_LOAD( "n-1.7d", 0x0800, 0x0800, CRC(bd8576f1) SHA1(aa5fe0a4d024f21a3bca7a6b3f5022779af6f3f4) )
+ ROM_LOAD( "n-2.6e", 0x0000, 0x0800, CRC(48f1ade5) SHA1(a1b45f82f3649cde8ae6a2ef494a3a6cdb5e65d0) )
+ROM_END
+
+ROM_START( cosmicmo )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "cosmicmo.1", 0x0000, 0x0400, CRC(d6e4e5da) SHA1(8b4275a3c71ac3fa80d17237dc04de5f586645f4) )
+ ROM_LOAD( "cosmicmo.2", 0x0400, 0x0400, CRC(8f7988e6) SHA1(b6a01d5dcab013350f8f7f3e3ebfc986bb939fe0) )
+ ROM_LOAD( "cosmicmo.3", 0x0800, 0x0400, CRC(2d2e9dc8) SHA1(dd3da4fc752e003e5e7c64bf189288133aed545b) )
+ ROM_LOAD( "cosmicmo.4", 0x0c00, 0x0400, CRC(26cae456) SHA1(2f2262340c10e5c29d71317f6eb8072c26655563) )
+ ROM_LOAD( "cosmicmo.5", 0x4000, 0x0400, CRC(b13f228e) SHA1(a0de05aa36435e72c77f5333f3ad964ec448a8f0) )
+ ROM_LOAD( "cosmicmo.6", 0x4400, 0x0400, CRC(4ae1b9c4) SHA1(8eed87eebe68caa775fa679363b0fe3728d98c34) )
+ ROM_LOAD( "cosmicmo.7", 0x4800, 0x0400, CRC(6a13b15b) SHA1(dc03a6c3e938cfd08d16bd1660899f951ba72ea2) )
+ROM_END
+
+ROM_START( cosmicm2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "3907.bin", 0x0000, 0x1000, CRC(bbffede6) SHA1(e7505ee8e3f19557ebbfd0145dc2ae0d1c529eba) )
+ ROM_LOAD( "3906.bin", 0x4000, 0x1000, CRC(b841f894) SHA1(b1f9e1800969baab14da2fd8873b58d4707b7236) )
+ROM_END
+
+ROM_START( superinv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "00", 0x0000, 0x0400, CRC(7a9b4485) SHA1(dde918ec106971972bf7c7e5085c1262522f7e35) )
+ ROM_LOAD( "01", 0x0400, 0x0400, CRC(7c86620d) SHA1(9e92ec0aa4eee96a7fa115a14a611c488d13b9dd) )
+ ROM_LOAD( "02", 0x0800, 0x0400, CRC(ccaf38f6) SHA1(8eb0456e8abdba0d1dda20a335a9ecbe7c38f9ed) )
+ ROM_LOAD( "03", 0x1400, 0x0400, CRC(8ec9eae2) SHA1(48d7a7dc61e0417ca4093e5c2a36efd96e359233) )
+ ROM_LOAD( "04", 0x1800, 0x0400, CRC(68719b30) SHA1(2084bd63cd61ef1d2497c32112cdb42b7b582da4) )
+ ROM_LOAD( "05", 0x1c00, 0x0400, CRC(8abe2466) SHA1(17494b1e5db207e37a7d28d7c89cbc5f36b7aefc) )
+ROM_END
+
+ROM_START( invasion )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "10136-0.0k", 0x0000, 0x0400, CRC(7a9b4485) SHA1(dde918ec106971972bf7c7e5085c1262522f7e35) )
+ ROM_LOAD( "10136-1.1k", 0x0400, 0x0400, CRC(7c86620d) SHA1(9e92ec0aa4eee96a7fa115a14a611c488d13b9dd) )
+ ROM_LOAD( "10136-2.2k", 0x0800, 0x0400, CRC(ccaf38f6) SHA1(8eb0456e8abdba0d1dda20a335a9ecbe7c38f9ed) )
+ ROM_LOAD( "10136-5.5k", 0x1400, 0x0400, CRC(8ec9eae2) SHA1(48d7a7dc61e0417ca4093e5c2a36efd96e359233) )
+ ROM_LOAD( "10136-6.6k", 0x1800, 0x0400, CRC(ff0b0690) SHA1(8547c4b2a228f1690287217a916613c8f0caccf6) )
+ ROM_LOAD( "10136-7.7k", 0x1c00, 0x0400, CRC(75d7acaf) SHA1(977d146d7df555cea1bb2156d29d88bec9731f98) )
+ROM_END
+
+ROM_START( rollingc )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "rc01.bin", 0x0000, 0x0400, CRC(66fa50bf) SHA1(7451d4ff8d3b351a324aaecdbdc5b46672f5fdd0) )
+ ROM_LOAD( "rc02.bin", 0x0400, 0x0400, CRC(61c06ae4) SHA1(7685c806e20e4a4a0508a547ac08ca8f6d75bb79) )
+ ROM_LOAD( "rc03.bin", 0x0800, 0x0400, CRC(77e39fa0) SHA1(16bf88af1b97c5a2a81e105af08b8d9d1f10dcc8) )
+ ROM_LOAD( "rc04.bin", 0x0c00, 0x0400, CRC(3fdfd0f3) SHA1(4c5e7136a766f3f16399e61eaaa0e00ef6b619f7) )
+ ROM_LOAD( "rc05.bin", 0x1000, 0x0400, CRC(c26a8f5b) SHA1(f7a541999cfe04c6d6927d285484f0f81857e04a) )
+ ROM_LOAD( "rc06.bin", 0x1400, 0x0400, CRC(0b98dbe5) SHA1(33cedab82ddccb4caaf681fce553b5230a8d6f92) )
+ ROM_LOAD( "rc07.bin", 0x1800, 0x0400, CRC(6242145c) SHA1(b01bb02835dda89dc02604ec52e423167183e8c9) )
+ ROM_LOAD( "rc08.bin", 0x1c00, 0x0400, CRC(d23c2ef1) SHA1(909e3d53291dbd219f4f9e0047c65317b9f6d5bd) )
+
+ ROM_LOAD( "rc09.bin", 0x4000, 0x0800, CRC(2e2c5b95) SHA1(33f4e2789d67e355ccd99d2c0d07301ec2bd3bc1) )
+ ROM_LOAD( "rc10.bin", 0x4800, 0x0800, CRC(ef94c502) SHA1(07c0504b2ebce0fa6e53e6957e7b6c0e9caab430) )
+ ROM_LOAD( "rc11.bin", 0x5000, 0x0800, CRC(a3164b18) SHA1(7270af25fa4171f86476f5dc409e658da7fba7fc) )
+ ROM_LOAD( "rc12.bin", 0x5800, 0x0800, CRC(2052f6d9) SHA1(036702fc40cf133eb374ed674695d7c6c79e8311) )
+ROM_END
+
+ROM_START( schaser )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "rt13.bin", 0x0000, 0x0400, CRC(0dfbde68) SHA1(7367b138ad8448aba9222fed632a892df65cecbd) )
+ ROM_LOAD( "rt14.bin", 0x0400, 0x0400, CRC(5a508a25) SHA1(c681d0bbf49317e79b596fb094e66b8912f0e409) )
+ ROM_LOAD( "rt15.bin", 0x0800, 0x0400, CRC(2ac43a93) SHA1(d364f0940681a888c0147e06bcb01f8a0d4a24c8) )
+ ROM_LOAD( "rt16.bin", 0x0c00, 0x0400, CRC(f5583afc) SHA1(5e8edb43ccb138fd47ac8f3da1af79b4444a4a82) )
+ ROM_LOAD( "rt17.bin", 0x1000, 0x0400, CRC(51cf1155) SHA1(fd8c82d951602fd7e0ada65fc7cdee9f277c70db) )
+ ROM_LOAD( "rt18.bin", 0x1400, 0x0400, CRC(3f0fc73a) SHA1(b801c3f1e8e6e41c564432db7c5891f6b27293b2) )
+ ROM_LOAD( "rt19.bin", 0x1800, 0x0400, CRC(b66ea369) SHA1(d277f572f9c7c4301518546cf60671a6539326ee) )
+ ROM_LOAD( "rt20.bin", 0x1c00, 0x0400, CRC(e3a7466a) SHA1(2378970f38b0cec066ef853a6540500e468e4ab4) )
+ ROM_LOAD( "rt21.bin", 0x4000, 0x0400, CRC(b368ac98) SHA1(6860efe0496955db67611183be0efecda92c9c98) )
+ ROM_LOAD( "rt22.bin", 0x4400, 0x0400, CRC(6e060dfb) SHA1(614e2ecf676c3ea2f9ea869125cfffef2f713684) )
+
+ ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* background color map */
+ ROM_LOAD( "rt06.ic2", 0x0000, 0x0400, CRC(950cf973) SHA1(d22df09b325835a0057ccd0d54f827b374254ac6) )
+ROM_END
+
+ROM_START( sflush )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "taitofr.005", 0xd800, 0x800, CRC(c4f08f9f) SHA1(997f216f5244942fc1a19f5c1988adbfadc301fc) )
+ ROM_LOAD( "taitofr.004", 0xe000, 0x800, CRC(87a754a5) SHA1(07c0e2c3cb7aa0086d8f4dd202a452bc6c20d4ee) )
+ ROM_LOAD( "taitofr.003", 0xe800, 0x800, CRC(5b12847f) SHA1(4b62342723dd49a387fae6637c331d7c853712a3) )
+ ROM_LOAD( "taitofr.002", 0xf000, 0x800, CRC(291c9b1f) SHA1(7e5b3e1605581abf3d8165f4de9d4e32a5ee3bb0) )
+ ROM_LOAD( "taitofr.001", 0xf800, 0x800, CRC(55d688c6) SHA1(574a3a2ca73cabb4b8f3444aa4464e6d64daa3ad) )
+ROM_END
+
+ROM_START( schasrcv )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1", 0x0000, 0x0400, CRC(bec2b16b) SHA1(c62210ecb64d7c38e5b63481d7fe04eb59bb1068) )
+ ROM_LOAD( "2", 0x0400, 0x0400, CRC(9d25e608) SHA1(4cc52a93a3ab96a0ec1d07593e17832fa59b30a1) )
+ ROM_LOAD( "3", 0x0800, 0x0400, CRC(113d0635) SHA1(ab5e98d0b5fc37d7d69bb5c541681a0f66460440) )
+ ROM_LOAD( "4", 0x0c00, 0x0400, CRC(f3a43c8d) SHA1(29a7a8b7d1de763a255cfec79157fd95e7bff551) )
+ ROM_LOAD( "5", 0x1000, 0x0400, CRC(47c84f23) SHA1(61b475fa92b8335f8edd3a128d8ac8561658e464) )
+ ROM_LOAD( "6", 0x1400, 0x0400, CRC(02ff2199) SHA1(e12c235b2064cb4bb426145172e523256e3c6358) )
+ ROM_LOAD( "7", 0x1800, 0x0400, CRC(87d06b88) SHA1(2d743161f85e47cb8ee2a600cbee790b1ad7ad99) )
+ ROM_LOAD( "8", 0x1c00, 0x0400, CRC(6dfaad08) SHA1(2184c4e2f4b6bffdc4fe13e178134331fcd43253) )
+ ROM_LOAD( "9", 0x4000, 0x0400, CRC(3d1a2ae3) SHA1(672ad6590aebdfebc2748455fa638107f3934c41) )
+ ROM_LOAD( "10", 0x4400, 0x0400, CRC(037edb99) SHA1(f2fc5e61f962666e7f6bb81753ac24ea0b97e581) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 (not used, but they were on the board) */
+ ROM_LOAD( "cv01", 0x0000, 0x0400, CRC(037e16ac) SHA1(d585030aaff428330c91ae94d7cd5c96ebdd67dd) )
+ ROM_LOAD( "cv02", 0x0400, 0x0400, CRC(8263da38) SHA1(2e7c769d129e6f8a1a31eba1e02777bb94ac32b2) )
+ROM_END
+
+ROM_START( lupin3 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "lp12.bin", 0x0000, 0x0800, CRC(68a7f47a) SHA1(dce99b3810331d7603fa468f1dea984e571f709b) )
+ ROM_LOAD( "lp13.bin", 0x0800, 0x0800, CRC(cae9a17b) SHA1(a333ba7db45325996e3254ab36162bb7577e8a38) )
+ ROM_LOAD( "lp14.bin", 0x1000, 0x0800, CRC(3553b9e4) SHA1(6affb5b6caf08f365c0dce669e44046295c3df91) )
+ ROM_LOAD( "lp15.bin", 0x1800, 0x0800, CRC(acbeef64) SHA1(50d78cdc9938285b6bf9fa81fa0f6c30b23e0756) )
+ ROM_LOAD( "lp16.bin", 0x4000, 0x0800, CRC(19fcdc54) SHA1(2f18ee8158321fff68886ffe793724001e8b18c2) )
+ ROM_LOAD( "lp17.bin", 0x4800, 0x0800, CRC(66289ab2) SHA1(fc9b4a7b7a08d43f34beaf1a8e68ed0ff6148534) )
+ ROM_LOAD( "lp18.bin", 0x5000, 0x0800, CRC(2f07b4ba) SHA1(982e4c437b39b45e23d15af1b2fc8c7aa3034559) )
+ROM_END
+
+ROM_START( polaris )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ps-01", 0x0000, 0x0800, CRC(c04ce5a9) SHA1(62cc9b3b682ebecfb7600393862c65e26ff5263f) )
+ ROM_LOAD( "ps-09", 0x0800, 0x0800, CRC(9a5c8cb2) SHA1(7a8c5d74f8b431072d9476d3ef65a3fe1d639813) )
+ ROM_LOAD( "ps-08", 0x1000, 0x0800, CRC(8680d7ea) SHA1(7fd4b8a415666c36842fed80d2798b48f8b29d0d) )
+ ROM_LOAD( "ps-04", 0x1800, 0x0800, CRC(65694948) SHA1(de92a7f3e3ef732b573254baa60df60f8e068a5d) )
+ ROM_LOAD( "ps-05", 0x4000, 0x0800, CRC(772e31f3) SHA1(fa0b866b6df1a9217e286ca880b3bb3fb0644bf3) )
+ ROM_LOAD( "ps-10", 0x4800, 0x0800, CRC(3df77bac) SHA1(b3275c34b8d42df83df2c404c5b7d220aae651fa) )
+
+ ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* background color map */
+ ROM_LOAD( "ps07", 0x0000, 0x0400, CRC(164aa05d) SHA1(41c699ce45c76a60c71294f25d8df6c6e6c1280a) )
+
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* cloud graphics */
+ ROM_LOAD( "mb7052.2c", 0x0000, 0x0100, CRC(2953253b) SHA1(2fb851bc9652ca4e51d473b484ede6dab05f1b51) )
+ROM_END
+
+ROM_START( polarisa )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ps01-1", 0x0000, 0x0800, CRC(7d41007c) SHA1(168f002fe997aac6e4141292de826d389859bb04) )
+ ROM_LOAD( "ps-09", 0x0800, 0x0800, CRC(9a5c8cb2) SHA1(7a8c5d74f8b431072d9476d3ef65a3fe1d639813) )
+ ROM_LOAD( "ps03-1", 0x1000, 0x0800, CRC(21f32415) SHA1(6ac9ae9b55e342729fe260147021ed3911a24dc2) )
+ ROM_LOAD( "ps-04", 0x1800, 0x0800, CRC(65694948) SHA1(de92a7f3e3ef732b573254baa60df60f8e068a5d) )
+ ROM_LOAD( "ps-05", 0x4000, 0x0800, CRC(772e31f3) SHA1(fa0b866b6df1a9217e286ca880b3bb3fb0644bf3) )
+ ROM_LOAD( "ps-10", 0x4800, 0x0800, CRC(3df77bac) SHA1(b3275c34b8d42df83df2c404c5b7d220aae651fa) )
+ ROM_LOAD( "ps26", 0x5000, 0x0800, CRC(9d5c3d50) SHA1(a6acf9ca6e807625156cb1759269014d5830a44f) )
+
+ ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* background color map */
+ ROM_LOAD( "ps07", 0x0000, 0x0400, CRC(164aa05d) SHA1(41c699ce45c76a60c71294f25d8df6c6e6c1280a) )
+
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* cloud graphics */
+ ROM_LOAD( "mb7052.2c", 0x0000, 0x0100, CRC(2953253b) SHA1(2fb851bc9652ca4e51d473b484ede6dab05f1b51) )
+ROM_END
+
+ROM_START( ozmawars )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "mw01", 0x0000, 0x0800, CRC(31f4397d) SHA1(bba9765aadd608d19e2515a5edf8e0eceb70916a) )
+ ROM_LOAD( "mw02", 0x0800, 0x0800, CRC(d8e77c62) SHA1(84fc81cf9a924ecbb13a008cd7435b7d465bddf6) )
+ ROM_LOAD( "mw03", 0x1000, 0x0800, CRC(3bfa418f) SHA1(7318878202322a2263551ca463e4c70943401f68) )
+ ROM_LOAD( "mw04", 0x1800, 0x0800, CRC(e190ce6c) SHA1(120898e9a683f5ce874c6fde761570a26de2fa8c) )
+ ROM_LOAD( "mw05", 0x4000, 0x0800, CRC(3bc7d4c7) SHA1(b084f8cd2ce0f502c2e915da3eceffcbb448e9c0) )
+ ROM_LOAD( "mw06", 0x4800, 0x0800, CRC(99ca2eae) SHA1(8d0f220f68043eff0c85d2de7bee7fd4365fb51c) )
+ROM_END
+
+ROM_START( ozmawar2 )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "mw01", 0x0000, 0x0800, CRC(31f4397d) SHA1(bba9765aadd608d19e2515a5edf8e0eceb70916a) )
+ ROM_LOAD( "mw02", 0x0800, 0x0800, CRC(d8e77c62) SHA1(84fc81cf9a924ecbb13a008cd7435b7d465bddf6) )
+ ROM_LOAD( "oz5", 0x1000, 0x0400, CRC(5597bf52) SHA1(626c7348365ed974d416485d94d057745b5d9b96) )
+ ROM_LOAD( "oz6", 0x1400, 0x0400, CRC(19b43578) SHA1(3609b7c77f5ee6f10f302892f56fcc8375577f20) )
+ ROM_LOAD( "oz7", 0x1800, 0x0400, CRC(a285bfde) SHA1(ed7a9fce4d887d3b5d596645893ea87c0bafda02) )
+ ROM_LOAD( "oz8", 0x1c00, 0x0400, CRC(ae59a629) SHA1(0c9ea67dc35f93ec65ec91e1dab2e4b6212428bf) )
+ ROM_LOAD( "mw05", 0x4000, 0x0800, CRC(3bc7d4c7) SHA1(b084f8cd2ce0f502c2e915da3eceffcbb448e9c0) )
+ ROM_LOAD( "oz11", 0x4800, 0x0400, CRC(660e934c) SHA1(1d50ae3a9de041b908e256892203ce1738d588f6) )
+ ROM_LOAD( "oz12", 0x4c00, 0x0400, CRC(8b969f61) SHA1(6d12cacc73c31a897812ccd8de24725ee56dd975) )
+ROM_END
+
+ROM_START( solfight )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "solfight.m", 0x0000, 0x0800, CRC(a4f2814e) SHA1(e2437e3543dcc97eeaea32babcd4aec6455581ac) )
+ ROM_LOAD( "solfight.n", 0x0800, 0x0800, CRC(5657ec07) SHA1(9a2fb398841160f59483bb70060caba37addb8a4) )
+ ROM_LOAD( "solfight.p", 0x1000, 0x0800, CRC(ef9ce96d) SHA1(96867b4f2d72f3a8827b1eb3a0748922eaa8d608) )
+ ROM_LOAD( "solfight.r", 0x1800, 0x0800, CRC(4f1ef540) SHA1(a798e57959e72bfb554dd2fed0e37027312f9ed3) )
+ ROM_LOAD( "mw05", 0x4000, 0x0800, CRC(3bc7d4c7) SHA1(b084f8cd2ce0f502c2e915da3eceffcbb448e9c0) )
+ ROM_LOAD( "solfight.t", 0x4800, 0x0800, CRC(3b6fb206) SHA1(db631f4a0bd5344d130ff8d723d949e9914b6f92) )
+ROM_END
+
+ROM_START( spaceph )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "sv01.bin", 0x0000, 0x0400, CRC(de84771d) SHA1(13a7e5eedb826cca4d59634d38db9fcf5e65b732) )
+ ROM_LOAD( "sv02.bin", 0x0400, 0x0400, CRC(957fc661) SHA1(ac0edc901d8033619f62967f8eaf53a02947e109) )
+ ROM_LOAD( "sv03.bin", 0x0800, 0x0400, CRC(dbda38b9) SHA1(73a277616a0c236b07c9ffa66f16a27a78c12d70) )
+ ROM_LOAD( "sv04.bin", 0x0c00, 0x0400, CRC(f51544a5) SHA1(368411a2dadaebcbb4d5b6cf6c2beec036ce817f) )
+ ROM_LOAD( "sv05.bin", 0x1000, 0x0400, CRC(98d02683) SHA1(f13958df8d385f532e993e4c34569d992904a4ed) )
+ ROM_LOAD( "sv06.bin", 0x1400, 0x0400, CRC(4ec390fd) SHA1(ade23efde5d55d282fbb28a5f8a1346601501b79) )
+ ROM_LOAD( "sv07.bin", 0x1800, 0x0400, CRC(170862fd) SHA1(ac64a97b1510ca81d4ef3a5fcf45b7e6c7414914) )
+ ROM_LOAD( "sv08.bin", 0x1c00, 0x0400, CRC(511b12cf) SHA1(08ba43024c8574ded11aa457eca24b72984f5ea9) )
+ ROM_LOAD( "sv09.bin", 0x4000, 0x0400, CRC(af1cd1af) SHA1(286d77e8556e475b291a3b1a53acaca8b7dc3678) )
+ ROM_LOAD( "sv10.bin", 0x4400, 0x0400, CRC(31b7692e) SHA1(043880750d134d04311eab55e30ee223977d3d17) )
+ ROM_LOAD( "sv11.bin", 0x4800, 0x0400, CRC(50257351) SHA1(5c3eb29f36f04b7fb8f0351ccf9c8cfc7587f927) )
+ ROM_LOAD( "sv12.bin", 0x4c00, 0x0400, CRC(a2a3366a) SHA1(87032787450216d378406122effa95ea01145bf7) )
+ROM_END
+
+ROM_START( ballbomb )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "tn01", 0x0000, 0x0800, CRC(551585b5) SHA1(7c17b046bdfca6ab107b7e68ba9bde6ca590c3d4) )
+ ROM_LOAD( "tn02", 0x0800, 0x0800, CRC(7e1f734f) SHA1(a15656818cd730d9bc98d00ff1e7fe3f860bd624) )
+ ROM_LOAD( "tn03", 0x1000, 0x0800, CRC(d93e20bc) SHA1(2bf72f813750cef8fad572a18fb8e9fd5bf38804) )
+ ROM_LOAD( "tn04", 0x1800, 0x0800, CRC(d0689a22) SHA1(1f6b258431b7eb878853ff979e4d97a05fb6b797) )
+ ROM_LOAD( "tn05-1", 0x4000, 0x0800, CRC(5d5e94f1) SHA1(b9f8ba38161ef4f0940c274e9d93fed4bb7db017) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "tn06", 0x0000, 0x0400, CRC(7ec554c4) SHA1(b638605ba2043fdca4c5e18755fa5fa81ed3db07) )
+ ROM_LOAD( "tn07", 0x0400, 0x0400, CRC(deb0ac82) SHA1(839581c4e58cb7b0c2c14cf4f239220017cc26eb) )
+
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* cloud graphics (missing) */
+ ROM_LOAD( "mb7052.2c", 0x0000, 0x0100, NO_DUMP )
+ROM_END
+
+ROM_START( yosakdon )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "yd1.bin", 0x0000, 0x0400, CRC(607899c9) SHA1(219c0c99894715818606fba49cc75517f6f43e0c) )
+ ROM_LOAD( "yd2.bin", 0x0400, 0x0400, CRC(78336df4) SHA1(b0b6254568d191d2d0b9c9280a3ccf2417ef3f38) )
+ ROM_LOAD( "yd3.bin", 0x0800, 0x0400, CRC(c5af6d52) SHA1(c40af79fe060562c64fc316881b7d0348e11ee3f) )
+ ROM_LOAD( "yd4.bin", 0x0c00, 0x0400, CRC(dca8064f) SHA1(77a58137cc7f0b5fbe0e9e8deb9c5be88b1ebbcf) )
+ ROM_LOAD( "yd5.bin", 0x1400, 0x0400, CRC(38804ff1) SHA1(9b7527b9d2b106355f0c8df46666b1e3f286b2e3) )
+ ROM_LOAD( "yd6.bin", 0x1800, 0x0400, CRC(988d2362) SHA1(deaf864b4e287cbc2585c2a11343b1ae82e15463) )
+ ROM_LOAD( "yd7.bin", 0x1c00, 0x0400, CRC(2744e68b) SHA1(5ad5a7a615d36f57b6d560425e035c15e25e9005) )
+ROM_END
+
+ROM_START( yosakdoa )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "yosaku1", 0x0000, 0x0400, CRC(d132f4f0) SHA1(373c7ea1bd6debcb3dad5881793b8c31dc7a01e6) )
+ ROM_LOAD( "yd2.bin", 0x0400, 0x0400, CRC(78336df4) SHA1(b0b6254568d191d2d0b9c9280a3ccf2417ef3f38) )
+ ROM_LOAD( "yosaku3", 0x0800, 0x0400, CRC(b1a0b3eb) SHA1(4eb80668920b45dc6216424f8ca53d753a35f4f1) )
+ ROM_LOAD( "yosaku4", 0x0c00, 0x0400, CRC(c06c225e) SHA1(2699e3c13b09b6de16bd3ca3ca2e9d7a91b7e268) )
+ ROM_LOAD( "yosaku5", 0x1400, 0x0400, CRC(ae422a43) SHA1(5219680f9d6c5d984b29167f85106fa375856121) )
+ ROM_LOAD( "yosaku6", 0x1800, 0x0400, CRC(26b24a12) SHA1(387589fa4027d41b6fb06555661d4f92fe2f990c) )
+ ROM_LOAD( "yosaku7", 0x1c00, 0x0400, CRC(878d5a18) SHA1(6adc8763d5644602eed7fe6d9186a48be105aace) )
+ROM_END
+
+ROM_START( indianbt )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1.36", 0x0000, 0x0800, CRC(ddc2b25d) SHA1(120ae17492b79d7d2ad515de9f1e3be7f8b9d4eb) )
+ ROM_LOAD( "2.35", 0x0800, 0x0800, CRC(6499b062) SHA1(62a301d532b9fc4e7a17cbe8d2061eb0e842bdfa) )
+ ROM_LOAD( "3.34", 0x1000, 0x0800, CRC(5c51675d) SHA1(1313e8794ee6cd0252452b96d42cff7907eeaa21) )
+ ROM_LOAD( "4.33", 0x1800, 0x0800, CRC(70ebec95) SHA1(f6e1e7a28033d89e49b88c559ea8926b1b4ff21b) )
+ ROM_LOAD( "5.32", 0x4000, 0x0800, CRC(7b4022f4) SHA1(10dec8110e8f4bc79764d3183bdfb3c135e27faf) )
+ ROM_LOAD( "6.31", 0x4800, 0x0800, CRC(89bd6f73) SHA1(5dc63871252c530ef0aae4f4cd02fee44b397815) )
+ ROM_LOAD( "7.42", 0x5000, 0x0800, CRC(7060ba0b) SHA1(366ce02b7b0a3391afef23b8b41cd98a91034830) )
+ ROM_LOAD( "8.41", 0x5800, 0x0800, CRC(eaccfc0a) SHA1(c6c2d702243bdd1d2ad5fbaaceadb5a5798577bc) )
+
+ ROM_REGION( 0x0800, REGION_PROMS, 0 ) /* color maps player 1/player 2 */
+ ROM_LOAD( "mb7054.1", 0x0000, 0x0400, CRC(4acf4db3) SHA1(842a6c9f91806b424b7cc437670b4fe0bd57dff1) )
+ ROM_LOAD( "mb7054.2", 0x0400, 0x0400, CRC(62cb3419) SHA1(3df65062945589f1df37359dbd3e30ae4b23f469) )
+ROM_END
+
+ROM_START( shuttlei )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "1.13c", 0x0000, 0x0400, CRC(b6d4f0cd) SHA1(f855a793e78ff6283288c815b59e6942513ab4f8) )
+ ROM_LOAD( "2.11c", 0x0400, 0x0400, CRC(168d6138) SHA1(e0e5ba58eb5a3a00802504c48a96d63522f9865f) )
+ ROM_LOAD( "3.13d", 0x0800, 0x0400, CRC(804bd7fb) SHA1(f019bcc2894f9b819a14c069de8f1a7d228b79eb) )
+ ROM_LOAD( "4.11d", 0x0c00, 0x0400, CRC(8205b369) SHA1(685dd244881f5762d0f53cbfa935da2b857e3fba) )
+ ROM_LOAD( "5.13e", 0x1000, 0x0400, CRC(b50df820) SHA1(27a846ac3da4c0890a80f60483ed5750cb0b2476) )
+
+ ROM_LOAD( "8.11f", 0x1c00, 0x0400, CRC(4978552b) SHA1(5a6b6e39f57a353580ed9281d7da24950f058426) )
+ROM_END
+
+ROM_START( darthvdr )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "rom0", 0x0000, 0x0400, CRC(b15785b6) SHA1(f453a006019dc83bd746f3a26736e913186332e6) )
+ ROM_LOAD( "rom1", 0x0400, 0x0400, CRC(95947743) SHA1(59f414de21f680e0d68ca8c4b6b538c8006cfdd6) )
+ ROM_LOAD( "rom2", 0x0800, 0x0400, CRC(19b1731f) SHA1(2383c241de8a1ed57f03ecc7ded97585a6c10c91) )
+ ROM_LOAD( "rom3", 0x0c00, 0x0400, CRC(ca1b5e3c) SHA1(e54ca4a3f36b2ed5e4e42c1e8bbbde43c92796e9) )
+ ROM_LOAD( "rom4", 0x1000, 0x0400, CRC(eede5f41) SHA1(cd9f023057eb9598bad01b9e9d91bb4866b9bd3b) )
+ ROM_LOAD( "rom5", 0x1400, 0x0400, CRC(cc52a4bb) SHA1(857b75a8b01fc707db940197d6bf3b0466c4a7b5) )
+ROM_END
+
+ROM_START( astropal )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "2708.0a", 0x0000, 0x0400, CRC(e6883322) SHA1(05b0ab0dc6297209dcfdd173e762bfae3a720e8d) )
+ ROM_LOAD( "2708.1a", 0x0400, 0x0400, CRC(4401df1d) SHA1(16f3b957278aa67cb37bcd5defb6e4dd8ccf7d1f) )
+ ROM_LOAD( "2708.2a", 0x0800, 0x0400, CRC(5bac1ee4) SHA1(8c3e5f882f4798f8ed0523b60a216c989324a7c2) )
+ ROM_LOAD( "2708.3a", 0x0c00, 0x0400, CRC(a870afad) SHA1(1a256db2bc6baa238ee1df4eff2fdce0888f812c) )
+ ROM_LOAD( "2708.4a", 0x1000, 0x0400, CRC(8bd2d985) SHA1(3ff9110c1bad7d4562664da772d14750d738c2d6) )
+ ROM_LOAD( "2708.5a", 0x1400, 0x0400, CRC(5e97a86b) SHA1(f3500d48ecb3969b8aaea9c4e812fbf6cf4170af) )
+ ROM_LOAD( "2708.6a", 0x1800, 0x0400, CRC(22c354d0) SHA1(c465ca5787ad8de3be97deac1214d3abd0b27e6b) )
+ ROM_LOAD( "2708.7a", 0x1c00, 0x0400, CRC(aeca51c1) SHA1(767bca1e6bca41327b9ff6c3570edcabe46dec21) )
+ROM_END
+
+/* board # rom parent machine inp */
+
+/* Taito games */
+GAMEL(1978, sitv, invaders, invaders, sitv, 0, ROT270, "Taito", "Space Invaders (TV Version)", 0, layout_invaders )
+GAME( 1979, sicv, invaders, invadpt2, sicv, 0, ROT270, "Taito", "Space Invaders (CV Version)", 0 )
+GAME( 1978, sisv, invaders, invadpt2, sicv, 0, ROT270, "Taito", "Space Invaders (SV Version)", 0 )
+GAME( 1978, sisv2, invaders, invadpt2, sicv, 0, ROT270, "Taito", "Space Invaders (SV Version 2)", 0 )
+GAMEL(1979, galxwars, 0, invaders, galxwars, 0, ROT270, "Universal", "Galaxy Wars (Universal set 1)", 0, layout_invaders )
+GAMEL(1979, galxwar2, galxwars, invaders, galxwars, 0, ROT270, "Universal", "Galaxy Wars (Universal set 2)", 0, layout_invaders )
+GAMEL(1979, galxwart, galxwars, invaders, galxwars, 0, ROT270, "Taito?", "Galaxy Wars (Taito?)" , 0, layout_invaders) /* Copyright Not Displayed */
+GAMEL(1979, starw, galxwars, invaders, galxwars, 0, ROT270, "bootleg", "Star Wars", 0, layout_invaders )
+GAME( 1979, lrescue, 0, lrescue, lrescue, 0, ROT270, "Taito", "Lunar Rescue", 0 )
+GAME( 1978, lrescuem, lrescue, lrescue, lrescue, 0, ROT270, "Taito (Model Racing bootleg)", "Lunar Rescue (Model Racing bootleg)", 0 )
+GAME( 1979, grescue, lrescue, lrescue, lrescue, 0, ROT270, "Taito (Universal license?)", "Galaxy Rescue", 0 )
+GAME( 1979, desterth, lrescue, lrescue, invrvnge, 0, ROT270, "bootleg", "Destination Earth", 0 )
+GAME( 1979, invadpt2, 0, invadpt2, invadpt2, 0, ROT270, "Taito", "Space Invaders Part II (Taito)", 0 )
+GAME( 1980, invaddlx, invadpt2, invaders, invadpt2, 0, ROT270, "Midway", "Space Invaders Deluxe", 0 )
+GAME( 1979, cosmo, 0, cosmo, cosmo, 0, ROT90, "TDS & Mints", "Cosmo", GAME_IMPERFECT_SOUND )
+GAME( 1979, schaser, 0, schaser, schaser, 0, ROT270, "Taito", "Space Chaser", GAME_IMPERFECT_SOUND| GAME_IMPERFECT_COLORS )
+GAME( 1979, schasrcv, schaser, schasrcv, schasrcv, 0, ROT270, "Taito", "Space Chaser (CV version)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS )
+GAME( 1979, sflush, 0, sflush, sflush, 0, ROT270, "Taito", "Straight Flush",GAME_NO_SOUND| GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL)
+GAME( 1980, lupin3, 0, lupin3, lupin3, 0, ROT270, "Taito", "Lupin III", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL )
+GAME( 1980, polaris, 0, polaris, polaris, 0, ROT270, "Taito", "Polaris (set 1)", 0 )
+GAME( 1980, polarisa, polaris, polaris, polaris, 0, ROT270, "Taito", "Polaris (set 2)", 0 )
+GAME( 1980, ballbomb, 0, ballbomb, ballbomb, 0, ROT270, "Taito", "Balloon Bomber", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) /* missing clouds */
+GAME( 1980, indianbt, 0, indianbt, indianbt, 0, ROT270, "Taito", "Indian Battle", 0 )
+
+/* Misc. manufacturers */
+
+GAMEL(1980, searthin, invaders, invaders, searthin, 0, ROT270, "bootleg", "Super Earth Invasion (set 1)", 0, layout_invaders )
+GAMEL(1980, searthia, invaders, invaders, searthin, 0, ROT270, "bootleg", "Super Earth Invasion (set 2)", 0, layout_invaders )
+GAMEL(1978, invadrmr, invaders, invaders, invadrmr, 0, ROT270, "Model Racing", "Space Invaders (Model Racing)", 0, layout_invaders )
+GAMEL(1978, spaceatt, invaders, invaders, sicv, 0, ROT270, "Video Games GMBH", "Space Attack", 0, layout_invaders )
+GAMEL(1980, spaceat2, invaders, invaders, spaceatt, 0, ROT270, "Zenitone-Microsec Ltd", "Space Attack II", 0, layout_invaders )
+GAMEL(19??, sinvzen, invaders, invaders, spaceatt, 0, ROT270, "Zenitone-Microsec Ltd", "Super Invaders (Zenitone-Microsec)", 0, layout_invaders )
+GAMEL(19??, sinvemag, invaders, invaders, sinvemag, 0, ROT270, "bootleg", "Super Invaders (EMAG)", 0, layout_invaders )
+GAMEL(19??, tst_invd, invaders, invaders, sicv, 0, ROT0, "Test ROM", "Space Invaders Test ROM", 0, layout_invaders )
+GAMEL(19??, alieninv, invaders, invaders, searthin, 0, ROT270, "bootleg", "Alien Invasion Part II", 0, layout_invaders )
+GAMEL(1978, spceking, invaders, invaders, sicv, 0, ROT270, "Leijac Corporation (Konami)","Space King", 0, layout_invaders )
+GAMEL(1978, spcewars, invaders, spcewars, spcewars, 0, ROT270, "Sanritsu", "Space War (Sanritsu)", 0, layout_invaders )
+GAME (19??, astropal, 0, invaders, spcewars, 0, ROT0, "Sidam?", "Astropal", GAME_NOT_WORKING )
+GAMEL(1978, spacewr3, invaders, spcewars, sicv, 0, ROT270, "bootleg", "Space War Part 3", 0, layout_invaders )
+GAMEL(1978, invaderl, invaders, invaders, sicv, 0, ROT270, "Logitec", "Space Invaders (Logitec)", 0, layout_invaders )
+GAMEL(1978, invader4, invaders, invaders, sicv, 0, ROT270, "bootleg", "Space Invaders Part Four", 0, layout_invaders )
+GAMEL(1979, jspecter, invaders, invaders, jspecter, 0, ROT270, "Jatre", "Jatre Specter (set 1)", 0, layout_invaders )
+GAMEL(1979, jspectr2, invaders, invaders, jspecter, 0, ROT270, "Jatre", "Jatre Specter (set 2)", 0, layout_invaders )
+GAMEL(1979, cosmicmo, invaders, invaders, cosmicmo, 0, ROT270, "Universal", "Cosmic Monsters", 0, layout_invaders )
+GAMEL(1979, cosmicm2, invaders, invaders, cosmicmo, 0, ROT270, "Universal", "Cosmic Monsters 2", 0, layout_invaders )
+GAMEL(19??, superinv, invaders, invaders, superinv, 0, ROT270, "bootleg", "Super Invaders", 0, layout_invaders )
+GAMEL(19??, invasion, invaders, invaders, invasion, 0, ROT270, "Sidam", "Invasion", 0, layout_invaders )
+GAME( 19??, darthvdr, invaders, darthvdr, darthvdr, 0, ROT270, "bootleg", "Darth Vader", GAME_NO_SOUND )
+GAME( 1979, moonbase, invadpt2, invadpt2, invadpt2, 0, ROT270, "Nichibutsu", "Moon Base", 0 )
+GAMEL(19??, invrvnge, 0, invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd.", "Invader's Revenge", GAME_IMPERFECT_SOUND, layout_invrvnge )
+GAMEL(19??, invrvnga, invrvnge, invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd. (Dutchford license)", "Invader's Revenge (Dutchford)", GAME_IMPERFECT_SOUND, layout_invrvnge )
+GAME( 1980, spclaser, 0, invaders, spclaser, 0, ROT270, "GamePlan (Taito)", "Space Laser", 0 )
+GAME( 1980, laser, spclaser, invaders, spclaser, 0, ROT270, "Leisure Time Electronics Inc.", "Astro Laser", 0 )
+GAME( 1979, spcewarl, spclaser, invaders, spcewarl, 0, ROT270, "Leijac Corporation (Konami)","Space War (Leijac Corporation)", 0 )
+GAME( 1979, rollingc, 0, rollingc, rollingc, 0, ROT270, "Nichibutsu", "Rolling Crash / Moon Base", 0 )
+GAME( 1979, ozmawars, 0, invaders, ozmawars, 0, ROT270, "SNK", "Ozma Wars (set 1)", 0 )
+GAME( 1979, ozmawar2, ozmawars, invaders, ozmawars, 0, ROT270, "SNK", "Ozma Wars (set 2)" , 0) /* Uses Taito's three board color version of Space Invaders PCB */
+GAME( 1979, solfight, ozmawars, invaders, ozmawars, 0, ROT270, "bootleg", "Solar Fight", 0 )
+GAME( 1979, spaceph, ozmawars, invaders, spaceph, 0, ROT270, "Zilec Games", "Space Phantoms", 0 )
+GAME( 1979, yosakdon, 0, yosakdon, yosakdon, 0, ROT270, "Wing", "Yosaku To Donbei (set 1)", GAME_IMPERFECT_SOUND ) /* bootleg? */
+GAME( 1979, yosakdoa, yosakdon, yosakdon, yosakdon, 0, ROT270, "Wing", "Yosaku To Donbei (set 2)", GAME_IMPERFECT_SOUND ) /* bootleg? */
+GAME( 197?, shuttlei, 0, shuttlei, shuttlei, 0, ROT270, "Omori", "Shuttle Invader", GAME_NO_COCKTAIL )
diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c
new file mode 100644
index 00000000000..fed86db8801
--- /dev/null
+++ b/src/mame/drivers/88games.c
@@ -0,0 +1,563 @@
+/***************************************************************************
+
+88 Games (c) 1988 Konami
+
+***************************************************************************/
+
+#include "driver.h"
+#include "cpu/konami/konami.h"
+#include "cpu/z80/z80.h"
+#include "video/konamiic.h"
+#include "sound/2151intf.h"
+#include "sound/upd7759.h"
+
+
+static MACHINE_RESET( 88games );
+static void k88games_banking( int lines );
+
+static UINT8 *ram;
+static UINT8 *banked_rom;
+static UINT8 *paletteram_1000;
+static int videobank;
+
+extern int k88games_priority;
+VIDEO_START( 88games );
+VIDEO_UPDATE( 88games );
+
+
+static INTERRUPT_GEN( k88games_interrupt )
+{
+ if (K052109_is_IRQ_enabled())
+ irq0_line_hold();
+}
+
+static int zoomreadroms;
+
+static READ8_HANDLER( bankedram_r )
+{
+ if (videobank) return ram[offset];
+ else
+ {
+ if (zoomreadroms)
+ return K051316_rom_0_r(offset);
+ else
+ return K051316_0_r(offset);
+ }
+}
+
+static WRITE8_HANDLER( bankedram_w )
+{
+ if (videobank) ram[offset] = data;
+ else K051316_0_w(offset,data);
+}
+
+static WRITE8_HANDLER( k88games_5f84_w )
+{
+ /* bits 0/1 coin counters */
+ coin_counter_w(0,data & 0x01);
+ coin_counter_w(1,data & 0x02);
+
+ /* bit 2 enables ROM reading from the 051316 */
+ /* also 5fce == 2 read roms, == 3 read ram */
+ zoomreadroms = data & 0x04;
+
+ if (data & 0xf8)
+ popmessage("5f84 = %02x",data);
+}
+
+static WRITE8_HANDLER( k88games_sh_irqtrigger_w )
+{
+ cpunum_set_input_line_and_vector(1, 0, HOLD_LINE, 0xff);
+}
+
+/* handle fake button for speed cheat for players 1 and 2 */
+static READ8_HANDLER( cheat1_r )
+{
+ int res;
+ static int cheat = 0;
+ static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
+
+ res = readinputportbytag("IN1");
+
+ if ((readinputportbytag("IN0") & 0x08) == 0)
+ {
+ res |= 0x55;
+ res &= bits[cheat];
+ cheat = (cheat+1)%4;
+ }
+ return res;
+}
+
+/* handle fake button for speed cheat for players 3 and 4 */
+static READ8_HANDLER( cheat2_r )
+{
+ int res;
+ static int cheat = 0;
+ static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
+
+ res = readinputportbytag("IN2");
+
+ if ((readinputportbytag("IN0") & 0x08) == 0)
+ {
+ res |= 0x55;
+ res &= bits[cheat];
+ cheat = (cheat+1)%4;
+ }
+ return res;
+}
+
+static int speech_chip;
+static WRITE8_HANDLER( speech_control_w )
+{
+ speech_chip = ( data & 4 ) ? 1 : 0;
+ upd7759_reset_w( speech_chip, data & 2 );
+ upd7759_start_w( speech_chip, data & 1 );
+}
+
+static WRITE8_HANDLER( speech_msg_w )
+{
+ upd7759_port_w( speech_chip, data );
+}
+
+static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_RAM) AM_BASE(&banked_rom) /* banked ROM + palette RAM */
+ AM_RANGE(0x2000, 0x37ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x3800, 0x3fff) AM_READ(bankedram_r)
+ AM_RANGE(0x5f94, 0x5f94) AM_READ(input_port_0_r)
+// AM_RANGE(0x5f95, 0x5f95) AM_READ(input_port_1_r)
+// AM_RANGE(0x5f96, 0x5f96) AM_READ(input_port_2_r)
+ AM_RANGE(0x5f95, 0x5f95) AM_READ(cheat1_r) /* P1 and P2 IO and handle fake button for cheating */
+ AM_RANGE(0x5f96, 0x5f96) AM_READ(cheat2_r) /* P3 and P4 IO and handle fake button for cheating */
+ AM_RANGE(0x5f97, 0x5f97) AM_READ(input_port_3_r)
+ AM_RANGE(0x5f9b, 0x5f9b) AM_READ(input_port_4_r)
+ AM_RANGE(0x4000, 0x7fff) AM_READ(K052109_051960_r)
+ AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_ROM)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_RAM) /* banked ROM */
+ AM_RANGE(0x1000, 0x1fff) AM_WRITE(paletteram_xBBBBBGGGGGRRRRR_be_w) AM_BASE(&paletteram_1000) /* banked ROM + palette RAM */
+ AM_RANGE(0x2000, 0x2fff) AM_WRITE(MWA8_RAM)
+ AM_RANGE(0x3000, 0x37ff) AM_WRITE(MWA8_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
+ AM_RANGE(0x3800, 0x3fff) AM_WRITE(bankedram_w) AM_BASE(&ram)
+ AM_RANGE(0x5f84, 0x5f84) AM_WRITE(k88games_5f84_w)
+ AM_RANGE(0x5f88, 0x5f88) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x5f8c, 0x5f8c) AM_WRITE(soundlatch_w)
+ AM_RANGE(0x5f90, 0x5f90) AM_WRITE(k88games_sh_irqtrigger_w)
+ AM_RANGE(0x5fc0, 0x5fcf) AM_WRITE(K051316_ctrl_0_w)
+ AM_RANGE(0x4000, 0x7fff) AM_WRITE(K052109_051960_w)
+ AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM)
+ AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r)
+ AM_RANGE(0xc001, 0xc001) AM_READ(YM2151_status_port_0_r)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM)
+ AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM)
+ AM_RANGE(0x9000, 0x9000) AM_WRITE(speech_msg_w)
+ AM_RANGE(0xc000, 0xc000) AM_WRITE(YM2151_register_port_0_w)
+ AM_RANGE(0xc001, 0xc001) AM_WRITE(YM2151_data_port_0_w)
+ AM_RANGE(0xe000, 0xe000) AM_WRITE(speech_control_w)
+ADDRESS_MAP_END
+
+
+
+/***************************************************************************
+
+ Input Ports
+
+***************************************************************************/
+
+static INPUT_PORTS_START( 88games )
+ PORT_START_TAG("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* Fake button to press buttons 1 and 3 impossibly fast. Handle via cheat?_r */
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Run Like Hell (Cheat)") PORT_PLAYER(1)
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, "World Records" ) PORT_DIPLOCATION("SW3:2")
+ PORT_DIPSETTING( 0x20, "Don't Erase" )
+ PORT_DIPSETTING( 0x00, "Erase on Reset" )
+ PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW3:3" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:4") // Listed in the manual as "continue"
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START_TAG("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
+
+ PORT_START_TAG("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
+
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
+ PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) )
+ PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) )
+ PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8")
+ PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) )
+ PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) )
+ PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) )
+ PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) )
+// PORT_DIPSETTING( 0x00, "Disabled" )
+
+ PORT_START_TAG("DSW2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x06, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2,3")
+ PORT_DIPSETTING( 0x06, DEF_STR( Cocktail ) )
+ PORT_DIPSETTING( 0x04, "Cocktail (A)" )
+ PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, "Upright (D)" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,7")
+ PORT_DIPSETTING( 0x60, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
+
+static struct upd7759_interface upd7759_interface_1 =
+{
+ REGION_SOUND1 /* memory region */
+};
+
+static struct upd7759_interface upd7759_interface_2 =
+{
+ REGION_SOUND2 /* memory region */
+};
+
+
+
+static MACHINE_DRIVER_START( 88games )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(KONAMI, 3000000) /* ? */
+ MDRV_CPU_PROGRAM_MAP(readmem,writemem)
+ MDRV_CPU_VBLANK_INT(k88games_interrupt,1)
+
+ MDRV_CPU_ADD(Z80, 3579545)
+ /* audio CPU */
+ MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ MDRV_MACHINE_RESET(88games)
+ MDRV_NVRAM_HANDLER(generic_0fill)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(64*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 )
+ MDRV_PALETTE_LENGTH(2048)
+
+ MDRV_VIDEO_START(88games)
+ MDRV_VIDEO_UPDATE(88games)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(YM2151, 3579545)
+ MDRV_SOUND_ROUTE(0, "mono", 0.75)
+ MDRV_SOUND_ROUTE(1, "mono", 0.75)
+
+ MDRV_SOUND_ADD(UPD7759, UPD7759_STANDARD_CLOCK)
+ MDRV_SOUND_CONFIG(upd7759_interface_1)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+
+ MDRV_SOUND_ADD(UPD7759, UPD7759_STANDARD_CLOCK)
+ MDRV_SOUND_CONFIG(upd7759_interface_2)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+MACHINE_DRIVER_END
+
+
+
+/***************************************************************************
+
+ Game ROMs
+
+***************************************************************************/
+
+ROM_START( 88games )
+ ROM_REGION( 0x21000, REGION_CPU1, 0 ) /* code + banked roms + space for banked ram */
+ ROM_LOAD( "861m01.k18", 0x08000, 0x08000, CRC(4a4e2959) SHA1(95572686bef48b5c1ce1dedf0afc891d92aff00d) )
+ ROM_LOAD( "861m02.k16", 0x10000, 0x10000, CRC(e19f15f6) SHA1(6c801b274e87eaff7f40148381ade5b38120cc12) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 code */
+ ROM_LOAD( "861d01.d9", 0x00000, 0x08000, CRC(0ff1dec0) SHA1(749dc98f8740beee1383f85effc9336081315f4b) )
+
+ ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a08.a", 0x000000, 0x10000, CRC(77a00dd6) SHA1(e3667839f8ae3699236da3e312c20d571db38670) ) /* characters */
+ ROM_LOAD16_BYTE( "861a08.c", 0x000001, 0x10000, CRC(b422edfc) SHA1(b3842c8dc60975cc71812df098f29b4571b18120) )
+ ROM_LOAD16_BYTE( "861a08.b", 0x020000, 0x10000, CRC(28a8304f) SHA1(6b4037eff6d209fec29d05f1071ed3bf9c2bd098) )
+ ROM_LOAD16_BYTE( "861a08.d", 0x020001, 0x10000, CRC(e01a3802) SHA1(3fb5fe512c2497160a66e9de0cd45c38dfe46410) )
+ ROM_LOAD16_BYTE( "861a09.a", 0x040000, 0x10000, CRC(df8917b6) SHA1(3614b78c2100f135ea0701409ce279a423decb23) )
+ ROM_LOAD16_BYTE( "861a09.c", 0x040001, 0x10000, CRC(f577b88f) SHA1(7d5d88e1492ed361dc7b2135595393b89b9cb5b1) )
+ ROM_LOAD16_BYTE( "861a09.b", 0x060000, 0x10000, CRC(4917158d) SHA1(b53da3f29c9aeb59933dc3a8214cc1314e21000b) )
+ ROM_LOAD16_BYTE( "861a09.d", 0x060001, 0x10000, CRC(2bb3282c) SHA1(6ca54948a02c91543b7e595641b0edc2564f83ff) )
+
+ ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a05.a", 0x000000, 0x10000, CRC(cedc19d0) SHA1(6eb2a292d574dee06e214e61c0e08fa233ac68e8) ) /* sprites */
+ ROM_LOAD16_BYTE( "861a05.e", 0x000001, 0x10000, CRC(725af3fc) SHA1(98ac364db4b2c5682a299f4d2a288ebc8a303b1f) )
+ ROM_LOAD16_BYTE( "861a05.b", 0x020000, 0x10000, CRC(db2a8808) SHA1(dad6b127761889aac198014139cc524a4cea32e7) )
+ ROM_LOAD16_BYTE( "861a05.f", 0x020001, 0x10000, CRC(32d830ca) SHA1(a3f10720151f538cf1bec5953a4212bc96ba42fe) )
+ ROM_LOAD16_BYTE( "861a05.c", 0x040000, 0x10000, CRC(cf03c449) SHA1(234714212dd7288a5128d36c96cca5b62e86d37d) )
+ ROM_LOAD16_BYTE( "861a05.g", 0x040001, 0x10000, CRC(fd51c4ea) SHA1(fc8923819fa7f3d02b4d159aea45cb5d1a80f1b0) )
+ ROM_LOAD16_BYTE( "861a05.d", 0x060000, 0x10000, CRC(97d78c77) SHA1(2c123fd08cb9626cf309e7320fe2eb99e4b483fb) )
+ ROM_LOAD16_BYTE( "861a05.h", 0x060001, 0x10000, CRC(60d0c8a5) SHA1(c7d3531eb65abd51ae4e6f55244d674353d23d36) )
+ ROM_LOAD16_BYTE( "861a06.a", 0x080000, 0x10000, CRC(85e2e30e) SHA1(11010727db8c71650c5b9df5340f9bc412435d11) )
+ ROM_LOAD16_BYTE( "861a06.e", 0x080001, 0x10000, CRC(6f96651c) SHA1(c740a814a3e203348b269a70256e01fe2a914118) )
+ ROM_LOAD16_BYTE( "861a06.b", 0x0a0000, 0x10000, CRC(ce17eaf0) SHA1(cc121c5742428e2613b7da2d8357f15e897161ca) )
+ ROM_LOAD16_BYTE( "861a06.f", 0x0a0001, 0x10000, CRC(88310bf3) SHA1(77bac66489e7fc2ddd714fc684e79d70b089ee84) )
+ ROM_LOAD16_BYTE( "861a06.c", 0x0c0000, 0x10000, CRC(a568b34e) SHA1(8b69a0ac90f32cea31f8c7fcd985ad58fb6c009e) )
+ ROM_LOAD16_BYTE( "861a06.g", 0x0c0001, 0x10000, CRC(4a55beb3) SHA1(35088bf7f6acd2bc95f673a2816b35238d611308) )
+ ROM_LOAD16_BYTE( "861a06.d", 0x0e0000, 0x10000, CRC(bc70ab39) SHA1(a6fa0502ceb6862e7b1e4815326e268fd6511881) )
+ ROM_LOAD16_BYTE( "861a06.h", 0x0e0001, 0x10000, CRC(d906b79b) SHA1(905814ce708d80fd4d1a398f60faa0bc680fccaf) )
+
+ ROM_REGION( 0x040000, REGION_GFX3, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD( "861a04.a", 0x000000, 0x10000, CRC(092a8b15) SHA1(d98a81bfa4bba73805f0236f8a80da130fcb378d) ) /* zoom/rotate */
+ ROM_LOAD( "861a04.b", 0x010000, 0x10000, CRC(75744b56) SHA1(5133d8f6622796ed6b9e6a0d0f1df28f00331fc7) )
+ ROM_LOAD( "861a04.c", 0x020000, 0x10000, CRC(a00021c5) SHA1(f73f88af33387d73b4262e8652507e699926fabe) )
+ ROM_LOAD( "861a04.d", 0x030000, 0x10000, CRC(d208304c) SHA1(77dd31163c8431416ab0593f084719c914222912) )
+
+ ROM_REGION( 0x0100, REGION_PROMS, 0 )
+ ROM_LOAD( "861.g3", 0x0000, 0x0100, CRC(429785db) SHA1(d27e8e180f19d2b160f18c79520a77182a62218c) ) /* priority encoder (not used) */
+
+ ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* samples for UPD7759 #0 */
+ ROM_LOAD( "861a07.a", 0x000000, 0x10000, CRC(5d035d69) SHA1(9df63e004a4f52768331dfb3c3889301ac174ea1) )
+ ROM_LOAD( "861a07.b", 0x010000, 0x10000, CRC(6337dd91) SHA1(74ba58f1664abd1491598c1a9467f470304fa430) )
+
+ ROM_REGION( 0x20000, REGION_SOUND2, 0 ) /* samples for UPD7759 #1 */
+ ROM_LOAD( "861a07.c", 0x000000, 0x10000, CRC(5067a38b) SHA1(b5a8f7122356dd72a97e71b480835ba500116aaf) )
+ ROM_LOAD( "861a07.d", 0x010000, 0x10000, CRC(86731451) SHA1(c1410f6c7a23aa0c213878a6531d3e7eb966b0a4) )
+ROM_END
+
+ROM_START( konami88 )
+ ROM_REGION( 0x21000, REGION_CPU1, 0 ) /* code + banked roms + space for banked ram */
+ ROM_LOAD( "861.e03", 0x08000, 0x08000, CRC(55979bd9) SHA1(d683cc514e2b41fc4033d5dc107ca22ba8981ada) )
+ ROM_LOAD( "861.e02", 0x10000, 0x10000, CRC(5b7e98a6) SHA1(39b6e93221d14a4695c79fb39c4eea54ec5ffb0c) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 code */
+ ROM_LOAD( "861d01.d9", 0x00000, 0x08000, CRC(0ff1dec0) SHA1(749dc98f8740beee1383f85effc9336081315f4b) )
+
+ ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a08.a", 0x000000, 0x10000, CRC(77a00dd6) SHA1(e3667839f8ae3699236da3e312c20d571db38670) ) /* characters */
+ ROM_LOAD16_BYTE( "861a08.c", 0x000001, 0x10000, CRC(b422edfc) SHA1(b3842c8dc60975cc71812df098f29b4571b18120) )
+ ROM_LOAD16_BYTE( "861a08.b", 0x020000, 0x10000, CRC(28a8304f) SHA1(6b4037eff6d209fec29d05f1071ed3bf9c2bd098) )
+ ROM_LOAD16_BYTE( "861a08.d", 0x020001, 0x10000, CRC(e01a3802) SHA1(3fb5fe512c2497160a66e9de0cd45c38dfe46410) )
+ ROM_LOAD16_BYTE( "861a09.a", 0x040000, 0x10000, CRC(df8917b6) SHA1(3614b78c2100f135ea0701409ce279a423decb23) )
+ ROM_LOAD16_BYTE( "861a09.c", 0x040001, 0x10000, CRC(f577b88f) SHA1(7d5d88e1492ed361dc7b2135595393b89b9cb5b1) )
+ ROM_LOAD16_BYTE( "861a09.b", 0x060000, 0x10000, CRC(4917158d) SHA1(b53da3f29c9aeb59933dc3a8214cc1314e21000b) )
+ ROM_LOAD16_BYTE( "861a09.d", 0x060001, 0x10000, CRC(2bb3282c) SHA1(6ca54948a02c91543b7e595641b0edc2564f83ff) )
+
+ ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a05.a", 0x000000, 0x10000, CRC(cedc19d0) SHA1(6eb2a292d574dee06e214e61c0e08fa233ac68e8) ) /* sprites */
+ ROM_LOAD16_BYTE( "861a05.e", 0x000001, 0x10000, CRC(725af3fc) SHA1(98ac364db4b2c5682a299f4d2a288ebc8a303b1f) )
+ ROM_LOAD16_BYTE( "861a05.b", 0x020000, 0x10000, CRC(db2a8808) SHA1(dad6b127761889aac198014139cc524a4cea32e7) )
+ ROM_LOAD16_BYTE( "861a05.f", 0x020001, 0x10000, CRC(32d830ca) SHA1(a3f10720151f538cf1bec5953a4212bc96ba42fe) )
+ ROM_LOAD16_BYTE( "861a05.c", 0x040000, 0x10000, CRC(cf03c449) SHA1(234714212dd7288a5128d36c96cca5b62e86d37d) )
+ ROM_LOAD16_BYTE( "861a05.g", 0x040001, 0x10000, CRC(fd51c4ea) SHA1(fc8923819fa7f3d02b4d159aea45cb5d1a80f1b0) )
+ ROM_LOAD16_BYTE( "861a05.d", 0x060000, 0x10000, CRC(97d78c77) SHA1(2c123fd08cb9626cf309e7320fe2eb99e4b483fb) )
+ ROM_LOAD16_BYTE( "861a05.h", 0x060001, 0x10000, CRC(60d0c8a5) SHA1(c7d3531eb65abd51ae4e6f55244d674353d23d36) )
+ ROM_LOAD16_BYTE( "861a06.a", 0x080000, 0x10000, CRC(85e2e30e) SHA1(11010727db8c71650c5b9df5340f9bc412435d11) )
+ ROM_LOAD16_BYTE( "861a06.e", 0x080001, 0x10000, CRC(6f96651c) SHA1(c740a814a3e203348b269a70256e01fe2a914118) )
+ ROM_LOAD16_BYTE( "861a06.b", 0x0a0000, 0x10000, CRC(ce17eaf0) SHA1(cc121c5742428e2613b7da2d8357f15e897161ca) )
+ ROM_LOAD16_BYTE( "861a06.f", 0x0a0001, 0x10000, CRC(88310bf3) SHA1(77bac66489e7fc2ddd714fc684e79d70b089ee84) )
+ ROM_LOAD16_BYTE( "861a06.c", 0x0c0000, 0x10000, CRC(a568b34e) SHA1(8b69a0ac90f32cea31f8c7fcd985ad58fb6c009e) )
+ ROM_LOAD16_BYTE( "861a06.g", 0x0c0001, 0x10000, CRC(4a55beb3) SHA1(35088bf7f6acd2bc95f673a2816b35238d611308) )
+ ROM_LOAD16_BYTE( "861a06.d", 0x0e0000, 0x10000, CRC(bc70ab39) SHA1(a6fa0502ceb6862e7b1e4815326e268fd6511881) )
+ ROM_LOAD16_BYTE( "861a06.h", 0x0e0001, 0x10000, CRC(d906b79b) SHA1(905814ce708d80fd4d1a398f60faa0bc680fccaf) )
+
+ ROM_REGION( 0x040000, REGION_GFX3, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD( "861a04.a", 0x000000, 0x10000, CRC(092a8b15) SHA1(d98a81bfa4bba73805f0236f8a80da130fcb378d) ) /* zoom/rotate */
+ ROM_LOAD( "861a04.b", 0x010000, 0x10000, CRC(75744b56) SHA1(5133d8f6622796ed6b9e6a0d0f1df28f00331fc7) )
+ ROM_LOAD( "861a04.c", 0x020000, 0x10000, CRC(a00021c5) SHA1(f73f88af33387d73b4262e8652507e699926fabe) )
+ ROM_LOAD( "861a04.d", 0x030000, 0x10000, CRC(d208304c) SHA1(77dd31163c8431416ab0593f084719c914222912) )
+
+ ROM_REGION( 0x0100, REGION_PROMS, 0 )
+ ROM_LOAD( "861.g3", 0x0000, 0x0100, CRC(429785db) SHA1(d27e8e180f19d2b160f18c79520a77182a62218c) ) /* priority encoder (not used) */
+
+ ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* samples for UPD7759 #0 */
+ ROM_LOAD( "861a07.a", 0x000000, 0x10000, CRC(5d035d69) SHA1(9df63e004a4f52768331dfb3c3889301ac174ea1) )
+ ROM_LOAD( "861a07.b", 0x010000, 0x10000, CRC(6337dd91) SHA1(74ba58f1664abd1491598c1a9467f470304fa430) )
+
+ ROM_REGION( 0x20000, REGION_SOUND2, 0 ) /* samples for UPD7759 #1 */
+ ROM_LOAD( "861a07.c", 0x000000, 0x10000, CRC(5067a38b) SHA1(b5a8f7122356dd72a97e71b480835ba500116aaf) )
+ ROM_LOAD( "861a07.d", 0x010000, 0x10000, CRC(86731451) SHA1(c1410f6c7a23aa0c213878a6531d3e7eb966b0a4) )
+ROM_END
+
+ROM_START( hypsptsp )
+ ROM_REGION( 0x21000, REGION_CPU1, 0 ) /* code + banked roms + space for banked ram */
+ ROM_LOAD( "861f03.k18", 0x08000, 0x08000, CRC(8c61aebd) SHA1(de720acfe07fd70fe467f9c73122e0fbeab2b8c8) )
+ ROM_LOAD( "861f02.k16", 0x10000, 0x10000, CRC(d2460c28) SHA1(936220aa3983ffa2330843f683347768772561af) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 code */
+ ROM_LOAD( "861d01.d9", 0x00000, 0x08000, CRC(0ff1dec0) SHA1(749dc98f8740beee1383f85effc9336081315f4b) )
+
+ ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a08.a", 0x000000, 0x10000, CRC(77a00dd6) SHA1(e3667839f8ae3699236da3e312c20d571db38670) ) /* characters */
+ ROM_LOAD16_BYTE( "861a08.c", 0x000001, 0x10000, CRC(b422edfc) SHA1(b3842c8dc60975cc71812df098f29b4571b18120) )
+ ROM_LOAD16_BYTE( "861a08.b", 0x020000, 0x10000, CRC(28a8304f) SHA1(6b4037eff6d209fec29d05f1071ed3bf9c2bd098) )
+ ROM_LOAD16_BYTE( "861a08.d", 0x020001, 0x10000, CRC(e01a3802) SHA1(3fb5fe512c2497160a66e9de0cd45c38dfe46410) )
+ ROM_LOAD16_BYTE( "861a09.a", 0x040000, 0x10000, CRC(df8917b6) SHA1(3614b78c2100f135ea0701409ce279a423decb23) )
+ ROM_LOAD16_BYTE( "861a09.c", 0x040001, 0x10000, CRC(f577b88f) SHA1(7d5d88e1492ed361dc7b2135595393b89b9cb5b1) )
+ ROM_LOAD16_BYTE( "861a09.b", 0x060000, 0x10000, CRC(4917158d) SHA1(b53da3f29c9aeb59933dc3a8214cc1314e21000b) )
+ ROM_LOAD16_BYTE( "861a09.d", 0x060001, 0x10000, CRC(2bb3282c) SHA1(6ca54948a02c91543b7e595641b0edc2564f83ff) )
+
+ ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD16_BYTE( "861a05.a", 0x000000, 0x10000, CRC(cedc19d0) SHA1(6eb2a292d574dee06e214e61c0e08fa233ac68e8) ) /* sprites */
+ ROM_LOAD16_BYTE( "861a05.e", 0x000001, 0x10000, CRC(725af3fc) SHA1(98ac364db4b2c5682a299f4d2a288ebc8a303b1f) )
+ ROM_LOAD16_BYTE( "861a05.b", 0x020000, 0x10000, CRC(db2a8808) SHA1(dad6b127761889aac198014139cc524a4cea32e7) )
+ ROM_LOAD16_BYTE( "861a05.f", 0x020001, 0x10000, CRC(32d830ca) SHA1(a3f10720151f538cf1bec5953a4212bc96ba42fe) )
+ ROM_LOAD16_BYTE( "861a05.c", 0x040000, 0x10000, CRC(cf03c449) SHA1(234714212dd7288a5128d36c96cca5b62e86d37d) )
+ ROM_LOAD16_BYTE( "861a05.g", 0x040001, 0x10000, CRC(fd51c4ea) SHA1(fc8923819fa7f3d02b4d159aea45cb5d1a80f1b0) )
+ ROM_LOAD16_BYTE( "861a05.d", 0x060000, 0x10000, CRC(97d78c77) SHA1(2c123fd08cb9626cf309e7320fe2eb99e4b483fb) )
+ ROM_LOAD16_BYTE( "861a05.h", 0x060001, 0x10000, CRC(60d0c8a5) SHA1(c7d3531eb65abd51ae4e6f55244d674353d23d36) )
+ ROM_LOAD16_BYTE( "861a06.a", 0x080000, 0x10000, CRC(85e2e30e) SHA1(11010727db8c71650c5b9df5340f9bc412435d11) )
+ ROM_LOAD16_BYTE( "861a06.e", 0x080001, 0x10000, CRC(6f96651c) SHA1(c740a814a3e203348b269a70256e01fe2a914118) )
+ ROM_LOAD16_BYTE( "861a06.b", 0x0a0000, 0x10000, CRC(ce17eaf0) SHA1(cc121c5742428e2613b7da2d8357f15e897161ca) )
+ ROM_LOAD16_BYTE( "861a06.f", 0x0a0001, 0x10000, CRC(88310bf3) SHA1(77bac66489e7fc2ddd714fc684e79d70b089ee84) )
+ ROM_LOAD16_BYTE( "861a06.c", 0x0c0000, 0x10000, CRC(a568b34e) SHA1(8b69a0ac90f32cea31f8c7fcd985ad58fb6c009e) )
+ ROM_LOAD16_BYTE( "861a06.g", 0x0c0001, 0x10000, CRC(4a55beb3) SHA1(35088bf7f6acd2bc95f673a2816b35238d611308) )
+ ROM_LOAD16_BYTE( "861a06.d", 0x0e0000, 0x10000, CRC(bc70ab39) SHA1(a6fa0502ceb6862e7b1e4815326e268fd6511881) )
+ ROM_LOAD16_BYTE( "861a06.h", 0x0e0001, 0x10000, CRC(d906b79b) SHA1(905814ce708d80fd4d1a398f60faa0bc680fccaf) )
+
+ ROM_REGION( 0x040000, REGION_GFX3, 0 ) /* graphics ( dont dispose as the program can read them, 0 ) */
+ ROM_LOAD( "861a04.a", 0x000000, 0x10000, CRC(092a8b15) SHA1(d98a81bfa4bba73805f0236f8a80da130fcb378d) ) /* zoom/rotate */
+ ROM_LOAD( "861a04.b", 0x010000, 0x10000, CRC(75744b56) SHA1(5133d8f6622796ed6b9e6a0d0f1df28f00331fc7) )
+ ROM_LOAD( "861a04.c", 0x020000, 0x10000, CRC(a00021c5) SHA1(f73f88af33387d73b4262e8652507e699926fabe) )
+ ROM_LOAD( "861a04.d", 0x030000, 0x10000, CRC(d208304c) SHA1(77dd31163c8431416ab0593f084719c914222912) )
+
+ ROM_REGION( 0x0100, REGION_PROMS, 0 )
+ ROM_LOAD( "861.g3", 0x0000, 0x0100, CRC(429785db) SHA1(d27e8e180f19d2b160f18c79520a77182a62218c) ) /* priority encoder (not used) */
+
+ ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* samples for UPD7759 #0 */
+ ROM_LOAD( "861a07.a", 0x000000, 0x10000, CRC(5d035d69) SHA1(9df63e004a4f52768331dfb3c3889301ac174ea1) )
+ ROM_LOAD( "861a07.b", 0x010000, 0x10000, CRC(6337dd91) SHA1(74ba58f1664abd1491598c1a9467f470304fa430) )
+
+ ROM_REGION( 0x20000, REGION_SOUND2, 0 ) /* samples for UPD7759 #1 */
+ ROM_LOAD( "861a07.c", 0x000000, 0x10000, CRC(5067a38b) SHA1(b5a8f7122356dd72a97e71b480835ba500116aaf) )
+ ROM_LOAD( "861a07.d", 0x010000, 0x10000, CRC(86731451) SHA1(c1410f6c7a23aa0c213878a6531d3e7eb966b0a4) )
+ROM_END
+
+
+
+static void k88games_banking( int lines )
+{
+ UINT8 *RAM = memory_region(REGION_CPU1);
+ int offs;
+
+logerror("%04x: bank select %02x\n",activecpu_get_pc(),lines);
+
+ /* bits 0-2 select ROM bank for 0000-1fff */
+ /* bit 3: when 1, palette RAM at 1000-1fff */
+ /* bit 4: when 0, 051316 RAM at 3800-3fff; when 1, work RAM at 2000-3fff (NVRAM 3370-37ff) */
+ offs = 0x10000 + (lines & 0x07) * 0x2000;
+ memcpy(banked_rom,&RAM[offs],0x1000);
+ if (lines & 0x08)
+ {
+ if (paletteram != paletteram_1000)
+ {
+ memcpy(paletteram_1000,paletteram,0x1000);
+ paletteram = paletteram_1000;
+ }
+ }
+ else
+ {
+ if (paletteram != &RAM[0x20000])
+ {
+ memcpy(&RAM[0x20000],paletteram,0x1000);
+ paletteram = &RAM[0x20000];
+ }
+ memcpy(paletteram_1000,&RAM[offs+0x1000],0x1000);
+ }
+ videobank = lines & 0x10;
+
+ /* bit 5 = enable char ROM reading through the video RAM */
+ K052109_set_RMRD_line((lines & 0x20) ? ASSERT_LINE : CLEAR_LINE);
+
+ /* bit 6 is unknown, 1 most of the time */
+
+ /* bit 7 controls layer priority */
+ k88games_priority = lines & 0x80;
+}
+
+static MACHINE_RESET( 88games )
+{
+ cpunum_set_info_fct(0, CPUINFO_PTR_KONAMI_SETLINES_CALLBACK, (genf *)k88games_banking);
+ paletteram = &memory_region(REGION_CPU1)[0x20000];
+}
+
+
+
+static DRIVER_INIT( 88games )
+{
+ konami_rom_deinterleave_2(REGION_GFX1);
+ konami_rom_deinterleave_2(REGION_GFX2);
+}
+
+
+
+GAME( 1988, 88games, 0, 88games, 88games, 88games, ROT0, "Konami", "'88 Games", 0 )
+GAME( 1988, konami88, 88games, 88games, 88games, 88games, ROT0, "Konami", "Konami '88", 0 )
+GAME( 1988, hypsptsp, 88games, 88games, 88games, 88games, ROT0, "Konami", "Hyper Sports Special (Japan)", 0 )
diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c
new file mode 100644
index 00000000000..09243a0d34c
--- /dev/null
+++ b/src/mame/drivers/ace.c
@@ -0,0 +1,363 @@
+/****************************************************************************
+
+Ace by Allied Leisure
+
+Driver by Jarek Burczynski
+2002.09.19
+
+
+
+Allied Leisure 1976
+"MAJOR MFG. INC. SUNNYVALE, CA" in PCB etch
+
+18MHz
+ 5MHz
+
+8080
+
+
+2101
+2101
+
+
+A5 3106 3106 3106
+A4
+A3 3622.K4
+A2 2101
+A1 2101 2101
+
+ [ RANGE ] [ TIME ]
+ (two 0-9 thumbwheel switches)
+
+
+5x2101 - SRAM 256x4
+3x3106 - SRAM 256x1
+1x3622 - ROM 512x4
+
+
+****************************************************************************/
+
+#include "driver.h"
+
+
+static UINT8 *ace_scoreram;
+static UINT8 *ace_ram2;
+static UINT8 *ace_characterram;
+
+
+static int objpos[8];
+
+static WRITE8_HANDLER( ace_objpos_w )
+{
+ objpos[offset]=data;
+}
+
+#if 0
+static READ8_HANDLER( ace_objpos_r )
+{
+ return objpos[offset];
+}
+#endif
+
+static VIDEO_UPDATE( ace )
+{
+ int offs;
+
+ decodechar(machine->gfx[1], 0, ace_characterram, machine->drv->gfxdecodeinfo[1].gfxlayout);
+ decodechar(machine->gfx[2], 0, ace_characterram, machine->drv->gfxdecodeinfo[2].gfxlayout);
+ decodechar(machine->gfx[3], 0, ace_characterram, machine->drv->gfxdecodeinfo[3].gfxlayout);
+
+ for (offs = 0; offs < 8; offs++)
+ {
+ decodechar(machine->gfx[4], offs, ace_scoreram, machine->drv->gfxdecodeinfo[4].gfxlayout);
+ }
+
+ /* first of all, fill the screen with the background color */
+ fillbitmap(bitmap, machine->pens[0], cliprect);
+
+
+ drawgfx(bitmap,machine->gfx[1],
+ 0,
+ 0,
+ 0,0,
+ objpos[0],objpos[1],
+ cliprect,TRANSPARENCY_NONE,0);
+
+ drawgfx(bitmap,machine->gfx[2],
+ 0,
+ 0,
+ 0,0,
+ objpos[2],objpos[3],
+ cliprect,TRANSPARENCY_NONE,0);
+
+ drawgfx(bitmap,machine->gfx[3],
+ 0,
+ 0,
+ 0,0,
+ objpos[4],objpos[5],
+ cliprect,TRANSPARENCY_NONE,0);
+
+ for (offs = 0; offs < 8; offs++)
+ {
+ drawgfx(bitmap,machine->gfx[4],
+ offs,
+ 0,
+ 0,0,
+ 10*8+offs*16,256-16, /* ?? */
+ cliprect,TRANSPARENCY_NONE,0);
+ }
+ return 0;
+}
+
+
+static PALETTE_INIT( ace )
+{
+ palette_set_color(machine,0,MAKE_RGB(0x10,0x20,0xd0)); /* light bluish */
+ palette_set_color(machine,1,MAKE_RGB(0xff,0xff,0xff)); /* white */
+}
+
+
+static READ8_HANDLER( ace_characterram_r )
+{
+ return ace_characterram[offset];
+}
+
+static WRITE8_HANDLER( ace_characterram_w )
+{
+ if (ace_characterram[offset] != data)
+ {
+ if (data&(~0x07))
+ {
+ logerror("write to %04x data=%02x\n", 0x8000+offset, data);
+ popmessage("write to %04x data=%02x\n", 0x8000+offset, data);
+ }
+ ace_characterram[offset] = data;
+ }
+}
+
+
+static READ8_HANDLER( unk_r )
+{
+ return mame_rand(Machine)&0xff;
+}
+
+
+static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
+
+ AM_RANGE(0x0000, 0x09ff) AM_READ(MRA8_ROM)
+
+ AM_RANGE(0x2000, 0x20ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x8300, 0x83ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x8000, 0x80ff) AM_READ(ace_characterram_r)
+
+ /* players inputs */
+ AM_RANGE(0xc008, 0xc008) AM_READ(input_port_0_r)
+ AM_RANGE(0xc009, 0xc009) AM_READ(input_port_1_r)
+ AM_RANGE(0xc00a, 0xc00a) AM_READ(input_port_2_r)
+ AM_RANGE(0xc00b, 0xc00b) AM_READ(input_port_3_r)
+ AM_RANGE(0xc00c, 0xc00c) AM_READ(input_port_4_r)
+ AM_RANGE(0xc00d, 0xc00d) AM_READ(input_port_5_r)
+ AM_RANGE(0xc00e, 0xc00e) AM_READ(input_port_6_r)
+ AM_RANGE(0xc00f, 0xc00f) AM_READ(input_port_7_r)
+ AM_RANGE(0xc010, 0xc010) AM_READ(input_port_8_r)
+ AM_RANGE(0xc011, 0xc011) AM_READ(input_port_9_r)
+
+ AM_RANGE(0xc012, 0xc012) AM_READ(unk_r)
+
+ /* vblank */
+ AM_RANGE(0xc014, 0xc014) AM_READ(input_port_10_r)
+
+ /* coin */
+ AM_RANGE(0xc015, 0xc015) AM_READ(input_port_11_r)
+
+ /* start (must read 1 at least once to make the game run) */
+ AM_RANGE(0xc016, 0xc016) AM_READ(input_port_12_r)
+
+ AM_RANGE(0xc017, 0xc017) AM_READ(unk_r)
+ AM_RANGE(0xc018, 0xc018) AM_READ(unk_r)
+ AM_RANGE(0xc019, 0xc019) AM_READ(unk_r)
+
+ AM_RANGE(0xc020, 0xc020) AM_READ(unk_r)
+ AM_RANGE(0xc021, 0xc021) AM_READ(unk_r)
+ AM_RANGE(0xc022, 0xc022) AM_READ(unk_r)
+ AM_RANGE(0xc023, 0xc023) AM_READ(unk_r)
+ AM_RANGE(0xc024, 0xc024) AM_READ(unk_r)
+ AM_RANGE(0xc025, 0xc025) AM_READ(unk_r)
+ AM_RANGE(0xc026, 0xc026) AM_READ(unk_r)
+
+ADDRESS_MAP_END
+
+/* 5x2101 - SRAM 256x4 */
+/* 3x3106 - SRAM 256x1 */
+/* 1x3622 - ROM 512x4 - doesn't seem to be used ????????????*/
+
+static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x09ff) AM_WRITE(MWA8_ROM)
+
+ AM_RANGE(0x2000, 0x20ff) AM_WRITE(MWA8_RAM) AM_BASE(&ace_scoreram) /* 2x2101 */
+ AM_RANGE(0x8300, 0x83ff) AM_WRITE(MWA8_RAM) AM_BASE(&ace_ram2) /* 2x2101 */
+ AM_RANGE(0x8000, 0x80ff) AM_WRITE(ace_characterram_w) AM_BASE(&ace_characterram) /* 3x3101 (3bits: 0, 1, 2) */
+
+ AM_RANGE(0xc000, 0xc005) AM_WRITE(ace_objpos_w)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( ace )
+
+ PORT_START_TAG("c008") /* player thrust */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("P1 Thrust")
+
+ PORT_START_TAG("c009") /* player slowdown */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Slowdown")
+
+ PORT_START_TAG("c00a") /* player left */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_START_TAG("c00b") /* player right */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_START_TAG("c00c") /* player fire */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Fire")
+
+ PORT_START_TAG("c00d") /* enemy thrust */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("P2 Thrust")
+
+ PORT_START_TAG("c00e") /* enemy slowdown */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Slowdown")
+
+ PORT_START_TAG("c00f") /* enemy left */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+
+ PORT_START_TAG("c010") /* enemy right */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+
+ PORT_START_TAG("c011") /* enemy fire */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Fire")
+
+//c012
+
+
+ PORT_START_TAG("c014") /* VBLANK??? */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_START_TAG("c015") /* coin input */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+
+ PORT_START_TAG("c016") /* game start */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
+
+INPUT_PORTS_END
+
+
+static const gfx_layout charlayout =
+{
+ 16,16, /* 16*16 chars */
+ 8, /* 8 characters */
+ 1, /* 1 bit per pixel */
+ { 4 }, /* character rom is 512x4 bits (3622 type)*/
+ { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3, 16+0, 16+1, 16+2, 16+3, 24+0, 24+1, 24+2, 24+3 },
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
+ 64*8 /* every char takes 64 consecutive bytes */
+};
+
+static const gfx_layout charlayout0 =
+{
+ 16,16, /* 16*16 chars */
+ 1, /* 1 characters */
+ 1, /* 1 bit per pixel */
+ { 7 }, /* bit 0 in character ram */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
+ 256*8 /* every char takes 256 consecutive bytes */
+};
+
+static const gfx_layout charlayout1 =
+{
+ 16,16, /* 16*16 chars */
+ 1, /* 1 characters */
+ 1, /* 1 bit per pixel */
+ { 6 }, /* bit 1 in character ram */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
+ 256*8 /* every char takes 256 consecutive bytes */
+};
+
+static const gfx_layout charlayout2 =
+{
+ 16,16, /* 16*16 chars */
+ 1, /* 1 characters */
+ 1, /* 1 bit per pixel */
+ { 5 }, /* bit 2 in character ram */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
+ 256*8 /* every char takes 256 consecutive bytes */
+};
+
+static const gfx_layout scorelayout =
+{
+ 16,16, /* 16*16 chars */
+ 8, /* 8 characters */
+ 1, /* 1 bit per pixel */
+ { 0 }, /* */
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
+ 32*8 /* every char takes 32 consecutive bytes */
+};
+
+static GFXDECODE_START( ace )
+ GFXDECODE_ENTRY( REGION_GFX1, 0 , charlayout, 0, 2 )
+ GFXDECODE_ENTRY( 0 , 0x8000, charlayout0, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( 0 , 0x8000, charlayout1, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( 0 , 0x8000, charlayout2, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( 0 , 0x8000, scorelayout, 0, 2 ) /* the game dynamically modifies this */
+GFXDECODE_END
+
+
+
+static MACHINE_DRIVER_START( ace )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(8080, 18000000 / 9) /* 2 MHz ? */
+ MDRV_CPU_PROGRAM_MAP(readmem,writemem)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(4*8, 32*8-1, 2*8, 32*8-1)
+ MDRV_GFXDECODE(ace)
+ MDRV_PALETTE_LENGTH(2)
+ MDRV_COLORTABLE_LENGTH(2*2)
+
+ MDRV_PALETTE_INIT(ace)
+ MDRV_VIDEO_UPDATE(ace)
+
+ /* sound hardware */
+ /* ???? */
+
+MACHINE_DRIVER_END
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( ace )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ace.a1", 0x0000, 0x0200, CRC(16811834) SHA1(5502812dd161908eea3fa8851d7e5c1e22b0f8ff) )
+ ROM_LOAD( "ace.a2", 0x0200, 0x0200, CRC(f9eae80e) SHA1(8865b86c7b5d57c76312c16f8a614bf35ffaf532) )
+ ROM_LOAD( "ace.a3", 0x0400, 0x0200, CRC(c5c63b8c) SHA1(2079dd12ff0c4aafec19aeb9baa70fc9b6788356) )
+ ROM_LOAD( "ace.a4", 0x0600, 0x0200, CRC(ea4503aa) SHA1(fea610124b9f7ea18d29b4e4599253ba1ee067e1) )
+ ROM_LOAD( "ace.a5", 0x0800, 0x0200, CRC(623c58e7) SHA1(a92418bc323a1ae76eae8e094e4d6ebd1e8da14e) )
+
+ /* not used - I couldn't guess when this should be displayed */
+ ROM_REGION( 0x0200, REGION_GFX1, 0 )
+ ROM_LOAD( "ace.k4", 0x0000, 0x0200, CRC(daa05ec6) SHA1(8b71ffb802293dc93f6b492ff128a704e676a5fd) )
+
+ROM_END
+
+GAME( 1976, ace, 0, ace, ace, 0, ROT0, "Allied Leisure", "Ace", GAME_NO_SOUND | GAME_IMPERFECT_COLORS )
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
new file mode 100644
index 00000000000..276dae9ddbb
--- /dev/null
+++ b/src/mame/drivers/acefruit.c
@@ -0,0 +1,704 @@
+/***************************************************************************
+
+Ace Video Fruit Machine hardware
+(c)1981-1982 ACE Leisure
+
+Driver by SMF & Guddler 04/02/2007
+Inputs and Dip Switches by Stephh
+
+***************************************************************************/
+
+#include "driver.h"
+#include "cpu/z80/z80.h"
+
+#include "sidewndr.lh"
+
+static void acefruit_update_irq( int vpos )
+{
+ int col;
+ int row = vpos / 8;
+
+ for( col = 0; col < 32; col++ )
+ {
+ int tile_index = ( col * 32 ) + row;
+ int color = colorram[ tile_index ];
+
+ switch( color )
+ {
+ case 0x0c:
+ cpunum_set_input_line( 0, 0, HOLD_LINE );
+ break;
+ }
+ }
+}
+
+static emu_timer *acefruit_refresh_timer;
+
+static TIMER_CALLBACK( acefruit_refresh )
+{
+ int vpos = video_screen_get_vpos( 0 );
+
+ video_screen_update_partial( 0, vpos );
+ acefruit_update_irq( vpos );
+
+ vpos = ( ( vpos / 8 ) + 1 ) * 8;
+
+ timer_adjust( acefruit_refresh_timer, video_screen_get_time_until_pos( 0, vpos, 0 ), 0, attotime_never );
+}
+
+static VIDEO_START( acefruit )
+{
+ acefruit_refresh_timer = timer_alloc( acefruit_refresh );
+}
+
+static INTERRUPT_GEN( acefruit_vblank )
+{
+ cpunum_set_input_line( 0, 0, HOLD_LINE );
+ timer_adjust( acefruit_refresh_timer, attotime_zero, 0, attotime_never );
+}
+
+static VIDEO_UPDATE( acefruit )
+{
+ int startrow = cliprect->min_y / 8;
+ int endrow = cliprect->max_y / 8;
+ int row;
+ int col;
+
+ for( row = startrow; row <= endrow; row++ )
+ {
+ int spriterow = 0;
+ int spriteindex = 0;
+ int spriteparameter = 0;
+
+ for( col = 0; col < 32; col++ )
+ {
+ int tile_index = ( col * 32 ) + row;
+ int code = videoram[ tile_index ];
+ int color = colorram[ tile_index ];
+
+ if( color < 0x4 )
+ {
+ drawgfx( bitmap, machine->gfx[ 1 ], code, color, 0, 0, col * 16, row * 8, cliprect, TRANSPARENCY_NONE, 0 );
+ }
+ else if( color >= 0x5 && color <= 0x7 )
+ {
+ int y;
+ int x;
+ int spriteskip[] = { 1, 2, 4 };
+ int spritesize = spriteskip[ color - 5 ];
+ const gfx_element *gfx = machine->gfx[ 0 ];
+
+ for( x = 0; x < 16; x++ )
+ {
+ for( y = 0; y < 8; y++ )
+ {
+ UINT16 *dst = BITMAP_ADDR16( bitmap, y + ( row * 8 ), x + ( col * 16 ) );
+ int sprite = ( spriteram[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf;
+ *( dst ) = *( gfx->gfxdata + ( sprite * gfx->char_modulo ) + ( ( spriterow + y ) * gfx->line_modulo ) + ( ( spriteindex % 64 ) >> 1 ) );
+ }
+
+ spriteindex += spritesize;
+ }
+ }
+ else
+ {
+ int y;
+ int x;
+
+ for( x = 0; x < 16; x++ )
+ {
+ for( y = 0; y < 8; y++ )
+ {
+ UINT16 *dst = BITMAP_ADDR16( bitmap, y + ( row * 8 ), x + ( col * 16 ) );
+ *( dst ) = 0;
+ }
+ }
+
+ if( color == 0x8 )
+ {
+ if( spriteparameter == 0 )
+ {
+ spriteindex = code & 0xf;
+ }
+ else
+ {
+ spriterow = ( ( code >> 0 ) & 0x3 ) * 8;
+ spriteindex += ( ( code >> 2 ) & 0x1 ) * 16;
+ }
+
+ spriteparameter = !spriteparameter;
+ }
+ else if( color == 0xc )
+ {
+ /* irq generated in acefruit_update_irq() */
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+static UINT32 sidewndr_payout_r(void *param)
+{
+ int bit_mask = (FPTR)param;
+
+ switch (bit_mask)
+ {
+ case 0x01:
+ return ((readinputportbytag("PAYOUT") & bit_mask) >> 0);
+ case 0x02:
+ return ((readinputportbytag("PAYOUT") & bit_mask) >> 1);
+ default:
+ logerror("sidewndr_payout_r : invalid %02X bit_mask\n",bit_mask);
+ return 0;
+ }
+}
+
+static UINT32 starspnr_coinage_r(void *param)
+{
+ int bit_mask = (FPTR)param;
+
+ switch (bit_mask)
+ {
+ case 0x01:
+ return ((readinputportbytag("COINAGE") & bit_mask) >> 0);
+ case 0x02:
+ return ((readinputportbytag("COINAGE") & bit_mask) >> 1);
+ case 0x04:
+ return ((readinputportbytag("COINAGE") & bit_mask) >> 2);
+ case 0x08:
+ return ((readinputportbytag("COINAGE") & bit_mask) >> 3);
+ default:
+ logerror("starspnr_coinage_r : invalid %02X bit_mask\n",bit_mask);
+ return 0;
+ }
+}
+
+static UINT32 starspnr_payout_r(void *param)
+{
+ int bit_mask = (FPTR)param;
+
+ switch (bit_mask)
+ {
+ case 0x01:
+ return ((readinputportbytag("PAYOUT") & bit_mask) >> 0);
+ case 0x02:
+ return ((readinputportbytag("PAYOUT") & bit_mask) >> 1);
+ case 0x04:
+ return ((readinputportbytag("PAYOUT") & bit_mask) >> 2);
+ default:
+ logerror("starspnr_payout_r : invalid %02X bit_mask\n",bit_mask);
+ return 0;
+ }
+}
+
+static WRITE8_HANDLER( acefruit_colorram_w )
+{
+ colorram[ offset ] = data & 0xf;
+}
+
+static WRITE8_HANDLER( acefruit_coin_w )
+{
+ /* TODO: ? */
+}
+
+static WRITE8_HANDLER( acefruit_sound_w )
+{
+ /* TODO: ? */
+}
+
+static WRITE8_HANDLER( acefruit_lamp_w )
+{
+ int i;
+
+ for( i = 0; i < 8; i++ )
+ {
+ output_set_lamp_value( ( offset * 8 ) + i, ( data >> i ) & 1 );
+ }
+}
+
+static WRITE8_HANDLER( acefruit_solenoid_w )
+{
+ int i;
+
+ for( i = 0; i < 8; i++ )
+ {
+ output_set_indexed_value( "solenoid", i, ( data >> i ) & 1 );
+ }
+}
+
+static PALETTE_INIT( acefruit )
+{
+ /* sprites */
+ palette_set_color( machine, 0, MAKE_RGB(0x00, 0x00, 0x00) );
+ palette_set_color( machine, 1, MAKE_RGB(0x00, 0x00, 0xff) );
+ palette_set_color( machine, 2, MAKE_RGB(0x00, 0xff, 0x00) );
+ palette_set_color( machine, 3, MAKE_RGB(0xff, 0x7f, 0x00) );
+ palette_set_color( machine, 4, MAKE_RGB(0xff, 0x00, 0x00) );
+ palette_set_color( machine, 5, MAKE_RGB(0xff, 0xff, 0x00) );
+ palette_set_color( machine, 6, MAKE_RGB(0xff, 0xff, 0xff) );
+ palette_set_color( machine, 7, MAKE_RGB(0x7f, 0x3f, 0x1f) );
+
+ colortable[ 0 ] = 0;
+ colortable[ 1 ] = 1;
+ colortable[ 2 ] = 2;
+ colortable[ 3 ] = 3;
+ colortable[ 4 ] = 4;
+ colortable[ 5 ] = 5;
+ colortable[ 6 ] = 6;
+ colortable[ 7 ] = 7;
+
+ /* tiles */
+ palette_set_color( machine, 8, MAKE_RGB(0xff, 0xff, 0xff) );
+ palette_set_color( machine, 9, MAKE_RGB(0x00, 0x00, 0xff) );
+ palette_set_color( machine, 10, MAKE_RGB(0x00, 0xff, 0x00) );
+ palette_set_color( machine, 11, MAKE_RGB(0xff, 0x00, 0x00) );
+
+ colortable[ 8 ] = 0;
+ colortable[ 9 ] = 8;
+ colortable[ 10 ] = 0;
+ colortable[ 11 ] = 9;
+ colortable[ 12 ] = 0;
+ colortable[ 13 ] = 10;
+ colortable[ 14 ] = 0;
+ colortable[ 15 ] = 11;
+}
+
+static ADDRESS_MAP_START( acefruit_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ AM_RANGE(0x2000, 0x20ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
+ AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram)
+ AM_RANGE(0x4400, 0x47ff) AM_READWRITE(MRA8_RAM, acefruit_colorram_w) AM_BASE(&colorram)
+ AM_RANGE(0x8000, 0x8000) AM_READ(input_port_0_r)
+ AM_RANGE(0x8001, 0x8001) AM_READ(input_port_1_r)
+ AM_RANGE(0x8002, 0x8002) AM_READ(input_port_2_r)
+ AM_RANGE(0x8003, 0x8003) AM_READ(input_port_3_r)
+ AM_RANGE(0x8004, 0x8004) AM_READ(input_port_4_r)
+ AM_RANGE(0x8005, 0x8005) AM_READ(input_port_5_r)
+ AM_RANGE(0x8006, 0x8006) AM_READ(input_port_6_r)
+ AM_RANGE(0x8007, 0x8007) AM_READ(input_port_7_r)
+ AM_RANGE(0x6000, 0x6005) AM_RAM AM_BASE(&spriteram)
+ AM_RANGE(0xa000, 0xa001) AM_WRITE(acefruit_lamp_w)
+ AM_RANGE(0xa002, 0xa003) AM_WRITE(acefruit_coin_w)
+ AM_RANGE(0xa004, 0xa004) AM_WRITE(acefruit_solenoid_w)
+ AM_RANGE(0xa005, 0xa006) AM_WRITE(acefruit_sound_w)
+ AM_RANGE(0xc000, 0xc000) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0xe000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( acefruit_io, ADDRESS_SPACE_IO, 8 )
+ ADDRESS_MAP_FLAGS(AMEF_ABITS(8))
+ AM_RANGE(0x00, 0x00) AM_NOP /* ? */
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( sidewndr )
+ PORT_START_TAG("IN0") // 0
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Stop Nudge/Nudge Up or Down" )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Gamble" )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) /* "Cash in" */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK ) /* active low or high?? */
+ PORT_BIT( 0xd8, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN1") // 1
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Sidewind" )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect" )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Cash in" */
+ PORT_DIPNAME( 0x08, 0x00, "Accountacy System Texts" )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN2") // 2
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel/Clear" )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME( "Refill" ) PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) /* "Token in" - also "Refill" when "Refill" mode ON */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(sidewndr_payout_r, 0x01)
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN3") // 3
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME( "Hold/Nudge 1" )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME( "Accountancy System" ) PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN4 ) /* "50P in" */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(sidewndr_payout_r, 0x02)
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN4") // 4
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME( "Hold/Nudge 2" )
+ PORT_DIPNAME( 0x02, 0x00, "Allow Clear Data" ) /* in "Accountancy System" mode */
+ PORT_DIPSETTING( 0x02, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x04, 0x04, "Lamp 11 always ON" ) /* code at 0x173a - write lamp status at 0x01ed */
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x08, 0x00, "Sounds" ) /* data in 0x206b and 0x206c - out sound at 0x193e */
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN5") // 5
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME( "Hold/Nudge 3" )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME( "Test Program" ) PORT_TOGGLE
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN6") // 6
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME( "Hold/Nudge 4" )
+ /* I don't know exactly what this bit is supposed to do :(
+ I only found that when bit is LOW, no data is updated
+ (check "Accountancy System" mode). And when you switch
+ it from LOW to HIGH, previous saved values are back
+ (check for example the number of credits). */
+ PORT_DIPNAME( 0x02, 0x02, "Save Data" ) /* code at 0x1773 */
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN7") // 7
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) /* next in "Accountancy System" mode */
+ PORT_DIPNAME( 0x02, 0x00, "Clear Credits on Reset" ) /* also affects rolls */
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("PAYOUT") // fake port to handle settings via multiple input ports
+ PORT_DIPNAME( 0x03, 0x00, "Payout %" )
+ PORT_DIPSETTING( 0x00, "74%" )
+ PORT_DIPSETTING( 0x02, "78%" )
+ PORT_DIPSETTING( 0x01, "82%" )
+ PORT_DIPSETTING( 0x03, "86%" )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( spellbnd )
+ PORT_INCLUDE(sidewndr)
+
+ PORT_MODIFY("IN0")
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* before COIN4 test - code at 0x0994 */
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xd0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("IN1")
+ PORT_DIPNAME( 0x08, 0x08, "Accountacy System Texts" ) /* bit test is inverted compared to 'sidewndr' */
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+
+ PORT_MODIFY("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel" ) /* see IN4 bit 0 in "Accountancy System" mode */
+
+ PORT_MODIFY("IN4")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME( "Clear Data" ) /* in "Accountancy System" mode */
+ /* Similar to 'sidewndr' but different addresses */
+ PORT_DIPNAME( 0x04, 0x04, "Lamp 11 always ON" ) /* code at 0x072a - write lamp status at 0x00ff */
+ PORT_DIPSETTING( 0x00, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
+ /* Similar to 'sidewndr' but different addresses */
+ PORT_DIPNAME( 0x08, 0x00, "Sounds" ) /* data in 0x2088 and 0x2089 - out sound at 0x012d */
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_MODIFY("IN6")
+ /* I don't know exactly what this bit is supposed to do :(
+ I only found that when bit is LOW, no data is updated
+ (check "Accountancy System" mode). */
+ PORT_DIPNAME( 0x02, 0x02, "Save Data" ) /* code at 0x0763 (similar to 'sidewndr') and 0x18db */
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+
+ PORT_MODIFY("IN7")
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* code at 0x04a8 */
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_BIT( 0xf4, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+/* I've only mapped the known inputs after comparaison with 'spellbnd' and the ones known to do something */
+static INPUT_PORTS_START( starspnr )
+ PORT_START_TAG("IN0") // 0
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Gamble" )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
+ /* tested at 0xef77 after IN5 bit 1 and before IN2 bit 2 - after coins are tested - table at 0xefa5 (3 bytes) */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK ) /* active low or high?? */
+
+ PORT_START_TAG("IN1") // 1
+ /* tested at 0xe77c - call from 0x012c */
+ /* tested at 0xeffb after IN6 bit 2 - invalid code after 0xf000 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect/Cancel" )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
+ /* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, 0x08) /* to be confirmed */
+
+ PORT_START_TAG("IN2") // 2
+ /* tested at 0xe83c */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xe5ab - after "Collect" and "Gamble" buttons */
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xef82 after IN5 bit 1 and after IN1 bit 3 - after coins are tested - table at 0xefa8 (3 bytes) */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xeeba with IN3 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, 0x02) /* to be confirmed */
+ /* tested at 0x1b0f */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN3") // 3
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME( "Hold 1" )
+ /* tested at 0xe8ea and 0xecbe */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xeeba with IN2 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, 0x01) /* to be confirmed */
+ /* tested at 0x0178 */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN4") // 4
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME( "Hold 2" )
+ /* tested at 0x064e */
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xed86 */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, 0x04) /* to be confirmed */
+
+ PORT_START_TAG("IN5") // 5
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME( "Hold 3" )
+ /* tested at 0xef68 before IN1 bit 3 and before IN2 bit 2 - after coins are tested - table at 0xefa2 (3 bytes) */
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0xec6f */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0x1d60 with IN6 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, 0x01) /* to be confirmed */
+ /* tested at 0xe312 and 0xe377 */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN6") // 6
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME( "Hold 4" )
+ /* tested at 0xee42, 0xee5e and 0xeff5 before IN1 bit 0 - invalid code after 0xf000 */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0x1d60 with IN5 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, 0x02) /* to be confirmed */
+ /* tested at 0xe8dd and 0xec1c */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("IN7") // 7
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_DIPNAME( 0x02, 0x00, "Clear Credits on Reset" )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ /* tested at 0xedcb */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ /* tested at 0x1d60 with IN5 bit 3 and IN6 bit 3 - table at 0x1d90 (8 * 3 bytes) */
+ PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, 0x04) /* to be confirmed */
+ /* tested at 0xec2a */
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START_TAG("COINAGE") // fake port to handle settings via multiple input ports
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x02, "1 Coin/10 Credits" )
+ PORT_DIPSETTING( 0x03, "1 Coin/25 Credits" )
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" )
+ PORT_DIPSETTING( 0x0c, "1 Coin/25 Credits" )
+
+ PORT_START_TAG("PAYOUT") // fake port to handle settings via multiple input ports
+ PORT_DIPNAME( 0x07, 0x07, "Payout %" )
+ PORT_DIPSETTING( 0x00, "30%" )
+ PORT_DIPSETTING( 0x01, "40%" )
+ PORT_DIPSETTING( 0x02, "50%" )
+ PORT_DIPSETTING( 0x03, "55%" )
+ PORT_DIPSETTING( 0x04, "60%" )
+ PORT_DIPSETTING( 0x05, "70%" )
+ PORT_DIPSETTING( 0x06, "75%" )
+ PORT_DIPSETTING( 0x07, "80%" )
+INPUT_PORTS_END
+
+static const gfx_layout charlayout =
+{
+ 16,8, /* 8*8 characters doubled horizontally */
+ 256, /* 256 characters */
+ 1, /* 1 bit per pixel */
+ { 0 },
+ { 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7},
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8*8
+};
+
+static const gfx_layout spritelayout =
+{
+ 32,32, /* 32*32 sprites */
+ 16, /* 16 sprites */
+ 3, /* 3 bits per pixel */
+ /* Offset to the start of each bit */
+ { 0, 256*8*8, 256*8*8*2 },
+ /* Offset to the start of each byte */
+ {
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31
+ },
+ /* Offset to the start of each line */
+ {
+ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
+ 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32,
+ 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32,
+ 24*32, 25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32
+ },
+ /* Offset to next sprite (also happens to be number of bits per sprite) */
+ 32*32 /* every sprite takes 128 bytes */
+};
+
+static GFXDECODE_START( acefruit )
+ GFXDECODE_ENTRY( REGION_GFX1, 0x0000, spritelayout, 0, 1 )
+ GFXDECODE_ENTRY( REGION_GFX1, 0x1800, charlayout, 8, 4 )
+GFXDECODE_END
+
+static MACHINE_DRIVER_START( acefruit )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(Z80, 2500000) /* 2.5MHz */
+ MDRV_CPU_PROGRAM_MAP(acefruit_map,0)
+ MDRV_CPU_IO_MAP(acefruit_io,0)
+ MDRV_GFXDECODE(acefruit)
+ MDRV_CPU_VBLANK_INT(acefruit_vblank,1)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(512, 256)
+ MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 255)
+ MDRV_PALETTE_LENGTH(12)
+ MDRV_COLORTABLE_LENGTH(16)
+
+ MDRV_NVRAM_HANDLER(generic_0fill)
+
+ MDRV_PALETTE_INIT(acefruit)
+ MDRV_VIDEO_START(acefruit)
+ MDRV_VIDEO_UPDATE(acefruit)
+
+ /* sound hardware */
+MACHINE_DRIVER_END
+
+static DRIVER_INIT( sidewndr )
+{
+ UINT8 *ROM = memory_region( REGION_CPU1 );
+ /* replace "ret nc" ( 0xd0 ) with "di" */
+ ROM[ 0 ] = 0xf3;
+ /* this is either a bad dump or the cpu core should set the carry flag on reset */
+}
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( sidewndr )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "2_h09.bin", 0x000000, 0x000800, BAD_DUMP CRC(141f3b0c) SHA1(1704feba950fe7aa939b9ed54c37264d10527d11) )
+ ROM_LOAD( "2_h10.bin", 0x000800, 0x000800, CRC(36a2d4af) SHA1(2388e22245497240e5721895d94d2ccd1f579eff) )
+ ROM_LOAD( "2_h11.bin", 0x001000, 0x000800, CRC(e2932643) SHA1(e1c0cd5d0cd332519432cbefa8718362a6cd1ccc) )
+ ROM_LOAD( "2_h12.bin", 0x001800, 0x000800, CRC(26af0b1f) SHA1(36f0e54982688b9d5a24a6986a847ac69ee0a355) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) /* 8k for graphics */
+ ROM_LOAD( "2_h05.bin", 0x000000, 0x000800, CRC(64b64cff) SHA1(c11f2bd2af68ae7f104b711deb7f6509fdbaeb8f) )
+ ROM_LOAD( "2_h06.bin", 0x000800, 0x000800, CRC(6b96a586) SHA1(6d5ab8fefe37ca4dbc5057ebf31f12b33dbdf5c0) )
+ ROM_LOAD( "2_h07.bin", 0x001000, 0x000800, CRC(3a8e68a2) SHA1(2ffe07360f57f0f11ecf326f00905747d9b66811) )
+ ROM_LOAD( "2_h08.bin", 0x001800, 0x000800, CRC(bd19a758) SHA1(3fa812742f34643f66c67cb9bdb1d4d732c4f44d) )
+ROM_END
+
+ROM_START( spellbnd )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "h9.bin", 0x000000, 0x000800, CRC(9919fcfa) SHA1(04167b12ee9e60ef891893a305a35d3f2eccb0bb) )
+ ROM_LOAD( "h10.bin", 0x000800, 0x000800, CRC(90502d00) SHA1(3bdd859d9146df2eb97b4517c446182569a55a46) )
+ ROM_LOAD( "h11.bin", 0x001000, 0x000800, CRC(7375166c) SHA1(f05b01941423fd36e0a5d3aa913a594e4e7aa5d4) )
+ ROM_LOAD( "h12.bin", 0x001800, 0x000800, CRC(4546c68c) SHA1(92104e2005fc772ea9f70451d9d674f95d3f0ba9) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) /* 8k for graphics */
+ ROM_LOAD( "h5.bin", 0x000000, 0x000800, CRC(198da32c) SHA1(bf6c4ddcda0503095d310e08057dd88154952ef4) )
+ ROM_LOAD( "h6.bin", 0x000800, 0x000800, CRC(e777130f) SHA1(3421c6f399e5ec749f1908f6b4ebff7761c6c5d9) )
+ ROM_LOAD( "h7.bin", 0x001000, 0x000800, CRC(bfed5b8f) SHA1(f95074e8809297eec67da9d7e33ae1dd1c5eabc0) )
+ ROM_LOAD( "h8.bin", 0x001800, 0x000800, CRC(05da2b71) SHA1(3a263f605ecc9e4dca9ce0ba815af16e28bf9bc8) )
+ROM_END
+
+/*
+Starspinner
+ACE, 1982?
+
+PCB Layout
+----------
+
+|---------------------------------------------------------------------------|
+| |
+| XTAL BAT 2114 |
+| |
+| 14-1-102 P1 |
+| |
+| |
+| |
+| 14-1-102 |
+| |
+| 5 2114 |
+| |
+| 6 2114 14-1-102 |
+| |
+| 7 |
+| |
+| 8 5501 5501 14-1-102 |
+| |
+| h9 16-1-101 |
+| |
+| h10 16-1-101 |
+| |
+| h11 Z80 16-1-101 |
+| |
+| h12 P2 |
+| |
+| DSWA DSWB |
+| |
+|---------------------------------------------------------------------------|
+
+Notes:
+ Z80 - NEC D780C running at ? MHz (DIP40)
+ 5501 - Toshiba TC5501P 256 x4 SRAM (DIP22)
+ 2114 - NEC uPD2114LC 1k x8 DRAM (DIP18)
+ XTAL - ? MHz
+ BAT - VARTA Ni-Cd 3.6V 100 mAh
+ DSWA - 8-way DIP switch
+ DSWB - 8-way DIP switch
+ P1 - 4x10 pin connector to power supply
+ P2 - 4x10 pin connector to control panel
+*/
+
+ROM_START( starspnr )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "h9.h9", 0x00e000, 0x0800, CRC(083068aa) SHA1(160a5f3bf33d0a53354f98295cd67022762928b6) )
+ ROM_CONTINUE( 0x000000, 0x0800 )
+ ROM_LOAD( "h10.h10", 0x00e800, 0x0800, CRC(a0a96e55) SHA1(de4dc0da5a1f358085817690cc6bdc8d94a849f8) )
+ ROM_CONTINUE( 0x000800, 0x0800 )
+ ROM_LOAD( "h11.h11", 0x00f000, 0x0800, BAD_DUMP CRC(ab045396) SHA1(8b3aea0b0d55f62d5b6fbd39664beb93559d2213) ) /* bad dump : invalid code in both halves ! */
+ ROM_CONTINUE( 0x001000, 0x0800 )
+ ROM_LOAD( "h12.h12", 0x00f800, 0x0800, CRC(8571f3f5) SHA1(e8b60a604a4a0368b6063b15b328c68f351cb740) ) /* bad dump ? nothing of interest 0xf800-0xffff */
+ ROM_CONTINUE( 0x001800, 0x0800 )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) /* 8k for graphics */
+ ROM_LOAD( "5.h5", 0x000000, 0x000800, CRC(df49876f) SHA1(68077304f096491baeddc1d6b4dc62f90de71903) )
+ ROM_LOAD( "6.h6", 0x000800, 0x000800, CRC(d992e2f6) SHA1(7841efec7d81689c82b8da501cce743436e7e8d4) )
+ ROM_LOAD( "7.h7", 0x001000, 0x000800, CRC(d5a40e88) SHA1(5cac8d85123720cdbb8b4630b14a27cf0ceef33f) )
+ ROM_LOAD( "8.h8", 0x001800, 0x000800, CRC(0dd38c3c) SHA1(4da0cd00c76d3be2164f141ccd8c72dd9578ee61) )
+
+ ROM_REGION( 0x300, REGION_PROMS, 0 )
+ ROM_LOAD( "16-1-101.b9", 0x0000, 0x0100, NO_DUMP )
+ ROM_LOAD( "16-1-101.b10", 0x0100, 0x0100, NO_DUMP )
+ ROM_LOAD( "16-1-101.b11", 0x0200, 0x0100, NO_DUMP )
+ROM_END
+
+GAMEL( 1981?, sidewndr, 0, acefruit, sidewndr, sidewndr, ROT270, "ACE", "Sidewinder", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND, layout_sidewndr )
+GAMEL( 1981?, spellbnd, sidewndr, acefruit, spellbnd, 0, ROT270, "ACE", "Spellbound", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND, layout_sidewndr )
+GAME ( 1982?, starspnr, 0, acefruit, starspnr, 0, ROT270, "ACE", "Starspinner (Dutch/Nederlands)", GAME_NOT_WORKING | GAME_NO_SOUND )
diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c
new file mode 100644
index 00000000000..e82ff3a97f7
--- /dev/null
+++ b/src/mame/drivers/acommand.c
@@ -0,0 +1,587 @@
+/*******************************************************************************************
+
+Alien Command (c) 1993 Jaleco
+
+driver by Angelo Salese
+
+seems like a particular version of the NMK16 board.
+
+TODO:
+-Understand what "devices" area needs to make this working...
+
+-Complete sound
+
+-Back tilemap paging is likely to be incorrect...
+
+
+m68k irq table vectors
+lev 1 : 0x64 : 0000 04f0 - rte
+lev 2 : 0x68 : 0000 044a - vblank
+lev 3 : 0x6c : 0000 0484 - "dynamic color change" (?)
+lev 4 : 0x70 : 0000 04f0 - rte
+lev 5 : 0x74 : 0000 04f0 - rte
+lev 6 : 0x78 : 0000 04f0 - rte
+lev 7 : 0x7c : 0000 04f0 - rte
+
+===========================================================================================
+
+Jaleco Alien Command
+Redemption Video Game with Guns
+
+2/7/99
+
+Hardware Specs: 68000 at 12Mhz and OKI6295
+
+JALMR17 BIN 524,288 02-07-99 1:17a JALMR17.BIN
+JALCF2 BIN 1,048,576 02-07-99 1:10a JALCF2.BIN
+JALCF3 BIN 131,072 02-07-99 1:12a JALCF3.BIN
+JALCF4 BIN 131,072 02-07-99 1:13a JALCF4.BIN
+JALCF5 BIN 524,288 02-07-99 1:15a JALCF5.BIN
+JALCF6 BIN 131,072 02-07-99 1:14a JALCF6.BIN
+JALGP1 BIN 524,288 02-07-99 1:21a JALGP1.BIN
+JALGP2 BIN 524,288 02-07-99 1:24a JALGP2.BIN
+JALGP3 BIN 524,288 02-07-99 1:20a JALGP3.BIN
+JALGP4 BIN 524,288 02-07-99 1:23a JALGP4.BIN
+JALGP5 BIN 524,288 02-07-99 1:19a JALGP5.BIN
+JALGP6 BIN 524,288 02-07-99 1:23a JALGP6.BIN
+JALGP7 BIN 524,288 02-07-99 1:19a JALGP7.BIN
+JALGP8 BIN 524,288 02-07-99 1:22a JALGP8.BIN
+JALMR14 BIN 524,288 02-07-99 1:17a JALMR14.BIN
+JALCF1 BIN 1,048,576 02-07-99 1:11a JALCF1.BIN
+
+
+*******************************************************************************************/
+
+#include "driver.h"
+#include "sound/okim6295.h"
+
+static tilemap *tx_tilemap,*bg_tilemap;
+static UINT16 *ac_txvram,*ac_bgvram;
+static UINT16 *ac_vregs;
+
+static TILEMAP_MAPPER( bg_scan )
+{
+ /* logical (col,row) -> memory offset */
+ return (row & 0x0f) + ((col & 0xff) << 4) + ((row & 0x70) << 8);
+}
+
+static TILE_GET_INFO( ac_get_bg_tile_info )
+{
+ int code = ac_bgvram[tile_index];
+ SET_TILE_INFO(
+ 1,
+ code & 0xfff,
+ (code & 0xf000) >> 12,
+ 0);
+}
+
+static TILE_GET_INFO( ac_get_tx_tile_info )
+{
+ int code = ac_txvram[tile_index];
+ SET_TILE_INFO(
+ 0,
+ code & 0xfff,
+ (code & 0xf000) >> 12,
+ 0);
+}
+
+static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int priority, int pri_mask)
+{
+ int offs;
+
+ for (offs = 0;offs < spriteram_size/2;offs += 8)
+ {
+ if (!(spriteram16[offs+0] & 0x1000))
+ {
+ int sx = (spriteram16[offs+3] & 0x0ff);
+ int code = spriteram16[offs+6];
+ int color = spriteram16[offs+7];
+ int w = (spriteram16[offs+0] & 0x0f);
+ int h = ((spriteram16[offs+0] & 0xf0) >> 4);
+ /*Unlike NMK16,the given Y offset is where the sprite must end instead
+ of where it starts.*/
+ int sy = (spriteram16[offs+4] & 0x0ff) - ((h+1)*0x10);
+/**/ int pri = spriteram16[offs+5];
+/**/ int flipy = ((spriteram16[offs+1] & 0x0200) >> 9);
+/**/ int flipx = ((spriteram16[offs+1] & 0x0100) >> 8);
+
+ int xx,yy,x;
+ int delta = 16;
+
+ flipx ^= flip_screen;
+ flipy ^= flip_screen;
+
+ if ((pri&pri_mask)!=priority) continue;
+
+ if (flip_screen)
+ {
+ sx = 368 - sx;
+ sy = 240 - sy;
+ delta = -16;
+ }
+
+ yy = h;
+ do
+ {
+ x = sx;
+ xx = w;
+ do
+ {
+ drawgfx(bitmap,machine->gfx[2],
+ code,
+ color,
+ flipx, flipy,
+ ((x + 16) & 0x1ff) - 16,sy & 0x1ff,
+ cliprect,TRANSPARENCY_PEN,15);
+
+ code++;
+ x += delta;
+ } while (--xx >= 0);
+
+ sy += delta;
+ } while (--yy >= 0);
+ }
+ }
+}
+
+
+static VIDEO_START( acommand )
+{
+ tx_tilemap = tilemap_create(ac_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,512,32);
+ bg_tilemap = tilemap_create(ac_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,16);
+
+ ac_vregs = auto_malloc(0x80);
+
+ tilemap_set_transparent_pen(tx_tilemap,15);
+}
+
+
+/*copied from drivers/gticlub.c,to be completed*/
+#define LED_ON 0x01c00
+#define SHOW_LEDS 0
+
+#if SHOW_LEDS
+static void draw_led(mame_bitmap *bitmap, int x, int y,UINT8 value)
+{
+ plot_box(bitmap, x, y, 5, 9, 0x00000000);
+
+ /* Top */
+ if( (value & 0x40) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+0, x+1) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+0, x+2) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+0, x+3) = LED_ON;
+ }
+ /* Middle */
+ if( (value & 0x01) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+4, x+1) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+4, x+2) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+4, x+3) = LED_ON;
+ }
+ /* Bottom */
+ if( (value & 0x08) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+8, x+1) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+8, x+2) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+8, x+3) = LED_ON;
+ }
+ /* Top Left */
+ if( (value & 0x02) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+1, x+0) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+2, x+0) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+3, x+0) = LED_ON;
+ }
+ /* Top Right */
+ if( (value & 0x20) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+1, x+4) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+2, x+4) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+3, x+4) = LED_ON;
+ }
+ /* Bottom Left */
+ if( (value & 0x04) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+5, x+0) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+6, x+0) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+7, x+0) = LED_ON;
+ }
+ /* Bottom Right */
+ if( (value & 0x10) == 0 ) {
+ *BITMAP_ADDR16(bitmap, y+5, x+4) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+6, x+4) = LED_ON;
+ *BITMAP_ADDR16(bitmap, y+7, x+4) = LED_ON;
+ }
+}
+#endif
+static UINT16 led0;
+
+static VIDEO_UPDATE( acommand )
+{
+ tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
+ draw_sprites(machine,bitmap,cliprect,0,0);
+ tilemap_draw(bitmap,cliprect,tx_tilemap,0,0);
+
+ #if SHOW_LEDS
+ draw_led(bitmap, 3, 53, (led0 & 0xff00) >> 8);
+ popmessage("%04x",led0);
+ #endif
+ return 0;
+}
+
+
+static WRITE16_HANDLER( ac_bgvram_w )
+{
+ COMBINE_DATA(&ac_bgvram[offset]);
+ tilemap_mark_tile_dirty(bg_tilemap,offset);
+}
+
+static WRITE16_HANDLER( ac_txvram_w )
+{
+ COMBINE_DATA(&ac_txvram[offset]);
+ tilemap_mark_tile_dirty(tx_tilemap,offset);
+}
+
+static WRITE16_HANDLER(ac_bgscroll_w)
+{
+ switch(offset)
+ {
+ case 0: tilemap_set_scrollx(bg_tilemap,0,data); break;
+ case 1: tilemap_set_scrolly(bg_tilemap,0,data); break;
+ case 2: /*BG_TILEMAP priority?*/ break;
+ }
+}
+
+static WRITE16_HANDLER(ac_txscroll_w)
+{
+ switch(offset)
+ {
+ case 0: tilemap_set_scrollx(tx_tilemap,0,data); break;
+ case 1: tilemap_set_scrolly(tx_tilemap,0,data); break;
+ case 2: /*TX_TILEMAP priority?*/ break;
+ }
+}
+
+/******************************************************************************************/
+
+static UINT16 *ac_devram;
+
+
+static READ16_HANDLER(ac_devices_r)
+{
+// popmessage("(PC=%06x) read at %04x",activecpu_get_pc(),offset*2);
+ switch(offset)
+ {
+ case 0x0008/2:
+ /*
+ --x- ---- ---- ---- Ticket Dispenser - 2
+ ---x ---- ---- ---- Ticket Dispenser - 1
+ ---- -x-- ---- ---- Right Gun HIT
+ ---- ---x ---- ---- Left Gun HIT
+ ---- ---- --x- ---- Service Mode (Toggle)
+ ---- ---- ---x ---- Service Coin
+ ---- ---- ---- x--- COIN2
+ ---- ---- ---- -x-- COIN1
+ ---- ---- ---- --x- (Activate Test)
+ ---- ---- ---- ---x (Advance Thru Tests)
+ */
+ return input_port_0_word_r(0,0);
+ case 0x0014/2:
+ /*
+ write 0x40,read (~0x08)
+ write 0x08,read (~0x01)
+
+ ---- ---- ---- ---x Boss Door - limit switch
+ */
+ return (ac_devram[offset]);
+ case 0x0016/2:
+ return OKIM6295_status_0_r(0);
+ case 0x0018/2:
+ /*
+ ---- ---- ---- x--- Astronaut - switch
+ */
+ return ac_devram[offset];
+ case 0x001a/2:
+ return OKIM6295_status_1_r(0);
+ case 0x0040/2:
+ /*
+ x-x- x-x- x-x- xx-- (ACTIVE HIGH?) [eori #$aaac, D0]
+ ---- ---- ---- --xx Boss Door - Motor
+ */
+ return ac_devram[offset];
+ case 0x0044/2:
+ /*
+ xxxx xxxx x-x- x-x- (ACTIVE HIGH?) [eori #$ffaa, D0]
+ */
+ return ac_devram[offset];
+ case 0x005c/2:
+ /*
+ xxxx xxxx ---- ---- DIPSW4
+ ---- ---- xxxx xxxx DIPSW3
+ */
+ return input_port_1_word_r(0,0);
+ }
+ return ac_devram[offset];
+}
+
+static WRITE16_HANDLER(ac_devices_w)
+{
+ COMBINE_DATA(&ac_devram[offset]);
+ switch(offset)
+ {
+ case 0x16/2:
+ if(ACCESSING_LSB)
+ {
+ logerror("Request to play sample %02x with rom 2\n",data);
+ OKIM6295_data_0_w(0,data);
+ }
+ break;
+ case 0x1a/2:
+ if(ACCESSING_LSB)
+ {
+ logerror("Request to play sample %02x with rom 1\n",data);
+ OKIM6295_data_1_w(0,data);
+ }
+ break;
+ case 0x1c/2:
+ /*IRQ mask?*/
+ break;
+ case 0x40/2:
+ break;
+ case 0x44/2:
+ break;
+ case 0x48/2:
+ led0 = ac_devram[offset];
+ break;
+ }
+ logerror("%04x %04x\n",offset*2,data);
+}
+
+/*This is always zero ATM*/
+static WRITE16_HANDLER(ac_unk2_w)
+{
+ if(data)
+ popmessage("UNK-2 enabled %04x",data);
+}
+
+static ADDRESS_MAP_START( acommand, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x03ffff) AM_ROM
+ AM_RANGE(0x082000, 0x082005) AM_WRITE(ac_bgscroll_w)
+ AM_RANGE(0x082100, 0x082105) AM_WRITE(ac_txscroll_w)
+ AM_RANGE(0x082208, 0x082209) AM_WRITE(ac_unk2_w)
+ AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE(MRA16_RAM, ac_bgvram_w) AM_BASE(&ac_bgvram)
+ AM_RANGE(0x0b0000, 0x0b3fff) AM_READWRITE(MRA16_RAM, ac_txvram_w) AM_BASE(&ac_txvram)
+ AM_RANGE(0x0b8000, 0x0bffff) AM_READWRITE(MRA16_RAM, paletteram16_RRRRGGGGBBBBRGBx_word_w) AM_BASE(&paletteram16)
+ AM_RANGE(0x0f0000, 0x0f7fff) AM_RAM
+ AM_RANGE(0x0f8000, 0x0f8fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
+ AM_RANGE(0x0f9000, 0x0fffff) AM_RAM
+ AM_RANGE(0x100000, 0x1000ff) AM_READ(ac_devices_r) AM_WRITE(ac_devices_w) AM_BASE(&ac_devram)
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( acommand )
+ PORT_START
+ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+
+ PORT_START
+ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+INPUT_PORTS_END
+
+static const gfx_layout charlayout =
+{
+ 8,8,
+ RGN_FRAC(1,1),
+ 4,
+ { 0, 1, 2, 3 },
+ { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
+ 32*8
+};
+
+static const gfx_layout tilelayout =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 4,
+ { 0, 1, 2, 3 },
+ { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
+ 16*32+0*4, 16*32+1*4, 16*32+2*4, 16*32+3*4, 16*32+4*4, 16*32+5*4, 16*32+6*4, 16*32+7*4 },
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
+ 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
+ 32*32
+};
+
+static GFXDECODE_START( acommand )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0x2700, 16 ) /*???*/
+ GFXDECODE_ENTRY( REGION_GFX2, 0, tilelayout, 0x1800, 256 )
+ GFXDECODE_ENTRY( REGION_GFX3, 0, tilelayout, 0x1800, 256 )
+GFXDECODE_END
+
+static INTERRUPT_GEN( acommand_irq )
+{
+ if (cpu_getiloops() == 0)
+ cpunum_set_input_line(0, 2, HOLD_LINE);
+ else if (cpu_getiloops() == 1)
+ cpunum_set_input_line(0, 3, HOLD_LINE);
+}
+
+static MACHINE_DRIVER_START( acommand )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(M68000,12000000)
+ MDRV_CPU_PROGRAM_MAP(acommand,0)
+ MDRV_CPU_VBLANK_INT(acommand_irq,2)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+ MDRV_GFXDECODE(acommand)
+ MDRV_PALETTE_LENGTH(0x4000)
+
+ MDRV_VIDEO_START(acommand)
+ MDRV_VIDEO_UPDATE(acommand)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(OKIM6295, 2400000)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7low)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MDRV_SOUND_ADD(OKIM6295, 2400000)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_2_pin7low)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_DRIVER_END
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( acommand )
+ ROM_REGION( 0x040000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "jalcf3.bin", 0x000000, 0x020000, CRC(f031abf7) SHA1(e381742fd6a6df4ddae42ddb3a074a55dc550b3c) )
+ ROM_LOAD16_BYTE( "jalcf4.bin", 0x000001, 0x020000, CRC(dd0c0540) SHA1(3e788fcb30ae725bd0ec9b57424e3946db1e946f) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, 0 ) /* BG0 */
+ ROM_LOAD( "jalcf6.bin", 0x000000, 0x020000, CRC(442173d6) SHA1(56c02bc2761967040127977ecabe844fc45e2218) )
+
+ ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* BG1 */
+ ROM_LOAD( "jalcf5.bin", 0x000000, 0x080000, CRC(ff0be97f) SHA1(5ccab778318dec30849d7b7f25091d4aab8bde32) )
+
+ ROM_REGION( 0x400000, REGION_GFX3, 0 ) /* SPR */
+ ROM_LOAD16_BYTE( "jalgp1.bin", 0x000000, 0x080000, CRC(c4aeeae2) SHA1(ee0d3dd93a604f8e1a96b55c4a1cd001d49f1157) )
+ ROM_LOAD16_BYTE( "jalgp2.bin", 0x000001, 0x080000, CRC(f0e4e80e) SHA1(08252ef8b5e309cce2d4654410142f4ae9e3ef22) )
+ ROM_LOAD16_BYTE( "jalgp3.bin", 0x100000, 0x080000, CRC(7acebd83) SHA1(64be95186d62003b637fcdf45a9c0b7aab182116) )
+ ROM_LOAD16_BYTE( "jalgp4.bin", 0x100001, 0x080000, CRC(6a6b72f3) SHA1(3ba359b1a89eb3f6664ed83d93f79d7f895d4222) )
+ ROM_LOAD16_BYTE( "jalgp5.bin", 0x200000, 0x080000, CRC(65ab751d) SHA1(f2cb8701eb8c3567a1d03248e6918c5a7b5df939) )
+ ROM_LOAD16_BYTE( "jalgp6.bin", 0x200001, 0x080000, CRC(24e3ab23) SHA1(d1431688e1518ba52935f6ab44b815975bec4c27) )
+ ROM_LOAD16_BYTE( "jalgp7.bin", 0x300000, 0x080000, CRC(44b71098) SHA1(a6ec2573f9a266d4f8f315f6e99b12525011f512) )
+ ROM_LOAD16_BYTE( "jalgp8.bin", 0x300001, 0x080000, CRC(ce0b7838) SHA1(46e34971cb62565a3948d8c0a18086648c32e13b) )
+
+ ROM_REGION( 0x100000, REGION_SOUND2, 0 )
+ ROM_LOAD( "jalcf1.bin", 0x000000, 0x100000, CRC(24af21d3) SHA1(f68ab81a6c833b57ae9eef916a1c8578f3d893dd) )
+
+ ROM_REGION( 0x100000, REGION_SOUND1, 0 )
+ ROM_LOAD( "jalcf2.bin", 0x000000, 0x100000, CRC(b982fd97) SHA1(35ee5b1b9be762ccfefda24d73e329ceea876deb) )
+
+ ROM_REGION( 0x100000, REGION_USER1, 0 ) /* ? these two below are identical*/
+ ROM_LOAD( "jalmr14.bin", 0x000000, 0x080000, CRC(9d428fb7) SHA1(02f72938d73db932bd217620a175a05215f6016a) )
+ ROM_LOAD( "jalmr17.bin", 0x080000, 0x080000, CRC(9d428fb7) SHA1(02f72938d73db932bd217620a175a05215f6016a) )
+ROM_END
+
+GAME( 1990, acommand, 0, acommand, acommand, 0, ROT0, "Jaleco", "Alien Command" , GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c
new file mode 100644
index 00000000000..bcc0cff7128
--- /dev/null
+++ b/src/mame/drivers/actfancr.c
@@ -0,0 +1,692 @@
+/*******************************************************************************
+
+ Act Fancer (Japan) FD (c) 1989 Data East Corporation
+ Act Fancer (World) FE (c) 1989 Data East Corporation
+ Trio The Punch (World) FC (c) 1989 Data East Corporation
+ Trio The Punch (Japan) FF (c) 1989 Data East Corporation
+
+ The 'World' set has rom code FE, the 'Japan' set has rom code FD.
+
+ Most Data East games give the Japanese version the earlier code, though
+ there is no real difference between the sets.
+
+ I believe the USA version of Act Fancer is called 'Out Fencer'
+
+ Emulation by Bryan McPhail, mish@tendril.co.uk
+
+ Update of the 03/04/2005
+ Added Trio The Punch (World), this set will be the new parent.
+ Fixed filenames in both Trio The Punch sets to match correct labels on the pcb.
+
+ Update by Roberto Gandola, sophitia@email.it
+
+*******************************************************************************/
+
+#include "driver.h"
+#include "cpu/m6502/m6502.h"
+#include "cpu/h6280/h6280.h"
+#include "sound/2203intf.h"
+#include "sound/3812intf.h"
+#include "sound/okim6295.h"
+
+VIDEO_UPDATE( actfancr );
+VIDEO_UPDATE( triothep );
+WRITE8_HANDLER( actfancr_pf1_data_w );
+READ8_HANDLER( actfancr_pf1_data_r );
+WRITE8_HANDLER( actfancr_pf1_control_w );
+WRITE8_HANDLER( actfancr_pf2_data_w );
+READ8_HANDLER( actfancr_pf2_data_r );
+WRITE8_HANDLER( actfancr_pf2_control_w );
+VIDEO_START( actfancr );
+VIDEO_START( triothep );
+
+extern UINT8 *actfancr_pf1_data,*actfancr_pf2_data,*actfancr_pf1_rowscroll_data;
+static UINT8 *actfancr_ram;
+
+/******************************************************************************/
+
+static READ8_HANDLER( actfan_control_0_r )
+{
+ return readinputport(2); /* VBL */
+}
+
+static READ8_HANDLER( actfan_control_1_r )
+{
+ switch (offset) {
+ case 0: return readinputport(0); /* Player 1 */
+ case 1: return readinputport(1); /* Player 2 */
+ case 2: return readinputport(3); /* Dip 1 */
+ case 3: return readinputport(4); /* Dip 2 */
+ }
+ return 0xff;
+}
+
+static int trio_control_select;
+
+static WRITE8_HANDLER( triothep_control_select_w )
+{
+ trio_control_select=data;
+}
+
+static READ8_HANDLER( triothep_control_r )
+{
+ switch (trio_control_select) {
+ case 0: return readinputportbytag("IN0"); /* Player 1 */
+ case 1: return readinputportbytag("IN1"); /* Player 2 */
+ case 2: return readinputportbytag("DSW1"); /* Dip 1 */
+ case 3: return readinputportbytag("DSW2"); /* Dip 2 */
+ case 4: return readinputportbytag("IN2"); /* VBL */
+ }
+
+ return 0xff;
+}
+
+static WRITE8_HANDLER( actfancr_sound_w )
+{
+ soundlatch_w(0,data & 0xff);
+ cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
+}
+
+/******************************************************************************/
+
+static ADDRESS_MAP_START( actfan_readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x000000, 0x02ffff) AM_READ(MRA8_ROM)
+ AM_RANGE(0x062000, 0x063fff) AM_READ(actfancr_pf1_data_r)
+ AM_RANGE(0x072000, 0x0727ff) AM_READ(actfancr_pf2_data_r)
+ AM_RANGE(0x100000, 0x1007ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x130000, 0x130003) AM_READ(actfan_control_1_r)
+ AM_RANGE(0x140000, 0x140001) AM_READ(actfan_control_0_r)
+ AM_RANGE(0x120000, 0x1205ff) AM_READ(paletteram_r)
+ AM_RANGE(0x1f0000, 0x1f3fff) AM_READ(MRA8_RAM)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( actfan_writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x000000, 0x02ffff) AM_WRITE(MWA8_ROM)
+ AM_RANGE(0x060000, 0x06001f) AM_WRITE(actfancr_pf1_control_w)
+ AM_RANGE(0x062000, 0x063fff) AM_WRITE(actfancr_pf1_data_w) AM_BASE(&actfancr_pf1_data)
+ AM_RANGE(0x070000, 0x07001f) AM_WRITE(actfancr_pf2_control_w)
+ AM_RANGE(0x072000, 0x0727ff) AM_WRITE(actfancr_pf2_data_w) AM_BASE(&actfancr_pf2_data)
+ AM_RANGE(0x100000, 0x1007ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
+ AM_RANGE(0x110000, 0x110001) AM_WRITE(buffer_spriteram_w)
+ AM_RANGE(0x120000, 0x1205ff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_le_w) AM_BASE(&paletteram)
+ AM_RANGE(0x150000, 0x150001) AM_WRITE(actfancr_sound_w)
+ AM_RANGE(0x1f0000, 0x1f3fff) AM_WRITE(MWA8_RAM) AM_BASE(&actfancr_ram) /* Main ram */
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( triothep_readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA8_ROM)
+ AM_RANGE(0x044000, 0x045fff) AM_READ(actfancr_pf2_data_r)
+ AM_RANGE(0x064000, 0x0647ff) AM_READ(actfancr_pf1_data_r)
+ AM_RANGE(0x120000, 0x1207ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x130000, 0x1305ff) AM_READ(paletteram_r)
+ AM_RANGE(0x140000, 0x140001) AM_READ(MRA8_NOP) /* Value doesn't matter */
+ AM_RANGE(0x1f0000, 0x1f3fff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x1ff000, 0x1ff001) AM_READ(triothep_control_r)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( triothep_writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x000000, 0x03ffff) AM_WRITE(MWA8_ROM)
+ AM_RANGE(0x040000, 0x04001f) AM_WRITE(actfancr_pf2_control_w)
+ AM_RANGE(0x044000, 0x045fff) AM_WRITE(actfancr_pf2_data_w) AM_BASE(&actfancr_pf2_data)
+ AM_RANGE(0x046400, 0x0467ff) AM_WRITE(MWA8_NOP) /* Pf2 rowscroll - is it used? */
+ AM_RANGE(0x060000, 0x06001f) AM_WRITE(actfancr_pf1_control_w)
+ AM_RANGE(0x064000, 0x0647ff) AM_WRITE(actfancr_pf1_data_w) AM_BASE(&actfancr_pf1_data)
+ AM_RANGE(0x066400, 0x0667ff) AM_WRITE(MWA8_RAM) AM_BASE(&actfancr_pf1_rowscroll_data)
+ AM_RANGE(0x100000, 0x100001) AM_WRITE(actfancr_sound_w)
+ AM_RANGE(0x110000, 0x110001) AM_WRITE(buffer_spriteram_w)
+ AM_RANGE(0x120000, 0x1207ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
+ AM_RANGE(0x130000, 0x1305ff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_le_w) AM_BASE(&paletteram)
+ AM_RANGE(0x1f0000, 0x1f3fff) AM_WRITE(MWA8_RAM) AM_BASE(&actfancr_ram) /* Main ram */
+ AM_RANGE(0x1ff000, 0x1ff001) AM_WRITE(triothep_control_select_w)
+ AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE(H6280_irq_status_w)
+ADDRESS_MAP_END
+
+/******************************************************************************/
+
+static ADDRESS_MAP_START( dec0_s_readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x07ff) AM_READ(MRA8_RAM)
+ AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r)
+ AM_RANGE(0x3800, 0x3800) AM_READ(OKIM6295_status_0_r)
+ AM_RANGE(0x4000, 0xffff) AM_READ(MRA8_ROM)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( dec0_s_writemem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x07ff) AM_WRITE(MWA8_RAM)
+ AM_RANGE(0x0800, 0x0800) AM_WRITE(YM2203_control_port_0_w)
+ AM_RANGE(0x0801, 0x0801) AM_WRITE(YM2203_write_port_0_w)
+ AM_RANGE(0x1000, 0x1000) AM_WRITE(YM3812_control_port_0_w)
+ AM_RANGE(0x1001, 0x1001) AM_WRITE(YM3812_write_port_0_w)
+ AM_RANGE(0x3800, 0x3800) AM_WRITE(OKIM6295_data_0_w)
+ AM_RANGE(0x4000, 0xffff) AM_WRITE(MWA8_ROM)
+ADDRESS_MAP_END
+
+/******************************************************************************/
+
+static INPUT_PORTS_START( actfancr )
+ PORT_START_TAG("IN0") /* Player 1 controls */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
+
+ PORT_START_TAG("IN1") /* Player 2 controls */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
+
+ PORT_START_TAG("IN2") /* start buttons */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_START_TAG("DSW1")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("DSW2")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
+ PORT_DIPSETTING( 0x03, "3" )
+ PORT_DIPSETTING( 0x02, "4" )
+ PORT_DIPSETTING( 0x01, "5" )
+ PORT_DIPSETTING( 0x00, "100 (Cheat)")
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4")
+ PORT_DIPSETTING( 0x04, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:5") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x20, "800000" )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:7") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:1") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( triothep )
+ PORT_START_TAG("IN0") /* Player 1 controls */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
+
+ PORT_START_TAG("IN1") /* Player 2 controls */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
+
+ PORT_START_TAG("IN2") /* start buttons */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_START_TAG("DSW1") /* Dip switch bank 1 */
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
+
+ PORT_START_TAG("DSW2")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
+ PORT_DIPSETTING( 0x00, "8" )
+ PORT_DIPSETTING( 0x01, "10" )
+ PORT_DIPSETTING( 0x03, "12" )
+ PORT_DIPSETTING( 0x02, "14" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Difficulty (Time)" ) PORT_DIPLOCATION("SW2:3,4")
+ PORT_DIPSETTING( 0x08, "Easy (130)" )
+ PORT_DIPSETTING( 0x0c, "Normal (100)" )
+ PORT_DIPSETTING( 0x04, "Hard (70)" )
+ PORT_DIPSETTING( 0x00, "Hardest (60)" )
+ PORT_DIPNAME( 0x10, 0x10, "Bonus Lives" ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x10, "3" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:6") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:7") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8") /* Listed as "Unused" in the manual */
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+/******************************************************************************/
+
+static const gfx_layout chars =
+{
+ 8,8, /* 8*8 chars */
+ 4096,
+ 4, /* 4 bits per pixel */
+ { 0x08000*8, 0x18000*8, 0x00000*8, 0x10000*8 },
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8*8 /* every char takes 8 consecutive bytes */
+};
+
+static const gfx_layout tiles =
+{
+ 16,16, /* 16*16 sprites */
+ 2048,
+ 4,
+ { 0, 0x10000*8, 0x20000*8,0x30000*8 }, /* plane offset */
+ { 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7,
+ 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
+ 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ 32*8 /* every sprite takes 32 consecutive bytes */
+};
+
+static const gfx_layout sprites =
+{
+ 16,16, /* 16*16 sprites */
+ 2048+1024,
+ 4,
+ { 0, 0x18000*8, 0x30000*8, 0x48000*8 }, /* plane offset */
+ { 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7,
+ 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
+ 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ 32*8 /* every sprite takes 32 consecutive bytes */
+};
+
+static GFXDECODE_START( actfan )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, chars, 0, 16 )
+ GFXDECODE_ENTRY( REGION_GFX2, 0, sprites, 512, 16 )
+ GFXDECODE_ENTRY( REGION_GFX3, 0, tiles, 256, 16 )
+GFXDECODE_END
+
+static GFXDECODE_START( triothep )
+ GFXDECODE_ENTRY( REGION_GFX1, 0, chars, 0, 16 )
+ GFXDECODE_ENTRY( REGION_GFX2, 0, sprites, 256, 16 )
+ GFXDECODE_ENTRY( REGION_GFX3, 0, tiles, 512, 16 )
+GFXDECODE_END
+
+/******************************************************************************/
+
+static void sound_irq(int linestate)
+{
+ cpunum_set_input_line(1,0,linestate); /* IRQ */
+}
+
+static struct YM3812interface ym3812_interface =
+{
+ sound_irq
+};
+
+/******************************************************************************/
+
+static MACHINE_DRIVER_START( actfancr )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(H6280,21477200/3) /* Should be accurate */
+ MDRV_CPU_PROGRAM_MAP(actfan_readmem,actfan_writemem)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,1) /* VBL */
+
+ MDRV_CPU_ADD(M6502, 1500000)
+ /* audio CPU */ /* Should be accurate */
+ MDRV_CPU_PROGRAM_MAP(dec0_s_readmem,dec0_s_writemem)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_BUFFERS_SPRITERAM)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
+ MDRV_GFXDECODE(actfan)
+ MDRV_PALETTE_LENGTH(768)
+
+ MDRV_VIDEO_START(actfancr)
+ MDRV_VIDEO_UPDATE(actfancr)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(YM2203, 1500000)
+ MDRV_SOUND_ROUTE(0, "mono", 0.90)
+ MDRV_SOUND_ROUTE(1, "mono", 0.90)
+ MDRV_SOUND_ROUTE(2, "mono", 0.90)
+ MDRV_SOUND_ROUTE(3, "mono", 0.50)
+
+ MDRV_SOUND_ADD(YM3812, 3000000)
+ MDRV_SOUND_CONFIG(ym3812_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
+
+ MDRV_SOUND_ADD(OKIM6295, 1024188)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) // clock frequency & pin 7 not verified
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
+MACHINE_DRIVER_END
+
+static MACHINE_DRIVER_START( triothep )
+
+ /* basic machine hardware */
+ MDRV_CPU_ADD(H6280,21477200/3) /* Should be accurate */
+ MDRV_CPU_PROGRAM_MAP(triothep_readmem,triothep_writemem)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold,1) /* VBL */
+
+ MDRV_CPU_ADD(M6502, 1500000)
+ /* audio CPU */ /* Should be accurate */
+ MDRV_CPU_PROGRAM_MAP(dec0_s_readmem,dec0_s_writemem)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
+
+ /* video hardware */
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_BUFFERS_SPRITERAM)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(32*8, 32*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
+ MDRV_GFXDECODE(triothep)
+ MDRV_PALETTE_LENGTH(768)
+
+ MDRV_VIDEO_START(triothep)
+ MDRV_VIDEO_UPDATE(triothep)
+
+ /* sound hardware */
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+
+ MDRV_SOUND_ADD(YM2203, 1500000)
+ MDRV_SOUND_ROUTE(0, "mono", 0.90)
+ MDRV_SOUND_ROUTE(1, "mono", 0.90)
+ MDRV_SOUND_ROUTE(2, "mono", 0.90)
+ MDRV_SOUND_ROUTE(3, "mono", 0.50)
+
+ MDRV_SOUND_ADD(YM3812, 3000000)
+ MDRV_SOUND_CONFIG(ym3812_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
+
+ MDRV_SOUND_ADD(OKIM6295, 1024188)
+ MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) // clock frequency & pin 7 not verified
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
+MACHINE_DRIVER_END
+
+/******************************************************************************/
+
+ROM_START( actfancr )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* Need to allow full RAM allocation for now */
+ ROM_LOAD( "fe08-2.bin", 0x00000, 0x10000, CRC(0d36fbfa) SHA1(cef5cfd053beac5ca2ac52421024c316bdbfba42) )
+ ROM_LOAD( "fe09-2.bin", 0x10000, 0x10000, CRC(27ce2bb1) SHA1(52a423dfc2bba7b3330d1a10f4149ae6eeb9198c) )
+ ROM_LOAD( "10", 0x20000, 0x10000, CRC(cabad137) SHA1(41ca833649671a29e9395968cde2be8137a9ff0a) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 6502 Sound CPU */
+ ROM_LOAD( "17-1", 0x08000, 0x8000, CRC(289ad106) SHA1(cf1b32ac41d3d92860fab04d82a08efe57b6ecf3) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "15", 0x00000, 0x10000, CRC(a1baf21e) SHA1(b85cf9180efae6c95cc0310064b52a78e591826a) ) /* Chars */
+ ROM_LOAD( "16", 0x10000, 0x10000, CRC(22e64730) SHA1(f1376c6e2c9d021eca7ccee3daab00593ba724b6) )
+
+ ROM_REGION( 0x60000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "02", 0x00000, 0x10000, CRC(b1db0efc) SHA1(a7bd7748ea37f473499ba5bf8ab4995b9240ff48) ) /* Sprites */
+ ROM_LOAD( "03", 0x10000, 0x08000, CRC(f313e04f) SHA1(fe69758910d38f742971c1027fc8f498c88262b1) )
+ ROM_LOAD( "06", 0x18000, 0x10000, CRC(8cb6dd87) SHA1(fab4fe76d2426c906a9070cbf7ce81200ba27ff6) )
+ ROM_LOAD( "07", 0x28000, 0x08000, CRC(dd345def) SHA1(44fbf9da636a4e18c421fdc0a1eadc3c7ba66068) )
+ ROM_LOAD( "00", 0x30000, 0x10000, CRC(d50a9550) SHA1(b366826e0df11ab6b97e2cb0e813432e95f9513d) )
+ ROM_LOAD( "01", 0x40000, 0x08000, CRC(34935e93) SHA1(8cd02a72659f6cb0536b54c1c8b34dae818fbfdc) )
+ ROM_LOAD( "04", 0x48000, 0x10000, CRC(bcf41795) SHA1(1d18afc974ac43fe6194e2840bbb2e93cd2b6cff) )
+ ROM_LOAD( "05", 0x58000, 0x08000, CRC(d38b94aa) SHA1(773d01427744fda9104f673d2b4183a0f7471a39) )
+
+ ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "14", 0x00000, 0x10000, CRC(d6457420) SHA1(d03d2e944e768b297ec0c3389320c42bc0259d00) ) /* Tiles */
+ ROM_LOAD( "12", 0x10000, 0x10000, CRC(08787b7a) SHA1(23b10b75c4cbff8effadf4c6ed15d90b87648ce9) )
+ ROM_LOAD( "13", 0x20000, 0x10000, CRC(c30c37dc) SHA1(0f7a325738eafa85239497e2b97aa51a6f2ffc4d) )
+ ROM_LOAD( "11", 0x30000, 0x10000, CRC(1f006d9f) SHA1(74bc2d4d022ad7c65be781f974919262cacb4b64) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* ADPCM sounds */
+ ROM_LOAD( "18", 0x00000, 0x10000, CRC(5c55b242) SHA1(62ba60b2f02483875da12aefe849f7e2fd137ef1) )
+ROM_END
+
+ROM_START( actfanc1 )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* Need to allow full RAM allocation for now */
+ ROM_LOAD( "08-1", 0x00000, 0x10000, CRC(3bf214a4) SHA1(f7513672b2292d3acb4332b392695888bf6560a5) )
+ ROM_LOAD( "09-1", 0x10000, 0x10000, CRC(13ae78d5) SHA1(eba77d3dbfe273e18c7fa9c0ca305ac2468f9381) )
+ ROM_LOAD( "10", 0x20000, 0x10000, CRC(cabad137) SHA1(41ca833649671a29e9395968cde2be8137a9ff0a) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 6502 Sound CPU */
+ ROM_LOAD( "17-1", 0x08000, 0x8000, CRC(289ad106) SHA1(cf1b32ac41d3d92860fab04d82a08efe57b6ecf3) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "15", 0x00000, 0x10000, CRC(a1baf21e) SHA1(b85cf9180efae6c95cc0310064b52a78e591826a) ) /* Chars */
+ ROM_LOAD( "16", 0x10000, 0x10000, CRC(22e64730) SHA1(f1376c6e2c9d021eca7ccee3daab00593ba724b6) )
+
+ ROM_REGION( 0x60000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "02", 0x00000, 0x10000, CRC(b1db0efc) SHA1(a7bd7748ea37f473499ba5bf8ab4995b9240ff48) ) /* Sprites */
+ ROM_LOAD( "03", 0x10000, 0x08000, CRC(f313e04f) SHA1(fe69758910d38f742971c1027fc8f498c88262b1) )
+ ROM_LOAD( "06", 0x18000, 0x10000, CRC(8cb6dd87) SHA1(fab4fe76d2426c906a9070cbf7ce81200ba27ff6) )
+ ROM_LOAD( "07", 0x28000, 0x08000, CRC(dd345def) SHA1(44fbf9da636a4e18c421fdc0a1eadc3c7ba66068) )
+ ROM_LOAD( "00", 0x30000, 0x10000, CRC(d50a9550) SHA1(b366826e0df11ab6b97e2cb0e813432e95f9513d) )
+ ROM_LOAD( "01", 0x40000, 0x08000, CRC(34935e93) SHA1(8cd02a72659f6cb0536b54c1c8b34dae818fbfdc) )
+ ROM_LOAD( "04", 0x48000, 0x10000, CRC(bcf41795) SHA1(1d18afc974ac43fe6194e2840bbb2e93cd2b6cff) )
+ ROM_LOAD( "05", 0x58000, 0x08000, CRC(d38b94aa) SHA1(773d01427744fda9104f673d2b4183a0f7471a39) )
+
+ ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "14", 0x00000, 0x10000, CRC(d6457420) SHA1(d03d2e944e768b297ec0c3389320c42bc0259d00) ) /* Tiles */
+ ROM_LOAD( "12", 0x10000, 0x10000, CRC(08787b7a) SHA1(23b10b75c4cbff8effadf4c6ed15d90b87648ce9) )
+ ROM_LOAD( "13", 0x20000, 0x10000, CRC(c30c37dc) SHA1(0f7a325738eafa85239497e2b97aa51a6f2ffc4d) )
+ ROM_LOAD( "11", 0x30000, 0x10000, CRC(1f006d9f) SHA1(74bc2d4d022ad7c65be781f974919262cacb4b64) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* ADPCM sounds */
+ ROM_LOAD( "18", 0x00000, 0x10000, CRC(5c55b242) SHA1(62ba60b2f02483875da12aefe849f7e2fd137ef1) )
+ROM_END
+
+ROM_START( actfancj )
+ ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* Need to allow full RAM allocation for now */
+ ROM_LOAD( "fd08-1.bin", 0x00000, 0x10000, CRC(69004b60) SHA1(7c6b876ca04377d2aa2d3c3f19d8e6cc7345363d) )
+ ROM_LOAD( "fd09-1.bin", 0x10000, 0x10000, CRC(a455ae3e) SHA1(960798271c8370c1c4ffce2a453f59d7a301c9f9) )
+ ROM_LOAD( "10", 0x20000, 0x10000, CRC(cabad137) SHA1(41ca833649671a29e9395968cde2be8137a9ff0a) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 6502 Sound CPU */
+ ROM_LOAD( "17-1", 0x08000, 0x8000, CRC(289ad106) SHA1(cf1b32ac41d3d92860fab04d82a08efe57b6ecf3) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "15", 0x00000, 0x10000, CRC(a1baf21e) SHA1(b85cf9180efae6c95cc0310064b52a78e591826a) ) /* Chars */
+ ROM_LOAD( "16", 0x10000, 0x10000, CRC(22e64730) SHA1(f1376c6e2c9d021eca7ccee3daab00593ba724b6) )
+
+ ROM_REGION( 0x60000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "02", 0x00000, 0x10000, CRC(b1db0efc) SHA1(a7bd7748ea37f473499ba5bf8ab4995b9240ff48) ) /* Sprites */
+ ROM_LOAD( "03", 0x10000, 0x08000, CRC(f313e04f) SHA1(fe69758910d38f742971c1027fc8f498c88262b1) )
+ ROM_LOAD( "06", 0x18000, 0x10000, CRC(8cb6dd87) SHA1(fab4fe76d2426c906a9070cbf7ce81200ba27ff6) )
+ ROM_LOAD( "07", 0x28000, 0x08000, CRC(dd345def) SHA1(44fbf9da636a4e18c421fdc0a1eadc3c7ba66068) )
+ ROM_LOAD( "00", 0x30000, 0x10000, CRC(d50a9550) SHA1(b366826e0df11ab6b97e2cb0e813432e95f9513d) )
+ ROM_LOAD( "01", 0x40000, 0x08000, CRC(34935e93) SHA1(8cd02a72659f6cb0536b54c1c8b34dae818fbfdc) )
+ ROM_LOAD( "04", 0x48000, 0x10000, CRC(bcf41795) SHA1(1d18afc974ac43fe6194e2840bbb2e93cd2b6cff) )
+ ROM_LOAD( "05", 0x58000, 0x08000, CRC(d38b94aa) SHA1(773d01427744fda9104f673d2b4183a0f7471a39) )
+
+ ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "14", 0x00000, 0x10000, CRC(d6457420) SHA1(d03d2e944e768b297ec0c3389320c42bc0259d00) ) /* Tiles */
+ ROM_LOAD( "12", 0x10000, 0x10000, CRC(08787b7a) SHA1(23b10b75c4cbff8effadf4c6ed15d90b87648ce9) )
+ ROM_LOAD( "13", 0x20000, 0x10000, CRC(c30c37dc) SHA1(0f7a325738eafa85239497e2b97aa51a6f2ffc4d) )
+ ROM_LOAD( "11", 0x30000, 0x10000, CRC(1f006d9f) SHA1(74bc2d4d022ad7c65be781f974919262cacb4b64) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* ADPCM sounds */
+ ROM_LOAD( "18", 0x00000, 0x10000, CRC(5c55b242) SHA1(62ba60b2f02483875da12aefe849f7e2fd137ef1) )
+ROM_END
+
+ROM_START( triothep )
+ ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* Need to allow full RAM allocation for now */
+ ROM_LOAD( "fg-16.bin", 0x00000, 0x20000, CRC(7238355a) SHA1(4ac6c3fd808e7c94025972fdb45956bd707ec89f) )
+ ROM_LOAD( "fg-15.bin", 0x20000, 0x10000, CRC(1c0551ab) SHA1(1f90f80db44d92af4b233bc16cb1023db2797e8a) )
+ ROM_LOAD( "fg-14.bin", 0x30000, 0x10000, CRC(4ba7de4a) SHA1(bf552fa33746f3d27f9b193424a38fef58fe0765) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 6502 Sound CPU */
+ ROM_LOAD( "fg-18.bin", 0x00000, 0x10000, CRC(9de9ee63) SHA1(c91b824b9a791cb90365d45c8e1b69e67f7d065f) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "fg-12.bin", 0x00000, 0x10000, CRC(15fb49f2) SHA1(a81ff1dbc813ab9b37edb832e01aab9a9a3ed5a1) ) /* Chars */
+ ROM_LOAD( "fg-13.bin", 0x10000, 0x10000, CRC(e20c9623) SHA1(b5a58599a016378f34217396212f81ede9272598) )
+
+ ROM_REGION( 0x60000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "fg-11.bin", 0x00000, 0x10000, CRC(1143ebd7) SHA1(0ef2cf40f852bf0842beeb9727508e28437ab54b) ) /* Sprites */
+ ROM_LOAD( "fg-10.bin", 0x10000, 0x08000, CRC(4b6b477a) SHA1(77486e0ff957cbfdae16d2b5977e95b7a7ced948) )
+ ROM_LOAD( "fg-09.bin", 0x18000, 0x10000, CRC(6bf6c803) SHA1(c16fd4b7e1e86db48c6e78a4b5dcd42e8269b465) )
+ ROM_LOAD( "fg-08.bin", 0x28000, 0x08000, CRC(1391e445) SHA1(bd53a969567bb5a46a35bd02e84bbb58c446a0a2) )
+ ROM_LOAD( "fg-03.bin", 0x30000, 0x10000, CRC(3d3ca9ad) SHA1(de6532063500a4ddccdecfca1024f03a1fbb78f7) )
+ ROM_LOAD( "fg-02.bin", 0x40000, 0x08000, CRC(6b9d24ce) SHA1(9d6d52e742fc37d83682291f918f3348395f0cd8) )
+ ROM_LOAD( "fg-01.bin", 0x48000, 0x10000, CRC(4987f7ac) SHA1(e8e81b15f6b6c8597d34eef3cabb89b90d3ae7f5) )
+ ROM_LOAD( "fg-00.bin", 0x58000, 0x08000, CRC(41232442) SHA1(1c10a4f5607e41d6239cb478ed7355963ad6b2d0) )
+
+ ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "fg-04.bin", 0x00000, 0x10000, CRC(7cea3c87) SHA1(b58156140a75f88ee6ec97ca7cdc02619ec51726) ) /* Tiles */
+ ROM_LOAD( "fg-06.bin", 0x10000, 0x10000, CRC(5e7f3e8f) SHA1(c92ec281b3985b442957f7d9237eb38a6d621cd4) )
+ ROM_LOAD( "fg-05.bin", 0x20000, 0x10000, CRC(8bb13f05) SHA1(f524cb0a38d0025c93124fc329d913e000155e9b) )
+ ROM_LOAD( "fg-07.bin", 0x30000, 0x10000, CRC(0d7affc3) SHA1(59f9fbf13216aaf67c7d1ad3a11a1738c4afd9e5) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* ADPCM sounds */
+ ROM_LOAD( "fg-17.bin", 0x00000, 0x10000, CRC(f0ab0d05) SHA1(29d3ab513a8d46a1cb70f5333fa56bb787a58288) )
+ROM_END
+
+/* All roms are FF even the ones matching the parent FG roms */
+ROM_START( triothej )
+ ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* Need to allow full RAM allocation for now */
+ ROM_LOAD( "ff-16.bin", 0x00000, 0x20000, CRC(84d7e1b6) SHA1(28381d2e1f6d22a959383eb2e8d73f2e03f4d39f) )
+ ROM_LOAD( "ff-15.bin", 0x20000, 0x10000, CRC(6eada47c) SHA1(98fc4e93c47bc42ea7c20e8ac994b117cd7cb5a5) )
+ ROM_LOAD( "ff-14.bin", 0x30000, 0x10000, CRC(4ba7de4a) SHA1(bf552fa33746f3d27f9b193424a38fef58fe0765) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 6502 Sound CPU */
+ ROM_LOAD( "ff-18.bin", 0x00000, 0x10000, CRC(9de9ee63) SHA1(c91b824b9a791cb90365d45c8e1b69e67f7d065f) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "ff-12.bin", 0x00000, 0x10000, CRC(15fb49f2) SHA1(a81ff1dbc813ab9b37edb832e01aab9a9a3ed5a1) ) /* Chars */
+ ROM_LOAD( "ff-13.bin", 0x10000, 0x10000, CRC(e20c9623) SHA1(b5a58599a016378f34217396212f81ede9272598) )
+
+ ROM_REGION( 0x60000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "ff-11.bin", 0x00000, 0x10000, CRC(19e885c7) SHA1(694f0aa4c1c976320d985ee50bb59c1894b853ed) ) /* Sprites */
+ ROM_LOAD( "ff-10.bin", 0x10000, 0x08000, CRC(4b6b477a) SHA1(77486e0ff957cbfdae16d2b5977e95b7a7ced948) )
+ ROM_LOAD( "ff-09.bin", 0x18000, 0x10000, CRC(79c6bc0e) SHA1(d4bf195f6114103d2eb68f3aaf65d4044947f600) )
+ ROM_LOAD( "ff-08.bin", 0x28000, 0x08000, CRC(1391e445) SHA1(bd53a969567bb5a46a35bd02e84bbb58c446a0a2) )
+ ROM_LOAD( "ff-03.bin", 0x30000, 0x10000, CRC(b36ad42d) SHA1(9d72cbb0904e82271e4835d668b133f17dec8255) )
+ ROM_LOAD( "ff-02.bin", 0x40000, 0x08000, CRC(6b9d24ce) SHA1(9d6d52e742fc37d83682291f918f3348395f0cd8) )
+ ROM_LOAD( "ff-01.bin", 0x48000, 0x10000, CRC(68d80a66) SHA1(526ed8c920915877f5ee0519c9c8eee7e5580c54) )
+ ROM_LOAD( "ff-00.bin", 0x58000, 0x08000, CRC(41232442) SHA1(1c10a4f5607e41d6239cb478ed7355963ad6b2d0) )
+
+ ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "ff-04.bin", 0x00000, 0x10000, CRC(7cea3c87) SHA1(b58156140a75f88ee6ec97ca7cdc02619ec51726) ) /* Tiles */
+ ROM_LOAD( "ff-06.bin", 0x10000, 0x10000, CRC(5e7f3e8f) SHA1(c92ec281b3985b442957f7d9237eb38a6d621cd4) )
+ ROM_LOAD( "ff-05.bin", 0x20000, 0x10000, CRC(8bb13f05) SHA1(f524cb0a38d0025c93124fc329d913e000155e9b) )
+ ROM_LOAD( "ff-07.bin", 0x30000, 0x10000, CRC(0d7affc3) SHA1(59f9fbf13216aaf67c7d1ad3a11a1738c4afd9e5) )
+
+ ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* ADPCM sounds */
+ ROM_LOAD( "ff-17.bin", 0x00000, 0x10000, CRC(f0ab0d05) SHA1(29d3ab513a8d46a1cb70f5333fa56bb787a58288) )
+ROM_END
+
+/******************************************************************************/
+
+static READ8_HANDLER( cycle_r )
+{
+ int pc=activecpu_get_pc();
+ int ret=actfancr_ram[0x26];
+
+ if (offset==1) return actfancr_ram[0x27];
+
+ if (pc==0xe29a && ret==0) {
+ cpu_spinuntil_int();
+ return 1;
+ }
+
+ return ret;
+}
+
+static READ8_HANDLER( cyclej_r )
+{
+ int pc=activecpu_get_pc();
+ int ret=actfancr_ram[0x26];
+
+ if (offset==1) return actfancr_ram[0x27];
+
+ if (pc==0xe2b1 && ret==0) {
+ cpu_spinuntil_int();
+ return 1;
+ }
+
+ return ret;
+}
+
+static DRIVER_INIT( actfancr )
+{
+ memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x1f0026, 0x1f0027, 0, 0, cycle_r);
+}
+
+static DRIVER_INIT( actfancj )
+{
+ memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x1f0026, 0x1f0027, 0, 0, cyclej_r);
+}
+
+
+
+GAME( 1989, actfancr, 0, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 2)", 0 )
+GAME( 1989, actfanc1, actfancr, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 1)", 0 )
+GAME( 1989, actfancj, actfancr, actfancr, actfancr, actfancj, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (Japan revision 1)", 0 )
+GAME( 1989, triothep, 0, triothep, triothep, 0, ROT0, "Data East Corporation", "Trio The Punch - Never Forget Me... (World)", 0 )
+GAME( 1989, triothej, triothep, triothep, triothep, 0, ROT0, "Data East Corporation", "Trio The Punch - Never Forget Me... (Japan)", 0 )
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
new file mode 100644
index 00000000000..bae87822022
--- /dev/null
+++ b/src/mame/drivers/adp.c
@@ -0,0 +1,239 @@
+/*
+ADP (Merkur?) games from '90 running on similar hardware.
+(68k + HD63484 + YM2149)
+
+Skeleton driver by TS - analog at op.pl
+
+TODO:
+(almost everything)
+ - add emulation of HD63484 (like shanghai.c but 4bpp mode and much more commands)
+ - add sound and i/o
+ - protection in Fashion Gambler (NVRam based?)
+
+Supported games :
+- Quick Jack ("COPYRIGHT BY ADP LUEBBECKE GERMANY 1993")
+- Skat TV ("COPYRIGHT BY ADP LUEBBECKE GERMANY 1994")
+- Skat TV v. TS3 ("COPYRIGHT BY ADP LUEBBECKE GERMANY 1995")
+- Fashion Gambler ("COPYRIGHT BY ADP LUEBBECKE GERMANY 1997")
+- Backgammon ("COPYRIGHT BY ADP LUEBBECKE GERMANY 1994")
+
+
+
+Skat TV (Version TS3)
+Three board stack.
+
+CPU Board:
+----------
+ ____________________________________________________________
+ | ______________ ______________ ___________ |
+ | 74HC245N | t1 i | |KM681000ALP7| |+ | |
+ | 74HC573 |____________| |____________| | 3V Bat | |
+ | | | |
+ | ______________ ______________ | -| |
+ | | t1 ii | |KM681000ALP7| |_________| |
+ | ||| |____________| |____________| ||| |
+ | ||| ___________ ||| M62X42B |
+ | X ||| | | ||| |
+ | ||| |68EC000 8| 74HC32 74HC245 ||| MAX691CPE |
+ | ||| | | 74AC138 74HC573 ||| 74HC32 |
+ | | | |
+ | 74HC573 |_________| 74HC08 74HC10 74HC32 74HC21 |
+ |__________________________________________________________|
+
+Parts:
+
+ 68EC000FN8 - Motorola 68k CPU
+ KM681000ALP7 - 128K X 8 Bit Low Power CMOS Static RAM
+ OKIM62X42B - Real-time Clock ic With Built-in Crystal
+ MAX691CPE - P Reset ic With Watchdog And Battery Switchover
+ X - 8MHz xtal
+ 3V Bat - Lithium 3V power module
+
+Video Board:
+------------
+ ____________________________________________________________
+ | ______________ ______________ |
+ | | t2 i | |KM681000ALP7| 74HC573 |
+ | |____________| |____________| *|
+ | 74HC573 *|
+ | ______________ ______________ *|
+ | | t2 ii | |KM681000ALP7| P3|
+ | ||| |____________| |____________| ||| *|
+ | ||| ___________ ||| *|
+ | ||| | | ||| *|
+ | ||| | HD63484 | 74HC04 74HC00 ||| P6|
+ | ||| | | 74HC74 74HC08 ||| 74HC245 |
+ | | | |
+ | 74HC573 |_________| 74HC166 74HC166 74HC166 74HC166 |
+ |__________________________________________________________|
+
+Parts:
+
+ HD63484CP8 - Advanced CRT Controller
+ KM681000ALP7 - 128K X 8 Bit Low Power CMOS Static RAM
+
+Connectors:
+
+ Two connectors to link with CPU Board
+ Two connectors to link with Sound and I/O Board
+ P3 - Monitor
+ P6 - Lightpen
+
+Sound and I/O board:
+---------------------
+ _________________________________________________________________________________
+ | TS271CN 74HC02 **** **** |
+ |* ________________ P1 P2 *|
+ |* 74HC574 | YM2149F | *|
+ |* ||| |______________| 74HC393 74HC4015 ||| *|
+ |P3 74HC245 ||| ||| P6|
+ |* ||| ________________ X ||| TL7705ACP *|
+ |* ||| |SCN68681C1N40 | ||| *|
+ |* ||| |______________| 74HC32 74AC138 ||| *|
+ |P7 ||| ||| P8|
+ |* TC428CPA *|
+ |* *|
+ |* P11 P12 P13 P14 P15 P16 P17 P18 P19 P20 P21 *|
+ |P9 **** ***** ***** **** OO **** **** ******* **** **** *** *** P10|
+ |_______________________________________________________________________________|
+
+Parts:
+
+ YM2149F - Yamaha PSG
+ SCN68681C1N40 - Dual Asynchronous Receiver/transmitter (DUART);
+ TS271CN - Programmable Low Power CMOS Single Op-amp
+ TL7705ACP - Supply Voltage Supervisor
+ TC428CPA - Dual CMOS High-speed Driver
+ OO - LEDs (red)
+ X - 3.6864MHz xtal
+
+Connectors:
+
+ Two connectors to link with Video Board
+ P1 - Tueroeffn
+ P2 - PSG In/Out
+ P3 - Lautsprecher
+ P6 - Service - Tast.
+ P7 - Maschine (barely readable)
+ P8 - Muenzeinheit
+ P9 - Atzepter
+ P10 - Reset Fadenfoul
+ P11 - Netzteil
+ P12 - Serienplan
+ P13 - Serienplan 2
+ P14 - Muenzeinheit 2
+ P15 - I2C Bus
+ P16 - Kodierg.
+ P17 - TTL Ein-Aueg.
+ P18 - Out
+ P19 - In
+ P20 - Serielle-S.
+ P21 - Tuerschalter
+
+There's also (external) JAMMA adapter - 4th board filled with resistors and diodes.
+
+*/
+
+#include "driver.h"
+#include "sound/ay8910.h"
+
+static ADDRESS_MAP_START( skattv_mem, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x0fffff) AM_ROM
+ AM_RANGE(0xfc0000, 0xffffff) AM_RAM
+ADDRESS_MAP_END
+
+static VIDEO_START(skattv)
+{
+}
+
+static VIDEO_UPDATE(skattv)
+{
+ return 0;
+}
+
+static INPUT_PORTS_START( skattv )
+
+INPUT_PORTS_END
+
+static MACHINE_DRIVER_START( skattv )
+ MDRV_CPU_ADD_TAG("main", M68000, 8000000)
+ MDRV_CPU_PROGRAM_MAP(skattv_mem, 0)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE(640, 480)
+ MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
+ MDRV_PALETTE_LENGTH(0x100)
+
+ MDRV_VIDEO_START(skattv)
+ MDRV_VIDEO_UPDATE(skattv)
+
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ADD(AY8910, 3686400/2)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+MACHINE_DRIVER_END
+
+ROM_START( quickjac )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "quick_jack_index_a.1.u2.bin", 0x00000, 0x10000, CRC(c2fba6fe) SHA1(f79e5913f9ded1e370cc54dd55860263b9c51d61) )
+ ROM_LOAD16_BYTE( "quick_jack_index_a.2.u6.bin", 0x00001, 0x10000, CRC(210cb89b) SHA1(8eac60d40b60e845f9c02fee6c447f125ba5d1ab) )
+
+ ROM_REGION( 0x40000, REGION_GFX1, 0 )
+ ROM_LOAD16_BYTE( "quick_jack_video_inde_a.1.u2.bin", 0x00000, 0x20000, CRC(73c27fc6) SHA1(12429bc0009b7754e08d2b6a5e1cd8251ab66e2d) )
+ ROM_LOAD16_BYTE( "quick_jack_video_inde_a.2.u6.bin", 0x00001, 0x20000, CRC(61d55be2) SHA1(bc17dc91fd1ef0f862eb0d7dbbbfa354a8403eb8) )
+ROM_END
+
+ROM_START( skattv )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "f2_i.bin", 0x00000, 0x20000, CRC(3cb8b431) SHA1(e7930876b6cd4cba837c3da05d6948ef9167daea) )
+ ROM_LOAD16_BYTE( "f2_ii.bin", 0x00001, 0x20000, CRC(0db1d2d5) SHA1(a29b0299352e0b2b713caf02aa7978f2a4b34e37) )
+
+ ROM_REGION( 0x40000, REGION_GFX1, 0 )
+ ROM_LOAD16_BYTE( "f1_i.bin", 0x00000, 0x20000, CRC(4869a889) SHA1(ad9f3fcdfd3630f9ad5b93a9d2738de9fc3514d3) )
+ ROM_LOAD16_BYTE( "f1_ii.bin", 0x00001, 0x20000, CRC(17681537) SHA1(133685854b2080aaa3d0cced0287bc454d1f3bfc) )
+ROM_END
+
+ROM_START( skattva )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "skat_tv_version_ts3.1.u2.bin", 0x00000, 0x20000, CRC(68f82fe8) SHA1(d5f9cb600531cdd748616d8c042b6a151ebe205a) )
+ ROM_LOAD16_BYTE( "skat_tv_version_ts3.2.u6.bin", 0x00001, 0x20000, CRC(4f927832) SHA1(bbe013005fd00dd42d12939eab5c80ec44a54b71) )
+
+ ROM_REGION( 0x40000, REGION_GFX1, 0 )
+ ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.1.u2.bin", 0x00000, 0x20000, CRC(de6f275b) SHA1(0c396fa4d1975c8ccc4967d330b368c0697d2124) )
+ ROM_LOAD16_BYTE( "skat_tv_videoprom_t2.2.u5.bin", 0x00001, 0x20000, CRC(af3e60f9) SHA1(c88976ea42cf29a092fdee18377b32ffe91e9f33) )
+ROM_END
+
+ROM_START( backgamn )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "b_f2_i.bin", 0x00000, 0x10000, CRC(9e42937c) SHA1(85d462a560b85b03ee9d341e18815b7c396118ac) )
+ ROM_LOAD16_BYTE( "b_f2_ii.bin", 0x00001, 0x10000, CRC(8e0ee50c) SHA1(2a05c337db1131b873646aa4109593636ebaa356) )
+
+ ROM_REGION( 0x40000, REGION_GFX1, 0 )
+ ROM_LOAD16_BYTE( "b_f1_i.bin", 0x00000, 0x20000, NO_DUMP )
+ ROM_LOAD16_BYTE( "b_f1_ii.bin", 0x00001, 0x20000, NO_DUMP )
+ROM_END
+
+ROM_START( fashiong )
+ ROM_REGION( 0x100000, REGION_CPU1, 0 )
+ ROM_LOAD16_BYTE( "fashion_gambler_s6_i.bin", 0x00000, 0x80000, CRC(827a164d) SHA1(dc16380226cabdefbfd893cb50cbfca9e134be40) )
+ ROM_LOAD16_BYTE( "fashion_gambler_s6_ii.bin", 0x00001, 0x80000, CRC(5a2466d1) SHA1(c113a2295beed2011c70887a1f2fcdec00b055cb) )
+
+ ROM_REGION( 0x100000, REGION_GFX1, 0 )
+ ROM_LOAD16_BYTE( "fashion_gambler_video_s2_i.bin", 0x00000, 0x80000, CRC(d1ee9133) SHA1(e5fdfa303a3317f8f5fbdc03438ee97415afff4b) )
+ ROM_LOAD16_BYTE( "fashion_gambler_video_s2_ii.bin", 0x00001, 0x80000, CRC(07b1e722) SHA1(594cbe9edfea6b04a4e49d1c1594f1c3afeadef5) )
+
+ ROM_REGION( 0x4000, REGION_USER1, 0 )
+ //nvram - 16 bit
+ ROM_LOAD16_BYTE( "m48z08post.bin", 0x0000, 0x2000, CRC(2d317a04) SHA1(c690c0d4b2259231d642ab5a30fcf389ba987b70) )
+ ROM_LOAD16_BYTE( "m48z08posz.bin", 0x0001, 0x2000, CRC(7c5a4b78) SHA1(262d0d7f5b24e356ab54eb2450bbaa90e3fb5464) )
+ROM_END
+
+GAME( 1990, backgamn, 0, skattv, skattv, 0, ROT0, "ADP", "Backgammon", GAME_NOT_WORKING )
+GAME( 1993, quickjac, 0, skattv, skattv, 0, ROT0, "ADP", "Quick Jack", GAME_NOT_WORKING )
+GAME( 1994, skattv, 0, skattv, skattv, 0, ROT0, "ADP", "Skat TV", GAME_NOT_WORKING )
+GAME( 1995, skattva, skattv, skattv, skattv, 0, ROT0, "ADP", "Skat TV (version TS3)", GAME_NOT_WORKING )
+GAME( 1997, fashiong, 0, skattv, skattv, 0, ROT0, "ADP", "Fashion Gambler", GAME_NOT_WORKING )
+
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
new file mode 100644
index 00000000000..667ca3b221a
--- /dev/null
+++ b/src/mame/drivers/aeroboto.c
@@ -0,0 +1,355 @@
+/****************************************************************************
+
+Formation Z / Aeroboto
+
+Driver by Carlos A. Lozano
+
+
+TODO:
+- star field
+ Uki's report:
+ - The color of stars:
+ at 1st title screen = neutral tints of blue and aqua (1 color only)
+ at 2nd title screen and attract mode (purple surface) = light & dark aqua
+ This color will not be affected by scroll. Leftmost 8pixels are light, next
+ 16 pixels are dark, the next 16 pixels are light, and so on.
+
+Revisions:
+- Updated starfield according to Uki's report. (AT)
+
+*note: Holding any key at boot puts the game in MCU test. Press F3 to quit.
+
+****************************************************************************/
+
+#include "driver.h"
+#include "sound/ay8910.h"
+
+
+extern UINT8 *aeroboto_videoram;
+extern UINT8 *aeroboto_hscroll, *aeroboto_vscroll, *aeroboto_tilecolor;
+extern UINT8 *aeroboto_starx, *aeroboto_stary, *aeroboto_bgcolor;
+
+VIDEO_START( aeroboto );
+VIDEO_UPDATE( aeroboto );
+
+READ8_HANDLER( aeroboto_in0_r );
+WRITE8_HANDLER( aeroboto_3000_w );
+WRITE8_HANDLER( aeroboto_videoram_w );
+WRITE8_HANDLER( aeroboto_tilecolor_w );
+
+static UINT8 *aeroboto_mainram;
+static int disable_irq = 0;
+
+
+static READ8_HANDLER( aeroboto_201_r )
+{
+ /* if you keep a button pressed during boot, the game will expect this */
+ /* serie of values to be returned from 3004, and display "PASS 201" if it is */
+ static const UINT8 res[4] = { 0xff,0x9f,0x1b,0x03};
+ static int count;
+ logerror("PC %04x: read 3004\n",activecpu_get_pc());
+ return res[(count++)&3];
+}
+
+
+static INTERRUPT_GEN( aeroboto_interrupt )
+{
+ if (!disable_irq)
+ cpunum_set_input_line(0, 0, HOLD_LINE);
+ else
+ disable_irq--;
+}
+
+static READ8_HANDLER( aeroboto_2973_r )
+{
+ aeroboto_mainram[0x02be] = 0;
+ return(0xff);
+}
+
+static WRITE8_HANDLER ( aeroboto_1a2_w )
+{
+ aeroboto_mainram[0x01a2] = data;
+ if (data) disable_irq = 1;
+}
+
+static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x07ff) AM_READ(MRA8_RAM) // main RAM
+ AM_RANGE(0x0800, 0x08ff) AM_READ(MRA8_RAM) // tile color buffer; copied to 0x2000
+ AM_RANGE(0x1000, 0x17ff) AM_READ(MRA8_RAM) // tile RAM
+ AM_RANGE(0x1800, 0x183f) AM_READ(MRA8_RAM) // horizontal scroll regs
+ AM_RANGE(0x2000, 0x2