summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2018-12-29 05:53:50 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2018-12-29 05:53:50 +1100
commitf1f0591f43f381123e8d9ec20c52eb7c0c332c79 (patch) (github)
tree97c8dd30a6ea292c3189f372b8103a2e303c0b2d
parent65bfb2654f0c73235f114e9145c766245bed9790 (diff)
downloadmame-f1f0591f43f381123e8d9ec20c52eb7c0c332c79.tar.bz2
mame-f1f0591f43f381123e8d9ec20c52eb7c0c332c79.zip
Start cleaning up palette configuration:
* Basically, initialisers go in the constructor arguments, and things for setting format go in set_format. * Initialisation patterns can be specified with an enum discriminator or with a FUNC and optionally a tag. * Formats can be specified with an enum discriminator or a size and function pointer. * You must always supply the number of entries when setting the format. * When initislising with a paletter initialisation member, you can specify the entries and indirecte entries together. * The palette_device now has a standard constructor, so use .set_entries if you are specifying entry count with no format/initialisation. * Also killed an overload on delegates that wasn't being useful.
-rw-r--r--src/devices/bus/a2bus/a2videoterm.cpp2
-rw-r--r--src/devices/bus/a2bus/a2videoterm.h3
-rw-r--r--src/devices/bus/acorn/system/vdu80.cpp2
-rw-r--r--src/devices/bus/c64/xl80.cpp2
-rw-r--r--src/devices/bus/cbm2/hrg.cpp4
-rw-r--r--src/devices/bus/compis/hrg.cpp4
-rw-r--r--src/devices/bus/comx35/clm.cpp2
-rw-r--r--src/devices/bus/ecbbus/grip.cpp2
-rw-r--r--src/devices/bus/einstein/pipe/tk02.cpp2
-rw-r--r--src/devices/bus/nasbus/avc.cpp2
-rw-r--r--src/devices/bus/pet/hsg.cpp4
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.cpp2
-rw-r--r--src/devices/bus/vic20/videopak.cpp2
-rw-r--r--src/devices/bus/wangpc/tig.cpp2
-rw-r--r--src/devices/cpu/dspp/dspp.cpp5
-rw-r--r--src/devices/machine/ie15.cpp2
-rw-r--r--src/devices/machine/laserdsc.h2
-rw-r--r--src/devices/sound/cdp1869.cpp22
-rw-r--r--src/devices/sound/cdp1869.h4
-rw-r--r--src/devices/sound/volt_reg.h9
-rw-r--r--src/devices/video/315_5124.cpp26
-rw-r--r--src/devices/video/315_5124.h9
-rw-r--r--src/devices/video/315_5313.cpp11
-rw-r--r--src/devices/video/gba_lcd.cpp93
-rw-r--r--src/devices/video/gba_lcd.h4
-rw-r--r--src/devices/video/hd66421.cpp30
-rw-r--r--src/devices/video/hd66421.h2
-rw-r--r--src/devices/video/i8244.cpp41
-rw-r--r--src/devices/video/i8244.h2
-rw-r--r--src/devices/video/imagetek_i4100.cpp2
-rw-r--r--src/devices/video/polylgcy.cpp6
-rw-r--r--src/devices/video/upd7227.h17
-rw-r--r--src/emu/devdelegate.h6
-rw-r--r--src/emu/dipalette.h7
-rw-r--r--src/emu/disound.cpp15
-rw-r--r--src/emu/disound.h8
-rw-r--r--src/emu/emumem.h2
-rw-r--r--src/emu/emupal.cpp362
-rw-r--r--src/emu/emupal.h398
-rw-r--r--src/emu/video/resnet.h24
-rw-r--r--src/lib/util/delegate.h240
-rw-r--r--src/mame/drivers/1942.cpp10
-rw-r--r--src/mame/drivers/1943.cpp8
-rw-r--r--src/mame/drivers/1945kiii.cpp6
-rw-r--r--src/mame/drivers/2mindril.cpp5
-rw-r--r--src/mame/drivers/3x3puzzl.cpp21
-rw-r--r--src/mame/drivers/40love.cpp4
-rw-r--r--src/mame/drivers/4enraya.cpp4
-rw-r--r--src/mame/drivers/4roses.cpp8
-rw-r--r--src/mame/drivers/5clown.cpp67
-rw-r--r--src/mame/drivers/8080bw.cpp54
-rw-r--r--src/mame/drivers/88games.cpp4
-rw-r--r--src/mame/drivers/a5105.cpp76
-rw-r--r--src/mame/drivers/a51xx.cpp3
-rw-r--r--src/mame/drivers/a7150.cpp2
-rw-r--r--src/mame/drivers/a7800.cpp20
-rw-r--r--src/mame/drivers/aa310.cpp2
-rw-r--r--src/mame/drivers/ac1.cpp4
-rw-r--r--src/mame/drivers/accomm.cpp9
-rw-r--r--src/mame/drivers/ace.cpp4
-rw-r--r--src/mame/drivers/acefruit.cpp23
-rw-r--r--src/mame/drivers/acommand.cpp11
-rw-r--r--src/mame/drivers/actfancr.cpp6
-rw-r--r--src/mame/drivers/adp.cpp54
-rw-r--r--src/mame/drivers/advision.cpp2
-rw-r--r--src/mame/drivers/aeroboto.cpp2
-rw-r--r--src/mame/drivers/aerofgt.cpp96
-rw-r--r--src/mame/drivers/airbustr.cpp7
-rw-r--r--src/mame/drivers/airraid.cpp5
-rw-r--r--src/mame/drivers/ajax.cpp3
-rw-r--r--src/mame/drivers/albazc.cpp24
-rw-r--r--src/mame/drivers/albazg.cpp5
-rw-r--r--src/mame/drivers/aleck64.cpp2
-rw-r--r--src/mame/drivers/alesis.cpp5
-rw-r--r--src/mame/drivers/alg.cpp5
-rw-r--r--src/mame/drivers/aliens.cpp4
-rw-r--r--src/mame/drivers/alpha68k.cpp48
-rw-r--r--src/mame/drivers/alphasma.cpp7
-rw-r--r--src/mame/drivers/alphatpx.cpp4
-rw-r--r--src/mame/drivers/alphatro.cpp19
-rw-r--r--src/mame/drivers/alto2.cpp2
-rw-r--r--src/mame/drivers/amaticmg.cpp97
-rw-r--r--src/mame/drivers/ambush.cpp155
-rw-r--r--src/mame/drivers/amiga.cpp3
-rw-r--r--src/mame/drivers/ampoker2.cpp11
-rw-r--r--src/mame/drivers/amspdwy.cpp7
-rw-r--r--src/mame/drivers/amstrad.cpp33
-rw-r--r--src/mame/drivers/amusco.cpp25
-rw-r--r--src/mame/drivers/amust.cpp2
-rw-r--r--src/mame/drivers/angelkds.cpp7
-rw-r--r--src/mame/drivers/anzterm.cpp2
-rw-r--r--src/mame/drivers/apc.cpp6
-rw-r--r--src/mame/drivers/apexc.cpp2
-rw-r--r--src/mame/drivers/apogee.cpp14
-rw-r--r--src/mame/drivers/apple1.cpp3
-rw-r--r--src/mame/drivers/apple2.cpp14
-rw-r--r--src/mame/drivers/apple2e.cpp17
-rw-r--r--src/mame/drivers/apple2gs.cpp7
-rw-r--r--src/mame/drivers/apple3.cpp4
-rw-r--r--src/mame/drivers/applix.cpp93
-rw-r--r--src/mame/drivers/appoooh.cpp16
-rw-r--r--src/mame/drivers/apricot.cpp3
-rw-r--r--src/mame/drivers/aquarium.cpp7
-rw-r--r--src/mame/drivers/aquarius.cpp11
-rw-r--r--src/mame/drivers/arabian.cpp2
-rw-r--r--src/mame/drivers/arcadecl.cpp6
-rw-r--r--src/mame/drivers/arcadia.cpp9
-rw-r--r--src/mame/drivers/aristmk4.cpp17
-rw-r--r--src/mame/drivers/aristmk5.cpp2
-rw-r--r--src/mame/drivers/aristmk6.cpp2
-rw-r--r--src/mame/drivers/arkanoid.cpp12
-rw-r--r--src/mame/drivers/armedf.cpp64
-rw-r--r--src/mame/drivers/arsystems.cpp3
-rw-r--r--src/mame/drivers/ashnojoe.cpp6
-rw-r--r--src/mame/drivers/asterix.cpp4
-rw-r--r--src/mame/drivers/astinvad.cpp8
-rw-r--r--src/mame/drivers/astrcorp.cpp36
-rw-r--r--src/mame/drivers/astrocde.cpp4
-rw-r--r--src/mame/drivers/astrohome.cpp2
-rw-r--r--src/mame/drivers/at.cpp2
-rw-r--r--src/mame/drivers/atari400.cpp22
-rw-r--r--src/mame/drivers/atarifb.cpp44
-rw-r--r--src/mame/drivers/atarig1.cpp3
-rw-r--r--src/mame/drivers/atarig42.cpp3
-rw-r--r--src/mame/drivers/atarigx2.cpp3
-rw-r--r--src/mame/drivers/atarist.cpp8
-rw-r--r--src/mame/drivers/atarisy1.cpp5
-rw-r--r--src/mame/drivers/atarisy2.cpp2
-rw-r--r--src/mame/drivers/atarisy4.cpp2
-rw-r--r--src/mame/drivers/atetris.cpp2
-rw-r--r--src/mame/drivers/att4425.cpp2
-rw-r--r--src/mame/drivers/attache.cpp4
-rw-r--r--src/mame/drivers/atvtrack.cpp2
-rw-r--r--src/mame/drivers/aussiebyte.cpp2
-rw-r--r--src/mame/drivers/avigo.cpp10
-rw-r--r--src/mame/drivers/avt.cpp73
-rw-r--r--src/mame/drivers/ax20.cpp11
-rw-r--r--src/mame/drivers/b2m.cpp5
-rw-r--r--src/mame/drivers/backfire.cpp8
-rw-r--r--src/mame/drivers/badlands.cpp6
-rw-r--r--src/mame/drivers/badlandsbl.cpp6
-rw-r--r--src/mame/drivers/bagman.cpp10
-rw-r--r--src/mame/drivers/balsente.cpp5
-rw-r--r--src/mame/drivers/banctec.cpp2
-rw-r--r--src/mame/drivers/bankp.cpp8
-rw-r--r--src/mame/drivers/baraduke.cpp3
-rw-r--r--src/mame/drivers/bartop52.cpp2
-rw-r--r--src/mame/drivers/batman.cpp3
-rw-r--r--src/mame/drivers/battlnts.cpp5
-rw-r--r--src/mame/drivers/bbc.cpp6
-rw-r--r--src/mame/drivers/bbusters.cpp10
-rw-r--r--src/mame/drivers/bcs3.cpp4
-rw-r--r--src/mame/drivers/beathead.cpp8
-rw-r--r--src/mame/drivers/beehive.cpp4
-rw-r--r--src/mame/drivers/beezer.cpp3
-rw-r--r--src/mame/drivers/bestleag.cpp14
-rw-r--r--src/mame/drivers/bigbord2.cpp5
-rw-r--r--src/mame/drivers/bigevglf.cpp2
-rw-r--r--src/mame/drivers/bigstrkb.cpp8
-rw-r--r--src/mame/drivers/binbug.cpp2
-rw-r--r--src/mame/drivers/bingoman.cpp30
-rw-r--r--src/mame/drivers/bingor.cpp63
-rw-r--r--src/mame/drivers/bionicc.cpp5
-rw-r--r--src/mame/drivers/bishi.cpp3
-rw-r--r--src/mame/drivers/bitgraph.cpp4
-rw-r--r--src/mame/drivers/bk.cpp2
-rw-r--r--src/mame/drivers/bking.cpp13
-rw-r--r--src/mame/drivers/blackt96.cpp11
-rw-r--r--src/mame/drivers/bladestl.cpp7
-rw-r--r--src/mame/drivers/blitz68k.cpp2
-rw-r--r--src/mame/drivers/blktiger.cpp7
-rw-r--r--src/mame/drivers/blmbycar.cpp5
-rw-r--r--src/mame/drivers/blockade.cpp6
-rw-r--r--src/mame/drivers/blockhl.cpp11
-rw-r--r--src/mame/drivers/blocktax.cpp7
-rw-r--r--src/mame/drivers/bloodbro.cpp9
-rw-r--r--src/mame/drivers/blstroid.cpp5
-rw-r--r--src/mame/drivers/blueprnt.cpp7
-rw-r--r--src/mame/drivers/bmcbowl.cpp6
-rw-r--r--src/mame/drivers/bmcpokr.cpp2
-rw-r--r--src/mame/drivers/bmjr.cpp2
-rw-r--r--src/mame/drivers/bml3.cpp2
-rw-r--r--src/mame/drivers/bnstars.cpp43
-rw-r--r--src/mame/drivers/bogeyman.cpp8
-rw-r--r--src/mame/drivers/bombjack.cpp5
-rw-r--r--src/mame/drivers/bottom9.cpp3
-rw-r--r--src/mame/drivers/boxer.cpp11
-rw-r--r--src/mame/drivers/brkthru.cpp14
-rw-r--r--src/mame/drivers/bsktball.cpp30
-rw-r--r--src/mame/drivers/btime.cpp19
-rw-r--r--src/mame/drivers/bublbobl.cpp34
-rw-r--r--src/mame/drivers/buggychl.cpp12
-rw-r--r--src/mame/drivers/busicom.cpp5
-rw-r--r--src/mame/drivers/buster.cpp11
-rw-r--r--src/mame/drivers/bw12.cpp2
-rw-r--r--src/mame/drivers/bw2.cpp5
-rw-r--r--src/mame/drivers/c10.cpp2
-rw-r--r--src/mame/drivers/c65.cpp11
-rw-r--r--src/mame/drivers/c900.cpp2
-rw-r--r--src/mame/drivers/cabal.cpp14
-rw-r--r--src/mame/drivers/cabaret.cpp7
-rw-r--r--src/mame/drivers/calomega.cpp7
-rw-r--r--src/mame/drivers/calorie.cpp14
-rw-r--r--src/mame/drivers/camplynx.cpp13
-rw-r--r--src/mame/drivers/candela.cpp2
-rw-r--r--src/mame/drivers/canyon.cpp18
-rw-r--r--src/mame/drivers/cardline.cpp67
-rw-r--r--src/mame/drivers/carjmbre.cpp23
-rw-r--r--src/mame/drivers/carpolo.cpp8
-rw-r--r--src/mame/drivers/carrera.cpp66
-rw-r--r--src/mame/drivers/caswin.cpp20
-rw-r--r--src/mame/drivers/cave.cpp38
-rw-r--r--src/mame/drivers/cb2001.cpp52
-rw-r--r--src/mame/drivers/cball.cpp19
-rw-r--r--src/mame/drivers/cbasebal.cpp5
-rw-r--r--src/mame/drivers/cbm2.cpp2
-rw-r--r--src/mame/drivers/cbuster.cpp3
-rw-r--r--src/mame/drivers/cc40.cpp24
-rw-r--r--src/mame/drivers/ccastles.cpp2
-rw-r--r--src/mame/drivers/cchance.cpp20
-rw-r--r--src/mame/drivers/cclimber.cpp24
-rw-r--r--src/mame/drivers/cd2650.cpp2
-rw-r--r--src/mame/drivers/cdc721.cpp21
-rw-r--r--src/mame/drivers/centiped.cpp6
-rw-r--r--src/mame/drivers/cesclass.cpp11
-rw-r--r--src/mame/drivers/cfx9850.cpp6
-rw-r--r--src/mame/drivers/chaknpop.cpp7
-rw-r--r--src/mame/drivers/champbas.cpp32
-rw-r--r--src/mame/drivers/champbwl.cpp31
-rw-r--r--src/mame/drivers/chanbara.cpp68
-rw-r--r--src/mame/drivers/chance32.cpp20
-rw-r--r--src/mame/drivers/changela.cpp3
-rw-r--r--src/mame/drivers/channelf.cpp20
-rw-r--r--src/mame/drivers/cheekyms.cpp30
-rw-r--r--src/mame/drivers/chinagat.cpp86
-rw-r--r--src/mame/drivers/chinsan.cpp2
-rw-r--r--src/mame/drivers/chqflag.cpp3
-rw-r--r--src/mame/drivers/circus.cpp8
-rw-r--r--src/mame/drivers/circusc.cpp9
-rw-r--r--src/mame/drivers/cischeat.cpp27
-rw-r--r--src/mame/drivers/citycon.cpp7
-rw-r--r--src/mame/drivers/clcd.cpp5
-rw-r--r--src/mame/drivers/cloak.cpp2
-rw-r--r--src/mame/drivers/cloud9.cpp2
-rw-r--r--src/mame/drivers/clshroad.cpp15
-rw-r--r--src/mame/drivers/cmi.cpp4
-rw-r--r--src/mame/drivers/cmmb.cpp9
-rw-r--r--src/mame/drivers/cninja.cpp28
-rw-r--r--src/mame/drivers/cntsteer.cpp34
-rw-r--r--src/mame/drivers/cocoloco.cpp50
-rw-r--r--src/mame/drivers/combatsc.cpp31
-rw-r--r--src/mame/drivers/commando.cpp10
-rw-r--r--src/mame/drivers/compgolf.cpp7
-rw-r--r--src/mame/drivers/compucolor.cpp2
-rw-r--r--src/mame/drivers/comquest.cpp2
-rw-r--r--src/mame/drivers/concept.cpp6
-rw-r--r--src/mame/drivers/contra.cpp13
-rw-r--r--src/mame/drivers/controlid.cpp15
-rw-r--r--src/mame/drivers/coolridr.cpp6
-rw-r--r--src/mame/drivers/cop01.cpp17
-rw-r--r--src/mame/drivers/copsnrob.cpp16
-rw-r--r--src/mame/drivers/corona.cpp82
-rw-r--r--src/mame/drivers/cosmic.cpp19
-rw-r--r--src/mame/drivers/cps3.cpp2
-rw-r--r--src/mame/drivers/craft.cpp2
-rw-r--r--src/mame/drivers/crbaloon.cpp6
-rw-r--r--src/mame/drivers/crgolf.cpp10
-rw-r--r--src/mame/drivers/crimfght.cpp3
-rw-r--r--src/mame/drivers/crospang.cpp3
-rw-r--r--src/mame/drivers/crshrace.cpp5
-rw-r--r--src/mame/drivers/crystal.cpp2
-rw-r--r--src/mame/drivers/cv1k.cpp2
-rw-r--r--src/mame/drivers/cvs.cpp4
-rw-r--r--src/mame/drivers/cxhumax.cpp2
-rw-r--r--src/mame/drivers/cyberbal.cpp9
-rw-r--r--src/mame/drivers/cybertnk.cpp25
-rw-r--r--src/mame/drivers/cybstorm.cpp3
-rw-r--r--src/mame/drivers/cyclemb.cpp49
-rw-r--r--src/mame/drivers/cz101.cpp7
-rw-r--r--src/mame/drivers/d6800.cpp2
-rw-r--r--src/mame/drivers/d9final.cpp10
-rw-r--r--src/mame/drivers/dacholer.cpp58
-rw-r--r--src/mame/drivers/dai.cpp7
-rw-r--r--src/mame/drivers/dai3wksi.cpp9
-rw-r--r--src/mame/drivers/dambustr.cpp12
-rw-r--r--src/mame/drivers/darius.cpp11
-rw-r--r--src/mame/drivers/darkmist.cpp11
-rw-r--r--src/mame/drivers/dassault.cpp3
-rw-r--r--src/mame/drivers/dblcrown.cpp25
-rw-r--r--src/mame/drivers/dblewing.cpp3
-rw-r--r--src/mame/drivers/dbz.cpp6
-rw-r--r--src/mame/drivers/dcheese.cpp6
-rw-r--r--src/mame/drivers/dcon.cpp14
-rw-r--r--src/mame/drivers/dct11em.cpp2
-rw-r--r--src/mame/drivers/dday.cpp11
-rw-r--r--src/mame/drivers/ddayjlc.cpp51
-rw-r--r--src/mame/drivers/ddealer.cpp14
-rw-r--r--src/mame/drivers/ddenlovr.cpp14
-rw-r--r--src/mame/drivers/ddragon.cpp21
-rw-r--r--src/mame/drivers/ddragon3.cpp21
-rw-r--r--src/mame/drivers/ddribble.cpp7
-rw-r--r--src/mame/drivers/deadang.cpp7
-rw-r--r--src/mame/drivers/dec0.cpp26
-rw-r--r--src/mame/drivers/deco156.cpp8
-rw-r--r--src/mame/drivers/deco32.cpp11
-rw-r--r--src/mame/drivers/deco_ld.cpp36
-rw-r--r--src/mame/drivers/deco_mlc.cpp12
-rw-r--r--src/mame/drivers/decocass.cpp16
-rw-r--r--src/mame/drivers/deshoros.cpp10
-rw-r--r--src/mame/drivers/destroyr.cpp17
-rw-r--r--src/mame/drivers/dgn_beta.cpp51
-rw-r--r--src/mame/drivers/dgpix.cpp10
-rw-r--r--src/mame/drivers/dietgo.cpp3
-rw-r--r--src/mame/drivers/dim68k.cpp2
-rw-r--r--src/mame/drivers/divebomb.cpp8
-rw-r--r--src/mame/drivers/diverboy.cpp12
-rw-r--r--src/mame/drivers/djmain.cpp5
-rw-r--r--src/mame/drivers/dkong.cpp36
-rw-r--r--src/mame/drivers/dlair.cpp27
-rw-r--r--src/mame/drivers/dlair2.cpp7
-rw-r--r--src/mame/drivers/dmndrby.cpp84
-rw-r--r--src/mame/drivers/dms5000.cpp2
-rw-r--r--src/mame/drivers/dmv.cpp2
-rw-r--r--src/mame/drivers/docastle.cpp26
-rw-r--r--src/mame/drivers/dogfgt.cpp9
-rw-r--r--src/mame/drivers/dominob.cpp27
-rw-r--r--src/mame/drivers/dooyong.cpp56
-rw-r--r--src/mame/drivers/dorachan.cpp2
-rw-r--r--src/mame/drivers/dotrikun.cpp6
-rw-r--r--src/mame/drivers/dragon.cpp2
-rw-r--r--src/mame/drivers/dragrace.cpp28
-rw-r--r--src/mame/drivers/dreambal.cpp3
-rw-r--r--src/mame/drivers/dreamwld.cpp16
-rw-r--r--src/mame/drivers/drgnmst.cpp7
-rw-r--r--src/mame/drivers/dribling.cpp3
-rw-r--r--src/mame/drivers/drmicro.cpp8
-rw-r--r--src/mame/drivers/drtomy.cpp17
-rw-r--r--src/mame/drivers/drw80pkr.cpp43
-rw-r--r--src/mame/drivers/duet16.cpp2
-rw-r--r--src/mame/drivers/dvk_kcgd.cpp15
-rw-r--r--src/mame/drivers/dvk_ksm.cpp4
-rw-r--r--src/mame/drivers/dwarfd.cpp21
-rw-r--r--src/mame/drivers/dynadice.cpp9
-rw-r--r--src/mame/drivers/dynax.cpp45
-rw-r--r--src/mame/drivers/dynduke.cpp5
-rw-r--r--src/mame/drivers/e100.cpp2
-rw-r--r--src/mame/drivers/ec65.cpp4
-rw-r--r--src/mame/drivers/efdt.cpp25
-rw-r--r--src/mame/drivers/egghunt.cpp12
-rw-r--r--src/mame/drivers/electron.cpp10
-rw-r--r--src/mame/drivers/elwro800.cpp5
-rw-r--r--src/mame/drivers/emate.cpp3
-rw-r--r--src/mame/drivers/enigma2.cpp9
-rw-r--r--src/mame/drivers/eolith.cpp2
-rw-r--r--src/mame/drivers/eolith16.cpp36
-rw-r--r--src/mame/drivers/epos.cpp6
-rw-r--r--src/mame/drivers/equites.cpp8
-rw-r--r--src/mame/drivers/ertictac.cpp2
-rw-r--r--src/mame/drivers/esd16.cpp5
-rw-r--r--src/mame/drivers/esh.cpp83
-rw-r--r--src/mame/drivers/espial.cpp7
-rw-r--r--src/mame/drivers/esprit.cpp8
-rw-r--r--src/mame/drivers/ettrivia.cpp49
-rw-r--r--src/mame/drivers/eurocom2.cpp4
-rw-r--r--src/mame/drivers/excali64.cpp25
-rw-r--r--src/mame/drivers/exedexes.cpp4
-rw-r--r--src/mame/drivers/exelv.cpp4
-rw-r--r--src/mame/drivers/exerion.cpp8
-rw-r--r--src/mame/drivers/expro02.cpp58
-rw-r--r--src/mame/drivers/exprraid.cpp4
-rw-r--r--src/mame/drivers/exterm.cpp4
-rw-r--r--src/mame/drivers/extrema.cpp5
-rw-r--r--src/mame/drivers/exzisus.cpp4
-rw-r--r--src/mame/drivers/f-32.cpp11
-rw-r--r--src/mame/drivers/f1gp.cpp14
-rw-r--r--src/mame/drivers/fantland.cpp28
-rw-r--r--src/mame/drivers/fastfred.cpp11
-rw-r--r--src/mame/drivers/fastinvaders.cpp2
-rw-r--r--src/mame/drivers/fastlane.cpp5
-rw-r--r--src/mame/drivers/fb01.cpp18
-rw-r--r--src/mame/drivers/fc100.cpp2
-rw-r--r--src/mame/drivers/fcombat.cpp9
-rw-r--r--src/mame/drivers/feversoc.cpp15
-rw-r--r--src/mame/drivers/fgoal.cpp46
-rw-r--r--src/mame/drivers/finalizr.cpp8
-rw-r--r--src/mame/drivers/firebeat.cpp8
-rw-r--r--src/mame/drivers/firetrap.cpp14
-rw-r--r--src/mame/drivers/firetrk.cpp17
-rw-r--r--src/mame/drivers/fitfight.cpp13
-rw-r--r--src/mame/drivers/fk1.cpp6
-rw-r--r--src/mame/drivers/flipjack.cpp29
-rw-r--r--src/mame/drivers/flkatck.cpp4
-rw-r--r--src/mame/drivers/flower.cpp8
-rw-r--r--src/mame/drivers/flstory.cpp3
-rw-r--r--src/mame/drivers/flyball.cpp17
-rw-r--r--src/mame/drivers/fm7.cpp36
-rw-r--r--src/mame/drivers/fmtowns.cpp6
-rw-r--r--src/mame/drivers/foodf.cpp2
-rw-r--r--src/mame/drivers/fortecar.cpp56
-rw-r--r--src/mame/drivers/fp200.cpp10
-rw-r--r--src/mame/drivers/freekick.cpp8
-rw-r--r--src/mame/drivers/fresh.cpp27
-rw-r--r--src/mame/drivers/fromanc2.cpp32
-rw-r--r--src/mame/drivers/funkybee.cpp7
-rw-r--r--src/mame/drivers/funkyjet.cpp3
-rw-r--r--src/mame/drivers/funtech.cpp12
-rw-r--r--src/mame/drivers/funworld.cpp111
-rw-r--r--src/mame/drivers/funybubl.cpp7
-rw-r--r--src/mame/drivers/fuukifg2.cpp10
-rw-r--r--src/mame/drivers/fuukifg3.cpp5
-rw-r--r--src/mame/drivers/gaelco.cpp28
-rw-r--r--src/mame/drivers/gaelco2.cpp18
-rw-r--r--src/mame/drivers/gaelco3d.cpp10
-rw-r--r--src/mame/drivers/gaiden.cpp22
-rw-r--r--src/mame/drivers/gal3.cpp22
-rw-r--r--src/mame/drivers/galaga.cpp18
-rw-r--r--src/mame/drivers/galastrm.cpp2
-rw-r--r--src/mame/drivers/galaxi.cpp13
-rw-r--r--src/mame/drivers/galaxia.cpp4
-rw-r--r--src/mame/drivers/galaxian.cpp34
-rw-r--r--src/mame/drivers/galaxold.cpp60
-rw-r--r--src/mame/drivers/galaxy.cpp5
-rw-r--r--src/mame/drivers/galeb.cpp4
-rw-r--r--src/mame/drivers/galgame.cpp9
-rw-r--r--src/mame/drivers/galgames.cpp9
-rw-r--r--src/mame/drivers/galivan.cpp16
-rw-r--r--src/mame/drivers/galpani2.cpp14
-rw-r--r--src/mame/drivers/galpani3.cpp7
-rw-r--r--src/mame/drivers/galpanic.cpp9
-rw-r--r--src/mame/drivers/galspnbl.cpp8
-rw-r--r--src/mame/drivers/gamecom.cpp15
-rw-r--r--src/mame/drivers/gameking.cpp32
-rw-r--r--src/mame/drivers/gamepock.cpp2
-rw-r--r--src/mame/drivers/gaplus.cpp4
-rw-r--r--src/mame/drivers/gauntlet.cpp5
-rw-r--r--src/mame/drivers/gb.cpp83
-rw-r--r--src/mame/drivers/gberet.cpp16
-rw-r--r--src/mame/drivers/gcpinbal.cpp9
-rw-r--r--src/mame/drivers/gei.cpp5
-rw-r--r--src/mame/drivers/geniusiq.cpp54
-rw-r--r--src/mame/drivers/ghosteo.cpp2
-rw-r--r--src/mame/drivers/giclassic.cpp20
-rw-r--r--src/mame/drivers/gijoe.cpp4
-rw-r--r--src/mame/drivers/ginganin.cpp7
-rw-r--r--src/mame/drivers/glass.cpp7
-rw-r--r--src/mame/drivers/gluck2.cpp9
-rw-r--r--src/mame/drivers/gmaster.cpp19
-rw-r--r--src/mame/drivers/gng.cpp5
-rw-r--r--src/mame/drivers/go2000.cpp14
-rw-r--r--src/mame/drivers/goal92.cpp7
-rw-r--r--src/mame/drivers/goindol.cpp4
-rw-r--r--src/mame/drivers/goldngam.cpp2
-rw-r--r--src/mame/drivers/goldnpkr.cpp170
-rw-r--r--src/mame/drivers/goldstar.cpp209
-rw-r--r--src/mame/drivers/gomoku.cpp5
-rw-r--r--src/mame/drivers/good.cpp14
-rw-r--r--src/mame/drivers/goodejan.cpp14
-rw-r--r--src/mame/drivers/gotcha.cpp5
-rw-r--r--src/mame/drivers/gottlieb.cpp2
-rw-r--r--src/mame/drivers/gotya.cpp4
-rw-r--r--src/mame/drivers/goupil.cpp6
-rw-r--r--src/mame/drivers/gradius3.cpp4
-rw-r--r--src/mame/drivers/grchamp.cpp8
-rw-r--r--src/mame/drivers/grfd2301.cpp4
-rw-r--r--src/mame/drivers/gridcomp.cpp4
-rw-r--r--src/mame/drivers/gridlee.cpp3
-rw-r--r--src/mame/drivers/groundfx.cpp7
-rw-r--r--src/mame/drivers/gstream.cpp10
-rw-r--r--src/mame/drivers/gstriker.cpp7
-rw-r--r--src/mame/drivers/gsword.cpp18
-rw-r--r--src/mame/drivers/gticlub.cpp4
-rw-r--r--src/mame/drivers/gts3a.cpp3
-rw-r--r--src/mame/drivers/guab.cpp2
-rw-r--r--src/mame/drivers/gumbo.cpp5
-rw-r--r--src/mame/drivers/gunbustr.cpp11
-rw-r--r--src/mame/drivers/gunpey.cpp4
-rw-r--r--src/mame/drivers/gunsmoke.cpp8
-rw-r--r--src/mame/drivers/gyruss.cpp8
-rw-r--r--src/mame/drivers/h19.cpp2
-rw-r--r--src/mame/drivers/halleys.cpp76
-rw-r--r--src/mame/drivers/hanaawas.cpp6
-rw-r--r--src/mame/drivers/harddriv.cpp2
-rw-r--r--src/mame/drivers/hazeltin.cpp2
-rw-r--r--src/mame/drivers/hcastle.cpp5
-rw-r--r--src/mame/drivers/headonb.cpp9
-rw-r--r--src/mame/drivers/hexion.cpp4
-rw-r--r--src/mame/drivers/hideseek.cpp21
-rw-r--r--src/mame/drivers/higemaru.cpp8
-rw-r--r--src/mame/drivers/highvdeo.cpp15
-rw-r--r--src/mame/drivers/hikaru.cpp2
-rw-r--r--src/mame/drivers/himesiki.cpp8
-rw-r--r--src/mame/drivers/hitme.cpp5
-rw-r--r--src/mame/drivers/hitpoker.cpp2
-rw-r--r--src/mame/drivers/hnayayoi.cpp2
-rw-r--r--src/mame/drivers/hng64.cpp2
-rw-r--r--src/mame/drivers/holeland.cpp8
-rw-r--r--src/mame/drivers/homedata.cpp24
-rw-r--r--src/mame/drivers/homelab.cpp8
-rw-r--r--src/mame/drivers/homerun.cpp2
-rw-r--r--src/mame/drivers/homez80.cpp4
-rw-r--r--src/mame/drivers/hornet.cpp3
-rw-r--r--src/mame/drivers/hotblock.cpp2
-rw-r--r--src/mame/drivers/hp2640.cpp5
-rw-r--r--src/mame/drivers/hp48.cpp2
-rw-r--r--src/mame/drivers/hp64k.cpp6
-rw-r--r--src/mame/drivers/hp80.cpp2
-rw-r--r--src/mame/drivers/hp95lx.cpp18
-rw-r--r--src/mame/drivers/hp9k.cpp12
-rw-r--r--src/mame/drivers/hp_ipc.cpp4
-rw-r--r--src/mame/drivers/hprot1.cpp17
-rw-r--r--src/mame/drivers/huebler.cpp2
-rw-r--r--src/mame/drivers/hunter2.cpp11
-rw-r--r--src/mame/drivers/hvyunit.cpp7
-rw-r--r--src/mame/drivers/hx20.cpp79
-rw-r--r--src/mame/drivers/hyperspt.cpp6
-rw-r--r--src/mame/drivers/i7000.cpp12
-rw-r--r--src/mame/drivers/ibm3153.cpp17
-rw-r--r--src/mame/drivers/ibm6580.cpp13
-rw-r--r--src/mame/drivers/ibmpcjr.cpp4
-rw-r--r--src/mame/drivers/icatel.cpp15
-rw-r--r--src/mame/drivers/ichiban.cpp2
-rw-r--r--src/mame/drivers/igs009.cpp7
-rw-r--r--src/mame/drivers/igs011.cpp3
-rw-r--r--src/mame/drivers/igs017.cpp65
-rw-r--r--src/mame/drivers/igs_fear.cpp3
-rw-r--r--src/mame/drivers/igspoker.cpp7
-rw-r--r--src/mame/drivers/ikki.cpp8
-rw-r--r--src/mame/drivers/imolagp.cpp37
-rw-r--r--src/mame/drivers/indigo.cpp2
-rw-r--r--src/mame/drivers/indy_indigo2.cpp2
-rw-r--r--src/mame/drivers/inteladv.cpp17
-rw-r--r--src/mame/drivers/intv.cpp56
-rw-r--r--src/mame/drivers/inufuku.cpp7
-rw-r--r--src/mame/drivers/ipds.cpp6
-rw-r--r--src/mame/drivers/iq151.cpp2
-rw-r--r--src/mame/drivers/iqblock.cpp6
-rw-r--r--src/mame/drivers/irisha.cpp2
-rw-r--r--src/mame/drivers/irobot.cpp3
-rw-r--r--src/mame/drivers/ironhors.cpp8
-rw-r--r--src/mame/drivers/istellar.cpp4
-rw-r--r--src/mame/drivers/istrebiteli.cpp89
-rw-r--r--src/mame/drivers/itech32.cpp12
-rw-r--r--src/mame/drivers/itgambl2.cpp58
-rw-r--r--src/mame/drivers/itgambl3.cpp48
-rw-r--r--src/mame/drivers/itgamble.cpp2
-rw-r--r--src/mame/drivers/itt3030.cpp24
-rw-r--r--src/mame/drivers/jack.cpp14
-rw-r--r--src/mame/drivers/jackal.cpp10
-rw-r--r--src/mame/drivers/jackie.cpp2
-rw-r--r--src/mame/drivers/jackpool.cpp20
-rw-r--r--src/mame/drivers/jailbrek.cpp8
-rw-r--r--src/mame/drivers/jalmah.cpp11
-rw-r--r--src/mame/drivers/jangou.cpp61
-rw-r--r--src/mame/drivers/jantotsu.cpp42
-rw-r--r--src/mame/drivers/jchan.cpp11
-rw-r--r--src/mame/drivers/jclub2.cpp17
-rw-r--r--src/mame/drivers/jokrwild.cpp45
-rw-r--r--src/mame/drivers/jollyjgr.cpp85
-rw-r--r--src/mame/drivers/jongkyo.cpp27
-rw-r--r--src/mame/drivers/jonos.cpp4
-rw-r--r--src/mame/drivers/joystand.cpp19
-rw-r--r--src/mame/drivers/jr100.cpp9
-rw-r--r--src/mame/drivers/jr200.cpp11
-rw-r--r--src/mame/drivers/jrpacman.cpp4
-rw-r--r--src/mame/drivers/jtc.cpp28
-rw-r--r--src/mame/drivers/jungleyo.cpp9
-rw-r--r--src/mame/drivers/junofrst.cpp2
-rw-r--r--src/mame/drivers/jupace.cpp2
-rw-r--r--src/mame/drivers/jupiter.cpp2
-rw-r--r--src/mame/drivers/k8915.cpp2
-rw-r--r--src/mame/drivers/kaneko16.cpp39
-rw-r--r--src/mame/drivers/kangaroo.cpp2
-rw-r--r--src/mame/drivers/kaypro.cpp14
-rw-r--r--src/mame/drivers/kc.cpp6
-rw-r--r--src/mame/drivers/kchamp.cpp16
-rw-r--r--src/mame/drivers/kdt6.cpp2
-rw-r--r--src/mame/drivers/kickgoal.cpp14
-rw-r--r--src/mame/drivers/kingdrby.cpp93
-rw-r--r--src/mame/drivers/kingobox.cpp16
-rw-r--r--src/mame/drivers/kinst.cpp2
-rw-r--r--src/mame/drivers/klax.cpp4
-rw-r--r--src/mame/drivers/kncljoe.cpp8
-rw-r--r--src/mame/drivers/koikoi.cpp63
-rw-r--r--src/mame/drivers/konamigx.cpp7
-rw-r--r--src/mame/drivers/konamim2.cpp4
-rw-r--r--src/mame/drivers/konblands.cpp40
-rw-r--r--src/mame/drivers/konendev.cpp2
-rw-r--r--src/mame/drivers/konmedal.cpp26
-rw-r--r--src/mame/drivers/konmedal68k.cpp8
-rw-r--r--src/mame/drivers/kontest.cpp46
-rw-r--r--src/mame/drivers/kopunch.cpp5
-rw-r--r--src/mame/drivers/kramermc.cpp4
-rw-r--r--src/mame/drivers/kron.cpp6
-rw-r--r--src/mame/drivers/ksayakyu.cpp7
-rw-r--r--src/mame/drivers/kyugo.cpp4
-rw-r--r--src/mame/drivers/labyrunr.cpp8
-rw-r--r--src/mame/drivers/ladybug.cpp47
-rw-r--r--src/mame/drivers/ladyfrog.cpp3
-rw-r--r--src/mame/drivers/laser3k.cpp79
-rw-r--r--src/mame/drivers/laserbas.cpp24
-rw-r--r--src/mame/drivers/laserbat.cpp4
-rw-r--r--src/mame/drivers/lasso.cpp24
-rw-r--r--src/mame/drivers/lastduel.cpp14
-rw-r--r--src/mame/drivers/lazercmd.cpp29
-rw-r--r--src/mame/drivers/lbeach.cpp24
-rw-r--r--src/mame/drivers/lcmate2.cpp43
-rw-r--r--src/mame/drivers/ldplayer.cpp13
-rw-r--r--src/mame/drivers/legionna.cpp47
-rw-r--r--src/mame/drivers/lemmings.cpp3
-rw-r--r--src/mame/drivers/lethal.cpp3
-rw-r--r--src/mame/drivers/lethalj.cpp2
-rw-r--r--src/mame/drivers/lgp.cpp85
-rw-r--r--src/mame/drivers/liberate.cpp12
-rw-r--r--src/mame/drivers/limenko.cpp10
-rw-r--r--src/mame/drivers/lisa.cpp3
-rw-r--r--src/mame/drivers/lkage.cpp29
-rw-r--r--src/mame/drivers/llc.cpp4
-rw-r--r--src/mame/drivers/lockon.cpp7
-rw-r--r--src/mame/drivers/lola8a.cpp2
-rw-r--r--src/mame/drivers/looping.cpp58
-rw-r--r--src/mame/drivers/lordgun.cpp4
-rw-r--r--src/mame/drivers/lsasquad.cpp8
-rw-r--r--src/mame/drivers/ltcasino.cpp17
-rw-r--r--src/mame/drivers/lucky74.cpp6
-rw-r--r--src/mame/drivers/lvcards.cpp8
-rw-r--r--src/mame/drivers/lviv.cpp3
-rw-r--r--src/mame/drivers/lwings.cpp10
-rw-r--r--src/mame/drivers/m10.cpp24
-rw-r--r--src/mame/drivers/m107.cpp2
-rw-r--r--src/mame/drivers/m14.cpp19
-rw-r--r--src/mame/drivers/m20.cpp6
-rw-r--r--src/mame/drivers/m3.cpp2
-rw-r--r--src/mame/drivers/m52.cpp14
-rw-r--r--src/mame/drivers/m57.cpp8
-rw-r--r--src/mame/drivers/m58.cpp8
-rw-r--r--src/mame/drivers/m62.cpp29
-rw-r--r--src/mame/drivers/m63.cpp102
-rw-r--r--src/mame/drivers/m72.cpp2
-rw-r--r--src/mame/drivers/m79152pc.cpp2
-rw-r--r--src/mame/drivers/m90.cpp2
-rw-r--r--src/mame/drivers/m92.cpp2
-rw-r--r--src/mame/drivers/mac.cpp21
-rw-r--r--src/mame/drivers/mac128.cpp10
-rw-r--r--src/mame/drivers/macpci.cpp3
-rw-r--r--src/mame/drivers/macrossp.cpp3
-rw-r--r--src/mame/drivers/madmotor.cpp3
-rw-r--r--src/mame/drivers/magic10.cpp14
-rw-r--r--src/mame/drivers/magicfly.cpp56
-rw-r--r--src/mame/drivers/magmax.cpp6
-rw-r--r--src/mame/drivers/magnum.cpp2
-rw-r--r--src/mame/drivers/mainevt.cpp8
-rw-r--r--src/mame/drivers/mainsnk.cpp14
-rw-r--r--src/mame/drivers/majorpkr.cpp12
-rw-r--r--src/mame/drivers/malzak.cpp12
-rw-r--r--src/mame/drivers/mappy.cpp12
-rw-r--r--src/mame/drivers/marineb.cpp7
-rw-r--r--src/mame/drivers/marinedt.cpp78
-rw-r--r--src/mame/drivers/mario.cpp12
-rw-r--r--src/mame/drivers/markham.cpp8
-rw-r--r--src/mame/drivers/mastboy.cpp2
-rw-r--r--src/mame/drivers/mastboyo.cpp11
-rw-r--r--src/mame/drivers/matmania.cpp15
-rw-r--r--src/mame/drivers/maxaflex.cpp2
-rw-r--r--src/mame/drivers/mazerbla.cpp16
-rw-r--r--src/mame/drivers/mbc200.cpp2
-rw-r--r--src/mame/drivers/mbc55x.cpp9
-rw-r--r--src/mame/drivers/mbee.cpp13
-rw-r--r--src/mame/drivers/mc8020.cpp2
-rw-r--r--src/mame/drivers/mc8030.cpp2
-rw-r--r--src/mame/drivers/mcatadv.cpp7
-rw-r--r--src/mame/drivers/mcr.cpp8
-rw-r--r--src/mame/drivers/mcr3.cpp8
-rw-r--r--src/mame/drivers/mcr68.cpp5
-rw-r--r--src/mame/drivers/meadows.cpp6
-rw-r--r--src/mame/drivers/megasys1.cpp31
-rw-r--r--src/mame/drivers/megazone.cpp8
-rw-r--r--src/mame/drivers/meijinsn.cpp23
-rw-r--r--src/mame/drivers/meritum.cpp6
-rw-r--r--src/mame/drivers/mermaid.cpp11
-rw-r--r--src/mame/drivers/mes.cpp2
-rw-r--r--src/mame/drivers/metalmx.cpp16
-rw-r--r--src/mame/drivers/metlclsh.cpp7
-rw-r--r--src/mame/drivers/metlfrzr.cpp12
-rw-r--r--src/mame/drivers/mexico86.cpp4
-rw-r--r--src/mame/drivers/meyc8088.cpp15
-rw-r--r--src/mame/drivers/mgames.cpp30
-rw-r--r--src/mame/drivers/mgolf.cpp11
-rw-r--r--src/mame/drivers/micral.cpp2
-rw-r--r--src/mame/drivers/micro3d.cpp5
-rw-r--r--src/mame/drivers/micronic.cpp14
-rw-r--r--src/mame/drivers/microtan.cpp2
-rw-r--r--src/mame/drivers/microvsn.cpp82
-rw-r--r--src/mame/drivers/midas.cpp26
-rw-r--r--src/mame/drivers/midtunit.cpp2
-rw-r--r--src/mame/drivers/midwunit.cpp2
-rw-r--r--src/mame/drivers/midxunit.cpp2
-rw-r--r--src/mame/drivers/midyunit.cpp12
-rw-r--r--src/mame/drivers/midzeus.cpp2
-rw-r--r--src/mame/drivers/mikie.cpp8
-rw-r--r--src/mame/drivers/mikro80.cpp2
-rw-r--r--src/mame/drivers/mikromik.cpp14
-rw-r--r--src/mame/drivers/mikrosha.cpp13
-rw-r--r--src/mame/drivers/mil4000.cpp13
-rw-r--r--src/mame/drivers/miniboy7.cpp69
-rw-r--r--src/mame/drivers/minitel_2_rpic.cpp2
-rw-r--r--src/mame/drivers/minivideo.cpp7
-rw-r--r--src/mame/drivers/mirage.cpp8
-rw-r--r--src/mame/drivers/mirax.cpp108
-rw-r--r--src/mame/drivers/missb2.cpp35
-rw-r--r--src/mame/drivers/missile.cpp2
-rw-r--r--src/mame/drivers/mitchell.cpp25
-rw-r--r--src/mame/drivers/mjkjidai.cpp2
-rw-r--r--src/mame/drivers/mjsister.cpp11
-rw-r--r--src/mame/drivers/mk85.cpp2
-rw-r--r--src/mame/drivers/mk90.cpp7
-rw-r--r--src/mame/drivers/mlanding.cpp5
-rw-r--r--src/mame/drivers/mmagic.cpp9
-rw-r--r--src/mame/drivers/model1.cpp3
-rw-r--r--src/mame/drivers/model2.cpp2
-rw-r--r--src/mame/drivers/model3.cpp3
-rw-r--r--src/mame/drivers/modellot.cpp2
-rw-r--r--src/mame/drivers/mogura.cpp37
-rw-r--r--src/mame/drivers/mole.cpp6
-rw-r--r--src/mame/drivers/molecular.cpp30
-rw-r--r--src/mame/drivers/momoko.cpp9
-rw-r--r--src/mame/drivers/monzagp.cpp50
-rw-r--r--src/mame/drivers/moo.cpp20
-rw-r--r--src/mame/drivers/mosaic.cpp6
-rw-r--r--src/mame/drivers/mouser.cpp8
-rw-r--r--src/mame/drivers/mpc3000.cpp7
-rw-r--r--src/mame/drivers/mpu12wbk.cpp25
-rw-r--r--src/mame/drivers/mpu4dealem.cpp57
-rw-r--r--src/mame/drivers/mpu4vid.cpp2
-rw-r--r--src/mame/drivers/mquake.cpp7
-rw-r--r--src/mame/drivers/mrdo.cpp16
-rw-r--r--src/mame/drivers/mrflea.cpp6
-rw-r--r--src/mame/drivers/mrgame.cpp42
-rw-r--r--src/mame/drivers/mrjong.cpp16
-rw-r--r--src/mame/drivers/ms0515.cpp12
-rw-r--r--src/mame/drivers/ms6102.cpp2
-rw-r--r--src/mame/drivers/msisaac.cpp3
-rw-r--r--src/mame/drivers/mstation.cpp13
-rw-r--r--src/mame/drivers/mugsmash.cpp6
-rw-r--r--src/mame/drivers/multi8.cpp2
-rw-r--r--src/mame/drivers/multigam.cpp17
-rw-r--r--src/mame/drivers/munchmo.cpp5
-rw-r--r--src/mame/drivers/mupid2.cpp3
-rw-r--r--src/mame/drivers/murogem.cpp35
-rw-r--r--src/mame/drivers/murogmbl.cpp111
-rw-r--r--src/mame/drivers/mustache.cpp4
-rw-r--r--src/mame/drivers/mwarr.cpp5
-rw-r--r--src/mame/drivers/mx2178.cpp2
-rw-r--r--src/mame/drivers/mycom.cpp2
-rw-r--r--src/mame/drivers/mystwarr.cpp7
-rw-r--r--src/mame/drivers/mz2000.cpp11
-rw-r--r--src/mame/drivers/mz2500.cpp63
-rw-r--r--src/mame/drivers/mz3500.cpp29
-rw-r--r--src/mame/drivers/mz700.cpp4
-rw-r--r--src/mame/drivers/mz80.cpp2
-rw-r--r--src/mame/drivers/n64.cpp2
-rw-r--r--src/mame/drivers/n8080.cpp6
-rw-r--r--src/mame/drivers/nakajies.cpp27
-rw-r--r--src/mame/drivers/namcona1.cpp2
-rw-r--r--src/mame/drivers/namconb1.cpp4
-rw-r--r--src/mame/drivers/namcops2.cpp2
-rw-r--r--src/mame/drivers/namcos21.cpp6
-rw-r--r--src/mame/drivers/namcos21_c67.cpp7
-rw-r--r--src/mame/drivers/namcos21_de.cpp10
-rw-r--r--src/mame/drivers/namcos23.cpp6
-rw-r--r--src/mame/drivers/namcos86.cpp3
-rw-r--r--src/mame/drivers/nanos.cpp2
-rw-r--r--src/mame/drivers/naomi.cpp2
-rw-r--r--src/mame/drivers/nascom1.cpp2
-rw-r--r--src/mame/drivers/naughtyb.cpp2
-rw-r--r--src/mame/drivers/nbmj8688.cpp18
-rw-r--r--src/mame/drivers/nbmj9195.cpp2
-rw-r--r--src/mame/drivers/nc.cpp9
-rw-r--r--src/mame/drivers/nemesis.cpp25
-rw-r--r--src/mame/drivers/neogeo.cpp2
-rw-r--r--src/mame/drivers/neoprint.cpp28
-rw-r--r--src/mame/drivers/news.cpp6
-rw-r--r--src/mame/drivers/nibble.cpp29
-rw-r--r--src/mame/drivers/nightgal.cpp42
-rw-r--r--src/mame/drivers/ninjakd2.cpp7
-rw-r--r--src/mame/drivers/nitedrvr.cpp4
-rw-r--r--src/mame/drivers/nmg5.cpp13
-rw-r--r--src/mame/drivers/nmk16.cpp125
-rw-r--r--src/mame/drivers/nokia_3310.cpp2
-rw-r--r--src/mame/drivers/norautp.cpp6
-rw-r--r--src/mame/drivers/notetaker.cpp2
-rw-r--r--src/mame/drivers/nova2001.cpp30
-rw-r--r--src/mame/drivers/novag6502.cpp17
-rw-r--r--src/mame/drivers/novag68k.cpp7
-rw-r--r--src/mame/drivers/nsmpoker.cpp27
-rw-r--r--src/mame/drivers/nwk-tr.cpp2
-rw-r--r--src/mame/drivers/nycaptor.cpp24
-rw-r--r--src/mame/drivers/nyny.cpp9
-rw-r--r--src/mame/drivers/odyssey2.cpp127
-rw-r--r--src/mame/drivers/offtwall.cpp3
-rw-r--r--src/mame/drivers/ohmygod.cpp5
-rw-r--r--src/mame/drivers/ojankohs.cpp23
-rw-r--r--src/mame/drivers/okean240.cpp2
-rw-r--r--src/mame/drivers/olibochu.cpp54
-rw-r--r--src/mame/drivers/olytext.cpp2
-rw-r--r--src/mame/drivers/ondra.cpp2
-rw-r--r--src/mame/drivers/oneshot.cpp7
-rw-r--r--src/mame/drivers/onetwo.cpp9
-rw-r--r--src/mame/drivers/opwolf.cpp10
-rw-r--r--src/mame/drivers/orao.cpp2
-rw-r--r--src/mame/drivers/orbit.cpp2
-rw-r--r--src/mame/drivers/oric.cpp3
-rw-r--r--src/mame/drivers/orion.cpp10
-rw-r--r--src/mame/drivers/osbexec.cpp4
-rw-r--r--src/mame/drivers/osborne1.cpp2
-rw-r--r--src/mame/drivers/othello.cpp17
-rw-r--r--src/mame/drivers/overdriv.cpp4
-rw-r--r--src/mame/drivers/p112.cpp7
-rw-r--r--src/mame/drivers/p2000t.cpp20
-rw-r--r--src/mame/drivers/pacland.cpp4
-rw-r--r--src/mame/drivers/pacman.cpp6
-rw-r--r--src/mame/drivers/palm.cpp27
-rw-r--r--src/mame/drivers/pandoras.cpp9
-rw-r--r--src/mame/drivers/panicr.cpp63
-rw-r--r--src/mame/drivers/paradise.cpp6
-rw-r--r--src/mame/drivers/parodius.cpp4
-rw-r--r--src/mame/drivers/partner.cpp5
-rw-r--r--src/mame/drivers/pasha2.cpp4
-rw-r--r--src/mame/drivers/pasopia7.cpp23
-rw-r--r--src/mame/drivers/pass.cpp5
-rw-r--r--src/mame/drivers/pastelg.cpp6
-rw-r--r--src/mame/drivers/patapata.cpp5
-rw-r--r--src/mame/drivers/pb1000.cpp23
-rw-r--r--src/mame/drivers/pbaction.cpp9
-rw-r--r--src/mame/drivers/pc100.cpp12
-rw-r--r--src/mame/drivers/pc1500.cpp10
-rw-r--r--src/mame/drivers/pc2000.cpp11
-rw-r--r--src/mame/drivers/pc4.cpp10
-rw-r--r--src/mame/drivers/pc6001.cpp12
-rw-r--r--src/mame/drivers/pc8801.cpp13
-rw-r--r--src/mame/drivers/pc9801.cpp17
-rw-r--r--src/mame/drivers/pce220.cpp45
-rw-r--r--src/mame/drivers/pcktgal.cpp11
-rw-r--r--src/mame/drivers/pcm.cpp2
-rw-r--r--src/mame/drivers/pcw.cpp3
-rw-r--r--src/mame/drivers/pcw16.cpp6
-rw-r--r--src/mame/drivers/pda600.cpp2
-rw-r--r--src/mame/drivers/pdp1.cpp80
-rw-r--r--src/mame/drivers/pegasus.cpp2
-rw-r--r--src/mame/drivers/pengo.cpp4
-rw-r--r--src/mame/drivers/peoplepc.cpp2
-rw-r--r--src/mame/drivers/peplus.cpp63
-rw-r--r--src/mame/drivers/pet.cpp3
-rw-r--r--src/mame/drivers/pgm.cpp3
-rw-r--r--src/mame/drivers/pgm2.cpp6
-rw-r--r--src/mame/drivers/phoenix.cpp8
-rw-r--r--src/mame/drivers/photon.cpp124
-rw-r--r--src/mame/drivers/photon2.cpp31
-rw-r--r--src/mame/drivers/phunsy.cpp14
-rw-r--r--src/mame/drivers/piggypas.cpp2
-rw-r--r--src/mame/drivers/pingpong.cpp8
-rw-r--r--src/mame/drivers/pipedrm.cpp18
-rw-r--r--src/mame/drivers/pipeline.cpp33
-rw-r--r--src/mame/drivers/pirates.cpp9
-rw-r--r--src/mame/drivers/piratesh.cpp5
-rw-r--r--src/mame/drivers/pitagjr.cpp11
-rw-r--r--src/mame/drivers/pitnrun.cpp5
-rw-r--r--src/mame/drivers/pk8000.cpp3
-rw-r--r--src/mame/drivers/pk8020.cpp7
-rw-r--r--src/mame/drivers/pkscram.cpp46
-rw-r--r--src/mame/drivers/pktgaldx.cpp12
-rw-r--r--src/mame/drivers/plan80.cpp2
-rw-r--r--src/mame/drivers/playch10.cpp2
-rw-r--r--src/mame/drivers/playmark.cpp49
-rw-r--r--src/mame/drivers/plygonet.cpp3
-rw-r--r--src/mame/drivers/pmd85.cpp5
-rw-r--r--src/mame/drivers/pockchal.cpp13
-rw-r--r--src/mame/drivers/pocketc.cpp4
-rw-r--r--src/mame/drivers/pockstat.cpp6
-rw-r--r--src/mame/drivers/pofo.cpp9
-rw-r--r--src/mame/drivers/poisk1.cpp49
-rw-r--r--src/mame/drivers/pokechmp.cpp5
-rw-r--r--src/mame/drivers/pokemini.cpp98
-rw-r--r--src/mame/drivers/poker72.cpp53
-rw-r--r--src/mame/drivers/polepos.cpp8
-rw-r--r--src/mame/drivers/policetr.cpp2
-rw-r--r--src/mame/drivers/poly88.cpp2
-rw-r--r--src/mame/drivers/polyplay.cpp13
-rw-r--r--src/mame/drivers/poolshrk.cpp17
-rw-r--r--src/mame/drivers/pooyan.cpp9
-rw-r--r--src/mame/drivers/popeye.cpp2
-rw-r--r--src/mame/drivers/popobear.cpp9
-rw-r--r--src/mame/drivers/popper.cpp19
-rw-r--r--src/mame/drivers/portrait.cpp12
-rw-r--r--src/mame/drivers/powerbal.cpp14
-rw-r--r--src/mame/drivers/powerins.cpp7
-rw-r--r--src/mame/drivers/pp01.cpp3
-rw-r--r--src/mame/drivers/ppmast93.cpp9
-rw-r--r--src/mame/drivers/prehisle.cpp4
-rw-r--r--src/mame/drivers/prestige.cpp41
-rw-r--r--src/mame/drivers/primo.cpp2
-rw-r--r--src/mame/drivers/progolf.cpp55
-rw-r--r--src/mame/drivers/proteus3.cpp2
-rw-r--r--src/mame/drivers/ps2sony.cpp2
-rw-r--r--src/mame/drivers/psikyo.cpp8
-rw-r--r--src/mame/drivers/psikyo4.cpp4
-rw-r--r--src/mame/drivers/psikyosh.cpp2
-rw-r--r--src/mame/drivers/psion.cpp10
-rw-r--r--src/mame/drivers/ptcsol.cpp2
-rw-r--r--src/mame/drivers/pturn.cpp4
-rw-r--r--src/mame/drivers/pv1000.cpp21
-rw-r--r--src/mame/drivers/pv9234.cpp3
-rw-r--r--src/mame/drivers/px4.cpp27
-rw-r--r--src/mame/drivers/px8.cpp5
-rw-r--r--src/mame/drivers/pyl601.cpp9
-rw-r--r--src/mame/drivers/pyson.cpp2
-rw-r--r--src/mame/drivers/pzletime.cpp34
-rw-r--r--src/mame/drivers/qdrmfgp.cpp6
-rw-r--r--src/mame/drivers/quasar.cpp4
-rw-r--r--src/mame/drivers/quickpick5.cpp7
-rw-r--r--src/mame/drivers/quizo.cpp59
-rw-r--r--src/mame/drivers/quizpani.cpp5
-rw-r--r--src/mame/drivers/quizpun2.cpp25
-rw-r--r--src/mame/drivers/quizshow.cpp14
-rw-r--r--src/mame/drivers/qvt102.cpp2
-rw-r--r--src/mame/drivers/qx10.cpp9
-rw-r--r--src/mame/drivers/r2dtank.cpp9
-rw-r--r--src/mame/drivers/r2dx_v33.cpp14
-rw-r--r--src/mame/drivers/rabbit.cpp13
-rw-r--r--src/mame/drivers/radio86.cpp5
-rw-r--r--src/mame/drivers/raiden.cpp5
-rw-r--r--src/mame/drivers/raiden2.cpp10
-rw-r--r--src/mame/drivers/rallyx.cpp8
-rw-r--r--src/mame/drivers/rampart.cpp4
-rw-r--r--src/mame/drivers/rastan.cpp5
-rw-r--r--src/mame/drivers/rastersp.cpp8
-rw-r--r--src/mame/drivers/rbisland.cpp15
-rw-r--r--src/mame/drivers/rbmk.cpp9
-rw-r--r--src/mame/drivers/rc702.cpp15
-rw-r--r--src/mame/drivers/rd100.cpp2
-rw-r--r--src/mame/drivers/rd110.cpp16
-rw-r--r--src/mame/drivers/realbrk.cpp5
-rw-r--r--src/mame/drivers/redclash.cpp16
-rw-r--r--src/mame/drivers/relief.cpp3
-rw-r--r--src/mame/drivers/renegade.cpp5
-rw-r--r--src/mame/drivers/replicator.cpp14
-rw-r--r--src/mame/drivers/retofinv.cpp13
-rw-r--r--src/mame/drivers/rex6000.cpp44
-rw-r--r--src/mame/drivers/risc2500.cpp2
-rw-r--r--src/mame/drivers/rm380z.cpp2
-rw-r--r--src/mame/drivers/rmhaihai.cpp6
-rw-r--r--src/mame/drivers/rmnimbus.cpp2
-rw-r--r--src/mame/drivers/rmt32.cpp13
-rw-r--r--src/mame/drivers/rockrage.cpp10
-rw-r--r--src/mame/drivers/rocnrope.cpp11
-rw-r--r--src/mame/drivers/rollerg.cpp4
-rw-r--r--src/mame/drivers/rollrace.cpp7
-rw-r--r--src/mame/drivers/ron.cpp40
-rw-r--r--src/mame/drivers/roul.cpp51
-rw-r--r--src/mame/drivers/route16.cpp4
-rw-r--r--src/mame/drivers/royalmah.cpp75
-rw-r--r--src/mame/drivers/rpunch.cpp14
-rw-r--r--src/mame/drivers/rt1715.cpp15
-rw-r--r--src/mame/drivers/runaway.cpp2
-rw-r--r--src/mame/drivers/rungun.cpp11
-rw-r--r--src/mame/drivers/rz1.cpp12
-rw-r--r--src/mame/drivers/safarir.cpp19
-rw-r--r--src/mame/drivers/samcoupe.cpp18
-rw-r--r--src/mame/drivers/sandscrp.cpp10
-rw-r--r--src/mame/drivers/sanremmg.cpp8
-rw-r--r--src/mame/drivers/sanremo.cpp62
-rw-r--r--src/mame/drivers/sapi1.cpp8
-rw-r--r--src/mame/drivers/saturn.cpp2
-rw-r--r--src/mame/drivers/sauro.cpp4
-rw-r--r--src/mame/drivers/sbasketb.cpp6
-rw-r--r--src/mame/drivers/sbc6510.cpp2
-rw-r--r--src/mame/drivers/sbowling.cpp79
-rw-r--r--src/mame/drivers/sbrkout.cpp15
-rw-r--r--src/mame/drivers/sbugger.cpp3
-rw-r--r--src/mame/drivers/scobra.cpp39
-rw-r--r--src/mame/drivers/scotrsht.cpp8
-rw-r--r--src/mame/drivers/scramble.cpp63
-rw-r--r--src/mame/drivers/scregg.cpp19
-rw-r--r--src/mame/drivers/scv.cpp131
-rw-r--r--src/mame/drivers/scyclone.cpp2
-rw-r--r--src/mame/drivers/sderby.cpp42
-rw-r--r--src/mame/drivers/sderby2.cpp18
-rw-r--r--src/mame/drivers/seabattl.cpp15
-rw-r--r--src/mame/drivers/sealy.cpp15
-rw-r--r--src/mame/drivers/segac2.cpp2
-rw-r--r--src/mame/drivers/segag80r.cpp8
-rw-r--r--src/mame/drivers/segahang.cpp2
-rw-r--r--src/mame/drivers/segajw.cpp2
-rw-r--r--src/mame/drivers/segam1.cpp2
-rw-r--r--src/mame/drivers/segaorun.cpp2
-rw-r--r--src/mame/drivers/segapm.cpp3
-rw-r--r--src/mame/drivers/segas16a.cpp2
-rw-r--r--src/mame/drivers/segas16b.cpp2
-rw-r--r--src/mame/drivers/segas18.cpp2
-rw-r--r--src/mame/drivers/segas24.cpp2
-rw-r--r--src/mame/drivers/segas32.cpp4
-rw-r--r--src/mame/drivers/segaxbd.cpp2
-rw-r--r--src/mame/drivers/segaybd.cpp2
-rw-r--r--src/mame/drivers/seibucats.cpp2
-rw-r--r--src/mame/drivers/seibuspi.cpp6
-rw-r--r--src/mame/drivers/seicross.cpp5
-rw-r--r--src/mame/drivers/seicupbl.cpp7
-rw-r--r--src/mame/drivers/sengokmj.cpp14
-rw-r--r--src/mame/drivers/senjyo.cpp9
-rw-r--r--src/mame/drivers/seta.cpp117
-rw-r--r--src/mame/drivers/seta2.cpp21
-rw-r--r--src/mame/drivers/sf.cpp5
-rw-r--r--src/mame/drivers/shadfrce.cpp7
-rw-r--r--src/mame/drivers/shangha3.cpp12
-rw-r--r--src/mame/drivers/shanghai.cpp60
-rw-r--r--src/mame/drivers/shangkid.cpp10
-rw-r--r--src/mame/drivers/shaolins.cpp8
-rw-r--r--src/mame/drivers/shootout.cpp14
-rw-r--r--src/mame/drivers/shougi.cpp15
-rw-r--r--src/mame/drivers/shuuz.cpp3
-rw-r--r--src/mame/drivers/sidearms.cpp15
-rw-r--r--src/mame/drivers/sidepckt.cpp7
-rw-r--r--src/mame/drivers/sigmab98.cpp33
-rw-r--r--src/mame/drivers/silkroad.cpp8
-rw-r--r--src/mame/drivers/silvmil.cpp20
-rw-r--r--src/mame/drivers/simpl156.cpp10
-rw-r--r--src/mame/drivers/simpsons.cpp5
-rw-r--r--src/mame/drivers/skimaxx.cpp2
-rw-r--r--src/mame/drivers/skullxbo.cpp3
-rw-r--r--src/mame/drivers/skyarmy.cpp90
-rw-r--r--src/mame/drivers/skydiver.cpp32
-rw-r--r--src/mame/drivers/skyfox.cpp23
-rw-r--r--src/mame/drivers/skykid.cpp4
-rw-r--r--src/mame/drivers/skyraid.cpp34
-rw-r--r--src/mame/drivers/slapfght.cpp6
-rw-r--r--src/mame/drivers/slapshot.cpp14
-rw-r--r--src/mame/drivers/sm1800.cpp9
-rw-r--r--src/mame/drivers/sm7238.cpp7
-rw-r--r--src/mame/drivers/smc777.cpp40
-rw-r--r--src/mame/drivers/smsmcorp.cpp2
-rw-r--r--src/mame/drivers/snk.cpp22
-rw-r--r--src/mame/drivers/snk6502.cpp17
-rw-r--r--src/mame/drivers/snookr10.cpp9
-rw-r--r--src/mame/drivers/snowbros.cpp10
-rw-r--r--src/mame/drivers/socrates.cpp162
-rw-r--r--src/mame/drivers/solomon.cpp9
-rw-r--r--src/mame/drivers/sonson.cpp8
-rw-r--r--src/mame/drivers/sorcerer.cpp2
-rw-r--r--src/mame/drivers/spaceg.cpp46
-rw-r--r--src/mame/drivers/spartanxtec.cpp25
-rw-r--r--src/mame/drivers/spbactn.cpp10
-rw-r--r--src/mame/drivers/spc1500.cpp11
-rw-r--r--src/mame/drivers/spcforce.cpp23
-rw-r--r--src/mame/drivers/spdodgeb.cpp7
-rw-r--r--src/mame/drivers/special.cpp20
-rw-r--r--src/mame/drivers/spectrum.cpp7
-rw-r--r--src/mame/drivers/speedatk.cpp8
-rw-r--r--src/mame/drivers/speedbal.cpp8
-rw-r--r--src/mame/drivers/speedspn.cpp7
-rw-r--r--src/mame/drivers/spiders.cpp2
-rw-r--r--src/mame/drivers/spinb.cpp29
-rw-r--r--src/mame/drivers/splash.cpp21
-rw-r--r--src/mame/drivers/splus.cpp2
-rw-r--r--src/mame/drivers/spoker.cpp6
-rw-r--r--src/mame/drivers/spool99.cpp17
-rw-r--r--src/mame/drivers/sprcros2.cpp98
-rw-r--r--src/mame/drivers/sprint2.cpp8
-rw-r--r--src/mame/drivers/sprint4.cpp8
-rw-r--r--src/mame/drivers/sprint8.cpp8
-rw-r--r--src/mame/drivers/spy.cpp3
-rw-r--r--src/mame/drivers/srmp2.cpp19
-rw-r--r--src/mame/drivers/srmp5.cpp7
-rw-r--r--src/mame/drivers/srmp6.cpp10
-rw-r--r--src/mame/drivers/srumbler.cpp5
-rw-r--r--src/mame/drivers/ssem.cpp6
-rw-r--r--src/mame/drivers/sshangha.cpp2
-rw-r--r--src/mame/drivers/sshot.cpp9
-rw-r--r--src/mame/drivers/sslam.cpp6
-rw-r--r--src/mame/drivers/ssozumo.cpp8
-rw-r--r--src/mame/drivers/sspeedr.cpp21
-rw-r--r--src/mame/drivers/ssrj.cpp8
-rw-r--r--src/mame/drivers/sstrangr.cpp9
-rw-r--r--src/mame/drivers/ssv.cpp2
-rw-r--r--src/mame/drivers/ssystem3.cpp3
-rw-r--r--src/mame/drivers/stadhero.cpp3
-rw-r--r--src/mame/drivers/starcrus.cpp3
-rw-r--r--src/mame/drivers/starshp1.cpp8
-rw-r--r--src/mame/drivers/statriv2.cpp17
-rw-r--r--src/mame/drivers/stfight.cpp2
-rw-r--r--src/mame/drivers/stlforce.cpp5
-rw-r--r--src/mame/drivers/stuntair.cpp50
-rw-r--r--src/mame/drivers/stv.cpp2
-rw-r--r--src/mame/drivers/sub.cpp8
-rw-r--r--src/mame/drivers/subhuntr.cpp15
-rw-r--r--src/mame/drivers/subs.cpp19
-rw-r--r--src/mame/drivers/subsino.cpp116
-rw-r--r--src/mame/drivers/summit.cpp28
-rw-r--r--src/mame/drivers/suna8.cpp43
-rw-r--r--src/mame/drivers/supbtime.cpp3
-rw-r--r--src/mame/drivers/supdrapo.cpp67
-rw-r--r--src/mame/drivers/super80.cpp8
-rw-r--r--src/mame/drivers/superchs.cpp7
-rw-r--r--src/mame/drivers/supercrd.cpp79
-rw-r--r--src/mame/drivers/superdq.cpp70
-rw-r--r--src/mame/drivers/superqix.cpp8
-rw-r--r--src/mame/drivers/superwng.cpp57
-rw-r--r--src/mame/drivers/supracan.cpp65
-rw-r--r--src/mame/drivers/suprloco.cpp5
-rw-r--r--src/mame/drivers/suprridr.cpp7
-rw-r--r--src/mame/drivers/suprslam.cpp7
-rw-r--r--src/mame/drivers/surpratk.cpp15
-rw-r--r--src/mame/drivers/svision.cpp83
-rw-r--r--src/mame/drivers/svmu.cpp33
-rw-r--r--src/mame/drivers/swyft.cpp2
-rw-r--r--src/mame/drivers/sys2900.cpp2
-rw-r--r--src/mame/drivers/sys9002.cpp2
-rw-r--r--src/mame/drivers/system1.cpp3
-rw-r--r--src/mame/drivers/system16.cpp27
-rw-r--r--src/mame/drivers/tagteam.cpp8
-rw-r--r--src/mame/drivers/tail2nos.cpp7
-rw-r--r--src/mame/drivers/taito_b.cpp86
-rw-r--r--src/mame/drivers/taito_f2.cpp58
-rw-r--r--src/mame/drivers/taito_f3.cpp8
-rw-r--r--src/mame/drivers/taito_h.cpp21
-rw-r--r--src/mame/drivers/taito_l.cpp7
-rw-r--r--src/mame/drivers/taito_o.cpp7
-rw-r--r--src/mame/drivers/taito_x.cpp28
-rw-r--r--src/mame/drivers/taito_z.cpp55
-rw-r--r--src/mame/drivers/taitoair.cpp4
-rw-r--r--src/mame/drivers/taitojc.cpp2
-rw-r--r--src/mame/drivers/taitopjc.cpp2
-rw-r--r--src/mame/drivers/taitowlf.cpp116
-rw-r--r--src/mame/drivers/tamag1.cpp6
-rw-r--r--src/mame/drivers/tandy2k.cpp2
-rw-r--r--src/mame/drivers/tank8.cpp9
-rw-r--r--src/mame/drivers/tankbatt.cpp4
-rw-r--r--src/mame/drivers/tankbust.cpp93
-rw-r--r--src/mame/drivers/taotaido.cpp5
-rw-r--r--src/mame/drivers/targeth.cpp7
-rw-r--r--src/mame/drivers/tasman.cpp13
-rw-r--r--src/mame/drivers/tatsumi.cpp18
-rw-r--r--src/mame/drivers/tattack.cpp57
-rw-r--r--src/mame/drivers/tavernie.cpp2
-rw-r--r--src/mame/drivers/taxidriv.cpp39
-rw-r--r--src/mame/drivers/tbowl.cpp10
-rw-r--r--src/mame/drivers/tceptor.cpp4
-rw-r--r--src/mame/drivers/tdv2324.cpp2
-rw-r--r--src/mame/drivers/tecmo.cpp8
-rw-r--r--src/mame/drivers/tecmo16.cpp5
-rw-r--r--src/mame/drivers/tecmosys.cpp3
-rw-r--r--src/mame/drivers/tehkanwc.cpp8
-rw-r--r--src/mame/drivers/tek405x.cpp4
-rw-r--r--src/mame/drivers/tek410x.cpp2
-rw-r--r--src/mame/drivers/tek440x.cpp8
-rw-r--r--src/mame/drivers/terak.cpp2
-rw-r--r--src/mame/drivers/terracre.cpp8
-rw-r--r--src/mame/drivers/thayers.cpp2
-rw-r--r--src/mame/drivers/thedealr.cpp13
-rw-r--r--src/mame/drivers/thedeep.cpp2
-rw-r--r--src/mame/drivers/thepit.cpp10
-rw-r--r--src/mame/drivers/thief.cpp2
-rw-r--r--src/mame/drivers/thomson.cpp6
-rw-r--r--src/mame/drivers/thoop2.cpp5
-rw-r--r--src/mame/drivers/thunderj.cpp3
-rw-r--r--src/mame/drivers/thunderx.cpp3
-rw-r--r--src/mame/drivers/ti630.cpp13
-rw-r--r--src/mame/drivers/ti74.cpp21
-rw-r--r--src/mame/drivers/ti85.cpp16
-rw-r--r--src/mame/drivers/ti89.cpp5
-rw-r--r--src/mame/drivers/tiamc1.cpp8
-rw-r--r--src/mame/drivers/tigeroad.cpp4
-rw-r--r--src/mame/drivers/tim011.cpp17
-rw-r--r--src/mame/drivers/tim100.cpp7
-rw-r--r--src/mame/drivers/timelimt.cpp7
-rw-r--r--src/mame/drivers/timeplt.cpp3
-rw-r--r--src/mame/drivers/tk2000.cpp19
-rw-r--r--src/mame/drivers/tk80bs.cpp8
-rw-r--r--src/mame/drivers/tmaster.cpp9
-rw-r--r--src/mame/drivers/tmmjprd.cpp4
-rw-r--r--src/mame/drivers/tmnt.cpp38
-rw-r--r--src/mame/drivers/tmspoker.cpp30
-rw-r--r--src/mame/drivers/tnzs.cpp14
-rw-r--r--src/mame/drivers/toaplan1.cpp63
-rw-r--r--src/mame/drivers/toaplan2.cpp79
-rw-r--r--src/mame/drivers/toki.cpp18
-rw-r--r--src/mame/drivers/topspeed.cpp5
-rw-r--r--src/mame/drivers/toypop.cpp56
-rw-r--r--src/mame/drivers/tp84.cpp16
-rw-r--r--src/mame/drivers/tr175.cpp2
-rw-r--r--src/mame/drivers/trackfld.cpp13
-rw-r--r--src/mame/drivers/travrusa.cpp11
-rw-r--r--src/mame/drivers/triplhnt.cpp14
-rw-r--r--src/mame/drivers/trs80.cpp9
-rw-r--r--src/mame/drivers/trs80dt1.cpp2
-rw-r--r--src/mame/drivers/trs80m2.cpp4
-rw-r--r--src/mame/drivers/trs80m3.cpp4
-rw-r--r--src/mame/drivers/truco.cpp3
-rw-r--r--src/mame/drivers/trucocl.cpp5
-rw-r--r--src/mame/drivers/tryout.cpp7
-rw-r--r--src/mame/drivers/ts803.cpp2
-rw-r--r--src/mame/drivers/tsamurai.cpp10
-rw-r--r--src/mame/drivers/tubep.cpp8
-rw-r--r--src/mame/drivers/tugboat.cpp73
-rw-r--r--src/mame/drivers/tumbleb.cpp47
-rw-r--r--src/mame/drivers/tunhunt.cpp4
-rw-r--r--src/mame/drivers/turbo.cpp15
-rw-r--r--src/mame/drivers/turrett.cpp2
-rw-r--r--src/mame/drivers/tutankhm.cpp6
-rw-r--r--src/mame/drivers/tv990.cpp7
-rw-r--r--src/mame/drivers/tvc.cpp71
-rw-r--r--src/mame/drivers/tvgame.cpp2
-rw-r--r--src/mame/drivers/twin16.cpp8
-rw-r--r--src/mame/drivers/twincobr.cpp7
-rw-r--r--src/mame/drivers/tx0.cpp22
-rw-r--r--src/mame/drivers/tx1.cpp9
-rw-r--r--src/mame/drivers/uknc.cpp2
-rw-r--r--src/mame/drivers/ultraman.cpp6
-rw-r--r--src/mame/drivers/ultratnk.cpp9
-rw-r--r--src/mame/drivers/ultrsprt.cpp10
-rw-r--r--src/mame/drivers/umipoker.cpp15
-rw-r--r--src/mame/drivers/undrfire.cpp14
-rw-r--r--src/mame/drivers/unichamp.cpp39
-rw-r--r--src/mame/drivers/unico.cpp21
-rw-r--r--src/mame/drivers/unior.cpp19
-rw-r--r--src/mame/drivers/unistar.cpp17
-rw-r--r--src/mame/drivers/univac.cpp4
-rw-r--r--src/mame/drivers/unixpc.cpp2
-rw-r--r--src/mame/drivers/unkhorse.cpp6
-rw-r--r--src/mame/drivers/upscope.cpp13
-rw-r--r--src/mame/drivers/usgames.cpp5
-rw-r--r--src/mame/drivers/ut88.cpp4
-rw-r--r--src/mame/drivers/v6809.cpp2
-rw-r--r--src/mame/drivers/vamphalf.cpp24
-rw-r--r--src/mame/drivers/vastar.cpp6
-rw-r--r--src/mame/drivers/vboy.cpp228
-rw-r--r--src/mame/drivers/vc4000.cpp8
-rw-r--r--src/mame/drivers/vector06.cpp2
-rw-r--r--src/mame/drivers/vega.cpp118
-rw-r--r--src/mame/drivers/vegaeo.cpp3
-rw-r--r--src/mame/drivers/vendetta.cpp3
-rw-r--r--src/mame/drivers/vgmplay.cpp2
-rw-r--r--src/mame/drivers/victor9k.cpp7
-rw-r--r--src/mame/drivers/video21.cpp2
-rw-r--r--src/mame/drivers/videopin.cpp17
-rw-r--r--src/mame/drivers/videopkr.cpp122
-rw-r--r--src/mame/drivers/videosaa.cpp7
-rw-r--r--src/mame/drivers/viper.cpp2
-rw-r--r--src/mame/drivers/vixen.cpp2
-rw-r--r--src/mame/drivers/vlc.cpp62
-rw-r--r--src/mame/drivers/volfied.cpp5
-rw-r--r--src/mame/drivers/vpoker.cpp11
-rw-r--r--src/mame/drivers/vt220.cpp9
-rw-r--r--src/mame/drivers/vt240.cpp2
-rw-r--r--src/mame/drivers/vt320.cpp2
-rw-r--r--src/mame/drivers/vt520.cpp11
-rw-r--r--src/mame/drivers/vta2000.cpp12
-rw-r--r--src/mame/drivers/vtech2.cpp85
-rw-r--r--src/mame/drivers/vulgus.cpp8
-rw-r--r--src/mame/drivers/wallc.cpp123
-rw-r--r--src/mame/drivers/wardner.cpp7
-rw-r--r--src/mame/drivers/warpsped.cpp26
-rw-r--r--src/mame/drivers/warpwarp.cpp22
-rw-r--r--src/mame/drivers/wc90.cpp6
-rw-r--r--src/mame/drivers/wc90b.cpp8
-rw-r--r--src/mame/drivers/wecleman.cpp4
-rw-r--r--src/mame/drivers/welltris.cpp5
-rw-r--r--src/mame/drivers/wgp.cpp7
-rw-r--r--src/mame/drivers/wicat.cpp3
-rw-r--r--src/mame/drivers/wildpkr.cpp20
-rw-r--r--src/mame/drivers/williams.cpp7
-rw-r--r--src/mame/drivers/wink.cpp13
-rw-r--r--src/mame/drivers/wiping.cpp8
-rw-r--r--src/mame/drivers/witch.cpp10
-rw-r--r--src/mame/drivers/wiz.cpp7
-rw-r--r--src/mame/drivers/wmg.cpp3
-rw-r--r--src/mame/drivers/wolfpack.cpp8
-rw-r--r--src/mame/drivers/wrally.cpp7
-rw-r--r--src/mame/drivers/wswan.cpp21
-rw-r--r--src/mame/drivers/wwfsstar.cpp7
-rw-r--r--src/mame/drivers/wyvernf0.cpp22
-rw-r--r--src/mame/drivers/x07.cpp7
-rw-r--r--src/mame/drivers/x1.cpp13
-rw-r--r--src/mame/drivers/x1twin.cpp5
-rw-r--r--src/mame/drivers/x68k.cpp4
-rw-r--r--src/mame/drivers/xain.cpp8
-rw-r--r--src/mame/drivers/xavix.cpp2
-rw-r--r--src/mame/drivers/xerox820.cpp4
-rw-r--r--src/mame/drivers/xexex.cpp3
-rw-r--r--src/mame/drivers/xmen.cpp8
-rw-r--r--src/mame/drivers/xorworld.cpp3
-rw-r--r--src/mame/drivers/xxmissio.cpp7
-rw-r--r--src/mame/drivers/xybots.cpp6
-rw-r--r--src/mame/drivers/xyonix.cpp13
-rw-r--r--src/mame/drivers/yiear.cpp5
-rw-r--r--src/mame/drivers/yunsun16.cpp14
-rw-r--r--src/mame/drivers/z1013.cpp2
-rw-r--r--src/mame/drivers/z88.cpp3
-rw-r--r--src/mame/drivers/zac2650.cpp20
-rw-r--r--src/mame/drivers/zaccaria.cpp11
-rw-r--r--src/mame/drivers/zaxxon.cpp9
-rw-r--r--src/mame/drivers/zerozone.cpp2
-rw-r--r--src/mame/drivers/zorba.cpp2
-rw-r--r--src/mame/drivers/zr107.cpp2
-rw-r--r--src/mame/drivers/zrt80.cpp6
-rw-r--r--src/mame/drivers/zwackery.cpp10
-rw-r--r--src/mame/drivers/zx.cpp12
-rw-r--r--src/mame/etc/template_driver.cpp14
-rw-r--r--src/mame/includes/1942.h6
-rw-r--r--src/mame/includes/1943.h2
-rw-r--r--src/mame/includes/20pacgal.h2
-rw-r--r--src/mame/includes/8080bw.h4
-rw-r--r--src/mame/includes/abc80x.h4
-rw-r--r--src/mame/includes/advision.h2
-rw-r--r--src/mame/includes/alesis.h2
-rw-r--r--src/mame/includes/alpha68k.h4
-rw-r--r--src/mame/includes/amiga.h2
-rw-r--r--src/mame/includes/ampoker2.h3
-rw-r--r--src/mame/includes/amstrad.h58
-rw-r--r--src/mame/includes/apexc.h3
-rw-r--r--src/mame/includes/apple3.h2
-rw-r--r--src/mame/includes/appoooh.h4
-rw-r--r--src/mame/includes/aquarius.h2
-rw-r--r--src/mame/includes/arabian.h2
-rw-r--r--src/mame/includes/arcadia.h2
-rw-r--r--src/mame/includes/armedf.h4
-rw-r--r--src/mame/includes/astrocde.h4
-rw-r--r--src/mame/includes/atari400.h2
-rw-r--r--src/mame/includes/atarifb.h2
-rw-r--r--src/mame/includes/atarisy2.h2
-rw-r--r--src/mame/includes/avigo.h76
-rw-r--r--src/mame/includes/b2m.h2
-rw-r--r--src/mame/includes/bagman.h2
-rw-r--r--src/mame/includes/bankp.h2
-rw-r--r--src/mame/includes/baraduke.h2
-rw-r--r--src/mame/includes/bbc.h2
-rw-r--r--src/mame/includes/bionicc.h2
-rw-r--r--src/mame/includes/bking.h2
-rw-r--r--src/mame/includes/bladestl.h2
-rw-r--r--src/mame/includes/blueprnt.h2
-rw-r--r--src/mame/includes/bogeyman.h2
-rw-r--r--src/mame/includes/bosco.h2
-rw-r--r--src/mame/includes/brkthru.h2
-rw-r--r--src/mame/includes/bsktball.h2
-rw-r--r--src/mame/includes/btime.h4
-rw-r--r--src/mame/includes/buggychl.h2
-rw-r--r--src/mame/includes/busicom.h2
-rw-r--r--src/mame/includes/bw2.h2
-rw-r--r--src/mame/includes/calomega.h2
-rw-r--r--src/mame/includes/canyon.h2
-rw-r--r--src/mame/includes/carpolo.h4
-rw-r--r--src/mame/includes/cave.h14
-rw-r--r--src/mame/includes/cclimber.h8
-rw-r--r--src/mame/includes/centiped.h2
-rw-r--r--src/mame/includes/cgc7900.h2
-rw-r--r--src/mame/includes/chaknpop.h2
-rw-r--r--src/mame/includes/champbas.h4
-rw-r--r--src/mame/includes/channelf.h2
-rw-r--r--src/mame/includes/cheekyms.h2
-rw-r--r--src/mame/includes/circusc.h2
-rw-r--r--src/mame/includes/clshroad.h4
-rw-r--r--src/mame/includes/combatsc.h4
-rw-r--r--src/mame/includes/compgolf.h2
-rw-r--r--src/mame/includes/contra.h2
-rw-r--r--src/mame/includes/cop01.h2
-rw-r--r--src/mame/includes/cosmic.h10
-rw-r--r--src/mame/includes/crbaloon.h2
-rw-r--r--src/mame/includes/crgolf.h4
-rw-r--r--src/mame/includes/cvs.h2
-rw-r--r--src/mame/includes/dai.h15
-rw-r--r--src/mame/includes/darkmist.h2
-rw-r--r--src/mame/includes/dcheese.h2
-rw-r--r--src/mame/includes/dday.h2
-rw-r--r--src/mame/includes/ddribble.h2
-rw-r--r--src/mame/includes/dec0.h1
-rw-r--r--src/mame/includes/decocass.h2
-rw-r--r--src/mame/includes/dgn_beta.h2
-rw-r--r--src/mame/includes/digdug.h2
-rw-r--r--src/mame/includes/divebomb.h4
-rw-r--r--src/mame/includes/dkong.h8
-rw-r--r--src/mame/includes/docastle.h2
-rw-r--r--src/mame/includes/dogfgt.h2
-rw-r--r--src/mame/includes/dragrace.h2
-rw-r--r--src/mame/includes/drgnmst.h4
-rw-r--r--src/mame/includes/dribling.h2
-rw-r--r--src/mame/includes/drmicro.h2
-rw-r--r--src/mame/includes/dynax.h4
-rw-r--r--src/mame/includes/efdt.h2
-rw-r--r--src/mame/includes/electron.h5
-rw-r--r--src/mame/includes/epos.h4
-rw-r--r--src/mame/includes/equites.h4
-rw-r--r--src/mame/includes/espial.h2
-rw-r--r--src/mame/includes/exedexes.h2
-rw-r--r--src/mame/includes/exerion.h2
-rw-r--r--src/mame/includes/exterm.h2
-rw-r--r--src/mame/includes/fastfred.h2
-rw-r--r--src/mame/includes/fastlane.h2
-rw-r--r--src/mame/includes/fcombat.h2
-rw-r--r--src/mame/includes/fgoal.h2
-rw-r--r--src/mame/includes/finalizr.h2
-rw-r--r--src/mame/includes/firetrap.h2
-rw-r--r--src/mame/includes/firetrk.h4
-rw-r--r--src/mame/includes/flkatck.h4
-rw-r--r--src/mame/includes/fromance.h4
-rw-r--r--src/mame/includes/funkybee.h2
-rw-r--r--src/mame/includes/funworld.h83
-rw-r--r--src/mame/includes/funybubl.h17
-rw-r--r--src/mame/includes/galaga.h2
-rw-r--r--src/mame/includes/galaxia.h4
-rw-r--r--src/mame/includes/galaxian.h4
-rw-r--r--src/mame/includes/galaxold.h20
-rw-r--r--src/mame/includes/galivan.h2
-rw-r--r--src/mame/includes/galpani2.h2
-rw-r--r--src/mame/includes/galpanic.h2
-rw-r--r--src/mame/includes/galspnbl.h2
-rw-r--r--src/mame/includes/gamecom.h5
-rw-r--r--src/mame/includes/gaplus.h2
-rw-r--r--src/mame/includes/gb.h10
-rw-r--r--src/mame/includes/gberet.h2
-rw-r--r--src/mame/includes/goldstar.h9
-rw-r--r--src/mame/includes/gomoku.h2
-rw-r--r--src/mame/includes/gotya.h2
-rw-r--r--src/mame/includes/grchamp.h2
-rw-r--r--src/mame/includes/gridlee.h2
-rw-r--r--src/mame/includes/gsword.h4
-rw-r--r--src/mame/includes/gunsmoke.h2
-rw-r--r--src/mame/includes/gyruss.h2
-rw-r--r--src/mame/includes/hanaawas.h2
-rw-r--r--src/mame/includes/hcastle.h2
-rw-r--r--src/mame/includes/higemaru.h2
-rw-r--r--src/mame/includes/homedata.h8
-rw-r--r--src/mame/includes/hp48.h2
-rw-r--r--src/mame/includes/hx20.h71
-rw-r--r--src/mame/includes/hyperspt.h2
-rw-r--r--src/mame/includes/ikki.h2
-rw-r--r--src/mame/includes/intv.h2
-rw-r--r--src/mame/includes/irobot.h2
-rw-r--r--src/mame/includes/ironhors.h2
-rw-r--r--src/mame/includes/jack.h2
-rw-r--r--src/mame/includes/jackal.h2
-rw-r--r--src/mame/includes/jailbrek.h2
-rw-r--r--src/mame/includes/kaneko16.h1
-rw-r--r--src/mame/includes/kaypro.h2
-rw-r--r--src/mame/includes/kc.h7
-rw-r--r--src/mame/includes/kchamp.h2
-rw-r--r--src/mame/includes/kickgoal.h4
-rw-r--r--src/mame/includes/kingobox.h6
-rw-r--r--src/mame/includes/kncljoe.h2
-rw-r--r--src/mame/includes/kopunch.h2
-rw-r--r--src/mame/includes/ksayakyu.h2
-rw-r--r--src/mame/includes/kyocera.h4
-rw-r--r--src/mame/includes/labyrunr.h2
-rw-r--r--src/mame/includes/ladybug.h4
-rw-r--r--src/mame/includes/laserbat.h4
-rw-r--r--src/mame/includes/lasso.h4
-rw-r--r--src/mame/includes/lastduel.h2
-rw-r--r--src/mame/includes/lazercmd.h2
-rw-r--r--src/mame/includes/liberate.h2
-rw-r--r--src/mame/includes/lockon.h2
-rw-r--r--src/mame/includes/lucky74.h2
-rw-r--r--src/mame/includes/lvcards.h2
-rw-r--r--src/mame/includes/lviv.h4
-rw-r--r--src/mame/includes/m10.h2
-rw-r--r--src/mame/includes/m52.h25
-rw-r--r--src/mame/includes/m57.h2
-rw-r--r--src/mame/includes/m58.h2
-rw-r--r--src/mame/includes/m62.h10
-rw-r--r--src/mame/includes/mac.h3
-rw-r--r--src/mame/includes/madalien.h2
-rw-r--r--src/mame/includes/magmax.h2
-rw-r--r--src/mame/includes/mainsnk.h2
-rw-r--r--src/mame/includes/malzak.h2
-rw-r--r--src/mame/includes/mappy.h6
-rw-r--r--src/mame/includes/marineb.h2
-rw-r--r--src/mame/includes/mario.h2
-rw-r--r--src/mame/includes/markham.h2
-rw-r--r--src/mame/includes/matmania.h2
-rw-r--r--src/mame/includes/mbc55x.h2
-rw-r--r--src/mame/includes/mbee.h4
-rw-r--r--src/mame/includes/mcr3.h2
-rw-r--r--src/mame/includes/megasys1.h2
-rw-r--r--src/mame/includes/megazone.h2
-rw-r--r--src/mame/includes/mermaid.h5
-rw-r--r--src/mame/includes/micronic.h2
-rw-r--r--src/mame/includes/mikie.h2
-rw-r--r--src/mame/includes/mikromik.h2
-rw-r--r--src/mame/includes/mouser.h2
-rw-r--r--src/mame/includes/mrdo.h2
-rw-r--r--src/mame/includes/mrjong.h2
-rw-r--r--src/mame/includes/munchmo.h2
-rw-r--r--src/mame/includes/mz2500.h2
-rw-r--r--src/mame/includes/n8080.h4
-rw-r--r--src/mame/includes/namcos86.h2
-rw-r--r--src/mame/includes/naughtyb.h2
-rw-r--r--src/mame/includes/nbmj8688.h8
-rw-r--r--src/mame/includes/nc.h2
-rw-r--r--src/mame/includes/norautp.h2
-rw-r--r--src/mame/includes/nova2001.h4
-rw-r--r--src/mame/includes/novagbase.h2
-rw-r--r--src/mame/includes/ojankohs.h2
-rw-r--r--src/mame/includes/orion.h2
-rw-r--r--src/mame/includes/osi.h2
-rw-r--r--src/mame/includes/p2000t.h2
-rw-r--r--src/mame/includes/pacland.h2
-rw-r--r--src/mame/includes/pacman.h2
-rw-r--r--src/mame/includes/pandoras.h2
-rw-r--r--src/mame/includes/pastelg.h2
-rw-r--r--src/mame/includes/pbaction.h7
-rw-r--r--src/mame/includes/pc4.h41
-rw-r--r--src/mame/includes/pc6001.h4
-rw-r--r--src/mame/includes/pc8401a.h2
-rw-r--r--src/mame/includes/pc8801.h2
-rw-r--r--src/mame/includes/pc9801.h2
-rw-r--r--src/mame/includes/pcktgal.h2
-rw-r--r--src/mame/includes/pcw.h2
-rw-r--r--src/mame/includes/pcw16.h8
-rw-r--r--src/mame/includes/pdp1.h2
-rw-r--r--src/mame/includes/phoenix.h6
-rw-r--r--src/mame/includes/pingpong.h2
-rw-r--r--src/mame/includes/pitnrun.h2
-rw-r--r--src/mame/includes/pk8000.h2
-rw-r--r--src/mame/includes/pk8020.h33
-rw-r--r--src/mame/includes/playch10.h2
-rw-r--r--src/mame/includes/pocketc.h6
-rw-r--r--src/mame/includes/polepos.h2
-rw-r--r--src/mame/includes/polyplay.h2
-rw-r--r--src/mame/includes/poolshrk.h2
-rw-r--r--src/mame/includes/pooyan.h2
-rw-r--r--src/mame/includes/popeye.h4
-rw-r--r--src/mame/includes/portrait.h2
-rw-r--r--src/mame/includes/powerins.h5
-rw-r--r--src/mame/includes/pp01.h18
-rw-r--r--src/mame/includes/psion.h2
-rw-r--r--src/mame/includes/px8.h2
-rw-r--r--src/mame/includes/quasar.h5
-rw-r--r--src/mame/includes/radio86.h2
-rw-r--r--src/mame/includes/rallyx.h4
-rw-r--r--src/mame/includes/redclash.h2
-rw-r--r--src/mame/includes/retofinv.h4
-rw-r--r--src/mame/includes/rockrage.h2
-rw-r--r--src/mame/includes/rocnrope.h2
-rw-r--r--src/mame/includes/rollrace.h2
-rw-r--r--src/mame/includes/samcoupe.h2
-rw-r--r--src/mame/includes/sbasketb.h2
-rw-r--r--src/mame/includes/sbugger.h2
-rw-r--r--src/mame/includes/scotrsht.h2
-rw-r--r--src/mame/includes/seicross.h2
-rw-r--r--src/mame/includes/senjyo.h4
-rw-r--r--src/mame/includes/seta.h14
-rw-r--r--src/mame/includes/shangkid.h2
-rw-r--r--src/mame/includes/shaolins.h2
-rw-r--r--src/mame/includes/shootout.h2
-rw-r--r--src/mame/includes/sidepckt.h2
-rw-r--r--src/mame/includes/simpsons.h2
-rw-r--r--src/mame/includes/skydiver.h2
-rw-r--r--src/mame/includes/skyfox.h2
-rw-r--r--src/mame/includes/skykid.h2
-rw-r--r--src/mame/includes/skyraid.h2
-rw-r--r--src/mame/includes/snk.h2
-rw-r--r--src/mame/includes/snk6502.h4
-rw-r--r--src/mame/includes/snookr10.h6
-rw-r--r--src/mame/includes/sonson.h2
-rw-r--r--src/mame/includes/spcforce.h2
-rw-r--r--src/mame/includes/spdodgeb.h2
-rw-r--r--src/mame/includes/special.h18
-rw-r--r--src/mame/includes/spectrum.h2
-rw-r--r--src/mame/includes/speedatk.h2
-rw-r--r--src/mame/includes/sprint2.h2
-rw-r--r--src/mame/includes/sprint4.h2
-rw-r--r--src/mame/includes/sprint8.h2
-rw-r--r--src/mame/includes/srmp2.h4
-rw-r--r--src/mame/includes/ssozumo.h2
-rw-r--r--src/mame/includes/sspeedr.h2
-rw-r--r--src/mame/includes/ssrj.h2
-rw-r--r--src/mame/includes/stactics.h2
-rw-r--r--src/mame/includes/starshp1.h2
-rw-r--r--src/mame/includes/stfight.h21
-rw-r--r--src/mame/includes/sub.h2
-rw-r--r--src/mame/includes/subs.h2
-rw-r--r--src/mame/includes/super80.h2
-rw-r--r--src/mame/includes/superqix.h2
-rw-r--r--src/mame/includes/suprloco.h2
-rw-r--r--src/mame/includes/suprridr.h2
-rw-r--r--src/mame/includes/svision.h43
-rw-r--r--src/mame/includes/tagteam.h2
-rw-r--r--src/mame/includes/tank8.h2
-rw-r--r--src/mame/includes/tankbatt.h2
-rw-r--r--src/mame/includes/tankbust.h2
-rw-r--r--src/mame/includes/taxidriv.h2
-rw-r--r--src/mame/includes/tceptor.h2
-rw-r--r--src/mame/includes/terracre.h2
-rw-r--r--src/mame/includes/thedeep.h2
-rw-r--r--src/mame/includes/thepit.h4
-rw-r--r--src/mame/includes/thomson.h4
-rw-r--r--src/mame/includes/thunderx.h2
-rw-r--r--src/mame/includes/ti85.h4
-rw-r--r--src/mame/includes/ti89.h57
-rw-r--r--src/mame/includes/tiamc1.h2
-rw-r--r--src/mame/includes/timelimt.h2
-rw-r--r--src/mame/includes/timeplt.h2
-rw-r--r--src/mame/includes/tnzs.h2
-rw-r--r--src/mame/includes/tp84.h2
-rw-r--r--src/mame/includes/trackfld.h2
-rw-r--r--src/mame/includes/travrusa.h4
-rw-r--r--src/mame/includes/triplhnt.h2
-rw-r--r--src/mame/includes/trs80.h8
-rw-r--r--src/mame/includes/trs80m3.h8
-rw-r--r--src/mame/includes/truco.h2
-rw-r--r--src/mame/includes/trucocl.h2
-rw-r--r--src/mame/includes/tryout.h2
-rw-r--r--src/mame/includes/tubep.h4
-rw-r--r--src/mame/includes/tunhunt.h2
-rw-r--r--src/mame/includes/turbo.h6
-rw-r--r--src/mame/includes/tx0.h2
-rw-r--r--src/mame/includes/tx1.h4
-rw-r--r--src/mame/includes/ultratnk.h2
-rw-r--r--src/mame/includes/unico.h2
-rw-r--r--src/mame/includes/usgames.h2
-rw-r--r--src/mame/includes/vc4000.h2
-rw-r--r--src/mame/includes/vector06.h1
-rw-r--r--src/mame/includes/vendetta.h2
-rw-r--r--src/mame/includes/vtech2.h10
-rw-r--r--src/mame/includes/vulgus.h2
-rw-r--r--src/mame/includes/warpwarp.h6
-rw-r--r--src/mame/includes/williams.h2
-rw-r--r--src/mame/includes/wiping.h2
-rw-r--r--src/mame/includes/wiz.h2
-rw-r--r--src/mame/includes/wolfpack.h2
-rw-r--r--src/mame/includes/wswan.h4
-rw-r--r--src/mame/includes/x07.h2
-rw-r--r--src/mame/includes/x1.h1
-rw-r--r--src/mame/includes/x68k.h2
-rw-r--r--src/mame/includes/xevious.h2
-rw-r--r--src/mame/includes/xorworld.h2
-rw-r--r--src/mame/includes/xxmissio.h2
-rw-r--r--src/mame/includes/xyonix.h2
-rw-r--r--src/mame/includes/yiear.h2
-rw-r--r--src/mame/includes/z88.h2
-rw-r--r--src/mame/includes/zac2650.h2
-rw-r--r--src/mame/includes/zaccaria.h2
-rw-r--r--src/mame/includes/zaxxon.h2
-rw-r--r--src/mame/includes/zx.h1
-rw-r--r--src/mame/machine/amstrad.cpp229
-rw-r--r--src/mame/machine/imds2ioc.cpp4
-rw-r--r--src/mame/machine/mmboard.cpp5
-rw-r--r--src/mame/machine/mmboard.h4
-rw-r--r--src/mame/machine/model1io2.cpp10
-rw-r--r--src/mame/machine/model1io2.h4
-rw-r--r--src/mame/machine/radio86.cpp6
-rw-r--r--src/mame/machine/st0016.cpp2
-rw-r--r--src/mame/video/1942.cpp68
-rw-r--r--src/mame/video/1943.cpp53
-rw-r--r--src/mame/video/20pacgal.cpp44
-rw-r--r--src/mame/video/733_asr.cpp9
-rw-r--r--src/mame/video/733_asr.h2
-rw-r--r--src/mame/video/8080bw.cpp11
-rw-r--r--src/mame/video/911_vdt.cpp37
-rw-r--r--src/mame/video/911_vdt.h2
-rw-r--r--src/mame/video/abc1600.cpp2
-rw-r--r--src/mame/video/abc80.cpp2
-rw-r--r--src/mame/video/abc800.cpp7
-rw-r--r--src/mame/video/abc802.cpp2
-rw-r--r--src/mame/video/abc806.cpp5
-rw-r--r--src/mame/video/advision.cpp13
-rw-r--r--src/mame/video/agat7.cpp22
-rw-r--r--src/mame/video/agat7.h8
-rw-r--r--src/mame/video/alpha68k.cpp30
-rw-r--r--src/mame/video/amiga.cpp6
-rw-r--r--src/mame/video/ampoker2.cpp57
-rw-r--r--src/mame/video/apexc.cpp6
-rw-r--r--src/mame/video/apollo.cpp2
-rw-r--r--src/mame/video/apple2.cpp15
-rw-r--r--src/mame/video/apple2.h8
-rw-r--r--src/mame/video/apple3.cpp14
-rw-r--r--src/mame/video/appoooh.cpp88
-rw-r--r--src/mame/video/aquarius.cpp14
-rw-r--r--src/mame/video/arabian.cpp66
-rw-r--r--src/mame/video/astrocde.cpp112
-rw-r--r--src/mame/video/atari400.cpp176
-rw-r--r--src/mame/video/atarisy2.cpp16
-rw-r--r--src/mame/video/avigo.cpp7
-rw-r--r--src/mame/video/b2m.cpp18
-rw-r--r--src/mame/video/bagman.cpp53
-rw-r--r--src/mame/video/bankp.cpp51
-rw-r--r--src/mame/video/baraduke.cpp52
-rw-r--r--src/mame/video/bbc.cpp4
-rw-r--r--src/mame/video/bionicc.cpp2
-rw-r--r--src/mame/video/bking.cpp41
-rw-r--r--src/mame/video/bladestl.cpp15
-rw-r--r--src/mame/video/blueprnt.cpp13
-rw-r--r--src/mame/video/bogeyman.cpp42
-rw-r--r--src/mame/video/bosco.cpp74
-rw-r--r--src/mame/video/brkthru.cpp15
-rw-r--r--src/mame/video/btime.cpp42
-rw-r--r--src/mame/video/buggychl.cpp6
-rw-r--r--src/mame/video/busicom.cpp15
-rw-r--r--src/mame/video/calomega.cpp34
-rw-r--r--src/mame/video/carpolo.cpp19
-rw-r--r--src/mame/video/cave.cpp114
-rw-r--r--src/mame/video/cclimber.cpp236
-rw-r--r--src/mame/video/centiped.cpp16
-rw-r--r--src/mame/video/cgc7900.cpp7
-rw-r--r--src/mame/video/chaknpop.cpp35
-rw-r--r--src/mame/video/champbas.cpp28
-rw-r--r--src/mame/video/channelf.cpp22
-rw-r--r--src/mame/video/cheekyms.cpp38
-rw-r--r--src/mame/video/circusc.cpp73
-rw-r--r--src/mame/video/clshroad.cpp38
-rw-r--r--src/mame/video/combatsc.cpp48
-rw-r--r--src/mame/video/compgolf.cpp17
-rw-r--r--src/mame/video/contra.cpp16
-rw-r--r--src/mame/video/cop01.cpp40
-rw-r--r--src/mame/video/cosmic.cpp130
-rw-r--r--src/mame/video/crbaloon.cpp24
-rw-r--r--src/mame/video/crgolf.cpp41
-rw-r--r--src/mame/video/cvs.cpp25
-rw-r--r--src/mame/video/dai.cpp48
-rw-r--r--src/mame/video/darkmist.cpp44
-rw-r--r--src/mame/video/dcheese.cpp4
-rw-r--r--src/mame/video/dday.cpp20
-rw-r--r--src/mame/video/ddribble.cpp15
-rw-r--r--src/mame/video/digdug.cpp53
-rw-r--r--src/mame/video/divebomb.cpp41
-rw-r--r--src/mame/video/dkong.cpp227
-rw-r--r--src/mame/video/docastle.cpp46
-rw-r--r--src/mame/video/dogfgt.cpp43
-rw-r--r--src/mame/video/drgnmst.cpp3
-rw-r--r--src/mame/video/dribling.cpp9
-rw-r--r--src/mame/video/drmicro.cpp42
-rw-r--r--src/mame/video/dynax.cpp70
-rw-r--r--src/mame/video/epos.cpp47
-rw-r--r--src/mame/video/equites.cpp20
-rw-r--r--src/mame/video/espial.cpp41
-rw-r--r--src/mame/video/exedexes.cpp39
-rw-r--r--src/mame/video/exerion.cpp59
-rw-r--r--src/mame/video/exterm.cpp4
-rw-r--r--src/mame/video/fastfred.cpp62
-rw-r--r--src/mame/video/fastlane.cpp14
-rw-r--r--src/mame/video/fcombat.cpp51
-rw-r--r--src/mame/video/finalizr.cpp66
-rw-r--r--src/mame/video/firetrap.cpp19
-rw-r--r--src/mame/video/firetrk.cpp17
-rw-r--r--src/mame/video/funkybee.cpp41
-rw-r--r--src/mame/video/funworld.cpp70
-rw-r--r--src/mame/video/funybubl.cpp2
-rw-r--r--src/mame/video/fuukifg.h9
-rw-r--r--src/mame/video/fuukifg2.cpp12
-rw-r--r--src/mame/video/galaga.cpp73
-rw-r--r--src/mame/video/galaxia.cpp8
-rw-r--r--src/mame/video/galaxian.cpp119
-rw-r--r--src/mame/video/galaxold.cpp343
-rw-r--r--src/mame/video/galivan.cpp55
-rw-r--r--src/mame/video/galpani2.cpp23
-rw-r--r--src/mame/video/galpanic.cpp10
-rw-r--r--src/mame/video/galspnbl.cpp18
-rw-r--r--src/mame/video/gamate.cpp5
-rw-r--r--src/mame/video/gamate.h4
-rw-r--r--src/mame/video/gaplus.cpp31
-rw-r--r--src/mame/video/gberet.cpp54
-rw-r--r--src/mame/video/gic.h4
-rw-r--r--src/mame/video/gomoku.cpp36
-rw-r--r--src/mame/video/gotya.cpp52
-rw-r--r--src/mame/video/grchamp.cpp57
-rw-r--r--src/mame/video/gridlee.cpp16
-rw-r--r--src/mame/video/gsword.cpp62
-rw-r--r--src/mame/video/gunsmoke.cpp33
-rw-r--r--src/mame/video/gyruss.cpp60
-rw-r--r--src/mame/video/hanaawas.cpp43
-rw-r--r--src/mame/video/hcastle.cpp17
-rw-r--r--src/mame/video/higemaru.cpp53
-rw-r--r--src/mame/video/homedata.cpp68
-rw-r--r--src/mame/video/hp48.cpp21
-rw-r--r--src/mame/video/hyperspt.cpp58
-rw-r--r--src/mame/video/ikki.cpp120
-rw-r--r--src/mame/video/irobot.cpp19
-rw-r--r--src/mame/video/ironhors.cpp69
-rw-r--r--src/mame/video/jack.cpp17
-rw-r--r--src/mame/video/jackal.cpp17
-rw-r--r--src/mame/video/jailbrek.cpp23
-rw-r--r--src/mame/video/k1ge.cpp38
-rw-r--r--src/mame/video/k1ge.h4
-rw-r--r--src/mame/video/kaneko16.cpp11
-rw-r--r--src/mame/video/kaypro.cpp6
-rw-r--r--src/mame/video/kc.cpp57
-rw-r--r--src/mame/video/kchamp.cpp14
-rw-r--r--src/mame/video/kingobox.cpp8
-rw-r--r--src/mame/video/kncljoe.cpp68
-rw-r--r--src/mame/video/kopunch.cpp34
-rw-r--r--src/mame/video/ksayakyu.cpp13
-rw-r--r--src/mame/video/kyocera.cpp10
-rw-r--r--src/mame/video/labyrunr.cpp24
-rw-r--r--src/mame/video/ladybug.cpp90
-rw-r--r--src/mame/video/laserbat.cpp8
-rw-r--r--src/mame/video/lasso.cpp69
-rw-r--r--src/mame/video/lastduel.cpp2
-rw-r--r--src/mame/video/leland.cpp8
-rw-r--r--src/mame/video/liberate.cpp24
-rw-r--r--src/mame/video/lockon.cpp11
-rw-r--r--src/mame/video/lucky74.cpp112
-rw-r--r--src/mame/video/lvcards.cpp29
-rw-r--r--src/mame/video/lviv.cpp25
-rw-r--r--src/mame/video/m52.cpp6
-rw-r--r--src/mame/video/m57.cpp88
-rw-r--r--src/mame/video/m58.cpp85
-rw-r--r--src/mame/video/m62.cpp12
-rw-r--r--src/mame/video/mac.cpp8
-rw-r--r--src/mame/video/madalien.cpp21
-rw-r--r--src/mame/video/magmax.cpp28
-rw-r--r--src/mame/video/mainsnk.cpp54
-rw-r--r--src/mame/video/mappy.cpp182
-rw-r--r--src/mame/video/marineb.cpp41
-rw-r--r--src/mame/video/mario.cpp14
-rw-r--r--src/mame/video/markham.cpp21
-rw-r--r--src/mame/video/matmania.cpp16
-rw-r--r--src/mame/video/mbee.cpp54
-rw-r--r--src/mame/video/mcr3.cpp16
-rw-r--r--src/mame/video/megasys1.cpp2
-rw-r--r--src/mame/video/megazone.cpp42
-rw-r--r--src/mame/video/mermaid.cpp49
-rw-r--r--src/mame/video/mikie.cpp70
-rw-r--r--src/mame/video/mikromik.cpp13
-rw-r--r--src/mame/video/mouser.cpp151
-rw-r--r--src/mame/video/mrdo.cpp77
-rw-r--r--src/mame/video/mrjong.cpp30
-rw-r--r--src/mame/video/munchmo.cpp23
-rw-r--r--src/mame/video/n8080.cpp26
-rw-r--r--src/mame/video/namcos86.cpp59
-rw-r--r--src/mame/video/naughtyb.cpp37
-rw-r--r--src/mame/video/nbmj8688.cpp71
-rw-r--r--src/mame/video/nc.cpp4
-rw-r--r--src/mame/video/newbrain.cpp2
-rw-r--r--src/mame/video/nova2001.cpp61
-rw-r--r--src/mame/video/ojankohs.cpp53
-rw-r--r--src/mame/video/orca40c.cpp4
-rw-r--r--src/mame/video/orion.cpp42
-rw-r--r--src/mame/video/osi.cpp51
-rw-r--r--src/mame/video/pacland.cpp10
-rw-r--r--src/mame/video/pacman.cpp56
-rw-r--r--src/mame/video/pandoras.cpp58
-rw-r--r--src/mame/video/pastelg.cpp42
-rw-r--r--src/mame/video/pc6001.cpp78
-rw-r--r--src/mame/video/pc8401a.cpp8
-rw-r--r--src/mame/video/pc_t1t.cpp43
-rw-r--r--src/mame/video/pc_t1t.h19
-rw-r--r--src/mame/video/pcd.cpp7
-rw-r--r--src/mame/video/pcd.h4
-rw-r--r--src/mame/video/pcktgal.cpp40
-rw-r--r--src/mame/video/pcw.cpp10
-rw-r--r--src/mame/video/pcw16.cpp76
-rw-r--r--src/mame/video/phoenix.cpp53
-rw-r--r--src/mame/video/pingpong.cpp50
-rw-r--r--src/mame/video/pitnrun.cpp103
-rw-r--r--src/mame/video/pk8000.cpp40
-rw-r--r--src/mame/video/pk8020.cpp8
-rw-r--r--src/mame/video/playch10.cpp44
-rw-r--r--src/mame/video/pocketc.cpp18
-rw-r--r--src/mame/video/polepos.cpp60
-rw-r--r--src/mame/video/polyplay.cpp35
-rw-r--r--src/mame/video/pooyan.cpp58
-rw-r--r--src/mame/video/popeye.cpp12
-rw-r--r--src/mame/video/portrait.cpp42
-rw-r--r--src/mame/video/pp01.cpp43
-rw-r--r--src/mame/video/prehisle.cpp1
-rw-r--r--src/mame/video/quasar.cpp127
-rw-r--r--src/mame/video/rallyx.cpp165
-rw-r--r--src/mame/video/redclash.cpp89
-rw-r--r--src/mame/video/retofinv.cpp66
-rw-r--r--src/mame/video/rockrage.cpp8
-rw-r--r--src/mame/video/rocnrope.cpp52
-rw-r--r--src/mame/video/rollrace.cpp47
-rw-r--r--src/mame/video/sbasketb.cpp74
-rw-r--r--src/mame/video/sbugger.cpp21
-rw-r--r--src/mame/video/scotrsht.cpp29
-rw-r--r--src/mame/video/seicross.cpp44
-rw-r--r--src/mame/video/senjyo.cpp16
-rw-r--r--src/mame/video/seta.cpp78
-rw-r--r--src/mame/video/shangkid.cpp30
-rw-r--r--src/mame/video/shaolins.cpp69
-rw-r--r--src/mame/video/shootout.cpp42
-rw-r--r--src/mame/video/sidepckt.cpp50
-rw-r--r--src/mame/video/skyfox.cpp12
-rw-r--r--src/mame/video/skykid.cpp25
-rw-r--r--src/mame/video/snk.cpp51
-rw-r--r--src/mame/video/snk6502.cpp98
-rw-r--r--src/mame/video/snookr10.cpp146
-rw-r--r--src/mame/video/sonson.cpp34
-rw-r--r--src/mame/video/spdodgeb.cpp47
-rw-r--r--src/mame/video/special.cpp114
-rw-r--r--src/mame/video/spectrum.cpp40
-rw-r--r--src/mame/video/speedatk.cpp44
-rw-r--r--src/mame/video/sprint2.cpp14
-rw-r--r--src/mame/video/sprint4.cpp14
-rw-r--r--src/mame/video/sprint8.cpp2
-rw-r--r--src/mame/video/srmp2.cpp28
-rw-r--r--src/mame/video/ssozumo.cpp44
-rw-r--r--src/mame/video/ssrj.cpp11
-rw-r--r--src/mame/video/stactics.cpp31
-rw-r--r--src/mame/video/starshp1.cpp24
-rw-r--r--src/mame/video/sub.cpp24
-rw-r--r--src/mame/video/super80.cpp66
-rw-r--r--src/mame/video/superqix.cpp10
-rw-r--r--src/mame/video/suprloco.cpp49
-rw-r--r--src/mame/video/suprridr.cpp47
-rw-r--r--src/mame/video/tagteam.cpp6
-rw-r--r--src/mame/video/taito_l.cpp4
-rw-r--r--src/mame/video/tank8.cpp6
-rw-r--r--src/mame/video/tankbatt.cpp41
-rw-r--r--src/mame/video/tceptor.cpp66
-rw-r--r--src/mame/video/terracre.cpp60
-rw-r--r--src/mame/video/thedeep.cpp9
-rw-r--r--src/mame/video/thepit.cpp56
-rw-r--r--src/mame/video/thomson.cpp34
-rw-r--r--src/mame/video/ti85.cpp29
-rw-r--r--src/mame/video/tia.cpp445
-rw-r--r--src/mame/video/tia.h4
-rw-r--r--src/mame/video/tiamc1.cpp50
-rw-r--r--src/mame/video/timelimt.cpp54
-rw-r--r--src/mame/video/timeplt.cpp57
-rw-r--r--src/mame/video/tnzs.cpp6
-rw-r--r--src/mame/video/tp84.cpp68
-rw-r--r--src/mame/video/trackfld.cpp58
-rw-r--r--src/mame/video/travrusa.cpp174
-rw-r--r--src/mame/video/trs80.cpp22
-rw-r--r--src/mame/video/truco.cpp34
-rw-r--r--src/mame/video/trucocl.cpp9
-rw-r--r--src/mame/video/tryout.cpp42
-rw-r--r--src/mame/video/tubep.cpp263
-rw-r--r--src/mame/video/tunhunt.cpp18
-rw-r--r--src/mame/video/turbo.cpp111
-rw-r--r--src/mame/video/tx1.cpp30
-rw-r--r--src/mame/video/ultratnk.cpp2
-rw-r--r--src/mame/video/unico.cpp10
-rw-r--r--src/mame/video/usgames.cpp30
-rw-r--r--src/mame/video/v1050.cpp2
-rw-r--r--src/mame/video/vector06.cpp6
-rw-r--r--src/mame/video/vtvideo.cpp7
-rw-r--r--src/mame/video/vulgus.cpp30
-rw-r--r--src/mame/video/warpwarp.cpp100
-rw-r--r--src/mame/video/williams.cpp25
-rw-r--r--src/mame/video/wiping.cpp58
-rw-r--r--src/mame/video/wiz.cpp58
-rw-r--r--src/mame/video/wolfpack.cpp19
-rw-r--r--src/mame/video/x68k.cpp12
-rw-r--r--src/mame/video/xevious.cpp84
-rw-r--r--src/mame/video/xorworld.cpp51
-rw-r--r--src/mame/video/xxmissio.cpp39
-rw-r--r--src/mame/video/xyonix.cpp40
-rw-r--r--src/mame/video/yiear.cpp37
-rw-r--r--src/mame/video/z88.cpp2
-rw-r--r--src/mame/video/zaccaria.cpp71
-rw-r--r--src/mame/video/zaxxon.cpp46
1949 files changed, 16698 insertions, 19409 deletions
diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp
index 551c8ae0a79..519496b1b1b 100644
--- a/src/devices/bus/a2bus/a2videoterm.cpp
+++ b/src/devices/bus/a2bus/a2videoterm.cpp
@@ -171,7 +171,7 @@ const tiny_rom_entry *a2bus_aevm80_device::device_rom_region() const
a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_chrrom(nullptr), m_framecnt(0),
- m_crtc(*this, VIDEOTERM_MC6845_NAME), m_palette(*this, ":palette"),
+ m_crtc(*this, VIDEOTERM_MC6845_NAME), m_palette(*this, ":a2video"),
m_rambank(0)
{
}
diff --git a/src/devices/bus/a2bus/a2videoterm.h b/src/devices/bus/a2bus/a2videoterm.h
index 65a1e02077f..13d87dad602 100644
--- a/src/devices/bus/a2bus/a2videoterm.h
+++ b/src/devices/bus/a2bus/a2videoterm.h
@@ -15,7 +15,6 @@
#include "a2bus.h"
#include "video/mc6845.h"
-#include "emupal.h"
//**************************************************************************
// TYPE DEFINITIONS
@@ -46,7 +45,7 @@ protected:
int m_framecnt;
required_device<mc6845_device> m_crtc;
- required_device<palette_device> m_palette;
+ required_device<device_palette_interface> m_palette;
private:
DECLARE_WRITE_LINE_MEMBER(vsync_changed);
diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp
index 25184492bf7..65e22414e94 100644
--- a/src/devices/bus/acorn/system/vdu80.cpp
+++ b/src/devices/bus/acorn/system/vdu80.cpp
@@ -94,7 +94,7 @@ MACHINE_CONFIG_START(acorn_vdu80_device::device_add_mconfig)
MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acorn_vdu80)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, 2_MHz_XTAL);
m_crtc->set_screen("screen");
diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp
index bdebc02a288..fbeacd759b3 100644
--- a/src/devices/bus/c64/xl80.cpp
+++ b/src/devices/bus/c64/xl80.cpp
@@ -131,7 +131,7 @@ MACHINE_CONFIG_START(c64_xl80_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_c64_xl80)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, XTAL(14'318'181) / 8);
m_crtc->set_screen(MC6845_SCREEN_TAG);
diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp
index 367602db211..4956b0a708b 100644
--- a/src/devices/bus/cbm2/hrg.cpp
+++ b/src/devices/bus/cbm2/hrg.cpp
@@ -94,7 +94,7 @@ MACHINE_CONFIG_START(cbm2_hrg_a_device::device_add_mconfig)
MCFG_SCREEN_SIZE(512, 512)
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1)
MCFG_SCREEN_REFRESH_RATE(25)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
@@ -110,7 +110,7 @@ MACHINE_CONFIG_START(cbm2_hrg_b_device::device_add_mconfig)
MCFG_SCREEN_SIZE(512, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
diff --git a/src/devices/bus/compis/hrg.cpp b/src/devices/bus/compis/hrg.cpp
index 8f01bf01e35..fc1665107fa 100644
--- a/src/devices/bus/compis/hrg.cpp
+++ b/src/devices/bus/compis/hrg.cpp
@@ -91,7 +91,7 @@ MACHINE_CONFIG_START(compis_hrg_device::device_add_mconfig)
m_crtc->set_display_pixels_callback(FUNC(compis_hrg_device::display_pixels), this);
m_crtc->set_screen(SCREEN_TAG);
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
MACHINE_CONFIG_END
@@ -109,7 +109,7 @@ MACHINE_CONFIG_START(compis_uhrg_device::device_add_mconfig)
m_crtc->set_display_pixels_callback(FUNC(compis_uhrg_device::display_pixels), this);
m_crtc->set_screen(SCREEN_TAG);
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
MACHINE_CONFIG_END
diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp
index 80b8f91e1cb..333566eda1a 100644
--- a/src/devices/bus/comx35/clm.cpp
+++ b/src/devices/bus/comx35/clm.cpp
@@ -146,7 +146,7 @@ MACHINE_CONFIG_START(comx_clm_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_comx_clm)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
MC6845(config, m_crtc, XTAL(14'318'181)/7);
m_crtc->set_screen(MC6845_SCREEN_TAG);
diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp
index 9449ece9339..6312a32547f 100644
--- a/src/devices/bus/ecbbus/grip.cpp
+++ b/src/devices/bus/ecbbus/grip.cpp
@@ -422,7 +422,7 @@ void ecb_grip21_device::device_add_mconfig(machine_config &config)
screen.set_size(640, 480);
screen.set_visarea(0, 640-1, 0, 480-1);
- PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
// sound hardware
SPEAKER(config, "mono").front_center();
diff --git a/src/devices/bus/einstein/pipe/tk02.cpp b/src/devices/bus/einstein/pipe/tk02.cpp
index 50560c250d6..4e601397a2d 100644
--- a/src/devices/bus/einstein/pipe/tk02.cpp
+++ b/src/devices/bus/einstein/pipe/tk02.cpp
@@ -101,7 +101,7 @@ MACHINE_CONFIG_START(tk02_device::device_add_mconfig)
MCFG_SCREEN_RAW_PARAMS(XTAL(8'000'000) * 2, 1024, 0, 640, 312, 0, 250)
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tk02)
diff --git a/src/devices/bus/nasbus/avc.cpp b/src/devices/bus/nasbus/avc.cpp
index a8eb9bd2915..a0a71da3666 100644
--- a/src/devices/bus/nasbus/avc.cpp
+++ b/src/devices/bus/nasbus/avc.cpp
@@ -27,7 +27,7 @@ MACHINE_CONFIG_START(nascom_avc_device::device_add_mconfig)
MCFG_SCREEN_RAW_PARAMS(16250000, 1024, 0, 768, 320, 0, 256)
MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
- MCFG_PALETTE_ADD_3BIT_RGB("palette")
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
MC6845(config, m_crtc, XTAL(16'000'000) / 8);
m_crtc->set_screen("screen");
diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp
index 78e6e557e1c..5288b632174 100644
--- a/src/devices/bus/pet/hsg.cpp
+++ b/src/devices/bus/pet/hsg.cpp
@@ -97,7 +97,7 @@ MACHINE_CONFIG_START(cbm8000_hsg_a_device::device_add_mconfig)
MCFG_SCREEN_SIZE(512, 512)
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1)
MCFG_SCREEN_REFRESH_RATE(25)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
@@ -113,7 +113,7 @@ MACHINE_CONFIG_START(cbm8000_hsg_b_device::device_add_mconfig)
MCFG_SCREEN_SIZE(512, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp
index 80b775108d0..5408aa8738c 100644
--- a/src/devices/bus/svi3x8/slot/sv806.cpp
+++ b/src/devices/bus/svi3x8/slot/sv806.cpp
@@ -46,7 +46,7 @@ void sv806_device::device_add_mconfig(machine_config &config)
screen.set_raw((XTAL(12'000'000) / 6) * 8, 864, 0, 640, 317, 0, 192);
screen.set_screen_update("crtc", FUNC(hd6845_device::screen_update));
- PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
HD6845(config, m_crtc, XTAL(12'000'000) / 6);
m_crtc->set_screen("80col");
diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp
index f8caf7f5823..841d4265a1b 100644
--- a/src/devices/bus/vic20/videopak.cpp
+++ b/src/devices/bus/vic20/videopak.cpp
@@ -105,7 +105,7 @@ MACHINE_CONFIG_START(vic20_video_pak_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vic20_video_pak)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, XTAL(14'318'181) / 8);
m_crtc->set_screen(MC6845_SCREEN_TAG);
diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp
index db7ade4c745..e9170b420cc 100644
--- a/src/devices/bus/wangpc/tig.cpp
+++ b/src/devices/bus/wangpc/tig.cpp
@@ -122,7 +122,7 @@ MACHINE_CONFIG_START(wangpc_tig_device::device_add_mconfig)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);
UPD7220(config, m_hgdc0, XTAL(52'832'000)/28);
m_hgdc0->set_addrmap(0, &wangpc_tig_device::upd7220_0_map);
diff --git a/src/devices/cpu/dspp/dspp.cpp b/src/devices/cpu/dspp/dspp.cpp
index e8488d73708..f93f841717f 100644
--- a/src/devices/cpu/dspp/dspp.cpp
+++ b/src/devices/cpu/dspp/dspp.cpp
@@ -10,11 +10,12 @@
***************************************************************************/
#include "emu.h"
-#include "debugger.h"
#include "dspp.h"
#include "dsppfe.h"
#include "dsppdasm.h"
+#include "debugger.h"
+
//**************************************************************************
// CONSTANTS
@@ -1473,7 +1474,7 @@ void dspp_device::process_next_dma(int32_t channel)
int16_t dspp_device::decode_sqxd(int8_t data, int16_t prev)
{
int16_t temp = sign_extend8(data & 0xfe);
- int32_t expanded = (temp * abs(temp)) << 1;
+ int32_t expanded = (temp * iabs(temp)) << 1;
int16_t output;
if (data & 1)
diff --git a/src/devices/machine/ie15.cpp b/src/devices/machine/ie15.cpp
index 9a9c38233b7..4f1a8a25bfc 100644
--- a/src/devices/machine/ie15.cpp
+++ b/src/devices/machine/ie15.cpp
@@ -613,7 +613,7 @@ MACHINE_CONFIG_START(ie15_device::device_add_mconfig)
ie15core(config);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ie15)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MACHINE_CONFIG_END
ioport_constructor ie15_device::device_input_ports() const
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index f3ce05b4865..2539d608e5f 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -212,7 +212,7 @@ public:
m_orig_config.m_overscalex = m_overscalex = scalex;
m_orig_config.m_overscaley = m_overscaley = scaley;
}
- void set_overlay_palette(const char *tag) { m_overlay_palette.set_tag(tag); }
+ template <typename T> void set_overlay_palette(T &&tag) { m_overlay_palette.set_tag(std::forward<T>(tag)); }
protected:
// timer IDs
diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp
index 580b715dff2..1347081549a 100644
--- a/src/devices/sound/cdp1869.cpp
+++ b/src/devices/sound/cdp1869.cpp
@@ -228,7 +228,7 @@ inline void cdp1869_device::update_prd_changed_timer()
inline rgb_t cdp1869_device::get_rgb(int i, int c, int l)
{
- int luma = 0, r, g, b;
+ int luma = 0;
luma += (l & 4) ? CDP1869_WEIGHT_RED : 0;
luma += (l & 1) ? CDP1869_WEIGHT_GREEN : 0;
@@ -236,9 +236,9 @@ inline rgb_t cdp1869_device::get_rgb(int i, int c, int l)
luma = (luma * 0xff) / 100;
- r = (c & 4) ? luma : 0;
- g = (c & 1) ? luma : 0;
- b = (c & 2) ? luma : 0;
+ int const r = (c & 4) ? luma : 0;
+ int const g = (c & 1) ? luma : 0;
+ int const b = (c & 2) ? luma : 0;
return rgb_t(r, g, b);
}
@@ -368,10 +368,10 @@ cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, d
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(cdp1869_device::device_add_mconfig)
- MCFG_PALETTE_ADD("palette", 8+64)
- MCFG_PALETTE_INIT_OWNER(cdp1869_device, cdp1869)
-MACHINE_CONFIG_END
+void cdp1869_device::device_add_mconfig(machine_config &config)
+{
+ PALETTE(config, m_palette, FUNC(cdp1869_device::cdp1869_palette), 8 + 64);
+}
//-------------------------------------------------
@@ -481,15 +481,13 @@ device_memory_interface::space_config_vector cdp1869_device::memory_space_config
// initialize_palette - initialize palette
//-------------------------------------------------
-PALETTE_INIT_MEMBER(cdp1869_device, cdp1869)
+void cdp1869_device::cdp1869_palette(palette_device &palette) const
{
- // color-on-color display (CFC=0)
int i;
+ // color-on-color display (CFC=0)
for (i = 0; i < 8; i++)
- {
palette.set_pen_color(i, get_rgb(i, i, 15));
- }
// tone-on-tone display (CFC=1)
for (int c = 0; c < 8; c++)
diff --git a/src/devices/sound/cdp1869.h b/src/devices/sound/cdp1869.h
index 6370322ba75..1f67c9af3f0 100644
--- a/src/devices/sound/cdp1869.h
+++ b/src/devices/sound/cdp1869.h
@@ -239,7 +239,7 @@ protected:
inline void write_char_ram_byte(offs_t pma, offs_t cma, uint8_t pmd, uint8_t data);
inline int read_pcb(offs_t pma, offs_t cma, uint8_t pmd);
inline void update_prd_changed_timer();
- inline rgb_t get_rgb(int i, int c, int l);
+ static rgb_t get_rgb(int i, int c, int l);
inline int get_lines();
inline uint16_t get_pmemsize(int cols, int rows);
inline uint16_t get_pma();
@@ -288,7 +288,7 @@ private:
uint8_t m_wnfreq; // white noise range select
uint8_t m_wnamp; // white noise output amplitude
- DECLARE_PALETTE_INIT(cdp1869);
+ void cdp1869_palette(palette_device &palette) const;
};
diff --git a/src/devices/sound/volt_reg.h b/src/devices/sound/volt_reg.h
index 6493dbc7bd4..f2e5d88298e 100644
--- a/src/devices/sound/volt_reg.h
+++ b/src/devices/sound/volt_reg.h
@@ -20,14 +20,9 @@
class voltage_regulator_device : public device_t, public device_sound_interface
{
public:
- void set_output(double analogue_dc) { m_output = (analogue_dc * 32768) / 5.0f; }
+ voltage_regulator_device &set_output(double analogue_dc) { m_output = (analogue_dc * 32768) / 5.0f; return *this; }
- voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner)
- : voltage_regulator_device(mconfig, tag, owner, (uint32_t)0)
- {
- }
-
- voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual bool issound() override { return false; }
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index ea89e1af6d1..ef3b07d1f4f 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -119,7 +119,7 @@ DEFINE_DEVICE_TYPE(SEGA315_5246, sega315_5246_device, "sega315_5246", "Sega 315-
DEFINE_DEVICE_TYPE(SEGA315_5377, sega315_5377_device, "sega315_5377", "Sega 315-5377 Gamegear VDP")
-PALETTE_INIT_MEMBER(sega315_5124_device, sega315_5124)
+void sega315_5124_device::sega315_5124_palette(palette_device &palette) const
{
for (int i = 0; i < 64; i++)
{
@@ -128,8 +128,8 @@ PALETTE_INIT_MEMBER(sega315_5124_device, sega315_5124)
const int b = (i & 0x30) >> 4;
palette.set_pen_color(i, pal2bit(r), pal2bit(g), pal2bit(b));
}
- /* sms and sg1000-mark3 uses a different palette for modes 0 to 3 - see http://www.smspower.org/Development/Palette */
- /* TMS9918 palette */
+ // sms and sg1000-mark3 uses a different palette for modes 0 to 3 - see http://www.smspower.org/Development/Palette
+ // TMS9918 palette
palette.set_pen_color(64+ 0, 0, 0, 0); // palette.set_pen_color(64+ 0, 0, 0, 0);
palette.set_pen_color(64+ 1, 0, 0, 0); // palette.set_pen_color(64+ 1, 0, 0, 0);
palette.set_pen_color(64+ 2, 0, 170, 0); // palette.set_pen_color(64+ 2, 33, 200, 66);
@@ -149,7 +149,7 @@ PALETTE_INIT_MEMBER(sega315_5124_device, sega315_5124)
}
-PALETTE_INIT_MEMBER(sega315_5377_device, sega315_5377)
+void sega315_5377_device::sega315_5377_palette(palette_device &palette) const
{
for (int i = 0; i < 4096; i++)
{
@@ -1931,10 +1931,10 @@ void sega315_5124_device::device_reset()
// device_add_mconfig - add machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(sega315_5124_device::device_add_mconfig)
- MCFG_PALETTE_ADD("palette", SEGA315_5124_PALETTE_SIZE)
- MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
-MACHINE_CONFIG_END
+void sega315_5124_device::device_add_mconfig(machine_config &config)
+{
+ PALETTE(config, m_palette, FUNC(sega315_5124_device::sega315_5124_palette), SEGA315_5124_PALETTE_SIZE);
+}
void sega315_5377_device::device_reset()
{
@@ -1946,7 +1946,9 @@ void sega315_5377_device::device_reset()
// device_add_mconfig - add machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(sega315_5377_device::device_add_mconfig)
- MCFG_PALETTE_ADD("palette", SEGA315_5377_PALETTE_SIZE)
- MCFG_PALETTE_INIT_OWNER(sega315_5377_device, sega315_5377)
-MACHINE_CONFIG_END
+void sega315_5377_device::device_add_mconfig(machine_config &config)
+{
+ sega315_5246_device::device_add_mconfig(config);
+ m_palette->set_entries(SEGA315_5377_PALETTE_SIZE);
+ m_palette->set_init(FUNC(sega315_5377_device::sega315_5377_palette));
+}
diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h
index 21891c1efef..2151f44b336 100644
--- a/src/devices/video/315_5124.h
+++ b/src/devices/video/315_5124.h
@@ -70,8 +70,6 @@ public:
DECLARE_READ8_MEMBER( vcount_read );
DECLARE_READ8_MEMBER( hcount_read );
- DECLARE_PALETTE_INIT( sega315_5124 );
-
void hcount_latch() { hcount_latch_at_hpos(screen().hpos()); };
void hcount_latch_at_hpos(int hpos);
@@ -83,7 +81,6 @@ public:
virtual void set_sega315_5124_compatibility_mode(bool sega315_5124_compatibility_mode) { }
- void sega315_5124(address_map &map);
protected:
static constexpr unsigned SEGA315_5377_CRAM_SIZE = 0x40; /* 32 colors x 2 bytes per color = 64 bytes */
static constexpr unsigned SEGA315_5124_CRAM_SIZE = 0x20; /* 32 colors x 1 bytes per color = 32 bytes */
@@ -97,6 +94,10 @@ protected:
virtual space_config_vector memory_space_config() const override;
+ void sega315_5124_palette(palette_device &palette) const;
+
+ void sega315_5124(address_map &map);
+
void set_display_settings();
void set_frame_timing();
virtual void update_palette();
@@ -228,7 +229,7 @@ protected:
virtual void blit_scanline(int *line_buffer, int *priority_selected, int pixel_offset_x, int pixel_plot_y, int line) override;
private:
- DECLARE_PALETTE_INIT( sega315_5377 );
+ void sega315_5377_palette(palette_device &palette) const;
};
diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp
index aeb9f6e8ddc..24c7c9fb3a7 100644
--- a/src/devices/video/315_5313.cpp
+++ b/src/devices/video/315_5313.cpp
@@ -221,13 +221,12 @@ sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const ch
// add machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(sega315_5313_device::device_add_mconfig)
- MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
+void sega315_5313_device::device_add_mconfig(machine_config &config)
+{
+ sega315_5313_mode4_device::device_add_mconfig(config);
- MCFG_DEVICE_ADD("snsnd", SEGAPSG, DERIVED_CLOCK(1, 15))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, *this, 0.5, 0)
-MACHINE_CONFIG_END
+ SEGAPSG(config, m_snsnd, DERIVED_CLOCK(1, 15)).add_route(ALL_OUTPUTS, *this, 0.5, AUTO_ALLOC_INPUT, 0);
+}
TIMER_CALLBACK_MEMBER(sega315_5313_device::irq6_on_timer_callback)
{
diff --git a/src/devices/video/gba_lcd.cpp b/src/devices/video/gba_lcd.cpp
index af7b42115bc..36c8e83b27e 100644
--- a/src/devices/video/gba_lcd.cpp
+++ b/src/devices/video/gba_lcd.cpp
@@ -16,54 +16,56 @@
#include "screen.h"
-/* LCD I/O Registers */
-#define DISPCNT HWLO(0x000) /* 0x4000000 2 R/W LCD Control */
-#define GRNSWAP HWHI(0x000) /* 0x4000002 2 R/W Undocumented - Green Swap */
-#define DISPSTAT HWLO(0x004) /* 0x4000004 2 R/W General LCD Status (STAT,LYC) */
-#define VCOUNT HWHI(0x004) /* 0x4000006 2 R Vertical Counter (LY) */
-#define BG0CNT HWLO(0x008) /* 0x4000008 2 R/W BG0 Control */
-#define BG1CNT HWHI(0x008) /* 0x400000a 2 R/W BG1 Control */
-#define BG2CNT HWLO(0x00c) /* 0x400000c 2 R/W BG2 Control */
-#define BG3CNT HWHI(0x00c) /* 0x400000e 2 R/W BG3 Control */
-#define BG0HOFS HWLO(0x010) /* 0x4000010 2 W BG0 X-Offset */
-#define BG0VOFS HWHI(0x010) /* 0x4000012 2 W BG0 Y-Offset */
-#define BG1HOFS HWLO(0x014) /* 0x4000014 2 W BG1 X-Offset */
-#define BG1VOFS HWHI(0x014) /* 0x4000016 2 W BG1 Y-Offset */
-#define BG2HOFS HWLO(0x018) /* 0x4000018 2 W BG2 X-Offset */
-#define BG2VOFS HWHI(0x018) /* 0x400001a 2 W BG2 Y-Offset */
-#define BG3HOFS HWLO(0x01c) /* 0x400001c 2 W BG3 X-Offset */
-#define BG3VOFS HWHI(0x01c) /* 0x400001e 2 W BG3 Y-Offset */
-#define BG2PA HWLO(0x020) /* 0x4000020 2 W BG2 Rotation/Scaling Parameter A (dx) */
-#define BG2PB HWHI(0x020) /* 0x4000022 2 W BG2 Rotation/Scaling Parameter B (dmx) */
-#define BG2PC HWLO(0x024) /* 0x4000024 2 W BG2 Rotation/Scaling Parameter C (dy) */
-#define BG2PD HWHI(0x024) /* 0x4000026 2 W BG2 Rotation/Scaling Parameter D (dmy) */
-#define BG2X WORD(0x028) /* 0x4000028 4 W BG2 Reference Point X-Coordinate */
-#define BG2Y WORD(0x02c) /* 0x400002c 4 W BG2 Reference Point Y-Coordinate */
-#define BG3PA HWLO(0x030) /* 0x4000030 2 W BG3 Rotation/Scaling Parameter A (dx) */
-#define BG3PB HWHI(0x030) /* 0x4000032 2 W BG3 Rotation/Scaling Parameter B (dmx) */
-#define BG3PC HWLO(0x034) /* 0x4000034 2 W BG3 Rotation/Scaling Parameter C (dy) */
-#define BG3PD HWHI(0x034) /* 0x4000036 2 W BG3 Rotation/Scaling Parameter D (dmy) */
-#define BG3X WORD(0x038) /* 0x4000038 4 W BG3 Reference Point X-Coordinate */
-#define BG3Y WORD(0x03c) /* 0x400003c 4 W BG3 Reference Point Y-Coordinate */
-#define WIN0H HWLO(0x040) /* 0x4000040 2 W Window 0 Horizontal Dimensions */
-#define WIN1H HWHI(0x040) /* 0x4000042 2 W Window 1 Horizontal Dimensions */
-#define WIN0V HWLO(0x044) /* 0x4000044 2 W Window 0 Vertical Dimensions */
-#define WIN1V HWHI(0x044) /* 0x4000046 2 W Window 1 Vertical Dimensions */
-#define WININ HWLO(0x048) /* 0x4000048 2 R/W Inside of Window 0 and 1 */
-#define WINOUT HWHI(0x048) /* 0x400004a 2 R/W Inside of OBJ Window & Outside of Windows */
-#define MOSAIC HWLO(0x04c) /* 0x400004c 2 W Mosaic Size */
- /* 0x400004e 2 - Unused */
-#define BLDCNT HWLO(0x050) /* 0x4000050 2 R/W Color Special Effects Selection */
-#define BLDALPHA HWHI(0x050) /* 0x4000052 2 W Alpha Blending Coefficients */
-#define BLDY HWLO(0x054) /* 0x4000054 2 W Brightness (Fade-In/Out) Coefficient */
- /* 0x4000056 2 - Unused */
+namespace {
+
+// LCD I/O Registers
+#define DISPCNT HWLO(0x000) // 0x4000000 2 R/W LCD Control
+#define GRNSWAP HWHI(0x000) // 0x4000002 2 R/W Undocumented - Green Swap
+#define DISPSTAT HWLO(0x004) // 0x4000004 2 R/W General LCD Status (STAT,LYC)
+#define VCOUNT HWHI(0x004) // 0x4000006 2 R Vertical Counter (LY)
+#define BG0CNT HWLO(0x008) // 0x4000008 2 R/W BG0 Control
+#define BG1CNT HWHI(0x008) // 0x400000a 2 R/W BG1 Control
+#define BG2CNT HWLO(0x00c) // 0x400000c 2 R/W BG2 Control
+#define BG3CNT HWHI(0x00c) // 0x400000e 2 R/W BG3 Control
+#define BG0HOFS HWLO(0x010) // 0x4000010 2 W BG0 X-Offset
+#define BG0VOFS HWHI(0x010) // 0x4000012 2 W BG0 Y-Offset
+#define BG1HOFS HWLO(0x014) // 0x4000014 2 W BG1 X-Offset
+#define BG1VOFS HWHI(0x014) // 0x4000016 2 W BG1 Y-Offset
+#define BG2HOFS HWLO(0x018) // 0x4000018 2 W BG2 X-Offset
+#define BG2VOFS HWHI(0x018) // 0x400001a 2 W BG2 Y-Offset
+#define BG3HOFS HWLO(0x01c) // 0x400001c 2 W BG3 X-Offset
+#define BG3VOFS HWHI(0x01c) // 0x400001e 2 W BG3 Y-Offset
+#define BG2PA HWLO(0x020) // 0x4000020 2 W BG2 Rotation/Scaling Parameter A (dx)
+#define BG2PB HWHI(0x020) // 0x4000022 2 W BG2 Rotation/Scaling Parameter B (dmx)
+#define BG2PC HWLO(0x024) // 0x4000024 2 W BG2 Rotation/Scaling Parameter C (dy)
+#define BG2PD HWHI(0x024) // 0x4000026 2 W BG2 Rotation/Scaling Parameter D (dmy)
+#define BG2X WORD(0x028) // 0x4000028 4 W BG2 Reference Point X-Coordinate
+#define BG2Y WORD(0x02c) // 0x400002c 4 W BG2 Reference Point Y-Coordinate
+#define BG3PA HWLO(0x030) // 0x4000030 2 W BG3 Rotation/Scaling Parameter A (dx)
+#define BG3PB HWHI(0x030) // 0x4000032 2 W BG3 Rotation/Scaling Parameter B (dmx)
+#define BG3PC HWLO(0x034) // 0x4000034 2 W BG3 Rotation/Scaling Parameter C (dy)
+#define BG3PD HWHI(0x034) // 0x4000036 2 W BG3 Rotation/Scaling Parameter D (dmy)
+#define BG3X WORD(0x038) // 0x4000038 4 W BG3 Reference Point X-Coordinate
+#define BG3Y WORD(0x03c) // 0x400003c 4 W BG3 Reference Point Y-Coordinate
+#define WIN0H HWLO(0x040) // 0x4000040 2 W Window 0 Horizontal Dimensions
+#define WIN1H HWHI(0x040) // 0x4000042 2 W Window 1 Horizontal Dimensions
+#define WIN0V HWLO(0x044) // 0x4000044 2 W Window 0 Vertical Dimensions
+#define WIN1V HWHI(0x044) // 0x4000046 2 W Window 1 Vertical Dimensions
+#define WININ HWLO(0x048) // 0x4000048 2 R/W Inside of Window 0 and 1
+#define WINOUT HWHI(0x048) // 0x400004a 2 R/W Inside of OBJ Window & Outside of Windows
+#define MOSAIC HWLO(0x04c) // 0x400004c 2 W Mosaic Size
+ // 0x400004e 2 - Unused
+#define BLDCNT HWLO(0x050) // 0x4000050 2 R/W Color Special Effects Selection
+#define BLDALPHA HWHI(0x050) // 0x4000052 2 W Alpha Blending Coefficients
+#define BLDY HWLO(0x054) // 0x4000054 2 W Brightness (Fade-In/Out) Coefficient
+ // 0x4000056 2 - Unused
#define DISPSTAT_SET(val) HWLO_SET(0x004, val)
#define DISPSTAT_RESET(val) HWLO_RESET(0x004, val)
#define VERBOSE_LEVEL (0)
-static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...)
+inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...)
{
if (VERBOSE_LEVEL >= n_level)
{
@@ -139,6 +141,8 @@ private:
uint16_t m_attr2;
};
+} // anonymous namespace
+
DEFINE_DEVICE_TYPE(GBA_LCD, gba_lcd_device, "gba_lcd", "GBA LCD")
gba_lcd_device::gba_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@@ -1728,7 +1732,7 @@ TIMER_CALLBACK_MEMBER(gba_lcd_device::perform_scan)
m_scan_timer->adjust(screen().time_until_pos((scanline + 1) % 228, 0));
}
-PALETTE_INIT_MEMBER(gba_lcd_device, gba)
+void gba_lcd_device::gba_palette(palette_device &palette) const
{
for (uint8_t b = 0; b < 32; b++)
{
@@ -1809,6 +1813,5 @@ MACHINE_CONFIG_START(gba_lcd_device::device_add_mconfig)
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, gba_lcd_device, screen_update)
MCFG_SCREEN_PALETTE("palette")
- MCFG_PALETTE_ADD("palette", 32768)
- MCFG_PALETTE_INIT_OWNER(gba_lcd_device, gba)
+ PALETTE(config, "palette", FUNC(gba_lcd_device::gba_palette), 32768);
MACHINE_CONFIG_END
diff --git a/src/devices/video/gba_lcd.h b/src/devices/video/gba_lcd.h
index 0fe017a6b93..1332340e175 100644
--- a/src/devices/video/gba_lcd.h
+++ b/src/devices/video/gba_lcd.h
@@ -9,7 +9,6 @@
By R. Belmont, Ryan Holtz
***************************************************************************/
-
#ifndef MAME_VIDEO_GBA_LCD_H
#define MAME_VIDEO_GBA_LCD_H
@@ -209,8 +208,7 @@ private:
uint32_t decrease_brightness(uint32_t color);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_PALETTE_INIT(gba);
-
+ void gba_palette(palette_device &palette) const;
devcb_write_line m_int_hblank_cb; /* H-Blank interrupt callback function */
devcb_write_line m_int_vblank_cb; /* V-Blank interrupt callback function */
diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp
index 1dc37261d87..63283f498b0 100644
--- a/src/devices/video/hd66421.cpp
+++ b/src/devices/video/hd66421.cpp
@@ -123,18 +123,16 @@ inline void hd66421_device::writebyte(offs_t address, uint8_t data)
//-------------------------------------------------
hd66421_device::hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, HD66421, tag, owner, clock),
- device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(hd66421_device::hd66421), this)),
- m_cmd(0),
- m_x(0),
- m_y(0),
- m_palette(*this, "palette")
+ : device_t(mconfig, HD66421, tag, owner, clock)
+ , device_memory_interface(mconfig, *this)
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(hd66421_device::hd66421), this))
+ , m_cmd(0)
+ , m_x(0)
+ , m_y(0)
+ , m_palette(*this, "palette")
{
- for (auto & elem : m_reg)
- {
+ for (auto &elem : m_reg)
elem = 0;
- }
}
@@ -264,14 +262,14 @@ uint32_t hd66421_device::update_screen(screen_device &screen, bitmap_ind16 &bitm
return 0;
}
-PALETTE_INIT_MEMBER(hd66421_device, hd66421)
+void hd66421_device::hd66421_palette(palette_device &palette) const
{
// init palette
for (int i = 0; i < 4; i++)
{
palette.set_pen_color(i, rgb_t::white());
#ifndef HD66421_BRIGHTNESS_DOES_NOT_WORK
- palette.set_pen_contrast(i, 1.0 * i / (4 - 1));
+ palette.set_pen_contrast(i, double(i) / (4 - 1));
#endif
}
}
@@ -281,7 +279,7 @@ PALETTE_INIT_MEMBER(hd66421_device, hd66421)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(hd66421_device::device_add_mconfig)
- MCFG_PALETTE_ADD("palette", 4)
- MCFG_PALETTE_INIT_OWNER(hd66421_device, hd66421)
-MACHINE_CONFIG_END
+void hd66421_device::device_add_mconfig(machine_config &config)
+{
+ PALETTE(config, m_palette, FUNC(hd66421_device::hd66421_palette), 4);
+}
diff --git a/src/devices/video/hd66421.h b/src/devices/video/hd66421.h
index ac4c9add745..b2ed9f991e5 100644
--- a/src/devices/video/hd66421.h
+++ b/src/devices/video/hd66421.h
@@ -62,7 +62,7 @@ private:
void hd66421(address_map &map);
- DECLARE_PALETTE_INIT(hd66421);
+ void hd66421_palette(palette_device &palette) const;
};
diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp
index de90b4f4937..639174a84b8 100644
--- a/src/devices/video/i8244.cpp
+++ b/src/devices/video/i8244.cpp
@@ -178,32 +178,29 @@ void i8244_device::device_reset()
}
-PALETTE_INIT_MEMBER(i8244_device, i8244)
+void i8244_device::i8244_palette(palette_device &palette) const
{
- static const uint8_t i8244_colors[3*16] =
+ static constexpr rgb_t i8244_colors[16] =
{
- 0x00, 0x00, 0x00, // i r g b
- 0x00, 0x00, 0xAA, // i r g B
- 0x00, 0xAA, 0x00, // i r G b
- 0x00, 0xAA, 0xAA, // i r G B
- 0xAA, 0x00, 0x00, // i R g b
- 0xAA, 0x00, 0xAA, // i R g B
- 0xAA, 0xAA, 0x00, // i R G b
- 0xAA, 0xAA, 0xAA, // i R G B
- 0x55, 0x55, 0x55, // I r g b
- 0x55, 0x55, 0xFF, // I r g B
- 0x55, 0xFF, 0x55, // I r G b
- 0x55, 0xFF, 0xFF, // I r G B
- 0xFF, 0x55, 0x55, // I R g b
- 0xFF, 0x55, 0xFF, // I R g B
- 0xFF, 0xFF, 0x55, // I R G b
- 0xFF, 0xFF, 0xFF, // I R G B
+ { 0x00, 0x00, 0x00 }, // i r g b
+ { 0x00, 0x00, 0xaa }, // i r g B
+ { 0x00, 0xaa, 0x00 }, // i r G b
+ { 0x00, 0xaa, 0xaa }, // i r G B
+ { 0xaa, 0x00, 0x00 }, // i R g b
+ { 0xaa, 0x00, 0xaa }, // i R g B
+ { 0xaa, 0xaa, 0x00 }, // i R G b
+ { 0xaa, 0xaa, 0xaa }, // i R G B
+ { 0x55, 0x55, 0x55 }, // I r g b
+ { 0x55, 0x55, 0xff }, // I r g B
+ { 0x55, 0xff, 0x55 }, // I r G b
+ { 0x55, 0xff, 0xff }, // I r G B
+ { 0xff, 0x55, 0x55 }, // I R g b
+ { 0xff, 0x55, 0xff }, // I R g B
+ { 0xff, 0xff, 0x55 }, // I R G b
+ { 0xff, 0xff, 0xff } // I R G B
};
- for ( int i = 0; i < 16; i++ )
- {
- palette.set_pen_color( i, i8244_colors[i*3], i8244_colors[i*3+1], i8244_colors[i*3+2] );
- }
+ palette.set_pen_colors( 0, i8244_colors );
}
diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h
index 0e8fd60159e..0bf0174cdba 100644
--- a/src/devices/video/i8244.h
+++ b/src/devices/video/i8244.h
@@ -58,7 +58,7 @@ public:
DECLARE_WRITE8_MEMBER(write);
DECLARE_READ_LINE_MEMBER(vblank);
DECLARE_READ_LINE_MEMBER(hblank);
- DECLARE_PALETTE_INIT(i8244);
+ void i8244_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/devices/video/imagetek_i4100.cpp b/src/devices/video/imagetek_i4100.cpp
index fd058e56797..a19e05bd26f 100644
--- a/src/devices/video/imagetek_i4100.cpp
+++ b/src/devices/video/imagetek_i4100.cpp
@@ -297,7 +297,7 @@ imagetek_i4300_device::imagetek_i4300_device(const machine_config &mconfig, cons
void imagetek_i4100_device::device_add_mconfig(machine_config &config)
{
- PALETTE(config, m_palette, 0x1000).set_format(PALETTE_FORMAT_GGGGGRRRRRBBBBBx);
+ PALETTE(config, m_palette).set_format(palette_device::GRBx_555, 0x1000);
BUFFERED_SPRITERAM16(config, m_spriteram);
}
diff --git a/src/devices/video/polylgcy.cpp b/src/devices/video/polylgcy.cpp
index 2b3f8ccee02..a4baa6e5c70 100644
--- a/src/devices/video/polylgcy.cpp
+++ b/src/devices/video/polylgcy.cpp
@@ -202,7 +202,7 @@ struct legacy_poly_manager
static void **allocate_array(running_machine &machine, size_t *itemsize, uint32_t itemcount);
static void *poly_item_callback(void *param, int threadid);
-static void poly_state_presave(legacy_poly_manager *poly);
+static void poly_state_presave(legacy_poly_manager &poly);
@@ -1359,7 +1359,7 @@ static void *poly_item_callback(void *param, int threadid)
ensure everything is synced before saving
-------------------------------------------------*/
-static void poly_state_presave(legacy_poly_manager *poly)
+static void poly_state_presave(legacy_poly_manager &poly)
{
- poly_wait(poly, "pre-save");
+ poly_wait(&poly, "pre-save");
}
diff --git a/src/devices/video/upd7227.h b/src/devices/video/upd7227.h
index a6888e2d849..1f74b8d6102 100644
--- a/src/devices/video/upd7227.h
+++ b/src/devices/video/upd7227.h
@@ -14,27 +14,18 @@
///*************************************************************************
-// INTERFACE CONFIGURATION MACROS
-///*************************************************************************
-
-#define MCFG_UPD7227_ADD(_tag, _sx, _sy) \
- MCFG_DEVICE_ADD(_tag, UPD7227, 0) \
- downcast<upd7227_device &>(*device).set_offsets(_sx, _sy);
-
-
-
-///*************************************************************************
// TYPE DEFINITIONS
///*************************************************************************
// ======================> upd7227_device
-class upd7227_device : public device_t,
- public device_memory_interface
+class upd7227_device : public device_t, public device_memory_interface
{
public:
// construction/destruction
- upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, int sx, int sy) : upd7227_device(mconfig, tag, owner, 0)
+ { set_offsets(sx, sy); }
// inline configuration helpers
void set_offsets(int sx, int sy) { m_sx = sx; m_sy = sy; }
diff --git a/src/emu/devdelegate.h b/src/emu/devdelegate.h
index 544253ecfda..938e5905caa 100644
--- a/src/emu/devdelegate.h
+++ b/src/emu/devdelegate.h
@@ -46,7 +46,6 @@ protected:
using basetype = delegate<Signature>;
template <class FunctionClass> using member_func_type = typename basetype::template traits<FunctionClass>::member_func_type;
template <class FunctionClass> using const_member_func_type = typename basetype::template traits<FunctionClass>::const_member_func_type;
- template <class FunctionClass> using static_func_type = typename basetype::template traits<FunctionClass>::static_func_type;
template <class FunctionClass> using static_ref_func_type = typename basetype::template traits<FunctionClass>::static_ref_func_type;
public:
@@ -57,7 +56,6 @@ public:
template <class FunctionClass> named_delegate(member_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, object), m_name(name) { }
template <class FunctionClass> named_delegate(const_member_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, object), m_name(name) { }
explicit named_delegate(std::function<Signature> funcptr, const char *name) : basetype(funcptr), m_name(name) { }
- template <class FunctionClass> named_delegate(static_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, object), m_name(name) { }
template <class FunctionClass> named_delegate(static_ref_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, object), m_name(name) { }
named_delegate &operator=(const basetype &src) { basetype::operator=(src); m_name = src.m_name; return *this; }
@@ -78,7 +76,6 @@ class device_delegate : public named_delegate<Signature>, public device_delegate
using basetype = named_delegate<Signature>;
template <class FunctionClass> using member_func_type = typename basetype::template member_func_type<FunctionClass>;
template <class FunctionClass> using const_member_func_type = typename basetype::template const_member_func_type<FunctionClass>;
- template <class FunctionClass> using static_func_type = typename basetype::template static_func_type<FunctionClass>;
template <class FunctionClass> using static_ref_func_type = typename basetype::template static_ref_func_type<FunctionClass>;
public:
@@ -88,7 +85,6 @@ public:
device_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), device_delegate_helper(src.m_device_name) { }
template <class FunctionClass> device_delegate(member_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { }
template <class FunctionClass> device_delegate(const_member_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { }
- template <class FunctionClass> device_delegate(static_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { }
template <class FunctionClass> device_delegate(static_ref_func_type<FunctionClass> funcptr, const char *name, FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { }
device_delegate(std::function<Signature> funcptr, const char *name) : basetype(funcptr, name), device_delegate_helper(nullptr) { }
device_delegate &operator=(const thistype &src) { basetype::operator=(src); m_device_name = src.m_device_name; return *this; }
@@ -98,9 +94,7 @@ public:
template <class FunctionClass> device_delegate(member_func_type<FunctionClass> funcptr, const char *name, const char *devname, FunctionClass *) : basetype(funcptr, name, static_cast<FunctionClass *>(nullptr)), device_delegate_helper(devname) { }
template <class FunctionClass> device_delegate(const_member_func_type<FunctionClass> funcptr, const char *name, const char *devname) : basetype(funcptr, name, static_cast<FunctionClass *>(nullptr)), device_delegate_helper(devname) { }
template <class FunctionClass> device_delegate(const_member_func_type<FunctionClass> funcptr, const char *name, const char *devname, FunctionClass *) : basetype(funcptr, name, static_cast<FunctionClass *>(nullptr)), device_delegate_helper(devname) { }
- template <class FunctionClass> device_delegate(static_func_type<FunctionClass> funcptr, const char *name, const char *devname, FunctionClass *) : basetype(funcptr, name, static_cast<FunctionClass *>(nullptr)), device_delegate_helper(devname) { }
template <class FunctionClass> device_delegate(static_ref_func_type<FunctionClass> funcptr, const char *name, const char *devname, FunctionClass *) : basetype(funcptr, name, static_cast<FunctionClass *>(nullptr)), device_delegate_helper(devname) { }
- device_delegate(static_func_type<device_t> funcptr, const char *name) : basetype(funcptr, name, static_cast<device_t *>(nullptr)), device_delegate_helper(nullptr) { }
device_delegate(static_ref_func_type<device_t> funcptr, const char *name) : basetype(funcptr, name, static_cast<device_t *>(nullptr)), device_delegate_helper(nullptr) { }
// and constructors that provide a search root
diff --git a/src/emu/dipalette.h b/src/emu/dipalette.h
index 358d5071b58..7e41f968cea 100644
--- a/src/emu/dipalette.h
+++ b/src/emu/dipalette.h
@@ -42,9 +42,6 @@ class device_palette_interface : public device_interface
static constexpr int MAX_SHADOW_PRESETS = 4;
public:
- // construction/destruction
- device_palette_interface(const machine_config &mconfig, device_t &device);
-
// getters
u32 entries() const { return palette_entries(); }
u32 indirect_entries() const { return palette_indirect_entries(); }
@@ -66,6 +63,7 @@ public:
void set_pen_blue_level(pen_t pen, u8 level) { m_palette->entry_set_blue_level(pen, level); }
void set_pen_color(pen_t pen, u8 r, u8 g, u8 b) { m_palette->entry_set_color(pen, rgb_t(r, g, b)); }
void set_pen_colors(pen_t color_base, const rgb_t *colors, int color_count) { while (color_count--) set_pen_color(color_base++, *colors++); }
+ template <size_t N> void set_pen_colors(pen_t color_base, const rgb_t (&colors)[N]) { set_pen_colors(color_base, colors, N); }
void set_pen_colors(pen_t color_base, const std::vector<rgb_t> &colors) { for (unsigned int i=0; i != colors.size(); i++) set_pen_color(color_base+i, colors[i]); }
void set_pen_contrast(pen_t pen, double bright) { m_palette->entry_set_contrast(pen, bright); }
@@ -82,6 +80,9 @@ public:
void set_shadow_mode(int mode) { assert(mode >= 0 && mode < MAX_SHADOW_PRESETS); m_shadow_table = m_shadow_tables[mode].base; }
protected:
+ // construction/destruction
+ device_palette_interface(const machine_config &mconfig, device_t &device);
+
// interface-level overrides
virtual void interface_validity_check(validity_checker &valid) const override;
virtual void interface_pre_start() override;
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp
index 7eae114389d..f4d9b194f8f 100644
--- a/src/emu/disound.cpp
+++ b/src/emu/disound.cpp
@@ -44,22 +44,23 @@ device_sound_interface::~device_sound_interface()
device_sound_interface &device_sound_interface::add_route(u32 output, const char *target, double gain, u32 input, u32 mixoutput)
{
- assert(!device().started());
- m_route_list.emplace_back(sound_route{ output, input, mixoutput, float(gain), device().mconfig().current_device(), target });
- return *this;
+ return add_route(output, device().mconfig().current_device(), target, gain, input, mixoutput);
}
device_sound_interface &device_sound_interface::add_route(u32 output, device_sound_interface &target, double gain, u32 input, u32 mixoutput)
{
- assert(!device().started());
- m_route_list.emplace_back(sound_route{ output, input, mixoutput, float(gain), target.device(), DEVICE_SELF });
- return *this;
+ return add_route(output, target.device(), DEVICE_SELF, gain, input, mixoutput);
}
device_sound_interface &device_sound_interface::add_route(u32 output, speaker_device &target, double gain, u32 input, u32 mixoutput)
{
+ return add_route(output, target, DEVICE_SELF, gain, input, mixoutput);
+}
+
+device_sound_interface &device_sound_interface::add_route(u32 output, device_t &base, const char *target, double gain, u32 input, u32 mixoutput)
+{
assert(!device().started());
- m_route_list.emplace_back(sound_route{ output, input, mixoutput, float(gain), target, DEVICE_SELF });
+ m_route_list.emplace_back(sound_route{ output, input, mixoutput, float(gain), base, target });
return *this;
}
diff --git a/src/emu/disound.h b/src/emu/disound.h
index 949e4837490..1a13c7613fa 100644
--- a/src/emu/disound.h
+++ b/src/emu/disound.h
@@ -18,6 +18,7 @@
#define MAME_EMU_DISOUND_H
#include <functional>
+#include <utility>
//**************************************************************************
@@ -74,6 +75,12 @@ public:
std::vector<sound_route> const &routes() const { return m_route_list; }
// configuration helpers
+ template <typename T, bool R>
+ device_sound_interface &add_route(u32 output, const device_finder<T, R> &target, double gain, u32 input = AUTO_ALLOC_INPUT, u32 mixoutput = 0)
+ {
+ const std::pair<device_t &, const char *> ft(target.finder_target());
+ return add_route(output, ft.first, ft.second, gain, input, mixoutput);
+ }
device_sound_interface &add_route(u32 output, const char *target, double gain, u32 input = AUTO_ALLOC_INPUT, u32 mixoutput = 0);
device_sound_interface &add_route(u32 output, device_sound_interface &target, double gain, u32 input = AUTO_ALLOC_INPUT, u32 mixoutput = 0);
device_sound_interface &add_route(u32 output, speaker_device &target, double gain, u32 input = AUTO_ALLOC_INPUT, u32 mixoutput = 0);
@@ -99,6 +106,7 @@ public:
protected:
// configuration access
std::vector<sound_route> &routes() { return m_route_list; }
+ device_sound_interface &add_route(u32 output, device_t &base, const char *tag, double gain, u32 input, u32 mixoutput);
// optional operation overrides
virtual void interface_validity_check(validity_checker &valid) const override;
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 74c0ae2a426..4521b8335a6 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -164,8 +164,6 @@ template <typename D, typename T, typename Ret, typename... Params>
struct rw_device_class<D, Ret (T::*)(Params...) const, std::enable_if_t<std::is_constructible<D, Ret (T::*)(Params...) const, const char *, const char *, T *>::value> > { using type = T; };
template <typename D, typename T, typename Ret, typename... Params>
struct rw_device_class<D, Ret (*)(T &, Params...), std::enable_if_t<std::is_constructible<D, Ret (*)(T &, Params...), const char *, const char *, T *>::value> > { using type = T; };
-template <typename D, typename T, typename Ret, typename... Params>
-struct rw_device_class<D, Ret (*)(T *, Params...), std::enable_if_t<std::is_constructible<D, Ret (*)(T *, Params...), const char *, const char *, T *>::value> > { using type = T; };
template <typename D, typename T> using rw_device_class_t = typename rw_device_class <D, T>::type;
diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp
index 5bdffe04a4b..e06e9c61871 100644
--- a/src/emu/emupal.cpp
+++ b/src/emu/emupal.cpp
@@ -18,22 +18,323 @@
DEFINE_DEVICE_TYPE(PALETTE, palette_device, "palette", "palette")
-palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 entries)
- : device_t(mconfig, PALETTE, tag, owner, (uint32_t)0),
- device_palette_interface(mconfig, *this),
- m_entries(0),
- m_indirect_entries(0),
- m_enable_shadows(0),
- m_enable_hilights(0),
- m_membits(0),
- m_membits_supplied(false),
- m_endianness(),
- m_endianness_supplied(false),
- m_prom_region(*this, finder_base::DUMMY_TAG),
- m_init(palette_init_delegate()),
- m_raw_to_rgb(raw_to_rgb_converter())
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, init_delegate &&init, u32 entries, u32 indirect)
+ : palette_device(mconfig, tag, owner, 0U)
{
set_entries(entries);
+ set_indirect_entries(indirect);
+ set_init(std::move(init));
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, black_t, u32 entries)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_all_black), this), entries)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_monochrome), this), 2)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_inv_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_monochrome_inverted), this), 2)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_hi_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_monochrome_highlight), this), 3)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_rgb), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rbg_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_rbg), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, grb_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_grb), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, gbr_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_gbr), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, brg_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_brg), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_3b_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_3bit_bgr), this), 8)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_555_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_rgb_555), this), 32768)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, grb_555_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_grb_555), this), 32768)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_555_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_bgr_555), this), 32768)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_565_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_rgb_565), this), 65536)
+{
+}
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_565_t)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_bgr_565), this), 65536)
+{
+}
+
+
+palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, PALETTE, tag, owner, clock)
+ , device_palette_interface(mconfig, *this)
+ , m_entries(0)
+ , m_indirect_entries(0)
+ , m_enable_shadows(0)
+ , m_enable_hilights(0)
+ , m_membits(0)
+ , m_membits_supplied(false)
+ , m_endianness()
+ , m_endianness_supplied(false)
+ , m_prom_region(*this, finder_base::DUMMY_TAG)
+ , m_init()
+ , m_raw_to_rgb()
+{
+}
+
+
+palette_device &palette_device::set_format(int bytes_per_entry, raw_to_rgb_converter::raw_to_rgb_func func, u32 entries)
+{
+ set_format(raw_to_rgb_converter(bytes_per_entry, func));
+ set_entries(entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgb_332_t, u32 entries)
+{
+ set_format(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 5,2,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(bgr_233_t, u32 entries)
+{
+ set_format(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 0,3,6>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgb_332_inv_t, u32 entries)
+{
+ set_format(1, &raw_to_rgb_converter::inverted_rgb_decoder<3,3,2, 5,2,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(bgr_233_inv_t, u32 entries)
+{
+ set_format(1, &raw_to_rgb_converter::inverted_rgb_decoder<3,3,2, 0,3,6>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrgb_333_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 6,3,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrbg_333_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 6,0,3>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbgr_333_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 0,3,6>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrgb_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 8,4,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrbg_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 8,0,4>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbrg_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 4,0,8>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbgr_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 0,4,8>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgbx_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 12,8,4>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(gbrx_444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 4,12,8>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(irgb_4444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_irgb_decoder<4,4,4,4, 12,8,4,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgbi_4444_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_irgb_decoder<4,4,4,4, 0,12,8,4>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrgb_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 10,5,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xgrb_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 5,10,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xgbr_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 0,10,5>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbrg_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 5,0,10>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbgr_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 0,5,10>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgbx_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 11,6,1>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(grbx_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 6,11,1>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(brgx_555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 6,1,11>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrbg_inv_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::inverted_rgb_decoder<5,5,5, 10,0,5>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(irgb_1555_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::IRRRRRGGGGGBBBBB_decoder, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgb_565_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,6,5, 11,5,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(bgr_565_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<5,6,5, 0,5,11>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xrgb_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 16,8,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xgrb_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,16,0>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbrg_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,0,16>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(xbgr_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 0,8,16>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rgbx_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 24,16,8>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(grbx_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 16,24,8>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(bgrx_888_t, u32 entries)
+{
+ set_format(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,16,24>, entries);
+ return *this;
+}
+
+palette_device &palette_device::set_format(rrrrggggbbbbrgbx_t, u32 entries)
+{
+ set_format(2, &raw_to_rgb_converter::RRRRGGGGBBBBRGBx_decoder, entries);
+ return *this;
}
@@ -346,7 +647,7 @@ void palette_device::palette_init_3bit_bgr(palette_device &palette)
bit 0 -- 2.2kohm resistor -- RED/GREEN/BLUE
-------------------------------------------------*/
-void palette_device::palette_init_RRRRGGGGBBBB_proms(palette_device &palette)
+void palette_device::palette_init_rgb_444_proms(palette_device &palette)
{
if (!m_prom_region.found())
throw emu_fatalerror("Unable to find color PROM region '%s'.", m_prom_region.finder_tag());
@@ -385,49 +686,46 @@ void palette_device::palette_init_RRRRGGGGBBBB_proms(palette_device &palette)
/*-------------------------------------------------
- RRRRR_GGGGG_BBBBB/BBBBB_GGGGG_RRRRR -
standard 5-5-5 palette for games using a
15-bit color space
-------------------------------------------------*/
-void palette_device::palette_init_RRRRRGGGGGBBBBB(palette_device &palette)
+void palette_device::palette_init_rgb_555(palette_device &palette)
{
- int i;
-
- for (i = 0; i < 0x8000; i++)
+ for (int i = 0; i < 0x8000; i++)
palette.set_pen_color(i, rgbexpand<5,5,5>(i, 10, 5, 0));
}
-void palette_device::palette_init_BBBBBGGGGGRRRRR(palette_device &palette)
+void palette_device::palette_init_grb_555(palette_device &palette)
{
- int i;
+ for (int i = 0; i < 0x8000; i++)
+ palette.set_pen_color(i, rgbexpand<5,5,5>(i, 5, 10, 0));
+}
+
- for (i = 0; i < 0x8000; i++)
+void palette_device::palette_init_bgr_555(palette_device &palette)
+{
+ for (int i = 0; i < 0x8000; i++)
palette.set_pen_color(i, rgbexpand<5,5,5>(i, 0, 5, 10));
}
/*-------------------------------------------------
- RRRRR_GGGGGG_BBBBB/BBBBB_GGGGGG_RRRRR -
standard 5-6-5 palette for games using a
16-bit color space
-------------------------------------------------*/
-void palette_device::palette_init_RRRRRGGGGGGBBBBB(palette_device &palette)
+void palette_device::palette_init_rgb_565(palette_device &palette)
{
- int i;
-
- for (i = 0; i < 0x10000; i++)
+ for (int i = 0; i < 0x10000; i++)
palette.set_pen_color(i, rgbexpand<5,6,5>(i, 11, 5, 0));
}
-void palette_device::palette_init_BBBBBGGGGGGRRRRR(palette_device &palette)
+void palette_device::palette_init_bgr_565(palette_device &palette)
{
- int i;
-
- for (i = 0; i < 0x10000; i++)
+ for (int i = 0; i < 0x10000; i++)
palette.set_pen_color(i, rgbexpand<5,6,5>(i, 0, 5, 11));
}
diff --git a/src/emu/emupal.h b/src/emu/emupal.h
index cafed72589a..19c8008154a 100644
--- a/src/emu/emupal.h
+++ b/src/emu/emupal.h
@@ -90,187 +90,41 @@
******************************************************************************/
-#pragma once
-
#ifndef MAME_EMU_EMUPAL_H
#define MAME_EMU_EMUPAL_H
+#pragma once
+
//**************************************************************************
// CONSTANTS
//**************************************************************************
-#define PALETTE_INIT_NAME(_Name) palette_init_##_Name
-#define DECLARE_PALETTE_INIT(_Name) void PALETTE_INIT_NAME(_Name)(palette_device &palette)
-#define PALETTE_INIT_MEMBER(_Class, _Name) void _Class::PALETTE_INIT_NAME(_Name)(palette_device &palette)
-
-#define PALETTE_DECODER_NAME(_Name) _Name##_decoder
-#define DECLARE_PALETTE_DECODER(_Name) static rgb_t PALETTE_DECODER_NAME(_Name)(u32 raw)
-#define PALETTE_DECODER_MEMBER(_Class, _Name) rgb_t _Class::PALETTE_DECODER_NAME(_Name)(u32 raw)
-
-// standard 3-3-2 formats
-#define PALETTE_FORMAT_BBGGGRRR raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 0,3,6>)
-#define PALETTE_FORMAT_RRRGGGBB raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 5,2,0>)
-
-// data-inverted 3-3-2 formats
-#define PALETTE_FORMAT_BBGGGRRR_inverted raw_to_rgb_converter(1, &raw_to_rgb_converter::inverted_rgb_decoder<3,3,2, 0,3,6>)
-#define PALETTE_FORMAT_RRRGGGBB_inverted raw_to_rgb_converter(1, &raw_to_rgb_converter::inverted_rgb_decoder<3,3,2, 5,2,0>)
-
-// standard 3-3-3 formats
-#define PALETTE_FORMAT_xxxxxxxBBBGGGRRR raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 0,3,6>)
-#define PALETTE_FORMAT_xxxxxxxRRRBBBGGG raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 6,0,3>)
-#define PALETTE_FORMAT_xxxxxxxRRRGGGBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<3,3,3, 6,3,0>)
-
-// standard 4-4-4 formats
-#define PALETTE_FORMAT_xxxxBBBBGGGGRRRR raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 0,4,8>)
-#define PALETTE_FORMAT_xxxxBBBBRRRRGGGG raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 4,0,8>)
-#define PALETTE_FORMAT_xxxxRRRRBBBBGGGG raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 8,0,4>)
-#define PALETTE_FORMAT_xxxxRRRRGGGGBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 8,4,0>)
-#define PALETTE_FORMAT_RRRRGGGGBBBBxxxx raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 12,8,4>)
-#define PALETTE_FORMAT_GGGGBBBBRRRRxxxx raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 4,12,8>)
-
-// standard 4-4-4-4 formats
-#define PALETTE_FORMAT_IIIIRRRRGGGGBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_irgb_decoder<4,4,4,4, 12,8,4,0>)
-#define PALETTE_FORMAT_RRRRGGGGBBBBIIII raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_irgb_decoder<4,4,4,4, 0,12,8,4>)
-
-// standard 5-5-5 formats
-#define PALETTE_FORMAT_xBBBBBGGGGGRRRRR raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 0,5,10>)
-#define PALETTE_FORMAT_xBBBBBRRRRRGGGGG raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 5,0,10>)
-#define PALETTE_FORMAT_xRRRRRGGGGGBBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 10,5,0>)
-#define PALETTE_FORMAT_xGGGGGRRRRRBBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 5,10,0>)
-#define PALETTE_FORMAT_xGGGGGBBBBBRRRRR raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 0,10,5>)
-#define PALETTE_FORMAT_BBBBBRRRRRGGGGGx raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 6,1,11>)
-#define PALETTE_FORMAT_GGGGGRRRRRBBBBBx raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 6,11,1>)
-#define PALETTE_FORMAT_RRRRRGGGGGBBBBBx raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 11,6,1>)
-#define PALETTE_FORMAT_RRRRGGGGBBBBRGBx raw_to_rgb_converter(2, &raw_to_rgb_converter::RRRRGGGGBBBBRGBx_decoder)
+// exotic 5-5-5 formats
#define PALETTE_FORMAT_xRGBRRRRGGGGBBBB_bit0 raw_to_rgb_converter(2, &raw_to_rgb_converter::xRGBRRRRGGGGBBBB_bit0_decoder)
#define PALETTE_FORMAT_xRGBRRRRGGGGBBBB_bit4 raw_to_rgb_converter(2, &raw_to_rgb_converter::xRGBRRRRGGGGBBBB_bit4_decoder)
-// data-inverted 5-5-5 formats
-#define PALETTE_FORMAT_xRRRRRBBBBBGGGGG_inverted raw_to_rgb_converter(2, &raw_to_rgb_converter::inverted_rgb_decoder<5,5,5, 10,0,5>)
-
-// standard 5-6-5 formats
-#define PALETTE_FORMAT_RRRRRGGGGGGBBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,6,5, 11,5,0>)
-#define PALETTE_FORMAT_BBBBBGGGGGGRRRRR raw_to_rgb_converter(2, &raw_to_rgb_converter::standard_rgb_decoder<5,6,5, 0,5,11>)
-
-// standard 5-5-5-1 formats
-#define PALETTE_FORMAT_IRRRRRGGGGGBBBBB raw_to_rgb_converter(2, &raw_to_rgb_converter::IRRRRRGGGGGBBBBB_decoder)
-
-// standard 8-8-8 formats
-#define PALETTE_FORMAT_XRGB raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 16,8,0>)
-#define PALETTE_FORMAT_XBGR raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 0,8,16>)
-#define PALETTE_FORMAT_XBRG raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,0,16>)
-#define PALETTE_FORMAT_XGRB raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,16,0>)
-#define PALETTE_FORMAT_RGBX raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 24,16,8>)
-#define PALETTE_FORMAT_GRBX raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 16,24,8>)
-#define PALETTE_FORMAT_BGRX raw_to_rgb_converter(4, &raw_to_rgb_converter::standard_rgb_decoder<8,8,8, 8,16,24>)
-
//**************************************************************************
// DEVICE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_PALETTE_ADD(_tag, _entries) \
- MCFG_DEVICE_ADD(_tag, PALETTE, _entries)
-
-#define MCFG_PALETTE_ADD_INIT_BLACK(_tag, _entries) \
- MCFG_PALETTE_ADD(_tag, _entries) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_all_black), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_MODIFY MCFG_DEVICE_MODIFY
-
+ MCFG_DEVICE_ADD(_tag, PALETTE, 0) \
+ downcast<palette_device &>(*device).set_entries(_entries);
-#define MCFG_PALETTE_INIT_OWNER(_class, _method) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(&_class::PALETTE_INIT_NAME(_method), #_class "::palette_init_" #_method, this));
-#define MCFG_PALETTE_INIT_DEVICE(_tag, _class, _method) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(&_class::PALETTE_INIT_NAME(_method), #_class "::palette_init_" #_method, _tag));
#define MCFG_PALETTE_FORMAT(_format) \
downcast<palette_device &>(*device).set_format(PALETTE_FORMAT_##_format);
-#define MCFG_PALETTE_FORMAT_CLASS(_bytes_per_entry, _class, _method) \
- downcast<palette_device &>(*device).set_format(raw_to_rgb_converter(_bytes_per_entry, &_class::PALETTE_DECODER_NAME(_method)));
-
#define MCFG_PALETTE_MEMBITS(_width) \
downcast<palette_device &>(*device).set_membits(_width);
-#define MCFG_PALETTE_ENDIANNESS(_endianness) \
- downcast<palette_device &>(*device).set_endianness(_endianness);
-
#define MCFG_PALETTE_ENTRIES(_entries) \
downcast<palette_device &>(*device).set_entries(_entries);
#define MCFG_PALETTE_INDIRECT_ENTRIES(_entries) \
downcast<palette_device &>(*device).set_indirect_entries(_entries);
-#define MCFG_PALETTE_ENABLE_SHADOWS() \
- downcast<palette_device &>(*device).enable_shadows();
-
-#define MCFG_PALETTE_ENABLE_HILIGHTS() \
- downcast<palette_device &>(*device).enable_hilights();
-
-
-// monochrome palettes
-#define MCFG_PALETTE_ADD_MONOCHROME(_tag) \
- MCFG_PALETTE_ADD(_tag, 2) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_monochrome), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_MONOCHROME_INVERTED(_tag) \
- MCFG_PALETTE_ADD(_tag, 2) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_monochrome_inverted), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT(_tag) \
- MCFG_PALETTE_ADD(_tag, 3) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_monochrome_highlight), downcast<palette_device *>(device)));
-
-// 8-bit palettes
-#define MCFG_PALETTE_ADD_3BIT_RGB(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_rgb), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_3BIT_RBG(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_rbg), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_3BIT_BRG(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_brg), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_3BIT_GRB(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_grb), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_3BIT_GBR(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_gbr), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_3BIT_BGR(_tag) \
- MCFG_PALETTE_ADD(_tag, 8) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_3bit_bgr), downcast<palette_device *>(device)));
-
-// 15-bit palettes
-#define MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB(_tag) \
- MCFG_PALETTE_ADD(_tag, 32768) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_RRRRRGGGGGBBBBB), downcast<palette_device *>(device)));
-
-// 16-bit palettes
-#define MCFG_PALETTE_ADD_BBBBBGGGGGRRRRR(_tag) \
- MCFG_PALETTE_ADD(_tag, 32768) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_BBBBBGGGGGRRRRR), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_RRRRRGGGGGGBBBBB(_tag) \
- MCFG_PALETTE_ADD(_tag, 65536) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_RRRRRGGGGGGBBBBB), downcast<palette_device *>(device)));
-
-#define MCFG_PALETTE_ADD_BBBBBGGGGGGRRRRR(_tag) \
- MCFG_PALETTE_ADD(_tag, 65536) \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_BBBBBGGGGGGRRRRR), downcast<palette_device *>(device)));
-
-
-// other standard palettes
-#define MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS(_tag, _region, _entries) \
- MCFG_PALETTE_ADD(_tag, _entries) \
- downcast<palette_device &>(*device).set_prom_region(_region); \
- downcast<palette_device &>(*device).set_init(palette_init_delegate(FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms), downcast<palette_device *>(device)));
// not implemented yet
#if 0
@@ -293,14 +147,16 @@ typedef device_delegate<void (palette_device &)> palette_init_delegate;
class raw_to_rgb_converter
{
+public:
// helper function
typedef rgb_t (*raw_to_rgb_func)(u32 raw);
-public:
// constructor
- raw_to_rgb_converter(int bytes_per_entry = 0, raw_to_rgb_func func = nullptr)
- : m_bytes_per_entry(bytes_per_entry),
- m_func(func) { }
+ raw_to_rgb_converter() { }
+ raw_to_rgb_converter(int bytes_per_entry, raw_to_rgb_func func)
+ : m_bytes_per_entry(bytes_per_entry)
+ , m_func(func)
+ { }
// getters
int bytes_per_entry() const { return m_bytes_per_entry; }
@@ -344,11 +200,10 @@ public:
static rgb_t xRGBRRRRGGGGBBBB_bit0_decoder(u32 raw); // bits 14/13/12 are LSb
static rgb_t xRGBRRRRGGGGBBBB_bit4_decoder(u32 raw); // bits 14/13/12 are MSb
-
private:
// internal data
- int m_bytes_per_entry;
- raw_to_rgb_func m_func;
+ int m_bytes_per_entry = 0;
+ raw_to_rgb_func m_func = nullptr;
};
@@ -360,29 +215,189 @@ DECLARE_DEVICE_TYPE(PALETTE, palette_device)
class palette_device : public device_t, public device_palette_interface
{
public:
+ typedef device_delegate<void (palette_device &)> init_delegate;
+
+ // black-fill on start
+ enum black_t { BLACK };
+
+ // monochrome
+ enum mono_t { MONOCHROME };
+ enum mono_inv_t { MONOCHROME_INVERTED };
+ enum mono_hi_t { MONOCHROME_HIGHLIGHT };
+
+ // 3-bit (8-colour) - components here are LSB to MSB
+ enum rgb_3b_t { RGB_3BIT };
+ enum rbg_3b_t { RBG_3BIT };
+ enum grb_3b_t { GRB_3BIT };
+ enum gbr_3b_t { GBR_3BIT };
+ enum brg_3b_t { BRG_3BIT };
+ enum bgr_3b_t { BGR_3BIT };
+
+ // 8-bit
+ enum rgb_332_t { RGB_332, RRRGGGBB };
+ enum bgr_233_t { BGR_233, BBGGGRRR };
+ enum rgb_332_inv_t { RGB_332_inverted, RRRGGGBB_inverted };
+ enum bgr_233_inv_t { BGR_233_inverted, BBGGGRRR_inverted };
+
+ // 15-bit
+ enum rgb_555_t { RGB_555, RRRRRGGGGGBBBBB };
+ enum grb_555_t { GRB_555, GGGGGRRRRRBBBBB };
+ enum bgr_555_t { BGR_555, BBBBBGGGGGRRRRR };
+
+ // 16-bit
+ enum xrgb_333_t { xRGB_333, xxxxxxxRRRGGGBBB };
+ enum xrbg_333_t { xRBG_333, xxxxxxxRRRBBBGGG };
+ enum xbgr_333_t { xBGR_333, xxxxxxxBBBGGGRRR };
+ enum xrgb_444_t { xRGB_444, xxxxRRRRGGGGBBBB };
+ enum xrbg_444_t { xRBG_444, xxxxRRRRBBBBGGGG };
+ enum xbrg_444_t { xBRG_444, xxxxBBBBRRRRGGGG };
+ enum xbgr_444_t { xBGR_444, xxxxBBBBGGGGRRRR };
+ enum rgbx_444_t { RGBx_444, RRRRGGGGBBBBxxxx };
+ enum gbrx_444_t { GBRx_444, GGGGBBBBRRRRxxxx };
+ enum irgb_4444_t { IRGB_4444, IIIIRRRRGGGGBBBB };
+ enum rgbi_4444_t { RGBI_4444, RRRRGGGGBBBBIIII };
+ enum xrgb_555_t { xRGB_555, xRRRRRGGGGGBBBBB };
+ enum xgrb_555_t { xGRB_555, xGGGGGRRRRRBBBBB };
+ enum xgbr_555_t { xGBR_555, xGGGGGBBBBBRRRRR };
+ enum xbrg_555_t { xBRG_555, xBBBBBRRRRRGGGGG };
+ enum xbgr_555_t { xBGR_555, xBBBBBGGGGGRRRRR };
+ enum rgbx_555_t { RGBx_555, RRRRRGGGGGBBBBBx };
+ enum grbx_555_t { GRBx_555, GGGGGRRRRRBBBBBx };
+ enum brgx_555_t { BRGx_555, BBBBBRRRRRGGGGGx };
+ enum xrbg_inv_t { xRBG_555_inverted, xRRRRRBBBBBGGGGG_inverted };
+ enum irgb_1555_t { IRGB_1555, IRRRRRGGGGGBBBBB };
+ enum rgb_565_t { RGB_565, RRRRRGGGGGGBBBBB };
+ enum bgr_565_t { BGR_565, BBBBBGGGGGGBBBBB };
+
+ // 32-bit
+ enum xrgb_888_t { xRGB_888 };
+ enum xgrb_888_t { xGRB_888 };
+ enum xbrg_888_t { xBRG_888 };
+ enum xbgr_888_t { xBGR_888 };
+ enum rgbx_888_t { RGBx_888 };
+ enum grbx_888_t { GRBx_888 };
+ enum bgrx_888_t { BGRx_888 };
+
+ // other standard formats
+ enum rgb_444_prom_t { RGB_444_PROMS, RRRRGGGGBBBB_PROMS };
+
+ // exotic formats
+ enum rrrrggggbbbbrgbx_t { RRRRGGGGBBBBRGBx };
+
// construction/destruction
- palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 entries);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, init_delegate &&init, u32 entries = 0U, u32 indirect = 0U);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, black_t, u32 entries = 0U);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_inv_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, mono_hi_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rbg_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, grb_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, gbr_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, brg_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_3b_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_555_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, grb_555_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_555_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_565_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_565_t);
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+
+ template <typename T>
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_444_prom_t, T &&region, u32 entries)
+ : palette_device(mconfig, tag, owner, init_delegate(FUNC(palette_device::palette_init_rgb_444_proms), this), entries)
+ {
+ set_prom_region(std::forward<T>(region));
+ }
+
+ // FIXME: these should be aware of current device for resolving the tag
+ template <class FunctionClass>
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, void (FunctionClass::*init)(palette_device &), const char *name, u32 entries = 0U, u32 indirect = 0U)
+ : palette_device(mconfig, tag, owner, init_delegate(init, name, nullptr, static_cast<FunctionClass *>(nullptr)), entries, indirect)
+ { }
+ template <class FunctionClass>
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, void (FunctionClass::*init)(palette_device &) const, const char *name, u32 entries = 0U, u32 indirect = 0U)
+ : palette_device(mconfig, tag, owner, init_delegate(init, name, nullptr, static_cast<FunctionClass *>(nullptr)), entries, indirect)
+ { }
+ template <class FunctionClass>
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *devname, void (FunctionClass::*init)(palette_device &), const char *name, u32 entries = 0U, u32 indirect = 0U)
+ : palette_device(mconfig, tag, owner, init_delegate(init, name, devname, static_cast<FunctionClass *>(nullptr)), entries, indirect)
+ { }
+ template <class FunctionClass>
+ palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *devname, void (FunctionClass::*init)(palette_device &) const, const char *name, u32 entries = 0U, u32 indirect = 0U)
+ : palette_device(mconfig, tag, owner, init_delegate(init, name, devname, static_cast<FunctionClass *>(nullptr)), entries, indirect)
+ { }
// configuration
template <typename Object> void set_init(Object &&init) { m_init = std::forward<Object>(init); }
- void set_init(palette_init_delegate callback) { m_init = callback; }
- template <class FunctionClass> void set_init(const char *devname, void (FunctionClass::*callback)(palette_device &), const char *name)
+ palette_device &set_format(raw_to_rgb_converter raw_to_rgb) { m_raw_to_rgb = raw_to_rgb; return *this; }
+ palette_device &set_format(int bytes_per_entry, raw_to_rgb_converter::raw_to_rgb_func func, u32 entries);
+ palette_device &set_format(rgb_332_t, u32 entries);
+ palette_device &set_format(bgr_233_t, u32 entries);
+ palette_device &set_format(rgb_332_inv_t, u32 entries);
+ palette_device &set_format(bgr_233_inv_t, u32 entries);
+ palette_device &set_format(xrgb_333_t, u32 entries);
+ palette_device &set_format(xrbg_333_t, u32 entries);
+ palette_device &set_format(xbgr_333_t, u32 entries);
+ palette_device &set_format(xrgb_444_t, u32 entries);
+ palette_device &set_format(xrbg_444_t, u32 entries);
+ palette_device &set_format(xbrg_444_t, u32 entries);
+ palette_device &set_format(xbgr_444_t, u32 entries);
+ palette_device &set_format(rgbx_444_t, u32 entries);
+ palette_device &set_format(gbrx_444_t, u32 entries);
+ palette_device &set_format(irgb_4444_t, u32 entries);
+ palette_device &set_format(rgbi_4444_t, u32 entries);
+ palette_device &set_format(xrgb_555_t, u32 entries);
+ palette_device &set_format(xgrb_555_t, u32 entries);
+ palette_device &set_format(xgbr_555_t, u32 entries);
+ palette_device &set_format(xbrg_555_t, u32 entries);
+ palette_device &set_format(xbgr_555_t, u32 entries);
+ palette_device &set_format(rgbx_555_t, u32 entries);
+ palette_device &set_format(grbx_555_t, u32 entries);
+ palette_device &set_format(brgx_555_t, u32 entries);
+ palette_device &set_format(xrbg_inv_t, u32 entries);
+ palette_device &set_format(irgb_1555_t, u32 entries);
+ palette_device &set_format(rgb_565_t, u32 entries);
+ palette_device &set_format(bgr_565_t, u32 entries);
+ palette_device &set_format(xrgb_888_t, u32 entries);
+ palette_device &set_format(xgrb_888_t, u32 entries);
+ palette_device &set_format(xbrg_888_t, u32 entries);
+ palette_device &set_format(xbgr_888_t, u32 entries);
+ palette_device &set_format(rgbx_888_t, u32 entries);
+ palette_device &set_format(grbx_888_t, u32 entries);
+ palette_device &set_format(bgrx_888_t, u32 entries);
+ palette_device &set_format(rrrrggggbbbbrgbx_t, u32 entries);
+ template <typename T> palette_device &set_format(T x, u32 entries, u32 indirect) { set_format(x, entries); set_indirect_entries(indirect); return *this; }
+ palette_device &set_membits(int membits) { m_membits = membits; m_membits_supplied = true; return *this; }
+ palette_device &set_endianness(endianness_t endianness) { m_endianness = endianness; m_endianness_supplied = true; return *this; }
+ palette_device &set_entries(u32 entries) { m_entries = entries; return *this; }
+ palette_device &set_entries(u32 entries, u32 indirect) { m_entries = entries; m_indirect_entries = indirect; return *this; }
+ palette_device &set_indirect_entries(u32 entries) { m_indirect_entries = entries; return *this; }
+ palette_device &enable_shadows() { m_enable_shadows = true; return *this; }
+ palette_device &enable_hilights() { m_enable_hilights = true; return *this; }
+ template <typename T> palette_device &set_prom_region(T &&region) { m_prom_region.set_tag(std::forward<T>(region)); return *this; }
+
+ // FIXME: these should be aware of current device for resolving the tag
+ template <class FunctionClass>
+ void set_init(void (FunctionClass::*init)(palette_device &), const char *name)
{
- set_init(palette_init_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ m_init = init_delegate(init, name, nullptr, static_cast<FunctionClass *>(nullptr));
}
- template <class FunctionClass> void set_init(void (FunctionClass::*callback)(palette_device &), const char *name)
+ template <class FunctionClass>
+ void set_init(void (FunctionClass::*init)(palette_device &) const, const char *name)
{
- set_init(palette_init_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ m_init = init_delegate(init, name, nullptr, static_cast<FunctionClass *>(nullptr));
+ }
+ template <class FunctionClass>
+ void set_init(const char *devname, void (FunctionClass::*init)(palette_device &), const char *name)
+ {
+ m_init = init_delegate(init, name, devname, static_cast<FunctionClass *>(nullptr));
+ }
+ template <class FunctionClass>
+ void set_init(const char *devname, void (FunctionClass::*init)(palette_device &) const, const char *name)
+ {
+ m_init = init_delegate(init, name, devname, static_cast<FunctionClass *>(nullptr));
}
-
- void set_format(raw_to_rgb_converter raw_to_rgb) { m_raw_to_rgb = raw_to_rgb; }
- void set_membits(int membits) { m_membits = membits; m_membits_supplied = true; }
- void set_endianness(endianness_t endianness) { m_endianness = endianness; m_endianness_supplied = true; }
- void set_entries(u32 entries) { m_entries = entries; }
- void set_indirect_entries(u32 entries) { m_indirect_entries = entries; }
- void enable_shadows() { m_enable_shadows = true; }
- void enable_hilights() { m_enable_hilights = true; }
- void set_prom_region(const char *region) { m_prom_region.set_tag(region); }
// palette RAM accessors
memory_array &basemem() { return m_paletteram; }
@@ -411,23 +426,6 @@ public:
DECLARE_READ32_MEMBER(read32);
DECLARE_WRITE32_MEMBER(write32);
- // generic palette init routines
- void palette_init_all_black(palette_device &palette);
- void palette_init_monochrome(palette_device &palette);
- void palette_init_monochrome_inverted(palette_device &palette);
- void palette_init_monochrome_highlight(palette_device &palette);
- void palette_init_3bit_rgb(palette_device &palette);
- void palette_init_3bit_rbg(palette_device &palette);
- void palette_init_3bit_brg(palette_device &palette);
- void palette_init_3bit_grb(palette_device &palette);
- void palette_init_3bit_gbr(palette_device &palette);
- void palette_init_3bit_bgr(palette_device &palette);
- void palette_init_RRRRGGGGBBBB_proms(palette_device &palette);
- void palette_init_RRRRRGGGGGBBBBB(palette_device &palette);
- void palette_init_BBBBBGGGGGRRRRR(palette_device &palette);
- void palette_init_RRRRRGGGGGGBBBBB(palette_device &palette);
- void palette_init_BBBBBGGGGGGRRRRR(palette_device &palette);
-
// helper to update palette when data changed
void update() { if (!m_init.isnull()) m_init(*this); }
@@ -441,6 +439,24 @@ protected:
virtual bool palette_shadows_enabled() const override { return m_enable_shadows; }
virtual bool palette_hilights_enabled() const override { return m_enable_hilights; }
+ // generic palette init routines
+ void palette_init_all_black(palette_device &palette);
+ void palette_init_monochrome(palette_device &palette);
+ void palette_init_monochrome_inverted(palette_device &palette);
+ void palette_init_monochrome_highlight(palette_device &palette);
+ void palette_init_3bit_rgb(palette_device &palette);
+ void palette_init_3bit_rbg(palette_device &palette);
+ void palette_init_3bit_brg(palette_device &palette);
+ void palette_init_3bit_grb(palette_device &palette);
+ void palette_init_3bit_gbr(palette_device &palette);
+ void palette_init_3bit_bgr(palette_device &palette);
+ void palette_init_rgb_444_proms(palette_device &palette);
+ void palette_init_rgb_555(palette_device &palette);
+ void palette_init_grb_555(palette_device &palette);
+ void palette_init_bgr_555(palette_device &palette);
+ void palette_init_rgb_565(palette_device &palette);
+ void palette_init_bgr_565(palette_device &palette);
+
private:
void update_for_write(offs_t byte_offset, int bytes_modified, bool indirect = false);
@@ -454,7 +470,7 @@ private:
endianness_t m_endianness; // endianness of palette RAM, if different from native
bool m_endianness_supplied; // true if endianness forced in static config
optional_memory_region m_prom_region; // region where the color PROMs are
- palette_init_delegate m_init;
+ init_delegate m_init;
// palette RAM
raw_to_rgb_converter m_raw_to_rgb; // format of palette RAM
diff --git a/src/emu/video/resnet.h b/src/emu/video/resnet.h
index 4222200be4b..e3f8ad78a68 100644
--- a/src/emu/video/resnet.h
+++ b/src/emu/video/resnet.h
@@ -161,11 +161,27 @@ void compute_res_net_all(std::vector<rgb_t> &rgb, const u8 *prom, const res_net_
/* legacy interface */
+namespace emu { namespace detail {
+
+template <std::size_t I, typename T, std::size_t N, typename U>
+constexpr auto combine_weights(T const (&tab)[N], U w) { return tab[I] * w; }
+
+template <std::size_t I, typename T, std::size_t N, typename U, typename... V>
+constexpr auto combine_weights(T const (&tab)[N], U w0, V... w) { return (tab[I] * w0) + combine_weights<I + 1>(tab, w...); }
+
+} } // namespace emu::detail
+
double compute_resistor_weights(
- int minval, int maxval, double scaler,
- int count_1, const int * resistances_1, double * weights_1, int pulldown_1, int pullup_1,
- int count_2, const int * resistances_2, double * weights_2, int pulldown_2, int pullup_2,
- int count_3, const int * resistances_3, double * weights_3, int pulldown_3, int pullup_3 );
+ int minval, int maxval, double scaler,
+ int count_1, const int * resistances_1, double * weights_1, int pulldown_1, int pullup_1,
+ int count_2, const int * resistances_2, double * weights_2, int pulldown_2, int pullup_2,
+ int count_3, const int * resistances_3, double * weights_3, int pulldown_3, int pullup_3);
+
+template <typename T, std::size_t N, typename... U>
+constexpr int combine_weights(T const (&tab)[N], U... w)
+{
+ return int(emu::detail::combine_weights<0U>(tab, w...) + 0.5);
+}
#define combine_8_weights(tab,w0,w1,w2,w3,w4,w5,w6,w7) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4) + (tab)[5]*(w5) + (tab)[6]*(w6) + (tab)[7]*(w7)) + 0.5))
#define combine_7_weights(tab,w0,w1,w2,w3,w4,w5,w6) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4) + (tab)[5]*(w5) + (tab)[6]*(w6)) + 0.5))
diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h
index e4b870ed06d..8110f58f265 100644
--- a/src/lib/util/delegate.h
+++ b/src/lib/util/delegate.h
@@ -72,7 +72,6 @@
* only works for GCC (for now; MSVC info is also readily available)
***************************************************************************/
-
#ifndef MAME_UTIL_DELEGATE_H
#define MAME_UTIL_DELEGATE_H
@@ -164,7 +163,8 @@ class binding_type_exception : public std::exception
{
public:
binding_type_exception(const std::type_info &target_type, const std::type_info &actual_type)
- : m_target_type(target_type), m_actual_type(actual_type) { }
+ : m_target_type(target_type), m_actual_type(actual_type)
+ { }
const std::type_info &m_target_type;
const std::type_info &m_actual_type;
};
@@ -175,13 +175,13 @@ public:
// delegate_traits is a meta-template that is used to provide a static function pointer
// and member function pointer of the appropriate type and number of parameters
-template<typename _ClassType, typename _ReturnType, typename... Params>
+template <typename ClassType, typename ReturnType, typename... Params>
struct delegate_traits
{
- using static_func_type = _ReturnType(*)(_ClassType *, Params...);
- using static_ref_func_type = _ReturnType(*)(_ClassType &, Params...);
- using member_func_type = _ReturnType(_ClassType::*)(Params...);
- using const_member_func_type = _ReturnType(_ClassType::*)(Params...) const;
+ using static_func_type = ReturnType (*)(ClassType *, Params...);
+ using static_ref_func_type = ReturnType (*)(ClassType &, Params...);
+ using member_func_type = ReturnType (ClassType::*)(Params...);
+ using const_member_func_type = ReturnType (ClassType::*)(Params...) const;
};
@@ -203,25 +203,27 @@ class delegate_mfp
public:
// default constructor
delegate_mfp()
- : m_rawdata(s_null_mfp),
- m_realobject(nullptr),
- m_stubfunction(nullptr) { }
+ : m_rawdata(s_null_mfp)
+ , m_realobject(nullptr)
+ , m_stubfunction(nullptr)
+ { }
// copy constructor
delegate_mfp(const delegate_mfp &src)
- : m_rawdata(src.m_rawdata),
- m_realobject(src.m_realobject),
- m_stubfunction(src.m_stubfunction) { }
+ : m_rawdata(src.m_rawdata)
+ , m_realobject(src.m_realobject)
+ , m_stubfunction(src.m_stubfunction)
+ { }
// construct from any member function pointer
- template<typename _MemberFunctionType, class _MemberFunctionClass, typename _ReturnType, typename _StaticFunctionType>
- delegate_mfp(_MemberFunctionType mfp, _MemberFunctionClass *, _ReturnType *, _StaticFunctionType)
- : m_rawdata(s_null_mfp),
- m_realobject(nullptr),
- m_stubfunction(make_generic<_StaticFunctionType>(&delegate_mfp::method_stub<_MemberFunctionClass, _ReturnType>))
+ template <typename MemberFunctionType, class MemberFunctionClass, typename ReturnType, typename StaticFunctionType>
+ delegate_mfp(MemberFunctionType mfp, MemberFunctionClass *, ReturnType *, StaticFunctionType)
+ : m_rawdata(s_null_mfp)
+ , m_realobject(nullptr)
+ , m_stubfunction(make_generic<StaticFunctionType>(&delegate_mfp::method_stub<MemberFunctionClass, ReturnType>))
{
assert(sizeof(mfp) <= sizeof(m_rawdata));
- *reinterpret_cast<_MemberFunctionType *>(&m_rawdata) = mfp;
+ *reinterpret_cast<MemberFunctionType *>(&m_rawdata) = mfp;
}
// comparison helpers
@@ -232,30 +234,30 @@ public:
delegate_generic_class *real_object(delegate_generic_class *original) const { return m_realobject; }
// binding helper
- template<typename _FunctionType>
- void update_after_bind(_FunctionType &funcptr, delegate_generic_class *&object)
+ template <typename FunctionType>
+ void update_after_bind(FunctionType &funcptr, delegate_generic_class *&object)
{
m_realobject = object;
object = reinterpret_cast<delegate_generic_class *>(this);
- funcptr = reinterpret_cast<_FunctionType>(m_stubfunction);
+ funcptr = reinterpret_cast<FunctionType>(m_stubfunction);
}
private:
// helper stubs for calling encased member function pointers
- template<class _FunctionClass, typename _ReturnType, typename... Params>
- static _ReturnType method_stub(delegate_generic_class *object, Params ... args)
+ template <class FunctionClass, typename ReturnType, typename... Params>
+ static ReturnType method_stub(delegate_generic_class *object, Params ... args)
{
delegate_mfp *_this = reinterpret_cast<delegate_mfp *>(object);
- using mfptype = _ReturnType(_FunctionClass::*)(Params...);
+ using mfptype = ReturnType(FunctionClass::*)(Params...);
mfptype &mfp = *reinterpret_cast<mfptype *>(&_this->m_rawdata);
- return (reinterpret_cast<_FunctionClass *>(_this->m_realobject)->*mfp)(std::forward<Params>(args)...);
+ return (reinterpret_cast<FunctionClass *>(_this->m_realobject)->*mfp)(std::forward<Params>(args)...);
}
// helper to convert a function of a given type to a generic function, forcing template
// instantiation to match the source type
- template <typename _SourceType>
- static delegate_generic_function make_generic(_SourceType funcptr)
+ template <typename SourceType>
+ static delegate_generic_function make_generic(SourceType funcptr)
{
return reinterpret_cast<delegate_generic_function>(funcptr);
}
@@ -263,7 +265,7 @@ private:
struct raw_mfp_data
{
-#if defined (__INTEL_COMPILER) && defined (_M_X64) // needed for "Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.176 Build 20140130" at least
+#if defined(__INTEL_COMPILER) && defined(_M_X64) // needed for "Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.176 Build 20140130" at least
int data[((sizeof(void *) + 4 * sizeof(int)) + (sizeof(int) - 1)) / sizeof(int)];
#else // all other cases - for MSVC maximum size is one pointer, plus 3 ints; all other implementations seem to be smaller
int data[((sizeof(void *) + 3 * sizeof(int)) + (sizeof(int) - 1)) / sizeof(int)];
@@ -288,20 +290,22 @@ class delegate_mfp
public:
// default constructor
delegate_mfp()
- : m_function(0),
- m_this_delta(0) { }
+ : m_function(0)
+ , m_this_delta(0)
+ { }
// copy constructor
delegate_mfp(const delegate_mfp &src)
- : m_function(src.m_function),
- m_this_delta(src.m_this_delta) { }
+ : m_function(src.m_function)
+ , m_this_delta(src.m_this_delta)
+ { }
// construct from any member function pointer
- template<typename _MemberFunctionType, class _MemberFunctionClass, typename _ReturnType, typename _StaticFunctionType>
- delegate_mfp(_MemberFunctionType mfp, _MemberFunctionClass *, _ReturnType *, _StaticFunctionType)
+ template <typename MemberFunctionType, class MemberFunctionClass, typename ReturnType, typename StaticFunctionType>
+ delegate_mfp(MemberFunctionType mfp, MemberFunctionClass *, ReturnType *, StaticFunctionType)
{
assert(sizeof(mfp) == sizeof(*this));
- *reinterpret_cast<_MemberFunctionType *>(this) = mfp;
+ *reinterpret_cast<MemberFunctionType *>(this) = mfp;
}
// comparison helpers
@@ -312,10 +316,10 @@ public:
static delegate_generic_class *real_object(delegate_generic_class *original) { return original; }
// binding helper
- template<typename _FunctionType>
- void update_after_bind(_FunctionType &funcptr, delegate_generic_class *&object)
+ template <typename FunctionType>
+ void update_after_bind(FunctionType &funcptr, delegate_generic_class *&object)
{
- funcptr = reinterpret_cast<_FunctionType>(convert_to_generic(object));
+ funcptr = reinterpret_cast<FunctionType>(convert_to_generic(object));
}
private:
@@ -351,12 +355,12 @@ public:
}
// construct from any member function pointer
- template<typename _MemberFunctionType, class _MemberFunctionClass, typename _ReturnType, typename _StaticFunctionType>
- delegate_mfp(_MemberFunctionType mfp, _MemberFunctionClass *, _ReturnType *, _StaticFunctionType)
+ template <typename MemberFunctionType, class MemberFunctionClass, typename ReturnType, typename StaticFunctionType>
+ delegate_mfp(MemberFunctionType mfp, MemberFunctionClass *, ReturnType *, StaticFunctionType)
{
//assert(sizeof(mfp) == 12 || sizeof(mfp) == 16);
m_size = sizeof(mfp);
- *reinterpret_cast<_MemberFunctionType *>(this) = mfp;
+ *reinterpret_cast<MemberFunctionType *>(this) = mfp;
}
// comparison helpers
@@ -367,10 +371,10 @@ public:
static delegate_generic_class *real_object(delegate_generic_class *original) { return original; }
// binding helper
- template<typename _FunctionType>
- void update_after_bind(_FunctionType &funcptr, delegate_generic_class *&object)
+ template <typename FunctionType>
+ void update_after_bind(FunctionType &funcptr, delegate_generic_class *&object)
{
- funcptr = reinterpret_cast<_FunctionType>(m_function);
+ funcptr = reinterpret_cast<FunctionType>(m_function);
if (m_size == SINGLE_MEMFUNCPTR_SIZE + sizeof(int))
object = reinterpret_cast<delegate_generic_class *>(reinterpret_cast<std::uint8_t *>(object) + m_this_delta);
}
@@ -402,112 +406,94 @@ private:
// ======================> delegate_base
// general delegate class template supporting up to 5 parameters
-template<typename _ReturnType, typename... Params>
+template <typename ReturnType, typename... Params>
class delegate_base
{
public:
// define our traits
- template<class _FunctionClass>
- struct traits
- {
- using member_func_type = typename delegate_traits<_FunctionClass, _ReturnType, Params...>::member_func_type;
- using const_member_func_type = typename delegate_traits<_FunctionClass, _ReturnType, Params...>::const_member_func_type;
- using static_func_type = typename delegate_traits<_FunctionClass, _ReturnType, Params...>::static_func_type;
- using static_ref_func_type = typename delegate_traits<_FunctionClass, _ReturnType, Params...>::static_ref_func_type;
- };
- using functional_type = std::function<_ReturnType(Params...)>;
+ template <class FunctionClass> using traits = delegate_traits<FunctionClass, ReturnType, Params...>;
+ using functional_type = std::function<ReturnType (Params...)>;
using generic_static_func = typename traits<delegate_generic_class>::static_func_type;
typedef MEMBER_ABI generic_static_func generic_member_func;
+
// generic constructor
delegate_base()
- : m_function(nullptr),
- m_object(nullptr),
- m_latebinder(nullptr),
- m_raw_function(nullptr),
- m_std_func(nullptr){ }
+ : m_function(nullptr)
+ , m_object(nullptr)
+ , m_latebinder(nullptr)
+ , m_raw_function(nullptr)
+ , m_std_func(nullptr)
+ { }
// copy constructor
delegate_base(const delegate_base &src)
- : m_function(src.m_function),
- m_object(nullptr),
- m_latebinder(src.m_latebinder),
- m_raw_function(src.m_raw_function),
- m_raw_mfp(src.m_raw_mfp),
- m_std_func(src.m_std_func)
+ : m_function(src.m_function)
+ , m_object(nullptr)
+ , m_latebinder(src.m_latebinder)
+ , m_raw_function(src.m_raw_function)
+ , m_raw_mfp(src.m_raw_mfp)
+ , m_std_func(src.m_std_func)
{
bind(src.object());
}
// copy constructor with late bind
delegate_base(const delegate_base &src, delegate_late_bind &object)
- : m_function(src.m_function),
- m_object(nullptr),
- m_latebinder(src.m_latebinder),
- m_raw_function(src.m_raw_function),
- m_raw_mfp(src.m_raw_mfp),
- m_std_func(src.m_std_func)
+ : m_function(src.m_function)
+ , m_object(nullptr)
+ , m_latebinder(src.m_latebinder)
+ , m_raw_function(src.m_raw_function)
+ , m_raw_mfp(src.m_raw_mfp)
+ , m_std_func(src.m_std_func)
{
late_bind(object);
}
// construct from member function with object pointer
- template<class _FunctionClass>
- delegate_base(typename traits<_FunctionClass>::member_func_type funcptr, _FunctionClass *object)
- : m_function(nullptr),
- m_object(nullptr),
- m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(nullptr),
- m_raw_mfp(funcptr, object, static_cast<_ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr)),
- m_std_func(nullptr)
- {
- bind(reinterpret_cast<delegate_generic_class *>(object));
- }
-
- template<class _FunctionClass>
- delegate_base(typename traits<_FunctionClass>::const_member_func_type funcptr, _FunctionClass *object)
- : m_function(nullptr),
- m_object(nullptr),
- m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(nullptr),
- m_raw_mfp(funcptr, object, static_cast<_ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr)),
- m_std_func(nullptr)
+ template <class FunctionClass>
+ delegate_base(typename traits<FunctionClass>::member_func_type funcptr, FunctionClass *object)
+ : m_function(nullptr)
+ , m_object(nullptr)
+ , m_latebinder(&late_bind_helper<FunctionClass>)
+ , m_raw_function(nullptr)
+ , m_raw_mfp(funcptr, object, static_cast<ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr))
+ , m_std_func(nullptr)
{
bind(reinterpret_cast<delegate_generic_class *>(object));
}
- // construct from static function with object pointer
- template<class _FunctionClass>
- delegate_base(typename traits<_FunctionClass>::static_func_type funcptr, _FunctionClass *object)
- : m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(nullptr),
- m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_std_func(nullptr)
+ template <class FunctionClass>
+ delegate_base(typename traits<FunctionClass>::const_member_func_type funcptr, FunctionClass *object)
+ : m_function(nullptr)
+ , m_object(nullptr)
+ , m_latebinder(&late_bind_helper<FunctionClass>)
+ , m_raw_function(nullptr)
+ , m_raw_mfp(funcptr, object, static_cast<ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr))
+ , m_std_func(nullptr)
{
bind(reinterpret_cast<delegate_generic_class *>(object));
}
// construct from static reference function with object reference
- template<class _FunctionClass>
- delegate_base(typename traits<_FunctionClass>::static_ref_func_type funcptr, _FunctionClass *object)
- : m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(nullptr),
- m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_std_func(nullptr)
+ template <class FunctionClass>
+ delegate_base(typename traits<FunctionClass>::static_ref_func_type funcptr, FunctionClass *object)
+ : m_function(reinterpret_cast<generic_static_func>(funcptr))
+ , m_object(nullptr)
+ , m_latebinder(&late_bind_helper<FunctionClass>)
+ , m_raw_function(reinterpret_cast<generic_static_func>(funcptr))
+ , m_std_func(nullptr)
{
bind(reinterpret_cast<delegate_generic_class *>(object));
}
// construct from static reference function with object reference
delegate_base(functional_type funcptr)
- : m_function(nullptr),
- m_object(nullptr),
- m_latebinder(nullptr),
- m_raw_function(nullptr),
- m_std_func(funcptr)
+ : m_function(nullptr)
+ , m_object(nullptr)
+ , m_latebinder(nullptr)
+ , m_raw_function(nullptr)
+ , m_std_func(funcptr)
{
-
}
// copy operator
@@ -535,7 +521,8 @@ public:
// call the function
- _ReturnType operator()(Params... args) const {
+ ReturnType operator()(Params... args) const
+ {
if (is_mfp() && (HAS_DIFFERENT_ABI))
return (*reinterpret_cast<generic_member_func>(m_function)) (m_object, std::forward<Params>(args)...);
else if (m_std_func)
@@ -562,13 +549,13 @@ protected:
using late_bind_func = delegate_generic_class*(*)(delegate_late_bind &object);
// late binding helper
- template<class _FunctionClass>
+ template <class FunctionClass>
static delegate_generic_class *late_bind_helper(delegate_late_bind &object)
{
- _FunctionClass *result = dynamic_cast<_FunctionClass *>(&object);
- if (result == nullptr) {
- throw binding_type_exception(typeid(_FunctionClass), typeid(object));
- }
+ FunctionClass *result = dynamic_cast<FunctionClass *>(&object);
+ if (!result)
+ throw binding_type_exception(typeid(FunctionClass), typeid(object));
+
return reinterpret_cast<delegate_generic_class *>(result);
}
@@ -601,21 +588,20 @@ protected:
template <typename Signature>
class delegate;
-template<typename _ReturnType, typename... Params>
-class delegate<_ReturnType (Params...)> : public delegate_base<_ReturnType, Params...>
+template <typename ReturnType, typename... Params>
+class delegate<ReturnType (Params...)> : public delegate_base<ReturnType, Params...>
{
- using basetype = delegate_base<_ReturnType, Params...>;
+ using basetype = delegate_base<ReturnType, Params...>;
public:
// create a standard set of constructors
delegate() : basetype() { }
explicit delegate(const basetype &src) : basetype(src) { }
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
- template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { }
- template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { }
- explicit delegate(std::function<_ReturnType(Params...)> funcptr) : basetype(funcptr) { }
- template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { }
- template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr,_FunctionClass *object) : basetype(funcptr, object) { }
+ template <class FunctionClass> delegate(typename basetype::template traits<FunctionClass>::member_func_type funcptr, FunctionClass *object) : basetype(funcptr, object) { }
+ template <class FunctionClass> delegate(typename basetype::template traits<FunctionClass>::const_member_func_type funcptr, FunctionClass *object) : basetype(funcptr, object) { }
+ explicit delegate(std::function<ReturnType (Params...)> funcptr) : basetype(funcptr) { }
+ template <class FunctionClass> delegate(typename basetype::template traits<FunctionClass>::static_ref_func_type funcptr, FunctionClass *object) : basetype(funcptr, object) { }
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
};
diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp
index c35f9baee7a..a063ee16ef9 100644
--- a/src/mame/drivers/1942.cpp
+++ b/src/mame/drivers/1942.cpp
@@ -578,9 +578,7 @@ MACHINE_CONFIG_START(_1942_state::_1942)
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942)
- MCFG_PALETTE_ADD(m_palette, 64*4+4*32*8+16*16)
- MCFG_PALETTE_INDIRECT_ENTRIES(256)
- MCFG_PALETTE_INIT_OWNER(_1942_state, 1942)
+ PALETTE(config, m_palette, FUNC(_1942_state::_1942_palette), 64*4+4*32*8+16*16, 256);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
@@ -634,7 +632,7 @@ MACHINE_CONFIG_START(_1942p_state::_1942p)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CPU_CLOCK_1942P) /* 4 MHz - verified on PCB */
MCFG_DEVICE_PROGRAM_MAP(_1942p_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", _1942p_state, irq0_line_hold) // note, powerups won't move down the screen with the original '1942' logic.
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", _1942p_state, irq0_line_hold) // note, powerups won't move down the screen with the original '1942' logic.
MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_CPU_CLOCK_1942P) /* 4 MHz - verified on PCB */
MCFG_DEVICE_PROGRAM_MAP(_1942p_sound_map)
@@ -645,9 +643,7 @@ MACHINE_CONFIG_START(_1942p_state::_1942p)
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942p)
- MCFG_PALETTE_ADD(m_palette, 0x500)
- MCFG_PALETTE_INDIRECT_ENTRIES(0x400)
- MCFG_PALETTE_INIT_OWNER(_1942p_state, 1942p)
+ PALETTE(config, m_palette, FUNC(_1942p_state::_1942p_palette), 0x500, 0x400);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp
index ac1fdc84a1c..f404a87765e 100644
--- a/src/mame/drivers/1943.cpp
+++ b/src/mame/drivers/1943.cpp
@@ -331,12 +331,10 @@ MACHINE_CONFIG_START(_1943_state::_1943)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(_1943_state, screen_update_1943)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1943)
- MCFG_PALETTE_ADD("palette", 32*4+16*16+16*16+16*16)
- MCFG_PALETTE_INDIRECT_ENTRIES(256)
- MCFG_PALETTE_INIT_OWNER(_1943_state, 1943)
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_1943)
+ PALETTE(config, m_palette, FUNC(_1943_state::_1943_palette), 32*4+16*16+16*16+16*16, 256);
// sound hardware
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/1945kiii.cpp b/src/mame/drivers/1945kiii.cpp
index 8c7fe4800d5..be0168b7b0e 100644
--- a/src/mame/drivers/1945kiii.cpp
+++ b/src/mame/drivers/1945kiii.cpp
@@ -380,7 +380,7 @@ void k3_state::flagrall(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &k3_state::flagrall_map);
m_maincpu->set_vblank_int("screen", FUNC(k3_state::irq4_line_hold));
- GFXDECODE(config, m_gfxdecode, "palette", gfx_1945kiii);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_1945kiii);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
@@ -388,9 +388,9 @@ void k3_state::flagrall(machine_config &config)
m_screen->set_size(64*8, 32*8);
m_screen->set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
m_screen->set_screen_update(FUNC(k3_state::screen_update));
- m_screen->set_palette("palette");
+ m_screen->set_palette(m_palette);
- PALETTE(config, m_palette, 0x200).set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x200);
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/2mindril.cpp b/src/mame/drivers/2mindril.cpp
index 639b2c77c80..790b8bd470d 100644
--- a/src/mame/drivers/2mindril.cpp
+++ b/src/mame/drivers/2mindril.cpp
@@ -364,7 +364,7 @@ MACHINE_CONFIG_START(_2mindril_state::drill)
MCFG_DEVICE_PROGRAM_MAP(drill_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", _2mindril_state, drill_vblank_irq)
//MCFG_DEVICE_PERIODIC_INT_DRIVER(_2mindril_state, drill_device_irq, 60)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_2mindril)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_2mindril);
tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0));
tc0510nio.read_0_callback().set_ioport("DSW");
@@ -384,8 +384,7 @@ MACHINE_CONFIG_START(_2mindril_state::drill)
MCFG_SCREEN_UPDATE_DRIVER(_2mindril_state, screen_update_f3)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, _2mindril_state, screen_vblank_f3))
- MCFG_PALETTE_ADD("palette", 0x2000)
- MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx)
+ PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x2000);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/3x3puzzl.cpp b/src/mame/drivers/3x3puzzl.cpp
index 27dafa67738..90cb23b4e5b 100644
--- a/src/mame/drivers/3x3puzzl.cpp
+++ b/src/mame/drivers/3x3puzzl.cpp
@@ -53,14 +53,14 @@ class _3x3puzzle_state : public driver_device
{
public:
_3x3puzzle_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram1(*this, "videoram1"),
- m_videoram2(*this, "videoram2"),
- m_videoram3(*this, "videoram3"),
- m_maincpu(*this, "maincpu"),
- m_oki(*this, "oki"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen")
+ : driver_device(mconfig, type, tag)
+ , m_videoram1(*this, "videoram1")
+ , m_videoram2(*this, "videoram2")
+ , m_videoram3(*this, "videoram3")
+ , m_maincpu(*this, "maincpu")
+ , m_oki(*this, "oki")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
{ }
void _3x3puzzle(machine_config &config);
@@ -403,10 +403,9 @@ MACHINE_CONFIG_START(_3x3puzzle_state::_3x3puzzle)
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_3x3puzzle)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_3x3puzzle);
- MCFG_PALETTE_ADD("palette", 0x600/2)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ PALETTE(config, "palette").set_format(palette_device::xBGR_555, 0x600 / 2);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/40love.cpp b/src/mame/drivers/40love.cpp
index e1fc7b48704..00840d27d24 100644
--- a/src/mame/drivers/40love.cpp
+++ b/src/mame/drivers/40love.cpp
@@ -702,9 +702,7 @@ void fortyl_state::common(machine_config &config)
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_40love);
- PALETTE(config, m_palette, 1024);
- m_palette->set_prom_region("proms");
- m_palette->set_init("palette", FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms));
+ PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 1024);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/4enraya.cpp b/src/mame/drivers/4enraya.cpp
index 6e1fb0695c4..7a05333266f 100644
--- a/src/mame/drivers/4enraya.cpp
+++ b/src/mame/drivers/4enraya.cpp
@@ -485,11 +485,11 @@ MACHINE_CONFIG_START(_4enraya_state::_4enraya )
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(_4enraya_state, screen_update_4enraya)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_4enraya)
- MCFG_PALETTE_ADD_3BIT_RGB("palette")
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/4roses.cpp b/src/mame/drivers/4roses.cpp
index 30c55c598bf..9ec63144db4 100644
--- a/src/mame/drivers/4roses.cpp
+++ b/src/mame/drivers/4roses.cpp
@@ -296,8 +296,8 @@ void rugby_state::rugby_map(address_map &map)
map(0x0e00, 0x0e00).w("crtc", FUNC(mc6845_device::address_w));
map(0x0e01, 0x0e01).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
map(0x2000, 0xffff).rom().region("maincpu", 0x2000);
- map(0x6000, 0x6fff).ram().w(FUNC(_4roses_state::funworld_videoram_w)).share("videoram");
- map(0x7000, 0x7fff).ram().w(FUNC(_4roses_state::funworld_colorram_w)).share("colorram");
+ map(0x6000, 0x6fff).ram().w(FUNC(rugby_state::funworld_videoram_w)).share("videoram");
+ map(0x7000, 0x7fff).ram().w(FUNC(rugby_state::funworld_colorram_w)).share("colorram");
}
READ8_MEMBER(rugby_state::rugby_opcode_r)
@@ -474,9 +474,7 @@ MACHINE_CONFIG_START(_4roses_state::_4roses)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_4roses)
- MCFG_PALETTE_ADD("palette", 0x1000)
- MCFG_PALETTE_INIT_OWNER(_4roses_state,funworld)
- MCFG_VIDEO_START_OVERRIDE(_4roses_state,funworld)
+ PALETTE(config, "palette", FUNC(_4roses_state::funworld_palette), 0x1000);
mc6845_device &crtc(MC6845(config, "crtc", MASTER_CLOCK/8)); /* 2MHz, guess */
crtc.set_screen("screen");
diff --git a/src/mame/drivers/5clown.cpp b/src/mame/drivers/5clown.cpp
index 2a7103f4f64..82097ed930b 100644
--- a/src/mame/drivers/5clown.cpp
+++ b/src/mame/drivers/5clown.cpp
@@ -459,8 +459,8 @@
class _5clown_state : public driver_device
{
public:
- _5clown_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ _5clown_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_ay8910(*this, "ay8910"),
@@ -475,6 +475,10 @@ public:
void init_fclown();
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -507,9 +511,7 @@ private:
DECLARE_READ8_MEMBER(pia1_b_r);
DECLARE_WRITE8_MEMBER(fclown_ay8910_w);
TILE_GET_INFO_MEMBER(get_fclown_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(_5clown);
+ void _5clown_palette(palette_device &palette) const;
uint32_t screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void fcaudio_map(address_map &map);
@@ -578,42 +580,36 @@ uint32_t _5clown_state::screen_update_fclown(screen_device &screen, bitmap_ind16
return 0;
}
-PALETTE_INIT_MEMBER(_5clown_state, _5clown)
+void _5clown_state::_5clown_palette(palette_device &palette) const
{
- const uint8_t *color_prom = memregion("proms")->base();
-/*
- 7654 3210
- ---- ---x RED component.
- ---- --x- GREEN component.
- ---- -x-- BLUE component.
- ---- x--- background killer.
- xxxx ---- unused.
-*/
- int i;
+ /*
+ 7654 3210
+ ---- ---x RED component.
+ ---- --x- GREEN component.
+ ---- -x-- BLUE component.
+ ---- x--- background killer.
+ xxxx ---- unused.
+ */
/* 0000KBGR */
- if (color_prom == nullptr) return;
+ uint8_t const *const color_prom = memregion("proms")->base();
+ if (!color_prom)
+ return;
- for (i = 0;i < m_palette->entries();i++)
+ for (int i = 0; i < m_palette->entries(); i++)
{
- int bit0, bit1, bit2, bit3, r, g, b, bk;
-
- /* background killer */
- bit3 = (color_prom[i] >> 3) & 0x01;
- bk = bit3;
+ // background killer
+ int const bk = BIT(color_prom[i], 3);
- /* red component */
- bit0 = (color_prom[i] >> 0) & 0x01;
- r = (bit0 * 0xff);
+ // red component
+ int const r = BIT(color_prom[i], 0) * 0xff;
- /* green component */
- bit1 = (color_prom[i] >> 1) & 0x01;
- g = (bit1 * 0xff);
+ // green component
+ int const g = BIT(color_prom[i], 1) * 0xff;
- /* blue component */
- bit2 = (color_prom[i] >> 2) & 0x01;
- b = bk * (bit2 * 0xff);
+ // blue component
+ int const b = bk * BIT(color_prom[i], 2) * 0xff;
m_palette->set_pen_color(i, rgb_t(r, g, b));
}
@@ -1053,11 +1049,10 @@ MACHINE_CONFIG_START(_5clown_state::fclown)
MCFG_SCREEN_SIZE((39+1)*8, (31+1)*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(_5clown_state, screen_update_fclown)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fclown)
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_INIT_OWNER(_5clown_state, _5clown)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_fclown);
+ PALETTE(config, m_palette, FUNC(_5clown_state::_5clown_palette), 256);
mc6845_device &crtc(MC6845(config, "crtc", MASTER_CLOCK/16)); /* guess */
crtc.set_screen("screen");
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index 5cb882ade9a..54acc0d8645 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -425,8 +425,7 @@ void _8080bw_state::invadpt2(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invadpt2));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -544,8 +543,7 @@ void _8080bw_state::spcewarla(machine_config &config)
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255);
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invadpt2));
}
@@ -672,8 +670,7 @@ void _8080bw_state::cosmo(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_cosmo));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rgb));
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -838,7 +835,7 @@ void _8080bw_state::spacecom(machine_config &config)
m_screen->set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_spacecom));
- PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
/* sound hardware */
invaders_audio(config);
@@ -952,8 +949,7 @@ void _8080bw_state::invrvnge(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invadpt2));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1127,8 +1123,7 @@ void _8080bw_state::lrescue(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invadpt2));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1161,7 +1156,7 @@ void _8080bw_state::escmars(machine_config &config)
m_screen->set_raw(MW8080BW_PIXEL_CLOCK, MW8080BW_HTOTAL, MW8080BW_HBEND, MW8080BW_HPIXCOUNT, MW8080BW_VTOTAL, MW8080BW_VBEND, MW8080BW_VBSTART);
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_mw8080bw));
- PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1407,8 +1402,7 @@ void _8080bw_state::rollingc(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_rollingc));
- PALETTE(config, m_palette, 16);
- m_palette->set_init(FUNC(_8080bw_state::palette_init_rollingc));
+ PALETTE(config, m_palette, FUNC(_8080bw_state::rollingc_palette), 16);
/* sound hardware */
invaders_samples_audio(config);
@@ -1556,8 +1550,7 @@ void _8080bw_state::schaser(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_schaser));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1686,8 +1679,7 @@ void _8080bw_state::schasercv(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_schasercv));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -1787,8 +1779,7 @@ void _8080bw_state::sflush(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_sflush));
- PALETTE(config, m_palette, 8);
- m_palette->set_init(FUNC(_8080bw_state::palette_init_sflush));
+ PALETTE(config, m_palette, FUNC(_8080bw_state::sflush_palette), 8);
}
@@ -1892,8 +1883,7 @@ void _8080bw_state::lupin3(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_indianbt));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rgb));
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1933,8 +1923,7 @@ void _8080bw_state::lupin3a(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_lupin3));
- PALETTE(config.replace(), m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config.replace(), m_palette, palette_device::RBG_3BIT);
}
@@ -2065,8 +2054,7 @@ void _8080bw_state::polaris(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_polaris));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2192,8 +2180,7 @@ void _8080bw_state::ballbomb(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_ballbomb));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -2441,8 +2428,7 @@ void _8080bw_state::indianbt(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_indianbt));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rgb));
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -2468,8 +2454,7 @@ void _8080bw_state::indianbtbr(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_indianbt));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rgb));
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -2544,8 +2529,7 @@ void _8080bw_state::steelwkr(machine_config &config)
/* video hardware */
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invadpt2));
- PALETTE(config, m_palette, 8);
- m_palette->set_init("palette", FUNC(palette_device::palette_init_3bit_rbg));
+ PALETTE(config, m_palette, palette_device::RBG_3BIT);
/* sound hardware */
invaders_samples_audio(config);
@@ -2769,7 +2753,7 @@ void _8080bw_state::shuttlei(machine_config &config)
m_screen->set_visarea(0*8, 32*8-1, 0*8, 24*8-1);
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_shuttlei));
- PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
/* sound hardware */
invaders_samples_audio(config);
diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp
index 168b401d002..ca2d5d8d2c5 100644
--- a/src/mame/drivers/88games.cpp
+++ b/src/mame/drivers/88games.cpp
@@ -325,9 +325,7 @@ void _88games_state::_88games(machine_config &config)
screen.set_palette("palette");
screen.screen_vblank().set(FUNC(_88games_state::vblank_irq));
- palette_device &palette(PALETTE(config, "palette", 2048));
- palette.enable_shadows();
- palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows();
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
diff --git a/src/mame/drivers/a5105.cpp b/src/mame/drivers/a5105.cpp
index 6f0a31c9c9c..f52c14979aa 100644
--- a/src/mame/drivers/a5105.cpp
+++ b/src/mame/drivers/a5105.cpp
@@ -61,6 +61,10 @@ public:
void a5105(machine_config &config);
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
DECLARE_READ8_MEMBER(a5105_memsel_r);
DECLARE_READ8_MEMBER(key_r);
@@ -71,7 +75,7 @@ private:
DECLARE_WRITE8_MEMBER( a5105_upd765_w );
DECLARE_WRITE8_MEMBER(pcg_addr_w);
DECLARE_WRITE8_MEMBER(pcg_val_w);
- DECLARE_PALETTE_INIT(a5105);
+ void a5105_palette(palette_device &palette) const;
DECLARE_FLOPPY_FORMATS( floppy_formats );
UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels );
UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
@@ -87,8 +91,6 @@ private:
uint16_t m_pcg_internal_addr;
uint8_t m_key_mux;
uint8_t m_memsel[4];
- virtual void machine_reset() override;
- virtual void video_start() override;
required_device<z80_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<upd7220_device> m_hgdc;
@@ -108,16 +110,13 @@ private:
/* TODO */
UPD7220_DISPLAY_PIXELS_MEMBER( a5105_state::hgdc_display_pixels )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
-
- int xi,gfx;
- uint8_t pen;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- gfx = m_video_ram[(address & 0x1ffff) >> 1];
+ int const gfx = m_video_ram[(address & 0x1ffff) >> 1];
- for(xi=0;xi<16;xi++)
+ for (int xi = 0; xi < 16; xi++)
{
- pen = ((gfx >> xi) & 1) ? 7 : 0;
+ int const pen = ((gfx >> xi) & 1) ? 7 : 0;
bitmap.pix32(y, x + xi) = palette[pen];
}
@@ -125,38 +124,32 @@ UPD7220_DISPLAY_PIXELS_MEMBER( a5105_state::hgdc_display_pixels )
UPD7220_DRAW_TEXT_LINE_MEMBER( a5105_state::hgdc_draw_text )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int x;
- int xi,yi;
- int tile,color;
- uint8_t tile_data;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- for( x = 0; x < pitch; x++ )
+ for (int x = 0; x < pitch; x++)
{
- tile = (m_video_ram[(((addr+x)*2) & 0x1ffff) >> 1] & 0xff);
- color = ((m_video_ram[(((addr+x)*2) & 0x1ffff) >> 1] >> 8) & 0x0f);
+ int const tile = (m_video_ram[(((addr+x)*2) & 0x1ffff) >> 1] & 0xff);
+ int const color = ((m_video_ram[(((addr+x)*2) & 0x1ffff) >> 1] >> 8) & 0x0f);
- for( yi = 0; yi < lr; yi++)
+ for (int yi = 0; yi < lr; yi++)
{
- tile_data = m_char_ram[(tile*8+yi) & 0x7ff];
+ uint8_t tile_data = m_char_ram[(tile*8+yi) & 0x7ff];
- if(cursor_on && cursor_addr == addr+x && m_screen->frame_number() & 0x10)
- tile_data^=0xff;
+ if (cursor_on && cursor_addr == addr+x && m_screen->frame_number() & 0x10)
+ tile_data ^= 0xff;
- for( xi = 0; xi < 8; xi++)
+ for (int xi = 0; xi < 8; xi++)
{
- int res_x,res_y;
int pen = (tile_data >> xi) & 1 ? color : 0;
- res_x = x * 8 + xi;
- res_y = y + yi;
+ int const res_x = x * 8 + xi;
+ int const res_y = y + yi;
- if(yi >= 8) { pen = 0; }
+ if (yi >= 8)
+ pen = 0;
- if(!m_screen->visible_area().contains(res_x+0, res_y))
- continue;
-
- bitmap.pix32(res_y, res_x) = palette[pen];
+ if (m_screen->visible_area().contains(res_x+0, res_y))
+ bitmap.pix32(res_y, res_x) = palette[pen];
}
}
}
@@ -526,18 +519,16 @@ static GFXDECODE_START( gfx_a5105 )
GFXDECODE_END
-PALETTE_INIT_MEMBER(a5105_state, a5105)
+void a5105_state::a5105_palette(palette_device &palette) const
{
- int i;
- int r,g,b;
-
- for ( i = 0; i < 16; i++ )
+ for (int i = 0; i < 16; i++)
{
- r = i & 4 ? ((i & 8) ? 0xaa : 0xff) : 0x00;
- g = i & 2 ? ((i & 8) ? 0xaa : 0xff) : 0x00;
- b = i & 1 ? ((i & 8) ? 0xaa : 0xff) : 0x00;
+ int const x = (i & 8) ? 0xaa : 0xff;
+ int const r = (i & 4) ? x : 0x00;
+ int const g = (i & 2) ? x : 0x00;
+ int const b = (i & 1) ? x : 0x00;
- palette.set_pen_color(i, rgb_t(r,g,b));
+ palette.set_pen_color(i, rgb_t(r, g, b));
}
}
@@ -583,9 +574,8 @@ MACHINE_CONFIG_START(a5105_state::a5105)
MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
MCFG_SCREEN_SIZE(40*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 25*8-1)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_a5105)
- MCFG_PALETTE_ADD("palette", 16)
- MCFG_PALETTE_INIT_OWNER(a5105_state, a5105)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_a5105);
+ PALETTE(config, m_palette, FUNC(a5105_state::a5105_palette), 16);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/a51xx.cpp b/src/mame/drivers/a51xx.cpp
index 853b4ee1887..7273d616ecf 100644
--- a/src/mame/drivers/a51xx.cpp
+++ b/src/mame/drivers/a51xx.cpp
@@ -144,8 +144,7 @@ MACHINE_CONFIG_START(a51xx_state::a5120)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_a51xx)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
-
+ PALETTE(config, "palette", palette_device::MONOCHROME);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(a51xx_state::a5130)
diff --git a/src/mame/drivers/a7150.cpp b/src/mame/drivers/a7150.cpp
index c4145243659..1ab66db66bd 100644
--- a/src/mame/drivers/a7150.cpp
+++ b/src/mame/drivers/a7150.cpp
@@ -562,7 +562,7 @@ void a7150_state::a7150(machine_config &config)
screen.set_screen_update(FUNC(a7150_state::screen_update_k7072));
screen.set_palette(m_palette);
- PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
}
/* ROM definition */
diff --git a/src/mame/drivers/a7800.cpp b/src/mame/drivers/a7800.cpp
index 46894076830..1ac1a0e2f7d 100644
--- a/src/mame/drivers/a7800.cpp
+++ b/src/mame/drivers/a7800.cpp
@@ -136,7 +136,7 @@ protected:
DECLARE_READ8_MEMBER(bios_or_cart_r);
DECLARE_READ8_MEMBER(tia_r);
DECLARE_WRITE8_MEMBER(tia_w);
- DECLARE_PALETTE_INIT(a7800);
+ void a7800_palette(palette_device &palette) const;
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
TIMER_CALLBACK_MEMBER(maria_startdma);
DECLARE_READ8_MEMBER(riot_joystick_r);
@@ -183,7 +183,7 @@ public:
void a7800_pal(machine_config &config);
protected:
- DECLARE_PALETTE_INIT(a7800p);
+ void a7800p_palette(palette_device &palette) const;
};
@@ -553,7 +553,7 @@ upon display type.
rgb_t(0xA1,0x8F,0x1A), rgb_t(0xB2,0xA0,0x2B), rgb_t(0xC3,0xB1,0x3C), rgb_t(0xD4,0xC2,0x4D), \
rgb_t(0xE5,0xD3,0x5E), rgb_t(0xF6,0xE4,0x6F), rgb_t(0xFF,0xF5,0x82), rgb_t(0xFF,0xFF,0x96 )
-static const rgb_t a7800_palette[256] =
+static constexpr rgb_t a7800_colors[256] =
{
NTSC_GREY,
NTSC_GOLD,
@@ -573,7 +573,7 @@ static const rgb_t a7800_palette[256] =
NTSC_LIGHT_ORANGE
};
-static const rgb_t a7800p_palette[256] =
+static constexpr rgb_t a7800p_colors[256] =
{
NTSC_GREY,
NTSC_ORANGE_GREEN,
@@ -1307,15 +1307,15 @@ define NTSC_LIGHT_ORANGE
***************************************************************************/
/* Initialise the palette */
-PALETTE_INIT_MEMBER(a7800_state, a7800)
+void a7800_state::a7800_palette(palette_device &palette) const
{
- palette.set_pen_colors(0, a7800_palette, ARRAY_LENGTH(a7800_palette));
+ palette.set_pen_colors(0, a7800_colors);
}
-PALETTE_INIT_MEMBER(a7800_pal_state,a7800p)
+void a7800_pal_state::a7800p_palette(palette_device &palette) const
{
- palette.set_pen_colors(0, a7800p_palette, ARRAY_LENGTH(a7800p_palette));
+ palette.set_pen_colors(0, a7800p_colors);
}
@@ -1388,7 +1388,7 @@ void a7800_state::a7800_ntsc(machine_config &config)
m_screen->set_screen_update("maria", FUNC(atari_maria_device::screen_update));
m_screen->set_palette("palette");
- PALETTE(config, "palette", ARRAY_LENGTH(a7800_palette)).set_init(FUNC(a7800_state::palette_init_a7800));
+ PALETTE(config, "palette", FUNC(a7800_state::a7800_palette), ARRAY_LENGTH(a7800_colors));
ATARI_MARIA(config, m_maria, 0);
m_maria->set_dmacpu_tag(m_maincpu);
@@ -1420,7 +1420,7 @@ void a7800_pal_state::a7800_pal(machine_config &config)
m_screen->set_raw(7093788, 454, 0, 320, 313, 35, 35 + 228 + 32);
- subdevice<palette_device>("palette")->set_init(FUNC(a7800_pal_state::palette_init_a7800p));
+ subdevice<palette_device>("palette")->set_init(FUNC(a7800_pal_state::a7800p_palette));
/* devices */
subdevice<mos6532_new_device>("riot")->set_clock(CLK_PAL);
diff --git a/src/mame/drivers/aa310.cpp b/src/mame/drivers/aa310.cpp
index 8e4fbd03109..838fad59bff 100644
--- a/src/mame/drivers/aa310.cpp
+++ b/src/mame/drivers/aa310.cpp
@@ -423,7 +423,7 @@ void aa310_state::aa310(machine_config &config)
m_screen->set_raw(16_MHz_XTAL, 1024, 0, 735, 624/2, 0, 292); // RiscOS 3 default screen settings
m_screen->set_screen_update(FUNC(archimedes_state::screen_update));
- PALETTE(config, m_palette, 32768);
+ PALETTE(config, m_palette).set_entries(32768);
RAM(config, m_ram).set_default_size("1M");
diff --git a/src/mame/drivers/ac1.cpp b/src/mame/drivers/ac1.cpp
index 8493a919c6c..1b7e4329cf0 100644
--- a/src/mame/drivers/ac1.cpp
+++ b/src/mame/drivers/ac1.cpp
@@ -148,11 +148,11 @@ MACHINE_CONFIG_START(ac1_state::ac1)
MCFG_SCREEN_SIZE(64*6, 16*8)
MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 16*8-1)
MCFG_SCREEN_UPDATE_DRIVER(ac1_state, screen_update_ac1)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ac1 )
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
diff --git a/src/mame/drivers/accomm.cpp b/src/mame/drivers/accomm.cpp
index c38b093bfc2..a2d2f1e2f79 100644
--- a/src/mame/drivers/accomm.cpp
+++ b/src/mame/drivers/accomm.cpp
@@ -71,7 +71,7 @@ private:
DECLARE_READ8_MEMBER(sheila_r);
DECLARE_WRITE8_MEMBER(sheila_w);
- DECLARE_PALETTE_INIT(accomm);
+ void accomm_palette(palette_device &palette) const;
INTERRUPT_GEN_MEMBER(vbl_int);
virtual void machine_reset() override;
@@ -145,9 +145,9 @@ static const rgb_t electron_palette[8]=
rgb_t(0x000,0x000,0x000)
};
-PALETTE_INIT_MEMBER(accomm_state, accomm)
+void accomm_state::accomm_palette(palette_device &palette) const
{
- palette.set_pen_colors(0, electron_palette, ARRAY_LENGTH(electron_palette));
+ palette.set_pen_colors(0, electron_palette);
}
READ8_MEMBER(accomm_state::read_keyboard1)
@@ -830,8 +830,7 @@ void accomm_state::accomm(machine_config &config)
screen.set_video_attributes(VIDEO_UPDATE_SCANLINE);
screen.set_palette("palette");
- palette_device &palette(PALETTE(config, "palette", 16));
- palette.set_init(palette_init_delegate(FUNC(accomm_state::palette_init_accomm), this));
+ PALETTE(config, "palette", FUNC(accomm_state::accomm_palette), 16);
config.set_default_layout(layout_accomm);
diff --git a/src/mame/drivers/ace.cpp b/src/mame/drivers/ace.cpp
index 882e06f842a..91c30b4ce10 100644
--- a/src/mame/drivers/ace.cpp
+++ b/src/mame/drivers/ace.cpp
@@ -335,10 +335,10 @@ MACHINE_CONFIG_START(aceal_state::ace)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(4*8, 32*8-1, 2*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(aceal_state, screen_update_ace)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ace)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, palette_device::MONOCHROME);
/* sound hardware */
/* ???? */
diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp
index d412c7c76a2..49a05bdb9bc 100644
--- a/src/mame/drivers/acefruit.cpp
+++ b/src/mame/drivers/acefruit.cpp
@@ -47,23 +47,24 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r);
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r);
-private:
+protected:
enum
{
TIMER_ACEFRUIT_REFRESH
};
+ virtual void machine_start() override;
+ virtual void video_start() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
DECLARE_WRITE8_MEMBER(acefruit_colorram_w);
DECLARE_WRITE8_MEMBER(acefruit_coin_w);
DECLARE_WRITE8_MEMBER(acefruit_sound_w);
DECLARE_WRITE8_MEMBER(acefruit_lamp_w);
DECLARE_WRITE8_MEMBER(acefruit_solenoid_w);
- virtual void machine_start() override;
- virtual void video_start() override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
- DECLARE_PALETTE_INIT(acefruit);
+ void acefruit_palette(palette_device &palette) const;
uint32_t screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(acefruit_vblank);
void acefruit_update_irq(int vpos);
@@ -309,7 +310,7 @@ WRITE8_MEMBER(acefruit_state::acefruit_solenoid_w)
m_solenoids[i] = BIT(data, i);
}
-PALETTE_INIT_MEMBER(acefruit_state, acefruit)
+void acefruit_state::acefruit_palette(palette_device &palette) const
{
/* sprites */
palette.set_pen_color( 0, rgb_t(0x00, 0x00, 0x00) );
@@ -635,7 +636,7 @@ MACHINE_CONFIG_START(acefruit_state::acefruit)
WATCHDOG_TIMER(config, "watchdog");
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acefruit)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_acefruit);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -644,14 +645,12 @@ MACHINE_CONFIG_START(acefruit_state::acefruit)
MCFG_SCREEN_SIZE(512, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 255)
MCFG_SCREEN_UPDATE_DRIVER(acefruit_state, screen_update_acefruit)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- MCFG_PALETTE_ADD("palette", 16)
- MCFG_PALETTE_INIT_OWNER(acefruit_state, acefruit)
+ PALETTE(config, m_palette, FUNC(acefruit_state::acefruit_palette), 16);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-
/* sound hardware */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/acommand.cpp b/src/mame/drivers/acommand.cpp
index 1cfa048011a..2f3174ff42d 100644
--- a/src/mame/drivers/acommand.cpp
+++ b/src/mame/drivers/acommand.cpp
@@ -72,8 +72,8 @@ JALCF1 BIN 1,048,576 02-07-99 1:11a JALCF1.BIN
class acommand_state : public driver_device
{
public:
- acommand_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ acommand_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_oki1(*this, "oki1"),
@@ -482,11 +482,10 @@ MACHINE_CONFIG_START(acommand_state::acommand)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(acommand_state, screen_update_acommand)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acommand)
- MCFG_PALETTE_ADD("palette", 0x4000)
- MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_acommand);
+ PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x4000);
MEGASYS1_TILEMAP(config, m_bgtmap, m_palette, 0x0f00);
MEGASYS1_TILEMAP(config, m_txtmap, m_palette, 0x2700);
diff --git a/src/mame/drivers/actfancr.cpp b/src/mame/drivers/actfancr.cpp
index 80b3dc6f046..6b587da3219 100644
--- a/src/mame/drivers/actfancr.cpp
+++ b/src/mame/drivers/actfancr.cpp
@@ -307,8 +307,7 @@ MACHINE_CONFIG_START(actfancr_state::actfancr)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_actfan)
- MCFG_PALETTE_ADD("palette", 768)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
+ PALETTE(config, "palette").set_format(palette_device::xBGR_444, 768);
DECO_BAC06(config, m_tilegen[0], 0);
m_tilegen[0]->set_gfx_region_wide(2, 2, 2);
@@ -369,8 +368,7 @@ MACHINE_CONFIG_START(actfancr_state::triothep)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_triothep)
- MCFG_PALETTE_ADD("palette", 768)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
+ PALETTE(config, "palette").set_format(palette_device::xBGR_444, 768);
DECO_BAC06(config, m_tilegen[0], 0);
m_tilegen[0]->set_gfx_region_wide(2, 2, 0);
diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp
index 65eacd3364b..0c5317b7b0f 100644
--- a/src/mame/drivers/adp.cpp
+++ b/src/mame/drivers/adp.cpp
@@ -172,8 +172,8 @@ Quick Jack administration/service mode:
class adp_state : public driver_device
{
public:
- adp_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ adp_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_microtouch(*this, "microtouch"),
m_maincpu(*this, "maincpu"),
m_duart(*this, "duart"),
@@ -207,8 +207,8 @@ private:
DECLARE_WRITE16_MEMBER(input_w);
DECLARE_MACHINE_START(skattv);
DECLARE_MACHINE_RESET(skattv);
- DECLARE_PALETTE_INIT(adp);
- DECLARE_PALETTE_INIT(fstation);
+ void adp_palette(palette_device &device) const;
+ void fstation_palette(palette_device &device) const;
IRQ_CALLBACK_MEMBER(duart_iack_handler);
//INTERRUPT_GEN_MEMBER(adp_int);
void skattva_nvram_init(nvram_device &nvram, void *base, size_t size);
@@ -263,35 +263,19 @@ MACHINE_RESET_MEMBER(adp_state,skattv)
m_mux_data = 0;
}
-PALETTE_INIT_MEMBER(adp_state,adp)
+void adp_state::adp_palette(palette_device &palette) const
{
- int i;
-
- for (i = 0; i < palette.entries(); i++)
+ for (int i = 0; i < palette.entries(); i++)
{
- int bit0, bit1, bit2, r, g, b;
-
- // red component
- bit0 = (i >> 0) & 0x01;
- bit1 = (i >> 3) & 0x01;
- bit2 = (i >> 0) & 0x01;
- r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- // green component
- bit0 = (i >> 1) & 0x01;
- bit1 = (i >> 3) & 0x01;
- bit2 = (i >> 1) & 0x01;
- g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- // blue component
- bit0 = (i >> 2) & 0x01;
- bit1 = (i >> 3) & 0x01;
- bit2 = (i >> 2) & 0x01;
- b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
-
- palette.set_pen_color(i, rgb_t(r,g,b));
+ int const r = 0x21 * BI