summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
committer Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
commit25a100d773579751d4dd58c9d4276eabdb648c3a (patch)
treea4945943e8ed7b8146d44bf684dc26138fcdcdff
parent4719b9707a1058069a1f0901e4c0c0147a830966 (diff)
Created new device_video_interface. Right now its sole purpose is to
house a screen tag and to find the screen at startup, providing an m_screen object that can be used. One nice feature is that if there is only one screen and no screen has been specified, it will auto configure to that screen. This removes the need to explicitly specify a screen in the configuration for a large chunk of drivers (though doing so never hurts). A new macro MCFG_VIDEO_SET_SCREEN is provided, though devices are encouraged to define their own that maps there so it is obvious which device is being targeted. The device_video_interface's validation function will error if an invalid screen is specified or if no screen is provided but there are multiple screens present. Updated all devices that currently had an m_screen in them to use the device_video_interface instead. This also has the nice benefit of flagging video-related devices for categorization purposes. It also means all these devices inherit the same screen-finding behaviors. For devices that had interfaces that specified a screen tag, those have been removed and all existing structs updated. Added an optional_device<screen_device> m_screen to the base driver_device. If you name your screen "screen" (as most drivers do), you will have free access to your screen this way. Future updates include: * Updating all devices referencing machine.primary_screen to use the device_video_interface instead * Updating all drivers referencing machine.primary_screen to use the m_screen instead * Removing machine.primary_screen entirely
-rw-r--r--.gitattributes2
-rw-r--r--src/emu/divideo.c144
-rw-r--r--src/emu/divideo.h95
-rw-r--r--src/emu/driver.c1
-rw-r--r--src/emu/driver.h3
-rw-r--r--src/emu/emu.h1
-rw-r--r--src/emu/emu.mak1
-rw-r--r--src/emu/machine/k053252.c44
-rw-r--r--src/emu/machine/k053252.h3
-rw-r--r--src/emu/machine/laserdsc.c18
-rw-r--r--src/emu/machine/laserdsc.h5
-rw-r--r--src/emu/sound/cdp1864.c2
-rw-r--r--src/emu/sound/cdp1864.h8
-rw-r--r--src/emu/sound/cdp1869.c5
-rw-r--r--src/emu/sound/cdp1869.h6
-rw-r--r--src/emu/sound/mos6560.c4
-rw-r--r--src/emu/sound/mos6560.h18
-rw-r--r--src/emu/sound/mos7360.c5
-rw-r--r--src/emu/sound/mos7360.h11
-rw-r--r--src/emu/video/315_5124.c4
-rw-r--r--src/emu/video/315_5124.h11
-rw-r--r--src/emu/video/cdp1861.c2
-rw-r--r--src/emu/video/cdp1861.h8
-rw-r--r--src/emu/video/cdp1862.c2
-rw-r--r--src/emu/video/cdp1862.h8
-rw-r--r--src/emu/video/crt9007.c5
-rw-r--r--src/emu/video/crt9007.h4
-rw-r--r--src/emu/video/crt9021.c7
-rw-r--r--src/emu/video/crt9021.h5
-rw-r--r--src/emu/video/ef9340_1.c7
-rw-r--r--src/emu/video/ef9340_1.h11
-rw-r--r--src/emu/video/h63484.c5
-rw-r--r--src/emu/video/h63484.h4
-rw-r--r--src/emu/video/hd44102.c9
-rw-r--r--src/emu/video/hd44102.h11
-rw-r--r--src/emu/video/hd61830.c3
-rw-r--r--src/emu/video/hd61830.h4
-rw-r--r--src/emu/video/huc6260.c8
-rw-r--r--src/emu/video/huc6260.h5
-rw-r--r--src/emu/video/huc6261.c6
-rw-r--r--src/emu/video/huc6261.h5
-rw-r--r--src/emu/video/i8244.c10
-rw-r--r--src/emu/video/i8244.h9
-rw-r--r--src/emu/video/i8275.c5
-rw-r--r--src/emu/video/i8275.h5
-rw-r--r--src/emu/video/i8275x.c3
-rw-r--r--src/emu/video/i8275x.h3
-rw-r--r--src/emu/video/m50458.c23
-rw-r--r--src/emu/video/m50458.h19
-rw-r--r--src/emu/video/mc6845.c17
-rw-r--r--src/emu/video/mc6845.h9
-rw-r--r--src/emu/video/msm6255.c9
-rw-r--r--src/emu/video/msm6255.h10
-rw-r--r--src/emu/video/pc_cga.c5
-rw-r--r--src/emu/video/sed1330.c15
-rw-r--r--src/emu/video/sed1330.h12
-rw-r--r--src/emu/video/tms34061.c3
-rw-r--r--src/emu/video/tms34061.h5
-rw-r--r--src/emu/video/tms9927.c10
-rw-r--r--src/emu/video/tms9927.h3
-rw-r--r--src/emu/video/tms9928a.c4
-rw-r--r--src/emu/video/tms9928a.h6
-rw-r--r--src/emu/video/upd3301.c5
-rw-r--r--src/emu/video/upd3301.h4
-rw-r--r--src/emu/video/upd7220.c11
-rw-r--r--src/emu/video/upd7220.h5
-rw-r--r--src/emu/video/v9938.c14
-rw-r--r--src/emu/video/v9938.h12
-rw-r--r--src/mame/drivers/4roses.c3
-rw-r--r--src/mame/drivers/5clown.c3
-rw-r--r--src/mame/drivers/adp.c1
-rw-r--r--src/mame/drivers/airbustr.c1
-rw-r--r--src/mame/drivers/albazg.c3
-rw-r--r--src/mame/drivers/amaticmg.c3
-rw-r--r--src/mame/drivers/aristmk4.c3
-rw-r--r--src/mame/drivers/asuka.c2
-rw-r--r--src/mame/drivers/avt.c3
-rw-r--r--src/mame/drivers/backfire.c4
-rw-r--r--src/mame/drivers/bishi.c1
-rw-r--r--src/mame/drivers/blitz.c3
-rw-r--r--src/mame/drivers/blitz68k.c17
-rw-r--r--src/mame/drivers/bloodbro.c1
-rw-r--r--src/mame/drivers/boogwing.c9
-rw-r--r--src/mame/drivers/buster.c3
-rw-r--r--src/mame/drivers/byvid.c1
-rw-r--r--src/mame/drivers/calomega.c3
-rw-r--r--src/mame/drivers/capbowl.c1
-rw-r--r--src/mame/drivers/carrera.c3
-rw-r--r--src/mame/drivers/cbuster.c2
-rw-r--r--src/mame/drivers/cham24.c1
-rw-r--r--src/mame/drivers/chance32.c3
-rw-r--r--src/mame/drivers/cliffhgr.c1
-rw-r--r--src/mame/drivers/cninja.c25
-rw-r--r--src/mame/drivers/coinmstr.c3
-rw-r--r--src/mame/drivers/darkseal.c2
-rw-r--r--src/mame/drivers/dassault.c9
-rw-r--r--src/mame/drivers/dblewing.c1
-rw-r--r--src/mame/drivers/dbz.c2
-rw-r--r--src/mame/drivers/dcon.c1
-rw-r--r--src/mame/drivers/deco156.c1
-rw-r--r--src/mame/drivers/deco32.c10
-rw-r--r--src/mame/drivers/dietgo.c8
-rw-r--r--src/mame/drivers/djboy.c1
-rw-r--r--src/mame/drivers/dreambal.c1
-rw-r--r--src/mame/drivers/famibox.c1
-rw-r--r--src/mame/drivers/flipjack.c3
-rw-r--r--src/mame/drivers/forte2.c1
-rw-r--r--src/mame/drivers/fortecar.c3
-rw-r--r--src/mame/drivers/funkyjet.c1
-rw-r--r--src/mame/drivers/funworld.c3
-rw-r--r--src/mame/drivers/gaelco.c4
-rw-r--r--src/mame/drivers/galastrm.c1
-rw-r--r--src/mame/drivers/galpanic.c1
-rw-r--r--src/mame/drivers/ggconnie.c2
-rw-r--r--src/mame/drivers/gijoe.c1
-rw-r--r--src/mame/drivers/gluck2.c3
-rw-r--r--src/mame/drivers/goldnpkr.c3
-rw-r--r--src/mame/drivers/goodejan.c1
-rw-r--r--src/mame/drivers/groundfx.c1
-rw-r--r--src/mame/drivers/guab.c1
-rw-r--r--src/mame/drivers/hexion.c1
-rw-r--r--src/mame/drivers/hitpoker.c3
-rw-r--r--src/mame/drivers/hornet.c21
-rw-r--r--src/mame/drivers/hvyunit.c1
-rw-r--r--src/mame/drivers/itech8.c1
-rw-r--r--src/mame/drivers/jokrwild.c3
-rw-r--r--src/mame/drivers/jpmsys5.c1
-rw-r--r--src/mame/drivers/jubilee.c3
-rw-r--r--src/mame/drivers/kingdrby.c3
-rw-r--r--src/mame/drivers/kingpin.c1
-rw-r--r--src/mame/drivers/konamigx.c2
-rw-r--r--src/mame/drivers/laserbas.c3
-rw-r--r--src/mame/drivers/luckgrln.c3
-rw-r--r--src/mame/drivers/magicfly.c3
-rw-r--r--src/mame/drivers/majorpkr.c3
-rw-r--r--src/mame/drivers/megatech.c2
-rw-r--r--src/mame/drivers/merit.c3
-rw-r--r--src/mame/drivers/miniboy7.c3
-rw-r--r--src/mame/drivers/mirage.c1
-rw-r--r--src/mame/drivers/moo.c4
-rw-r--r--src/mame/drivers/mpu12wbk.c3
-rw-r--r--src/mame/drivers/mpu4dealem.c3
-rw-r--r--src/mame/drivers/multigam.c1
-rw-r--r--src/mame/drivers/murogem.c3
-rw-r--r--src/mame/drivers/mystwarr.c6
-rw-r--r--src/mame/drivers/ninjaw.c9
-rw-r--r--src/mame/drivers/nss.c7
-rw-r--r--src/mame/drivers/nyny.c3
-rw-r--r--src/mame/drivers/othello.c3
-rw-r--r--src/mame/drivers/othunder.c1
-rw-r--r--src/mame/drivers/overdriv.c2
-rw-r--r--src/mame/drivers/pachifev.c1
-rw-r--r--src/mame/drivers/pengadvb.c1
-rw-r--r--src/mame/drivers/peplus.c3
-rw-r--r--src/mame/drivers/pktgaldx.c8
-rw-r--r--src/mame/drivers/playch10.c1
-rw-r--r--src/mame/drivers/progolf.c3
-rw-r--r--src/mame/drivers/qdrmfgp.c2
-rw-r--r--src/mame/drivers/r2dtank.c3
-rw-r--r--src/mame/drivers/raiden.c1
-rw-r--r--src/mame/drivers/raiden2.c1
-rw-r--r--src/mame/drivers/re900.c1
-rw-r--r--src/mame/drivers/rgum.c3
-rw-r--r--src/mame/drivers/rltennis.c1
-rw-r--r--src/mame/drivers/rohga.c17
-rw-r--r--src/mame/drivers/rollerg.c1
-rw-r--r--src/mame/drivers/rungun.c2
-rw-r--r--src/mame/drivers/sandscrp.c1
-rw-r--r--src/mame/drivers/sanremo.c3
-rw-r--r--src/mame/drivers/segac2.c2
-rw-r--r--src/mame/drivers/segae.c2
-rw-r--r--src/mame/drivers/segas18.c1
-rw-r--r--src/mame/drivers/sengokmj.c1
-rw-r--r--src/mame/drivers/sg1000a.c1
-rw-r--r--src/mame/drivers/simpl156.c1
-rw-r--r--src/mame/drivers/simpsons.c1
-rw-r--r--src/mame/drivers/slotcarn.c3
-rw-r--r--src/mame/drivers/snk6502.c5
-rw-r--r--src/mame/drivers/snowbros.c1
-rw-r--r--src/mame/drivers/speedatk.c3
-rw-r--r--src/mame/drivers/spiders.c3
-rw-r--r--src/mame/drivers/sshangha.c1
-rw-r--r--src/mame/drivers/ssingles.c6
-rw-r--r--src/mame/drivers/statriv2.c1
-rw-r--r--src/mame/drivers/supbtime.c1
-rw-r--r--src/mame/drivers/supercrd.c3
-rw-r--r--src/mame/drivers/taito_f2.c10
-rw-r--r--src/mame/drivers/taito_z.c3
-rw-r--r--src/mame/drivers/tapatune.c3
-rw-r--r--src/mame/drivers/tasman.c1
-rw-r--r--src/mame/drivers/thief.c1
-rw-r--r--src/mame/drivers/tmspoker.c3
-rw-r--r--src/mame/drivers/truco.c3
-rw-r--r--src/mame/drivers/tumblep.c1
-rw-r--r--src/mame/drivers/twincobr.c2
-rw-r--r--src/mame/drivers/undrfire.c1
-rw-r--r--src/mame/drivers/usgames.c3
-rw-r--r--src/mame/drivers/vaportra.c2
-rw-r--r--src/mame/drivers/vcombat.c5
-rw-r--r--src/mame/drivers/vendetta.c3
-rw-r--r--src/mame/drivers/vlc.c3
-rw-r--r--src/mame/drivers/vsnes.c7
-rw-r--r--src/mame/drivers/wardner.c2
-rw-r--r--src/mame/drivers/warriorb.c8
-rw-r--r--src/mame/drivers/wgp.c2
-rw-r--r--src/mame/drivers/wheelfir.c3
-rw-r--r--src/mame/drivers/xexex.c3
-rw-r--r--src/mame/drivers/xmen.c3
-rw-r--r--src/mame/includes/gaelco.h4
-rw-r--r--src/mame/includes/rltennis.h1
-rw-r--r--src/mame/machine/atarigen.c20
-rw-r--r--src/mame/machine/atarigen.h8
-rw-r--r--src/mame/machine/megadriv.c4
-rw-r--r--src/mame/video/atarimo.c18
-rw-r--r--src/mame/video/atarimo.h8
-rw-r--r--src/mame/video/cidelsa.c3
-rw-r--r--src/mame/video/deco16ic.c5
-rw-r--r--src/mame/video/deco16ic.h7
-rw-r--r--src/mame/video/decocomn.c13
-rw-r--r--src/mame/video/decocomn.h13
-rw-r--r--src/mame/video/decodmd2.c3
-rw-r--r--src/mame/video/k001006.c1
-rw-r--r--src/mame/video/k001006.h4
-rw-r--r--src/mame/video/k001604.c1
-rw-r--r--src/mame/video/k001604.h1
-rw-r--r--src/mame/video/k037122.c28
-rw-r--r--src/mame/video/k037122.h19
-rw-r--r--src/mame/video/k053246_k053247_k055673.c13
-rw-r--r--src/mame/video/k053246_k053247_k055673.h8
-rw-r--r--src/mame/video/k054338.c9
-rw-r--r--src/mame/video/k054338.h5
-rw-r--r--src/mame/video/kan_pand.c5
-rw-r--r--src/mame/video/kan_pand.h3
-rw-r--r--src/mame/video/konamigx.c2
-rw-r--r--src/mame/video/madalien.c3
-rw-r--r--src/mame/video/playch10.c1
-rw-r--r--src/mame/video/ppu2c0x.c5
-rw-r--r--src/mame/video/ppu2c0x.h6
-rw-r--r--src/mame/video/qix.c3
-rw-r--r--src/mame/video/seibu_crtc.c3
-rw-r--r--src/mame/video/seibu_crtc.h3
-rw-r--r--src/mame/video/taitoic.h5
-rw-r--r--src/mame/video/tc0100scn.c6
-rw-r--r--src/mame/video/tc0100scn.h7
-rw-r--r--src/mame/video/twincobr.c1
-rw-r--r--src/mame/video/vsnes.c2
-rw-r--r--src/mess/drivers/a5105.c1
-rw-r--r--src/mess/drivers/a6809.c3
-rw-r--r--src/mess/drivers/adam.c1
-rw-r--r--src/mess/drivers/alphatro.c3
-rw-r--r--src/mess/drivers/amstrad.c6
-rw-r--r--src/mess/drivers/apc.c2
-rw-r--r--src/mess/drivers/applix.c3
-rw-r--r--src/mess/drivers/apricot.c3
-rw-r--r--src/mess/drivers/apricotp.c3
-rw-r--r--src/mess/drivers/attache.c1
-rw-r--r--src/mess/drivers/b16.c3
-rw-r--r--src/mess/drivers/bbc.c4
-rw-r--r--src/mess/drivers/bbcbc.c1
-rw-r--r--src/mess/drivers/bigbord2.c3
-rw-r--r--src/mess/drivers/bml3.c3
-rw-r--r--src/mess/drivers/bw12.c3
-rw-r--r--src/mess/drivers/c128.c1
-rw-r--r--src/mess/drivers/c65.c2
-rw-r--r--src/mess/drivers/camplynx.c6
-rw-r--r--src/mess/drivers/cbm2.c3
-rw-r--r--src/mess/drivers/coleco.c1
-rw-r--r--src/mess/drivers/compis.c1
-rw-r--r--src/mess/drivers/cortex.c1
-rw-r--r--src/mess/drivers/crvision.c1
-rw-r--r--src/mess/drivers/dgn_beta.c2
-rw-r--r--src/mess/drivers/dim68k.c3
-rw-r--r--src/mess/drivers/dmv.c1
-rw-r--r--src/mess/drivers/ec65.c5
-rw-r--r--src/mess/drivers/einstein.c5
-rw-r--r--src/mess/drivers/fp1100.c3
-rw-r--r--src/mess/drivers/fp6000.c3
-rw-r--r--src/mess/drivers/h19.c3
-rw-r--r--src/mess/drivers/hp9k.c13
-rw-r--r--src/mess/drivers/if800.c1
-rw-r--r--src/mess/drivers/ipds.c1
-rw-r--r--src/mess/drivers/kaypro.c3
-rw-r--r--src/mess/drivers/m20.c3
-rw-r--r--src/mess/drivers/m5.c1
-rw-r--r--src/mess/drivers/mbc200.c3
-rw-r--r--src/mess/drivers/mbc55x.c2
-rw-r--r--src/mess/drivers/mbee.c14
-rw-r--r--src/mess/drivers/mc10.c7
-rw-r--r--src/mess/drivers/micronic.c1
-rw-r--r--src/mess/drivers/msx.c1
-rw-r--r--src/mess/drivers/mtx.c1
-rw-r--r--src/mess/drivers/multi16.c3
-rw-r--r--src/mess/drivers/multi8.c3
-rw-r--r--src/mess/drivers/myb3k.c3
-rw-r--r--src/mess/drivers/mycom.c3
-rw-r--r--src/mess/drivers/mz3500.c2
-rw-r--r--src/mess/drivers/mz6500.c1
-rw-r--r--src/mess/drivers/nes.c1
-rw-r--r--src/mess/drivers/odyssey2.c2
-rw-r--r--src/mess/drivers/paso1600.c3
-rw-r--r--src/mess/drivers/pasopia.c3
-rw-r--r--src/mess/drivers/pasopia7.c5
-rw-r--r--src/mess/drivers/pc8001.c1
-rw-r--r--src/mess/drivers/pc9801.c2
-rw-r--r--src/mess/drivers/pce.c2
-rw-r--r--src/mess/drivers/pcfx.c1
-rw-r--r--src/mess/drivers/pencil2.c1
-rw-r--r--src/mess/drivers/pet.c4
-rw-r--r--src/mess/drivers/portfoli.c1
-rw-r--r--src/mess/drivers/pv1000.c2
-rw-r--r--src/mess/drivers/pv2000.c1
-rw-r--r--src/mess/drivers/pyl601.c6
-rw-r--r--src/mess/drivers/qx10.c1
-rw-r--r--src/mess/drivers/rainbow.c1
-rw-r--r--src/mess/drivers/rt1715.c1
-rw-r--r--src/mess/drivers/sg1000.c1
-rw-r--r--src/mess/drivers/sm1800.c1
-rw-r--r--src/mess/drivers/smc777.c3
-rw-r--r--src/mess/drivers/sms.c9
-rw-r--r--src/mess/drivers/socrates.c2
-rw-r--r--src/mess/drivers/super80.c3
-rw-r--r--src/mess/drivers/svi318.c5
-rw-r--r--src/mess/drivers/tandy2k.c2
-rw-r--r--src/mess/drivers/tdv2324.c1
-rw-r--r--src/mess/drivers/ti99_4x.c1
-rw-r--r--src/mess/drivers/ti99_8.c1
-rw-r--r--src/mess/drivers/tim100.c1
-rw-r--r--src/mess/drivers/tm990189.c1
-rw-r--r--src/mess/drivers/trs80m2.c5
-rw-r--r--src/mess/drivers/tutor.c1
-rw-r--r--src/mess/drivers/tvc.c3
-rw-r--r--src/mess/drivers/v6809.c3
-rw-r--r--src/mess/drivers/vg5k.c7
-rw-r--r--src/mess/drivers/victor9k.c3
-rw-r--r--src/mess/drivers/vidbrain.c1
-rw-r--r--src/mess/drivers/vii.c18
-rw-r--r--src/mess/drivers/vk100.c5
-rw-r--r--src/mess/drivers/vt100.c1
-rw-r--r--src/mess/drivers/vt240.c1
-rw-r--r--src/mess/drivers/x1.c3
-rw-r--r--src/mess/drivers/x1twin.c3
-rw-r--r--src/mess/drivers/z100.c3
-rw-r--r--src/mess/drivers/zrt80.c3
-rw-r--r--src/mess/includes/a7800.h2
-rw-r--r--src/mess/includes/amstrad.h2
-rw-r--r--src/mess/includes/aquarius.h2
-rw-r--r--src/mess/includes/mac.h2
-rw-r--r--src/mess/includes/macpci.h2
-rw-r--r--src/mess/includes/mz700.h2
-rw-r--r--src/mess/includes/pcw.h2
-rw-r--r--src/mess/includes/zx.h2
-rw-r--r--src/mess/machine/a2arcadebd.c1
-rw-r--r--src/mess/machine/a2videoterm.c3
-rw-r--r--src/mess/machine/amstrad.c2
-rw-r--r--src/mess/machine/c64/xl80.c3
-rw-r--r--src/mess/machine/comx_clm.c3
-rw-r--r--src/mess/machine/ecb_grip.c6
-rw-r--r--src/mess/machine/mz700.c2
-rw-r--r--src/mess/machine/radio86.c4
-rw-r--r--src/mess/machine/sms_lphaser.c2
-rw-r--r--src/mess/machine/sms_lphaser.h2
-rw-r--r--src/mess/machine/wangpc_lvc.c3
-rw-r--r--src/mess/machine/wangpc_mvc.c3
-rw-r--r--src/mess/machine/wangpc_tig.c2
-rw-r--r--src/mess/video/abc1600.c3
-rw-r--r--src/mess/video/abc800.c3
-rw-r--r--src/mess/video/abc802.c3
-rw-r--r--src/mess/video/abc806.c3
-rw-r--r--src/mess/video/bbc.c1
-rw-r--r--src/mess/video/comx35.c4
-rw-r--r--src/mess/video/crtc_ega.c14
-rw-r--r--src/mess/video/crtc_ega.h6
-rw-r--r--src/mess/video/dgn_beta.c1
-rw-r--r--src/mess/video/ef9345.c28
-rw-r--r--src/mess/video/ef9345.h13
-rw-r--r--src/mess/video/gb_lcd.c3
-rw-r--r--src/mess/video/gb_lcd.h4
-rw-r--r--src/mess/video/isa_cga.c3
-rw-r--r--src/mess/video/isa_ega.c2
-rw-r--r--src/mess/video/isa_mda.c6
-rw-r--r--src/mess/video/k1ge.c3
-rw-r--r--src/mess/video/k1ge.h10
-rw-r--r--src/mess/video/kyocera.c1
-rw-r--r--src/mess/video/mbc55x.c1
-rw-r--r--src/mess/video/mikromik.c2
-rw-r--r--src/mess/video/mos6566.c3
-rw-r--r--src/mess/video/mos6566.h27
-rw-r--r--src/mess/video/nick.c2
-rw-r--r--src/mess/video/nick.h8
-rw-r--r--src/mess/video/nubus_m2hires.c13
-rw-r--r--src/mess/video/nubus_m2hires.h2
-rw-r--r--src/mess/video/nubus_m2video.c13
-rw-r--r--src/mess/video/nubus_m2video.h2
-rw-r--r--src/mess/video/nubus_radiustpd.c13
-rw-r--r--src/mess/video/nubus_radiustpd.h2
-rw-r--r--src/mess/video/nubus_spec8.c12
-rw-r--r--src/mess/video/nubus_spec8.h2
-rw-r--r--src/mess/video/nubus_specpdq.c11
-rw-r--r--src/mess/video/nubus_specpdq.h2
-rw-r--r--src/mess/video/nubus_wsportrait.c12
-rw-r--r--src/mess/video/nubus_wsportrait.h2
-rw-r--r--src/mess/video/pc1512.c3
-rw-r--r--src/mess/video/pc8401a.c3
-rw-r--r--src/mess/video/pc_aga.c3
-rw-r--r--src/mess/video/pc_t1t.c6
-rw-r--r--src/mess/video/pds30_30hr.c13
-rw-r--r--src/mess/video/pds30_30hr.h2
-rw-r--r--src/mess/video/pds30_cb264.c13
-rw-r--r--src/mess/video/pds30_cb264.h2
-rw-r--r--src/mess/video/pds30_mc30.c13
-rw-r--r--src/mess/video/pds30_mc30.h2
-rw-r--r--src/mess/video/pds30_procolor816.c13
-rw-r--r--src/mess/video/pds30_procolor816.h2
-rw-r--r--src/mess/video/pds30_sigmalview.c11
-rw-r--r--src/mess/video/pds30_sigmalview.h2
-rw-r--r--src/mess/video/pds_tpdfpd.c12
-rw-r--r--src/mess/video/pds_tpdfpd.h2
-rw-r--r--src/mess/video/pecom.c1
-rw-r--r--src/mess/video/tmc600.c1
-rw-r--r--src/mess/video/uv201.c6
-rw-r--r--src/mess/video/uv201.h6
-rw-r--r--src/mess/video/v1050.c3
-rw-r--r--src/mess/video/vic4567.c31
-rw-r--r--src/mess/video/vic4567.h6
-rw-r--r--src/mess/video/vtvideo.c11
-rw-r--r--src/mess/video/vtvideo.h3
-rw-r--r--src/mess/video/zx8301.c5
-rw-r--r--src/mess/video/zx8301.h2
428 files changed, 820 insertions, 1361 deletions
diff --git a/.gitattributes b/.gitattributes
index 850d91dea3d..04a8b21ceae 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1048,6 +1048,8 @@ src/emu/disound.c svneol=native#text/plain
src/emu/disound.h svneol=native#text/plain
src/emu/distate.c svneol=native#text/plain
src/emu/distate.h svneol=native#text/plain
+src/emu/divideo.c svneol=native#text/plain
+src/emu/divideo.h svneol=native#text/plain
src/emu/drawgfx.c svneol=native#text/plain
src/emu/drawgfx.h svneol=native#text/plain
src/emu/drawgfxm.h svneol=native#text/plain
diff --git a/src/emu/divideo.c b/src/emu/divideo.c
new file mode 100644
index 00000000000..5844754e0e1
--- /dev/null
+++ b/src/emu/divideo.c
@@ -0,0 +1,144 @@
+/***************************************************************************
+
+ divideo.c
+
+ Device video interfaces.
+
+****************************************************************************
+
+ Copyright Aaron Giles
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name 'MAME' nor the names of its contributors may be
+ used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+***************************************************************************/
+
+#include "emu.h"
+
+
+
+//**************************************************************************
+// DEVICE VIDEO INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_video_interface - constructor
+//-------------------------------------------------
+
+device_video_interface::device_video_interface(const machine_config &mconfig, device_t &device, bool screen_required)
+ : device_interface(device),
+ m_screen_required(screen_required),
+ m_screen_tag(NULL),
+ m_screen(NULL)
+{
+}
+
+
+//-------------------------------------------------
+// ~device_video_interface - destructor
+//-------------------------------------------------
+
+device_video_interface::~device_video_interface()
+{
+}
+
+
+//-------------------------------------------------
+// static_add_route - configuration helper to add
+// a new route to the device
+//-------------------------------------------------
+
+void device_video_interface::static_set_screen(device_t &device, const char *tag)
+{
+ // find our video interface
+ device_video_interface *video;
+ if (!device.interface(video))
+ throw emu_fatalerror("MCFG_VIDEO_SET_SCREEN called on device '%s' with no video interface", device.tag());
+ video->m_screen_tag = tag;
+}
+
+
+//-------------------------------------------------
+// interface_validity_check - validation for a
+// device after the configuration has been
+// constructed
+//-------------------------------------------------
+
+void device_video_interface::interface_validity_check(validity_checker &valid) const
+{
+ // find the screen device
+ screen_device *screen = NULL;
+ if (m_screen_tag != NULL)
+ {
+ screen = device().siblingdevice<screen_device>(m_screen_tag);
+ if (screen == NULL)
+ mame_printf_error("Screen '%s' not found, explicitly set for device '%s'", m_screen_tag, device().tag());
+ }
+
+ // if no device, look for a single match
+ if (screen == NULL)
+ {
+ screen_device_iterator iter(device().mconfig().root_device());
+ screen = iter.first();
+ if (screen == NULL && m_screen_required)
+ mame_printf_error("Device '%s' requires a screen", device().tag());
+ if (iter.next() != NULL)
+ mame_printf_error("No screen specified for device '%s', but multiple screens found", device().tag());
+ }
+}
+
+
+//-------------------------------------------------
+// interface_pre_start - make sure all our input
+// devices are started
+//-------------------------------------------------
+
+void device_video_interface::interface_pre_start()
+{
+ // find the screen device
+ if (m_screen_tag != NULL)
+ {
+ m_screen = device().siblingdevice<screen_device>(m_screen_tag);
+ if (m_screen == NULL)
+ throw emu_fatalerror("Screen '%s' not found, explicitly set for device '%s'", m_screen_tag, device().tag());
+ }
+
+ // if no device, look for a single match
+ if (m_screen == NULL)
+ {
+ screen_device_iterator iter(device().machine().root_device());
+ m_screen = iter.first();
+ if (m_screen == NULL && m_screen_required)
+ throw emu_fatalerror("Device '%s' requires a screen", device().tag());
+ if (iter.next() != NULL)
+ throw emu_fatalerror("No screen specified for device '%s', but multiple screens found", device().tag());
+ }
+
+ // if we have a screen and it's not started, wait for it
+ if (m_screen != NULL && !m_screen->started())
+ throw device_missing_dependencies();
+}
diff --git a/src/emu/divideo.h b/src/emu/divideo.h
new file mode 100644
index 00000000000..5b037e3b865
--- /dev/null
+++ b/src/emu/divideo.h
@@ -0,0 +1,95 @@
+/***************************************************************************
+
+ divideo.h
+
+ Device video interfaces.
+
+****************************************************************************
+
+ Copyright Aaron Giles
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name 'MAME' nor the names of its contributors may be
+ used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __EMU_H__
+#error Dont include this file directly; include emu.h instead.
+#endif
+
+#ifndef __DIVIDEO_H__
+#define __DIVIDEO_H__
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_VIDEO_SET_SCREEN(_tag) \
+ device_video_interface::static_set_screen(*device, _tag);
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> device_video_interface
+
+class device_video_interface : public device_interface
+{
+public:
+ // construction/destruction
+ device_video_interface(const machine_config &mconfig, device_t &device, bool screen_required = true);
+ virtual ~device_video_interface();
+
+ // static configuration
+ static void static_set_screen(device_t &device, const char *tag);
+
+ // getters
+ screen_device &screen() const { return *m_screen; }
+
+protected:
+ // optional operation overrides
+ virtual void interface_validity_check(validity_checker &valid) const;
+ virtual void interface_pre_start();
+
+ // configuration state
+ bool m_screen_required; // is a screen required?
+ const char * m_screen_tag; // configured tag for the target screen
+
+ // internal state
+ screen_device * m_screen; // pointer to the screen device
+};
+
+// iterator
+typedef device_interface_iterator<device_video_interface> video_interface_iterator;
+
+
+#endif /* __DIVIDEO_H__ */
diff --git a/src/emu/driver.c b/src/emu/driver.c
index deab4dbe73b..6bb2a087846 100644
--- a/src/emu/driver.c
+++ b/src/emu/driver.c
@@ -63,6 +63,7 @@ ADDRESS_MAP_END
driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag)
: device_t(mconfig, type, "Driver Device", tag, NULL, 0, "", __FILE__),
device_memory_interface(mconfig, *this),
+ m_screen(*this, "screen"),
m_generic_paletteram_8(*this, "paletteram"),
m_generic_paletteram2_8(*this, "paletteram2"),
m_generic_paletteram_16(*this, "paletteram"),
diff --git a/src/emu/driver.h b/src/emu/driver.h
index 5f614d5aa70..af43ab408e1 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -422,6 +422,9 @@ protected:
inline UINT32 paletteram32_be(offs_t offset) const { return m_generic_paletteram_16[offset | 1] | (m_generic_paletteram_16[offset & ~1] << 16); }
public:
+ // generic devices
+ optional_device<screen_device> m_screen;
+
// generic pointers
optional_shared_ptr<UINT8> m_generic_paletteram_8;
optional_shared_ptr<UINT8> m_generic_paletteram2_8;
diff --git a/src/emu/emu.h b/src/emu/emu.h
index f7d8ee6bdb7..d46e94f838e 100644
--- a/src/emu/emu.h
+++ b/src/emu/emu.h
@@ -101,6 +101,7 @@ typedef device_t * (*machine_config_constructor)(machine_config &config, device_
#include "diserial.h"
#include "dislot.h"
#include "disound.h"
+#include "divideo.h"
#include "dinvram.h"
#include "dirtc.h"
#include "didisasm.h"
diff --git a/src/emu/emu.mak b/src/emu/emu.mak
index 03012f7c80b..5639cf85f4b 100644
--- a/src/emu/emu.mak
+++ b/src/emu/emu.mak
@@ -71,6 +71,7 @@ EMUOBJS = \
$(EMUOBJ)/dislot.o \
$(EMUOBJ)/disound.o \
$(EMUOBJ)/distate.o \
+ $(EMUOBJ)/divideo.o \
$(EMUOBJ)/drawgfx.o \
$(EMUOBJ)/driver.o \
$(EMUOBJ)/drivenum.o \
diff --git a/src/emu/machine/k053252.c b/src/emu/machine/k053252.c
index b798e83b203..2fcc98f06d6 100644
--- a/src/emu/machine/k053252.c
+++ b/src/emu/machine/k053252.c
@@ -59,7 +59,8 @@ TODO:
const device_type K053252 = &device_creator<k053252_device>;
k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, K053252, "Konami 053252", tag, owner, clock, "k053252", __FILE__)
+ : device_t(mconfig, K053252, "Konami 053252", tag, owner, clock, "k053252", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -79,7 +80,6 @@ void k053252_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
memset(&m_int1_en, 0, sizeof(m_int1_en));
memset(&m_int2_en, 0, sizeof(m_int2_en));
memset(&m_int1_ack, 0, sizeof(m_int1_ack));
@@ -95,7 +95,6 @@ void k053252_device::device_config_complete()
void k053252_device::device_start()
{
save_item(NAME(m_regs));
- m_screen = machine().device<screen_device>(m_screen_tag);
m_int1_en_func.resolve(m_int1_en, *this);
m_int2_en_func.resolve(m_int2_en, *this);
m_int1_ack_func.resolve(m_int1_ack, *this);
@@ -141,28 +140,25 @@ READ8_MEMBER( k053252_device::read )
void k053252_device::res_change()
{
- if(m_screen != NULL)
+ if(m_hc && m_vc &&
+ m_hbp && m_hfp &&
+ m_vbp && m_vfp &&
+ m_hsw && m_vsw) //safety checks
{
- if(m_hc && m_vc &&
- m_hbp && m_hfp &&
- m_vbp && m_vfp &&
- m_hsw && m_vsw) //safety checks
- {
- rectangle visarea;
- //(HC+1) - HFP - HBP - 8*(HSW+1)
- //VC - VFP - VBP - (VSW+1)
- attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * (m_hc) * m_vc;
-
- //printf("H %d %d %d %d\n",m_hc,m_hfp,m_hbp,m_hsw);
- //printf("V %d %d %d %d\n",m_vc,m_vfp,m_vbp,m_vsw);
-
- visarea.min_x = m_offsx;
- visarea.min_y = m_offsy;
- visarea.max_x = m_offsx + m_hc - m_hfp - m_hbp - 8*(m_hsw) - 1;
- visarea.max_y = m_offsy + m_vc - m_vfp - m_vbp - (m_vsw) - 1;
-
- m_screen->configure(m_hc, m_vc, visarea, refresh);
- }
+ rectangle visarea;
+ //(HC+1) - HFP - HBP - 8*(HSW+1)
+ //VC - VFP - VBP - (VSW+1)
+ attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * (m_hc) * m_vc;
+
+ //printf("H %d %d %d %d\n",m_hc,m_hfp,m_hbp,m_hsw);
+ //printf("V %d %d %d %d\n",m_vc,m_vfp,m_vbp,m_vsw);
+
+ visarea.min_x = m_offsx;
+ visarea.min_y = m_offsy;
+ visarea.max_x = m_offsx + m_hc - m_hfp - m_hbp - 8*(m_hsw) - 1;
+ visarea.max_y = m_offsy + m_vc - m_vfp - m_vbp - (m_vsw) - 1;
+
+ m_screen->configure(m_hc, m_vc, visarea, refresh);
}
}
diff --git a/src/emu/machine/k053252.h b/src/emu/machine/k053252.h
index 1eef2e67b36..d3fb6714488 100644
--- a/src/emu/machine/k053252.h
+++ b/src/emu/machine/k053252.h
@@ -8,7 +8,6 @@
struct k053252_interface
{
- const char *m_screen_tag;
devcb_write_line m_int1_en;
devcb_write_line m_int2_en;
devcb_write_line m_int1_ack;
@@ -19,6 +18,7 @@ struct k053252_interface
};
class k053252_device : public device_t,
+ public device_video_interface,
public k053252_interface
{
public:
@@ -43,7 +43,6 @@ protected:
UINT16 m_vc,m_vfp,m_vbp;
UINT8 m_vsw,m_hsw;
- screen_device *m_screen;
devcb_resolved_write_line m_int1_en_func;
devcb_resolved_write_line m_int2_en_func;
devcb_resolved_write_line m_int1_ack_func;
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index 8d4dc3eb2a1..2feb73638ac 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -89,7 +89,7 @@ const UINT32 VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_
laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
- m_screen_name(NULL),
+ device_video_interface(mconfig, *this),
m_overwidth(0),
m_overheight(0),
m_overclip(0, -1, 0, -1),
@@ -236,16 +236,6 @@ UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm
//-------------------------------------------------
-// static_set_screen - set the screen name
-//-------------------------------------------------
-
-void laserdisc_device::static_set_screen(device_t &device, const char *screen)
-{
- downcast<laserdisc_device &>(device).m_screen_name = screen;
-}
-
-
-//-------------------------------------------------
// static_set_get_disc - set the get disc
// delegate
//-------------------------------------------------
@@ -340,12 +330,6 @@ void laserdisc_device::static_set_overlay_scale(device_t &device, float scalex,
void laserdisc_device::device_start()
{
- // ensure that our screen is started first
- m_screen = machine().device<screen_device>(m_screen_name);
- assert(m_screen != NULL);
- if (!m_screen->started())
- throw device_missing_dependencies();
-
// initialize the various pieces
init_disc();
init_video();
diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h
index 2960a948f9e..4c5c3b1650a 100644
--- a/src/emu/machine/laserdsc.h
+++ b/src/emu/machine/laserdsc.h
@@ -158,6 +158,7 @@ struct laserdisc_overlay_config
// base laserdisc class
class laserdisc_device : public device_t,
public device_sound_interface,
+ public device_video_interface,
public laserdisc_overlay_config
{
protected:
@@ -186,7 +187,6 @@ public:
void set_overlay_config(const laserdisc_overlay_config &config) { static_cast<laserdisc_overlay_config &>(*this) = config; }
// static configuration helpers
- static void static_set_screen(device_t &device, const char *screen);
static void static_set_get_disc(device_t &device, laserdisc_get_disc_delegate callback);
static void static_set_audio(device_t &device, laserdisc_audio_delegate callback);
static void static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_ind16_delegate update);
@@ -270,7 +270,6 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
// subclass helpers
- screen_device &screen() { assert(m_screen != NULL); return *m_screen; }
void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); }
void set_video_squelch(bool squelch) { m_videosquelch = squelch; }
void set_slider_speed(INT32 tracks_per_vsync);
@@ -314,7 +313,6 @@ private:
// configuration
laserdisc_get_disc_delegate m_getdisc_callback;
laserdisc_audio_delegate m_audio_callback; // audio streaming callback
- const char * m_screen_name; // name of the screen device
laserdisc_overlay_config m_orig_config; // original overlay configuration
UINT32 m_overwidth; // overlay screen width
UINT32 m_overheight; // overlay screen height
@@ -347,7 +345,6 @@ private:
attotime m_sliderupdate; // time of last slider update
// video data
- screen_device * m_screen; // pointer to the screen device
frame_data m_frame[3]; // circular list of frames
UINT8 m_videoindex; // index of the current video buffer
bitmap_yuy16 m_emptyframe; // blank frame
diff --git a/src/emu/sound/cdp1864.c b/src/emu/sound/cdp1864.c
index 22a81b3b36b..d33fb89a557 100644
--- a/src/emu/sound/cdp1864.c
+++ b/src/emu/sound/cdp1864.c
@@ -100,6 +100,7 @@ inline void cdp1864_device::initialize_palette()
cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1864, "CDP1864", tag, owner, clock, "cdp1864", __FILE__),
device_sound_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_read_inlace(*this),
m_read_rdata(*this),
m_read_bdata(*this),
@@ -147,7 +148,6 @@ void cdp1864_device::device_start()
m_hsync_timer = timer_alloc(TIMER_HSYNC);
// find devices
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// register for state saving
diff --git a/src/emu/sound/cdp1864.h b/src/emu/sound/cdp1864.h
index 56d12771ea2..0b5407715ea 100644
--- a/src/emu/sound/cdp1864.h
+++ b/src/emu/sound/cdp1864.h
@@ -82,7 +82,7 @@
#define MCFG_CDP1864_ADD(_tag, _screen_tag, _clock, _inlace, _irq, _dma_out, _efx, _hsync, _rdata, _bdata, _gdata) \
MCFG_SOUND_ADD(_tag, CDP1864, _clock) \
- downcast<cdp1864_device *>(device)->set_screen_tag(_screen_tag); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1864_device *>(device)->set_inlace_callback(DEVCB2_##_inlace); \
downcast<cdp1864_device *>(device)->set_irq_callback(DEVCB2_##_irq); \
downcast<cdp1864_device *>(device)->set_dma_out_callback(DEVCB2_##_dma_out); \
@@ -108,13 +108,13 @@
// ======================> cdp1864_device
class cdp1864_device : public device_t,
- public device_sound_interface
+ public device_sound_interface,
+ public device_video_interface
{
public:
// construction/destruction
cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_screen_tag(const char *screen_tag) { m_screen_tag = screen_tag; }
template<class _inlace> void set_inlace_callback(_inlace inlace) { m_read_inlace.set_callback(inlace); }
template<class _irq> void set_irq_callback(_irq irq) { m_write_irq.set_callback(irq); }
template<class _dma_out> void set_dma_out_callback(_dma_out dma_out) { m_write_dma_out.set_callback(dma_out); }
@@ -168,8 +168,6 @@ private:
devcb2_write_line m_write_efx;
devcb2_write_line m_write_hsync;
- const char *m_screen_tag;
- screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
sound_stream *m_stream; // sound output
diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c
index 4f51520b76c..0238ac8d194 100644
--- a/src/emu/sound/cdp1869.c
+++ b/src/emu/sound/cdp1869.c
@@ -344,6 +344,7 @@ inline int cdp1869_device::get_pen(int ccb0, int ccb1, int pcb)
cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1869, "RCA CDP1869", tag, owner, clock, "cdp1869", __FILE__),
device_sound_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
m_stream(NULL),
m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, NULL, *ADDRESS_MAP_NAME(cdp1869))
@@ -382,10 +383,6 @@ void cdp1869_device::device_config_complete()
void cdp1869_device::device_start()
{
- // get the screen device
- m_screen = machine().device<screen_device>(screen_tag);
- assert(m_screen != NULL);
-
// resolve callbacks
m_in_pal_ntsc_func.resolve(in_pal_ntsc_cb, *this);
m_out_prd_func.resolve(out_prd_cb, *this);
diff --git a/src/emu/sound/cdp1869.h b/src/emu/sound/cdp1869.h
index 6eb0cd45e74..ee8f02722a0 100644
--- a/src/emu/sound/cdp1869.h
+++ b/src/emu/sound/cdp1869.h
@@ -155,6 +155,8 @@
#define CDP1869_INTERFACE(_name) \
const cdp1869_interface (_name) =
+#define MCFG_CDP1869_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define CDP1869_CHAR_RAM_READ(name) UINT8 name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd)
#define CDP1869_CHAR_RAM_WRITE(name) void name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data)
#define CDP1869_PCB_READ(name) int name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd)
@@ -180,8 +182,6 @@ typedef int (*cdp1869_pcb_read_func)(device_t *device, UINT16 pma, UINT8 cma, UI
struct cdp1869_interface
{
- const char *screen_tag; // screen we are acting on
-
// pixel clock of the chip is the device clock
int color_clock; // the chroma clock of the chip
@@ -207,6 +207,7 @@ struct cdp1869_interface
class cdp1869_device : public device_t,
public device_sound_interface,
+ public device_video_interface,
public device_memory_interface,
public cdp1869_interface
{
@@ -272,7 +273,6 @@ private:
cdp1869_char_ram_read_func m_in_char_ram_func;
cdp1869_char_ram_write_func m_out_char_ram_func;
- screen_device *m_screen;
//address_space *m_page_ram;
emu_timer *m_prd_timer;
sound_stream *m_stream;
diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c
index cd63a0e8c59..5b37431a4ab 100644
--- a/src/emu/sound/mos6560.c
+++ b/src/emu/sound/mos6560.c
@@ -690,6 +690,7 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type,
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_variant(variant),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
@@ -702,6 +703,7 @@ mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, MOS6560, "MOS6560", tag, owner, clock, "mos6560", __FILE__),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_variant(TYPE_6560),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
@@ -739,9 +741,7 @@ const address_space_config *mos6560_device::memory_space_config(address_spacenum
void mos6560_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
- assert(m_screen);
// resolve callbacks
m_read_potx.resolve_safe(0xff);
diff --git a/src/emu/sound/mos6560.h b/src/emu/sound/mos6560.h
index 0d83aa58b4f..605c0a8b0e2 100644
--- a/src/emu/sound/mos6560.h
+++ b/src/emu/sound/mos6560.h
@@ -51,7 +51,8 @@
MCFG_SCREEN_VISIBLE_AREA(MOS6560_MAME_XPOS, MOS6560_MAME_XPOS + MOS6560_MAME_XSIZE - 1, MOS6560_MAME_YPOS, MOS6560_MAME_YPOS + MOS6560_MAME_YSIZE - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6560, _clock) \
- downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_##_potx, DEVCB2_##_poty); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@@ -63,7 +64,8 @@
MCFG_SCREEN_VISIBLE_AREA(MOS6561_MAME_XPOS, MOS6561_MAME_XPOS + MOS6561_MAME_XSIZE - 1, MOS6561_MAME_YPOS, MOS6561_MAME_YPOS + MOS6561_MAME_YSIZE - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6561, _clock) \
- downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_##_potx, DEVCB2_##_poty); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@@ -75,7 +77,8 @@
MCFG_SCREEN_VISIBLE_AREA(0, 23*8 - 1, 0, 22*8 - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS656X_ATTACK_UFO, _clock) \
- downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_NULL, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_NULL, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@@ -125,14 +128,14 @@
class mos6560_device : public device_t,
public device_memory_interface,
- public device_sound_interface
+ public device_sound_interface,
+ public device_video_interface
{
public:
mos6560_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- template<class _potx, class _poty> void set_callbacks(const char *screen_tag, _potx potx, _poty poty) {
- m_screen_tag = screen_tag;
+ template<class _potx, class _poty> void set_callbacks(_potx potx, _poty poty) {
m_read_potx.set_callback(potx);
m_read_poty.set_callback(poty);
}
@@ -187,9 +190,6 @@ protected:
devcb2_read8 m_read_potx;
devcb2_read8 m_read_poty;
- const char *m_screen_tag;
- screen_device *m_screen;
-
UINT8 m_reg[16];
bitmap_rgb32 m_bitmap;
diff --git a/src/emu/sound/mos7360.c b/src/emu/sound/mos7360.c
index b90867ee921..51614edf0ca 100644
--- a/src/emu/sound/mos7360.c
+++ b/src/emu/sound/mos7360.c
@@ -258,6 +258,7 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, MOS7360, "MOS7360", tag, owner, clock, "mos7360", __FILE__),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mos7360_videoram_map)),
m_write_irq(*this),
m_read_k(*this),
@@ -272,10 +273,6 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
void mos7360_device::device_start()
{
- // get the screen device
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
-
// get the CPU device
m_cpu = machine().device<cpu_device>(m_cpu_tag);
assert(m_cpu != NULL);
diff --git a/src/emu/sound/mos7360.h b/src/emu/sound/mos7360.h
index 29d9761398b..4693a97b2b3 100644
--- a/src/emu/sound/mos7360.h
+++ b/src/emu/sound/mos7360.h
@@ -52,7 +52,8 @@
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos7360_device, screen_update) \
MCFG_DEVICE_ADD(_tag, MOS7360, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
- downcast<mos7360_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k);
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos7360_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k);
@@ -89,15 +90,15 @@
class mos7360_device : public device_t,
public device_memory_interface,
- public device_sound_interface
+ public device_sound_interface,
+ public device_video_interface
{
public:
// construction/destruction
//mos7360_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- template<class _irq, class _k> void set_callbacks(const char *screen_tag, const char *cpu_tag, _irq irq, _k k) {
- m_screen_tag = screen_tag;
+ template<class _irq, class _k> void set_callbacks(const char *cpu_tag, _irq irq, _k k) {
m_cpu_tag = cpu_tag;
m_write_irq.set_callback(irq);
m_read_k.set_callback(k);
@@ -156,9 +157,7 @@ protected:
devcb2_write_line m_write_irq;
devcb2_read8 m_read_k;
- const char *m_screen_tag;
const char *m_cpu_tag;
- screen_device *m_screen; // screen which sets bitmap properties
cpu_device *m_cpu;
sound_stream *m_stream;
diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c
index a30f9c62d4c..e9b8fe524ce 100644
--- a/src/emu/video/315_5124.c
+++ b/src/emu/video/315_5124.c
@@ -141,6 +141,7 @@ ADDRESS_MAP_END
sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t( mconfig, SEGA315_5124, "Sega 315-5124", tag, owner, clock, "sega315_5124", __FILE__)
, device_memory_interface(mconfig, *this)
+ , device_video_interface(mconfig, *this)
, m_cram_size( SEGA315_5124_CRAM_SIZE )
, m_palette_offset( 0 )
, m_supports_224_240( false )
@@ -152,6 +153,7 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const ch
sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 cram_size, UINT8 palette_offset, bool supports_224_240, const char *shortname, const char *source)
: device_t( mconfig, type, name, tag, owner, clock, shortname, source)
, device_memory_interface(mconfig, *this)
+ , device_video_interface(mconfig, *this)
, m_cram_size( cram_size )
, m_palette_offset( palette_offset )
, m_supports_224_240( supports_224_240 )
@@ -1703,8 +1705,6 @@ void sega315_5124_device::vdp_postload()
void sega315_5124_device::device_start()
{
- m_screen = machine().device<screen_device>( m_screen_tag );
-
/* Resolve callbacks */
m_cb_int.resolve( m_int_callback, *this );
m_cb_pause.resolve( m_pause_callback, *this );
diff --git a/src/emu/video/315_5124.h b/src/emu/video/315_5124.h
index bbdfb819fc0..e5d0ee7433c 100644
--- a/src/emu/video/315_5124.h
+++ b/src/emu/video/315_5124.h
@@ -53,7 +53,6 @@ PALETTE_INIT( sega315_5378 );
struct sega315_5124_interface
{
bool m_is_pal; /* false = NTSC, true = PAL */
- const char *m_screen_tag;
devcb_write_line m_int_callback; /* Interrupt callback function */
devcb_write_line m_pause_callback; /* Pause callback function */
};
@@ -66,7 +65,8 @@ extern const device_type SEGA315_5378; /* aka Gamegear vdp */
class sega315_5124_device : public device_t,
public sega315_5124_interface,
- public device_memory_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
@@ -158,7 +158,6 @@ protected:
emu_timer *m_check_hint_timer;
emu_timer *m_check_vint_timer;
emu_timer *m_draw_timer;
- screen_device *m_screen;
const address_space_config m_space_config;
@@ -204,12 +203,18 @@ protected:
MCFG_DEVICE_ADD(_tag, SEGA315_5124, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_SEGA315_5124_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define MCFG_SEGA315_5246_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, SEGA315_5246, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_SEGA315_5246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define MCFG_SEGA315_5378_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, SEGA315_5378, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_SEGA315_5378_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#endif /* __SEGA315_5124_H__ */
diff --git a/src/emu/video/cdp1861.c b/src/emu/video/cdp1861.c
index 23a6157e3e0..b2fb9c904a4 100644
--- a/src/emu/video/cdp1861.c
+++ b/src/emu/video/cdp1861.c
@@ -41,6 +41,7 @@ const device_type CDP1861 = &device_creator<cdp1861_device>;
cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1861, "CDP1861", tag, owner, clock, "cdp1861", __FILE__),
+ device_video_interface(mconfig, *this),
m_write_irq(*this),
m_write_dma_out(*this),
m_write_efx(*this)
@@ -65,7 +66,6 @@ void cdp1861_device::device_start()
m_dma_timer = timer_alloc(TIMER_DMA);
// find devices
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// register for state saving
diff --git a/src/emu/video/cdp1861.h b/src/emu/video/cdp1861.h
index 67478835883..f7e69f066a6 100644
--- a/src/emu/video/cdp1861.h
+++ b/src/emu/video/cdp1861.h
@@ -67,7 +67,7 @@
#define MCFG_CDP1861_ADD(_tag, _screen_tag, _clock, _irq, _dma_out, _efx) \
MCFG_DEVICE_ADD(_tag, CDP1861, _clock) \
- downcast<cdp1861_device *>(device)->set_screen_tag(_screen_tag); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1861_device *>(device)->set_irq_callback(DEVCB2_##_irq); \
downcast<cdp1861_device *>(device)->set_dma_out_callback(DEVCB2_##_dma_out); \
downcast<cdp1861_device *>(device)->set_efx_callback(DEVCB2_##_efx);
@@ -85,13 +85,13 @@
// ======================> cdp1861_device
-class cdp1861_device : public device_t
+class cdp1861_device : public device_t,
+ public device_video_interface
{
public:
// construction/destruction
cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_screen_tag(const char *screen_tag) { m_screen_tag = screen_tag; }
template<class _irq> void set_irq_callback(_irq irq) { m_write_irq.set_callback(irq); }
template<class _dma_out> void set_dma_out_callback(_dma_out dma_out) { m_write_dma_out.set_callback(dma_out); }
template<class _efx> void set_efx_callback(_efx efx) { m_write_efx.set_callback(efx); }
@@ -120,8 +120,6 @@ private:
devcb2_write_line m_write_dma_out;
devcb2_write_line m_write_efx;
- const char *m_screen_tag;
- screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
int m_disp; // display enabled
diff --git a/src/emu/video/cdp1862.c b/src/emu/video/cdp1862.c
index d57b2678f18..350dae54248 100644
--- a/src/emu/video/cdp1862.c
+++ b/src/emu/video/cdp1862.c
@@ -78,6 +78,7 @@ inline void cdp1862_device::initialize_palette()
cdp1862_device::cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1862, "CDP1862", tag, owner, clock, "cdp1862", __FILE__),
+ device_video_interface(mconfig, *this),
m_read_rd(*this),
m_read_bd(*this),
m_read_gd(*this)
@@ -97,7 +98,6 @@ void cdp1862_device::device_start()
m_read_gd.resolve_safe(0);
// find devices
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// init palette
diff --git a/src/emu/video/cdp1862.h b/src/emu/video/cdp1862.h
index 256993d976a..9273ad03c6b 100644
--- a/src/emu/video/cdp1862.h
+++ b/src/emu/video/cdp1862.h
@@ -45,7 +45,7 @@
#define MCFG_CDP1862_ADD(_tag, _screen_tag, _clock, _rd, _bd, _gd) \
MCFG_DEVICE_ADD(_tag, CDP1862, _clock) \
- downcast<cdp1862_device *>(device)->set_screen_tag(_screen_tag); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1862_device *>(device)->set_rd_callback(DEVCB2_##_rd); \
downcast<cdp1862_device *>(device)->set_bd_callback(DEVCB2_##_bd); \
downcast<cdp1862_device *>(device)->set_gd_callback(DEVCB2_##_gd);
@@ -64,13 +64,13 @@
// ======================> cdp1862_device
-class cdp1862_device : public device_t
+class cdp1862_device : public device_t,
+ public device_video_interface
{
public:
// construction/destruction
cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_screen_tag(const char *screen_tag) { m_screen_tag = screen_tag; }
template<class _rd> void set_rd_callback(_rd rd) { m_read_rd.set_callback(rd); }
template<class _bd> void set_bd_callback(_bd bd) { m_read_bd.set_callback(bd); }
template<class _gd> void set_gd_callback(_gd gd) { m_read_gd.set_callback(gd); }
@@ -95,8 +95,6 @@ private:
devcb2_read_line m_read_bd;
devcb2_read_line m_read_gd;
- const char *m_screen_tag;
- screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
double m_lum_r; // red luminance resistor value
diff --git a/src/emu/video/crt9007.c b/src/emu/video/crt9007.c
index 5fcf834e7d4..ea32be6420a 100644
--- a/src/emu/video/crt9007.c
+++ b/src/emu/video/crt9007.c
@@ -448,6 +448,7 @@ inline void crt9007_device::recompute_parameters()
crt9007_device::crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CRT9007, "SMC CRT9007", tag, owner, clock, "crt9007", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(crt9007))
{
for (int i = 0; i < 0x3d; i++)
@@ -511,10 +512,6 @@ void crt9007_device::device_start()
m_out_slg_func.resolve(m_out_slg_cb, *this);
m_out_sld_func.resolve(m_out_sld_cb, *this);
- // get the screen device
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
-
// set horizontal pixels per column
m_hpixels_per_column = hpixels_per_column;
diff --git a/src/emu/video/crt9007.h b/src/emu/video/crt9007.h
index cb77f38b784..12790ee4ffa 100644
--- a/src/emu/video/crt9007.h
+++ b/src/emu/video/crt9007.h
@@ -70,7 +70,6 @@
struct crt9007_interface
{
- const char *m_screen_tag; /* screen we are acting on */
int hpixels_per_column; /* number of pixels per video memory address */
devcb_write_line m_out_int_cb;
@@ -94,6 +93,7 @@ struct crt9007_interface
class crt9007_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public crt9007_interface
{
public:
@@ -152,8 +152,6 @@ private:
devcb_resolved_write_line m_out_slg_func;
devcb_resolved_write_line m_out_sld_func;
- screen_device *m_screen;
-
// registers
UINT8 m_reg[0x3d];
UINT8 m_status;
diff --git a/src/emu/video/crt9021.c b/src/emu/video/crt9021.c
index 08615054fbe..1eeaa641268 100644
--- a/src/emu/video/crt9021.c
+++ b/src/emu/video/crt9021.c
@@ -82,7 +82,8 @@ enum
//-------------------------------------------------
crt9021_device::crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, CRT9021, "SMC CRT9021", tag, owner, clock, "crt9021", __FILE__)
+ : device_t(mconfig, CRT9021, "SMC CRT9021", tag, owner, clock, "crt9021", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -123,10 +124,6 @@ void crt9021_device::device_start()
m_in_attr_func.resolve(in_attr_cb, *this);
m_in_atten_func.resolve(in_atten_cb, *this);
- // get the screen device
- m_screen = machine().device<screen_device>(screen_tag);
- assert(m_screen != NULL);
-
// register for state saving
save_item(NAME(m_slg));
save_item(NAME(m_sld));
diff --git a/src/emu/video/crt9021.h b/src/emu/video/crt9021.h
index f3cc54e61ec..a58c6bd79a4 100644
--- a/src/emu/video/crt9021.h
+++ b/src/emu/video/crt9021.h
@@ -63,8 +63,6 @@
struct crt9021_interface
{
- const char *screen_tag; /* screen we are acting on */
-
devcb_read8 in_data_cb;
devcb_read8 in_attr_cb;
@@ -76,6 +74,7 @@ struct crt9021_interface
// ======================> crt9021_device
class crt9021_device : public device_t,
+ public device_video_interface,
public crt9021_interface
{
public:
@@ -102,8 +101,6 @@ private:
devcb_resolved_read8 m_in_attr_func;
devcb_resolved_read_line m_in_atten_func;
- screen_device *m_screen;
-
int m_slg;
int m_sld;
int m_cursor;
diff --git a/src/emu/video/ef9340_1.c b/src/emu/video/ef9340_1.c
index 1265e0f840a..57cffe7f714 100644
--- a/src/emu/video/ef9340_1.c
+++ b/src/emu/video/ef9340_1.c
@@ -23,8 +23,7 @@ static const UINT8 bgr2rgb[8] =
ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, EF9340_1, "EF9340+EF9341", tag, owner, clock, "ef9340_1", __FILE__)
- , m_screen_tag(NULL)
- , m_screen(NULL)
+ , device_video_interface(mconfig, *this)
//, m_start_vpos(START_Y)
//, m_start_vblank(START_Y + SCREEN_HEIGHT)
//, m_screen_lines(LINES)
@@ -34,10 +33,6 @@ ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag,
void ef9340_1_device::device_start()
{
- assert( m_screen_tag != NULL );
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert( m_screen != NULL );
-
// Let the screen create our temporary bitmap with the screen's dimensions
m_screen->register_screen_bitmap(m_tmp_bitmap);
diff --git a/src/emu/video/ef9340_1.h b/src/emu/video/ef9340_1.h
index e6dee063a84..bb255e752f3 100644
--- a/src/emu/video/ef9340_1.h
+++ b/src/emu/video/ef9340_1.h
@@ -17,17 +17,15 @@
#define MCFG_EF9340_1_ADD(_tag, _clock, _screen_tag) \
MCFG_DEVICE_ADD(_tag, EF9340_1, _clock) \
- ef9340_1_device::set_screen_tag(*device, _screen_tag);
+ MCFG_VIDEO_SET_SCREEN(_screen_tag)
-class ef9340_1_device : public device_t
+class ef9340_1_device : public device_t,
+ public device_video_interface
{
public:
// construction/destruction
ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- // static configuration helpers
- static void set_screen_tag(device_t &device, const char *screen_tag) { downcast<ef9340_1_device &>(device).m_screen_tag = screen_tag; }
-
inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; }
void ef9341_write( UINT8 command, UINT8 b, UINT8 data );
@@ -52,9 +50,6 @@ protected:
emu_timer *m_line_timer;
- const char *m_screen_tag;
- screen_device *m_screen;
-
bitmap_ind16 m_tmp_bitmap;
struct
diff --git a/src/emu/video/h63484.c b/src/emu/video/h63484.c
index 42a3b1a4c94..bacfec41437 100644
--- a/src/emu/video/h63484.c
+++ b/src/emu/video/h63484.c
@@ -27,7 +27,8 @@ ADDRESS_MAP_END
h63484_device::h63484_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, H63484, "H63484", tag, owner, clock, "h63484", __FILE__),
- device_memory_interface(mconfig, *this),
+ device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_ar(0),
m_sr(0),
m_fifo_ptr(-1),
@@ -1139,8 +1140,6 @@ WRITE16_MEMBER( h63484_device::data_w )
void h63484_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
-
//h63484->space = device->memory().space(AS_0);
m_vram = auto_alloc_array_clear(machine(), UINT8, 1 << 20);
}
diff --git a/src/emu/video/h63484.h b/src/emu/video/h63484.h
index 58286b51781..aad32359652 100644
--- a/src/emu/video/h63484.h
+++ b/src/emu/video/h63484.h
@@ -33,7 +33,6 @@ typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_ind16 &bitma
struct h63484_interface
{
- const char *m_screen_tag; /* screen we are acting on */
h63484_display_pixels_func m_display_cb;
};
@@ -41,6 +40,7 @@ struct h63484_interface
class h63484_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public h63484_interface
{
public:
@@ -92,8 +92,6 @@ private:
void draw_graphics_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, int layer_n);
- screen_device *m_screen;
-
UINT8 *m_vram;
UINT8 m_ar;
UINT8 m_vreg[0x100];
diff --git a/src/emu/video/hd44102.c b/src/emu/video/hd44102.c
index fbfa65687af..ab59168901a 100644
--- a/src/emu/video/hd44102.c
+++ b/src/emu/video/hd44102.c
@@ -70,6 +70,7 @@ inline void hd44102_device::count_up_or_down()
hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD44102, "HD44102", tag, owner, clock, "hd44102", __FILE__),
+ device_video_interface(mconfig, *this),
m_cs2(0),
m_page(0),
m_x(0),
@@ -82,13 +83,10 @@ hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, d
// static_set_config - configuration helper
//-------------------------------------------------
-void hd44102_device::static_set_config(device_t &device, const char *screen_tag, int sx, int sy)
+void hd44102_device::static_set_config(device_t &device, int sx, int sy)
{
hd44102_device &hd44102 = downcast<hd44102_device &>(device);
- assert(screen_tag != NULL);
-
- hd44102.m_screen_tag = screen_tag;
hd44102.m_sx = sx;
hd44102.m_sy = sy;
}
@@ -100,9 +98,6 @@ void hd44102_device::static_set_config(device_t &device, const char *screen_tag,
void hd44102_device::device_start()
{
- // find screen
- m_screen = machine().device<screen_device>(m_screen_tag);
-
// register for state saving
save_item(NAME(m_ram[0]));
save_item(NAME(m_ram[1]));
diff --git a/src/emu/video/hd44102.h b/src/emu/video/hd44102.h
index d95c2e668c7..3491aefe615 100644
--- a/src/emu/video/hd44102.h
+++ b/src/emu/video/hd44102.h
@@ -22,7 +22,8 @@
#define MCFG_HD44102_ADD(_tag, _screen_tag, _sx, _sy) \
MCFG_DEVICE_ADD(_tag, HD44102, 0) \
- hd44102_device::static_set_config(*device, _screen_tag, _sx, _sy);
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ hd44102_device::static_set_config(*device, _sx, _sy);
@@ -32,14 +33,15 @@
// ======================> hd44102_device
-class hd44102_device : public device_t
+class hd44102_device : public device_t,
+ public device_video_interface
{
public:
// construction/destruction
hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// inline configuration helpers
- static void static_set_config(device_t &device, const char *screen_tag, int sx, int sy);
+ static void static_set_config(device_t &device, int sx, int sy);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -62,8 +64,6 @@ private:
inline void count_up_or_down();
- screen_device *m_screen; // screen
-
UINT8 m_ram[4][50]; // display memory
UINT8 m_status; // status register
@@ -74,7 +74,6 @@ private:
int m_x; // X address
int m_y; // Y address
- const char *m_screen_tag;
int m_sx;
int m_sy;
};
diff --git a/src/emu/video/hd61830.c b/src/emu/video/hd61830.c
index 72a8431fc04..b6616dc7377 100644
--- a/src/emu/video/hd61830.c
+++ b/src/emu/video/hd61830.c
@@ -108,6 +108,7 @@ inline void hd61830_device::writebyte(offs_t address, UINT8 data)
hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD61830, "Hitachi HD61830", tag, owner, clock, "hd61830", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_bf(false),
m_cac(0),
m_blink(0),
@@ -161,8 +162,6 @@ void hd61830_device::device_start()
// resolve callbacks
m_in_rd_func.resolve(m_in_rd_cb, *this);
- m_screen = machine().device<screen_device>(screen_tag);
-
// register for state saving
save_item(NAME(m_bf));
save_item(NAME(m_ir));
diff --git a/src/emu/video/hd61830.h b/src/emu/video/hd61830.h
index 8d29920cb39..07ff5bde887 100644
--- a/src/emu/video/hd61830.h
+++ b/src/emu/video/hd61830.h
@@ -45,8 +45,6 @@
struct hd61830_interface
{
- const char *screen_tag;
-
devcb_read8 m_in_rd_cb;
};
@@ -56,6 +54,7 @@ struct hd61830_interface
class hd61830_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public hd61830_interface
{
public:
@@ -94,7 +93,6 @@ private:
devcb_resolved_read8 m_in_rd_func;
- screen_device *m_screen;
emu_timer *m_busy_timer;
//address_space *m_data;
diff --git a/src/emu/video/huc6260.c b/src/emu/video/huc6260.c
index 050c44bda8d..02c52b7d428 100644
--- a/src/emu/video/huc6260.c
+++ b/src/emu/video/huc6260.c
@@ -62,7 +62,8 @@ void huc6260_device::device_config_complete()
huc6260_device::huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, HUC6260, "HuC6260", tag, owner, clock, "huc6260", __FILE__)
+ : device_t(mconfig, HUC6260, "HuC6260", tag, owner, clock, "huc6260", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -250,11 +251,7 @@ WRITE8_MEMBER( huc6260_device::write )
void huc6260_device::device_start()
{
- /* Make sure we are supplied a screen tag */
- assert( screen_tag != NULL );
-
m_timer = timer_alloc();
- m_screen = machine().device<screen_device>( screen_tag );
m_bmp = auto_bitmap_ind16_alloc( machine(), HUC6260_WPF, HUC6260_LPF );
/* Resolve callbacks */
@@ -264,7 +261,6 @@ void huc6260_device::device_start()
m_get_time_til_next_event.resolve( get_time_til_next_event, *this );
/* We want to have a valid screen and valid callbacks */
- assert( m_screen != NULL );
assert( ! m_hsync_changed.isnull() );
assert( ! m_vsync_changed.isnull() );
assert( ! m_get_next_pixel_data.isnull() );
diff --git a/src/emu/video/huc6260.h b/src/emu/video/huc6260.h
index 3046fa0b454..327b0c43c34 100644
--- a/src/emu/video/huc6260.h
+++ b/src/emu/video/huc6260.h
@@ -28,9 +28,6 @@ PALETTE_INIT( huc6260 );
struct huc6260_interface
{
- /* Tag for the screen we will be drawing on */
- const char *screen_tag;
-
/* Callback function to retrieve pixel data */
devcb_read16 get_next_pixel_data;
@@ -47,6 +44,7 @@ struct huc6260_interface
class huc6260_device : public device_t,
+ public device_video_interface,
public huc6260_interface
{
public:
@@ -65,7 +63,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- screen_device *m_screen;
int m_last_h;
int m_last_v;
int m_height;
diff --git a/src/emu/video/huc6261.c b/src/emu/video/huc6261.c
index 7d5eb9eafb7..3067c4ffa51 100644
--- a/src/emu/video/huc6261.c
+++ b/src/emu/video/huc6261.c
@@ -38,7 +38,8 @@ void huc6261_device::device_config_complete()
huc6261_device::huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, HUC6261, "HuC6261", tag, owner, clock, "huc6261", __FILE__)
+ : device_t(mconfig, HUC6261, "HuC6261", tag, owner, clock, "huc6261", __FILE__),
+ device_video_interface(mconfig, *this)
{
// Set up UV lookup table
for ( int ur = 0; ur < 256; ur++ )
@@ -402,19 +403,16 @@ WRITE16_MEMBER( huc6261_device::write )
void huc6261_device::device_start()
{
/* Make sure we are supplied all our mandatory tags */
- assert( screen_tag != NULL );
assert( huc6270_a_tag != NULL );
assert( huc6270_b_tag != NULL );
m_timer = timer_alloc();
- m_screen = machine().device<screen_device>( screen_tag );
m_huc6270_a = machine().device<huc6270_device>( huc6270_a_tag );
m_huc6270_b = machine().device<huc6270_device>( huc6270_b_tag );
m_bmp = auto_bitmap_rgb32_alloc( machine(), HUC6261_WPF, HUC6261_LPF );
/* We want to have valid devices */
- assert( m_screen != NULL );
assert( m_huc6270_a != NULL );
assert( m_huc6270_b != NULL );
diff --git a/src/emu/video/huc6261.h b/src/emu/video/huc6261.h
index 55a2fbd0469..f0452cbaff1 100644
--- a/src/emu/video/huc6261.h
+++ b/src/emu/video/huc6261.h
@@ -24,9 +24,6 @@
struct huc6261_interface
{
- /* Tag for the screen we will be drawing on */
- const char *screen_tag;
-
/* Tags for the 2 HuC6270 devices */
const char *huc6270_a_tag;
const char *huc6270_b_tag;
@@ -34,6 +31,7 @@ struct huc6261_interface
class huc6261_device : public device_t,
+ public device_video_interface,
public huc6261_interface
{
public:
@@ -54,7 +52,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- screen_device *m_screen;
huc6270_device *m_huc6270_a;
huc6270_device *m_huc6270_b;
int m_last_h;
diff --git a/src/emu/video/i8244.c b/src/emu/video/i8244.c
index 32908dfabbf..71b90672bce 100644
--- a/src/emu/video/i8244.c
+++ b/src/emu/video/i8244.c
@@ -100,10 +100,9 @@ static const UINT8 bgr2rgb[8] =
i8244_device::i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, I8244, "I8244", tag, owner, clock, "i8244", __FILE__)
, device_sound_interface(mconfig, *this)
+ , device_video_interface(mconfig, *this)
, m_irq_func(*this)
, m_postprocess_func(*this)
- , m_screen_tag(NULL)
- , m_screen(NULL)
, m_start_vpos(START_Y)
, m_start_vblank(START_Y + SCREEN_HEIGHT)
, m_screen_lines(LINES)
@@ -114,10 +113,9 @@ i8244_device::i8244_device(const machine_config &mconfig, const char *tag, devic
i8244_device::i8244_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, device_sound_interface(mconfig, *this)
+ , device_video_interface(mconfig, *this)
, m_irq_func(*this)
, m_postprocess_func(*this)
- , m_screen_tag(NULL)
- , m_screen(NULL)
, m_start_vpos(START_Y)
, m_start_vblank(START_Y + SCREEN_HEIGHT)
, m_screen_lines(lines)
@@ -137,10 +135,6 @@ i8245_device::i8245_device(const machine_config &mconfig, const char *tag, devic
void i8244_device::device_start()
{
- assert( m_screen_tag != NULL );
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert( m_screen != NULL );
-
// Let the screen create our temporary bitmap with the screen's dimensions
m_screen->register_screen_bitmap(m_tmp_bitmap);
diff --git a/src/emu/video/i8244.h b/src/emu/video/i8244.h
index 82c330aa86b..22b5c1f4546 100644
--- a/src/emu/video/i8244.h
+++ b/src/emu/video/i8244.h
@@ -20,18 +20,16 @@
#define MCFG_I8244_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
MCFG_DEVICE_ADD(_tag, I8244, _clock) \
- MCFG_I8244_SCREEN_TAG(_screen_tag) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_I8244_IRQ_CB(_irq_cb) \
MCFG_I8244_POSTPROCESS_CB(_postprocess_cb)
-#define MCFG_I8244_SCREEN_TAG(_screen_tag) \
- i8244_device::set_screen_tag(*device, _screen_tag);
#define MCFG_I8244_IRQ_CB(_devcb) \
devcb = &i8244_device::set_irq_cb(*device, DEVCB2_##_devcb);
#define MCFG_I8244_POSTPROCESS_CB(_devcb) \
devcb = &i8244_device::set_postprocess_cb(*device, DEVCB2_##_devcb);
#define MCFG_I8245_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
MCFG_DEVICE_ADD(_tag, I8245, _clock) \
- MCFG_I8244_SCREEN_TAG(_screen_tag) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_I8244_IRQ_CB(_irq_cb) \
MCFG_I8244_POSTPROCESS_CB(_postprocess_cb )
@@ -76,6 +74,7 @@ union vdc_t {
class i8244_device : public device_t
, public device_sound_interface
+ , public device_video_interface
{
public:
// construction/destruction
@@ -132,8 +131,6 @@ protected:
devcb2_write_line m_irq_func;
devcb2_write16 m_postprocess_func;
- const char *m_screen_tag;
- screen_device *m_screen;
bitmap_ind16 m_tmp_bitmap;
emu_timer *m_line_timer;
emu_timer *m_hblank_timer;
diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c
index 3a0e282a227..331d29e8a91 100644
--- a/src/emu/video/i8275.c
+++ b/src/emu/video/i8275.c
@@ -410,7 +410,8 @@ UINT32 i8275_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
const device_type I8275 = &device_creator<i8275_device>;
i8275_device::i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, I8275, "Intel 8275", tag, owner, clock, "i8275", __FILE__)
+ : device_t(mconfig, I8275, "Intel 8275", tag, owner, clock, "i8275", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -446,8 +447,6 @@ void i8275_device::device_config_complete()
void i8275_device::device_start()
{
/* get the screen device */
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
m_screen->register_screen_bitmap(m_bitmap);
/* resolve callbacks */
diff --git a/src/emu/video/i8275.h b/src/emu/video/i8275.h
index 0730fb1d316..b92f6385faa 100644
--- a/src/emu/video/i8275.h
+++ b/src/emu/video/i8275.h
@@ -46,7 +46,6 @@ typedef void (*i8275_display_pixels_func)(i8275_device *device, bitmap_rgb32 &bi
struct i8275_interface
{
- const char *m_screen_tag; /* screen we are acting on */
int m_width; /* char width in pixels */
int m_char_delay; /* delay of display char */
@@ -60,7 +59,8 @@ struct i8275_interface
};
-class i8275_device : public device_t,
+class i8275_device : public device_t,
+ public device_video_interface,
public i8275_interface
{
public:
@@ -90,7 +90,6 @@ protected:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
- screen_device *m_screen;
bitmap_rgb32 m_bitmap;
UINT8 m_status_reg; /* value of status reggister */
diff --git a/src/emu/video/i8275x.c b/src/emu/video/i8275x.c
index 4ff6ea40edd..e205f6d5f46 100644
--- a/src/emu/video/i8275x.c
+++ b/src/emu/video/i8275x.c
@@ -81,6 +81,7 @@ const device_type I8275x = &device_creator<i8275x_device>;
i8275x_device::i8275x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, I8275x, "I8275", tag, owner, clock, "i8275x", __FILE__),
+ device_video_interface(mconfig, *this),
m_status(0),
m_param_idx(0),
m_param_end(0),
@@ -132,8 +133,6 @@ void i8275x_device::device_config_complete()
void i8275x_device::device_start()
{
// get the screen device
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
m_screen->register_screen_bitmap(m_bitmap);
// resolve callbacks
diff --git a/src/emu/video/i8275x.h b/src/emu/video/i8275x.h
index 172cc62b4c8..7fc31ab9f1b 100644
--- a/src/emu/video/i8275x.h
+++ b/src/emu/video/i8275x.h
@@ -70,7 +70,6 @@ typedef void (*i8275_display_pixels_func)(i8275x_device *device, bitmap_rgb32 &b
struct i8275_interface
{
- const char *m_screen_tag;
int m_hpixels_per_column;
int m_dummy;
@@ -88,6 +87,7 @@ struct i8275_interface
// ======================> i8275x_device
class i8275x_device : public device_t,
+ public device_video_interface,
public i8275_interface
{
public:
@@ -177,7 +177,6 @@ protected:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
- screen_device *m_screen;
bitmap_rgb32 m_bitmap;
UINT8 m_status;
diff --git a/src/emu/video/m50458.c b/src/emu/video/m50458.c
index 5deb24ea064..ea0c89984d2 100644
--- a/src/emu/video/m50458.c
+++ b/src/emu/video/m50458.c
@@ -173,6 +173,7 @@ inline void m50458_device::write_word(offs_t address, UINT16 data)
m50458_device::m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, M50458, "m50458", tag, owner, clock, "m50458", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(m50458_vram))
{
}
@@ -188,20 +189,6 @@ void m50458_device::device_validity_check(validity_checker &valid) const
}
-void m50458_device::device_config_complete()
-{
- // inherit a copy of the static data
- const m50458_interface *intf = reinterpret_cast<const m50458_interface *>(static_config());
- if (intf != NULL)
- *static_cast<m50458_interface *>(this) = *intf;
-
- // or initialize to defaults if none provided
- else
- {
- // ...
- }
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -249,14 +236,6 @@ void m50458_device::device_start()
m_shadow_gfx[dst] |= (tmp >> 8);
}
}
-
- // find screen
- m_screen = machine().device<screen_device>(m_screen_tag);
-
- if (m_screen == NULL)
- {
- m_screen = owner()->subdevice<screen_device>(m_screen_tag);
- }
}
diff --git a/src/emu/video/m50458.h b/src/emu/video/m50458.h
index 7efcd0eb88f..0574a4153ff 100644
--- a/src/emu/video/m50458.h
+++ b/src/emu/video/m50458.h
@@ -15,12 +15,9 @@ Mitsubishi M50458 OSD chip
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_M50458_ADD(_tag,_config,_freq) \
+#define MCFG_M50458_ADD(_tag,_freq,_screen) \
MCFG_DEVICE_ADD(_tag, M50458,_freq) \
- MCFG_DEVICE_CONFIG(_config)
-
-#define M50458_INTERFACE(name) \
- const m50458_interface (name) =
+ MCFG_VIDEO_SET_SCREEN(_screen)
//**************************************************************************
@@ -33,18 +30,11 @@ enum m50458_state_t
OSD_SET_DATA
};
-// ======================> upd7220_interface
-
-struct m50458_interface
-{
- const char *m_screen_tag;
-};
-
// ======================> m50458_device
class m50458_device : public device_t,
public device_memory_interface,
- public m50458_interface
+ public device_video_interface
{
public:
// construction/destruction
@@ -72,9 +62,6 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
- virtual void device_config_complete();
-
- screen_device *m_screen;
int m_latch;
int m_reset_line;
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 141bfe02379..07a1e297561 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -99,7 +99,6 @@ void mc6845_device::device_config_complete()
}
else
{
- m_screen_tag = NULL;
m_show_border_area = false;
m_hpixels_per_column = 0;
m_begin_update = NULL;
@@ -115,12 +114,14 @@ void mc6845_device::device_config_complete()
mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this, false)
{
}
mc6845_device::mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, MC6845, "mc6845", tag, owner, clock, "mc6845", __FILE__)
+ : device_t(mconfig, MC6845, "mc6845", tag, owner, clock, "mc6845", __FILE__),
+ device_video_interface(mconfig, *this, false)
{
}
@@ -1000,16 +1001,6 @@ void mc6845_device::device_start()
m_res_out_hsync_func.resolve(m_out_hsync_func, *this);
m_res_out_vsync_func.resolve(m_out_vsync_func, *this);
- /* get the screen device */
- if ( m_screen_tag != NULL )
- {
- astring tempstring;
- m_screen = downcast<screen_device *>(machine().device(siblingtag(tempstring,m_screen_tag)));
- assert(m_screen != NULL);
- }
- else
- m_screen = NULL;
-
/* create the timers */
m_line_timer = timer_alloc(TIMER_LINE);
m_de_off_timer = timer_alloc(TIMER_DE_OFF);
diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h
index a7b05ed7c21..b9f765f03bb 100644
--- a/src/emu/video/mc6845.h
+++ b/src/emu/video/mc6845.h
@@ -16,12 +16,14 @@
#define MC6845_INTERFACE(name) \
const mc6845_interface (name) =
-#define MCFG_MC6845_ADD(_tag, _variant, _clock, _config) \
+#define MCFG_MC6845_ADD(_tag, _variant, _screen_tag, _clock, _config) \
MCFG_DEVICE_ADD(_tag, _variant, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config)
#define MCFG_MOS8563_ADD(_tag, _screen_tag, _clock, _config, _map) \
MCFG_DEVICE_ADD(_tag, MOS8563, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -32,6 +34,7 @@
#define MCFG_MOS8568_ADD(_tag, _screen_tag, _clock, _config, _map) \
MCFG_DEVICE_ADD(_tag, MOS8568, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -69,7 +72,6 @@ typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int ad
/* interface */
struct mc6845_interface
{
- const char *m_screen_tag; /* screen we are acting on */
bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */
int m_hpixels_per_column; /* number of pixels per video memory address */
@@ -108,6 +110,7 @@ struct mc6845_interface
class mc6845_device : public device_t,
+ public device_video_interface,
public mc6845_interface
{
friend class mc6845_1_device;
@@ -189,8 +192,6 @@ protected:
devcb_resolved_write_line m_res_out_hsync_func;
devcb_resolved_write_line m_res_out_vsync_func;
- screen_device *m_screen;
-
/* register file */
UINT8 m_horiz_char_total; /* 0x00 */
UINT8 m_horiz_disp; /* 0x01 */
diff --git a/src/emu/video/msm6255.c b/src/emu/video/msm6255.c
index c8180244d15..6ddbefd829e 100644
--- a/src/emu/video/msm6255.c
+++ b/src/emu/video/msm6255.c
@@ -120,6 +120,7 @@ inline UINT8 msm6255_device::read_byte(UINT16 ma, UINT8 ra)
msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSM6255, "MSM6255", tag, owner, clock, "msm6255", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, NULL, *ADDRESS_MAP_NAME(msm6255)),
m_cursor(0)
{
@@ -130,14 +131,11 @@ msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, d
// static_set_config - configuration helper
//-------------------------------------------------
-void msm6255_device::static_set_config(device_t &device, int char_clock, const char *screen_tag)
+void msm6255_device::static_set_config(device_t &device, int char_clock)
{
msm6255_device &msm6255 = downcast<msm6255_device &>(device);
- assert(screen_tag != NULL);
-
msm6255.m_char_clock = char_clock;
- msm6255.m_screen_tag = screen_tag;
}
@@ -147,9 +145,6 @@ void msm6255_device::static_set_config(device_t &device, int char_clock, const c
void msm6255_device::device_start()
{
- // find screen
- m_screen = machine().device<screen_device>(m_screen_tag);
-
// register for state saving
save_item(NAME(m_ir));
save_item(NAME(m_mor));
diff --git a/src/emu/video/msm6255.h b/src/emu/video/msm6255.h
index b0baf303639..a5d5ec8777b 100644
--- a/src/emu/video/msm6255.h
+++ b/src/emu/video/msm6255.h
@@ -23,7 +23,8 @@
#define MCFG_MSM6255_ADD(_tag, _clock, _char_clock, _screen_tag, _map) \
MCFG_DEVICE_ADD(_tag, MSM6255, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
- msm6255_device::static_set_config(*device, _char_clock, _screen_tag);
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ msm6255_device::static_set_config(*device, _char_clock);
@@ -34,14 +35,15 @@
// ======================> msm6255_device
class msm6255_device : public device_t,
- public device_memory_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// inline configuration helpers
- static void static_set_config(device_t &device, int char_clock, const char *screen_tag);
+ static void static_set_config(device_t &device, int char_clock);
virtual DECLARE_ADDRESS_MAP(map, 8);
@@ -70,8 +72,6 @@ private:
void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect);
const address_space_config m_space_config;
- const char *m_screen_tag;
- screen_device *m_screen;
int m_char_clock;
UINT8 m_ir; // instruction register
diff --git a/src/emu/video/pc_cga.c b/src/emu/video/pc_cga.c
index 3bfd3af71c9..5b7986f8d80 100644
--- a/src/emu/video/pc_cga.c
+++ b/src/emu/video/pc_cga.c
@@ -184,7 +184,6 @@ static VIDEO_START( cga_mc1502 );
static MC6845_INTERFACE( mc6845_cga_intf )
{
- CGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -209,7 +208,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_cga )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
MCFG_PALETTE_INIT(pc_cga)
- MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_cga_intf)
+ MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, CGA_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_cga_intf)
MCFG_VIDEO_START( pc_cga )
MACHINE_CONFIG_END
@@ -234,7 +233,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_mc1502 )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
MCFG_PALETTE_INIT(pc_cga)
- MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, XTAL_16MHz/8, mc6845_cga_intf)
+ MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, CGA_SCREEN_NAME, XTAL_16MHz/8, mc6845_cga_intf)
MCFG_VIDEO_START( cga_mc1502 )
MACHINE_CONFIG_END
diff --git a/src/emu/video/sed1330.c b/src/emu/video/sed1330.c
index 549f693c3c3..b06d1f779b4 100644
--- a/src/emu/video/sed1330.c
+++ b/src/emu/video/sed1330.c
@@ -142,6 +142,7 @@ inline void sed1330_device::increment_csr()
sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SED1330, "SED1330", tag, owner, clock, "sed1330", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_bf(0),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(sed1330))
{
@@ -149,20 +150,6 @@ sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, d
//-------------------------------------------------
-// static_set_config - configuration helper
-//-------------------------------------------------
-
-void sed1330_device::static_set_config(device_t &device, const char *screen_tag)
-{
- sed1330_device &sed1330 = downcast<sed1330_device &>(device);
-
- assert(screen_tag != NULL);
-
- sed1330.m_screen_tag = screen_tag;
-}
-
-
-//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
diff --git a/src/emu/video/sed1330.h b/src/emu/video/sed1330.h
index 94652d40271..202335be921 100644
--- a/src/emu/video/sed1330.h
+++ b/src/emu/video/sed1330.h
@@ -23,7 +23,7 @@
#define MCFG_SED1330_ADD(_tag, _clock, _screen_tag, _map) \
MCFG_DEVICE_ADD(_tag, SED1330, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
- sed1330_device::static_set_config(*device, _screen_tag);
+ MCFG_VIDEO_SET_SCREEN(_screen_tag)
@@ -34,15 +34,13 @@
// ======================> sed1330_device
class sed1330_device : public device_t,
- public device_memory_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- // inline configuration helpers
- static void static_set_config(device_t &device, const char *screen_tag);
-
// optional information overrides
virtual const rom_entry *device_rom_region() const;
@@ -116,12 +114,8 @@ private:
int m_dm; // display mode for pages 1, 3
int m_ov; // graphics mode layer composition
- // devices
- //screen_device *m_screen;
-
// address space configurations
const address_space_config m_space_config;
- const char *m_screen_tag;
};
diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c
index 4764374f8ee..77ca4f3ab1b 100644
--- a/src/emu/video/tms34061.c
+++ b/src/emu/video/tms34061.c
@@ -29,6 +29,7 @@ const device_type TMS34061 = &device_creator<tms34061_device>;
tms34061_device::tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS34061, "tms34061", tag, owner, clock, "tms34061", __FILE__),
+ device_video_interface(mconfig, *this),
//m_regs[TMS34061_REGCOUNT],
m_xmask(0),
m_yshift(0),
@@ -63,7 +64,6 @@ void tms34061_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
m_rowshift = 0;
m_vramsize = 0;
//(*m_interrupt)(int state)
@@ -77,7 +77,6 @@ void tms34061_device::device_config_complete()
void tms34061_device::device_start()
{
/* reset the data */
- m_screen = machine().device<screen_device>(m_screen_tag);
m_vrammask = m_vramsize - 1;
/* allocate memory for VRAM */
diff --git a/src/emu/video/tms34061.h b/src/emu/video/tms34061.h
index 745c0e76ccb..fc0dc9a6e33 100644
--- a/src/emu/video/tms34061.h
+++ b/src/emu/video/tms34061.h
@@ -38,7 +38,6 @@ enum
/* interface structure */
struct tms34061_interface
{
- const char *m_screen_tag; /* the screen we are acting on */
UINT8 m_rowshift; /* VRAM address is (row << rowshift) | col */
UINT32 m_vramsize; /* size of video RAM */
void (*m_interrupt)(running_machine &machine, int state); /* interrupt gen callback */
@@ -60,7 +59,8 @@ struct tms34061_display
// ======================> tms34061_device
class tms34061_device : public device_t,
- public tms34061_interface
+ public device_video_interface,
+ public tms34061_interface
{
public:
// construction/destruction
@@ -95,7 +95,6 @@ private:
UINT8 m_latchdata;
UINT8 * m_shiftreg;
emu_timer * m_timer;
- screen_device *m_screen;
void update_interrupts(void);
TIMER_CALLBACK_MEMBER( interrupt );
diff --git a/src/emu/video/tms9927.c b/src/emu/video/tms9927.c
index 975cceba0b6..831c088b2dc 100644
--- a/src/emu/video/tms9927.c
+++ b/src/emu/video/tms9927.c
@@ -36,12 +36,14 @@ const device_type CRT5037 = &device_creator<crt5037_device>;
const device_type CRT5057 = &device_creator<crt5057_device>;
tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, TMS9927, "TMS9927", tag, owner, clock, "tms9927", __FILE__)
+ : device_t(mconfig, TMS9927, "TMS9927", tag, owner, clock, "tms9927", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
tms9927_device::tms9927_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this)
{
}
@@ -89,10 +91,6 @@ void tms9927_device::device_start()
/* copy the initial parameters */
m_clock = clock();
- /* get the screen device */
- m_screen = downcast<screen_device *>(machine().device(m_screen_tag));
- assert(m_screen != NULL);
-
/* get the self-load PROM */
if (m_selfload_region != NULL)
{
diff --git a/src/emu/video/tms9927.h b/src/emu/video/tms9927.h
index 4e13d22e254..2405fbd1274 100644
--- a/src/emu/video/tms9927.h
+++ b/src/emu/video/tms9927.h
@@ -13,13 +13,13 @@
/* interface */
struct tms9927_interface
{
- const char *m_screen_tag; /* screen we are acting on */
int m_hpixels_per_column; /* number of pixels per video memory address */
const char *m_selfload_region; /* name of the region with self-load data */
};
class tms9927_device : public device_t,
+ public device_video_interface,
public tms9927_interface
{
public:
@@ -48,7 +48,6 @@ private:
void generic_access(address_space &space, offs_t offset);
// internal state
- screen_device *m_screen;
const UINT8 *m_selfload;
/* live state */
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index 781d1a65bd4..408bf7ed290 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -93,6 +93,7 @@ static const rgb_t tms9928a_palette[TMS9928A_PALETTE_SIZE] =
tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, bool is_50hz, bool is_reva, bool is_99, const char *shortname, const char *source)
: device_t( mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = is_50hz;
@@ -105,6 +106,7 @@ tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type typ
tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, TMS9928A, "TMS9928A", tag, owner, clock, "tms9928a", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = false;
@@ -629,8 +631,6 @@ void tms9928a_device::device_config_complete()
void tms9928a_device::device_start()
{
astring tempstring;
- m_screen = downcast<screen_device *>(machine().device(siblingtag(tempstring,m_screen_tag)));
- assert( m_screen != NULL );
m_top_border = m_50hz ? TMS9928A_VERT_DISPLAY_START_PAL : TMS9928A_VERT_DISPLAY_START_NTSC;
m_vertical_size = m_50hz ? TMS9928A_TOTAL_VERT_PAL : TMS9928A_TOTAL_VERT_NTSC;
diff --git a/src/emu/video/tms9928a.h b/src/emu/video/tms9928a.h
index 53fea59e460..bada6b3e2e8 100644
--- a/src/emu/video/tms9928a.h
+++ b/src/emu/video/tms9928a.h
@@ -48,6 +48,8 @@
MCFG_DEVICE_ADD(_tag, _variant, XTAL_10_738635MHz / 2 ) \
MCFG_DEVICE_CONFIG(_config)
+#define MCFG_TMS9928A_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define MCFG_TMS9928A_SCREEN_ADD_NTSC(_screen_tag) \
MCFG_SCREEN_ADD( _screen_tag, RASTER ) \
@@ -73,7 +75,6 @@ extern const device_type TMS9129;
struct tms9928a_interface
{
- const char *m_screen_tag;
int m_vram_size; /* 4K, 8K, or 16K. This should be replaced by fetching data from an address space? */
devcb_write_line m_out_int_line; /* Callback is called whenever the state of the INT output changes */
const char *m_regionname; // Alternatively, get the name of the region (if vram size is 0)
@@ -82,6 +83,7 @@ struct tms9928a_interface
class tms9928a_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public tms9928a_interface
{
public:
@@ -119,8 +121,6 @@ private:
static const device_timer_id TIMER_LINE = 0;
- screen_device *m_screen;
-
/* TMS9928A internal settings */
UINT8 m_ReadAhead;
UINT8 m_Regs[8];
diff --git a/src/emu/video/upd3301.c b/src/emu/video/upd3301.c
index 959b5138d69..68ab2b7a7b1 100644
--- a/src/emu/video/upd3301.c
+++ b/src/emu/video/upd3301.c
@@ -194,6 +194,7 @@ inline void upd3301_device::recompute_parameters()
upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, UPD3301, "UPD3301", tag, owner, clock, "upd3301", __FILE__),
+ device_video_interface(mconfig, *this),
m_status(0),
m_param_count(0),
m_data_fifo_pos(0),
@@ -257,10 +258,6 @@ void upd3301_device::device_start()
m_out_hrtc_func.resolve(m_out_hrtc_cb, *this);
m_out_vrtc_func.resolve(m_out_vrtc_cb, *this);
- // get the screen device
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
-
// state saving
save_item(NAME(m_y));
save_item(NAME(m_hrtc));
diff --git a/src/emu/video/upd3301.h b/src/emu/video/upd3301.h
index 5f6f46caf26..a4d020564cf 100644
--- a/src/emu/video/upd3301.h
+++ b/src/emu/video/upd3301.h
@@ -74,7 +74,6 @@ typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_rgb32 &bitm
struct upd3301_interface
{
- const char *m_screen_tag; // screen we are acting on
int m_width; // char width in pixels
upd3301_display_pixels_func m_display_cb;
@@ -90,6 +89,7 @@ struct upd3301_interface
// ======================> upd3301_device
class upd3301_device : public device_t,
+ public device_video_interface,
public upd3301_interface
{
public:
@@ -133,8 +133,6 @@ private:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
- screen_device *m_screen;
-
// screen drawing
bitmap_rgb32 *m_bitmap; // bitmap
int m_y; // current scanline
diff --git a/src/emu/video/upd7220.c b/src/emu/video/upd7220.c
index 50cd18a2889..41b780c1fe3 100644
--- a/src/emu/video/upd7220.c
+++ b/src/emu/video/upd7220.c
@@ -682,6 +682,7 @@ inline void upd7220_device::get_graphics_partition(int index, UINT32 *sad, UINT1
upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, UPD7220, "uPD7220", tag, owner, clock, "upd7220", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_mask(0),
m_pitch(0),
m_ead(0),
@@ -756,16 +757,6 @@ void upd7220_device::device_start()
m_out_vsync_func.resolve(m_out_vsync_cb, *this);
m_out_blank_func.resolve(m_out_blank_cb, *this);
- // find screen
- m_screen = machine().device<screen_device>(m_screen_tag);
-
- if (m_screen == NULL)
- {
- m_screen = owner()->subdevice<screen_device>(m_screen_tag);
- }
-
- assert(m_screen);
-
// register for state saving
save_item(NAME(m_ra));
save_item(NAME(m_sr));
diff --git a/src/emu/video/upd7220.h b/src/emu/video/upd7220.h
index a9318ba9d13..9662f1c87a4 100644
--- a/src/emu/video/upd7220.h
+++ b/src/emu/video/upd7220.h
@@ -75,8 +75,6 @@ typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, U
struct upd7220_interface
{
- const char *m_screen_tag;
-
upd7220_display_pixels_func m_display_cb;
upd7220_draw_text_line m_draw_text_cb;
@@ -90,6 +88,7 @@ struct upd7220_interface
class upd7220_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public upd7220_interface
{
public:
@@ -159,8 +158,6 @@ private:
devcb_resolved_write_line m_out_vsync_func;
devcb_resolved_write_line m_out_blank_func;
- screen_device *m_screen;
-
UINT16 m_mask; // mask register
UINT8 m_pitch; // number of word addresses in display memory in the horizontal direction
UINT32 m_ead; // execute word address
diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c
index 056e0fe8a18..987fd3b8171 100644
--- a/src/emu/video/v9938.c
+++ b/src/emu/video/v9938.c
@@ -65,6 +65,7 @@ const device_type V9958 = &device_creator<v9958_device>;
v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vram", ENDIANNESS_BIG, 8, 18),
m_model(0),
m_offset_x(0),
@@ -90,8 +91,6 @@ v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, cons
m_mx_delta(0),
m_my_delta(0),
m_button_state(0),
- m_screen(NULL),
- m_screen_name(NULL),
m_vdp_ops_count(0),
m_vdp_engine(NULL)
{
@@ -568,11 +567,6 @@ void v99x8_device::register_w(UINT8 data)
m_cont_reg[17] = (m_cont_reg[17] + 1) & 0x3f;
}
-void v99x8_device::static_set_screen(device_t &device, const char *screen_name)
-{
- downcast<v99x8_device &>(device).m_screen_name = screen_name;
-}
-
void v99x8_device::static_set_vram_size(device_t &device, UINT32 vram_size)
{
downcast<v99x8_device &>(device).m_vram_size = vram_size;
@@ -586,12 +580,6 @@ void v99x8_device::static_set_vram_size(device_t &device, UINT32 vram_size)
void v99x8_device::device_start()
{
- // find our devices
- m_screen = machine().device<screen_device>(m_screen_name);
- assert(m_screen != NULL);
- if (!m_screen->started())
- throw device_missing_dependencies();
-
m_int_callback.resolve_safe();
m_vdp_ops_count = 1;
m_vdp_engine = NULL;
diff --git a/src/emu/video/v9938.h b/src/emu/video/v9938.h
index 1892bc0fff0..e07cf80ec92 100644
--- a/src/emu/video/v9938.h
+++ b/src/emu/video/v9938.h
@@ -17,11 +17,11 @@
#define MCFG_V9938_ADD(_tag, _screen, _vramsize) \
MCFG_DEVICE_ADD(_tag, V9938, 0) \
- v9938_device::static_set_screen(*device, _screen); \
+ MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
#define MCFG_V9958_ADD(_tag, _screen, _vramsize) \
MCFG_DEVICE_ADD(_tag, V9958, 0) \
- v9938_device::static_set_screen(*device, _screen); \
+ MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
#define MCFG_V99X8_INTERRUPT_CALLBACK(_irq) \
@@ -55,7 +55,9 @@ extern const device_type V9958;
// ======================> v99x8_device
-class v99x8_device : public device_t, public device_memory_interface
+class v99x8_device : public device_t,
+ public device_memory_interface,
+ public device_video_interface
{
friend PALETTE_INIT( v9958 );
@@ -85,7 +87,6 @@ public:
void command_w(UINT8 data);
void register_w(UINT8 data);
- static void static_set_screen(device_t &device, const char *screen_name);
static void static_set_vram_size(device_t &device, UINT32 vram_size);
/* RESET pin */
@@ -204,9 +205,6 @@ private:
// palette
UINT16 m_pal_ind16[16];
UINT16 m_pal_ind256[256];
- // render screen
- screen_device *m_screen;
- const char *m_screen_name;
// render bitmap
bitmap_ind16 m_bitmap;
// Command unit
diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c
index 4fc1ed2c6c1..f612906ad37 100644
--- a/src/mame/drivers/4roses.c
+++ b/src/mame/drivers/4roses.c
@@ -364,7 +364,6 @@ static const ay8910_interface ay8910_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -405,7 +404,7 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state )
MCFG_PALETTE_INIT_OVERRIDE(_4roses_state,funworld)
MCFG_VIDEO_START_OVERRIDE(_4roses_state,funworld)
-// MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) /* 2MHz, guess */
+// MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8, mc6845_intf) /* 2MHz, guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c
index 6fc2a184b8f..5674b0e4078 100644
--- a/src/mame/drivers/5clown.c
+++ b/src/mame/drivers/5clown.c
@@ -997,7 +997,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1094,7 +1093,7 @@ static MACHINE_CONFIG_START( fclown, _5clown_state )
MCFG_PALETTE_LENGTH(256)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/16, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index 68f0e320dfd..a4ec67b5600 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -628,7 +628,6 @@ ADDRESS_MAP_END
static H63484_INTERFACE( adp_h63484_intf )
{
- "screen",
acrtc_display_pixels
};
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 785ebed7037..1f045004940 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -601,7 +601,6 @@ void airbustr_state::machine_reset()
static const kaneko_pandora_interface airbustr_pandora_config =
{
- "screen", /* screen tag */
1, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c
index ff36f9e70ac..54c955f155a 100644
--- a/src/mame/drivers/albazg.c
+++ b/src/mame/drivers/albazg.c
@@ -211,7 +211,6 @@ static const ay8910_interface ay8910_config =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -400,7 +399,7 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state )
MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(albazg_state, screen_update_yumefuda)
- MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
MCFG_GFXDECODE( yumefuda )
MCFG_PALETTE_LENGTH(0x80)
diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c
index 7addd8e300b..db68248b904 100644
--- a/src/mame/drivers/amaticmg.c
+++ b/src/mame/drivers/amaticmg.c
@@ -795,7 +795,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -878,7 +877,7 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(amaticmg_state, screen_update_amaticmg)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
MCFG_GFXDECODE(amaticmg)
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index b0fc123f35b..a98d0b463e4 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -1565,7 +1565,6 @@ static MC6845_INTERFACE( mc6845_intf )
/* in fact is a mc6845 driving 4 pixels by memory address.
that's why the big horizontal parameters */
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1707,7 +1706,7 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state )
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf )
MCFG_VIA6522_ADD("via6522_0", 0, via_interface) /* 1 MHz.(only 1 or 2 MHz.are valid) */
MCFG_PIA6821_ADD("pia6821_0", aristmk4_pia1_intf)
- MCFG_MC6845_ADD("crtc", C6545_1, MAIN_CLOCK/8, mc6845_intf) // TODO: type is unknown
+ MCFG_MC6845_ADD("crtc", C6545_1, "screen", MAIN_CLOCK/8, mc6845_intf) // TODO: type is unknown
MCFG_MC146818_ADD("rtc", MC146818_IGNORE_CENTURY)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index 8f9c763e61a..2fd39da312c 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -787,7 +787,6 @@ static const msm5205_interface msm5205_config =
static const tc0100scn_interface asuka_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -797,7 +796,6 @@ static const tc0100scn_interface asuka_tc0100scn_intf =
static const tc0100scn_interface cadash_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
1, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c
index fff191ffd7f..aae829d7467 100644
--- a/src/mame/drivers/avt.c
+++ b/src/mame/drivers/avt.c
@@ -849,7 +849,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -909,7 +908,7 @@ static MACHINE_CONFIG_START( avt, avt_state )
MCFG_PALETTE_LENGTH(8*16)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index 48c9158dd69..c76a6c76076 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -456,7 +456,6 @@ static int backfire_bank_callback( int bank )
static const deco16ic_interface backfire_deco16ic_tilegen1_intf =
{
- "lscreen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x40, /* color base */
@@ -468,7 +467,6 @@ static const deco16ic_interface backfire_deco16ic_tilegen1_intf =
static const deco16ic_interface backfire_deco16ic_tilegen2_intf =
{
- "lscreen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x10, 0x50, /* color base */
@@ -525,7 +523,9 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_ADD("tilegen1", backfire_deco16ic_tilegen1_intf)
+ MCFG_DECO16IC_SET_SCREEN("lscreen")
MCFG_DECO16IC_ADD("tilegen2", backfire_deco16ic_tilegen2_intf)
+ MCFG_DECO16IC_SET_SCREEN("lscreen")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
decospr_device::set_gfx_region(*device, 4);
diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c
index 2f990683492..8aa51d67085 100644
--- a/src/mame/drivers/bishi.c
+++ b/src/mame/drivers/bishi.c
@@ -374,7 +374,6 @@ static const k056832_interface bishi_k056832_intf =
static const k054338_interface bishi_k054338_intf =
{
- "screen",
0,
"none"
};
diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c
index b1a9fbf740c..b31d6654885 100644
--- a/src/mame/drivers/blitz.c
+++ b/src/mame/drivers/blitz.c
@@ -742,7 +742,6 @@ static const pia6821_interface megadpkr_pia1_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -815,7 +814,7 @@ static MACHINE_CONFIG_START( megadpkr, blitz_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz_state, screen_update_megadpkr)
- MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CPU_CLOCK, mc6845_intf)
MCFG_GFXDECODE(megadpkr)
MCFG_PALETTE_LENGTH(256)
diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c
index 6122ba70aa8..3e5b9d81448 100644
--- a/src/mame/drivers/blitz68k.c
+++ b/src/mame/drivers/blitz68k.c
@@ -1667,7 +1667,6 @@ WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq5)
static MC6845_INTERFACE( mc6845_intf_irq1 )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@@ -1682,7 +1681,6 @@ static MC6845_INTERFACE( mc6845_intf_irq1 )
static MC6845_INTERFACE( mc6845_intf_irq3 )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@@ -1697,7 +1695,6 @@ static MC6845_INTERFACE( mc6845_intf_irq3 )
static MC6845_INTERFACE( mc6845_intf_irq5 )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@@ -1805,7 +1802,7 @@ static MACHINE_CONFIG_START( cjffruit, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-8-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", R6545_1, XTAL_22_1184MHz/8, mc6845_intf_irq1)
+ MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_PALETTE_LENGTH(0x100)
@@ -1837,7 +1834,7 @@ static MACHINE_CONFIG_START( bankrob, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@@ -1867,7 +1864,7 @@ static MACHINE_CONFIG_START( bankroba, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+7, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq5)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq5)
MCFG_PALETTE_LENGTH(0x100)
@@ -1896,7 +1893,7 @@ static MACHINE_CONFIG_START( deucesw2, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", R6545_1, XTAL_22_1184MHz/8, mc6845_intf_irq3)
+ MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@@ -1927,7 +1924,7 @@ static MACHINE_CONFIG_START( dualgame, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@@ -1956,7 +1953,7 @@ static MACHINE_CONFIG_START( hermit, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_22_1184MHz/8, mc6845_intf_irq1)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_PALETTE_LENGTH(0x100)
@@ -1990,7 +1987,7 @@ static MACHINE_CONFIG_START( maxidbl, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k_noblit)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)
diff --git a/src/mame/drivers/bloodbro.c b/src/mame/drivers/bloodbro.c
index 3758c386aff..392baf1fed5 100644
--- a/src/mame/drivers/bloodbro.c
+++ b/src/mame/drivers/bloodbro.c
@@ -453,7 +453,6 @@ WRITE16_MEMBER( bloodbro_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(bloodbro_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(bloodbro_state, layer_scroll_w),
};
diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c
index e9408865ae0..477a9eaa81c 100644
--- a/src/mame/drivers/boogwing.c
+++ b/src/mame/drivers/boogwing.c
@@ -311,14 +311,8 @@ static int boogwing_bank_callback2( const int bank )
return offset;
}
-static const decocomn_interface boogwing_decocomn_intf =
-{
- "screen",
-};
-
static const deco16ic_interface boogwing_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x1f, /* trans masks (pf2 has 5bpp graphics) */
0, 0, /* color base (pf2 is non default) */
@@ -330,7 +324,6 @@ static const deco16ic_interface boogwing_deco16ic_tilegen1_intf =
static const deco16ic_interface boogwing_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f,
0, 16,
@@ -366,7 +359,7 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
- MCFG_DECOCOMN_ADD("deco_common", boogwing_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", boogwing_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", boogwing_deco16ic_tilegen2_intf)
diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c
index 34dc51c1d76..460d25d7d73 100644
--- a/src/mame/drivers/buster.c
+++ b/src/mame/drivers/buster.c
@@ -310,7 +310,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -345,7 +344,7 @@ static MACHINE_CONFIG_START( buster, buster_state )
MCFG_SCREEN_SIZE(256, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
MCFG_SCREEN_UPDATE_DRIVER(buster_state, screen_update_buster)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_3_579545MHz/4, mc6845_intf) //unknown clock / type
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_3_579545MHz/4, mc6845_intf) //unknown clock / type
MCFG_GFXDECODE(buster)
MCFG_PALETTE_LENGTH(8)
diff --git a/src/mame/drivers/byvid.c b/src/mame/drivers/byvid.c
index a91db1289cb..6eb41b4291e 100644
--- a/src/mame/drivers/byvid.c
+++ b/src/mame/drivers/byvid.c
@@ -109,7 +109,6 @@ WRITE_LINE_MEMBER(by133_state::vdp_interrupt)
static TMS9928A_INTERFACE(byvid_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(by133_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c
index d1118065ef6..1053b3c3645 100644
--- a/src/mame/drivers/calomega.c
+++ b/src/mame/drivers/calomega.c
@@ -2716,7 +2716,6 @@ static const ay8910_interface sys906_ay8912_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -2757,7 +2756,7 @@ static MACHINE_CONFIG_START( sys903, calomega_state )
MCFG_PALETTE_LENGTH(1024)
- MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf) /* 6845 @ CPU clock */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CPU_CLOCK, mc6845_intf) /* 6845 @ CPU clock */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index b1eb11b107e..f3385105f82 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -348,7 +348,6 @@ static void generate_interrupt( running_machine &machine, int state )
static const struct tms34061_interface tms34061intf =
{
- "screen", /* the screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
0x10000, /* size of video RAM */
generate_interrupt /* interrupt gen callback */
diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c
index 673130232e1..03ea4e2cca7 100644
--- a/src/mame/drivers/carrera.c
+++ b/src/mame/drivers/carrera.c
@@ -313,7 +313,6 @@ void carrera_state::palette_init()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -342,7 +341,7 @@ static MACHINE_CONFIG_START( carrera, carrera_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(carrera_state, screen_update_carrera)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / 16, mc6845_intf)
MCFG_GFXDECODE(carrera)
MCFG_PALETTE_LENGTH(32)
diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c
index 6c5696bb2c6..2df2be78651 100644
--- a/src/mame/drivers/cbuster.c
+++ b/src/mame/drivers/cbuster.c
@@ -265,7 +265,6 @@ static int twocrude_bank_callback( const int bank )
static const deco16ic_interface twocrude_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x20, /* color base (default values) */
@@ -277,7 +276,6 @@ static const deco16ic_interface twocrude_deco16ic_tilegen1_intf =
static const deco16ic_interface twocrude_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x30, 0x40, /* color base (default values) */
diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c
index 572a56222f1..9a6dc0b06da 100644
--- a/src/mame/drivers/cham24.c
+++ b/src/mame/drivers/cham24.c
@@ -295,7 +295,6 @@ void cham24_state::ppu_irq(int *ppu_regs)
static const ppu2c0x_interface ppu_interface =
{
"maincpu",
- "screen",
0, /* gfxlayout num */
0, /* color base */
PPU_MIRROR_NONE /* mirroring */
diff --git a/src/mame/drivers/chance32.c b/src/mame/drivers/chance32.c
index c1efe35fb8a..42bac3392e8 100644
--- a/src/mame/drivers/chance32.c
+++ b/src/mame/drivers/chance32.c
@@ -448,7 +448,6 @@ void chance32_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -480,7 +479,7 @@ static MACHINE_CONFIG_START( chance32, chance32_state )
MCFG_SCREEN_VISIBLE_AREA(0, 35*16-1, 0, 29*8-1)
MCFG_SCREEN_UPDATE_DRIVER(chance32_state, screen_update_chance32)
- MCFG_MC6845_ADD("crtc", H46505, 12000000/16, mc6845_intf) /* 52.786 Hz (similar to Major Poker) */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 12000000/16, mc6845_intf) /* 52.786 Hz (similar to Major Poker) */
MCFG_GFXDECODE(chance32)
MCFG_PALETTE_LENGTH(0x800)
diff --git a/src/mame/drivers/cliffhgr.c b/src/mame/drivers/cliffhgr.c
index e81f1b11941..c486d7c6037 100644
--- a/src/mame/drivers/cliffhgr.c
+++ b/src/mame/drivers/cliffhgr.c
@@ -677,7 +677,6 @@ INPUT_PORTS_END
static TMS9928A_INTERFACE(cliffhgr_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(cliffhgr_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index 176d19ec5ea..d1843afa0af 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -813,14 +813,8 @@ static int mutantf_2_bank_callback( const int bank )
return ((bank >> 5) & 0x1) << 14;
}
-static const decocomn_interface cninja_decocomn_intf =
-{
- "screen",
-};
-
static const deco16ic_interface cninja_deco16ic_tilegen1_intf =
{
- "screen",
1, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@@ -832,7 +826,6 @@ static const deco16ic_interface cninja_deco16ic_tilegen1_intf =
static const deco16ic_interface cninja_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@@ -846,7 +839,6 @@ static const deco16ic_interface cninja_deco16ic_tilegen2_intf =
static const deco16ic_interface edrandy_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@@ -858,7 +850,6 @@ static const deco16ic_interface edrandy_deco16ic_tilegen1_intf =
static const deco16ic_interface edrandy_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@@ -871,7 +862,6 @@ static const deco16ic_interface edrandy_deco16ic_tilegen2_intf =
static const deco16ic_interface robocop2_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@@ -883,7 +873,6 @@ static const deco16ic_interface robocop2_deco16ic_tilegen1_intf =
static const deco16ic_interface robocop2_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@@ -896,7 +885,6 @@ static const deco16ic_interface robocop2_deco16ic_tilegen2_intf =
static const deco16ic_interface mutantf_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 0x30, /* color base */
@@ -908,7 +896,6 @@ static const deco16ic_interface mutantf_deco16ic_tilegen1_intf =
static const deco16ic_interface mutantf_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x40, /* color base */
@@ -972,7 +959,7 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@@ -1031,7 +1018,7 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@@ -1085,7 +1072,7 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@@ -1128,7 +1115,7 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", edrandy_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", edrandy_deco16ic_tilegen2_intf)
@@ -1184,7 +1171,7 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", robocop2_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", robocop2_deco16ic_tilegen2_intf)
@@ -1246,7 +1233,7 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
- MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", mutantf_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", mutantf_deco16ic_tilegen2_intf)
diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c
index b9f12a43ade..4bee8d86843 100644
--- a/src/mame/drivers/coinmstr.c
+++ b/src/mame/drivers/coinmstr.c
@@ -996,7 +996,6 @@ static const ay8910_interface ay8912_interface =
static MC6845_INTERFACE( h46505_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1031,7 +1030,7 @@ static MACHINE_CONFIG_START( coinmstr, coinmstr_state )
MCFG_PALETTE_LENGTH(46*32*4)
- MCFG_MC6845_ADD("crtc", H46505, 14000000 / 16, h46505_intf)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 14000000 / 16, h46505_intf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c
index 0276bae76f9..99b0aa2a039 100644
--- a/src/mame/drivers/darkseal.c
+++ b/src/mame/drivers/darkseal.c
@@ -222,7 +222,6 @@ GFXDECODE_END
static const deco16ic_interface darkseal_deco16ic_tilegen1_intf =
{
- "screen",
0, 3, // both these tilemaps need to be twice the y size of usual!
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x00, /* color base */
@@ -235,7 +234,6 @@ static const deco16ic_interface darkseal_deco16ic_tilegen1_intf =
static const deco16ic_interface darkseal_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x00, /* color base */
diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c
index 8eefa0e3036..182788aaf50 100644
--- a/src/mame/drivers/dassault.c
+++ b/src/mame/drivers/dassault.c
@@ -450,11 +450,6 @@ WRITE8_MEMBER(dassault_state::sound_bankswitch_w)
/**********************************************************************************/
-static const decocomn_interface dassault_decocomn_intf =
-{
- "screen",
-};
-
static int dassault_bank_callback( const int bank )
{
return ((bank >> 4) & 0xf) << 12;
@@ -462,7 +457,6 @@ static int dassault_bank_callback( const int bank )
static const deco16ic_interface dassault_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@@ -474,7 +468,6 @@ static const deco16ic_interface dassault_deco16ic_tilegen1_intf =
static const deco16ic_interface dassault_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@@ -517,7 +510,7 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
- MCFG_DECOCOMN_ADD("deco_common", dassault_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", dassault_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", dassault_deco16ic_tilegen2_intf)
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index a4b0968f705..6ea1cc0f369 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -346,7 +346,6 @@ static int dblewing_bank_callback( const int bank )
static const deco16ic_interface dblewing_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c
index 8f7583dffb8..cd6c689f4d5 100644
--- a/src/mame/drivers/dbz.c
+++ b/src/mame/drivers/dbz.c
@@ -300,7 +300,6 @@ static const k056832_interface dbz_k056832_intf =
static const k053247_interface dbz_k053246_intf =
{
- "screen",
"gfx2", 3,
NORMAL_PLANE_ORDER,
-52, 16,
@@ -322,7 +321,6 @@ WRITE_LINE_MEMBER(dbz_state::dbz_irq2_ack_w)
static const k053252_interface dbz_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(dbz_state,dbz_irq2_ack_w),
diff --git a/src/mame/drivers/dcon.c b/src/mame/drivers/dcon.c
index 97ca77bb577..dbd952b7792 100644
--- a/src/mame/drivers/dcon.c
+++ b/src/mame/drivers/dcon.c
@@ -258,7 +258,6 @@ WRITE16_MEMBER( dcon_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(dcon_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(dcon_state, layer_scroll_w),
};
diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c
index 26ac3d3813f..295bca8c94d 100644
--- a/src/mame/drivers/deco156.c
+++ b/src/mame/drivers/deco156.c
@@ -326,7 +326,6 @@ static int deco156_bank_callback(const int bank)
static const deco16ic_interface deco156_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index 8329bc72174..b68a2acc43d 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -248,7 +248,6 @@ static int fghthist_bank_callback( int bank )
static const deco16ic_interface fghthist_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x10, /* color base */
@@ -260,7 +259,6 @@ static const deco16ic_interface fghthist_deco16ic_tilegen1_intf =
static const deco16ic_interface fghthist_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x30, /* color base */
@@ -1720,7 +1718,6 @@ static int captaven_bank_callback( int bank )
// pf4 not used (pf3 is in 8bpp mode)
static const deco16ic_interface captaven_deco16ic_tilegen1_intf =
{
- "screen",
0, 1, // pf12only, split, fullwidth12 / fullwidth34
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x30, /* color base */
@@ -1732,7 +1729,6 @@ static const deco16ic_interface captaven_deco16ic_tilegen1_intf =
static const deco16ic_interface captaven_deco16ic_tilegen2_intf =
{
- "screen",
0, 0, // pf12only, split, fullwidth12 / fullwidth34
0xff, 0x00, /* trans masks (default values) */
0x10, 0x00, /* color base */
@@ -1940,7 +1936,6 @@ static int dragngun_bank2_callback( int bank )
static const deco16ic_interface dragngun_deco16ic_tilegen1_intf =
{
- "screen",
0, 1, // dragon gun definitely needs pf3/4 full width, bgs in 2nd attract demo.
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x30, /* color base */
@@ -1952,7 +1947,6 @@ static const deco16ic_interface dragngun_deco16ic_tilegen1_intf =
static const deco16ic_interface dragngun_deco16ic_tilegen2_intf =
{
- "screen",
0, 1, // dragon gun definitely needs pf3/4 full width, bgs in 2nd attract demo.
0xff, 0xff, /* trans masks (default values) */
0x04, 0x04, /* color base */
@@ -1964,7 +1958,6 @@ static const deco16ic_interface dragngun_deco16ic_tilegen2_intf =
static const deco16ic_interface lockload_deco16ic_tilegen1_intf =
{
- "screen",
0, 1, // lockload definitely wants pf34 half width..
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x30, /* color base */
@@ -1976,7 +1969,6 @@ static const deco16ic_interface lockload_deco16ic_tilegen1_intf =
static const deco16ic_interface lockload_deco16ic_tilegen2_intf =
{
- "screen",
0, 0, // lockload definitely wants pf34 half width..
0xff, 0xff, /* trans masks (default values) */
0x04, 0x04, /* color base */
@@ -2140,7 +2132,6 @@ static int tattass_bank_callback( int bank )
static const deco16ic_interface tattass_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x10, /* color base */
@@ -2152,7 +2143,6 @@ static const deco16ic_interface tattass_deco16ic_tilegen1_intf =
static const deco16ic_interface tattass_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x30, /* color base */
diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c
index 138222086ac..038d526781f 100644
--- a/src/mame/drivers/dietgo.c
+++ b/src/mame/drivers/dietgo.c
@@ -195,14 +195,8 @@ static int dietgo_bank_callback(const int bank)
return ((bank >> 4) & 0x7) * 0x1000;
}
-static const decocomn_interface dietgo_decocomn_intf =
-{
- "screen",
-};
-
static const deco16ic_interface dietgo_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@@ -239,7 +233,7 @@ static MACHINE_CONFIG_START( dietgo, dietgo_state )
MCFG_PALETTE_LENGTH(1024)
MCFG_GFXDECODE(dietgo)
- MCFG_DECOCOMN_ADD("deco_common", dietgo_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", dietgo_deco16ic_tilegen1_intf)
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index 725f237755b..a5d317a5462 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -503,7 +503,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(djboy_state::djboy_scanline)
static const kaneko_pandora_interface djboy_pandora_config =
{
- "screen", /* screen tag */
0, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/dreambal.c b/src/mame/drivers/dreambal.c
index 720e4e0511f..3c20c749747 100644
--- a/src/mame/drivers/dreambal.c
+++ b/src/mame/drivers/dreambal.c
@@ -292,7 +292,6 @@ static int dreambal_bank_callback( const int bank )
static const deco16ic_interface dreambal_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/famibox.c b/src/mame/drivers/famibox.c
index d43f5d02b19..87ca1aed020 100644
--- a/src/mame/drivers/famibox.c
+++ b/src/mame/drivers/famibox.c
@@ -529,7 +529,6 @@ void famibox_state::ppu_irq(int *ppu_regs)
static const ppu2c0x_interface ppu_interface =
{
"maincpu",
- "screen",
0, /* gfxlayout num */
0, /* color base */
PPU_MIRROR_NONE /* mirroring */
diff --git a/src/mame/drivers/flipjack.c b/src/mame/drivers/flipjack.c
index c65e4d6a0d5..c692b1db18b 100644
--- a/src/mame/drivers/flipjack.c
+++ b/src/mame/drivers/flipjack.c
@@ -429,7 +429,6 @@ static const ay8910_interface ay8910_config_2 =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -494,7 +493,7 @@ static MACHINE_CONFIG_START( flipjack, flipjack_state )
MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 0x188, 0, 0x100, 0x100, 0, 0xc0) // from crtc
MCFG_SCREEN_UPDATE_DRIVER(flipjack_state, screen_update_flipjack)
- MCFG_MC6845_ADD("crtc", HD6845, VIDEO_CLOCK/8, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", VIDEO_CLOCK/8, mc6845_intf)
MCFG_GFXDECODE(flipjack)
diff --git a/src/mame/drivers/forte2.c b/src/mame/drivers/forte2.c
index d03aab4060f..d495e21e87c 100644
--- a/src/mame/drivers/forte2.c
+++ b/src/mame/drivers/forte2.c
@@ -106,7 +106,6 @@ WRITE_LINE_MEMBER(forte2_state::vdp_interrupt)
static TMS9928A_INTERFACE(forte2_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(forte2_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c
index 6007b1673b2..175ce332f49 100644
--- a/src/mame/drivers/fortecar.c
+++ b/src/mame/drivers/fortecar.c
@@ -535,7 +535,6 @@ static const ay8910_interface ay8910_config =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -713,7 +712,7 @@ static MACHINE_CONFIG_START( fortecar, fortecar_state )
MCFG_PALETTE_LENGTH(0x200)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* 1.5 MHz, measured */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf) /* 1.5 MHz, measured */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c
index e0eba57676a..ec48a6bcab5 100644
--- a/src/mame/drivers/funkyjet.c
+++ b/src/mame/drivers/funkyjet.c
@@ -303,7 +303,6 @@ GFXDECODE_END
static const deco16ic_interface funkyjet_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c
index 427d2cdf27a..c0e2d0bf6c5 100644
--- a/src/mame/drivers/funworld.c
+++ b/src/mame/drivers/funworld.c
@@ -2533,7 +2533,6 @@ static const ay8910_interface funquiz_ay8910_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -2577,7 +2576,7 @@ static MACHINE_CONFIG_START( fw1stpal, funworld_state )
MCFG_PALETTE_INIT_OVERRIDE(funworld_state, funworld)
MCFG_VIDEO_START_OVERRIDE(funworld_state, funworld)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) /* 2MHz, veryfied on jollycrd & royalcrd */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8, mc6845_intf) /* 2MHz, veryfied on jollycrd & royalcrd */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c
index b307e433461..d2bf4132d40 100644
--- a/src/mame/drivers/gaelco.c
+++ b/src/mame/drivers/gaelco.c
@@ -84,7 +84,7 @@ WRITE16_MEMBER(gaelco_state::gaelco_encrypted_w)
{
// mame_printf_debug("gaelco_encrypted_w!!\n");
data = gaelco_decrypt(space, offset, data, 0x0f, 0x4228);
- COMBINE_DATA(&m_screen[offset]);
+ COMBINE_DATA(&m_screenram[offset]);
}
/*********** Thunder Hoop Encryption Related Code ******************/
@@ -102,7 +102,7 @@ WRITE16_MEMBER(gaelco_state::thoop_encrypted_w)
{
// mame_printf_debug("gaelco_encrypted_w!!\n");
data = gaelco_decrypt(space, offset, data, 0x0e, 0x4228);
- COMBINE_DATA(&m_screen[offset]);
+ COMBINE_DATA(&m_screenram[offset]);
}
/*************************************
diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c
index 79621fe8b37..c5070f03dfd 100644
--- a/src/mame/drivers/galastrm.c
+++ b/src/mame/drivers/galastrm.c
@@ -290,7 +290,6 @@ static const eeprom_interface galastrm_eeprom_interface =
static const tc0100scn_interface galastrm_tc0100scn_intf =
{
- "screen",
0, 2, /* gfxnum, txnum */
-48, -56, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/galpanic.c b/src/mame/drivers/galpanic.c
index 1757ebb272a..5d1efdd7269 100644
--- a/src/mame/drivers/galpanic.c
+++ b/src/mame/drivers/galpanic.c
@@ -543,7 +543,6 @@ GFXDECODE_END
static const kaneko_pandora_interface galpanic_pandora_config =
{
- "screen", /* screen tag */
0, /* gfx_region */
0, -16 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/ggconnie.c b/src/mame/drivers/ggconnie.c
index 56132e01258..f91e7e2ef06 100644
--- a/src/mame/drivers/ggconnie.c
+++ b/src/mame/drivers/ggconnie.c
@@ -207,7 +207,6 @@ static const huc6270_interface pce_huc6270_config =
static const huc6260_interface pce_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6270", huc6270_device, vsync_changed ),
@@ -248,7 +247,6 @@ static const huc6202_interface sgx_huc6202_config =
static const huc6260_interface sgx_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6202", huc6202_device, vsync_changed ),
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index 5e4e657c460..d8bdd5f8dec 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -256,7 +256,6 @@ static const k056832_interface gijoe_k056832_intf =
static const k053247_interface gijoe_k053247_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
-37, 20,
diff --git a/src/mame/drivers/gluck2.c b/src/mame/drivers/gluck2.c
index 5fab34bd2e3..cbda3c36c67 100644
--- a/src/mame/drivers/gluck2.c
+++ b/src/mame/drivers/gluck2.c
@@ -507,7 +507,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -569,7 +568,7 @@ static MACHINE_CONFIG_START( gluck2, gluck2_state )
MCFG_PALETTE_LENGTH(0x100)
MCFG_PALETTE_INIT_OVERRIDE(gluck2_state, gluck2)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/16, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c
index 0ba6010503e..2dd6299e65a 100644
--- a/src/mame/drivers/goldnpkr.c
+++ b/src/mame/drivers/goldnpkr.c
@@ -3642,7 +3642,6 @@ static const pia6821_interface bchancep_pia1_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -3831,7 +3830,7 @@ static MACHINE_CONFIG_START( goldnpkr_base, goldnpkr_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 29*8-1) /* From MC6845 init, registers 01 & 06. */
MCFG_SCREEN_UPDATE_DRIVER(goldnpkr_state, screen_update_goldnpkr)
- MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf) /* 68B45 or 6845s @ CPU clock */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CPU_CLOCK, mc6845_intf) /* 68B45 or 6845s @ CPU clock */
MCFG_GFXDECODE(goldnpkr)
MCFG_PALETTE_LENGTH(256)
diff --git a/src/mame/drivers/goodejan.c b/src/mame/drivers/goodejan.c
index 463a8be4a91..83177c40022 100644
--- a/src/mame/drivers/goodejan.c
+++ b/src/mame/drivers/goodejan.c
@@ -641,7 +641,6 @@ WRITE16_MEMBER( goodejan_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(goodejan_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(goodejan_state, layer_scroll_w),
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 42c4d48bc6f..e651afc59d6 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -342,7 +342,6 @@ GFXDECODE_END
static const tc0100scn_interface groundfx_tc0100scn_intf =
{
- "screen",
2, 3, /* gfxnum, txnum */
50, 8, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c
index 1e13cab91fa..da8a169e044 100644
--- a/src/mame/drivers/guab.c
+++ b/src/mame/drivers/guab.c
@@ -144,7 +144,6 @@ static void tms_interrupt(running_machine &machine, int state)
static const struct tms34061_interface tms34061intf =
{
- "screen", /* The screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
0x40000, /* Size of video RAM */
tms_interrupt /* Interrupt gen callback */
diff --git a/src/mame/drivers/hexion.c b/src/mame/drivers/hexion.c
index c4e9bfa965d..e75321001d7 100644
--- a/src/mame/drivers/hexion.c
+++ b/src/mame/drivers/hexion.c
@@ -210,7 +210,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(hexion_state::hexion_scanline)
static const k053252_interface hexion_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(hexion_state,hexion_irq_ack_w),
diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c
index 013205da0eb..b6f335b596f 100644
--- a/src/mame/drivers/hitpoker.c
+++ b/src/mame/drivers/hitpoker.c
@@ -458,7 +458,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -510,7 +509,7 @@ static MACHINE_CONFIG_START( hitpoker, hitpoker_state )
MCFG_SCREEN_VISIBLE_AREA(0, 648-1, 0, 240-1)
MCFG_SCREEN_UPDATE_DRIVER(hitpoker_state, screen_update_hitpoker)
- MCFG_MC6845_ADD("crtc", H46505, CRTC_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", CRTC_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
MCFG_GFXDECODE(hitpoker)
MCFG_PALETTE_LENGTH(0x800)
diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c
index bcf3d24ef22..90b93aefd3b 100644
--- a/src/mame/drivers/hornet.c
+++ b/src/mame/drivers/hornet.c
@@ -980,21 +980,6 @@ static const k033906_interface hornet_k033906_intf_1 =
"voodoo1"
};
-static const k037122_interface hornet_k037122_intf =
-{
- "screen", 0
-};
-
-static const k037122_interface hornet_k037122_intf_l =
-{
- "lscreen", 0
-};
-
-static const k037122_interface hornet_k037122_intf_r =
-{
- "rscreen", 1
-};
-
static const voodoo_config hornet_voodoo_intf =
{
2, // fbmem;
@@ -1038,7 +1023,7 @@ static MACHINE_CONFIG_START( hornet, hornet_state )
MCFG_PALETTE_LENGTH(65536)
- MCFG_K037122_ADD("k037122_1", hornet_k037122_intf)
+ MCFG_K037122_ADD("k037122_1", "screen", 0)
MCFG_K056800_ADD("k056800", hornet_k056800_interface, XTAL_64MHz/4)
@@ -1106,8 +1091,8 @@ static MACHINE_CONFIG_DERIVED( hornet_2board, hornet )
MCFG_DEVICE_REMOVE("k037122_1")
- MCFG_K037122_ADD("k037122_1", hornet_k037122_intf_l)
- MCFG_K037122_ADD("k037122_2", hornet_k037122_intf_r)
+ MCFG_K037122_ADD("k037122_1", "lscreen", 0)
+ MCFG_K037122_ADD("k037122_2", "rscreen", 1)
MCFG_DEVICE_REMOVE("voodoo0")
MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, voodoo_l_intf)
diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c
index b21c002511b..a854584b277 100644
--- a/src/mame/drivers/hvyunit.c
+++ b/src/mame/drivers/hvyunit.c
@@ -622,7 +622,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(hvyunit_state::hvyunit_scanline)
static const kaneko_pandora_interface hvyunit_pandora_config =
{
- "screen", /* screen tag */
0, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 8f8b301474f..5242a7f5ee1 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -1661,7 +1661,6 @@ static void generate_interrupt(running_machine &machine, int state_num)
static const struct tms34061_interface tms34061intf =
{
- "screen", /* the screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
0x40000, /* size of video RAM */
generate_interrupt /* interrupt gen callback */
diff --git a/src/mame/drivers/jokrwild.c b/src/mame/drivers/jokrwild.c
index 782e3b4c7f9..5afa6febd61 100644
--- a/src/mame/drivers/jokrwild.c
+++ b/src/mame/drivers/jokrwild.c
@@ -460,7 +460,6 @@ static const pia6821_interface pia1_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -501,7 +500,7 @@ static MACHINE_CONFIG_START( jokrwild, jokrwild_state )
MCFG_GFXDECODE(jokrwild)
MCFG_PALETTE_LENGTH(512)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/16, mc6845_intf) /* guess */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c
index 271aeddec9d..d6a475abf60 100644
--- a/src/mame/drivers/jpmsys5.c
+++ b/src/mame/drivers/jpmsys5.c
@@ -67,7 +67,6 @@ static void tms_interrupt(running_machine &machine, int state)
static const struct tms34061_interface tms34061intf =
{
- "screen", /* The screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
0x40000, /* Size of video RAM - FIXME: Should be 128kB + 32kB */
tms_interrupt /* Interrupt gen callback */
diff --git a/src/mame/drivers/jubilee.c b/src/mame/drivers/jubilee.c
index 9fb0214638d..c2b50b96dd0 100644
--- a/src/mame/drivers/jubilee.c
+++ b/src/mame/drivers/jubilee.c
@@ -396,7 +396,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -435,7 +434,7 @@ static MACHINE_CONFIG_START( jubileep, jubilee_state )
MCFG_PALETTE_LENGTH(256)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/4, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/4, mc6845_intf) /* guess */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c
index c55bdc2833c..17004b0cbb2 100644
--- a/src/mame/drivers/kingdrby.c
+++ b/src/mame/drivers/kingdrby.c
@@ -916,7 +916,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1047,7 +1046,7 @@ static MACHINE_CONFIG_START( kingdrby, kingdrby_state )
MCFG_SCREEN_UPDATE_DRIVER(kingdrby_state, screen_update_kingdrby)
- MCFG_MC6845_ADD("crtc", MC6845, CLK_1/32, mc6845_intf) /* 53.333 Hz. guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CLK_1/32, mc6845_intf) /* 53.333 Hz. guess */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/kingpin.c b/src/mame/drivers/kingpin.c
index 502aeb40a19..963fb965fdf 100644
--- a/src/mame/drivers/kingpin.c
+++ b/src/mame/drivers/kingpin.c
@@ -149,7 +149,6 @@ WRITE_LINE_MEMBER(kingpin_state::vdp_interrupt)
static TMS9928A_INTERFACE(kingpin_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(kingpin_state, vdp_interrupt)
};
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index 77339beb42b..3d0e284f585 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -1796,7 +1796,9 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_K056832_ADD_NOINTF("k056832"/*, konamigx_k056832_intf*/)
MCFG_K055555_ADD("k055555")
+
MCFG_K055673_ADD_NOINTF("k055673")
+ MCFG_K055673_SET_SCREEN("screen")
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_5bpp)
diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c
index 9ca630f84a1..ab8b86faebf 100644
--- a/src/mame/drivers/laserbas.c
+++ b/src/mame/drivers/laserbas.c
@@ -240,7 +240,6 @@ void laserbas_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -315,7 +314,7 @@ static MACHINE_CONFIG_START( laserbas, laserbas_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(laserbas_state, screen_update_laserbas)
- MCFG_MC6845_ADD("crtc", H46505, 3000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 3000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PALETTE_LENGTH(32)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c
index 869044e1ead..be8d8d6b148 100644
--- a/src/mame/drivers/luckgrln.c
+++ b/src/mame/drivers/luckgrln.c
@@ -977,7 +977,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1002,7 +1001,7 @@ static MACHINE_CONFIG_START( luckgrln, luckgrln_state )
MCFG_CPU_IO_MAP(portmap)
MCFG_CPU_VBLANK_INT_DRIVER("screen", luckgrln_state, luckgrln_irq)
- MCFG_MC6845_ADD("crtc", H46505, 6000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 6000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c
index e78d22041f2..3c8c8b8953c 100644
--- a/src/mame/drivers/magicfly.c
+++ b/src/mame/drivers/magicfly.c
@@ -921,7 +921,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -960,7 +959,7 @@ static MACHINE_CONFIG_START( magicfly, magicfly_state )
MCFG_PALETTE_LENGTH(32)
MCFG_PALETTE_INIT_OVERRIDE(magicfly_state, magicfly)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/16, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c
index 9b1acac8740..e3e369d1839 100644
--- a/src/mame/drivers/majorpkr.c
+++ b/src/mame/drivers/majorpkr.c
@@ -1003,7 +1003,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1042,7 +1041,7 @@ static MACHINE_CONFIG_START( majorpkr, majorpkr_state )
MCFG_SCREEN_UPDATE_DRIVER(majorpkr_state, screen_update_majorpkr)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* verified */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf) /* verified */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index 0c3d78fff77..2d700719c1c 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -495,7 +495,6 @@ WRITE_LINE_MEMBER( mtech_state::int_callback )
static const sega315_5124_interface _vdp_intf =
{
false,
- "menu",
DEVCB_DRIVER_LINE_MEMBER(mtech_state, int_callback),
DEVCB_NULL,
};
@@ -535,6 +534,7 @@ static MACHINE_CONFIG_START( megatech, mtech_state )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("vdp1", _vdp_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("menu")
MCFG_SCREEN_MODIFY("megadriv")
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index d47c3017bdc..c122c2543b7 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -317,7 +317,6 @@ WRITE_LINE_MEMBER(merit_state::vsync_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -1208,7 +1207,7 @@ static MACHINE_CONFIG_START( pitboss, merit_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
/* sound hardware */
diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c
index 61d63209aab..c90ca649967 100644
--- a/src/mame/drivers/miniboy7.c
+++ b/src/mame/drivers/miniboy7.c
@@ -395,7 +395,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -471,7 +470,7 @@ static MACHINE_CONFIG_START( miniboy7, miniboy7_state )
MCFG_PALETTE_LENGTH(256)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/12, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/12, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c
index f98f3a0768a..47982087023 100644
--- a/src/mame/drivers/mirage.c
+++ b/src/mame/drivers/mirage.c
@@ -293,7 +293,6 @@ static int mirage_bank_callback( const int bank )
static const deco16ic_interface mirage_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index a16ded50256..3b94074dd1c 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -462,7 +462,6 @@ static const k056832_interface moo_k056832_intf =
static const k053247_interface moo_k053247_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
-48+1, 23,
@@ -472,7 +471,6 @@ static const k053247_interface moo_k053247_intf =
static const k053247_interface bucky_k053247_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
-48, 23,
@@ -482,14 +480,12 @@ static const k053247_interface bucky_k053247_intf =
static const k054338_interface moo_k054338_intf =
{
- "screen",
0,
"none"
};
static const k053252_interface moo_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/mpu12wbk.c b/src/mame/drivers/mpu12wbk.c
index b32c0c9c888..738a06e69a2 100644
--- a/src/mame/drivers/mpu12wbk.c
+++ b/src/mame/drivers/mpu12wbk.c
@@ -495,7 +495,6 @@ static const ay8910_interface ay8910_config =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -533,7 +532,7 @@ static MACHINE_CONFIG_START( mpu12wbk, mpu12wbk_state )
MCFG_GFXDECODE(mpu12wbk)
MCFG_PALETTE_LENGTH(512)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/4, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/4, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c
index b590582fa31..4bed52c15d4 100644
--- a/src/mame/drivers/mpu4dealem.c
+++ b/src/mame/drivers/mpu4dealem.c
@@ -146,7 +146,6 @@ WRITE_LINE_MEMBER(mpu4dealem_state::dealem_vsync_changed)
static MC6845_INTERFACE( hd6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -233,7 +232,7 @@ static MACHINE_CONFIG_START( dealem, mpu4dealem_state )
MCFG_PALETTE_LENGTH(32)
MCFG_PALETTE_INIT_OVERRIDE(mpu4dealem_state,dealem)
- MCFG_MC6845_ADD("crtc", HD6845, MPU4_MASTER_CLOCK / 4 / 8, hd6845_intf) /* HD68B45 */
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", MPU4_MASTER_CLOCK / 4 / 8, hd6845_intf) /* HD68B45 */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c
index d3de01d7485..14f9d48069f 100644
--- a/src/mame/drivers/multigam.c
+++ b/src/mame/drivers/multigam.c
@@ -1106,7 +1106,6 @@ void multigam_state::ppu_irq(int *ppu_regs)
static const ppu2c0x_interface ppu_interface =
{
"maincpu",
- "screen",
0, /* gfxlayout num */
0, /* color base */
PPU_MIRROR_NONE /* mirroring */
diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c
index 6c581f4647e..772db62e35f 100644
--- a/src/mame/drivers/murogem.c
+++ b/src/mame/drivers/murogem.c
@@ -234,7 +234,6 @@ UINT32 murogem_state::screen_update_murogem(screen_device &screen, bitmap_ind16
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -266,7 +265,7 @@ static MACHINE_CONFIG_START( murogem, murogem_state )
MCFG_PALETTE_LENGTH(0x100)
- MCFG_MC6845_ADD("crtc", MC6845, 750000, mc6845_intf) /* ? MHz */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 750000, mc6845_intf) /* ? MHz */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c
index f10adfba8cd..d5bc20afb8e 100644
--- a/src/mame/drivers/mystwarr.c
+++ b/src/mame/drivers/mystwarr.c
@@ -909,7 +909,6 @@ MACHINE_RESET_MEMBER(mystwarr_state,gaiapols)
static const k053252_interface mystwarr_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -919,7 +918,6 @@ static const k053252_interface mystwarr_k053252_intf =
static const k053252_interface viostorm_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -929,7 +927,6 @@ static const k053252_interface viostorm_k053252_intf =
static const k053252_interface metamrph_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -939,7 +936,6 @@ static const k053252_interface metamrph_k053252_intf =
static const k053252_interface martchmp_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -949,7 +945,6 @@ static const k053252_interface martchmp_k053252_intf =
static const k053252_interface dadandrm_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -959,7 +954,6 @@ static const k053252_interface dadandrm_k053252_intf =
static const k053252_interface gaiapols_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c
index 93550a9f8de..596b72c93e8 100644
--- a/src/mame/drivers/ninjaw.c
+++ b/src/mame/drivers/ninjaw.c
@@ -735,7 +735,6 @@ Darius2: arbitrary interleaving of 10 to keep cpus synced.
static const tc0100scn_interface darius2_tc0100scn_intf_l =
{
- "lscreen",
1, 3, /* gfxnum, txnum */
22, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -745,7 +744,6 @@ static const tc0100scn_interface darius2_tc0100scn_intf_l =
static const tc0100scn_interface darius2_tc0100scn_intf_m =
{
- "mscreen",
2, 3, /* gfxnum, txnum */
22, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -755,7 +753,6 @@ static const tc0100scn_interface darius2_tc0100scn_intf_m =
static const tc0100scn_interface darius2_tc0100scn_intf_r =
{
- "rscreen",
2, 3, /* gfxnum, txnum */
22, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -852,8 +849,11 @@ static MACHINE_CONFIG_START( ninjaw, ninjaw_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2_tc0100scn_intf_l)
+ MCFG_TC0100SCN_SET_SCREEN("lscreen")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2_tc0100scn_intf_m)
+ MCFG_TC0100SCN_SET_SCREEN("mscreen")
MCFG_TC0100SCN_ADD("tc0100scn_3", darius2_tc0100scn_intf_r)
+ MCFG_TC0100SCN_SET_SCREEN("rscreen")
MCFG_TC0110PCR_ADD("tc0110pcr_1", darius2_tc0110pcr_intf_l)
MCFG_TC0110PCR_ADD("tc0110pcr_2", darius2_tc0110pcr_intf_m)
MCFG_TC0110PCR_ADD("tc0110pcr_3", darius2_tc0110pcr_intf_r)
@@ -932,8 +932,11 @@ static MACHINE_CONFIG_START( darius2, ninjaw_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2_tc0100scn_intf_l)
+ MCFG_TC0100SCN_SET_SCREEN("lscreen")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2_tc0100scn_intf_m)
+ MCFG_TC0100SCN_SET_SCREEN("mscreen")
MCFG_TC0100SCN_ADD("tc0100scn_3", darius2_tc0100scn_intf_r)
+ MCFG_TC0100SCN_SET_SCREEN("rscreen")
MCFG_TC0110PCR_ADD("tc0110pcr_1", darius2_tc0110pcr_intf_l)
MCFG_TC0110PCR_ADD("tc0110pcr_2", darius2_tc0110pcr_intf_m)
MCFG_TC0110PCR_ADD("tc0110pcr_3", darius2_tc0110pcr_intf_r)
diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c
index 5bdddd4d4e3..499db0d5d1b 100644
--- a/src/mame/drivers/nss.c
+++ b/src/mame/drivers/nss.c
@@ -800,11 +800,6 @@ void nss_state::machine_reset()
m_joy_flag = 1;
}
-static M50458_INTERFACE( m50458_intf )
-{
- "osd"
-};
-
static MACHINE_CONFIG_START( nss, nss_state )
/* base snes hardware */
@@ -822,7 +817,7 @@ static MACHINE_CONFIG_START( nss, nss_state )
MCFG_CPU_IO_MAP(bios_io_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", nss_state, nss_vblank_irq)
- MCFG_M50458_ADD("m50458",m50458_intf,4000000) /* TODO: correct clock */
+ MCFG_M50458_ADD("m50458", 4000000, "osd") /* TODO: correct clock */
MCFG_S3520CF_ADD("s3520cf") /* RTC */
MCFG_RP5H01_ADD("rp5h01")
MCFG_M6M80011AP_ADD("m6m80011ap")
diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c
index ae7954cd2ab..63d135425a1 100644
--- a/src/mame/drivers/nyny.c
+++ b/src/mame/drivers/nyny.c
@@ -427,7 +427,6 @@ WRITE_LINE_MEMBER(nyny_state::display_enable_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -721,7 +720,7 @@ static MACHINE_CONFIG_START( nyny, nyny_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
/* 74LS123 */
MCFG_TTL74123_ADD("ic48_1", ic48_1_config)
diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c
index 4e903291c65..17ef1e16434 100644
--- a/src/mame/drivers/othello.c
+++ b/src/mame/drivers/othello.c
@@ -371,7 +371,6 @@ INPUT_PORTS_END
static MC6845_INTERFACE( h46505_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
TILE_WIDTH, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -436,7 +435,7 @@ static MACHINE_CONFIG_START( othello, othello_state )
MCFG_PALETTE_LENGTH(0x10)
- MCFG_MC6845_ADD("crtc", H46505, 1000000 /* ? MHz */, h46505_intf) /* H46505 @ CPU clock */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 1000000 /* ? MHz */, h46505_intf) /* H46505 @ CPU clock */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index f311091e498..77e9dd62fcf 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -636,7 +636,6 @@ WRITE_LINE_MEMBER(othunder_state::irqhandler)
static const tc0100scn_interface othunder_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index d31f38360d7..ffb10daa269 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -278,7 +278,6 @@ static const k053260_interface k053260_config =
static const k053247_interface overdriv_k053246_intf =
{
- "screen",
"gfx1", 0,
NORMAL_PLANE_ORDER,
77, 22,
@@ -326,7 +325,6 @@ void overdriv_state::machine_reset()
static const k053252_interface overdriv_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/pachifev.c b/src/mame/drivers/pachifev.c
index 044c7771f4a..5ade3dffe37 100644
--- a/src/mame/drivers/pachifev.c
+++ b/src/mame/drivers/pachifev.c
@@ -348,7 +348,6 @@ INTERRUPT_GEN_MEMBER(pachifev_state::pachifev_vblank_irq)
static TMS9928A_INTERFACE(pachifev_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_NULL
};
diff --git a/src/mame/drivers/pengadvb.c b/src/mame/drivers/pengadvb.c
index 8506875c3fa..752215e1d87 100644
--- a/src/mame/drivers/pengadvb.c
+++ b/src/mame/drivers/pengadvb.c
@@ -243,7 +243,6 @@ WRITE_LINE_MEMBER(pengadvb_state::vdp_interrupt)
static TMS9928A_INTERFACE(pengadvb_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(pengadvb_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c
index 03c44ffae64..242078a1b26 100644
--- a/src/mame/drivers/peplus.c
+++ b/src/mame/drivers/peplus.c
@@ -304,7 +304,6 @@ static MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1378,7 +1377,7 @@ static MACHINE_CONFIG_START( peplus, peplus_state )
MCFG_GFXDECODE(peplus)
MCFG_PALETTE_LENGTH(16*16*2)
- MCFG_MC6845_ADD("crtc", R6545_1, MC6845_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", R6545_1, "screen", MC6845_CLOCK, mc6845_intf)
MCFG_I2CMEM_ADD("i2cmem", i2cmem_interface)
diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c
index 25d3747b44c..be6a0750fb6 100644
--- a/src/mame/drivers/pktgaldx.c
+++ b/src/mame/drivers/pktgaldx.c
@@ -290,14 +290,8 @@ static int pktgaldx_bank_callback( const int bank )
return ((bank >> 4) & 0x7) * 0x1000;
}
-static const decocomn_interface pktgaldx_decocomn_intf =
-{
- "screen",
-};
-
static const deco16ic_interface pktgaldx_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@@ -332,7 +326,7 @@ static MACHINE_CONFIG_START( pktgaldx, pktgaldx_state )
MCFG_PALETTE_LENGTH(4096)
MCFG_GFXDECODE(pktgaldx)
- MCFG_DECOCOMN_ADD("deco_common", pktgaldx_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", pktgaldx_deco16ic_tilegen1_intf)
diff --git a/src/mame/drivers/playch10.c b/src/mame/drivers/playch10.c
index bc8f9baca40..92cf554fa0d 100644
--- a/src/mame/drivers/playch10.c
+++ b/src/mame/drivers/playch10.c
@@ -702,6 +702,7 @@ static MACHINE_CONFIG_START( playch10, playch10_state )
MCFG_PPU2C03B_ADD("ppu", playch10_ppu_interface)
+ MCFG_PPU2C0X_SET_SCREEN("bottom")
MCFG_PPU2C0X_SET_NMI(playch10_state, ppu_irq)
// sound hardware
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index 5c4cbff5adc..2788b879205 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -374,7 +374,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -438,7 +437,7 @@ static MACHINE_CONFIG_START( progolf, progolf_state )
MCFG_GFXDECODE(progolf)
MCFG_PALETTE_LENGTH(32*3)
- MCFG_MC6845_ADD("crtc", MC6845, 3000000/4, mc6845_intf) /* hand tuned to get ~57 fps */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 3000000/4, mc6845_intf) /* hand tuned to get ~57 fps */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c
index 2438061e106..1b6be6be889 100644
--- a/src/mame/drivers/qdrmfgp.c
+++ b/src/mame/drivers/qdrmfgp.c
@@ -555,7 +555,6 @@ WRITE_LINE_MEMBER(qdrmfgp_state::qdrmfgp_irq4_ack_w)
static const k053252_interface qdrmfgp_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(qdrmfgp_state,qdrmfgp_irq3_ack_w),
@@ -565,7 +564,6 @@ static const k053252_interface qdrmfgp_k053252_intf =
static const k053252_interface qdrmfgp2_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(qdrmfgp_state,qdrmfgp_irq4_ack_w),
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 7b5701e90fa..1f877aaf85f 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -398,7 +398,6 @@ WRITE_LINE_MEMBER(r2dtank_state::display_enable_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -552,7 +551,7 @@ static MACHINE_CONFIG_START( r2dtank, r2dtank_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
/* 74LS123 */
diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c
index c84acadb7ff..8f36abb7107 100644
--- a/src/mame/drivers/raiden.c
+++ b/src/mame/drivers/raiden.c
@@ -318,7 +318,6 @@ WRITE16_MEMBER( raiden_state::raidenb_layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(raiden_state, raidenb_layer_enable_w),
DEVCB_DRIVER_MEMBER16(raiden_state, raidenb_layer_scroll_w),
};
diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c
index 05acd847c6e..f05a7585987 100644
--- a/src/mame/drivers/raiden2.c
+++ b/src/mame/drivers/raiden2.c
@@ -1863,7 +1863,6 @@ GFXDECODE_END
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(raiden2_state, tilemap_enable_w),
DEVCB_DRIVER_MEMBER16(raiden2_state, tile_scroll_w),
};
diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c
index e1fe638f894..eb89171420f 100644
--- a/src/mame/drivers/re900.c
+++ b/src/mame/drivers/re900.c
@@ -373,7 +373,6 @@ INPUT_PORTS_END
static TMS9928A_INTERFACE(re900_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(re900_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c
index 0ea36a4d28a..16cc18afa9e 100644
--- a/src/mame/drivers/rgum.c
+++ b/src/mame/drivers/rgum.c
@@ -232,7 +232,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -280,7 +279,7 @@ static MACHINE_CONFIG_START( rgum, rgum_state )
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(rgum_state, screen_update_royalgum)
- MCFG_MC6845_ADD("crtc", MC6845, 24000000/16, mc6845_intf) /* unknown clock & type, hand tuned to get ~50 fps (?) */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 24000000/16, mc6845_intf) /* unknown clock & type, hand tuned to get ~50 fps (?) */
MCFG_I8255A_ADD( "ppi8255", ppi8255_intf )
diff --git a/src/mame/drivers/rltennis.c b/src/mame/drivers/rltennis.c
index 98107751fbf..a8a3f572414 100644
--- a/src/mame/drivers/rltennis.c
+++ b/src/mame/drivers/rltennis.c
@@ -153,7 +153,6 @@ INTERRUPT_GEN_MEMBER(rltennis_state::rltennis_interrupt)
void rltennis_state::machine_start()
{
- m_screen = machine().device( "screen");
m_samples_1 = memregion("samples1")->base();
m_samples_2 = memregion("samples2")->base();
m_gfx = memregion("gfx1")->base();
diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c
index 11fb9eb24eb..22b07899516 100644
--- a/src/mame/drivers/rohga.c
+++ b/src/mame/drivers/rohga.c
@@ -763,11 +763,6 @@ WRITE8_MEMBER(rohga_state::sound_bankswitch_w)
/**********************************************************************************/
-static const decocomn_interface rohga_decocomn_intf =
-{
- "screen",
-};
-
static int rohga_bank_callback( const int bank )
{
return ((bank >> 4) & 0x3) << 12;
@@ -775,7 +770,6 @@ static int rohga_bank_callback( const int bank )
static const deco16ic_interface rohga_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16,/* color base (default values) */
@@ -787,7 +781,6 @@ static const deco16ic_interface rohga_deco16ic_tilegen1_intf =
static const deco16ic_interface rohga_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@@ -799,7 +792,6 @@ static const deco16ic_interface rohga_deco16ic_tilegen2_intf =
static const deco16ic_interface nitrobal_deco16ic_tilegen1_intf =
{
- "screen",
0, 0,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (pf4 is not default) */
@@ -811,7 +803,6 @@ static const deco16ic_interface nitrobal_deco16ic_tilegen1_intf =
static const deco16ic_interface nitrobal_deco16ic_tilegen2_intf =
{
- "screen",
0, 0,
0x0f, 0x0f, /* trans masks (default values) */
0, 0, /* color base (pf4 is not default) */
@@ -846,7 +837,7 @@ static MACHINE_CONFIG_START( rohga, rohga_state )
MCFG_VIDEO_START_OVERRIDE(rohga_state,rohga)
- MCFG_DECOCOMN_ADD("deco_common", rohga_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", rohga_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", rohga_deco16ic_tilegen2_intf)
@@ -898,7 +889,7 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state )
MCFG_GFXDECODE(wizdfire)
MCFG_PALETTE_LENGTH(2048)
- MCFG_DECOCOMN_ADD("deco_common", rohga_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", rohga_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", rohga_deco16ic_tilegen2_intf)
@@ -956,7 +947,7 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state )
MCFG_GFXDECODE(wizdfire)
MCFG_PALETTE_LENGTH(2048)
- MCFG_DECOCOMN_ADD("deco_common", rohga_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", nitrobal_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", nitrobal_deco16ic_tilegen2_intf)
@@ -1017,7 +1008,7 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state )
MCFG_VIDEO_START_OVERRIDE(rohga_state,schmeisr)
- MCFG_DECOCOMN_ADD("deco_common", rohga_decocomn_intf)
+ MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", rohga_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", rohga_deco16ic_tilegen2_intf)
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index dae9fa5a94a..b74b43e02c8 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -241,7 +241,6 @@ WRITE_LINE_MEMBER(rollerg_state::rollerg_irq_ack_w)
static const k053252_interface rollerg_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(rollerg_state,rollerg_irq_ack_w),
diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c
index d3f589e8b8d..92246635a0a 100644
--- a/src/mame/drivers/rungun.c
+++ b/src/mame/drivers/rungun.c
@@ -336,7 +336,6 @@ static const k053936_interface rng_k053936_intf =
static const k053247_interface rng_k055673_intf =
{
- "screen",
"gfx2", 1,
K055673_LAYOUT_RNG,
-8, 15,
@@ -346,7 +345,6 @@ static const k053247_interface rng_k055673_intf =
static const k053252_interface rng_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c
index 0a735e50132..762934b5194 100644
--- a/src/mame/drivers/sandscrp.c
+++ b/src/mame/drivers/sandscrp.c
@@ -482,7 +482,6 @@ static const ay8910_interface ay8910_config =
static const kaneko_pandora_interface sandscrp_pandora_config =
{
- "screen", /* screen tag */
0, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/sanremo.c b/src/mame/drivers/sanremo.c
index 10b30f72482..b10b26ffa92 100644
--- a/src/mame/drivers/sanremo.c
+++ b/src/mame/drivers/sanremo.c
@@ -345,7 +345,6 @@ static const mc6845_interface mc6845_intf =
*/
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -396,7 +395,7 @@ static MACHINE_CONFIG_START( sanremo, sanremo_state )
MCFG_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 38*8-1)
MCFG_SCREEN_UPDATE_DRIVER(sanremo_state, screen_update_sanremo)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
MCFG_GFXDECODE(sanremo)
MCFG_PALETTE_LENGTH(0x10)
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index 4c8051f39ca..48bb6988f71 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -1335,7 +1335,6 @@ void genesis_vdp_lv4irqline_callback_segac2(running_machine &machine, bool state
static const sega315_5124_interface sms_vdp_ntsc_intf =
{
false,
- "megadriv",
DEVCB_NULL,
DEVCB_NULL,
};
@@ -1358,6 +1357,7 @@ static MACHINE_CONFIG_START( segac, segac2_state )
// MCFG_FRAGMENT_ADD(megadriv_timers)
MCFG_DEVICE_ADD("gen_vdp", SEGA_GEN_VDP, 0)
+ MCFG_VIDEO_SET_SCREEN("megadriv")
MCFG_DEVICE_CONFIG( sms_vdp_ntsc_intf )
sega_genesis_vdp_device::set_genesis_vdp_sndirqline_callback(*device, genesis_vdp_sndirqline_callback_segac2);
sega_genesis_vdp_device::set_genesis_vdp_lv6irqline_callback(*device, genesis_vdp_lv6irqline_callback_segac2);
diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c
index 79be947383c..e7bf0b243e8 100644
--- a/src/mame/drivers/segae.c
+++ b/src/mame/drivers/segae.c
@@ -1060,7 +1060,6 @@ WRITE_LINE_MEMBER( systeme_state::int_callback )
static const sega315_5124_interface _315_5124_1_intf =
{
false,
- "screen",
DEVCB_NULL,
DEVCB_NULL,
};
@@ -1069,7 +1068,6 @@ static const sega315_5124_interface _315_5124_1_intf =
static const sega315_5124_interface _315_5124_2_intf =
{
false,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(systeme_state, int_callback),
DEVCB_NULL,
};
diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c
index 1682138abff..036a2f65128 100644
--- a/src/mame/drivers/segas18.c
+++ b/src/mame/drivers/segas18.c
@@ -1237,7 +1237,6 @@ void genesis_vdp_lv4irqline_callback_segas18(running_machine &machine, bool stat
static const sega315_5124_interface sms_vdp_ntsc_intf =
{
false,
- "screen",
DEVCB_NULL,
DEVCB_NULL,
};
diff --git a/src/mame/drivers/sengokmj.c b/src/mame/drivers/sengokmj.c
index ca416fa730c..e6ed614a083 100644
--- a/src/mame/drivers/sengokmj.c
+++ b/src/mame/drivers/sengokmj.c
@@ -557,7 +557,6 @@ WRITE16_MEMBER( sengokmj_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
- "screen",
DEVCB_DRIVER_MEMBER16(sengokmj_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(sengokmj_state, layer_scroll_w),
};
diff --git a/src/mame/drivers/sg1000a.c b/src/mame/drivers/sg1000a.c
index 33e8dcf48fe..ccf8fbdd5c8 100644
--- a/src/mame/drivers/sg1000a.c
+++ b/src/mame/drivers/sg1000a.c
@@ -247,7 +247,6 @@ WRITE_LINE_MEMBER(sg1000a_state::vdp_interrupt)
static TMS9928A_INTERFACE(sg1000a_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(sg1000a_state,vdp_interrupt)
};
diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c
index 54ac8c1742a..91157f552ba 100644
--- a/src/mame/drivers/simpl156.c
+++ b/src/mame/drivers/simpl156.c
@@ -394,7 +394,6 @@ static int simpl156_bank_callback(const int bank)
static const deco16ic_interface simpl156_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16,/* color base (default values) */
diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c
index 6ef1d53ddd7..8d5bbb4d9b8 100644
--- a/src/mame/drivers/simpsons.c
+++ b/src/mame/drivers/simpsons.c
@@ -284,7 +284,6 @@ static const k052109_interface simpsons_k052109_intf =
static const k053247_interface simpsons_k053246_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
53, 23,
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index b72eded3444..3a626fc24d4 100644
--- a/src/mame/drivers/slotcarn.c
+++ b/src/mame/drivers/slotcarn.c
@@ -170,7 +170,6 @@ WRITE_LINE_MEMBER(slotcarn_state::vsync_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -623,7 +622,7 @@ static MACHINE_CONFIG_START( slotcarn, slotcarn_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
MCFG_GFXDECODE(slotcarn)
MCFG_PALETTE_LENGTH(0x400)
diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c
index 14bb709e0d8..38084948e00 100644
--- a/src/mame/drivers/snk6502.c
+++ b/src/mame/drivers/snk6502.c
@@ -755,7 +755,6 @@ INTERRUPT_GEN_MEMBER(snk6502_state::snk6502_interrupt)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -837,7 +836,7 @@ static MACHINE_CONFIG_START( sasuke, snk6502_state )
MCFG_PALETTE_INIT_OVERRIDE(snk6502_state,satansat)
MCFG_VIDEO_START_OVERRIDE(snk6502_state,satansat)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / 16, mc6845_intf)
MCFG_TIMER_DRIVER_ADD_PERIODIC("sasuke_timer", snk6502_state, sasuke_update_counter, attotime::from_hz(MASTER_CLOCK / 8))
@@ -910,7 +909,7 @@ static MACHINE_CONFIG_START( vanguard, snk6502_state )
MCFG_PALETTE_INIT_OVERRIDE(snk6502_state,snk6502)
MCFG_VIDEO_START_OVERRIDE(snk6502_state,snk6502)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / 16, mc6845_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c
index 1bd94464576..a1e85de4b23 100644
--- a/src/mame/drivers/snowbros.c
+++ b/src/mame/drivers/snowbros.c
@@ -1512,7 +1512,6 @@ MACHINE_RESET_MEMBER(snowbros_state,finalttr)
static const kaneko_pandora_interface snowbros_pandora_config =
{
- "screen", /* screen tag */
0, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
diff --git a/src/mame/drivers/speedatk.c b/src/mame/drivers/speedatk.c
index 075c0649bcf..857fa4bd11f 100644
--- a/src/mame/drivers/speedatk.c
+++ b/src/mame/drivers/speedatk.c
@@ -285,7 +285,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -333,7 +332,7 @@ static MACHINE_CONFIG_START( speedatk, speedatk_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(speedatk_state, screen_update_speedatk)
- MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
MCFG_GFXDECODE(speedatk)
MCFG_PALETTE_LENGTH(0x100)
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 65d207674b4..5ed67c7a017 100644
--- a/src/mame/drivers/spiders.c
+++ b/src/mame/drivers/spiders.c
@@ -507,7 +507,6 @@ WRITE_LINE_MEMBER(spiders_state::display_enable_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -706,7 +705,7 @@ static MACHINE_CONFIG_START( spiders, spiders_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
/* 74LS123 */
diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c
index d10269571d6..c8257642994 100644
--- a/src/mame/drivers/sshangha.c
+++ b/src/mame/drivers/sshangha.c
@@ -387,7 +387,6 @@ static int sshangha_bank_callback( int bank )
static const deco16ic_interface sshangha_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x10, 0x00, /* color base */
diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c
index 9e2870189e0..8e6aab8d703 100644
--- a/src/mame/drivers/ssingles.c
+++ b/src/mame/drivers/ssingles.c
@@ -270,7 +270,6 @@ static MC6845_UPDATE_ROW( atamanot_update_row )
static MC6845_INTERFACE( ssingles_mc6845_intf )
{
- "screen",
false,
8,
NULL, /* before pixel update callback */
@@ -285,7 +284,6 @@ static MC6845_INTERFACE( ssingles_mc6845_intf )
static MC6845_INTERFACE( atamanot_mc6845_intf )
{
- "screen",
false,
8,
NULL, /* before pixel update callback */
@@ -580,7 +578,7 @@ static MACHINE_CONFIG_START( ssingles, ssingles_state )
MCFG_GFXDECODE(ssingles)
- MCFG_MC6845_ADD("crtc", MC6845, 1000000 /* ? MHz */, ssingles_mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1000000 /* ? MHz */, ssingles_mc6845_intf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -606,7 +604,7 @@ static MACHINE_CONFIG_DERIVED( atamanot, ssingles )
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", MC6845, 1000000 /* ? MHz */, atamanot_mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1000000 /* ? MHz */, atamanot_mc6845_intf)
MCFG_GFXDECODE(atamanot)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c
index ad499d9ccd0..c789d2b0e62 100644
--- a/src/mame/drivers/statriv2.c
+++ b/src/mame/drivers/statriv2.c
@@ -589,7 +589,6 @@ GFXDECODE_END
static const tms9927_interface tms9927_intf =
{
- "screen",
8,
NULL
};
diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c
index 8b2b10b3cf1..13897faf478 100644
--- a/src/mame/drivers/supbtime.c
+++ b/src/mame/drivers/supbtime.c
@@ -308,7 +308,6 @@ GFXDECODE_END
static const deco16ic_interface supbtime_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/supercrd.c b/src/mame/drivers/supercrd.c
index cd633511f91..ab70d8493f9 100644
--- a/src/mame/drivers/supercrd.c
+++ b/src/mame/drivers/supercrd.c
@@ -408,7 +408,6 @@ GFXDECODE_END
//static MC6845_INTERFACE( mc6845_intf )
//{
-// "screen", /* screen we are acting on */
// false,
// 4, /* number of pixels per video memory address */
// NULL, /* before pixel update callback */
@@ -477,7 +476,7 @@ static MACHINE_CONFIG_START( supercrd, supercrd_state )
MCFG_PALETTE_INIT_OVERRIDE(supercrd_state, supercrd)
MCFG_VIDEO_START_OVERRIDE(supercrd_state, supercrd)
-// MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf)
+// MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8, mc6845_intf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c
index a306727657c..9e0b264061b 100644
--- a/src/mame/drivers/taito_f2.c
+++ b/src/mame/drivers/taito_f2.c
@@ -2835,7 +2835,6 @@ static const ay8910_interface ay8910_config =
static const tc0100scn_interface taitof2_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2845,7 +2844,6 @@ static const tc0100scn_interface taitof2_tc0100scn_intf =
static const tc0100scn_interface liquidk_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
3, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2855,7 +2853,6 @@ static const tc0100scn_interface liquidk_tc0100scn_intf =
static const tc0100scn_interface dondokod_tc0100scn_intf =
{
- "screen",
1, 3, /* gfxnum, txnum */
3, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2865,7 +2862,6 @@ static const tc0100scn_interface dondokod_tc0100scn_intf =
static const tc0100scn_interface finalb_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
1, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2875,7 +2871,6 @@ static const tc0100scn_interface finalb_tc0100scn_intf =
static const tc0100scn_interface ninjak_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2885,7 +2880,6 @@ static const tc0100scn_interface ninjak_tc0100scn_intf =
static const tc0100scn_interface qzchikyu_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
-4, 0, /* flip_xoff, flip_yoff */
@@ -2895,7 +2889,6 @@ static const tc0100scn_interface qzchikyu_tc0100scn_intf =
static const tc0100scn_interface solfigtr_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
3, 0, /* x_offset, y_offset */
6, 0, /* flip_xoff, flip_yoff */
@@ -2905,7 +2898,6 @@ static const tc0100scn_interface solfigtr_tc0100scn_intf =
static const tc0100scn_interface koshien_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
1, 0, /* x_offset, y_offset */
2, 0, /* flip_xoff, flip_yoff */
@@ -2915,7 +2907,6 @@ static const tc0100scn_interface koshien_tc0100scn_intf =
static const tc0100scn_interface thundfox_tc0100scn_intf_1 =
{
- "screen",
1, 3, /* gfxnum, txnum */
3, 0, /* x_offset, y_offset */
5, 0, /* flip_xoff, flip_yoff */
@@ -2925,7 +2916,6 @@ static const tc0100scn_interface thundfox_tc0100scn_intf_1 =
static const tc0100scn_interface thundfox_tc0100scn_intf_2 =
{
- "screen",
2, 4, /* gfxnum, txnum */
3, 0, /* x_offset, y_offset */
5, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index c826713cdbe..f643e4c8743 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -2947,7 +2947,6 @@ Contcirc road glitchiness in attract?
static const tc0100scn_interface taitoz_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2957,7 +2956,6 @@ static const tc0100scn_interface taitoz_tc0100scn_intf =
static const tc0100scn_interface chasehq_tc0100scn_intf =
{
- "screen",
1, 3, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -2967,7 +2965,6 @@ static const tc0100scn_interface chasehq_tc0100scn_intf =
static const tc0100scn_interface spacegun_tc0100scn_intf =
{
- "screen",
1, 2, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c
index 1d0ff31a1c5..f96b0b8ceb0 100644
--- a/src/mame/drivers/tapatune.c
+++ b/src/mame/drivers/tapatune.c
@@ -365,7 +365,6 @@ WRITE_LINE_MEMBER(tapatune_state::crtc_vsync)
static MC6845_INTERFACE( h46505_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
5, /* number of pixels per video memory address */
begin_update,/* before pixel update callback */
@@ -400,7 +399,7 @@ static MACHINE_CONFIG_START( tapatune, tapatune_state )
MCFG_PALETTE_LENGTH(16)
- MCFG_MC6845_ADD("crtc", H46505, 24000000/16, h46505_intf) /* H46505 */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 24000000/16, h46505_intf) /* H46505 */
MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW)
diff --git a/src/mame/drivers/tasman.c b/src/mame/drivers/tasman.c
index 6ff97394910..9887c8d56dc 100644
--- a/src/mame/drivers/tasman.c
+++ b/src/mame/drivers/tasman.c
@@ -570,7 +570,6 @@ static const k056832_interface k056832_intf =
static const k053247_interface k053247_intf =
{
- "screen",
"gfx2", 1,
TASMAN_PLANE_ORDER,
-48+1, 23,
diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c
index 7ffce58f001..b4e8220f810 100644
--- a/src/mame/drivers/thief.c
+++ b/src/mame/drivers/thief.c
@@ -426,7 +426,6 @@ static const samples_interface natodef_samples_interface =
static const tms9927_interface tms9927_intf =
{
- "screen",
8,
NULL
};
diff --git a/src/mame/drivers/tmspoker.c b/src/mame/drivers/tmspoker.c
index 4658ff199fd..666a3c96a06 100644
--- a/src/mame/drivers/tmspoker.c
+++ b/src/mame/drivers/tmspoker.c
@@ -548,7 +548,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -589,7 +588,7 @@ static MACHINE_CONFIG_START( tmspoker, tmspoker_state )
MCFG_SCREEN_UPDATE_DRIVER(tmspoker_state, screen_update_tmspoker)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/4, mc6845_intf) /* guess */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/4, mc6845_intf) /* guess */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/truco.c b/src/mame/drivers/truco.c
index d4425d22f4b..188d2464d10 100644
--- a/src/mame/drivers/truco.c
+++ b/src/mame/drivers/truco.c
@@ -434,7 +434,6 @@ static const pia6821_interface pia0_intf =
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -473,7 +472,7 @@ static MACHINE_CONFIG_START( truco, truco_state )
MCFG_PALETTE_LENGTH(16)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* Identified as UM6845 */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf) /* Identified as UM6845 */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c
index 74327442867..af6da098102 100644
--- a/src/mame/drivers/tumblep.c
+++ b/src/mame/drivers/tumblep.c
@@ -273,7 +273,6 @@ GFXDECODE_END
static const deco16ic_interface tumblep_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c
index 2fe614415b6..2f255a22d85 100644
--- a/src/mame/drivers/twincobr.c
+++ b/src/mame/drivers/twincobr.c
@@ -690,7 +690,7 @@ static MACHINE_CONFIG_START( twincobr, twincobr_state )
MCFG_MACHINE_RESET_OVERRIDE(twincobr_state,twincobr)
/* video hardware */
- MCFG_MC6845_ADD("crtc", HD6845, XTAL_28MHz/8, twincobr_mc6845_intf) /* 3.5MHz measured on CLKin */
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", XTAL_28MHz/8, twincobr_mc6845_intf) /* 3.5MHz measured on CLKin */
MCFG_TOAPLAN_SCU_ADD("toaplan_scu")
diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c
index 97761c15e10..1ef0be17bf6 100644
--- a/src/mame/drivers/undrfire.c
+++ b/src/mame/drivers/undrfire.c
@@ -710,7 +710,6 @@ INTERRUPT_GEN_MEMBER(undrfire_state::undrfire_interrupt)
static const tc0100scn_interface undrfire_tc0100scn_intf =
{
- "screen",
2, 3, /* gfxnum, txnum */
50, 8, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c
index 1289a73ef78..86218e64656 100644
--- a/src/mame/drivers/usgames.c
+++ b/src/mame/drivers/usgames.c
@@ -216,7 +216,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -251,7 +250,7 @@ static MACHINE_CONFIG_START( usg32, usgames_state )
MCFG_PALETTE_LENGTH(2*256)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_18MHz / 16, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_18MHz / 16, mc6845_intf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c
index 541f9477270..b610ecfeca4 100644
--- a/src/mame/drivers/vaportra.c
+++ b/src/mame/drivers/vaportra.c
@@ -204,7 +204,6 @@ static int vaportra_bank_callback( const int bank )
static const deco16ic_interface vaportra_deco16ic_tilegen1_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x20, /* color base */
@@ -217,7 +216,6 @@ static const deco16ic_interface vaportra_deco16ic_tilegen1_intf =
static const deco16ic_interface vaportra_deco16ic_tilegen2_intf =
{
- "screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x30, 0x40, /* color base */
diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c
index 97240c905ec..32054b9925f 100644
--- a/src/mame/drivers/vcombat.c
+++ b/src/mame/drivers/vcombat.c
@@ -573,7 +573,6 @@ WRITE_LINE_MEMBER(vcombat_state::sound_update)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -617,7 +616,7 @@ static MACHINE_CONFIG_START( vcombat, vcombat_state )
MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
/* Disabled for now as it can't handle multiple screens */
-// MCFG_MC6845_ADD("crtc", MC6845, 6000000 / 16, mc6845_intf)
+// MCFG_MC6845_ADD("crtc", MC6845, "screen", 6000000 / 16, mc6845_intf)
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
MCFG_SCREEN_ADD("screen", RASTER)
@@ -653,7 +652,7 @@ static MACHINE_CONFIG_START( shadfgtr, vcombat_state )
MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_20MHz / 4 / 16, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_20MHz / 4 / 16, mc6845_intf)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_20MHz / 4, 320, 0, 256, 277, 0, 224)
diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c
index 9f87b322e50..4295666c885 100644
--- a/src/mame/drivers/vendetta.c
+++ b/src/mame/drivers/vendetta.c
@@ -428,7 +428,6 @@ static const k052109_interface esckids_k052109_intf =
static const k053247_interface vendetta_k053246_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
53, 6,
@@ -438,7 +437,6 @@ static const k053247_interface vendetta_k053246_intf =
static const k053247_interface esckids_k053246_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
101, 6,
@@ -448,7 +446,6 @@ static const k053247_interface esckids_k053246_intf =
static const k053252_interface esckids_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/vlc.c b/src/mame/drivers/vlc.c
index ddd105f5a61..36f77e33024 100644
--- a/src/mame/drivers/vlc.c
+++ b/src/mame/drivers/vlc.c
@@ -233,7 +233,6 @@ static const UINT8 pal35[256] = {
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -660,7 +659,7 @@ static MACHINE_CONFIG_START( nevada, nevada_state )
MCFG_GFXDECODE(nevada)
MCFG_PALETTE_LENGTH(256)
- MCFG_MC6845_ADD("crtc", MC6845, MC6845_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MC6845_CLOCK, mc6845_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/vsnes.c b/src/mame/drivers/vsnes.c
index bdc7b96e14a..cd2ed050650 100644
--- a/src/mame/drivers/vsnes.c
+++ b/src/mame/drivers/vsnes.c
@@ -1706,6 +1706,7 @@ static MACHINE_CONFIG_START( vsnes, vsnes_state )
MCFG_VIDEO_START_OVERRIDE(vsnes_state,vsnes)
MCFG_PPU2C04_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
/* sound hardware */
@@ -1723,6 +1724,7 @@ static MACHINE_CONFIG_DERIVED( jajamaru, vsnes )
MCFG_DEVICE_REMOVE( "ppu1" )
MCFG_PPU2C05_01_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
MACHINE_CONFIG_END
@@ -1730,6 +1732,7 @@ static MACHINE_CONFIG_DERIVED( mightybj, vsnes )
MCFG_DEVICE_REMOVE( "ppu1" )
MCFG_PPU2C05_02_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
MACHINE_CONFIG_END
@@ -1737,6 +1740,7 @@ static MACHINE_CONFIG_DERIVED( vsgshoe, vsnes )
MCFG_DEVICE_REMOVE( "ppu1" )
MCFG_PPU2C05_03_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
MACHINE_CONFIG_END
@@ -1744,6 +1748,7 @@ static MACHINE_CONFIG_DERIVED( topgun, vsnes )
MCFG_DEVICE_REMOVE( "ppu1" )
MCFG_PPU2C05_04_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
MACHINE_CONFIG_END
@@ -1779,8 +1784,10 @@ static MACHINE_CONFIG_START( vsdual, vsnes_state )
MCFG_VIDEO_START_OVERRIDE(vsnes_state,vsdual)
MCFG_PPU2C04_ADD("ppu1", vsnes_ppu_interface_1)
+ MCFG_PPU2C0X_SET_SCREEN("screen1")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_1)
MCFG_PPU2C04_ADD("ppu2", vsnes_ppu_interface_2)
+ MCFG_PPU2C0X_SET_SCREEN("screen2")
MCFG_PPU2C0X_SET_NMI(vsnes_state, ppu_irq_2)
/* sound hardware */
diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c
index 14facbaf28f..71b3b96b277 100644
--- a/src/mame/drivers/wardner.c
+++ b/src/mame/drivers/wardner.c
@@ -403,7 +403,7 @@ static MACHINE_CONFIG_START( wardner, wardner_state )
MCFG_MACHINE_RESET_OVERRIDE(wardner_state,wardner)
/* video hardware */
- MCFG_MC6845_ADD("crtc", HD6845, XTAL_14MHz/4, twincobr_mc6845_intf) /* 3.5MHz measured on CLKin */
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", XTAL_14MHz/4, twincobr_mc6845_intf) /* 3.5MHz measured on CLKin */
MCFG_TOAPLAN_SCU_ADD("toaplan_scu")
diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c
index 2f9aba61ee2..bc8747a42b6 100644
--- a/src/mame/drivers/warriorb.c
+++ b/src/mame/drivers/warriorb.c
@@ -425,7 +425,6 @@ WRITE_LINE_MEMBER(warriorb_state::irqhandler)
static const tc0100scn_interface darius2d_tc0100scn_intf_l =
{
- "lscreen",
1, 3, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -435,7 +434,6 @@ static const tc0100scn_interface darius2d_tc0100scn_intf_l =
static const tc0100scn_interface darius2d_tc0100scn_intf_r =
{
- "rscreen",
2, 3, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -445,7 +443,6 @@ static const tc0100scn_interface darius2d_tc0100scn_intf_r =
static const tc0100scn_interface warriorb_tc0100scn_intf_l =
{
- "lscreen",
1, 3, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -455,7 +452,6 @@ static const tc0100scn_interface warriorb_tc0100scn_intf_l =
static const tc0100scn_interface warriorb_tc0100scn_intf_r =
{
- "rscreen",
2, 3, /* gfxnum, txnum */
4, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -543,7 +539,9 @@ static MACHINE_CONFIG_START( darius2d, warriorb_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2d_tc0100scn_intf_l)
+ MCFG_TC0100SCN_SET_SCREEN("lscreen")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2d_tc0100scn_intf_r)
+ MCFG_TC0100SCN_SET_SCREEN("rscreen")
MCFG_TC0110PCR_ADD("tc0110pcr_1", darius2d_tc0110pcr_intf_l)
MCFG_TC0110PCR_ADD("tc0110pcr_2", darius2d_tc0110pcr_intf_r)
@@ -606,7 +604,9 @@ static MACHINE_CONFIG_START( warriorb, warriorb_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", warriorb_tc0100scn_intf_l)
+ MCFG_TC0100SCN_SET_SCREEN("lscreen")
MCFG_TC0100SCN_ADD("tc0100scn_2", warriorb_tc0100scn_intf_r)
+ MCFG_TC0100SCN_SET_SCREEN("rscreen")
MCFG_TC0110PCR_ADD("tc0110pcr_1", darius2d_tc0110pcr_intf_l)
MCFG_TC0110PCR_ADD("tc0110pcr_2", darius2d_tc0110pcr_intf_r)
diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c
index 4bcf92603c3..a8ceb1a2a3d 100644
--- a/src/mame/drivers/wgp.c
+++ b/src/mame/drivers/wgp.c
@@ -935,7 +935,6 @@ void wgp_state::machine_start()
static const tc0100scn_interface wgp_tc0100scn_intf =
{
- "screen",
1, 3, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@@ -945,7 +944,6 @@ static const tc0100scn_interface wgp_tc0100scn_intf =
static const tc0100scn_interface wgp2_tc0100scn_intf =
{
- "screen",
1, 3, /* gfxnum, txnum */
4, 2, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index 915dd898700..b548bf3f48b 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -235,7 +235,6 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
- device_t *m_screen;
INT32 *m_zoom_table;
UINT16 *m_blitter_data;
@@ -764,8 +763,6 @@ void wheelfir_state::machine_reset()
void wheelfir_state::machine_start()
{
- m_screen = machine().device("screen");
-
m_zoom_table = auto_alloc_array(machine(), INT32, ZOOM_TABLE_SIZE);
m_blitter_data = auto_alloc_array(machine(), UINT16, 16);
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index e1a84705a32..12d1351a6ff 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -401,7 +401,6 @@ static const k054539_interface k054539_config =
static const k054338_interface xexex_k054338_intf =
{
- "screen",
0,
"none"
};
@@ -417,7 +416,6 @@ static const k056832_interface xexex_k056832_intf =
static const k053247_interface xexex_k053246_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
-48, 32,
@@ -427,7 +425,6 @@ static const k053247_interface xexex_k053246_intf =
static const k053252_interface xexex_k053252_intf =
{
- "screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c
index 77f43a7c0d9..ceebc3a74f1 100644
--- a/src/mame/drivers/xmen.c
+++ b/src/mame/drivers/xmen.c
@@ -329,7 +329,6 @@ static const k052109_interface xmen_k052109_intf =
static const k053247_interface xmen_k053246_intf =
{
- "screen",
"gfx2", 1,
NORMAL_PLANE_ORDER,
53, -2,
@@ -393,7 +392,6 @@ MACHINE_CONFIG_END
static const k053247_interface xmen6p_k053246_intf =
{
- "lscreen", /* is this correct? */
"gfx2", 1,
NORMAL_PLANE_ORDER,
53, -2,
@@ -438,6 +436,7 @@ static MACHINE_CONFIG_START( xmen6p, xmen_state )
MCFG_K052109_ADD("k052109", xmen_k052109_intf)
MCFG_K053246_ADD("k053246", xmen6p_k053246_intf)
+ MCFG_K053246_SET_SCREEN("lscreen")
MCFG_K053251_ADD("k053251")
/* sound hardware */
diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h
index 2afab97fb3b..1ea824e4881 100644
--- a/src/mame/includes/gaelco.h
+++ b/src/mame/includes/gaelco.h
@@ -12,7 +12,7 @@ public:
m_videoram(*this, "videoram"),
m_vregs(*this, "vregs"),
m_spriteram(*this, "spriteram"),
- m_screen(*this, "screen"),
+ m_screenram(*this, "screenram"),
m_audiocpu(*this, "audiocpu"),
m_maincpu(*this, "maincpu") { }
@@ -20,7 +20,7 @@ public:
required_shared_ptr<UINT16> m_videoram;
required_shared_ptr<UINT16> m_vregs;
required_shared_ptr<UINT16> m_spriteram;
- optional_shared_ptr<UINT16> m_screen;
+ optional_shared_ptr<UINT16> m_screenram;
// UINT16 * paletteram; // currently this uses generic palette handling
/* video-related */
diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h
index 5dfed21d6e8..bfc60e1d400 100644
--- a/src/mame/includes/rltennis.h
+++ b/src/mame/includes/rltennis.h
@@ -16,7 +16,6 @@ public:
m_dac_2(*this, "dac2") { }
required_device<cpu_device> m_maincpu;
- device_t *m_screen;
UINT16 m_blitter[RLT_NUM_BLITTER_REGS];
diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c
index 4586800039d..8088fff0866 100644
--- a/src/mame/machine/atarigen.c
+++ b/src/mame/machine/atarigen.c
@@ -385,14 +385,13 @@ const device_type ATARI_VAD = &device_creator<atari_vad_device>;
atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ATARI_VAD, "Atari VAD", tag, owner, clock, "atarivad", __FILE__),
- m_screen_tag(NULL),
+ device_video_interface(mconfig, *this),
m_scanline_int_cb(*this),
m_alpha_tilemap(*this, "alpha"),
m_playfield_tilemap(*this, "playfield"),
m_playfield2_tilemap(*this, "playfield2"),
m_mob(*this, "mob"),
m_eof_data(*this, "eof"),
- m_screen(NULL),
m_scanline_int_timer(NULL),
m_tilerow_update_timer(NULL),
m_eof_timer(NULL),
@@ -408,16 +407,6 @@ atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *ta
//-------------------------------------------------
-// static_set_screen: Set the tag of the screen
-//-------------------------------------------------
-
-void atari_vad_device::static_set_screen(device_t &device, const char *screentag)
-{
- downcast<atari_vad_device &>(device).m_screen_tag = screentag;
-}
-
-
-//-------------------------------------------------
// control_write: Does the bulk of the word for an I/O
// write.
//-------------------------------------------------
@@ -531,13 +520,6 @@ void atari_vad_device::device_start()
if (m_eof_data == NULL)
throw emu_fatalerror("EOF data not found!");
- // find the screen
- if (m_screen_tag == NULL)
- throw emu_fatalerror("No screen specified!");
- m_screen = siblingdevice<screen_device>(m_screen_tag);
- if (m_screen == NULL)
- throw emu_fatalerror("Screen '%s' not found!", m_screen_tag);
-
// resolve callbacks
m_scanline_int_cb.resolve_safe();
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index e1ba2105f4a..f10e6ce2de1 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -68,7 +68,7 @@
#define MCFG_ATARI_VAD_ADD(_tag, _screen, _intcb) \
MCFG_DEVICE_ADD(_tag, ATARI_VAD, 0) \
- atari_vad_device::static_set_screen(*device, _screen); \
+ MCFG_VIDEO_SET_SCREEN(_screen) \
devcb = &atari_vad_device::static_set_scanline_int_cb(*device, DEVCB2_##_intcb);
#define MCFG_ATARI_VAD_PLAYFIELD(_class, _getinfo) \
{ astring fulltag(device->tag(), ":playfield"); device_t *device; \
@@ -191,14 +191,14 @@ class atari_motion_objects_device;
// device type definition
extern const device_type ATARI_VAD;
-class atari_vad_device : public device_t
+class atari_vad_device : public device_t,
+ public device_video_interface
{
public:
// construction/destruction
atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration helpers
- static void static_set_screen(device_t &device, const char *screentag);
template<class _Object> static devcb2_base &static_set_scanline_int_cb(device_t &device, _Object object) { return downcast<atari_vad_device &>(device).m_scanline_int_cb.set_callback(object); }
// getters
@@ -241,7 +241,6 @@ private:
void eof_update(emu_timer &timer);
// configuration state
- const char * m_screen_tag;
devcb2_write_line m_scanline_int_cb;
// internal state
@@ -251,7 +250,6 @@ private:
optional_device<atari_motion_objects_device> m_mob;
optional_shared_ptr<UINT16> m_eof_data;
- screen_device * m_screen;
emu_timer * m_scanline_int_timer;
emu_timer * m_tilerow_update_timer;
emu_timer * m_eof_timer;
diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c
index 3c143eeba56..cbec27cb2b0 100644
--- a/src/mame/machine/megadriv.c
+++ b/src/mame/machine/megadriv.c
@@ -975,7 +975,6 @@ MACHINE_CONFIG_END
static const sega315_5124_interface sms_vdp_ntsc_intf =
{
false,
- "megadriv",
DEVCB_NULL,
DEVCB_NULL,
};
@@ -983,7 +982,6 @@ static const sega315_5124_interface sms_vdp_ntsc_intf =
static const sega315_5124_interface sms_vdp_pal_intf =
{
true,
- "megadriv",
DEVCB_NULL,
DEVCB_NULL,
};
@@ -1013,6 +1011,7 @@ MACHINE_CONFIG_FRAGMENT( md_ntsc )
MCFG_DEVICE_ADD("gen_vdp", SEGA_GEN_VDP, 0)
MCFG_DEVICE_CONFIG( sms_vdp_ntsc_intf )
+ MCFG_VIDEO_SET_SCREEN("megadriv")
sega_genesis_vdp_device::set_genesis_vdp_sndirqline_callback(*device, genesis_vdp_sndirqline_callback_genesis_z80);
sega_genesis_vdp_device::set_genesis_vdp_lv6irqline_callback(*device, genesis_vdp_lv6irqline_callback_genesis_68k);
sega_genesis_vdp_device::set_genesis_vdp_lv4irqline_callback(*device, genesis_vdp_lv4irqline_callback_genesis_68k);
@@ -1066,6 +1065,7 @@ MACHINE_CONFIG_FRAGMENT( md_pal )
MCFG_DEVICE_ADD("gen_vdp", SEGA_GEN_VDP, 0)
MCFG_DEVICE_CONFIG( sms_vdp_pal_intf )
+ MCFG_VIDEO_SET_SCREEN("megadriv")
sega_genesis_vdp_device::set_genesis_vdp_sndirqline_callback(*device, genesis_vdp_sndirqline_callback_genesis_z80);
sega_genesis_vdp_device::set_genesis_vdp_lv6irqline_callback(*device, genesis_vdp_lv6irqline_callback_genesis_68k);
sega_genesis_vdp_device::set_genesis_vdp_lv4irqline_callback(*device, genesis_vdp_lv4irqline_callback_genesis_68k);
diff --git a/src/mame/video/atarimo.c b/src/mame/video/atarimo.c
index 438b4b18598..cd21b2f9cd5 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -154,6 +154,7 @@ const device_type ATARI_MOTION_OBJECTS = &device_creator<atari_motion_objects_de
atari_motion_objects_device::atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sprite16_device_ind16(mconfig, ATARI_MOTION_OBJECTS, "Atari Motion Objects", tag, owner, "atarimo", __FILE__),
+ device_video_interface(mconfig, *this),
m_tilewidth(0),
m_tileheight(0),
m_tilexshift(0),
@@ -181,16 +182,6 @@ atari_motion_objects_device::atari_motion_objects_device(const machine_config &m
//-------------------------------------------------
-// static_set_screen: Set the tag of the screen
-//-------------------------------------------------
-
-void atari_motion_objects_device::static_set_screen(device_t &device, const char *screentag)
-{
- downcast<atari_motion_objects_device &>(device).m_screen_tag = screentag;
-}
-
-
-//-------------------------------------------------
// static_set_config: Set the tag of the
// sound CPU
//-------------------------------------------------
@@ -305,13 +296,6 @@ void atari_motion_objects_device::device_start()
if (gfx == NULL)
throw emu_fatalerror("No gfxelement #%d!", m_gfxindex);
- // find the screen
- if (m_screen_tag == NULL)
- throw emu_fatalerror("No screen specified!");
- m_screen = siblingdevice<screen_device>(m_screen_tag);
- if (m_screen == NULL)
- throw emu_fatalerror("Screen '%s' not found!", m_screen_tag);
-
// determine the masks
m_linkmask.set(m_link_entry);
m_codemask.set(m_code_entry);
diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h
index 0caef79c87c..b8b08b2b2f8 100644
--- a/src/mame/video/atarimo.h
+++ b/src/mame/video/atarimo.h
@@ -49,7 +49,7 @@
#define MCFG_ATARI_MOTION_OBJECTS_ADD(_tag, _screen, _config) \
MCFG_DEVICE_ADD(_tag, ATARI_MOTION_OBJECTS, 0) \
- atari_motion_objects_device::static_set_screen(*device, _screen); \
+ MCFG_VIDEO_SET_SCREEN(_screen) \
atari_motion_objects_device::static_set_config(*device, _config); \
@@ -103,6 +103,7 @@ struct atari_motion_objects_config
extern const device_type ATARI_MOTION_OBJECTS;
class atari_motion_objects_device : public sprite16_device_ind16,
+ public device_video_interface,
public atari_motion_objects_config
{
static const int MAX_PER_BANK = 1024;
@@ -112,7 +113,6 @@ public:
atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration helpers
- static void static_set_screen(device_t &device, const char *screentag);
static void static_set_config(device_t &device, const atari_motion_objects_config &config);
// getters
@@ -193,9 +193,6 @@ private:
UINT16 m_uppershift; // upper shift
};
- // configuration state
- const char * m_screen_tag; // pointer to the screen
-
// parameter masks
sprite_parameter m_linkmask; // mask for the link
sprite_parameter m_gfxmask; // mask for the graphics bank
@@ -234,7 +231,6 @@ private:
int m_slipramsize; // total size of SLIP RAM, in entries
// live state
- screen_device * m_screen; // pointer to our screen
emu_timer * m_force_update_timer; // timer for forced updating
UINT32 m_bank; // current bank number
UINT32 m_xscroll; // xscroll offset
diff --git a/src/mame/video/cidelsa.c b/src/mame/video/cidelsa.c
index 592b894ae13..b85b1585ac0 100644
--- a/src/mame/video/cidelsa.c
+++ b/src/mame/video/cidelsa.c
@@ -127,7 +127,6 @@ ADDRESS_MAP_END
static CDP1869_INTERFACE( destryer_vis_intf )
{
- SCREEN_TAG,
0,
CDP1869_PAL,
cidelsa_pcb_r,
@@ -138,7 +137,6 @@ static CDP1869_INTERFACE( destryer_vis_intf )
static CDP1869_INTERFACE( altair_vis_intf )
{
- SCREEN_TAG,
0,
CDP1869_PAL,
cidelsa_pcb_r,
@@ -149,7 +147,6 @@ static CDP1869_INTERFACE( altair_vis_intf )
static CDP1869_INTERFACE( draco_vis_intf )
{
- SCREEN_TAG,
0,
CDP1869_PAL,
draco_pcb_r,
diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c
index 0d51467dde7..a55884a37da 100644
--- a/src/mame/video/deco16ic.c
+++ b/src/mame/video/deco16ic.c
@@ -168,7 +168,7 @@ const device_type DECO16IC = &device_creator<deco16ic_device>;
deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO16IC, "Data East IC 55 / 56 / 74 / 141", tag, owner, clock, "deco16ic", __FILE__),
- //m_screen(NULL),
+ device_video_interface(mconfig, *this),
m_pf1_data(NULL),
m_pf2_data(NULL),
m_pf12_control(NULL),
@@ -200,7 +200,6 @@ void deco16ic_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
m_bank_cb0 = NULL;
m_bank_cb1 = NULL;
}
@@ -618,7 +617,7 @@ READ16_MEMBER( deco16ic_device::pf2_data_r )
WRITE16_MEMBER( deco16ic_device::pf_control_w )
{
- space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos());
+ m_screen->update_partial(m_screen->vpos());
COMBINE_DATA(&m_pf12_control[offset]);
}
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 6924b7ffc71..6be2141299b 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -22,7 +22,6 @@ typedef int (*deco16_bank_cb)( const int bank );
struct deco16ic_interface
{
- const char *m_screen_tag;
int m_split;
int m_full_width12;
@@ -34,7 +33,8 @@ struct deco16ic_interface
};
class deco16ic_device : public device_t,
- public deco16ic_interface
+ public device_video_interface,
+ public deco16ic_interface
{
public:
deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -119,8 +119,6 @@ protected:
private:
// internal state
- //screen_device *m_screen;
-
UINT16 *m_pf1_data, *m_pf2_data;
UINT16 *m_pf12_control;
@@ -158,5 +156,6 @@ extern const device_type DECO16IC;
MCFG_DEVICE_ADD(_tag, DECO16IC, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_DECO16IC_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#endif
diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c
index f0a80861873..d6e1eea1109 100644
--- a/src/mame/video/decocomn.c
+++ b/src/mame/video/decocomn.c
@@ -13,7 +13,7 @@ const device_type DECOCOMN = &device_creator<decocomn_device>;
decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECOCOMN, "Data East Common Video Functions", tag, owner, clock, "decocomn", __FILE__),
- m_screen(NULL),
+ device_video_interface(mconfig, *this),
m_dirty_palette(NULL),
m_priority(0)
{
@@ -27,16 +27,6 @@ decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag,
void decocomn_device::device_config_complete()
{
- // inherit a copy of the static data
- const decocomn_interface *intf = reinterpret_cast<const decocomn_interface *>(static_config());
- if (intf != NULL)
- *static_cast<decocomn_interface *>(this) = *intf;
-
- // or initialize to defaults if none provided
- else
- {
- m_screen_tag = "";
- }
}
//-------------------------------------------------
@@ -47,7 +37,6 @@ void decocomn_device::device_start()
{
// int width, height;
- m_screen = machine().device<screen_device>(m_screen_tag);
// width = m_screen->width();
// height = m_screen->height();
diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h
index 34fe85608f3..5b3d76ff300 100644
--- a/src/mame/video/decocomn.h
+++ b/src/mame/video/decocomn.h
@@ -14,13 +14,8 @@
***************************************************************************/
-struct decocomn_interface
-{
- const char *m_screen_tag;
-};
-
class decocomn_device : public device_t,
- public decocomn_interface
+ public device_video_interface
{
public:
decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -41,7 +36,6 @@ protected:
private:
// internal state
- screen_device *m_screen;
UINT8 *m_dirty_palette;
UINT16 m_priority;
};
@@ -54,8 +48,7 @@ extern const device_type DECOCOMN;
DEVICE CONFIGURATION MACROS
***************************************************************************/
-#define MCFG_DECOCOMN_ADD(_tag, _interface) \
- MCFG_DEVICE_ADD(_tag, DECOCOMN, 0) \
- MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_DECOCOMN_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, DECOCOMN, 0)
#endif
diff --git a/src/mame/video/decodmd2.c b/src/mame/video/decodmd2.c
index 628ba0e2c21..8ef8f8c3f1c 100644
--- a/src/mame/video/decodmd2.c
+++ b/src/mame/video/decodmd2.c
@@ -117,7 +117,6 @@ MC6845_UPDATE_ROW( dmd_update_row )
MC6845_INTERFACE( decodmd2_6845_intf )
{
- NULL, /* screen name */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -149,7 +148,7 @@ static MACHINE_CONFIG_FRAGMENT( decodmd2 )
MCFG_TIMER_DRIVER_ADD_PERIODIC("firq_timer",decodmd_type2_device,dmd_firq,attotime::from_hz(80))
- MCFG_MC6845_ADD("dmd6845",MC6845,XTAL_8MHz / 8,decodmd2_6845_intf) // TODO: confirm clock speed
+ MCFG_MC6845_ADD("dmd6845",MC6845,NULL,XTAL_8MHz / 8,decodmd2_6845_intf) // TODO: confirm clock speed
MCFG_DEFAULT_LAYOUT(layout_lcd)
diff --git a/src/mame/video/k001006.c b/src/mame/video/k001006.c
index 8b48eddc514..2f83cd5dafc 100644
--- a/src/mame/video/k001006.c
+++ b/src/mame/video/k001006.c
@@ -17,7 +17,6 @@ const device_type K001006 = &device_creator<k001006_device>;
k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001006, "Konami 001006", tag, owner, clock, "k001006", __FILE__),
- //m_screen(NULL),
m_pal_ram(NULL),
m_unknown_ram(NULL),
m_addr(0),
diff --git a/src/mame/video/k001006.h b/src/mame/video/k001006.h
index 434ea20fc7f..463aaa0ec1e 100644
--- a/src/mame/video/k001006.h
+++ b/src/mame/video/k001006.h
@@ -14,7 +14,7 @@ struct k001006_interface
class k001006_device : public device_t,
- public k001006_interface
+ public k001006_interface
{
public:
k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -33,8 +33,6 @@ protected:
private:
// internal state
- //screen_device *m_screen;
-
UINT16 * m_pal_ram;
UINT16 * m_unknown_ram;
UINT32 m_addr;
diff --git a/src/mame/video/k001604.c b/src/mame/video/k001604.c
index b0e2c9eeeab..13a33344f12 100644
--- a/src/mame/video/k001604.c
+++ b/src/mame/video/k001604.c
@@ -17,7 +17,6 @@ const device_type K001604 = &device_creator<k001604_device>;
k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001604, "Konami 001604", tag, owner, clock, "k001604", __FILE__),
- //m_screen(NULL),
m_tile_ram(NULL),
m_char_ram(NULL),
m_reg(NULL)
diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h
index 4f77017eb73..97e22464a83 100644
--- a/src/mame/video/k001604.h
+++ b/src/mame/video/k001604.h
@@ -37,7 +37,6 @@ protected:
virtual void device_reset();
private:
// internal state
- //screen_device *m_screen;
tilemap_t *m_layer_8x8[2];
tilemap_t *m_layer_roz;
int m_gfx_index[2];
diff --git a/src/mame/video/k037122.c b/src/mame/video/k037122.c
index 3ba639afb11..2d19817a955 100644
--- a/src/mame/video/k037122.c
+++ b/src/mame/video/k037122.c
@@ -15,35 +15,15 @@ const device_type K037122 = &device_creator<k037122_device>;
k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K037122, "Konami 0371222", tag, owner, clock, "k037122", __FILE__),
- m_screen(NULL),
+ device_video_interface(mconfig, *this),
m_tile_ram(NULL),
m_char_ram(NULL),
- m_reg(NULL)
+ m_reg(NULL),
+ m_gfx_index(0)
{
}
//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void k037122_device::device_config_complete()
-{
- // inherit a copy of the static data
- const k037122_interface *intf = reinterpret_cast<const k037122_interface *>(static_config());
- if (intf != NULL)
- *static_cast<k037122_interface *>(this) = *intf;
-
- // or initialize to defaults if none provided
- else
- {
- m_screen_tag = "";
- m_gfx_index = 0;
- }
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -60,8 +40,6 @@ void k037122_device::device_start()
8*128
};
- m_screen = machine().device<screen_device>(m_screen_tag);
-
m_char_ram = auto_alloc_array_clear(machine(), UINT32, 0x200000 / 4);
m_tile_ram = auto_alloc_array_clear(machine(), UINT32, 0x20000 / 4);
m_reg = auto_alloc_array_clear(machine(), UINT32, 0x400 / 4);
diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h
index 4b2bdf0f023..05d4117a1e7 100644
--- a/src/mame/video/k037122.h
+++ b/src/mame/video/k037122.h
@@ -2,18 +2,14 @@
#ifndef __K037122_H__
#define __K037122_H__
-struct k037122_interface
-{
- const char *m_screen_tag;
- int m_gfx_index;
-};
-
class k037122_device : public device_t,
- public k037122_interface
+ public device_video_interface
{
public:
k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k037122_device() {}
+
+ static void static_set_gfx_index(device_t &device, int index) { downcast<k037122_device &>(device).m_gfx_index = index; }
void tile_draw( bitmap_rgb32 &bitmap, const rectangle &cliprect );
DECLARE_READ32_MEMBER( sram_r );
@@ -25,19 +21,19 @@ public:
protected:
// device-level overrides
- virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
private:
// internal state
- screen_device *m_screen;
tilemap_t *m_layer[2];
UINT32 * m_tile_ram;
UINT32 * m_char_ram;
UINT32 * m_reg;
+ int m_gfx_index;
+
TILE_GET_INFO_MEMBER(tile_info_layer0);
TILE_GET_INFO_MEMBER(tile_info_layer1);
void update_palette_color( UINT32 palette_base, int color );
@@ -45,8 +41,9 @@ private:
extern const device_type K037122;
-#define MCFG_K037122_ADD(_tag, _interface) \
+#define MCFG_K037122_ADD(_tag, _screen, _gfxindex) \
MCFG_DEVICE_ADD(_tag, K037122, 0) \
- MCFG_DEVICE_CONFIG(_interface)
+ MCFG_VIDEO_SET_SCREEN(_screen) \
+ k037122_device::static_set_gfx_index(*device, _gfxindex);
#endif
diff --git a/src/mame/video/k053246_k053247_k055673.c b/src/mame/video/k053246_k053247_k055673.c
index ce64c65f802..7c42dd2df9e 100644
--- a/src/mame/video/k053246_k053247_k055673.c
+++ b/src/mame/video/k053246_k053247_k055673.c
@@ -64,9 +64,7 @@ void k053247_device::clear_all()
m_callback = 0;
m_memory_region = 0;
- m_screen = 0;
- m_intf_screen = 0;
m_intf_gfx_memory_region = 0;
m_intf_gfx_num = -1;
m_intf_plane_order = 0;
@@ -988,8 +986,6 @@ void k055673_device::device_start()
return;
alt_k055673_vh_start(machine(), m_intf_gfx_memory_region, m_intf_plane_order, m_intf_dx, m_intf_dy, m_intf_callback);
-
- m_screen = machine().device<screen_device>(m_intf_screen);
}
//-------------------------------------------------
@@ -1001,13 +997,15 @@ void k055673_device::device_start()
const device_type K053246 = &device_creator<k053247_device>;
k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, K053246, "Konami 053246 & 053247", tag, owner, clock, "k053247", __FILE__)
+ : device_t(mconfig, K053246, "Konami 053246 & 053247", tag, owner, clock, "k053247", __FILE__),
+ device_video_interface(mconfig, *this)
{
clear_all();
}
k053247_device::k053247_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this)
{
clear_all();
}
@@ -1067,8 +1065,6 @@ void k053247_device::device_start()
16*64
};
- m_screen = machine().device<screen_device>(m_intf_screen);
-
/* decode the graphics */
switch (m_intf_plane_order)
{
@@ -1303,7 +1299,6 @@ void k053247_device::alt_k055673_vh_start(running_machine &machine, const char *
m_callback = callback;
m_objcha_line = CLEAR_LINE;
m_ram = auto_alloc_array(machine, UINT16, 0x1000/2);
- m_screen = machine.primary_screen;
memset(m_ram, 0, 0x1000);
memset(m_kx46_regs, 0, 8);
diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h
index 273d33374ed..f8256ed1ff0 100644
--- a/src/mame/video/k053246_k053247_k055673.h
+++ b/src/mame/video/k053246_k053247_k055673.h
@@ -44,7 +44,6 @@ Callback procedures for non-standard shadows:
struct k053247_interface
{
- const char *m_intf_screen;
const char *m_intf_gfx_memory_region;
int m_intf_gfx_num;
int m_intf_plane_order;
@@ -54,6 +53,7 @@ struct k053247_interface
};
class k053247_device : public device_t,
+ public device_video_interface,
public k053247_interface
{
public:
@@ -113,7 +113,6 @@ public:
k05324x_callback m_callback;
const char *m_memory_region;
- screen_device *m_screen;
/* alt implementation - to be collapsed */
void alt_k055673_vh_start(running_machine &machine, const char *gfx_memory_region, int alt_layout, int dx, int dy,
@@ -182,7 +181,7 @@ public:
// for Escape Kids (GX975)
if ( objset1 & 8 ) // Check only "Bit #3 is '1'?"
{
- int screenwidth = machine().primary_screen->width();
+ int screenwidth = m_screen->width();
zoomx = zoomx>>1; // Fix sprite width to HALF size
ox = (ox>>1) + 1; // Fix sprite draw position
@@ -497,6 +496,8 @@ extern const device_type K055673;
MCFG_DEVICE_ADD(_tag, K053246, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_K053246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define MCFG_K055673_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, K055673, 0) \
MCFG_DEVICE_CONFIG(_interface)
@@ -504,6 +505,7 @@ extern const device_type K055673;
#define MCFG_K055673_ADD_NOINTF(_tag ) \
MCFG_DEVICE_ADD(_tag, K055673, 0)
+#define MCFG_K055673_SET_SCREEN MCFG_VIDEO_SET_SCREEN
/* old non-device stuff */
diff --git a/src/mame/video/k054338.c b/src/mame/video/k054338.c
index 82ac5bd9b12..8df873bf770 100644
--- a/src/mame/video/k054338.c
+++ b/src/mame/video/k054338.c
@@ -85,13 +85,13 @@ void K054338_update_all_shadows(running_machine &machine, int rushingheroes_hack
// Unified K054338/K055555 BG color fill
-void K054338_fill_backcolor(running_machine &machine, bitmap_rgb32 &bitmap, int mode) // (see p.67)
+void K054338_fill_backcolor(running_machine &machine, screen_device &screen, bitmap_rgb32 &bitmap, int mode) // (see p.67)
{
int clipx, clipy, clipw, cliph, i, dst_pitch;
int BGC_CBLK, BGC_SET;
UINT32 *dst_ptr, *pal_ptr;
int bgcolor;
- const rectangle &visarea = machine.primary_screen->visible_area();
+ const rectangle &visarea = screen.visible_area();
driver_device *state = machine.driver_data();
clipx = visarea.min_x & ~3;
@@ -236,7 +236,8 @@ void K054338_export_config(int **shdRGB)
const device_type K054338 = &device_creator<k054338_device>;
k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, K054338, "Konami 054338", tag, owner, clock, "k054338", __FILE__)
+ : device_t(mconfig, K054338, "Konami 054338", tag, owner, clock, "k054338", __FILE__),
+ device_video_interface(mconfig, *this)
//m_regs[32],
//m_shd_rgb[9],
{
@@ -258,7 +259,6 @@ void k054338_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
m_alpha_inv = 0;
m_k055555_tag = "";
};
@@ -270,7 +270,6 @@ void k054338_device::device_config_complete()
void k054338_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_k055555 = machine().device<k055555_device>(m_k055555_tag);
save_item(NAME(m_regs));
diff --git a/src/mame/video/k054338.h b/src/mame/video/k054338.h
index 277480e88dc..04afeac277c 100644
--- a/src/mame/video/k054338.h
+++ b/src/mame/video/k054338.h
@@ -18,7 +18,7 @@ DECLARE_WRITE32_HANDLER( K054338_long_w );
int K054338_read_register(int reg);
void K054338_update_all_shadows(running_machine &machine, int rushingheroes_hack); // called at the beginning of SCREEN_UPDATE()
void K054338_fill_solid_bg(bitmap_ind16 &bitmap); // solid backcolor fill
-void K054338_fill_backcolor(running_machine &machine, bitmap_rgb32 &bitmap, int mode); // unified fill, 0=solid, 1=gradient
+void K054338_fill_backcolor(running_machine &machine, screen_device &screen, bitmap_rgb32 &bitmap, int mode); // unified fill, 0=solid, 1=gradient
int K054338_set_alpha_level(int pblend); // blend style 0-2
void K054338_invert_alpha(int invert); // 0=0x00(invis)-0x1f(solid), 1=0x1f(invis)-0x00(solod)
void K054338_export_config(int **shdRGB);
@@ -40,13 +40,13 @@ void K054338_export_config(int **shdRGB);
struct k054338_interface
{
- const char *m_screen_tag;
int m_alpha_inv;
const char *m_k055555_tag;
};
class k054338_device : public device_t,
+ public device_video_interface,
public k054338_interface
{
public:
@@ -77,7 +77,6 @@ private:
UINT16 m_regs[32];
int m_shd_rgb[9];
- screen_device *m_screen;
k055555_device *m_k055555; /* used to fill BG color */
};
diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c
index 7356d465eb9..729bce61160 100644
--- a/src/mame/video/kan_pand.c
+++ b/src/mame/video/kan_pand.c
@@ -53,7 +53,8 @@
const device_type KANEKO_PANDORA = &device_creator<kaneko_pandora_device>;
kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, KANEKO_PANDORA, "Kaneko Pandora - PX79C480FP-3", tag, owner, clock, "kaneko_pandora", __FILE__)
+ : device_t(mconfig, KANEKO_PANDORA, "Kaneko Pandora - PX79C480FP-3", tag, owner, clock, "kaneko_pandora", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -73,7 +74,6 @@ void kaneko_pandora_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
m_gfx_region = 0;
m_xoffset = 0;
m_yoffset = 0;
@@ -86,7 +86,6 @@ void kaneko_pandora_device::device_config_complete()
void kaneko_pandora_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_bg_pen = 0;
m_spriteram = auto_alloc_array(machine(), UINT8, 0x1000);
diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h
index 47bdcdad785..76be9f90504 100644
--- a/src/mame/video/kan_pand.h
+++ b/src/mame/video/kan_pand.h
@@ -15,13 +15,13 @@
struct kaneko_pandora_interface
{
- const char *m_screen_tag;
UINT8 m_gfx_region;
int m_xoffset;
int m_yoffset;
};
class kaneko_pandora_device : public device_t,
+ public device_video_interface,
public kaneko_pandora_interface
{
public:
@@ -47,7 +47,6 @@ protected:
private:
// internal state
- screen_device *m_screen;
UINT8 * m_spriteram;
bitmap_ind16 *m_sprites_bitmap; /* bitmap to render sprites to, Pandora seems to be frame'buffered' */
int m_clear_bitmap;
diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c
index 57a7d028cc4..78bca2f2cb6 100644
--- a/src/mame/video/konamigx.c
+++ b/src/mame/video/konamigx.c
@@ -410,7 +410,7 @@ void konamigx_state::konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitm
if (!objpool) return;
// clear screen with backcolor and update flicker pulse
- K054338_fill_backcolor(machine, bitmap, konamigx_wrport1_0 & 0x20);
+ K054338_fill_backcolor(machine, m_screen, bitmap, konamigx_wrport1_0 & 0x20);
// abort if video has been disabled
diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c
index 5a2feec9ff6..1ca48d5527a 100644
--- a/src/mame/video/madalien.c
+++ b/src/mame/video/madalien.c
@@ -376,7 +376,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -400,5 +399,5 @@ MACHINE_CONFIG_FRAGMENT( madalien_video )
MCFG_PALETTE_INIT_OVERRIDE(madalien_state,madalien)
MCFG_VIDEO_START_OVERRIDE(madalien_state,madalien)
- MCFG_MC6845_ADD("crtc", MC6845, PIXEL_CLOCK / 8, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", PIXEL_CLOCK / 8, mc6845_intf)
MACHINE_CONFIG_END
diff --git a/src/mame/video/playch10.c b/src/mame/video/playch10.c
index dd60373c83e..8fdbee81d01 100644
--- a/src/mame/video/playch10.c
+++ b/src/mame/video/playch10.c
@@ -71,7 +71,6 @@ void playch10_state::ppu_irq(int *ppu_regs)
const ppu2c0x_interface playch10_ppu_interface =
{
"cart",
- "bottom",
1, /* gfxlayout num */
256, /* color base */
PPU_MIRROR_NONE /* mirroring */
diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c
index 33cb0ce242f..100404e6316 100644
--- a/src/mame/video/ppu2c0x.c
+++ b/src/mame/video/ppu2c0x.c
@@ -123,12 +123,12 @@ void ppu2c0x_device::device_config_complete()
m_color_base = config->color_base;
m_cpu_tag = config->cpu_tag;
- m_screen_tag = config->screen_tag;
}
ppu2c0x_device::ppu2c0x_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(ppu2c0x)),
m_scanline(0), // reset the scanline count
m_refresh_data(0),
@@ -208,10 +208,9 @@ ppu2c05_04_device::ppu2c05_04_device(const machine_config &mconfig, const char *
void ppu2c0x_device::device_start()
{
- m_screen = machine().device<screen_device>( m_screen_tag );
m_cpu = machine().device<cpu_device>( m_cpu_tag );
- assert(m_screen && m_cpu);
+ assert(m_cpu);
// bind our handler
m_nmi_callback_proc.bind_relative_to(*owner());
diff --git a/src/mame/video/ppu2c0x.h b/src/mame/video/ppu2c0x.h
index 3c7a2757e84..39e3e492104 100644
--- a/src/mame/video/ppu2c0x.h
+++ b/src/mame/video/ppu2c0x.h
@@ -100,6 +100,8 @@ enum
#define MCFG_PPU2C05_04_ADD(_tag, _intrf) \
MCFG_PPU2C0X_ADD(_tag, PPU_2C05_04, _intrf)
+#define MCFG_PPU2C0X_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#define MCFG_PPU2C0X_SET_NMI( _class, _method) \
ppu2c0x_device::set_nmi_delegate(*device, ppu2c0x_nmi_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
@@ -118,7 +120,6 @@ typedef device_delegate<void (offs_t offset)> ppu2c0x_latch_delegate;
struct ppu2c0x_interface
{
const char *cpu_tag;
- const char *screen_tag;
int gfx_layout_number; /* gfx layout number used by each chip */
int color_base; /* color base to use per ppu */
int mirroring; /* mirroring options (PPU_MIRROR_* flag) */
@@ -129,6 +130,7 @@ struct ppu2c0x_interface
class ppu2c0x_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public ppu2c0x_interface
{
public:
@@ -177,7 +179,6 @@ public:
// void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
cpu_device *m_cpu;
- screen_device *m_screen;
bitmap_ind16 *m_bitmap; /* target bitmap */
UINT8 *m_spriteram; /* sprite ram */
pen_t *m_colortable; /* color table modified at run time */
@@ -212,7 +213,6 @@ public:
emu_timer *m_scanline_timer; /* scanline timer */
const char *m_cpu_tag;
- const char *m_screen_tag;
private:
static const device_timer_id TIMER_HBLANK = 0;
diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c
index 478c6c9c231..f52a7fe7c61 100644
--- a/src/mame/video/qix.c
+++ b/src/mame/video/qix.c
@@ -384,7 +384,6 @@ ADDRESS_MAP_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -404,7 +403,7 @@ MACHINE_CONFIG_FRAGMENT( qix_video )
MCFG_VIDEO_START_OVERRIDE(qix_state,qix)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, QIX_CHARACTER_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", QIX_CHARACTER_CLOCK, mc6845_intf)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(QIX_CHARACTER_CLOCK*8, 0x148, 0, 0x100, 0x111, 0, 0x100) /* from CRTC */
diff --git a/src/mame/video/seibu_crtc.c b/src/mame/video/seibu_crtc.c
index 4b78f7dec4e..364193d2949 100644
--- a/src/mame/video/seibu_crtc.c
+++ b/src/mame/video/seibu_crtc.c
@@ -204,6 +204,7 @@ WRITE16_MEMBER( seibu_crtc_device::layer_scroll_w)
seibu_crtc_device::seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEIBU_CRTC, "Seibu CRT Controller", tag, owner, clock, "seibu_crtc", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vregs", ENDIANNESS_LITTLE, 16, 7, 0, NULL, *ADDRESS_MAP_NAME(seibu_crtc_vregs))
{
}
@@ -235,7 +236,6 @@ void seibu_crtc_device::device_config_complete()
// or initialize to defaults if none provided
else
{
- m_screen_tag = "";
// memset(&m_layer_en, 0, sizeof(m_layer_en));
}
}
@@ -246,7 +246,6 @@ void seibu_crtc_device::device_config_complete()
void seibu_crtc_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_layer_en_func.resolve(m_layer_en_cb, *this);
m_layer_scroll_func.resolve(m_layer_scroll_cb, *this);
diff --git a/src/mame/video/seibu_crtc.h b/src/mame/video/seibu_crtc.h
index 7740570b7d6..45fe558206b 100644
--- a/src/mame/video/seibu_crtc.h
+++ b/src/mame/video/seibu_crtc.h
@@ -11,7 +11,6 @@ Template for skeleton device
struct seibu_crtc_interface
{
- const char *m_screen_tag;
devcb_write16 m_layer_en_cb;
devcb_write16 m_layer_scroll_cb;
@@ -37,6 +36,7 @@ struct seibu_crtc_interface
class seibu_crtc_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public seibu_crtc_interface
{
public:
@@ -60,7 +60,6 @@ protected:
virtual void device_reset();
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
- screen_device *m_screen;
devcb_resolved_write16 m_layer_en_func;
devcb_resolved_write16 m_layer_scroll_func;
private:
diff --git a/src/mame/video/taitoic.h b/src/mame/video/taitoic.h
index 6d870c01287..7df3eb7a612 100644
--- a/src/mame/video/taitoic.h
+++ b/src/mame/video/taitoic.h
@@ -45,8 +45,6 @@ struct tc0080vco_interface
struct tc0100scn_interface
{
- const char *m_screen_tag;
-
int m_gfxnum;
int m_txnum;
@@ -255,6 +253,7 @@ public:
extern const device_type TC0080VCO;
class tc0100scn_device : public device_t,
+ public device_video_interface,
public tc0100scn_interface
{
public:
@@ -327,8 +326,6 @@ private:
INT32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank;
int m_dblwidth;
- screen_device *m_screen;
-
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
diff --git a/src/mame/video/tc0100scn.c b/src/mame/video/tc0100scn.c
index a47f1d9d6de..a6a9c5073f4 100644
--- a/src/mame/video/tc0100scn.c
+++ b/src/mame/video/tc0100scn.c
@@ -121,6 +121,7 @@ const device_type TC0100SCN = &device_creator<tc0100scn_device>;
tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock, "tc0100scn", __FILE__),
+ device_video_interface(mconfig, *this),
m_ram(NULL),
m_bg_ram(NULL),
m_fg_ram(NULL),
@@ -141,8 +142,7 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta
m_bg0_colbank(0),
m_bg1_colbank(0),
m_tx_colbank(0),
- m_dblwidth(0),
- m_screen(NULL)
+ m_dblwidth(0)
{
}
@@ -184,8 +184,6 @@ void tc0100scn_device::device_start()
int xd, yd;
- m_screen = machine().device<screen_device>(m_screen_tag);
-
/* Set up clipping for multi-TC0100SCN games. We assume
this code won't ever affect single screen games:
Thundfox is the only one of those with two chips, and
diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h
index 56dc18b4cdc..5524085a42d 100644
--- a/src/mame/video/tc0100scn.h
+++ b/src/mame/video/tc0100scn.h
@@ -3,8 +3,6 @@
struct tc0100scn_interface
{
- const char *m_screen_tag;
-
int m_gfxnum;
int m_txnum;
@@ -17,6 +15,7 @@ struct tc0100scn_interface
};
class tc0100scn_device : public device_t,
+ public device_video_interface,
public tc0100scn_interface
{
public:
@@ -89,8 +88,6 @@ private:
INT32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank;
int m_dblwidth;
- screen_device *m_screen;
-
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
@@ -112,4 +109,6 @@ extern const device_type TC0100SCN;
MCFG_DEVICE_ADD(_tag, TC0100SCN, 0) \
MCFG_DEVICE_CONFIG(_interface)
+#define MCFG_TC0100SCN_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
#endif
diff --git a/src/mame/video/twincobr.c b/src/mame/video/twincobr.c
index 717dab05a7b..ac527391d9d 100644
--- a/src/mame/video/twincobr.c
+++ b/src/mame/video/twincobr.c
@@ -20,7 +20,6 @@
/* 6845 used for video sync signals only */
MC6845_INTERFACE( twincobr_mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
2, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
diff --git a/src/mame/video/vsnes.c b/src/mame/video/vsnes.c
index e8007ab9262..6dbd6927978 100644
--- a/src/mame/video/vsnes.c
+++ b/src/mame/video/vsnes.c
@@ -31,7 +31,6 @@ void vsnes_state::ppu_irq_2(int *ppu_regs)
const ppu2c0x_interface vsnes_ppu_interface_1 =
{
"maincpu",
- "screen1",
0, /* gfxlayout num */
0, /* color base */
PPU_MIRROR_NONE /* mirroring */
@@ -41,7 +40,6 @@ const ppu2c0x_interface vsnes_ppu_interface_1 =
const ppu2c0x_interface vsnes_ppu_interface_2 =
{
"sub",
- "screen2",
1, /* gfxlayout num */
512, /* color base */
PPU_MIRROR_NONE /* mirroring */
diff --git a/src/mess/drivers/a5105.c b/src/mess/drivers/a5105.c
index 8ccea5953c7..554b8309346 100644
--- a/src/mess/drivers/a5105.c
+++ b/src/mess/drivers/a5105.c
@@ -535,7 +535,6 @@ void a5105_state::video_start()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/a6809.c b/src/mess/drivers/a6809.c
index 21fe94d0f5a..048e779c48c 100644
--- a/src/mess/drivers/a6809.c
+++ b/src/mess/drivers/a6809.c
@@ -85,7 +85,6 @@ static MC6845_UPDATE_ROW( a6809_update_row )
static MC6845_INTERFACE( a6809_crtc6845_interface )
{
- "screen",
false,
12 /*?*/,
NULL,
@@ -196,7 +195,7 @@ static MACHINE_CONFIG_START( a6809, a6809_state )
/* Devices */
MCFG_VIA6522_ADD("via", XTAL_4MHz / 4, via_intf)
- MCFG_MC6845_ADD("mc6845", MC6845, XTAL_4MHz / 2, a6809_crtc6845_interface)
+ MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_4MHz / 2, a6809_crtc6845_interface)
MCFG_ASCII_KEYBOARD_ADD("keyboard", kb_intf)
MCFG_CASSETTE_ADD( "cassette", default_cassette_interface )
MCFG_TIMER_DRIVER_ADD_PERIODIC("a6809_c", a6809_state, a6809_c, attotime::from_hz(4800))
diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c
index d9e3de55647..db2bff61282 100644
--- a/src/mess/drivers/adam.c
+++ b/src/mess/drivers/adam.c
@@ -970,7 +970,6 @@ WRITE_LINE_MEMBER( adam_state::vdc_int_w )
static TMS9928A_INTERFACE( vdc_intf )
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(adam_state, vdc_int_w)
};
diff --git a/src/mess/drivers/alphatro.c b/src/mess/drivers/alphatro.c
index 93d492f4271..54fb6cbc6fc 100644
--- a/src/mess/drivers/alphatro.c
+++ b/src/mess/drivers/alphatro.c
@@ -401,7 +401,6 @@ void alphatro_state::palette_init()
static MC6845_INTERFACE( alphatro_crtc6845_interface )
{
- "screen",
false,
8,
NULL,
@@ -485,7 +484,7 @@ static MACHINE_CONFIG_START( alphatro, alphatro_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12_288MHz / 8, alphatro_crtc6845_interface) // clk unknown
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8, alphatro_crtc6845_interface) // clk unknown
MCFG_I8251_ADD("usart", alphatro_usart_interface)
diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c
index fa987ec7f78..08346a70f79 100644
--- a/src/mess/drivers/amstrad.c
+++ b/src/mess/drivers/amstrad.c
@@ -856,7 +856,7 @@ static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
MCFG_PALETTE_LENGTH(32)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_cpc)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, amstrad_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_16MHz / 16, amstrad_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
@@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state )
MCFG_PALETTE_LENGTH(4096)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
@@ -989,7 +989,7 @@ static MACHINE_CONFIG_START( gx4000, amstrad_state )
MCFG_PALETTE_LENGTH(4096)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
diff --git a/src/mess/drivers/apc.c b/src/mess/drivers/apc.c
index fd6ea279153..0f2c636c823 100644
--- a/src/mess/drivers/apc.c
+++ b/src/mess/drivers/apc.c
@@ -780,7 +780,6 @@ void apc_state::palette_init()
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -791,7 +790,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/applix.c b/src/mess/drivers/applix.c
index c14a0c6bd58..c0372c0e2b9 100644
--- a/src/mess/drivers/applix.c
+++ b/src/mess/drivers/applix.c
@@ -823,7 +823,6 @@ static MC6845_UPDATE_ROW( applix_update_row )
static MC6845_INTERFACE( applix_crtc )
{
- "screen", /* name of screen */
false, // should show a border
8, /* number of dots per character */
NULL,
@@ -921,7 +920,7 @@ static MACHINE_CONFIG_START( applix, applix_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, 1875000, applix_crtc) // 6545
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1875000, applix_crtc) // 6545
MCFG_VIA6522_ADD("via6522", 0, applix_via)
MCFG_CENTRONICS_PRINTER_ADD("centronics", applix_centronics_config)
MCFG_CASSETTE_ADD("cassette", applix_cassette_interface)
diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c
index 7f91e2b39a4..8cb9f8bd033 100644
--- a/src/mess/drivers/apricot.c
+++ b/src/mess/drivers/apricot.c
@@ -241,7 +241,6 @@ WRITE_LINE_MEMBER( apricot_state::apricot_mc6845_de )
static MC6845_INTERFACE( apricot_mc6845_intf )
{
- "screen",
false,
10,
NULL,
@@ -395,7 +394,7 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
MCFG_RAM_EXTRA_OPTIONS("384k,512k") /* with 1 or 2 128k expansion boards */
/* Devices */
- MCFG_MC6845_ADD("ic30", MC6845, XTAL_15MHz / 10, apricot_mc6845_intf)
+ MCFG_MC6845_ADD("ic30", MC6845, "screen", XTAL_15MHz / 10, apricot_mc6845_intf)
MCFG_I8255A_ADD("ic17", apricot_i8255a_intf)
MCFG_PIC8259_ADD("ic31", INPUTLINE("maincpu",0), VCC, NULL)
MCFG_PIT8253_ADD("ic16", apricot_pit8253_intf)
diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c
index 581542fb362..a11a0e498d2 100644
--- a/src/mess/drivers/apricotp.c
+++ b/src/mess/drivers/apricotp.c
@@ -59,7 +59,6 @@ static MC6845_UPDATE_ROW( fp_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_CRT_TAG,
false,
8,
NULL,
@@ -641,7 +640,7 @@ static MACHINE_CONFIG_START( fp, fp_state )
MCFG_PALETTE_LENGTH(16)
MCFG_GFXDECODE(act_f1)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, 4000000, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_CRT_TAG, 4000000, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/attache.c b/src/mess/drivers/attache.c
index e09ad4b6368..b366c420480 100644
--- a/src/mess/drivers/attache.c
+++ b/src/mess/drivers/attache.c
@@ -940,7 +940,6 @@ static const z80_daisy_config attache_daisy_chain[] =
static const tms9927_interface crtc_interface =
{
- "screen",
8, // guessing for now
NULL
};
diff --git a/src/mess/drivers/b16.c b/src/mess/drivers/b16.c
index e4c60338079..d212238986d 100644
--- a/src/mess/drivers/b16.c
+++ b/src/mess/drivers/b16.c
@@ -253,7 +253,6 @@ void b16_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -305,7 +304,7 @@ static MACHINE_CONFIG_START( b16, b16_state )
MCFG_SCREEN_SIZE(640, 400)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_14_31818MHz/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_14_31818MHz/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8237_ADD("8237dma", XTAL_14_31818MHz/2, b16_dma8237_interface)
MCFG_GFXDECODE(b16)
diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c
index af23ee65363..5bfe3b0bc98 100644
--- a/src/mess/drivers/bbc.c
+++ b/src/mess/drivers/bbc.c
@@ -868,7 +868,7 @@ static MACHINE_CONFIG_START( bbca, bbc_state )
MCFG_PALETTE_INIT_OVERRIDE(bbc_state,bbc)
MCFG_SAA5050_ADD("saa505x", XTAL_12MHz/2, trom_intf)
- MCFG_MC6845_ADD("mc6845",MC6845,2000000, bbc_mc6845_intf)
+ MCFG_MC6845_ADD("mc6845",MC6845,"screen",2000000, bbc_mc6845_intf)
MCFG_VIDEO_START_OVERRIDE(bbc_state,bbca)
@@ -963,7 +963,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
MCFG_SAA5050_ADD("saa505x", XTAL_12MHz/2, trom_intf)
- MCFG_MC6845_ADD("mc6845",MC6845,2000000, bbc_mc6845_intf)
+ MCFG_MC6845_ADD("mc6845",MC6845,"screen",2000000, bbc_mc6845_intf)
MCFG_VIDEO_START_OVERRIDE(bbc_state,bbcm)
diff --git a/src/mess/drivers/bbcbc.c b/src/mess/drivers/bbcbc.c
index be99563a245..a21a0e2a56b 100644
--- a/src/mess/drivers/bbcbc.c
+++ b/src/mess/drivers/bbcbc.c
@@ -108,7 +108,6 @@ WRITE_LINE_MEMBER(bbcbc_state::tms_interrupt)
static TMS9928A_INTERFACE(tms9129_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(bbcbc_state, tms_interrupt)
};
diff --git a/src/mess/drivers/bigbord2.c b/src/mess/drivers/bigbord2.c
index 0dda0765d92..1b7a5c98938 100644
--- a/src/mess/drivers/bigbord2.c
+++ b/src/mess/drivers/bigbord2.c
@@ -701,7 +701,6 @@ MC6845_UPDATE_ROW( bigbord2_update_row )
static MC6845_INTERFACE( bigbord2_crtc )
{
- SCREEN_TAG, /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -744,7 +743,7 @@ static MACHINE_CONFIG_START( bigbord2, bigbord2_state )
MCFG_Z80CTC_ADD(Z80CTCB_TAG, MAIN_CLOCK / 6, ctcb_intf)
MCFG_FD1793_ADD("fdc", fdc_intf)
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(bigbord2_floppy_interface)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_16MHz / 8, bigbord2_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, SCREEN_TAG, XTAL_16MHz / 8, bigbord2_crtc)
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
/* sound hardware */
diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c
index b4acc1898a4..53f993e0a5d 100644
--- a/src/mess/drivers/bml3.c
+++ b/src/mess/drivers/bml3.c
@@ -703,7 +703,6 @@ INPUT_PORTS_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1015,7 +1014,7 @@ static MACHINE_CONFIG_START( bml3_common, bml3_state )
/* Devices */
// CRTC clock should be synchronous with the CPU clock.
- MCFG_MC6845_ADD("crtc", H46505, CPU_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", CPU_CLOCK, mc6845_intf)
// fire once per scan of an individual key
// According to the service manual (p.65), the keyboard timer is driven by the horizontal video sync clock.
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", bml3_state, keyboard_callback, attotime::from_hz(H_CLOCK/2))
diff --git a/src/mess/drivers/bw12.c b/src/mess/drivers/bw12.c
index 657ac56c3f2..7f3df287ea9 100644
--- a/src/mess/drivers/bw12.c
+++ b/src/mess/drivers/bw12.c
@@ -355,7 +355,6 @@ static MC6845_UPDATE_ROW( bw12_update_row )
static MC6845_INTERFACE( bw12_mc6845_interface )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -665,7 +664,7 @@ static MACHINE_CONFIG_START( common, bw12_state )
MCFG_GFXDECODE(bw12)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/8, bw12_mc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/8, bw12_mc6845_interface)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c
index 1314dad0d56..350dadc490e 100644
--- a/src/mess/drivers/c128.c
+++ b/src/mess/drivers/c128.c
@@ -873,7 +873,6 @@ GFXDECODE_END
static MC6845_INTERFACE( vdc_intf )
{
- SCREEN_VDC_TAG,
false,
8,
NULL,
diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c
index 180acf22c53..e834cc20127 100644
--- a/src/mess/drivers/c65.c
+++ b/src/mess/drivers/c65.c
@@ -362,7 +362,6 @@ READ8_MEMBER(c65_state::c65_c64_mem_r)
}
static const vic3_interface c65_vic3_ntsc_intf = {
- "screen",
"maincpu",
VIC4567_NTSC,
DEVCB_DRIVER_MEMBER(c65_state,c65_lightpen_x_cb),
@@ -376,7 +375,6 @@ static const vic3_interface c65_vic3_ntsc_intf = {
};
static const vic3_interface c65_vic3_pal_intf = {
- "screen",
"maincpu",
VIC4567_PAL,
DEVCB_DRIVER_MEMBER(c65_state,c65_lightpen_x_cb),
diff --git a/src/mess/drivers/camplynx.c b/src/mess/drivers/camplynx.c
index dcd17b40cef..89452a913ba 100644
--- a/src/mess/drivers/camplynx.c
+++ b/src/mess/drivers/camplynx.c
@@ -433,7 +433,6 @@ void camplynx_state::video_start()
static MC6845_INTERFACE( lynx48k_crtc6845_interface )
{
- "screen",
false,
8,
NULL,
@@ -449,7 +448,6 @@ static MC6845_INTERFACE( lynx48k_crtc6845_interface )
static MC6845_INTERFACE( lynx128k_crtc6845_interface )
{
- "screen", /* screen name */
false,
8, /* dots per character */
NULL,
@@ -485,7 +483,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx48k_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx48k_crtc6845_interface)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( lynx128k, camplynx_state )
@@ -512,7 +510,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx128k_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx128k_crtc6845_interface)
MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(camplynx_state,lynx48k)
diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c
index fce11759cda..ff0663b3a74 100644
--- a/src/mess/drivers/cbm2.c
+++ b/src/mess/drivers/cbm2.c
@@ -1130,7 +1130,6 @@ static MC6845_UPDATE_ROW( crtc_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
9,
NULL,
@@ -2296,7 +2295,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
MCFG_SCREEN_SIZE(768, 312)
MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 312-1)
- MCFG_MC6845_ADD(MC68B45_TAG, MC6845, XTAL_18MHz/9, crtc_intf)
+ MCFG_MC6845_ADD(MC68B45_TAG, MC6845, SCREEN_TAG, XTAL_18MHz/9, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/coleco.c b/src/mess/drivers/coleco.c
index 04128229adb..f6f69ea7eff 100644
--- a/src/mess/drivers/coleco.c
+++ b/src/mess/drivers/coleco.c
@@ -233,7 +233,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(coleco_state::paddle_update_callback)
static TMS9928A_INTERFACE(coleco_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(coleco_state,coleco_vdp_interrupt)
};
diff --git a/src/mess/drivers/compis.c b/src/mess/drivers/compis.c
index 572fc931b66..fb2451df97f 100644
--- a/src/mess/drivers/compis.c
+++ b/src/mess/drivers/compis.c
@@ -135,7 +135,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/cortex.c b/src/mess/drivers/cortex.c
index c35520fd656..a4d1ef0f1f5 100644
--- a/src/mess/drivers/cortex.c
+++ b/src/mess/drivers/cortex.c
@@ -81,7 +81,6 @@ static const struct tms9995reset_param cortex_processor_config =
static TMS9928A_INTERFACE(cortex_tms9929a_interface)
{
- "screen", // screen tag
0x4000, // vram size
DEVCB_NULL // write line if int changes
};
diff --git a/src/mess/drivers/crvision.c b/src/mess/drivers/crvision.c
index 2c4417d1a48..cd8d15c93fc 100644
--- a/src/mess/drivers/crvision.c
+++ b/src/mess/drivers/crvision.c
@@ -499,7 +499,6 @@ INPUT_PORTS_END
static TMS9928A_INTERFACE( vdp_intf )
{
- SCREEN_TAG,
0x4000,
DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_IRQ0)
};
diff --git a/src/mess/drivers/dgn_beta.c b/src/mess/drivers/dgn_beta.c
index 88eeb746d38..5ce16d3a115 100644
--- a/src/mess/drivers/dgn_beta.c
+++ b/src/mess/drivers/dgn_beta.c
@@ -348,7 +348,7 @@ static MACHINE_CONFIG_START( dgnbeta, dgn_beta_state )
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(dgnbeta_floppy_interface)
- MCFG_MC6845_ADD("crtc", HD6845, XTAL_12_288MHz / 16, dgnbeta_crtc6845_interface) //XTAL is guessed
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", XTAL_12_288MHz / 16, dgnbeta_crtc6845_interface) //XTAL is guessed
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mess/drivers/dim68k.c b/src/mess/drivers/dim68k.c
index 0d1532644e4..681993679e0 100644
--- a/src/mess/drivers/dim68k.c
+++ b/src/mess/drivers/dim68k.c
@@ -292,7 +292,6 @@ GFXDECODE_END
static MC6845_INTERFACE( dim68k_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character - switchable 7 or 8 */
NULL,
@@ -344,7 +343,7 @@ static MACHINE_CONFIG_START( dim68k, dim68k_state )
MCFG_UPD765A_ADD("fdc", true, true) // these options unknown
MCFG_FLOPPY_DRIVE_ADD("fdc:0", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats)
- MCFG_MC6845_ADD("crtc", MC6845, 1790000, dim68k_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1790000, dim68k_crtc)
MCFG_ASCII_KEYBOARD_ADD("keyboard", kb_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/dmv.c b/src/mess/drivers/dmv.c
index dab479967c3..ce91aebd07f 100644
--- a/src/mess/drivers/dmv.c
+++ b/src/mess/drivers/dmv.c
@@ -264,7 +264,6 @@ GFXDECODE_END
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/ec65.c b/src/mess/drivers/ec65.c
index a65a87fc594..e85c285b4c0 100644
--- a/src/mess/drivers/ec65.c
+++ b/src/mess/drivers/ec65.c
@@ -216,7 +216,6 @@ static MC6845_UPDATE_ROW( ec65_update_row )
static MC6845_INTERFACE( ec65_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -267,7 +266,7 @@ static MACHINE_CONFIG_START( ec65, ec65_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz / 8, ec65_crtc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8, ec65_crtc6845_interface)
/* devices */
@@ -298,7 +297,7 @@ static MACHINE_CONFIG_START( ec65k, ec65_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz / 8, ec65_crtc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8, ec65_crtc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/einstein.c b/src/mess/drivers/einstein.c
index c5e5ddd5b93..f36af1c7ba2 100644
--- a/src/mess/drivers/einstein.c
+++ b/src/mess/drivers/einstein.c
@@ -383,7 +383,6 @@ WRITE8_MEMBER(einstein_state::einstein_fire_int_w)
static TMS9928A_INTERFACE(einstein_tms9929a_interface)
{
- "screen",
0x4000, /* 16k RAM, provided by IC i040 and i041 */
DEVCB_NULL
};
@@ -695,7 +694,6 @@ static const centronics_interface einstein_centronics_config =
static MC6845_INTERFACE( einstein_crtc6845_interface )
{
- "80column",
false,
8,
NULL,
@@ -756,6 +754,7 @@ static MACHINE_CONFIG_START( einstein, einstein_state )
/* video hardware */
MCFG_TMS9928A_ADD( "tms9929a", TMS9929A, einstein_tms9929a_interface )
+ MCFG_TMS9928A_SET_SCREEN( "screen" )
MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
MCFG_SCREEN_UPDATE_DEVICE( "tms9929a", tms9929a_device, screen_update )
@@ -810,7 +809,7 @@ static MACHINE_CONFIG_DERIVED( einstei2, einstein )
/* 2 additional colors for the 80 column screen */
MCFG_PALETTE_LENGTH(TMS9928A_PALETTE_SIZE + 2)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_X002 / 4, einstein_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "80column", XTAL_X002 / 4, einstein_crtc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/fp1100.c b/src/mess/drivers/fp1100.c
index 4bdc4bbd2aa..5110b805808 100644
--- a/src/mess/drivers/fp1100.c
+++ b/src/mess/drivers/fp1100.c
@@ -320,7 +320,6 @@ static const UPD7810_CONFIG fp1100_slave_cpu_config = { TYPE_7801, NULL };
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -364,7 +363,7 @@ static MACHINE_CONFIG_START( fp1100, fp1100_state )
MCFG_GFXDECODE(fp1100)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, MAIN_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MAIN_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/fp6000.c b/src/mess/drivers/fp6000.c
index 5f4ed501f9e..2518acd26ba 100644
--- a/src/mess/drivers/fp6000.c
+++ b/src/mess/drivers/fp6000.c
@@ -284,7 +284,6 @@ void fp6000_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -312,7 +311,7 @@ static MACHINE_CONFIG_START( fp6000, fp6000_state )
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(fp6000_state, screen_update_fp6000)
- MCFG_MC6845_ADD("crtc", H46505, 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PALETTE_LENGTH(8)
// MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
diff --git a/src/mess/drivers/h19.c b/src/mess/drivers/h19.c
index 6f93b5fef31..7f091214cbd 100644
--- a/src/mess/drivers/h19.c
+++ b/src/mess/drivers/h19.c
@@ -367,7 +367,6 @@ static const ins8250_interface h19_ace_interface =
static MC6845_INTERFACE( h19_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -427,7 +426,7 @@ static MACHINE_CONFIG_START( h19, h19_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, monochrome_green)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
MCFG_INS8250_ADD( "ins8250", h19_ace_interface, XTAL_12_288MHz / 4) // 3.072mhz clock which gets divided down for the various baud rates
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
diff --git a/src/mess/drivers/hp9k.c b/src/mess/drivers/hp9k.c
index a62e6226d54..86428c1deb7 100644
--- a/src/mess/drivers/hp9k.c
+++ b/src/mess/drivers/hp9k.c
@@ -138,7 +138,7 @@ public:
required_device<mc6845_device> m_6845;
UINT8 m_videoram[0x4000];
- UINT8 m_screen[0x800];
+ UINT8 m_screenram[0x800];
DECLARE_DRIVER_INIT(hp9k);
@@ -271,7 +271,7 @@ WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
if (mem_mask==0xff00)
{
- m_screen[offset&0x7ff]=data>>8;
+ m_screenram[offset&0x7ff]=data>>8;
m_videoram[offset&0x3fff]=data>>8;
//UINT8 *rom = machine().region("bootrom")->base();
@@ -279,7 +279,7 @@ WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
}
else
{
- m_screen[offset&0x7ff]=data;
+ m_screenram[offset&0x7ff]=data;
m_videoram[offset&0x3fff]=data;
}
}
@@ -359,7 +359,7 @@ void hp9k_state::putChar(UINT8 thec,int x,int y,bitmap_ind16 &bitmap)
UINT32 hp9k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- //UINT8* pvram=&m_screen[1];
+ //UINT8* pvram=&m_screenram[1];
int startAddr=((crtc_addrStartLow&0xff)|((crtc_addrStartHi<<8)))&0x3fff;
int chStart=startAddr&0x1fff;
@@ -370,7 +370,7 @@ UINT32 hp9k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co
{
//UINT8 thec=pvram[((c+(r*80))+160+47)&0x7ff];
//UINT8 thec=m_videoram[((c+(r*80))+startAddr)];
- UINT8 thec=m_screen[chStart&0x7ff];
+ UINT8 thec=m_screenram[chStart&0x7ff];
putChar(thec,c,r,bitmap);
chStart++;
}
@@ -388,7 +388,6 @@ WRITE8_MEMBER( hp9k_state::kbd_put )
static MC6845_INTERFACE( hp9k_mc6845_intf )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -420,7 +419,7 @@ static MACHINE_CONFIG_START( hp9k, hp9k_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, hp9k_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, "screen", XTAL_16MHz / 16, hp9k_mc6845_intf )
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/if800.c b/src/mess/drivers/if800.c
index 4b73288909f..eb5004cb9a1 100644
--- a/src/mess/drivers/if800.c
+++ b/src/mess/drivers/if800.c
@@ -74,7 +74,6 @@ void if800_state::machine_reset()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/ipds.c b/src/mess/drivers/ipds.c
index 451b00a9a3d..c3c00873971 100644
--- a/src/mess/drivers/ipds.c
+++ b/src/mess/drivers/ipds.c
@@ -98,7 +98,6 @@ static I8275_DISPLAY_PIXELS(ipds_display_pixels)
const i8275_interface ipds_i8275_interface =
{
- "screen",
6,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/kaypro.c b/src/mess/drivers/kaypro.c
index 4da7a62257a..37f9ec3d354 100644
--- a/src/mess/drivers/kaypro.c
+++ b/src/mess/drivers/kaypro.c
@@ -151,7 +151,6 @@ static const z80_daisy_config kaypro2x_daisy_chain[] =
static MC6845_INTERFACE( kaypro2x_crtc )
{
- "screen", /* name of screen */
false,
7, /* number of dots per character */
NULL,
@@ -295,7 +294,7 @@ static MACHINE_CONFIG_START( kaypro2x, kaypro_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* devices */
- MCFG_MC6845_ADD("crtc", MC6845, 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */
MCFG_QUICKLOAD_ADD("quickload", kaypro_state, kaypro2x, "com,cpm", 3)
MCFG_FD1793_ADD("wd1793", kaypro_wd1793_interface )
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c
index eb9136dabb7..b1a2ef6b76e 100644
--- a/src/mess/drivers/m20.c
+++ b/src/mess/drivers/m20.c
@@ -835,7 +835,6 @@ void m20_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -991,7 +990,7 @@ static MACHINE_CONFIG_START( m20, m20_state )
MCFG_FD1797x_ADD("fd1797", 1000000)
MCFG_FLOPPY_DRIVE_ADD("fd1797:0", m20_floppies, "5dd", m20_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1797:1", m20_floppies, "5dd", m20_state::floppy_formats)
- MCFG_MC6845_ADD("crtc", MC6845, PIXEL_CLOCK/8, mc6845_intf) /* hand tuned to get ~50 fps */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", PIXEL_CLOCK/8, mc6845_intf) /* hand tuned to get ~50 fps */
MCFG_I8255A_ADD("ppi8255", ppi_interface)
MCFG_I8251_ADD("i8251_1", kbd_i8251_intf)
MCFG_I8251_ADD("i8251_2", tty_i8251_intf)
diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c
index 4d375d89ef6..612f99ec986 100644
--- a/src/mess/drivers/m5.c
+++ b/src/mess/drivers/m5.c
@@ -440,7 +440,6 @@ WRITE_LINE_MEMBER(m5_state::sordm5_video_interrupt_callback)
static TMS9928A_INTERFACE(m5_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(m5_state,sordm5_video_interrupt_callback)
};
diff --git a/src/mess/drivers/mbc200.c b/src/mess/drivers/mbc200.c
index de11198e8b8..800194f61f7 100644
--- a/src/mess/drivers/mbc200.c
+++ b/src/mess/drivers/mbc200.c
@@ -139,7 +139,6 @@ MC6845_UPDATE_ROW( mbc200_update_row )
static MC6845_INTERFACE( mbc200_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -274,7 +273,7 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state )
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_8MHz / 4, mbc200_crtc) // HD46505SP
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_8MHz / 4, mbc200_crtc) // HD46505SP
MCFG_I8255_ADD("ppi8255_1", mbc200_ppi8255_interface_1) // i8255AC-5
MCFG_I8255_ADD("ppi8255_2", mbc200_ppi8255_interface_2) // i8255AC-5
MCFG_I8251_ADD("i8251_1", default_i8251_interface) // INS8251N
diff --git a/src/mess/drivers/mbc55x.c b/src/mess/drivers/mbc55x.c
index 4e72f8a8e97..e7d8caaa0ce 100644
--- a/src/mess/drivers/mbc55x.c
+++ b/src/mess/drivers/mbc55x.c
@@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( mbc55x, mbc55x_state )
MCFG_PIT8253_ADD( PIT8253_TAG, mbc55x_pit8253_config )
MCFG_PIC8259_ADD( PIC8259_TAG, INPUTLINE(MAINCPU_TAG, INPUT_LINE_IRQ0), VCC, NULL )
MCFG_I8255_ADD( PPI8255_TAG, mbc55x_ppi8255_interface )
- MCFG_MC6845_ADD(VID_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mb55x_mc6845_intf)
+ MCFG_MC6845_ADD(VID_MC6845_NAME, MC6845, SCREEN_TAG, XTAL_14_31818MHz/8, mb55x_mc6845_intf)
/* Backing storage */
MCFG_FD1793_ADD(FDC_TAG, mbc55x_wd17xx_interface )
diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c
index f0e901a11c9..42e441a0996 100644
--- a/src/mess/drivers/mbee.c
+++ b/src/mess/drivers/mbee.c
@@ -659,7 +659,6 @@ SLOT_INTERFACE_END
static MC6845_INTERFACE( mbee_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -675,7 +674,6 @@ static MC6845_INTERFACE( mbee_crtc )
static MC6845_INTERFACE( mbeeic_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -690,7 +688,6 @@ static MC6845_INTERFACE( mbeeic_crtc )
static MC6845_INTERFACE( mbeeppc_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -705,7 +702,6 @@ static MC6845_INTERFACE( mbeeppc_crtc )
static MC6845_INTERFACE( mbee256_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -750,7 +746,7 @@ static MACHINE_CONFIG_START( mbee, mbee_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_12MHz / 8, mbee_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_12MHz / 8, mbee_crtc)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com", 2)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
@@ -791,7 +787,7 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbeeic_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbeeic_crtc)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com", 2)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
@@ -823,7 +819,7 @@ static MACHINE_CONFIG_DERIVED( mbeeppc, mbeeic )
MCFG_PALETTE_LENGTH(16)
MCFG_PALETTE_INIT_OVERRIDE(mbee_state,mbeeppc)
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbeeppc_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbeeppc_crtc)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mbee56, mbeeic )
@@ -859,7 +855,7 @@ static MACHINE_CONFIG_DERIVED( mbee256, mbee128 )
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee256 )
MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbee256_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbee256_crtc)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc )
@@ -869,7 +865,7 @@ static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc )
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbeett )
MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbee256_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbee256_crtc)
MACHINE_CONFIG_END
/* Unused roms:
diff --git a/src/mess/drivers/mc10.c b/src/mess/drivers/mc10.c
index d744884431c..e1d397c873c 100644
--- a/src/mess/drivers/mc10.c
+++ b/src/mess/drivers/mc10.c
@@ -529,11 +529,6 @@ static MACHINE_CONFIG_START( mc10, mc10_state )
MCFG_RAM_EXTRA_OPTIONS("4K")
MACHINE_CONFIG_END
-static const ef9345_interface alice32_ef9345_config =
-{
- "screen" /* screen we are acting on */
-};
-
static MACHINE_CONFIG_START( alice32, mc10_state )
/* basic machine hardware */
@@ -549,7 +544,7 @@ static MACHINE_CONFIG_START( alice32, mc10_state )
MCFG_SCREEN_VISIBLE_AREA(00, 336-1, 00, 270-1)
MCFG_PALETTE_LENGTH(8)
- MCFG_EF9345_ADD("ef9345", alice32_ef9345_config)
+ MCFG_EF9345_ADD("ef9345", "screen")
MCFG_TIMER_DRIVER_ADD_SCANLINE("alice32_sl", mc10_state, alice32_scanline, "screen", 0, 10)
/* sound hardware */
diff --git a/src/mess/drivers/micronic.c b/src/mess/drivers/micronic.c
index ffce7eb7648..ab87ec56dc7 100644
--- a/src/mess/drivers/micronic.c
+++ b/src/mess/drivers/micronic.c
@@ -330,7 +330,6 @@ void micronic_state::palette_init()
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_NULL
};
diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c
index 326852541d2..8ee2ca2f1fd 100644
--- a/src/mess/drivers/msx.c
+++ b/src/mess/drivers/msx.c
@@ -1111,7 +1111,6 @@ MACHINE_CONFIG_END
static TMS9928A_INTERFACE(msx_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0)
};
diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c
index 4afad71c965..408a1bd4dc3 100644
--- a/src/mess/drivers/mtx.c
+++ b/src/mess/drivers/mtx.c
@@ -323,7 +323,6 @@ WRITE_LINE_MEMBER(mtx_state::mtx_tms9929a_interrupt)
static TMS9928A_INTERFACE(mtx_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(mtx_state,mtx_tms9929a_interrupt)
};
diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c
index f1204faaf38..7766f965795 100644
--- a/src/mess/drivers/multi16.c
+++ b/src/mess/drivers/multi16.c
@@ -141,7 +141,6 @@ void multi16_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -171,7 +170,7 @@ static MACHINE_CONFIG_START( multi16, multi16_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PIC8259_ADD( "pic8259", WRITELINE(multi16_state, multi16_set_int_line), GND, NULL )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/multi8.c b/src/mess/drivers/multi8.c
index 66c221704d1..63b940dcb0f 100644
--- a/src/mess/drivers/multi8.c
+++ b/src/mess/drivers/multi8.c
@@ -560,7 +560,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -684,7 +683,7 @@ static MACHINE_CONFIG_START( multi8, multi8_state )
/* Devices */
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", multi8_state, keyboard_callback, attotime::from_hz(240/32))
- MCFG_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/myb3k.c b/src/mess/drivers/myb3k.c
index 1294cbf1cee..fbb81323c0b 100644
--- a/src/mess/drivers/myb3k.c
+++ b/src/mess/drivers/myb3k.c
@@ -232,7 +232,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -287,7 +286,7 @@ static MACHINE_CONFIG_START( myb3k, myb3k_state )
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_MB8877_ADD("fdc", myb3k_wd17xx_interface ) //unknown type
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(myb3k_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/mycom.c b/src/mess/drivers/mycom.c
index 2508496ee78..c9e09d6a75c 100644
--- a/src/mess/drivers/mycom.c
+++ b/src/mess/drivers/mycom.c
@@ -333,7 +333,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -604,7 +603,7 @@ static MACHINE_CONFIG_START( mycom, mycom_state )
/* Manual states clock is 1.008mhz for 40 cols, and 2.016 mhz for 80 cols.
The CRTC is a HD46505S - same as a 6845. The start registers need to be readable. */
- MCFG_MC6845_ADD("crtc", MC6845, 1008000, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1008000, mc6845_intf)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
diff --git a/src/mess/drivers/mz3500.c b/src/mess/drivers/mz3500.c
index bfa9832e9c3..56b13ce1c8e 100644
--- a/src/mess/drivers/mz3500.c
+++ b/src/mess/drivers/mz3500.c
@@ -238,7 +238,6 @@ UINT32 mz3500_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap,
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -248,7 +247,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/mz6500.c b/src/mess/drivers/mz6500.c
index 0507a5cebd9..49720c5bc81 100644
--- a/src/mess/drivers/mz6500.c
+++ b/src/mess/drivers/mz6500.c
@@ -127,7 +127,6 @@ SLOT_INTERFACE_END
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c
index 713fb515232..0cd4a962a43 100644
--- a/src/mess/drivers/nes.c
+++ b/src/mess/drivers/nes.c
@@ -662,7 +662,6 @@ void nes_state::ppu_nmi(int *ppu_regs)
static const ppu2c0x_interface nes_ppu_interface =
{
"maincpu",
- "screen",
0,
0,
PPU_MIRROR_NONE
diff --git a/src/mess/drivers/odyssey2.c b/src/mess/drivers/odyssey2.c
index 5cb1b874fcb..917f87a0153 100644
--- a/src/mess/drivers/odyssey2.c
+++ b/src/mess/drivers/odyssey2.c
@@ -27,7 +27,6 @@ public:
odyssey2_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_i8244(*this, "i8244"),
m_sp0256(*this, "sp0256_speech"),
m_user1(*this, "user1"),
@@ -43,7 +42,6 @@ public:
m_joy1(*this, "JOY1") { }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<i8244_device> m_i8244;
required_device<sp0256_device> m_sp0256;
diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c
index 389ee138232..2aad38c1973 100644
--- a/src/mess/drivers/paso1600.c
+++ b/src/mess/drivers/paso1600.c
@@ -270,7 +270,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -353,7 +352,7 @@ static MACHINE_CONFIG_START( paso1600, paso1600_state )
// MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, 16000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PIC8259_ADD( "pic8259", WRITELINE(paso1600_state, paso1600_set_int_line), GND, NULL )
MCFG_I8237_ADD("8237dma", 16000000/4, paso1600_dma8237_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/pasopia.c b/src/mess/drivers/pasopia.c
index 0159cf33b81..a340f841c60 100644
--- a/src/mess/drivers/pasopia.c
+++ b/src/mess/drivers/pasopia.c
@@ -303,7 +303,6 @@ static Z80PIO_INTERFACE( z80pio_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -373,7 +372,7 @@ static MACHINE_CONFIG_START( pasopia, pasopia_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, XTAL_4MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_4MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf_0 )
MCFG_I8255A_ADD( "ppi8255_1", ppi8255_intf_1 )
MCFG_I8255A_ADD( "ppi8255_2", ppi8255_intf_2 )
diff --git a/src/mess/drivers/pasopia7.c b/src/mess/drivers/pasopia7.c
index 09460118485..101138636a4 100644
--- a/src/mess/drivers/pasopia7.c
+++ b/src/mess/drivers/pasopia7.c
@@ -726,7 +726,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1033,7 +1032,7 @@ static MACHINE_CONFIG_DERIVED( p7_raster, p7_base )
MCFG_PALETTE_INIT_OVERRIDE(pasopia7_state,p7_raster)
MCFG_GFXDECODE( pasopia7 )
- MCFG_MC6845_ADD("crtc", H46505, VDP_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", VDP_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MACHINE_CONFIG_END
@@ -1049,7 +1048,7 @@ static MACHINE_CONFIG_DERIVED( p7_lcd, p7_base )
MCFG_PALETTE_INIT_OVERRIDE(pasopia7_state,p7_lcd)
MCFG_GFXDECODE( pasopia7 )
- MCFG_MC6845_ADD("crtc", H46505, LCD_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", LCD_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_DEFAULT_LAYOUT( layout_lcd )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/pc8001.c b/src/mess/drivers/pc8001.c
index 28f220d4e86..d7a5f205e96 100644
--- a/src/mess/drivers/pc8001.c
+++ b/src/mess/drivers/pc8001.c
@@ -391,7 +391,6 @@ static UPD3301_DISPLAY_PIXELS( pc8001_display_pixels )
static UPD3301_INTERFACE( pc8001_upd3301_intf )
{
- SCREEN_TAG,
8,
pc8001_display_pixels,
DEVCB_NULL,
diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c
index ffb926767f1..c6b7209f6d0 100644
--- a/src/mess/drivers/pc9801.c
+++ b/src/mess/drivers/pc9801.c
@@ -911,7 +911,6 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -921,7 +920,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/pce.c b/src/mess/drivers/pce.c
index 780cc3f1cd3..8f45dba660f 100644
--- a/src/mess/drivers/pce.c
+++ b/src/mess/drivers/pce.c
@@ -310,7 +310,6 @@ static const huc6270_interface pce_huc6270_config =
static const huc6260_interface pce_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6270", huc6270_device, vsync_changed ),
@@ -351,7 +350,6 @@ static const huc6202_interface sgx_huc6202_config =
static const huc6260_interface sgx_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6202", huc6202_device, vsync_changed ),
diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c
index d206f9f2ce0..766760df361 100644
--- a/src/mess/drivers/pcfx.c
+++ b/src/mess/drivers/pcfx.c
@@ -459,7 +459,6 @@ WRITE_LINE_MEMBER( pcfx_state::irq15_w )
static const huc6261_interface pcfx_huc6261_config =
{
- "screen",
"huc6270_a",
"huc6270_b"
};
diff --git a/src/mess/drivers/pencil2.c b/src/mess/drivers/pencil2.c
index 3bb4b400690..ca0950378b8 100644
--- a/src/mess/drivers/pencil2.c
+++ b/src/mess/drivers/pencil2.c
@@ -275,7 +275,6 @@ static const sn76496_config psg_intf =
static TMS9928A_INTERFACE(pencil2_tms9929a_interface)
{
- "screen", // screen tag
0x4000, // vram size
DEVCB_NULL // write line if int changes
};
diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c
index 1e9d1c9fc58..697714102bd 100644
--- a/src/mess/drivers/pet.c
+++ b/src/mess/drivers/pet.c
@@ -1193,7 +1193,6 @@ static MC6845_UPDATE_ROW( pet80_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
2*8,
NULL,
@@ -1257,7 +1256,6 @@ static MC6845_UPDATE_ROW( cbm8296_update_row )
static MC6845_INTERFACE( cbm8296_crtc_intf )
{
- SCREEN_TAG,
false,
2*8,
NULL,
@@ -1738,7 +1736,7 @@ static MACHINE_CONFIG_START( pet80, pet80_state )
MCFG_SCREEN_SIZE(640, 250)
MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 250 - 1)
MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/16, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c
index 0a6f5bc89c7..766c4217ac5 100644
--- a/src/mess/drivers/portfoli.c
+++ b/src/mess/drivers/portfoli.c
@@ -693,7 +693,6 @@ READ8_MEMBER(portfolio_state::hd61830_rd_r)
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_DRIVER_MEMBER(portfolio_state,hd61830_rd_r)
};
diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c
index 4d35938b273..6b1cdf99df2 100644
--- a/src/mess/drivers/pv1000.c
+++ b/src/mess/drivers/pv1000.c
@@ -143,7 +143,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_sound(*this, "pv1000_sound"),
- m_screen(*this, "screen"),
m_p_videoram(*this, "p_videoram")
{ }
@@ -165,7 +164,6 @@ public:
required_device<cpu_device> m_maincpu;
required_device<pv1000_sound_device> m_sound;
- required_device<screen_device> m_screen;
required_shared_ptr<UINT8> m_p_videoram;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c
index c511f15dea0..a6d4ab95535 100644
--- a/src/mess/drivers/pv2000.c
+++ b/src/mess/drivers/pv2000.c
@@ -341,7 +341,6 @@ WRITE_LINE_MEMBER( pv2000_state::pv2000_vdp_interrupt )
static TMS9928A_INTERFACE(pv2000_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(pv2000_state, pv2000_vdp_interrupt)
};
diff --git a/src/mess/drivers/pyl601.c b/src/mess/drivers/pyl601.c
index 253c1cc0be2..90bef623a80 100644
--- a/src/mess/drivers/pyl601.c
+++ b/src/mess/drivers/pyl601.c
@@ -468,7 +468,6 @@ static MC6845_UPDATE_ROW( pyl601a_update_row )
static MC6845_INTERFACE( pyl601_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -483,7 +482,6 @@ static MC6845_INTERFACE( pyl601_crtc6845_interface )
static MC6845_INTERFACE( pyl601a_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -574,7 +572,7 @@ static MACHINE_CONFIG_START( pyl601, pyl601_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_2MHz, pyl601_crtc6845_interface)
MCFG_UPD765A_ADD("upd765", true, true)
MCFG_FLOPPY_DRIVE_ADD("upd765:0", pyl601_floppies, "525hd", pyl601_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("upd765:1", pyl601_floppies, "525hd", pyl601_state::floppy_formats)
@@ -591,7 +589,7 @@ static MACHINE_CONFIG_DERIVED( pyl601a, pyl601 )
MCFG_GFXDECODE(pyl601a)
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601a_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_2MHz, pyl601a_crtc6845_interface)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/qx10.c b/src/mess/drivers/qx10.c
index 047d4d7925a..901e627e40a 100644
--- a/src/mess/drivers/qx10.c
+++ b/src/mess/drivers/qx10.c
@@ -805,7 +805,6 @@ void qx10_state::video_start()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c
index 960d3ee9bfd..744a49efad9 100644
--- a/src/mess/drivers/rainbow.c
+++ b/src/mess/drivers/rainbow.c
@@ -398,7 +398,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(rainbow_state::keyboard_tick)
static const vt_video_interface video_interface =
{
- "screen",
"chargen",
DEVCB_DRIVER_MEMBER(rainbow_state, read_video_ram_r),
DEVCB_DRIVER_MEMBER(rainbow_state, clear_video_interrupt)
diff --git a/src/mess/drivers/rt1715.c b/src/mess/drivers/rt1715.c
index 3d4442ebfcc..849e7988d46 100644
--- a/src/mess/drivers/rt1715.c
+++ b/src/mess/drivers/rt1715.c
@@ -158,7 +158,6 @@ GFXDECODE_END
static const i8275_interface rt1715_i8275_intf =
{
- "screen",
8,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/sg1000.c b/src/mess/drivers/sg1000.c
index c0b24fc1603..9594ea4b491 100644
--- a/src/mess/drivers/sg1000.c
+++ b/src/mess/drivers/sg1000.c
@@ -462,7 +462,6 @@ WRITE_LINE_MEMBER(sg1000_state::sg1000_vdp_interrupt)
static TMS9928A_INTERFACE(sg1000_tms9918a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(sg1000_state,sg1000_vdp_interrupt)
};
diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c
index 68359c9b70b..5c46f81ebfb 100644
--- a/src/mess/drivers/sm1800.c
+++ b/src/mess/drivers/sm1800.c
@@ -104,7 +104,6 @@ static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
}
const i8275_interface sm1800_i8275_interface = {
- "screen",
8,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c
index ff7eb069539..f08a93ad7db 100644
--- a/src/mess/drivers/smc777.c
+++ b/src/mess/drivers/smc777.c
@@ -999,7 +999,6 @@ void smc777_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
true, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1104,7 +1103,7 @@ static MACHINE_CONFIG_START( smc777, smc777_state )
MCFG_PALETTE_LENGTH(0x20) // 16 + 8 colors (SMC-777 + SMC-70) + 8 empty entries (SMC-70)
- MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_MB8876_ADD("fdc",smc777_mb8876_interface)
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(smc777_floppy_interface)
diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c
index 6a524afda20..34953896923 100644
--- a/src/mess/drivers/sms.c
+++ b/src/mess/drivers/sms.c
@@ -424,7 +424,6 @@ WRITE_LINE_MEMBER(sms_state::sms_int_callback)
static const sega315_5124_interface _315_5124_ntsc_intf =
{
false,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -432,7 +431,6 @@ static const sega315_5124_interface _315_5124_ntsc_intf =
static const sega315_5124_interface _315_5124_pal_intf =
{
true,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -440,7 +438,6 @@ static const sega315_5124_interface _315_5124_pal_intf =
static const sega315_5124_interface sms_store_intf =
{
false,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(smssdisp_state,sms_store_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -534,6 +531,7 @@ static MACHINE_CONFIG_DERIVED( sms2_ntsc, sms_ntsc_base )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
@@ -571,6 +569,7 @@ static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_SEGA315_5124_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5124_SET_SCREEN("screen")
// cardslot, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
@@ -605,6 +604,7 @@ static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", sms_store_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MCFG_CPU_ADD("control", Z80, XTAL_53_693175MHz/15)
MCFG_CPU_PROGRAM_MAP(sms_store_mem)
@@ -699,6 +699,7 @@ static MACHINE_CONFIG_DERIVED( sms2_pal, sms_pal_base )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_pal_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
@@ -736,6 +737,7 @@ static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_SEGA315_5124_ADD("sms_vdp", _315_5124_pal_intf)
+ MCFG_SEGA315_5124_SET_SCREEN("screen")
// cardslot, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
@@ -787,6 +789,7 @@ static MACHINE_CONFIG_START( gamegear, sms_state )
MCFG_VIDEO_START_OVERRIDE(sms_state,gamegear)
MCFG_SEGA315_5378_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5378_SET_SCREEN("screen")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c
index dbfabbd61dc..cbc82427b0a 100644
--- a/src/mess/drivers/socrates.c
+++ b/src/mess/drivers/socrates.c
@@ -88,11 +88,9 @@ public:
socrates_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_sound(*this, "soc_snd")
{ }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<socrates_snd_device> m_sound;
rgb_t m_palette[256];
diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c
index 5dd74b1e357..c2422b9935b 100644
--- a/src/mess/drivers/super80.c
+++ b/src/mess/drivers/super80.c
@@ -615,7 +615,6 @@ static const cassette_interface super80_cassette_interface =
static MC6845_INTERFACE( super80v_crtc )
{
- "screen", /* name of screen */
false,
SUPER80V_DOTS, /* number of dots per character */
NULL,
@@ -713,7 +712,7 @@ static MACHINE_CONFIG_START( super80v, super80_state )
MCFG_PALETTE_LENGTH(16)
MCFG_PALETTE_INIT_OVERRIDE(super80_state,super80m)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / SUPER80V_DOTS, super80v_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / SUPER80V_DOTS, super80v_crtc)
MCFG_GFXDECODE(super80v)
MCFG_DEFAULT_LAYOUT( layout_super80 )
diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c
index c31171f8d32..3b91184ef43 100644
--- a/src/mess/drivers/svi318.c
+++ b/src/mess/drivers/svi318.c
@@ -267,7 +267,6 @@ WRITE_LINE_MEMBER(svi318_state::vdp_interrupt)
static TMS9928A_INTERFACE(svi318_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(svi318_state,vdp_interrupt)
};
@@ -388,7 +387,6 @@ MACHINE_CONFIG_END
static MC6845_INTERFACE( svi806_crtc6845_interface )
{
- "svi806",
false,
8 /*?*/,
NULL,
@@ -438,6 +436,7 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_DEFAULT_LAYOUT( layout_dualhsxs )
MCFG_TMS9928A_ADD( "tms9928a", TMS9929A, svi318_tms9928a_interface )
+ MCFG_TMS9928A_SET_SCREEN( "screen" )
MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9929a_device, screen_update )
MCFG_PALETTE_LENGTH(TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */
@@ -451,7 +450,7 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_GFXDECODE(svi328)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8, svi806_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8, svi806_crtc6845_interface)
MCFG_VIDEO_START_OVERRIDE(svi318_state, svi328_806 )
diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c
index d0466948e2f..45ad3079906 100644
--- a/src/mess/drivers/tandy2k.c
+++ b/src/mess/drivers/tandy2k.c
@@ -354,7 +354,6 @@ WRITE_LINE_MEMBER( tandy2k_state::vpac_drb_w )
static CRT9007_INTERFACE( vpac_intf )
{
- SCREEN_TAG,
10,
DEVCB_DEVICE_LINE_MEMBER(I8259A_1_TAG, pic8259_device, ir1_w),
DEVCB_NULL, // DMAR 80186 HOLD
@@ -388,7 +387,6 @@ static CRT9212_INTERFACE( drb1_intf )
static CRT9021_INTERFACE( vac_intf )
{
- SCREEN_TAG,
DEVCB_DEVICE_MEMBER(CRT9212_0_TAG, crt9212_device, read), // data
DEVCB_DEVICE_MEMBER(CRT9212_1_TAG, crt9212_device, read), // attributes
DEVCB_LINE_VCC // ATTEN
diff --git a/src/mess/drivers/tdv2324.c b/src/mess/drivers/tdv2324.c
index 373ddbf99de..11580fe8aaa 100644
--- a/src/mess/drivers/tdv2324.c
+++ b/src/mess/drivers/tdv2324.c
@@ -347,7 +347,6 @@ static Z80SIO_INTERFACE( sio_intf )
static const tms9927_interface vtac_intf =
{
- SCREEN_TAG,
8,
NULL
};
diff --git a/src/mess/drivers/ti99_4x.c b/src/mess/drivers/ti99_4x.c
index 97c3aad4ffa..d93d67b6868 100644
--- a/src/mess/drivers/ti99_4x.c
+++ b/src/mess/drivers/ti99_4x.c
@@ -703,7 +703,6 @@ WRITE_LINE_MEMBER( ti99_4x_state::notconnected )
static TMS9928A_INTERFACE(ti99_4_tms9928a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, set_tms9901_INT2)
};
diff --git a/src/mess/drivers/ti99_8.c b/src/mess/drivers/ti99_8.c
index b657877a927..dbc1eb7fb62 100644
--- a/src/mess/drivers/ti99_8.c
+++ b/src/mess/drivers/ti99_8.c
@@ -765,7 +765,6 @@ WRITE_LINE_MEMBER( ti99_8_state::notconnected )
static TMS9928A_INTERFACE(ti99_8_tms9118a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, set_tms9901_INT2)
};
diff --git a/src/mess/drivers/tim100.c b/src/mess/drivers/tim100.c
index 3618a9ab981..4349137b5e0 100644
--- a/src/mess/drivers/tim100.c
+++ b/src/mess/drivers/tim100.c
@@ -107,7 +107,6 @@ static I8275_DISPLAY_PIXELS(tim100_display_pixels)
}
static const i8275_interface tim100_i8276_interface = {
- "screen",
16, //12
0,
DEVCB_CPU_INPUT_LINE("maincpu", I8085_RST65_LINE),
diff --git a/src/mess/drivers/tm990189.c b/src/mess/drivers/tm990189.c
index e30285cdea9..a52dbef10d7 100644
--- a/src/mess/drivers/tm990189.c
+++ b/src/mess/drivers/tm990189.c
@@ -175,7 +175,6 @@ MACHINE_START_MEMBER(tm990189_state,tm990_189)
static TMS9928A_INTERFACE(tms9918_interface)
{
- "screen",
0x4000,
DEVCB_NULL
};
diff --git a/src/mess/drivers/trs80m2.c b/src/mess/drivers/trs80m2.c
index feae156b73e..78d0e462810 100644
--- a/src/mess/drivers/trs80m2.c
+++ b/src/mess/drivers/trs80m2.c
@@ -428,7 +428,6 @@ WRITE_LINE_MEMBER( trs80m2_state::vsync_w )
static MC6845_INTERFACE( mc6845_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -825,7 +824,7 @@ static MACHINE_CONFIG_START( trs80m2, trs80m2_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8, mc6845_intf)
// devices
MCFG_FD1791x_ADD(FD1791_TAG, XTAL_8MHz/4)
@@ -875,7 +874,7 @@ static MACHINE_CONFIG_START( trs80m16, trs80m16_state )
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8, mc6845_intf)
// devices
MCFG_FD1791x_ADD(FD1791_TAG, XTAL_8MHz/4)
diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c
index 4dcba0d12e9..1c98fd9f52d 100644
--- a/src/mess/drivers/tutor.c
+++ b/src/mess/drivers/tutor.c
@@ -246,7 +246,6 @@ DRIVER_INIT_MEMBER(tutor_state,pyuuta)
static TMS9928A_INTERFACE(tutor_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_NULL
};
diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c
index 02557bfd84a..c54793420da 100644
--- a/src/mess/drivers/tvc.c
+++ b/src/mess/drivers/tvc.c
@@ -633,7 +633,6 @@ QUICKLOAD_LOAD_MEMBER( tvc_state,tvc64)
static MC6845_INTERFACE( tvc_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -694,7 +693,7 @@ static MACHINE_CONFIG_START( tvc, tvc_state )
MCFG_PALETTE_LENGTH( 16 )
- MCFG_MC6845_ADD("crtc", MC6845, 3125000/2, tvc_crtc6845_interface) // clk taken from schematics
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 3125000/2, tvc_crtc6845_interface) // clk taken from schematics
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mess/drivers/v6809.c b/src/mess/drivers/v6809.c
index 3a6b800bb7d..0f35aed9e2f 100644
--- a/src/mess/drivers/v6809.c
+++ b/src/mess/drivers/v6809.c
@@ -176,7 +176,6 @@ void v6809_state::video_start()
static MC6845_INTERFACE( v6809_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -267,7 +266,7 @@ static MACHINE_CONFIG_START( v6809, v6809_state )
MCFG_GFXDECODE(v6809)
/* Devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_16MHz / 8, v6809_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_16MHz / 8, v6809_crtc)
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/vg5k.c b/src/mess/drivers/vg5k.c
index bda40943abd..082b96ee44e 100644
--- a/src/mess/drivers/vg5k.c
+++ b/src/mess/drivers/vg5k.c
@@ -349,11 +349,6 @@ DRIVER_INIT_MEMBER(vg5k_state,vg5k)
}
-static const ef9345_interface vg5k_ef9345_config =
-{
- "screen" /* screen we are acting on */
-};
-
static const struct CassetteOptions vg5k_cassette_options =
{
1, /* channels */
@@ -382,7 +377,7 @@ static MACHINE_CONFIG_START( vg5k, vg5k_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", vg5k_state, z80_irq, attotime::from_msec(20))
- MCFG_EF9345_ADD("ef9345", vg5k_ef9345_config)
+ MCFG_EF9345_ADD("ef9345", "screen")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c
index 43b728e3c12..6476ae5dab4 100644
--- a/src/mess/drivers/victor9k.c
+++ b/src/mess/drivers/victor9k.c
@@ -299,7 +299,6 @@ static MC6845_UPDATE_ROW( victor9k_update_row )
static MC6845_INTERFACE( hd46505s_intf )
{
- SCREEN_TAG,
false,
10,
NULL,
@@ -1257,7 +1256,7 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, monochrome_green)
- MCFG_MC6845_ADD(HD46505S_TAG, HD6845, 1000000, hd46505s_intf) // HD6845 == HD46505S
+ MCFG_MC6845_ADD(HD46505S_TAG, HD6845, SCREEN_TAG, 1000000, hd46505s_intf) // HD6845 == HD46505S
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/vidbrain.c b/src/mess/drivers/vidbrain.c
index 9f2b2060f60..b971734d455 100644
--- a/src/mess/drivers/vidbrain.c
+++ b/src/mess/drivers/vidbrain.c
@@ -457,7 +457,6 @@ READ8_MEMBER(vidbrain_state::memory_read_byte)
static UV201_INTERFACE( uv_intf )
{
- SCREEN_TAG,
DEVCB_DRIVER_LINE_MEMBER(vidbrain_state, ext_int_w),
DEVCB_DRIVER_LINE_MEMBER(vidbrain_state, hblank_w),
DEVCB_DRIVER_MEMBER(vidbrain_state, memory_read_byte)
diff --git a/src/mess/drivers/vii.c b/src/mess/drivers/vii.c
index 5cfa21feec9..8db216df407 100644
--- a/src/mess/drivers/vii.c
+++ b/src/mess/drivers/vii.c
@@ -123,7 +123,7 @@ public:
{
UINT8 r, g, b;
}
- m_screen[320*240];
+ m_screenram[320*240];
UINT16 m_io_regs[0x200];
UINT16 m_uart_rx_count;
@@ -225,16 +225,16 @@ inline UINT8 vii_state::vii_mix_channel(UINT8 a, UINT8 b)
void vii_state::vii_mix_pixel(UINT32 offset, UINT16 rgb)
{
- m_screen[offset].r = vii_mix_channel(m_screen[offset].r, expand_rgb5_to_rgb8(rgb >> 10));
- m_screen[offset].g = vii_mix_channel(m_screen[offset].g, expand_rgb5_to_rgb8(rgb >> 5));
- m_screen[offset].b = vii_mix_channel(m_screen[offset].b, expand_rgb5_to_rgb8(rgb));
+ m_screenram[offset].r = vii_mix_channel(m_screenram[offset].r, expand_rgb5_to_rgb8(rgb >> 10));
+ m_screenram[offset].g = vii_mix_channel(m_screenram[offset].g, expand_rgb5_to_rgb8(rgb >> 5));
+ m_screenram[offset].b = vii_mix_channel(m_screenram[offset].b, expand_rgb5_to_rgb8(rgb));
}
void vii_state::vii_set_pixel(UINT32 offset, UINT16 rgb)
{
- m_screen[offset].r = expand_rgb5_to_rgb8(rgb >> 10);
- m_screen[offset].g = expand_rgb5_to_rgb8(rgb >> 5);
- m_screen[offset].b = expand_rgb5_to_rgb8(rgb);
+ m_screenram[offset].r = expand_rgb5_to_rgb8(rgb >> 10);
+ m_screenram[offset].g = expand_rgb5_to_rgb8(rgb >> 5);
+ m_screenram[offset].b = expand_rgb5_to_rgb8(rgb);
}
void vii_state::vii_blit(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT32 xoff, UINT32 yoff, UINT32 attr, UINT32 ctrl, UINT32 bitmap_addr, UINT16 tile)
@@ -439,7 +439,7 @@ UINT32 vii_state::screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap,
bitmap.fill(0, cliprect);
- memset(m_screen, 0, sizeof(m_screen));
+ memset(m_screenram, 0, sizeof(m_screenram));
for(i = 0; i < 4; i++)
{
@@ -452,7 +452,7 @@ UINT32 vii_state::screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap,
{
for(x = 0; x < 320; x++)
{
- bitmap.pix32(y, x) = (m_screen[x + 320*y].r << 16) | (m_screen[x + 320*y].g << 8) | m_screen[x + 320*y].b;
+ bitmap.pix32(y, x) = (m_screenram[x + 320*y].r << 16) | (m_screenram[x + 320*y].g << 8) | m_screenram[x + 320*y].b;
}
}
diff --git a/src/mess/drivers/vk100.c b/src/mess/drivers/vk100.c
index f3323842ceb..53d08c3674a 100644
--- a/src/mess/drivers/vk100.c
+++ b/src/mess/drivers/vk100.c
@@ -167,7 +167,6 @@ public:
vk100_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_crtc(*this, "crtc"),
m_speaker(*this, "beeper"),
m_uart(*this, "i8251"),
@@ -180,7 +179,6 @@ public:
m_dipsw(*this, "SWITCHES")
{ }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<mc6845_device> m_crtc;
required_device<beep_device> m_speaker;
required_device<i8251_device> m_uart;
@@ -995,7 +993,6 @@ static MC6845_UPDATE_ROW( vk100_update_row )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen",
false,
12,
NULL,
@@ -1042,7 +1039,7 @@ static MACHINE_CONFIG_START( vk100, vk100_state )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_45_6192Mhz/3, 882, 0, 720, 370, 0, 350 ) // fake screen timings for startup until 6845 sets real ones
MCFG_SCREEN_UPDATE_DEVICE( "crtc", mc6845_device, screen_update )
- MCFG_MC6845_ADD( "crtc", H46505, XTAL_45_6192Mhz/3/12, mc6845_intf)
+ MCFG_MC6845_ADD( "crtc", H46505, "screen", XTAL_45_6192Mhz/3/12, mc6845_intf)
/* i8251 uart */
MCFG_I8251_ADD("i8251", i8251_intf)
diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c
index 8a578b2545a..2205603203f 100644
--- a/src/mess/drivers/vt100.c
+++ b/src/mess/drivers/vt100.c
@@ -376,7 +376,6 @@ WRITE8_MEMBER( vt100_state::vt100_clear_video_interrupt )
static const vt_video_interface vt100_video_interface =
{
- "screen",
"chargen",
DEVCB_DRIVER_MEMBER(vt100_state, vt100_read_video_ram_r),
DEVCB_DRIVER_MEMBER(vt100_state, vt100_clear_video_interrupt)
diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c
index 7aef8f539ba..fd2cc8cd74c 100644
--- a/src/mess/drivers/vt240.c
+++ b/src/mess/drivers/vt240.c
@@ -133,7 +133,6 @@ void vt240_state::machine_reset()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index 1d18ad42b50..348382b9416 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -1882,7 +1882,6 @@ static I8255A_INTERFACE( ppi8255_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
true, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -2581,7 +2580,7 @@ static MACHINE_CONFIG_START( x1, x1_state )
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(x1_state, screen_update_x1)
- MCFG_MC6845_ADD("crtc", H46505, (VDP_CLOCK/48), mc6845_intf) //unknown divider
+ MCFG_MC6845_ADD("crtc", H46505, "screen", (VDP_CLOCK/48), mc6845_intf) //unknown divider
MCFG_PALETTE_LENGTH(0x10+0x1000)
MCFG_PALETTE_INIT_OVERRIDE(x1_state,x1)
diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c
index 4de80432447..08d80ea3c63 100644
--- a/src/mess/drivers/x1twin.c
+++ b/src/mess/drivers/x1twin.c
@@ -90,7 +90,6 @@ static I8255A_INTERFACE( ppi8255_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "x1_screen", /* screen we are acting on */
false, /* show border area*/
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -556,7 +555,7 @@ static MACHINE_CONFIG_START( x1twin, x1twin_state )
MCFG_SCREEN_RAW_PARAMS(PCE_MAIN_CLOCK/2, VDC_WPF, 70, 70 + 512 + 32, VDC_LPF, 14, 14+242)
MCFG_SCREEN_UPDATE_DRIVER(x1twin_state, screen_update_x1pce)
- MCFG_MC6845_ADD("crtc", H46505, (VDP_CLOCK/48), mc6845_intf) //unknown divider
+ MCFG_MC6845_ADD("crtc", H46505, "x1_screen", (VDP_CLOCK/48), mc6845_intf) //unknown divider
MCFG_PALETTE_LENGTH(0x10+0x1000)
MCFG_PALETTE_INIT_OVERRIDE(x1twin_state,x1)
diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c
index b324bca9023..7ef6a6d4020 100644
--- a/src/mess/drivers/z100.c
+++ b/src/mess/drivers/z100.c
@@ -616,7 +616,6 @@ READ8_MEMBER( z100_state::get_slave_ack )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -774,7 +773,7 @@ static MACHINE_CONFIG_START( z100, z100_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_14_31818MHz/8, mc6845_intf) /* unknown clock, hand tuned to get ~50/~60 fps */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_14_31818MHz/8, mc6845_intf) /* unknown clock, hand tuned to get ~50/~60 fps */
MCFG_PIC8259_ADD( "pic8259_master", WRITELINE(z100_state, z100_pic_irq), VCC, READ8(z100_state, get_slave_ack) )
MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir3_w), GND, NULL )
diff --git a/src/mess/drivers/zrt80.c b/src/mess/drivers/zrt80.c
index a00efbdcfc3..e4d171f7dba 100644
--- a/src/mess/drivers/zrt80.c
+++ b/src/mess/drivers/zrt80.c
@@ -245,7 +245,6 @@ static MC6845_UPDATE_ROW( zrt80_update_row )
static MC6845_INTERFACE( zrt80_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -321,7 +320,7 @@ static MACHINE_CONFIG_START( zrt80, zrt80_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_20MHz / 8, zrt80_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_20MHz / 8, zrt80_crtc6845_interface)
MCFG_INS8250_ADD( "ins8250", zrt80_com_interface, 2457600 )
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/includes/a7800.h b/src/mess/includes/a7800.h
index 41ae6739355..7e37f3b068d 100644
--- a/src/mess/includes/a7800.h
+++ b/src/mess/includes/a7800.h
@@ -21,7 +21,6 @@ public:
m_maincpu(*this, "maincpu"),
m_pokey(*this, "pokey"),
m_tia(*this, "tia"),
- m_screen(*this, "screen"),
m_region_maincpu(*this, "maincpu"),
m_bank1(*this, "bank1"),
m_bank2(*this, "bank2"),
@@ -100,7 +99,6 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<pokey_device> m_pokey;
required_device<tia_device> m_tia;
- required_device<screen_device> m_screen;
required_memory_region m_region_maincpu;
required_memory_bank m_bank1;
required_memory_bank m_bank2;
diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h
index cae9910b2ee..d20585d558f 100644
--- a/src/mess/includes/amstrad.h
+++ b/src/mess/includes/amstrad.h
@@ -105,7 +105,6 @@ public:
m_ay(*this, "ay"),
m_fdc(*this, "upd765"),
m_crtc(*this, "mc6845"),
- m_screen(*this, "screen"),
m_ppi(*this, "ppi8255"),
m_centronics(*this, "centronics"),
m_cassette(*this, "cassette"),
@@ -152,7 +151,6 @@ public:
required_device<ay8910_device> m_ay;
optional_device<upd765_family_device> m_fdc; // not on a GX4000
required_device<mc6845_device> m_crtc;
- required_device<screen_device> m_screen;
required_device<i8255_device> m_ppi;
optional_device<centronics_device> m_centronics; // not on a GX4000
optional_device<cassette_image_device> m_cassette; // not on a GX4000, (or technically, the 6128+)
diff --git a/src/mess/includes/aquarius.h b/src/mess/includes/aquarius.h
index f83fe291fbf..d1c61ec9258 100644
--- a/src/mess/includes/aquarius.h
+++ b/src/mess/includes/aquarius.h
@@ -23,7 +23,6 @@ public:
m_maincpu(*this, "maincpu"),
m_cassette(*this, "cassette"),
m_speaker(*this, "speaker"),
- m_screen(*this, "screen"),
m_ram(*this, RAM_TAG),
m_rom(*this, "maincpu"),
m_videoram(*this, "videoram"),
@@ -41,7 +40,6 @@ public:
required_device<legacy_cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_device<speaker_sound_device> m_speaker;
- required_device<screen_device> m_screen;
required_device<ram_device> m_ram;
required_memory_region m_rom;
required_shared_ptr<UINT8> m_videoram;
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index 77b433f2e0e..837683fe710 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -201,7 +201,6 @@ public:
m_egret(*this, EGRET_TAG),
m_cuda(*this, CUDA_TAG),
m_ram(*this, RAM_TAG),
- m_screen(*this, MAC_SCREEN_NAME),
m_539x_1(*this, MAC_539X_1_TAG),
m_539x_2(*this, MAC_539X_2_TAG),
m_ncr5380(*this, "scsi:ncr5380"),
@@ -230,7 +229,6 @@ public:
optional_device<egret_device> m_egret;
optional_device<cuda_device> m_cuda;
required_device<ram_device> m_ram;
- optional_device<screen_device> m_screen;
optional_device<ncr539x_device> m_539x_1;
optional_device<ncr539x_device> m_539x_2;
optional_device<ncr5380_device> m_ncr5380;
diff --git a/src/mess/includes/macpci.h b/src/mess/includes/macpci.h
index ba7b47f1185..8fbb1f7e6f4 100644
--- a/src/mess/includes/macpci.h
+++ b/src/mess/includes/macpci.h
@@ -85,7 +85,6 @@ public:
m_awacs(*this, "awacs"),
m_cuda(*this, CUDA_TAG),
m_ram(*this, RAM_TAG),
- m_screen(*this, MAC_SCREEN_NAME),
m_539x_1(*this, MAC_539X_1_TAG),
m_539x_2(*this, MAC_539X_2_TAG)
{ }
@@ -95,7 +94,6 @@ public:
optional_device<awacs_device> m_awacs;
required_device<cuda_device> m_cuda;
required_device<ram_device> m_ram;
- optional_device<screen_device> m_screen;
optional_device<ncr539x_device> m_539x_1;
optional_device<ncr539x_device> m_539x_2;
diff --git a/src/mess/includes/mz700.h b/src/mess/includes/mz700.h
index a22821549b6..e4e3a7095ed 100644
--- a/src/mess/includes/mz700.h
+++ b/src/mess/includes/mz700.h
@@ -49,7 +49,7 @@ public:
int m_mz800_ram_monitor; /* 1 if monitor rom banked in */
int m_hires_mode; /* 1 if in 640x200 mode */
- int m_screen; /* screen designation */
+ int m_screennum; /* screen designation */
UINT8 *m_colorram;
UINT8 *m_videoram;
UINT8 m_speaker_level;
diff --git a/src/mess/includes/pcw.h b/src/mess/includes/pcw.h
index a1b449994ca..0d109503ae1 100644
--- a/src/mess/includes/pcw.h
+++ b/src/mess/includes/pcw.h
@@ -29,7 +29,6 @@ public:
pcw_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_fdc(*this, "upd765"),
m_ram(*this, RAM_TAG),
m_beeper(*this, "beeper")
@@ -118,7 +117,6 @@ public:
void pcw_fdc_interrupt(bool state);
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<upd765a_device> m_fdc;
required_device<ram_device> m_ram;
required_device<beep_device> m_beeper;
diff --git a/src/mess/includes/zx.h b/src/mess/includes/zx.h
index bf38c07bd42..b1eb6d26cd6 100644
--- a/src/mess/includes/zx.h
+++ b/src/mess/includes/zx.h
@@ -30,7 +30,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ram(*this, RAM_TAG),
- m_screen(*this, "screen"),
m_cassette(*this, "cassette"),
m_speaker(*this, "speaker"),
m_region_maincpu(*this, "maincpu"),
@@ -88,7 +87,6 @@ public:
protected:
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
- required_device<screen_device> m_screen;
required_device<cassette_image_device> m_cassette;
required_device<speaker_sound_device> m_speaker;
required_memory_region m_region_maincpu;
diff --git a/src/mess/machine/a2arcadebd.c b/src/mess/machine/a2arcadebd.c
index 393459897b2..7de1209735a 100644
--- a/src/mess/machine/a2arcadebd.c
+++ b/src/mess/machine/a2arcadebd.c
@@ -38,7 +38,6 @@ static const ay8910_interface arcadeboard_ay8910_interface =
static TMS9928A_INTERFACE(arcadeboard_tms9918a_interface)
{
- SCREEN_TAG,
0x4000, // 16k of VRAM
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_arcboard_device, tms_irq_w)
};
diff --git a/src/mess/machine/a2videoterm.c b/src/mess/machine/a2videoterm.c
index ca01d5ad257..35b14f2c3c7 100644
--- a/src/mess/machine/a2videoterm.c
+++ b/src/mess/machine/a2videoterm.c
@@ -50,7 +50,6 @@ static MC6845_UPDATE_ROW( videoterm_update_row );
static MC6845_INTERFACE( mc6845_mda_intf )
{
- VIDEOTERM_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -68,7 +67,7 @@ MACHINE_CONFIG_FRAGMENT( a2videoterm )
MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
MCFG_SCREEN_UPDATE_DEVICE( VIDEOTERM_MC6845_NAME, mc6845_device, screen_update )
- MCFG_MC6845_ADD( VIDEOTERM_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf)
+ MCFG_MC6845_ADD( VIDEOTERM_MC6845_NAME, MC6845, VIDEOTERM_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf)
MACHINE_CONFIG_END
ROM_START( a2videoterm )
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index d735d96646d..aeb0c664953 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -1085,7 +1085,6 @@ UINT32 amstrad_state::screen_update_amstrad(screen_device &screen, bitmap_ind16
MC6845_INTERFACE( amstrad_mc6845_intf )
{
- NULL, /* screen name */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -1101,7 +1100,6 @@ MC6845_INTERFACE( amstrad_mc6845_intf )
MC6845_INTERFACE( amstrad_plus_mc6845_intf )
{
- NULL, /* screen name */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/machine/c64/xl80.c b/src/mess/machine/c64/xl80.c
index 488a8f8169a..5f43efe36f4 100644
--- a/src/mess/machine/c64/xl80.c
+++ b/src/mess/machine/c64/xl80.c
@@ -112,7 +112,6 @@ static MC6845_UPDATE_ROW( c64_xl80_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- MC6845_SCREEN_TAG,
false,
8,
NULL,
@@ -149,7 +148,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_xl80 )
//MCFG_GFXDECODE(c64_xl80)
- MCFG_MC6845_ADD(HD46505SP_TAG, H46505, XTAL_14_31818MHz, crtc_intf)
+ MCFG_MC6845_ADD(HD46505SP_TAG, H46505, MC6845_SCREEN_TAG, XTAL_14_31818MHz, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/comx_clm.c b/src/mess/machine/comx_clm.c
index ad560115dda..7422a52f73c 100644
--- a/src/mess/machine/comx_clm.c
+++ b/src/mess/machine/comx_clm.c
@@ -131,7 +131,6 @@ static MC6845_UPDATE_ROW( comx_clm_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- MC6845_SCREEN_TAG,
false,
8,
NULL,
@@ -168,7 +167,7 @@ static MACHINE_CONFIG_FRAGMENT( comx_clm )
//MCFG_GFXDECODE(comx_clm)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_14_31818MHz/7, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, MC6845_SCREEN_TAG, XTAL_14_31818MHz/7, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/ecb_grip.c b/src/mess/machine/ecb_grip.c
index f591765e2ad..9893f4247bd 100644
--- a/src/mess/machine/ecb_grip.c
+++ b/src/mess/machine/ecb_grip.c
@@ -284,7 +284,6 @@ static const speaker_interface speaker_intf =
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -300,7 +299,6 @@ static MC6845_INTERFACE( crtc_intf )
static MC6845_INTERFACE( grip5_crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -550,8 +548,8 @@ static MACHINE_CONFIG_FRAGMENT( grip )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
// devices
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/4, crtc_intf)
-// MCFG_MC6845_ADD(HD6345_TAG, HD6345, XTAL_16MHz/4, grip5_crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/4, crtc_intf)
+// MCFG_MC6845_ADD(HD6345_TAG, HD6345, SCREEN_TAG, XTAL_16MHz/4, grip5_crtc_intf)
MCFG_I8255A_ADD(I8255A_TAG, ppi_intf)
MCFG_Z80STI_ADD(Z80STI_TAG, XTAL_16MHz/4, sti_intf)
MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
diff --git a/src/mess/machine/mz700.c b/src/mess/machine/mz700.c
index bbea4a37fda..4a570205c50 100644
--- a/src/mess/machine/mz700.c
+++ b/src/mess/machine/mz700.c
@@ -610,7 +610,7 @@ WRITE8_MEMBER(mz_state::mz800_display_mode_w)
{
m_mz700_mode = BIT(data, 3);
m_hires_mode = BIT(data, 2);
- m_screen = data & 0x03;
+ m_screennum = data & 0x03;
/* change memory maps if we switched mode */
// if (BIT(data, 3) != m_mz700_mode)
diff --git a/src/mess/machine/radio86.c b/src/mess/machine/radio86.c
index 24aef2220da..448b4f1322b 100644
--- a/src/mess/machine/radio86.c
+++ b/src/mess/machine/radio86.c
@@ -250,7 +250,6 @@ I8255A_INTERFACE( mikrosha_ppi8255_interface_2 )
};
const i8275_interface radio86_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -261,7 +260,6 @@ const i8275_interface radio86_i8275_interface = {
};
const i8275_interface mikrosha_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -272,7 +270,6 @@ const i8275_interface mikrosha_i8275_interface = {
};
const i8275_interface apogee_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -283,7 +280,6 @@ const i8275_interface apogee_i8275_interface = {
};
const i8275_interface partner_i8275_interface = {
- "screen",
6,
1,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
diff --git a/src/mess/machine/sms_lphaser.c b/src/mess/machine/sms_lphaser.c
index e24a0b5a088..25d5f4273e4 100644
--- a/src/mess/machine/sms_lphaser.c
+++ b/src/mess/machine/sms_lphaser.c
@@ -71,6 +71,7 @@ ioport_constructor sms_light_phaser_device::device_input_ports() const
sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SMS_LIGHT_PHASER, "Light Phaser", tag, owner, clock, "sms_light_phaser", __FILE__),
+ device_video_interface(mconfig, *this),
device_sms_control_port_interface(mconfig, *this),
m_lphaser_pins(*this, "CTRL_PORT"),
m_lphaser_x(*this, "LPHASER_X"),
@@ -85,7 +86,6 @@ sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig,
void sms_light_phaser_device::device_start()
{
- m_screen = machine().first_screen();
m_lphaser_timer = timer_alloc(TIMER_LPHASER);
m_last_state = 1;
}
diff --git a/src/mess/machine/sms_lphaser.h b/src/mess/machine/sms_lphaser.h
index 8f0c9ea933a..3f115e5f0cf 100644
--- a/src/mess/machine/sms_lphaser.h
+++ b/src/mess/machine/sms_lphaser.h
@@ -25,6 +25,7 @@
// ======================> sms_light_phaser_device
class sms_light_phaser_device : public device_t,
+ public device_video_interface,
public device_sms_control_port_interface
{
public:
@@ -50,7 +51,6 @@ private:
required_ioport m_lphaser_y;
int m_last_state;
- screen_device *m_screen;
emu_timer *m_lphaser_timer;
static const device_timer_id TIMER_LPHASER = 0;
diff --git a/src/mess/machine/wangpc_lvc.c b/src/mess/machine/wangpc_lvc.c
index f2748467970..20c103f0e48 100644
--- a/src/mess/machine/wangpc_lvc.c
+++ b/src/mess/machine/wangpc_lvc.c
@@ -119,7 +119,6 @@ WRITE_LINE_MEMBER( wangpc_lvc_device::vsync_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -145,7 +144,7 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_lvc )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, SCREEN_TAG, XTAL_14_31818MHz/16, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/wangpc_mvc.c b/src/mess/machine/wangpc_mvc.c
index bff1c5a5641..c4a19abda56 100644
--- a/src/mess/machine/wangpc_mvc.c
+++ b/src/mess/machine/wangpc_mvc.c
@@ -139,7 +139,6 @@ WRITE_LINE_MEMBER( wangpc_mvc_device::vsync_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
10,
NULL,
@@ -165,7 +164,7 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_mvc )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, SCREEN_TAG, XTAL_14_31818MHz/16, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/wangpc_tig.c b/src/mess/machine/wangpc_tig.c
index f2d4fd8a613..a0b99469b92 100644
--- a/src/mess/machine/wangpc_tig.c
+++ b/src/mess/machine/wangpc_tig.c
@@ -93,7 +93,6 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_display_text)
static UPD7220_INTERFACE( hgdc0_intf )
{
- SCREEN_TAG,
NULL,
hgdc_display_text,
DEVCB_NULL,
@@ -117,7 +116,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc1_intf )
{
- SCREEN_TAG,
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/video/abc1600.c b/src/mess/video/abc1600.c
index 39b90d06f79..a6084d16670 100644
--- a/src/mess/video/abc1600.c
+++ b/src/mess/video/abc1600.c
@@ -1026,7 +1026,6 @@ static MC6845_ON_UPDATE_ADDR_CHANGED( crtc_update )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
32,
NULL,
@@ -1119,5 +1118,5 @@ MACHINE_CONFIG_FRAGMENT( abc1600_video )
MCFG_SCREEN_SIZE(958, 1067)
MCFG_SCREEN_VISIBLE_AREA(0, 958-1, 0, 1067-1)
- MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, XTAL_64MHz/32, crtc_intf)
+ MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, SCREEN_TAG, XTAL_64MHz/32, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/abc800.c b/src/mess/video/abc800.c
index 869377f16bc..3d28a653c21 100644
--- a/src/mess/video/abc800.c
+++ b/src/mess/video/abc800.c
@@ -273,7 +273,6 @@ static MC6845_UPDATE_ROW( abc800m_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -317,7 +316,7 @@ UINT32 abc800m_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc800m_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc800m_state, screen_update)
diff --git a/src/mess/video/abc802.c b/src/mess/video/abc802.c
index b3364eef3eb..b05b9beaffa 100644
--- a/src/mess/video/abc802.c
+++ b/src/mess/video/abc802.c
@@ -189,7 +189,6 @@ WRITE_LINE_MEMBER( abc802_state::vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -237,7 +236,7 @@ UINT32 abc802_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc802_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc802_state, screen_update)
diff --git a/src/mess/video/abc806.c b/src/mess/video/abc806.c
index fd5908b3ad8..13ada077d7a 100644
--- a/src/mess/video/abc806.c
+++ b/src/mess/video/abc806.c
@@ -411,7 +411,6 @@ WRITE_LINE_MEMBER( abc806_state::vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -527,7 +526,7 @@ UINT32 abc806_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc806_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc806_state, screen_update)
diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c
index 8bf66580a8c..5aadc335da6 100644
--- a/src/mess/video/bbc.c
+++ b/src/mess/video/bbc.c
@@ -257,7 +257,6 @@ WRITE_LINE_MEMBER(bbc_state::bbc_vsync)
MC6845_INTERFACE( bbc_mc6845_intf )
{
- "screen", /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/video/comx35.c b/src/mess/video/comx35.c
index ef6580927f4..ba3e73296f1 100644
--- a/src/mess/video/comx35.c
+++ b/src/mess/video/comx35.c
@@ -80,7 +80,6 @@ WRITE_LINE_MEMBER( comx35_state::prd_w )
static CDP1869_INTERFACE( pal_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
comx35_pcb_r,
@@ -91,7 +90,6 @@ static CDP1869_INTERFACE( pal_cdp1869_intf )
static CDP1869_INTERFACE( ntsc_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_NTSC,
CDP1869_NTSC,
comx35_pcb_r,
@@ -115,6 +113,7 @@ MACHINE_CONFIG_FRAGMENT( comx35_pal_video )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_CDP1869_ADD(CDP1869_TAG, CDP1869_DOT_CLK_PAL, pal_cdp1869_intf, cdp1869_page_ram)
+ MCFG_CDP1869_SET_SCREEN(SCREEN_TAG)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
@@ -128,6 +127,7 @@ MACHINE_CONFIG_FRAGMENT( comx35_ntsc_video )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_CDP1869_ADD(CDP1869_TAG, CDP1869_DOT_CLK_NTSC, ntsc_cdp1869_intf, cdp1869_page_ram)
+ MCFG_CDP1869_SET_SCREEN(SCREEN_TAG)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
diff --git a/src/mess/video/crtc_ega.c b/src/mess/video/crtc_ega.c
index 88bdf7a3932..8aa7237c9cc 100644
--- a/src/mess/video/crtc_ega.c
+++ b/src/mess/video/crtc_ega.c
@@ -26,7 +26,6 @@ void crtc_ega_device::device_config_complete()
}
else
{
- m_screen_tag = NULL;
m_hpixels_per_column = 0;
m_begin_update = NULL;
m_update_row = NULL;
@@ -40,7 +39,8 @@ void crtc_ega_device::device_config_complete()
crtc_ega_device::crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, CRTC_EGA, "crtc_EGA", tag, owner, clock, "crtc_ega", __FILE__)
+ : device_t(mconfig, CRTC_EGA, "crtc_EGA", tag, owner, clock, "crtc_ega", __FILE__),
+ device_video_interface(mconfig, *this, false)
{
}
@@ -600,16 +600,6 @@ void crtc_ega_device::device_start()
m_res_out_vsync_func.resolve(m_out_vsync_func, *this);
m_res_out_vblank_func.resolve(m_out_vblank_func, *this);
- /* get the screen device */
- if ( m_screen_tag != NULL )
- {
- astring tempstring;
- m_screen = downcast<screen_device *>(machine().device(siblingtag(tempstring,m_screen_tag)));
- assert(m_screen != NULL);
- }
- else
- m_screen = NULL;
-
/* create the timers */
m_line_timer = timer_alloc(TIMER_LINE);
m_de_off_timer = timer_alloc(TIMER_DE_OFF);
diff --git a/src/mess/video/crtc_ega.h b/src/mess/video/crtc_ega.h
index ef87ca959c3..d211a63b888 100644
--- a/src/mess/video/crtc_ega.h
+++ b/src/mess/video/crtc_ega.h
@@ -16,6 +16,8 @@
MCFG_DEVICE_ADD(_tag, CRTC_EGA, _clock) \
MCFG_DEVICE_CONFIG(_intrf)
+#define MCFG_CRTC_EGA_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
class crtc_ega_device;
@@ -37,7 +39,6 @@ typedef void (*crtc_ega_end_update_func)(crtc_ega_device *device, bitmap_ind16 &
/* interface */
struct crtc_ega_interface
{
- const char *m_screen_tag; /* screen we are acting on */
int m_hpixels_per_column; /* number of pixels per video memory address */
/* if specified, this gets called before any pixel update,
@@ -68,6 +69,7 @@ struct crtc_ega_interface
class crtc_ega_device : public device_t,
+ public device_video_interface,
public crtc_ega_interface
{
public:
@@ -111,8 +113,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- screen_device *m_screen;
-
devcb_resolved_write_line m_res_out_de_func;
devcb_resolved_write_line m_res_out_cur_func;
devcb_resolved_write_line m_res_out_hsync_func;
diff --git a/src/mess/video/dgn_beta.c b/src/mess/video/dgn_beta.c
index a93ee936855..77f7cbc78b8 100644
--- a/src/mess/video/dgn_beta.c
+++ b/src/mess/video/dgn_beta.c
@@ -258,7 +258,6 @@ WRITE_LINE_MEMBER(dgn_beta_state::dgnbeta_vsync_changed)
MC6845_INTERFACE( dgnbeta_crtc6845_interface )
{
- "screen",
false,
16 /*?*/,
NULL,
diff --git a/src/mess/video/ef9345.c b/src/mess/video/ef9345.c
index 044d01786bc..50e2f582cac 100644
--- a/src/mess/video/ef9345.c
+++ b/src/mess/video/ef9345.c
@@ -43,29 +43,6 @@ const address_space_config *ef9345_device::memory_space_config(address_spacenum
return (spacenum == AS_0) ? &m_space_config : NULL;
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ef9345_device::device_config_complete()
-{
- // inherit a copy of the static data
- const ef9345_interface *intf = reinterpret_cast<const ef9345_interface *>(static_config());
-
- if (intf != NULL)
- {
- *static_cast<ef9345_interface *>(this) = *intf;
- }
- // or initialize to defaults if none provided
- else
- {
- screen_tag = NULL;
- }
-}
-
-
//**************************************************************************
// INLINE HELPERS
//**************************************************************************
@@ -123,6 +100,7 @@ inline void ef9345_device::inc_y(UINT8 r)
ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, EF9345, "EF9345", tag, owner, clock, "ef9345", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(ef9345))
{
}
@@ -133,10 +111,6 @@ ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, dev
void ef9345_device::device_start()
{
- m_screen = machine().device<screen_device>(screen_tag);
-
- assert(m_screen != NULL);
-
m_busy_timer = timer_alloc(BUSY_TIMER);
m_blink_timer = timer_alloc(BLINKING_TIMER);
diff --git a/src/mess/video/ef9345.h b/src/mess/video/ef9345.h
index d77ceb483e9..037f3e355fd 100644
--- a/src/mess/video/ef9345.h
+++ b/src/mess/video/ef9345.h
@@ -21,18 +21,11 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> ef9345_interface
-
-struct ef9345_interface
-{
- const char *screen_tag; // screen we are acting on
-};
-
// ======================> ef9345_device
class ef9345_device : public device_t,
public device_memory_interface,
- public ef9345_interface
+ public device_video_interface
{
public:
// construction/destruction
@@ -49,8 +42,6 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
- // device_config overrides
- virtual void device_config_complete();
// device_config_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
@@ -92,8 +83,6 @@ private:
memory_region *m_charset;
address_space *m_videoram;
- screen_device *m_screen; //screen we are acting on
-
UINT8 m_bf; //busy flag
UINT8 m_char_mode; //40 or 80 chars for line
UINT8 m_acc_char[0x2000]; //accented chars
diff --git a/src/mess/video/gb_lcd.c b/src/mess/video/gb_lcd.c
index 6d46cb7dcc7..b72706fb926 100644
--- a/src/mess/video/gb_lcd.c
+++ b/src/mess/video/gb_lcd.c
@@ -180,12 +180,14 @@ const device_type GB_LCD_CGB = &device_creator<cgb_lcd_device>;
gb_lcd_device::gb_lcd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
m_sgb_border_hack(0)
{
}
gb_lcd_device::gb_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GB_LCD_DMG, "DMG LCD", tag, owner, clock, "dmg_lcd", __FILE__),
+ device_video_interface(mconfig, *this),
m_sgb_border_hack(0)
{
}
@@ -219,7 +221,6 @@ void gb_lcd_device::common_start()
machine().save().register_postload(save_prepost_delegate(FUNC(gb_lcd_device::videoptr_restore), this));
m_maincpu = machine().device<cpu_device>("maincpu");
- m_screen = machine().device<screen_device>("screen");
save_pointer(NAME(m_oam), 0x100);
save_item(NAME(m_window_lines_drawn));
diff --git a/src/mess/video/gb_lcd.h b/src/mess/video/gb_lcd.h
index 96e257f1104..1ca596aab74 100644
--- a/src/mess/video/gb_lcd.h
+++ b/src/mess/video/gb_lcd.h
@@ -36,7 +36,8 @@ struct layer_struct {
};
-class gb_lcd_device : public device_t
+class gb_lcd_device : public device_t,
+ public device_video_interface
{
public:
gb_lcd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
@@ -70,7 +71,6 @@ protected:
// pointer to the main system
cpu_device *m_maincpu;
- screen_device *m_screen;
// state variables
bitmap_ind16 m_bitmap;
diff --git a/src/mess/video/isa_cga.c b/src/mess/video/isa_cga.c
index 12b0b1d9329..b8ef7d64183 100644
--- a/src/mess/video/isa_cga.c
+++ b/src/mess/video/isa_cga.c
@@ -606,7 +606,6 @@ static MC6845_UPDATE_ROW( cga_update_row )
static MC6845_INTERFACE( mc6845_cga_intf )
{
- CGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -630,7 +629,7 @@ static MACHINE_CONFIG_FRAGMENT( cga )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
- MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_cga_intf)
+ MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, CGA_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_cga_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/isa_ega.c b/src/mess/video/isa_ega.c
index 99853b7e618..6fa4f9a23d3 100644
--- a/src/mess/video/isa_ega.c
+++ b/src/mess/video/isa_ega.c
@@ -456,7 +456,6 @@ static CRTC_EGA_UPDATE_ROW( ega_update_row );
static CRTC_EGA_INTERFACE( crtc_ega_ega_intf )
{
- EGA_SCREEN_NAME, /* screen number */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
ega_update_row, /* update_row */
@@ -475,6 +474,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_ega )
MCFG_PALETTE_LENGTH( 64 )
MCFG_CRTC_EGA_ADD(EGA_CRTC_NAME, 16257000/8, crtc_ega_ega_intf)
+ MCFG_CRTC_EGA_SET_SCREEN(EGA_SCREEN_NAME)
MACHINE_CONFIG_END
ROM_START( ega )
diff --git a/src/mess/video/isa_mda.c b/src/mess/video/isa_mda.c
index 1b8165cb6f0..299daf4536f 100644
--- a/src/mess/video/isa_mda.c
+++ b/src/mess/video/isa_mda.c
@@ -77,7 +77,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_mda_intf )
{
- MDA_SCREEN_NAME, /* screen number */
false, /* show border area */
9, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -108,7 +107,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_mda )
MCFG_PALETTE_LENGTH( 4 )
- MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf)
+ MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf)
//MCFG_GFXDECODE(pcmda)
@@ -498,7 +497,6 @@ The divder/pixels per 6845 clock is 9 for text mode and 16 for graphics mode.
static MC6845_INTERFACE( mc6845_hercules_intf )
{
- HERCULES_SCREEN_NAME, /* screen number */
false, /* show border area */
9, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -522,7 +520,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_hercules )
MCFG_PALETTE_LENGTH( 4 )
- MCFG_MC6845_ADD( HERCULES_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_hercules_intf)
+ MCFG_MC6845_ADD( HERCULES_MC6845_NAME, MC6845, HERCULES_SCREEN_NAME, MDA_CLOCK/9, mc6845_hercules_intf)
//MCFG_GFXDECODE(pcherc)
diff --git a/src/mess/video/k1ge.c b/src/mess/video/k1ge.c
index c05ee880e13..5282282e448 100644
--- a/src/mess/video/k1ge.c
+++ b/src/mess/video/k1ge.c
@@ -810,7 +810,6 @@ void k1ge_device::device_start()
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k1ge_device::timer_callback), this));
m_hblank_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k1ge_device::hblank_on_timer_callback), this));
- m_screen = machine().device<screen_device>(m_screen_tag);
m_vram = auto_alloc_array_clear(machine(), UINT8, 0x4000);
m_bitmap = auto_bitmap_ind16_alloc( machine(), m_screen->width(), m_screen->height() );
@@ -874,6 +873,7 @@ const device_type K1GE = &device_creator<k1ge_device>;
k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K1GE, "K1GE Monochrome Graphics + LCD", tag, owner, clock, "k1ge", __FILE__)
+ , device_video_interface(mconfig, *this)
, m_vblank_pin_w(*this)
, m_hblank_pin_w(*this)
{
@@ -881,6 +881,7 @@ k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_
k1ge_device::k1ge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ , device_video_interface(mconfig, *this)
, m_vblank_pin_w(*this)
, m_hblank_pin_w(*this)
{
diff --git a/src/mess/video/k1ge.h b/src/mess/video/k1ge.h
index 9651f86ad49..66bdd1b97fb 100644
--- a/src/mess/video/k1ge.h
+++ b/src/mess/video/k1ge.h
@@ -5,18 +5,19 @@
#define MCFG_K1GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K1GE, _clock ) \
- k1ge_device::static_set_screen( *device, _screen ); \
+ MCFG_VIDEO_SET_SCREEN( _screen ) \
devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB2_##_vblank ); \
devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB2_##_hblank );
#define MCFG_K2GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K2GE, _clock ) \
- k1ge_device::static_set_screen( *device, _screen ); \
+ MCFG_VIDEO_SET_SCREEN( _screen ) \
devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB2_##_vblank ); \
devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB2_##_hblank );
-class k1ge_device : public device_t
+class k1ge_device : public device_t,
+ public device_video_interface
{
public:
k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -30,7 +31,6 @@ public:
void update( bitmap_ind16 &bitmap, const rectangle &cliprect );
// Static methods
- static void static_set_screen(device_t &device, const char *screen_name) { downcast<k1ge_device &>(device).m_screen_tag = screen_name; }
template<class _Object> static devcb2_base &static_set_vblank_callback(device_t &device, _Object object) { return downcast<k1ge_device &>(device).m_vblank_pin_w.set_callback(object); }
template<class _Object> static devcb2_base &static_set_hblank_callback(device_t &device, _Object object) { return downcast<k1ge_device &>(device).m_hblank_pin_w.set_callback(object); }
@@ -40,8 +40,6 @@ protected:
virtual void device_start();
virtual void device_reset();
- const char *m_screen_tag;
- screen_device *m_screen;
devcb2_write_line m_vblank_pin_w;
devcb2_write_line m_hblank_pin_w;
UINT8 *m_vram;
diff --git a/src/mess/video/kyocera.c b/src/mess/video/kyocera.c
index 0043b10a33e..dac55133b96 100644
--- a/src/mess/video/kyocera.c
+++ b/src/mess/video/kyocera.c
@@ -37,7 +37,6 @@ UINT32 tandy200_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_NULL
};
diff --git a/src/mess/video/mbc55x.c b/src/mess/video/mbc55x.c
index 64bb0200c40..85b0a0b3447 100644
--- a/src/mess/video/mbc55x.c
+++ b/src/mess/video/mbc55x.c
@@ -160,7 +160,6 @@ WRITE_LINE_MEMBER( mbc55x_state::vid_vsync_changed )
MC6845_INTERFACE( mb55x_mc6845_intf )
{
- SCREEN_TAG, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/video/mikromik.c b/src/mess/video/mikromik.c
index ba6056de725..516c58a9523 100644
--- a/src/mess/video/mikromik.c
+++ b/src/mess/video/mikromik.c
@@ -35,7 +35,6 @@ static I8275_DISPLAY_PIXELS( crtc_display_pixels )
static const i8275_interface crtc_intf =
{
- SCREEN_TAG,
8,
0,
DEVCB_DEVICE_LINE_MEMBER(I8237_TAG, am9517a_device, dreq0_w),
@@ -74,7 +73,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc_intf )
{
- SCREEN_TAG,
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/video/mos6566.c b/src/mess/video/mos6566.c
index 2c8183197ad..6ee73e4774c 100644
--- a/src/mess/video/mos6566.c
+++ b/src/mess/video/mos6566.c
@@ -582,6 +582,7 @@ inline void mos6566_device::draw_multi( UINT16 p, UINT8 c0, UINT8 c1, UINT8 c2,
mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MOS6566, "MOS6566", tag, owner, clock, "mos6566", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(TYPE_6566),
@@ -597,6 +598,7 @@ mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, d
mos6566_device::mos6566_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(variant),
@@ -657,7 +659,6 @@ void mos6566_device::device_start()
else
m_cpu = machine().firstcpu;
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
for (int i = 0; i < 256; i++)
diff --git a/src/mess/video/mos6566.h b/src/mess/video/mos6566.h
index 713ee68c8af..fe4ca992d6a 100644
--- a/src/mess/video/mos6566.h
+++ b/src/mess/video/mos6566.h
@@ -93,7 +93,8 @@
#define MCFG_MOS6566_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6566, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -104,7 +105,8 @@
#define MCFG_MOS6567_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6567, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -115,7 +117,8 @@
#define MCFG_MOS8562_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS8562, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -126,7 +129,8 @@
#define MCFG_MOS8564_ADD(_tag, _screen_tag, _cpu_tag, _clock, _videoram_map, _colorram_map, _irq, _k) \
MCFG_DEVICE_ADD(_tag, MOS8564, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -137,7 +141,8 @@
#define MCFG_MOS6569_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6569, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -148,7 +153,8 @@
#define MCFG_MOS8565_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS8565, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -159,7 +165,8 @@
#define MCFG_MOS8566_ADD(_tag, _screen_tag, _cpu_tag, _clock, _videoram_map, _colorram_map, _irq, _k) \
MCFG_DEVICE_ADD(_tag, MOS8566, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -269,6 +276,7 @@
class mos6566_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public device_execute_interface
{
public:
@@ -276,8 +284,7 @@ public:
mos6566_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- template<class _irq, class _k> void set_callbacks(const char *screen_tag, const char *cpu_tag, _irq irq, _k k) {
- m_screen_tag = screen_tag;
+ template<class _irq, class _k> void set_callbacks(const char *cpu_tag, _irq irq, _k k) {
m_cpu_tag = cpu_tag;
m_write_irq.set_callback(irq);
m_write_k.set_callback(k);
@@ -355,9 +362,7 @@ protected:
devcb2_write_line m_write_aec;
devcb2_write8 m_write_k;
- const char *m_screen_tag;
const char *m_cpu_tag;
- screen_device *m_screen; // screen which sets bitmap properties
cpu_device *m_cpu;
int m_phi0;
diff --git a/src/mess/video/nick.c b/src/mess/video/nick.c
index 883feb96708..90a38a2fc22 100644
--- a/src/mess/video/nick.c
+++ b/src/mess/video/nick.c
@@ -105,6 +105,7 @@ ADDRESS_MAP_END
nick_device::nick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NICK, "NICK", tag, owner, clock, "nick", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vram", ENDIANNESS_LITTLE, 8, 16, 0, *ADDRESS_MAP_NAME(nick_map)),
m_write_virq(*this),
horizontal_clock(0),
@@ -126,7 +127,6 @@ nick_device::nick_device(const machine_config &mconfig, const char *tag, device_
void nick_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
calc_visible_clocks(ENTERPRISE_SCREEN_WIDTH);
diff --git a/src/mess/video/nick.h b/src/mess/video/nick.h
index efd6f942a40..f71010cd14d 100644
--- a/src/mess/video/nick.h
+++ b/src/mess/video/nick.h
@@ -30,7 +30,7 @@
MCFG_SCREEN_VISIBLE_AREA(0, ENTERPRISE_SCREEN_WIDTH-1, 0, ENTERPRISE_SCREEN_HEIGHT-1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, nick_device, screen_update) \
MCFG_DEVICE_ADD(_tag, NICK, _clock) \
- downcast<nick_device *>(device)->set_screen_tag(_screen_tag); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<nick_device *>(device)->set_virq_callback(DEVCB2_##_virq);
@@ -66,13 +66,13 @@ struct LPT_ENTRY
// ======================> nick_device
class nick_device : public device_t,
- public device_memory_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
nick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_screen_tag(const char *screen_tag) { m_screen_tag = screen_tag; }
template<class _virq> void set_virq_callback(_virq virq) { m_write_virq.set_callback(virq); }
virtual DECLARE_ADDRESS_MAP(vram_map, 8);
@@ -161,8 +161,6 @@ private:
int m_virq;
- const char *m_screen_tag;
- screen_device *m_screen;
bitmap_rgb32 m_bitmap;
rgb_t m_palette[256];
diff --git a/src/mess/video/nubus_m2hires.c b/src/mess/video/nubus_m2hires.c
index 81912b13b83..85de8ea3d22 100644
--- a/src/mess/video/nubus_m2hires.c
+++ b/src/mess/video/nubus_m2hires.c
@@ -65,14 +65,18 @@ const rom_entry *nubus_m2hires_device::device_rom_region() const
nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_M2HIRES, "Macintosh II Hi-Resolution video card", tag, owner, clock, "nb_m2hr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2HIRES_SCREEN_NAME;
}
nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2HIRES_SCREEN_NAME;
}
//-------------------------------------------------
@@ -99,7 +103,7 @@ void nubus_m2hires_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -142,13 +146,6 @@ UINT32 nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x20;
switch (m_mode)
diff --git a/src/mess/video/nubus_m2hires.h b/src/mess/video/nubus_m2hires.h
index 18b73226731..6f89514aaaa 100644
--- a/src/mess/video/nubus_m2hires.h
+++ b/src/mess/video/nubus_m2hires.h
@@ -14,6 +14,7 @@
class nubus_m2hires_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_m2video.c b/src/mess/video/nubus_m2video.c
index 711a1dbfe33..5da60d0c475 100644
--- a/src/mess/video/nubus_m2video.c
+++ b/src/mess/video/nubus_m2video.c
@@ -66,14 +66,18 @@ const rom_entry *nubus_m2video_device::device_rom_region() const
nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_M2VIDEO, "Macintosh II Video Card", tag, owner, clock, "nb_m2vc", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2VIDEO_SCREEN_NAME;
}
nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2VIDEO_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_m2video_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -143,13 +147,6 @@ UINT32 nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x20;
switch (m_mode)
diff --git a/src/mess/video/nubus_m2video.h b/src/mess/video/nubus_m2video.h
index 00708d10480..5dcdd15b683 100644
--- a/src/mess/video/nubus_m2video.h
+++ b/src/mess/video/nubus_m2video.h
@@ -14,6 +14,7 @@
class nubus_m2video_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_radiustpd.c b/src/mess/video/nubus_radiustpd.c
index b4fe9c46ca1..3eaaaa8b643 100644
--- a/src/mess/video/nubus_radiustpd.c
+++ b/src/mess/video/nubus_radiustpd.c
@@ -65,14 +65,18 @@ const rom_entry *nubus_radiustpd_device::device_rom_region() const
nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_RADIUSTPD, "Radius Two Page Display video card", tag, owner, clock, "nb_rtpd", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = RADIUSTPD_SCREEN_NAME;
}
nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = RADIUSTPD_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_radiustpd_device::device_start()
m_nubus->install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -143,13 +147,6 @@ UINT32 nubus_radiustpd_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x200;
for (y = 0; y < 880; y++)
diff --git a/src/mess/video/nubus_radiustpd.h b/src/mess/video/nubus_radiustpd.h
index f1e7578a7b8..15dc5454b0e 100644
--- a/src/mess/video/nubus_radiustpd.h
+++ b/src/mess/video/nubus_radiustpd.h
@@ -14,6 +14,7 @@
class nubus_radiustpd_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_spec8.c b/src/mess/video/nubus_spec8.c
index 59c534b743d..f10cee7b37e 100644
--- a/src/mess/video/nubus_spec8.c
+++ b/src/mess/video/nubus_spec8.c
@@ -67,14 +67,18 @@ const rom_entry *nubus_spec8s3_device::device_rom_region() const
nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_SPEC8S3, "SuperMac Spectrum/8 Series III video card", tag, owner, clock, "nb_sp8s3", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPEC8S3_SCREEN_NAME;
}
nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPEC8S3_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_spec8s3_device::device_start()
m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
}
//-------------------------------------------------
@@ -146,12 +150,6 @@ UINT32 nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
- }
vram = m_vram + 0x400;
switch (m_mode)
diff --git a/src/mess/video/nubus_spec8.h b/src/mess/video/nubus_spec8.h
index 87e47f21b09..8dd02cf09b9 100644
--- a/src/mess/video/nubus_spec8.h
+++ b/src/mess/video/nubus_spec8.h
@@ -14,6 +14,7 @@
class nubus_spec8s3_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
private:
diff --git a/src/mess/video/nubus_specpdq.c b/src/mess/video/nubus_specpdq.c
index a2e4befcd40..5c4236b1197 100644
--- a/src/mess/video/nubus_specpdq.c
+++ b/src/mess/video/nubus_specpdq.c
@@ -80,14 +80,18 @@ const rom_entry *nubus_specpdq_device::device_rom_region() const
nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_SPECPDQ, "SuperMac Spectrum PDQ video card", tag, owner, clock, "nb_spdq", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPECPDQ_SCREEN_NAME;
}
nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPECPDQ_SCREEN_NAME;
}
//-------------------------------------------------
@@ -112,7 +116,7 @@ void nubus_specpdq_device::device_start()
m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(843, 0), 0);
}
//-------------------------------------------------
@@ -156,11 +160,6 @@ UINT32 nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 &
UINT8 pixels, *vram;
// first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(843, 0), 0);
- }
vram = m_vram + 0x9000;
switch (m_mode)
diff --git a/src/mess/video/nubus_specpdq.h b/src/mess/video/nubus_specpdq.h
index a55c8f18b44..30e39e54d6e 100644
--- a/src/mess/video/nubus_specpdq.h
+++ b/src/mess/video/nubus_specpdq.h
@@ -14,6 +14,7 @@
class nubus_specpdq_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
private:
diff --git a/src/mess/video/nubus_wsportrait.c b/src/mess/video/nubus_wsportrait.c
index edaf558710b..b083a7b802b 100644
--- a/src/mess/video/nubus_wsportrait.c
+++ b/src/mess/video/nubus_wsportrait.c
@@ -68,14 +68,18 @@ const rom_entry *nubus_wsportrait_device::device_rom_region() const
nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_WSPORTRAIT, "Macintosh II Portrait Video Card", tag, owner, clock, "nb_wspt", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = WSPORTRAIT_SCREEN_NAME;
}
nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = WSPORTRAIT_SCREEN_NAME;
}
//-------------------------------------------------
@@ -102,7 +106,7 @@ void nubus_wsportrait_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(869, 0), 0);
}
//-------------------------------------------------
@@ -143,12 +147,6 @@ UINT32 nubus_wsportrait_device::screen_update(screen_device &screen, bitmap_rgb3
UINT8 pixels, *vram;
// first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(869, 0), 0);
- }
-
vram = m_vram + 0x80;
switch (m_mode)
diff --git a/src/mess/video/nubus_wsportrait.h b/src/mess/video/nubus_wsportrait.h
index 6c8ee02a43a..2ac3f8b436e 100644
--- a/src/mess/video/nubus_wsportrait.h
+++ b/src/mess/video/nubus_wsportrait.h
@@ -14,6 +14,7 @@
class nubus_wsportrait_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pc1512.c b/src/mess/video/pc1512.c
index 9a6591ef8ca..623e56d5582 100644
--- a/src/mess/video/pc1512.c
+++ b/src/mess/video/pc1512.c
@@ -528,7 +528,6 @@ static MC6845_UPDATE_ROW( pc1512_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -623,5 +622,5 @@ MACHINE_CONFIG_FRAGMENT( pc1512_video )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_MC6845_ADD(AMS40041_TAG, AMS40041, XTAL_28_63636MHz/32, crtc_intf)
+ MCFG_MC6845_ADD(AMS40041_TAG, AMS40041, SCREEN_TAG, XTAL_28_63636MHz/32, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc8401a.c b/src/mess/video/pc8401a.c
index 8b6a2c34750..f8bee5742aa 100644
--- a/src/mess/video/pc8401a.c
+++ b/src/mess/video/pc8401a.c
@@ -58,7 +58,6 @@ static MC6845_UPDATE_ROW( pc8441a_update_row )
static MC6845_INTERFACE( pc8441a_mc6845_interface )
{
- CRT_SCREEN_TAG,
false,
6,
NULL,
@@ -112,5 +111,5 @@ MACHINE_CONFIG_FRAGMENT( pc8500_video )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, 400000, pc8441a_mc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, CRT_SCREEN_TAG, 400000, pc8441a_mc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc_aga.c b/src/mess/video/pc_aga.c
index f46d60a74cd..357ddcca39a 100644
--- a/src/mess/video/pc_aga.c
+++ b/src/mess/video/pc_aga.c
@@ -31,7 +31,6 @@ static VIDEO_START( pc200 );
static MC6845_INTERFACE( mc6845_aga_intf )
{
- AGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -75,7 +74,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_aga )
MCFG_PALETTE_LENGTH( CGA_PALETTE_SETS * 16 )
MCFG_PALETTE_INIT( pc_aga )
- MCFG_MC6845_ADD( AGA_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_aga_intf )
+ MCFG_MC6845_ADD( AGA_MC6845_NAME, MC6845, AGA_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_aga_intf )
MCFG_VIDEO_START( pc_aga )
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc_t1t.c b/src/mess/video/pc_t1t.c
index 16da9872fa9..7467fe7f303 100644
--- a/src/mess/video/pc_t1t.c
+++ b/src/mess/video/pc_t1t.c
@@ -32,7 +32,6 @@ static WRITE_LINE_DEVICE_HANDLER( pcjr_vsync_changed );
static MC6845_INTERFACE( mc6845_t1000_intf )
{
- T1000_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -54,7 +53,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 )
MCFG_PALETTE_LENGTH( 32 )
MCFG_PALETTE_INIT(pcjr)
- MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_t1000_intf)
+ MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, T1000_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_t1000_intf)
MCFG_VIDEO_START(pc_t1t)
MACHINE_CONFIG_END
@@ -62,7 +61,6 @@ MACHINE_CONFIG_END
static MC6845_INTERFACE( mc6845_pcjr_intf )
{
- T1000_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -84,7 +82,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr )
MCFG_PALETTE_LENGTH( 32 )
MCFG_PALETTE_INIT(pcjr)
- MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, XTAL_14_31818MHz/16, mc6845_pcjr_intf)
+ MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, T1000_SCREEN_NAME, XTAL_14_31818MHz/16, mc6845_pcjr_intf)
MCFG_VIDEO_START(pc_pcjr)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pds30_30hr.c b/src/mess/video/pds30_30hr.c
index b18bbaf601b..6aed0e16d76 100644
--- a/src/mess/video/pds30_30hr.c
+++ b/src/mess/video/pds30_30hr.c
@@ -68,14 +68,18 @@ const rom_entry *nubus_xceed30hr_device::device_rom_region() const
nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_XCEED30HR, "Micron/XCEED Technology Color 30HR", tag, owner, clock, "pd3_30hr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEED30HR_SCREEN_NAME;
}
nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEED30HR_SCREEN_NAME;
}
//-------------------------------------------------
@@ -101,7 +105,7 @@ void nubus_xceed30hr_device::device_start()
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -144,13 +148,6 @@ UINT32 nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 1024;
switch (m_mode)
diff --git a/src/mess/video/pds30_30hr.h b/src/mess/video/pds30_30hr.h
index ec0b561fc02..ce3c6f2723c 100644
--- a/src/mess/video/pds30_30hr.h
+++ b/src/mess/video/pds30_30hr.h
@@ -14,6 +14,7 @@
class nubus_xceed30hr_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_cb264.c b/src/mess/video/pds30_cb264.c
index 8b1af10f3a7..b4ee6282284 100644
--- a/src/mess/video/pds30_cb264.c
+++ b/src/mess/video/pds30_cb264.c
@@ -61,14 +61,18 @@ const rom_entry *nubus_cb264se30_device::device_rom_region() const
nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_CB264SE30, "RasterOps Colorboard 264/SE30", tag, owner, clock, "pd3_c264", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = CB264SE30_SCREEN_NAME;
}
nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = CB264SE30_SCREEN_NAME;
}
//-------------------------------------------------
@@ -94,7 +98,7 @@ void nubus_cb264se30_device::device_start()
m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -137,13 +141,6 @@ UINT32 nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + (8*1024);
switch (m_mode)
diff --git a/src/mess/video/pds30_cb264.h b/src/mess/video/pds30_cb264.h
index ddf80e5d967..98e4f255d3a 100644
--- a/src/mess/video/pds30_cb264.h
+++ b/src/mess/video/pds30_cb264.h
@@ -14,6 +14,7 @@
class nubus_cb264se30_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_mc30.c b/src/mess/video/pds30_mc30.c
index 4c63e60b710..6669c407b9c 100644
--- a/src/mess/video/pds30_mc30.c
+++ b/src/mess/video/pds30_mc30.c
@@ -64,14 +64,18 @@ const rom_entry *nubus_xceedmc30_device::device_rom_region() const
nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_XCEEDMC30, "Micron/XCEED Technology MacroColor 30", tag, owner, clock, "pd3_mclr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEEDMC30_SCREEN_NAME;
}
nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEEDMC30_SCREEN_NAME;
}
//-------------------------------------------------
@@ -97,7 +101,7 @@ void nubus_xceedmc30_device::device_start()
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -140,13 +144,6 @@ UINT32 nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + (4*1024);
switch (m_mode)
diff --git a/src/mess/video/pds30_mc30.h b/src/mess/video/pds30_mc30.h
index 6fcefce41e2..492125c461c 100644
--- a/src/mess/video/pds30_mc30.h
+++ b/src/mess/video/pds30_mc30.h
@@ -14,6 +14,7 @@
class nubus_xceedmc30_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_procolor816.c b/src/mess/video/pds30_procolor816.c
index 659b68c6218..254cfebb8b8 100644
--- a/src/mess/video/pds30_procolor816.c
+++ b/src/mess/video/pds30_procolor816.c
@@ -67,14 +67,18 @@ const rom_entry *nubus_procolor816_device::device_rom_region() const
nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_PROCOLOR816, "Lapis ProColor Server 8*16", tag, owner, clock, "pd3_pc16", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = PROCOLOR816_SCREEN_NAME;
}
nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = PROCOLOR816_SCREEN_NAME;
}
//-------------------------------------------------
@@ -101,7 +105,7 @@ void nubus_procolor816_device::device_start()
m_nubus->install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -144,13 +148,6 @@ UINT32 nubus_procolor816_device::screen_update(screen_device &screen, bitmap_rgb
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 4;
switch (m_mode)
diff --git a/src/mess/video/pds30_procolor816.h b/src/mess/video/pds30_procolor816.h
index c4d9ab1d02e..600ff402f59 100644
--- a/src/mess/video/pds30_procolor816.h
+++ b/src/mess/video/pds30_procolor816.h
@@ -14,6 +14,7 @@
class nubus_procolor816_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_sigmalview.c b/src/mess/video/pds30_sigmalview.c
index 8942af434d3..6fcb2a86115 100644
--- a/src/mess/video/pds30_sigmalview.c
+++ b/src/mess/video/pds30_sigmalview.c
@@ -61,12 +61,14 @@ const rom_entry *nubus_lview_device::device_rom_region() const
nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_LVIEW, "Sigma Designs L-View", tag, owner, clock, "pd3_lviw", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
}
nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
}
@@ -95,7 +97,7 @@ void nubus_lview_device::device_start()
m_nubus->install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(599, 0), 0);
}
//-------------------------------------------------
@@ -136,13 +138,6 @@ UINT32 nubus_lview_device::screen_update(screen_device &screen, bitmap_rgb32 &bi
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(599, 0), 0);
- }
-
vram = m_vram + 0x20;
for (y = 0; y < 600; y++)
diff --git a/src/mess/video/pds30_sigmalview.h b/src/mess/video/pds30_sigmalview.h
index 4c8da94dc09..073b05eec83 100644
--- a/src/mess/video/pds30_sigmalview.h
+++ b/src/mess/video/pds30_sigmalview.h
@@ -14,6 +14,7 @@
class nubus_lview_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_vbl_disable, m_toggle;
UINT32 m_palette[256];
- screen_device *m_screen;
emu_timer *m_timer;
int m_protstate;
};
diff --git a/src/mess/video/pds_tpdfpd.c b/src/mess/video/pds_tpdfpd.c
index 8692ae26877..1a5c5b2877b 100644
--- a/src/mess/video/pds_tpdfpd.c
+++ b/src/mess/video/pds_tpdfpd.c
@@ -85,14 +85,18 @@ const rom_entry *macpds_sedisplay_device::device_rom_region() const
macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS_SEDISPLAY, "Radius SE Full Page Display", tag, owner, clock, "pds_sefp", __FILE__),
+ device_video_interface(mconfig, *this),
device_macpds_card_interface(mconfig, *this)
{
+ m_screen_tag = SEDISPLAY_SCREEN_NAME;
}
macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_macpds_card_interface(mconfig, *this)
{
+ m_screen_tag = SEDISPLAY_SCREEN_NAME;
}
//-------------------------------------------------
@@ -115,7 +119,7 @@ void macpds_sedisplay_device::device_start()
m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
}
//-------------------------------------------------
@@ -157,12 +161,6 @@ UINT32 macpds_sedisplay_device::screen_update(screen_device &screen, bitmap_rgb3
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
- }
vram = m_vram;
for (y = 0; y < 870; y++)
diff --git a/src/mess/video/pds_tpdfpd.h b/src/mess/video/pds_tpdfpd.h
index 741a265f709..653d6e92aea 100644
--- a/src/mess/video/pds_tpdfpd.h
+++ b/src/mess/video/pds_tpdfpd.h
@@ -14,6 +14,7 @@
class macpds_sedisplay_device :
public device_t,
+ public device_video_interface,
public device_macpds_card_interface
{
public:
@@ -41,7 +42,6 @@ public:
UINT8 *m_vram;
UINT32 m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pecom.c b/src/mess/video/pecom.c
index cd91caf901c..5a66bd9d91a 100644
--- a/src/mess/video/pecom.c
+++ b/src/mess/video/pecom.c
@@ -82,7 +82,6 @@ WRITE_LINE_MEMBER(pecom_state::pecom_prd_w)
static CDP1869_INTERFACE( pecom_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
pecom_pcb_r,
diff --git a/src/mess/video/tmc600.c b/src/mess/video/tmc600.c
index ebfb18190e2..8bf59846beb 100644
--- a/src/mess/video/tmc600.c
+++ b/src/mess/video/tmc600.c
@@ -98,7 +98,6 @@ static CDP1869_PCB_READ( tmc600_pcb_r )
static CDP1869_INTERFACE( vis_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
tmc600_pcb_r,
diff --git a/src/mess/video/uv201.c b/src/mess/video/uv201.c
index f46bd240f51..696e0d25ed1 100644
--- a/src/mess/video/uv201.c
+++ b/src/mess/video/uv201.c
@@ -98,7 +98,8 @@ const device_type UV201 = &device_creator<uv201_device>;
//-------------------------------------------------
uv201_device::uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, UV201, "UV201", tag, owner, clock, "uv201", __FILE__)
+ : device_t(mconfig, UV201, "UV201", tag, owner, clock, "uv201", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -143,9 +144,6 @@ void uv201_device::device_start()
m_timer_hblank_on = timer_alloc(TIMER_HBLANK_ON);
m_timer_hblank_off = timer_alloc(TIMER_HBLANK_OFF);
- // find devices
- m_screen = machine().device<screen_device>(m_screen_tag);
-
initialize_palette();
memset(m_ram, 0x00, sizeof(m_ram));
diff --git a/src/mess/video/uv201.h b/src/mess/video/uv201.h
index 6abab346dbd..d0d83baf236 100644
--- a/src/mess/video/uv201.h
+++ b/src/mess/video/uv201.h
@@ -67,6 +67,7 @@
#define MCFG_UV201_ADD(_tag, _screen_tag, _clock, _config) \
MCFG_DEVICE_ADD(_tag, UV201, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, uv201_device, screen_update) \
@@ -86,8 +87,6 @@
struct uv201_interface
{
- const char *m_screen_tag;
-
devcb_write_line m_out_ext_int_cb;
devcb_write_line m_out_hblank_cb;
devcb_read8 m_in_db_cb;
@@ -97,6 +96,7 @@ struct uv201_interface
// ======================> uv201_device
class uv201_device : public device_t,
+ public device_video_interface,
public uv201_interface
{
public:
@@ -137,8 +137,6 @@ private:
devcb_resolved_write_line m_out_hblank_func;
devcb_resolved_read8 m_in_db_func;
- screen_device *m_screen;
-
rgb_t m_palette[32];
UINT8 m_ram[0x90];
UINT8 m_y_int;
diff --git a/src/mess/video/v1050.c b/src/mess/video/v1050.c
index f70a2a39395..8d11b9a161d 100644
--- a/src/mess/video/v1050.c
+++ b/src/mess/video/v1050.c
@@ -95,7 +95,6 @@ WRITE_LINE_MEMBER( v1050_state::crtc_vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -122,7 +121,7 @@ void v1050_state::video_start()
/* Machine Drivers */
MACHINE_CONFIG_FRAGMENT( v1050_video )
- MCFG_MC6845_ADD(H46505_TAG, H46505, XTAL_15_36MHz/8, crtc_intf)
+ MCFG_MC6845_ADD(H46505_TAG, H46505, SCREEN_TAG, XTAL_15_36MHz/8, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DEVICE(H46505_TAG, h46505_device, screen_update)
diff --git a/src/mess/video/vic4567.c b/src/mess/video/vic4567.c
index 35ef8b4d019..55b629657e6 100644
--- a/src/mess/video/vic4567.c
+++ b/src/mess/video/vic4567.c
@@ -143,7 +143,8 @@
const device_type VIC3 = &device_creator<vic3_device>;
vic3_device::vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, VIC3, "4567 VIC III", tag, owner, clock, "vic3", __FILE__)
+ : device_t(mconfig, VIC3, "4567 VIC III", tag, owner, clock, "vic3", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -171,7 +172,6 @@ void vic3_device::device_config_complete()
memset(&irq, 0, sizeof(irq));
memset(&port_changed, 0, sizeof(port_changed));
memset(&c64_mem_r, 0, sizeof(c64_mem_r));
- screen_tag = "";
cpu_tag = "";
vic_type = VIC4567_NTSC;
}
@@ -186,9 +186,8 @@ void vic3_device::device_start()
int width, height;
m_cpu = machine().device(cpu_tag);
- m_main_screen = machine().device<screen_device>(screen_tag);
- width = m_main_screen->width();
- height = m_main_screen->height();
+ width = m_screen->width();
+ height = m_screen->height();
m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height);
@@ -206,10 +205,10 @@ void vic3_device::device_start()
m_lightpen_x_cb.resolve(x_cb, *this);
m_lightpen_y_cb.resolve(y_cb, *this);
- m_screen[0] = auto_alloc_array(machine(), UINT8, 216 * 656 / 8);
+ m_screenptr[0] = auto_alloc_array(machine(), UINT8, 216 * 656 / 8);
for (int i = 1; i < 216; i++)
- m_screen[i] = m_screen[i - 1] + 656 / 8;
+ m_screenptr[i] = m_screenptr[i - 1] + 656 / 8;
for (int i = 0; i < 256; i++)
{
@@ -385,12 +384,12 @@ void vic3_device::device_reset()
inline int vic3_device::getforeground( int y, int x )
{
- return ((m_screen[y][x >> 3] << 8) | (m_screen[y][(x >> 3) + 1])) >> (8 - (x & 7));
+ return ((m_screenptr[y][x >> 3] << 8) | (m_screenptr[y][(x >> 3) + 1])) >> (8 - (x & 7));
}
inline int vic3_device::getforeground16( int y, int x )
{
- return ((m_screen[y][x >> 3] << 16) | (m_screen[y][(x >> 3) + 1] << 8) | (m_screen[y][(x >> 3) + 2])) >> (8 - (x & 7));
+ return ((m_screenptr[y][x >> 3] << 16) | (m_screenptr[y][(x >> 3) + 1] << 8) | (m_screenptr[y][(x >> 3) + 2])) >> (8 - (x & 7));
}
void vic3_device::set_interrupt( int mask )
@@ -443,7 +442,7 @@ void vic3_device::draw_character( int ybegin, int yend, int ch, int yoff, int xo
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read(m_chargenaddr + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = code;
+ m_screenptr[y + yoff][xoff >> 3] = code;
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = color[code >> 7];
if ((xoff + 1 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = color[(code >> 6) & 1];
if ((xoff + 2 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = color[(code >> 5) & 1];
@@ -462,7 +461,7 @@ void vic3_device::draw_character_multi( int ybegin, int yend, int ch, int yoff,
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read(m_chargenaddr + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = m_foreground[code];
+ m_screenptr[y + yoff][xoff >> 3] = m_foreground[code];
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_multi[code >> 6];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_multi[code >> 6];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_multi[(code >> 4) & 3];
@@ -481,7 +480,7 @@ void vic3_device::draw_bitmap( int ybegin, int yend, int ch, int yoff, int xoff,
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read((m_chargenaddr & 0x2000) + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = code;
+ m_screenptr[y + yoff][xoff >> 3] = code;
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_c64_bitmap[code >> 7];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_c64_bitmap[(code >> 6) & 1];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_c64_bitmap[(code >> 5) & 1];
@@ -500,7 +499,7 @@ void vic3_device::draw_bitmap_multi( int ybegin, int yend, int ch, int yoff, int
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read((m_chargenaddr & 0x2000) + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = m_foreground[code];
+ m_screenptr[y + yoff][xoff >> 3] = m_foreground[code];
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_bitmapmulti[code >> 6];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_bitmapmulti[code >> 6];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_bitmapmulti[(code >> 4) & 3];
@@ -1885,7 +1884,7 @@ void vic3_device::draw_bitplanes()
{
int x, y, y1s, offset;
rectangle vis;
- const rectangle &visarea = m_main_screen->visible_area();
+ const rectangle &visarea = m_screen->visible_area();
if (VIC3_LINES == 400)
{ /* interlaced! */
@@ -1989,13 +1988,13 @@ void vic3_device::raster_interrupt_gen()
m_rows = new_rows;
m_columns = new_columns;
if (m_type == VIC4567_PAL)
- m_main_screen->set_visible_area(
+ m_screen->set_visible_area(
VIC2_STARTVISIBLECOLUMNS + 32,
VIC2_STARTVISIBLECOLUMNS + 32 + m_columns + 16 - 1,
VIC2_STARTVISIBLELINES + 34,
VIC2_STARTVISIBLELINES + 34 + m_rows + 16 - 1);
else
- m_main_screen->set_visible_area(
+ m_screen->set_visible_area(
VIC2_STARTVISIBLECOLUMNS + 34,
VIC2_STARTVISIBLECOLUMNS + 34 + m_columns + 16 - 1,
VIC2_STARTVISIBLELINES + 10,
diff --git a/src/mess/video/vic4567.h b/src/mess/video/vic4567.h
index 0f32ff35f64..350a11b1d15 100644
--- a/src/mess/video/vic4567.h
+++ b/src/mess/video/vic4567.h
@@ -20,7 +20,6 @@ enum vic3_type
struct vic3_interface
{
- const char *screen_tag;
const char *cpu_tag;
vic3_type vic_type;
@@ -140,6 +139,7 @@ struct vic3_sprite
***************************************************************************/
class vic3_device : public device_t,
+ public device_video_interface,
public vic3_interface
{
public:
@@ -185,8 +185,6 @@ private:
vic3_type m_type;
- screen_device *m_main_screen; // screen which sets bitmap properties
-
device_t *m_cpu;
UINT8 m_reg[0x80];
@@ -208,7 +206,7 @@ private:
int m_columns, m_rows;
/* background/foreground for sprite collision */
- UINT8 *m_screen[216], m_shift[216];
+ UINT8 *m_screenptr[216], m_shift[216];
/* convert multicolor byte to background/foreground for sprite collision */
UINT8 m_foreground[256];
diff --git a/src/mess/video/vtvideo.c b/src/mess/video/vtvideo.c
index cc52a033359..d9dca7cd32d 100644
--- a/src/mess/video/vtvideo.c
+++ b/src/mess/video/vtvideo.c
@@ -27,13 +27,15 @@ const device_type RAINBOW_VIDEO = &device_creator<rainbow_video_device>;
vt100_video_device::vt100_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this)
{
}
vt100_video_device::vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, VT100_VIDEO, "VT100 Video", tag, owner, clock, "vt100_video", __FILE__)
+ : device_t(mconfig, VT100_VIDEO, "VT100 Video", tag, owner, clock, "vt100_video", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -62,7 +64,6 @@ void vt100_video_device::device_config_complete()
{
memset(&m_in_ram_cb, 0, sizeof(m_in_ram_cb));
memset(&m_clear_video_cb, 0, sizeof(m_clear_video_cb));
- m_screen_tag = "";
m_char_rom_tag = "";
}
}
@@ -77,10 +78,6 @@ void vt100_video_device::device_start()
m_in_ram_func.resolve(m_in_ram_cb, *this);
m_clear_video_interrupt.resolve(m_clear_video_cb, *this);
- /* get the screen device */
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
-
m_gfx = machine().root_device().memregion(m_char_rom_tag)->base();
assert(m_gfx != NULL);
diff --git a/src/mess/video/vtvideo.h b/src/mess/video/vtvideo.h
index 678697a2074..df6ac5cf8d2 100644
--- a/src/mess/video/vtvideo.h
+++ b/src/mess/video/vtvideo.h
@@ -17,7 +17,6 @@
struct vt_video_interface
{
- const char *m_screen_tag; /* screen we are acting on */
const char *m_char_rom_tag; /* character rom region */
/* this gets called for every memory read */
@@ -27,6 +26,7 @@ struct vt_video_interface
class vt100_video_device : public device_t,
+ public device_video_interface,
public vt_video_interface
{
public:
@@ -55,7 +55,6 @@ protected:
devcb_resolved_read8 m_in_ram_func;
devcb_resolved_write8 m_clear_video_interrupt;
- screen_device *m_screen; /* screen */
UINT8 *m_gfx; /* content of char rom */
int m_lba7;
diff --git a/src/mess/video/zx8301.c b/src/mess/video/zx8301.c
index f8075eb6d32..13a10579d38 100644
--- a/src/mess/video/zx8301.c
+++ b/src/mess/video/zx8301.c
@@ -129,6 +129,7 @@ inline void zx8301_device::writebyte(offs_t address, UINT8 data)
zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ZX8301, "Sinclair ZX8301", tag, owner, clock, "zx8301", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(zx8301)),
m_dispoff(1),
m_mode8(0),
@@ -150,10 +151,6 @@ void zx8301_device::device_start()
m_cpu = machine().device<cpu_device>(cpu_tag);
assert(m_cpu != NULL);
- // get the screen device
- m_screen = machine().device<screen_device>(screen_tag);
- assert(m_screen != NULL);
-
// resolve callbacks
m_out_vsync_func.resolve(out_vsync_cb, *this);
diff --git a/src/mess/video/zx8301.h b/src/mess/video/zx8301.h
index 577fa7ada7c..3fb94c70238 100644
--- a/src/mess/video/zx8301.h
+++ b/src/mess/video/zx8301.h
@@ -76,6 +76,7 @@ struct zx8301_interface
class zx8301_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public zx8301_interface
{
public:
@@ -113,7 +114,6 @@ private:
devcb_resolved_write_line m_out_vsync_func;
cpu_device *m_cpu;
- screen_device *m_screen;
//address_space *m_data;
int m_dispoff; // display off