summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2014-05-06 17:37:43 +0000
committer Ivan Vangelista <mesgnet@yahoo.it>2014-05-06 17:37:43 +0000
commitda1252459f7578b481e8be16cc701c185e44fc73 (patch)
tree3c83f920691467be40ee9a63801dd1ab6a4224d4
parentc407543c9f5ff650f92ab736c0018f2185db7b21 (diff)
ay8910_device and extended family: converted to devcb2 (nw)
This is easily the commit I ever did that touches the most drivers. I payed extra attention while doing it, stared at the diff really hard to find any errors and did some testing. Obviously I can't test every single game / system, so please report any regression you might find.
-rw-r--r--src/emu/bus/a2bus/a2arcadebd.c8
-rw-r--r--src/emu/bus/a2bus/a2mockingboard.c15
-rw-r--r--src/emu/bus/nes/sunsoft.c12
-rw-r--r--src/emu/sound/2203intf.c24
-rw-r--r--src/emu/sound/2203intf.h7
-rw-r--r--src/emu/sound/2608intf.c23
-rw-r--r--src/emu/sound/2608intf.h6
-rw-r--r--src/emu/sound/2610intf.c17
-rw-r--r--src/emu/sound/2610intf.h1
-rw-r--r--src/emu/sound/ay8910.c83
-rw-r--r--src/emu/sound/ay8910.h54
-rw-r--r--src/mame/audio/cclimber.c12
-rw-r--r--src/mame/audio/cinemat.c31
-rw-r--r--src/mame/audio/irem.c38
-rw-r--r--src/mame/audio/mario.c18
-rw-r--r--src/mame/audio/midway.c36
-rw-r--r--src/mame/audio/redalert.c29
-rw-r--r--src/mame/audio/scramble.c25
-rw-r--r--src/mame/audio/seibu.c9
-rw-r--r--src/mame/audio/seibu.h3
-rw-r--r--src/mame/audio/timeplt.c22
-rw-r--r--src/mame/drivers/1942.c16
-rw-r--r--src/mame/drivers/2mindril.c1
-rw-r--r--src/mame/drivers/40love.c16
-rw-r--r--src/mame/drivers/4enlinea.c25
-rw-r--r--src/mame/drivers/4roses.c16
-rw-r--r--src/mame/drivers/5clown.c16
-rw-r--r--src/mame/drivers/aces1.c16
-rw-r--r--src/mame/drivers/adp.c11
-rw-r--r--src/mame/drivers/aeroboto.c15
-rw-r--r--src/mame/drivers/aerofgt.c6
-rw-r--r--src/mame/drivers/airbustr.c14
-rw-r--r--src/mame/drivers/albazc.c14
-rw-r--r--src/mame/drivers/albazg.c14
-rw-r--r--src/mame/drivers/alpha68k.c31
-rw-r--r--src/mame/drivers/ambush.c31
-rw-r--r--src/mame/drivers/ampoker2.c14
-rw-r--r--src/mame/drivers/angelkds.c8
-rw-r--r--src/mame/drivers/arabian.c22
-rw-r--r--src/mame/drivers/argus.c11
-rw-r--r--src/mame/drivers/aristmk4.c26
-rw-r--r--src/mame/drivers/arkanoid.c35
-rw-r--r--src/mame/drivers/ashnojoe.c13
-rw-r--r--src/mame/drivers/astrocde.c13
-rw-r--r--src/mame/drivers/asuka.c1
-rw-r--r--src/mame/drivers/avt.c17
-rw-r--r--src/mame/drivers/bagman.c46
-rw-r--r--src/mame/drivers/battlex.c11
-rw-r--r--src/mame/drivers/bbusters.c10
-rw-r--r--src/mame/drivers/big10.c19
-rw-r--r--src/mame/drivers/bking.c13
-rw-r--r--src/mame/drivers/bladestl.c14
-rw-r--r--src/mame/drivers/blktiger.c8
-rw-r--r--src/mame/drivers/blueprnt.c33
-rw-r--r--src/mame/drivers/bmcbowl.c15
-rw-r--r--src/mame/drivers/bogeyman.c12
-rw-r--r--src/mame/drivers/btime.c25
-rw-r--r--src/mame/drivers/bublbobl.c11
-rw-r--r--src/mame/drivers/buggychl.c28
-rw-r--r--src/mame/drivers/calomega.c45
-rw-r--r--src/mame/drivers/capbowl.c20
-rw-r--r--src/mame/drivers/carrera.c15
-rw-r--r--src/mame/drivers/caswin.c13
-rw-r--r--src/mame/drivers/cave.c10
-rw-r--r--src/mame/drivers/cb2001.c13
-rw-r--r--src/mame/drivers/cchance.c13
-rw-r--r--src/mame/drivers/centiped.c12
-rw-r--r--src/mame/drivers/chaknpop.c27
-rw-r--r--src/mame/drivers/chanbara.c17
-rw-r--r--src/mame/drivers/changela.c28
-rw-r--r--src/mame/drivers/chinagat.c10
-rw-r--r--src/mame/drivers/chinsan.c16
-rw-r--r--src/mame/drivers/citycon.c17
-rw-r--r--src/mame/drivers/cntsteer.c12
-rw-r--r--src/mame/drivers/coinmstr.c14
-rw-r--r--src/mame/drivers/combatsc.c23
-rw-r--r--src/mame/drivers/compgolf.c14
-rw-r--r--src/mame/drivers/corona.c17
-rw-r--r--src/mame/drivers/crshrace.c1
-rw-r--r--src/mame/drivers/darius.c27
-rw-r--r--src/mame/drivers/ddayjlc.c12
-rw-r--r--src/mame/drivers/ddenlovr.c67
-rw-r--r--src/mame/drivers/ddribble.c14
-rw-r--r--src/mame/drivers/dfruit.c12
-rw-r--r--src/mame/drivers/dlair.c20
-rw-r--r--src/mame/drivers/dominob.c13
-rw-r--r--src/mame/drivers/dooyong.c22
-rw-r--r--src/mame/drivers/dunhuang.c14
-rw-r--r--src/mame/drivers/dwarfd.c14
-rw-r--r--src/mame/drivers/dynax.c61
-rw-r--r--src/mame/drivers/enigma2.c20
-rw-r--r--src/mame/drivers/equites.c14
-rw-r--r--src/mame/drivers/ettrivia.c25
-rw-r--r--src/mame/drivers/exerion.c22
-rw-r--r--src/mame/drivers/f1gp.c1
-rw-r--r--src/mame/drivers/fireball.c16
-rw-r--r--src/mame/drivers/flipjack.c24
-rw-r--r--src/mame/drivers/flstory.c22
-rw-r--r--src/mame/drivers/forte2.c14
-rw-r--r--src/mame/drivers/fortecar.c15
-rw-r--r--src/mame/drivers/fromanc2.c3
-rw-r--r--src/mame/drivers/funkybee.c13
-rw-r--r--src/mame/drivers/funworld.c35
-rw-r--r--src/mame/drivers/gaiden.c9
-rw-r--r--src/mame/drivers/galaxian.c106
-rw-r--r--src/mame/drivers/galaxold.c13
-rw-r--r--src/mame/drivers/gameplan.c13
-rw-r--r--src/mame/drivers/gladiatr.c27
-rw-r--r--src/mame/drivers/gluck2.c26
-rw-r--r--src/mame/drivers/goal92.c8
-rw-r--r--src/mame/drivers/goldngam.c11
-rw-r--r--src/mame/drivers/goldnpkr.c17
-rw-r--r--src/mame/drivers/goldstar.c131
-rw-r--r--src/mame/drivers/grchamp.c35
-rw-r--r--src/mame/drivers/gstriker.c2
-rw-r--r--src/mame/drivers/gsword.c15
-rw-r--r--src/mame/drivers/gundealr.c11
-rw-r--r--src/mame/drivers/gyruss.c69
-rw-r--r--src/mame/drivers/halleys.c13
-rw-r--r--src/mame/drivers/hanaawas.c14
-rw-r--r--src/mame/drivers/hitpoker.c14
-rw-r--r--src/mame/drivers/hnayayoi.c15
-rw-r--r--src/mame/drivers/holeland.c35
-rw-r--r--src/mame/drivers/homedata.c15
-rw-r--r--src/mame/drivers/homerun.c14
-rw-r--r--src/mame/drivers/hotblock.c14
-rw-r--r--src/mame/drivers/hyhoo.c15
-rw-r--r--src/mame/drivers/icecold.c27
-rw-r--r--src/mame/drivers/inufuku.c1
-rw-r--r--src/mame/drivers/ironhors.c28
-rw-r--r--src/mame/drivers/itech8.c22
-rw-r--r--src/mame/drivers/jack.c13
-rw-r--r--src/mame/drivers/jangou.c19
-rw-r--r--src/mame/drivers/jongkyo.c20
-rw-r--r--src/mame/drivers/jpms80.c13
-rw-r--r--src/mame/drivers/junofrst.c15
-rw-r--r--src/mame/drivers/kaneko16.c40
-rw-r--r--src/mame/drivers/kas89.c16
-rw-r--r--src/mame/drivers/kingdrby.c26
-rw-r--r--src/mame/drivers/kingobox.c11
-rw-r--r--src/mame/drivers/kingpin.c11
-rw-r--r--src/mame/drivers/kncljoe.c12
-rw-r--r--src/mame/drivers/koikoi.c18
-rw-r--r--src/mame/drivers/ksayakyu.c27
-rw-r--r--src/mame/drivers/kurukuru.c20
-rw-r--r--src/mame/drivers/kyugo.c20
-rw-r--r--src/mame/drivers/labyrunr.c27
-rw-r--r--src/mame/drivers/ladyfrog.c13
-rw-r--r--src/mame/drivers/laserbat.c13
-rw-r--r--src/mame/drivers/lastduel.c9
-rw-r--r--src/mame/drivers/leland.c21
-rw-r--r--src/mame/drivers/lkage.c9
-rw-r--r--src/mame/drivers/lockon.c14
-rw-r--r--src/mame/drivers/looping.c19
-rw-r--r--src/mame/drivers/lsasquad.c18
-rw-r--r--src/mame/drivers/lucky74.c20
-rw-r--r--src/mame/drivers/lvcards.c14
-rw-r--r--src/mame/drivers/madalien.c14
-rw-r--r--src/mame/drivers/magmax.c14
-rw-r--r--src/mame/drivers/maygay1b.c14
-rw-r--r--src/mame/drivers/mayumi.c19
-rw-r--r--src/mame/drivers/mazerbla.c25
-rw-r--r--src/mame/drivers/mcatadv.c1
-rw-r--r--src/mame/drivers/megasys1.c9
-rw-r--r--src/mame/drivers/megazone.c17
-rw-r--r--src/mame/drivers/meijinsn.c9
-rw-r--r--src/mame/drivers/merit.c10
-rw-r--r--src/mame/drivers/meritm.c13
-rw-r--r--src/mame/drivers/metro.c2
-rw-r--r--src/mame/drivers/mexico86.c21
-rw-r--r--src/mame/drivers/miniboy7.c17
-rw-r--r--src/mame/drivers/mjsister.c19
-rw-r--r--src/mame/drivers/momoko.c12
-rw-r--r--src/mame/drivers/mosaic.c16
-rw-r--r--src/mame/drivers/mpu12wbk.c17
-rw-r--r--src/mame/drivers/mpu4dealem.c3
-rw-r--r--src/mame/drivers/mpu4hw.c14
-rw-r--r--src/mame/drivers/mrflea.c28
-rw-r--r--src/mame/drivers/multfish.c12
-rw-r--r--src/mame/drivers/nbmj8688.c17
-rw-r--r--src/mame/drivers/nbmj8891.c21
-rw-r--r--src/mame/drivers/nbmj8991.c14
-rw-r--r--src/mame/drivers/nemesis.c50
-rw-r--r--src/mame/drivers/neogeo.c1
-rw-r--r--src/mame/drivers/neoprint.c2
-rw-r--r--src/mame/drivers/nightgal.c17
-rw-r--r--src/mame/drivers/ninjakd2.c9
-rw-r--r--src/mame/drivers/ninjaw.c2
-rw-r--r--src/mame/drivers/nmk16.c22
-rw-r--r--src/mame/drivers/nova2001.c73
-rw-r--r--src/mame/drivers/nycaptor.c28
-rw-r--r--src/mame/drivers/nyny.c30
-rw-r--r--src/mame/drivers/ojankohs.c38
-rw-r--r--src/mame/drivers/othunder.c1
-rw-r--r--src/mame/drivers/pacman.c11
-rw-r--r--src/mame/drivers/pandoras.c13
-rw-r--r--src/mame/drivers/pastelg.c16
-rw-r--r--src/mame/drivers/pengadvb.c13
-rw-r--r--src/mame/drivers/phoenix.c14
-rw-r--r--src/mame/drivers/pipedrm.c13
-rw-r--r--src/mame/drivers/pipeline.c8
-rw-r--r--src/mame/drivers/pitnrun.c16
-rw-r--r--src/mame/drivers/pkscram.c8
-rw-r--r--src/mame/drivers/poker72.c13
-rw-r--r--src/mame/drivers/popeye.c28
-rw-r--r--src/mame/drivers/powerins.c8
-rw-r--r--src/mame/drivers/proconn.c12
-rw-r--r--src/mame/drivers/psikyo.c2
-rw-r--r--src/mame/drivers/psychic5.c9
-rw-r--r--src/mame/drivers/pushman.c10
-rw-r--r--src/mame/drivers/quizdna.c14
-rw-r--r--src/mame/drivers/r2dtank.c28
-rw-r--r--src/mame/drivers/re900.c35
-rw-r--r--src/mame/drivers/rgum.c11
-rw-r--r--src/mame/drivers/rmhaihai.c12
-rw-r--r--src/mame/drivers/route16.c14
-rw-r--r--src/mame/drivers/royalmah.c11
-rw-r--r--src/mame/drivers/sandscrp.c14
-rw-r--r--src/mame/drivers/sanremo.c16
-rw-r--r--src/mame/drivers/scobra.c28
-rw-r--r--src/mame/drivers/scramble.c53
-rw-r--r--src/mame/drivers/segahang.c14
-rw-r--r--src/mame/drivers/seicross.c14
-rw-r--r--src/mame/drivers/seta.c14
-rw-r--r--src/mame/drivers/sfkick.c8
-rw-r--r--src/mame/drivers/shangha3.c14
-rw-r--r--src/mame/drivers/shanghai.c28
-rw-r--r--src/mame/drivers/shangkid.c28
-rw-r--r--src/mame/drivers/shootout.c21
-rw-r--r--src/mame/drivers/sidearms.c9
-rw-r--r--src/mame/drivers/skylncr.c18
-rw-r--r--src/mame/drivers/slapfght.c40
-rw-r--r--src/mame/drivers/slapshot.c2
-rw-r--r--src/mame/drivers/slotcarn.c18
-rw-r--r--src/mame/drivers/sothello.c13
-rw-r--r--src/mame/drivers/speedatk.c13
-rw-r--r--src/mame/drivers/splash.c9
-rw-r--r--src/mame/drivers/srmp2.c20
-rw-r--r--src/mame/drivers/sshangha.c8
-rw-r--r--src/mame/drivers/ssrj.c13
-rw-r--r--src/mame/drivers/stuntair.c26
-rw-r--r--src/mame/drivers/suna16.c10
-rw-r--r--src/mame/drivers/suna8.c42
-rw-r--r--src/mame/drivers/supdrapo.c14
-rw-r--r--src/mame/drivers/superqix.c79
-rw-r--r--src/mame/drivers/superwng.c23
-rw-r--r--src/mame/drivers/suprgolf.c15
-rw-r--r--src/mame/drivers/suprridr.c21
-rw-r--r--src/mame/drivers/suprslam.c1
-rw-r--r--src/mame/drivers/tail2nos.c14
-rw-r--r--src/mame/drivers/taito_b.c27
-rw-r--r--src/mame/drivers/taito_f2.c14
-rw-r--r--src/mame/drivers/taito_h.c3
-rw-r--r--src/mame/drivers/taito_l.c39
-rw-r--r--src/mame/drivers/taito_o.c11
-rw-r--r--src/mame/drivers/taito_x.c3
-rw-r--r--src/mame/drivers/taito_z.c10
-rw-r--r--src/mame/drivers/taitoair.c1
-rw-r--r--src/mame/drivers/taitosj.c53
-rw-r--r--src/mame/drivers/tankbust.c13
-rw-r--r--src/mame/drivers/taotaido.c1
-rw-r--r--src/mame/drivers/taxidriv.c27
-rw-r--r--src/mame/drivers/tehkanwc.c28
-rw-r--r--src/mame/drivers/thedeep.c8
-rw-r--r--src/mame/drivers/thepit.c12
-rw-r--r--src/mame/drivers/tickee.c39
-rw-r--r--src/mame/drivers/tigeroad.c9
-rw-r--r--src/mame/drivers/timelimt.c12
-rw-r--r--src/mame/drivers/timeplt.c14
-rw-r--r--src/mame/drivers/tnzs.c58
-rw-r--r--src/mame/drivers/tonton.c35
-rw-r--r--src/mame/drivers/tubep.c56
-rw-r--r--src/mame/drivers/twins.c14
-rw-r--r--src/mame/drivers/tx1.c80
-rw-r--r--src/mame/drivers/vastar.c14
-rw-r--r--src/mame/drivers/vectrex.c15
-rw-r--r--src/mame/drivers/vega.c16
-rw-r--r--src/mame/drivers/videopkr.c14
-rw-r--r--src/mame/drivers/vigilant.c10
-rw-r--r--src/mame/drivers/volfied.c14
-rw-r--r--src/mame/drivers/vroulet.c15
-rw-r--r--src/mame/drivers/warriorb.c2
-rw-r--r--src/mame/drivers/wc90.c9
-rw-r--r--src/mame/drivers/wc90b.c8
-rw-r--r--src/mame/drivers/welltris.c1
-rw-r--r--src/mame/drivers/wgp.c1
-rw-r--r--src/mame/drivers/wink.c12
-rw-r--r--src/mame/drivers/witch.c26
-rw-r--r--src/mame/drivers/wyvernf0.c22
-rw-r--r--src/mame/drivers/xain.c8
-rw-r--r--src/mame/drivers/xxmissio.c26
-rw-r--r--src/mame/drivers/zaccaria.c13
-rw-r--r--src/mame/drivers/zn.c1
-rw-r--r--src/mame/includes/kaneko16.h8
-rw-r--r--src/mame/includes/mpu4.h2
-rw-r--r--src/mame/video/cidelsa.c13
-rw-r--r--src/mess/drivers/ace.c16
-rw-r--r--src/mess/drivers/amstrad.c25
-rw-r--r--src/mess/drivers/aquarius.c13
-rw-r--r--src/mess/drivers/atarist.c44
-rw-r--r--src/mess/drivers/attache.c11
-rw-r--r--src/mess/drivers/cgc7900.c18
-rw-r--r--src/mess/drivers/cgenie.c16
-rw-r--r--src/mess/drivers/dragon.c3
-rw-r--r--src/mess/drivers/einstein.c13
-rw-r--r--src/mess/drivers/fc100.c15
-rw-r--r--src/mess/drivers/fm7.c24
-rw-r--r--src/mess/drivers/galaxy.c8
-rw-r--r--src/mess/drivers/intv.c27
-rw-r--r--src/mess/drivers/lola8a.c13
-rw-r--r--src/mess/drivers/mc1000.c15
-rw-r--r--src/mess/drivers/microtan.c11
-rw-r--r--src/mess/drivers/msx.c28
-rw-r--r--src/mess/drivers/multi8.c13
-rw-r--r--src/mess/drivers/myvision.c17
-rw-r--r--src/mess/drivers/mz2500.c14
-rw-r--r--src/mess/drivers/oric.c15
-rw-r--r--src/mess/drivers/orion.c8
-rw-r--r--src/mess/drivers/pc6001.c15
-rw-r--r--src/mess/drivers/pc8801.c28
-rw-r--r--src/mess/drivers/pc88va.c12
-rw-r--r--src/mess/drivers/pc9801.c4
-rw-r--r--src/mess/drivers/phc25.c15
-rw-r--r--src/mess/drivers/rmnimbus.c16
-rw-r--r--src/mess/drivers/sbc6510.c15
-rw-r--r--src/mess/drivers/spc1000.c12
-rw-r--r--src/mess/drivers/spec128.c8
-rw-r--r--src/mess/drivers/sv8000.c17
-rw-r--r--src/mess/drivers/svi318.c16
-rw-r--r--src/mess/drivers/tiki100.c13
-rw-r--r--src/mess/drivers/timex.c8
-rw-r--r--src/mess/drivers/votrpss.c13
-rw-r--r--src/mess/drivers/x1.c20
-rw-r--r--src/mess/drivers/x1twin.c14
-rw-r--r--src/mess/includes/dgnalpha.h9
-rw-r--r--src/mess/machine/dgnalpha.c19
-rw-r--r--src/mess/machine/pc9801_118.c15
-rw-r--r--src/mess/machine/pc9801_26.c15
-rw-r--r--src/mess/machine/pc9801_86.c15
339 files changed, 1076 insertions, 5152 deletions
diff --git a/src/emu/bus/a2bus/a2arcadebd.c b/src/emu/bus/a2bus/a2arcadebd.c
index bb72e77435d..04c6ee7a832 100644
--- a/src/emu/bus/a2bus/a2arcadebd.c
+++ b/src/emu/bus/a2bus/a2arcadebd.c
@@ -29,13 +29,6 @@
const device_type A2BUS_ARCADEBOARD = &device_creator<a2bus_arcboard_device>;
-static const ay8910_interface arcadeboard_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
MACHINE_CONFIG_FRAGMENT( arcadeboard )
MCFG_DEVICE_ADD( TMS_TAG, TMS9918A, XTAL_10_738635MHz / 2 )
MCFG_TMS9928A_VRAM_SIZE(0x4000) // 16k of VRAM
@@ -45,7 +38,6 @@ MACHINE_CONFIG_FRAGMENT( arcadeboard )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY_TAG, AY8910, 1022727)
- MCFG_SOUND_CONFIG(arcadeboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/emu/bus/a2bus/a2mockingboard.c b/src/emu/bus/a2bus/a2mockingboard.c
index 7d894d8d282..2e0d607cb9c 100644
--- a/src/emu/bus/a2bus/a2mockingboard.c
+++ b/src/emu/bus/a2bus/a2mockingboard.c
@@ -31,13 +31,6 @@ const device_type A2BUS_MOCKINGBOARD = &device_creator<a2bus_mockingboard_device
const device_type A2BUS_PHASOR = &device_creator<a2bus_phasor_device>;
const device_type A2BUS_ECHOPLUS = &device_creator<a2bus_echoplus_device>;
-static const ay8910_interface mockingboard_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
MACHINE_CONFIG_FRAGMENT( mockingboard )
MCFG_DEVICE_ADD(VIA1_TAG, VIA6522, 1022727)
MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(a2bus_ayboard_device, via1_out_a))
@@ -51,10 +44,8 @@ MACHINE_CONFIG_FRAGMENT( mockingboard )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -72,16 +63,12 @@ MACHINE_CONFIG_FRAGMENT( phasor )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker2", "rspeaker2")
MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker2", 1.0)
MCFG_SOUND_ADD(AY3_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD(AY4_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker2", 1.0)
MACHINE_CONFIG_END
@@ -98,10 +85,8 @@ MACHINE_CONFIG_FRAGMENT( echoplus )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SPEAKER_STANDARD_MONO("echosp")
diff --git a/src/emu/bus/nes/sunsoft.c b/src/emu/bus/nes/sunsoft.c
index 33d0d0803e7..90b96bb4960 100644
--- a/src/emu/bus/nes/sunsoft.c
+++ b/src/emu/bus/nes/sunsoft.c
@@ -596,17 +596,6 @@ WRITE8_MEMBER(nes_sunsoft_5_device::write_h)
}
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
//-------------------------------------------------
// MACHINE_DRIVER( sun_5b )
//-------------------------------------------------
@@ -626,7 +615,6 @@ static MACHINE_CONFIG_FRAGMENT( sun_5b )
MCFG_SPEAKER_STANDARD_MONO("addon")
MCFG_SOUND_ADD("ay", YM2149, SUN5_NTSC_CLOCK/2) // divide by 2 for the internal divider
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 0.50)
MACHINE_CONFIG_END
diff --git a/src/emu/sound/2203intf.c b/src/emu/sound/2203intf.c
index ff535762d49..559255f0c68 100644
--- a/src/emu/sound/2203intf.c
+++ b/src/emu/sound/2203intf.c
@@ -188,28 +188,6 @@ const device_type YM2203 = &device_creator<ym2203_device>;
ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ay8910_device(mconfig, YM2203, "YM2203", tag, owner, clock, "ym2203", __FILE__),
- m_irq_handler(*this),
- m_ay8910_config(NULL)
+ m_irq_handler(*this)
{
}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ym2203_device::device_config_complete()
-{
- static const ay8910_interface default_ay8910_config =
- {
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
- };
-
- if (m_ay8910_config != NULL)
- device_t::static_set_static_config(*this, m_ay8910_config);
- else
- device_t::static_set_static_config(*this, &(default_ay8910_config));
-}
diff --git a/src/emu/sound/2203intf.h b/src/emu/sound/2203intf.h
index c1e96ff0663..5918ac5a1d1 100644
--- a/src/emu/sound/2203intf.h
+++ b/src/emu/sound/2203intf.h
@@ -11,9 +11,6 @@ void ym2203_update_request(void *param);
#define MCFG_YM2203_IRQ_HANDLER(_devcb) \
devcb = &ym2203_device::set_irq_handler(*device, DEVCB2_##_devcb);
-#define MCFG_YM2203_AY8910_INTF(_ay8910_config) \
- ym2203_device::set_ay8910_config(*device, _ay8910_config);
-
class ym2203_device : public ay8910_device
{
public:
@@ -21,7 +18,6 @@ public:
// static configuration helpers
template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym2203_device &>(device).m_irq_handler.set_callback(object); }
- static void set_ay8910_config(device_t &device, const ay8910_interface *ay8910_config) { downcast<ym2203_device &>(device).m_ay8910_config = ay8910_config; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -34,9 +30,9 @@ public:
void _IRQHandler(int irq);
void _timer_handler(int c,int count,int clock);
void _ym2203_update_request();
+
protected:
// device-level overrides
- virtual void device_config_complete();
virtual void device_start();
virtual void device_post_load();
virtual void device_stop();
@@ -50,7 +46,6 @@ private:
emu_timer * m_timer[2];
void * m_chip;
devcb2_write_line m_irq_handler;
- const ay8910_interface *m_ay8910_config;
};
extern const device_type YM2203;
diff --git a/src/emu/sound/2608intf.c b/src/emu/sound/2608intf.c
index 5bf34e76a67..203961d20e9 100644
--- a/src/emu/sound/2608intf.c
+++ b/src/emu/sound/2608intf.c
@@ -187,31 +187,10 @@ const device_type YM2608 = &device_creator<ym2608_device>;
ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ay8910_device(mconfig, YM2608, "YM2608", tag, owner, clock, "ym2608", __FILE__),
- m_irq_handler(*this),
- m_ay8910_config(NULL)
+ m_irq_handler(*this)
{
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ym2608_device::device_config_complete()
-{
- static const ay8910_interface default_ay8910_config =
- {
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
- };
- if (m_ay8910_config != NULL)
- device_t::static_set_static_config(*this, m_ay8910_config);
- else
- device_t::static_set_static_config(*this, &(default_ay8910_config));
-}
-
ROM_START( ym2608 )
ROM_REGION( 0x2000, "ym2608", 0 )
/*
diff --git a/src/emu/sound/2608intf.h b/src/emu/sound/2608intf.h
index a07b435cf58..7638eebbb58 100644
--- a/src/emu/sound/2608intf.h
+++ b/src/emu/sound/2608intf.h
@@ -11,9 +11,6 @@ void ym2608_update_request(void *param);
#define MCFG_YM2608_IRQ_HANDLER(_devcb) \
devcb = &ym2608_device::set_irq_handler(*device, DEVCB2_##_devcb);
-#define MCFG_YM2608_AY8910_INTF(_ay8910_config) \
- ym2608_device::set_ay8910_config(*device, _ay8910_config);
-
class ym2608_device : public ay8910_device
{
public:
@@ -21,7 +18,6 @@ public:
// static configuration helpers
template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym2608_device &>(device).m_irq_handler.set_callback(object); }
- static void set_ay8910_config(device_t &device, const ay8910_interface *ay8910_config) { downcast<ym2608_device &>(device).m_ay8910_config = ay8910_config; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -33,7 +29,6 @@ public:
protected:
// device-level overrides
virtual const rom_entry *device_rom_region() const;
- virtual void device_config_complete();
virtual void device_start();
virtual void device_post_load();
virtual void device_stop();
@@ -48,7 +43,6 @@ private:
emu_timer * m_timer[2];
void * m_chip;
devcb2_write_line m_irq_handler;
- const ay8910_interface *m_ay8910_config;
};
extern const device_type YM2608;
diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c
index 1b022f4f221..9404659f99d 100644
--- a/src/emu/sound/2610intf.c
+++ b/src/emu/sound/2610intf.c
@@ -216,23 +216,6 @@ ym2610_device::ym2610_device(const machine_config &mconfig, device_type type, co
{
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ym2610_device::device_config_complete()
-{
- static const ay8910_interface generic_ay8910 =
- {
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
- };
- device_t::static_set_static_config(*this, &(generic_ay8910));
-}
-
const device_type YM2610B = &device_creator<ym2610b_device>;
ym2610b_device::ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/emu/sound/2610intf.h b/src/emu/sound/2610intf.h
index 8c9acc563d0..8e72d06e53d 100644
--- a/src/emu/sound/2610intf.h
+++ b/src/emu/sound/2610intf.h
@@ -29,7 +29,6 @@ public:
protected:
// device-level overrides
- virtual void device_config_complete();
virtual void device_start();
virtual void device_post_load();
virtual void device_stop();
diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c
index 8804c199f97..d59c3aa137f 100644
--- a/src/emu/sound/ay8910.c
+++ b/src/emu/sound/ay8910.c
@@ -453,14 +453,14 @@ void ay8910_device::ay8910_write_reg(int r, int v)
((m_last_enable & 0x40) != (m_regs[AY_ENABLE] & 0x40)))
{
/* write out 0xff if port set to input */
- m_portAwrite(0, (m_regs[AY_ENABLE] & 0x40) ? m_regs[AY_PORTA] : 0xff);
+ m_port_a_write_cb((offs_t)0, (m_regs[AY_ENABLE] & 0x40) ? m_regs[AY_PORTA] : 0xff);
}
if ((m_last_enable == -1) ||
((m_last_enable & 0x80) != (m_regs[AY_ENABLE] & 0x80)))
{
/* write out 0xff if port set to input */
- m_portBwrite(0, (m_regs[AY_ENABLE] & 0x80) ? m_regs[AY_PORTB] : 0xff);
+ m_port_b_write_cb((offs_t)0, (m_regs[AY_ENABLE] & 0x80) ? m_regs[AY_PORTB] : 0xff);
}
m_last_enable = m_regs[AY_ENABLE];
break;
@@ -488,8 +488,8 @@ void ay8910_device::ay8910_write_reg(int r, int v)
case AY_PORTA:
if (m_regs[AY_ENABLE] & 0x40)
{
- if (!m_portAwrite.isnull())
- m_portAwrite(0, m_regs[AY_PORTA]);
+ if (!m_port_a_write_cb.isnull())
+ m_port_a_write_cb((offs_t)0, m_regs[AY_PORTA]);
else
logerror("warning - write %02x to 8910 '%s' Port A\n",m_regs[AY_PORTA],tag());
}
@@ -501,8 +501,8 @@ void ay8910_device::ay8910_write_reg(int r, int v)
case AY_PORTB:
if (m_regs[AY_ENABLE] & 0x80)
{
- if (!m_portBwrite.isnull())
- m_portBwrite(0, m_regs[AY_PORTB]);
+ if (!m_port_b_write_cb.isnull())
+ m_port_b_write_cb((offs_t)0, m_regs[AY_PORTB]);
else
logerror("warning - write %02x to 8910 '%s' Port B\n",m_regs[AY_PORTB],tag());
}
@@ -656,13 +656,13 @@ void ay8910_device::build_mixer_table()
int normalize = 0;
int chan;
- if ((m_intf->flags & AY8910_LEGACY_OUTPUT) != 0)
+ if ((m_flags & AY8910_LEGACY_OUTPUT) != 0)
{
logerror("AY-3-8910/YM2149 using legacy output levels!\n");
normalize = 1;
}
- if ((m_intf->flags & AY8910_RESISTOR_OUTPUT) != 0)
+ if ((m_flags & AY8910_RESISTOR_OUTPUT) != 0)
{
for (chan=0; chan < AY8910_NUM_CHANNELS; chan++)
{
@@ -674,15 +674,15 @@ void ay8910_device::build_mixer_table()
{
for (chan=0; chan < AY8910_NUM_CHANNELS; chan++)
{
- build_single_table(m_intf->res_load[chan], m_par, normalize, m_vol_table[chan], m_zero_is_off);
- build_single_table(m_intf->res_load[chan], m_par_env, normalize, m_env_table[chan], 0);
+ build_single_table(m_res_load[chan], m_par, normalize, m_vol_table[chan], m_zero_is_off);
+ build_single_table(m_res_load[chan], m_par_env, normalize, m_env_table[chan], 0);
}
}
/*
* The previous implementation added all three channels up instead of averaging them.
* The factor of 3 will force the same levels if normalizing is used.
*/
- build_3D_table(m_intf->res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table);
+ build_3D_table(m_res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table);
}
void ay8910_device::ay8910_statesave()
@@ -717,24 +717,12 @@ void ay8910_device::device_start()
device_type chip_type = type();
int master_clock = clock();
- m_intf = (const ay8910_interface *) static_config();
+ m_port_a_read_cb.resolve_safe(0);
+ m_port_b_read_cb.resolve_safe(0);
+ m_port_a_write_cb.resolve_safe();
+ m_port_b_write_cb.resolve_safe();
- static const ay8910_interface default_ay8910_config =
- {
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
- };
-
- if (m_intf==NULL)
- m_intf = &default_ay8910_config;
-
- m_portAread.resolve(m_intf->portAread, *this);
- m_portBread.resolve(m_intf->portBread, *this);
- m_portAwrite.resolve(m_intf->portAwrite, *this);
- m_portBwrite.resolve(m_intf->portBwrite, *this);
-
- if ((m_intf->flags & AY8910_SINGLE_OUTPUT) != 0)
+ if ((m_flags & AY8910_SINGLE_OUTPUT) != 0)
{
logerror("AY-3-8910/YM2149 using single output!\n");
m_streams = 1;
@@ -760,7 +748,7 @@ void ay8910_device::device_start()
m_env_step_mask = 0x1F;
/* YM2149 master clock divider? */
- if (m_intf->flags & YM2149_PIN26_LOW)
+ if (m_flags & YM2149_PIN26_LOW)
master_clock /= 2;
}
@@ -867,16 +855,16 @@ int ay8910_device::ay8910_read_ym()
even if the port is set as output, we still need to return the external
data. Some games, like kidniki, need this to work.
*/
- if (!m_portAread.isnull())
- m_regs[AY_PORTA] = m_portAread(0);
+ if (!m_port_a_read_cb.isnull())
+ m_regs[AY_PORTA] = m_port_a_read_cb(0);
else
logerror("%s: warning - read 8910 '%s' Port A\n",machine().describe_context(),tag());
break;
case AY_PORTB:
if ((m_regs[AY_ENABLE] & 0x80) != 0)
logerror("warning: read from 8910 '%s' Port B set as output\n",tag());
- if (!m_portBread.isnull())
- m_regs[AY_PORTB] = m_portBread(0);
+ if (!m_port_b_read_cb.isnull())
+ m_regs[AY_PORTB] = m_port_b_read_cb(0);
else
logerror("%s: warning - read 8910 '%s' Port B\n",machine().describe_context(),tag());
break;
@@ -985,7 +973,6 @@ ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, dev
m_streams(0),
m_ready(0),
m_channel(NULL),
- m_intf(NULL),
m_register_latch(0),
m_last_enable(0),
m_prescale_noise(0),
@@ -1002,7 +989,12 @@ ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, dev
m_step(0),
m_zero_is_off(0),
m_par(NULL),
- m_par_env(NULL)
+ m_par_env(NULL),
+ m_flags(AY8910_LEGACY_OUTPUT),
+ m_port_a_read_cb(*this),
+ m_port_b_read_cb(*this),
+ m_port_a_write_cb(*this),
+ m_port_b_write_cb(*this)
{
memset(&m_regs,0,sizeof(m_regs));
memset(&m_count,0,sizeof(m_count));
@@ -1011,6 +1003,7 @@ ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, dev
memset(&m_vol_table,0,sizeof(m_vol_table));
memset(&m_env_table,0,sizeof(m_env_table));
memset(&m_vol3d_table,0,sizeof(m_vol3d_table));
+ m_res_load[0] = m_res_load[1] = m_res_load[2] = 1000; //Default values for resistor loads
}
ay8910_device::ay8910_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)
@@ -1019,7 +1012,6 @@ ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, co
m_streams(0),
m_ready(0),
m_channel(NULL),
- m_intf(NULL),
m_register_latch(0),
m_last_enable(0),
m_prescale_noise(0),
@@ -1036,7 +1028,12 @@ ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, co
m_step(0),
m_zero_is_off(0),
m_par(NULL),
- m_par_env(NULL)
+ m_par_env(NULL),
+ m_flags(AY8910_LEGACY_OUTPUT),
+ m_port_a_read_cb(*this),
+ m_port_b_read_cb(*this),
+ m_port_a_write_cb(*this),
+ m_port_b_write_cb(*this)
{
memset(&m_regs,0,sizeof(m_regs));
memset(&m_count,0,sizeof(m_count));
@@ -1045,19 +1042,9 @@ ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, co
memset(&m_vol_table,0,sizeof(m_vol_table));
memset(&m_env_table,0,sizeof(m_env_table));
memset(&m_vol3d_table,0,sizeof(m_vol3d_table));
+ m_res_load[0] = m_res_load[1] = m_res_load[2] = 1000; //Default values for resistor loads
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ay8910_device::device_config_complete()
-{
-}
-
-
const device_type AY8912 = &device_creator<ay8912_device>;
ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/emu/sound/ay8910.h b/src/emu/sound/ay8910.h
index ebacaf2955d..b42b205e4b4 100644
--- a/src/emu/sound/ay8910.h
+++ b/src/emu/sound/ay8910.h
@@ -26,13 +26,6 @@ YMZ294: 0 I/O port
#define YM2149_INTERNAL_RESISTANCE (353)
/*
- * Default values for resistor loads.
- * The macro should be used in AY8910interface if
- * the real values are unknown.
- */
-#define AY8910_DEFAULT_LOADS {1000, 1000, 1000}
-
-/*
* The following is used by all drivers not reviewed yet.
* This will like the old behaviour, output between
* 0 and 7FFF
@@ -75,15 +68,24 @@ YMZ294: 0 I/O port
#define AY8910_NUM_CHANNELS 3
-struct ay8910_interface
-{
- int flags; /* Flags */
- int res_load[3]; /* Load on channel in ohms */
- devcb_read8 portAread;
- devcb_read8 portBread;
- devcb_write8 portAwrite;
- devcb_write8 portBwrite;
-};
+#define MCFG_AY8910_OUTPUT_TYPE(_flag) \
+ ay8910_device::set_flags(*device, _flag);
+
+#define MCFG_AY8910_RES_LOADS(_res0, _res1, _res2) \
+ ay8910_device::set_resistors_load(*device, _res0, _res1, _res2);
+
+#define MCFG_AY8910_PORT_A_READ_CB(_devcb) \
+ devcb = &ay8910_device::set_port_a_read_callback(*device, DEVCB2_##_devcb);
+
+#define MCFG_AY8910_PORT_B_READ_CB(_devcb) \
+ devcb = &ay8910_device::set_port_b_read_callback(*device, DEVCB2_##_devcb);
+
+#define MCFG_AY8910_PORT_A_WRITE_CB(_devcb) \
+ devcb = &ay8910_device::set_port_a_write_callback(*device, DEVCB2_##_devcb);
+
+#define MCFG_AY8910_PORT_B_WRITE_CB(_devcb) \
+ devcb = &ay8910_device::set_port_b_write_callback(*device, DEVCB2_##_devcb);
+
class ay8910_device : public device_t,
public device_sound_interface
@@ -92,6 +94,13 @@ public:
ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
ay8910_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);
+ static void set_flags(device_t &device, int flags) { downcast<ay8910_device &>(device).m_flags = flags; }
+ static void set_resistors_load(device_t &device, int res_load0, int res_load1, int res_load2) { downcast<ay8910_device &>(device).m_res_load[0] = res_load0; downcast<ay8910_device &>(device).m_res_load[1] = res_load1; downcast<ay8910_device &>(device).m_res_load[2] = res_load2; }
+ template<class _Object> static devcb2_base &set_port_a_read_callback(device_t &device, _Object object) { return downcast<ay8910_device &>(device).m_port_a_read_cb.set_callback(object); }
+ template<class _Object> static devcb2_base &set_port_b_read_callback(device_t &device, _Object object) { return downcast<ay8910_device &>(device).m_port_b_read_cb.set_callback(object); }
+ template<class _Object> static devcb2_base &set_port_a_write_callback(device_t &device, _Object object) { return downcast<ay8910_device &>(device).m_port_a_write_cb.set_callback(object); }
+ template<class _Object> static devcb2_base &set_port_b_write_callback(device_t &device, _Object object) { return downcast<ay8910_device &>(device).m_port_b_write_cb.set_callback(object); }
+
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( address_w );
DECLARE_WRITE8_MEMBER( data_w );
@@ -119,9 +128,9 @@ public:
void ay8910_write_ym(int addr, int data);
int ay8910_read_ym();
void ay8910_reset_ym();
+
protected:
// device-level overrides
- virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
@@ -138,7 +147,6 @@ protected:
int m_streams;
int m_ready;
sound_stream *m_channel;
- const ay8910_interface *m_intf;
INT32 m_register_latch;
UINT8 m_regs[16];
INT32 m_last_enable;
@@ -161,10 +169,12 @@ protected:
INT32 m_vol_table[AY8910_NUM_CHANNELS][16];
INT32 m_env_table[AY8910_NUM_CHANNELS][32];
INT32 m_vol3d_table[8*32*32*32];
- devcb_resolved_read8 m_portAread;
- devcb_resolved_read8 m_portBread;
- devcb_resolved_write8 m_portAwrite;
- devcb_resolved_write8 m_portBwrite;
+ int m_flags; /* Flags */
+ int m_res_load[3]; /* Load on channel in ohms */
+ devcb2_read8 m_port_a_read_cb;
+ devcb2_read8 m_port_b_read_cb;
+ devcb2_write8 m_port_a_write_cb;
+ devcb2_write8 m_port_b_write_cb;
};
extern const device_type AY8910;
diff --git a/src/mame/audio/cclimber.c b/src/mame/audio/cclimber.c
index 8b5f23700e5..c9ed655d2bf 100644
--- a/src/mame/audio/cclimber.c
+++ b/src/mame/audio/cclimber.c
@@ -8,16 +8,6 @@
#define SND_CLOCK 3072000 /* 3.072 MHz */
-const ay8910_interface cclimber_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, cclimber_audio_device, sample_select_w),
- DEVCB_NULL
-};
-
static INT16 *samplebuf; /* buffer to decode samples at run time */
static SAMPLES_START( cclimber_sh_start )
@@ -37,7 +27,7 @@ const samples_interface cclimber_samples_interface =
MACHINE_CONFIG_FRAGMENT( cclimber_audio )
MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK/2)
- MCFG_SOUND_CONFIG(cclimber_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cclimber_audio_device, sample_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.50)
MCFG_SAMPLES_ADD("samples", cclimber_samples_interface)
diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c
index dd1ab58d6bd..c6e72571138 100644
--- a/src/mame/audio/cinemat.c
+++ b/src/mame/audio/cinemat.c
@@ -1349,34 +1349,11 @@ WRITE8_MEMBER(cinemat_state::sound_portb_w)
m_last_portb_write = data;
}
-
WRITE8_MEMBER(cinemat_state::sound_output_w)
{
logerror("sound_output = %02X\n", data);
}
-
-static const ay8910_interface demon_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(cinemat_state,sound_porta_r),
- DEVCB_DRIVER_MEMBER(cinemat_state,sound_portb_r),
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(cinemat_state,sound_portb_w)
-};
-
-static const ay8910_interface demon_ay8910_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(cinemat_state,sound_output_w)
-};
-
-
SOUND_RESET_MEMBER( cinemat_state, demon )
{
/* generic init */
@@ -1435,14 +1412,18 @@ MACHINE_CONFIG_FRAGMENT( demon_sound )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 3579545)
- MCFG_SOUND_CONFIG(demon_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(cinemat_state, sound_porta_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(cinemat_state, sound_portb_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(cinemat_state, sound_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay3", AY8910, 3579545)
- MCFG_SOUND_CONFIG(demon_ay8910_interface_3)
+
+
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(cinemat_state, sound_output_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c
index 4e0f5c6f263..951b3236bea 100644
--- a/src/mame/audio/irem.c
+++ b/src/mame/audio/irem.c
@@ -226,26 +226,6 @@ void irem_audio_device::adpcm_int(int st)
* it does not take cross-chip mixing effects into account.
*/
-static const ay8910_interface irem_ay8910_interface_1 =
-{
- AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT,
- {470, 0, 0},
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("irem_audio", irem_audio_device, ay8910_0_portb_w)
-};
-
-static const ay8910_interface irem_ay8910_interface_2 =
-{
- AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT,
- {470, 0, 0},
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("irem_audio", irem_audio_device, ay8910_1_porta_w),
- DEVCB_NULL
-};
-
/*
* http://newsgroups.derkeiler.com/Archive/Rec/rec.games.video.arcade.collecting/2006-06/msg03108.html
@@ -393,11 +373,16 @@ static MACHINE_CONFIG_FRAGMENT( irem_audio_base )
MCFG_SOUND_ADD("irem_audio", IREM_AUDIO, 0)
MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(irem_ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(470, 0, 0)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("irem_audio", irem_audio_device, ay8910_0_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(irem_ay8910_interface_2)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(470, 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("irem_audio", irem_audio_device, ay8910_1_porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("msm1", MSM5205, XTAL_384kHz) /* verified on pcb */
@@ -423,11 +408,16 @@ MACHINE_CONFIG_FRAGMENT( m52_sound_c_audio )
MCFG_SOUND_ADD("irem_audio", IREM_AUDIO, 0)
MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(irem_ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(470, 0, 0)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("irem_audio", irem_audio_device, ay8910_0_portb_w))
MCFG_SOUND_ROUTE_EX(0, "filtermix", 1.0, 0)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(irem_ay8910_interface_2)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(470, 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("irem_audio", irem_audio_device, ay8910_1_porta_w))
MCFG_SOUND_ROUTE_EX(0, "filtermix", 1.0, 1)
MCFG_SOUND_ADD("msm1", MSM5205, XTAL_384kHz) /* verified on pcb */
diff --git a/src/mame/audio/mario.c b/src/mame/audio/mario.c
index 9f48522fc3a..34512aaa943 100644
--- a/src/mame/audio/mario.c
+++ b/src/mame/audio/mario.c
@@ -603,22 +603,6 @@ static ADDRESS_MAP_START( masao_sound_map, AS_PROGRAM, 8, mario_state )
AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w)
ADDRESS_MAP_END
-/*************************************
- *
- * Sound Interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/*************************************
*
@@ -651,7 +635,7 @@ MACHINE_CONFIG_FRAGMENT( masao_audio )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 14318000/6)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/midway.c b/src/mame/audio/midway.c
index 7e6d70ca031..b9880422fee 100644
--- a/src/mame/audio/midway.c
+++ b/src/mame/audio/midway.c
@@ -351,32 +351,6 @@ void midway_ssio_device::update_volumes()
m_ay1->set_volume(2, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][2]]);
}
-
-//-------------------------------------------------
-// AY-8910 interfaces
-//-------------------------------------------------
-
-static const ay8910_interface ssio_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta0_w),
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb0_w)
-};
-
-static const ay8910_interface ssio_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta1_w),
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb1_w)
-};
-
-
//-------------------------------------------------
// audio CPU map
//-------------------------------------------------
@@ -410,11 +384,17 @@ static MACHINE_CONFIG_FRAGMENT( midway_ssio )
MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10)
MCFG_SOUND_ADD("ay0", AY8910, SSIO_CLOCK/2/4)
- MCFG_SOUND_CONFIG(ssio_ay8910_interface_1)
+
+
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(midway_ssio_device, porta0_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(midway_ssio_device, portb0_w))
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 0)
MCFG_SOUND_ADD("ay1", AY8910, SSIO_CLOCK/2/4)
- MCFG_SOUND_CONFIG(ssio_ay8910_interface_2)
+
+
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(midway_ssio_device, porta1_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(midway_ssio_device, portb1_w))
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 1)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c
index 8fc85def221..a66547dbd52 100644
--- a/src/mame/audio/redalert.c
+++ b/src/mame/audio/redalert.c
@@ -110,18 +110,6 @@ WRITE8_MEMBER(redalert_state::redalert_ay8910_latch_2_w)
m_ay8910_latch_2 = data;
}
-
-static const ay8910_interface redalert_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL, /* port A/B read */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(redalert_state,redalert_analog_w) /* port A/B write */
-};
-
-
static ADDRESS_MAP_START( redalert_audio_map, AS_PROGRAM, 8, redalert_state )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x0c00) AM_RAM
@@ -191,7 +179,8 @@ static MACHINE_CONFIG_FRAGMENT( redalert_audio_m37b )
MCFG_CPU_PERIODIC_INT_DRIVER(redalert_state, irq0_line_hold, REDALERT_AUDIO_CPU_IRQ_FREQ)
MCFG_SOUND_ADD("aysnd", AY8910, REDALERT_AY8910_CLOCK)
- MCFG_SOUND_CONFIG(redalert_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(redalert_state, redalert_analog_w))
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
/* channel C is used a noise source and is not connected to a speaker */
@@ -324,18 +313,6 @@ static ADDRESS_MAP_START( demoneye_audio_map, AS_PROGRAM, 8, redalert_state )
ADDRESS_MAP_END
-static const ay8910_interface demoneye_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL, /* port A/B read */
- DEVCB_NULL,
- DEVCB_NULL /* port A/B write */
-};
-
-
-
/*************************************
*
* Demoneye-X audio start
@@ -375,6 +352,6 @@ MACHINE_CONFIG_FRAGMENT( demoneye_audio )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, DEMONEYE_AY8910_CLOCK)
- MCFG_SOUND_CONFIG(demoneye_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c
index cadf9892bd4..34830ad00e4 100644
--- a/src/mame/audio/scramble.c
+++ b/src/mame/audio/scramble.c
@@ -272,27 +272,6 @@ WRITE8_MEMBER( scramble_state::ad2083_tms5110_ctrl_w )
m_tmsprom->enable_w(1);
}
-
-static const ay8910_interface ad2083_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(scramble_state, scramble_portB_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ad2083_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(scramble_state, hotshock_soundlatch_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static ADDRESS_MAP_START( ad2083_sound_map, AS_PROGRAM, 8, scramble_state )
AM_RANGE(0x0000, 0x2fff) AM_ROM
AM_RANGE(0x8000, 0x83ff) AM_RAM
@@ -330,11 +309,11 @@ MACHINE_CONFIG_FRAGMENT( ad2083_audio )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(ad2083_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(scramble_state, scramble_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ay2", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(ad2083_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(scramble_state, hotshock_soundlatch_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("tms", TMS5110A, AD2083_TMS5110_CLOCK)
diff --git a/src/mame/audio/seibu.c b/src/mame/audio/seibu.c
index 44f19f3d9b2..7cffd2c74d2 100644
--- a/src/mame/audio/seibu.c
+++ b/src/mame/audio/seibu.c
@@ -354,15 +354,6 @@ WRITE16_MEMBER( seibu_sound_device::main_mustb_w )
/***************************************************************************/
-const ay8910_interface seibu_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-/***************************************************************************/
-
ADDRESS_MAP_START( seibu_sound_map, AS_PROGRAM, 8, driver_device )
AM_RANGE(0x0000, 0x1fff) AM_ROM
AM_RANGE(0x2000, 0x27ff) AM_RAM
diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h
index 6d82277d8f6..09875ce754e 100644
--- a/src/mame/audio/seibu.h
+++ b/src/mame/audio/seibu.h
@@ -91,8 +91,6 @@ protected:
extern const device_type SEIBU_SOUND;
-extern const ay8910_interface seibu_ay8910_config;
-
// Seibu ADPCM device
@@ -247,7 +245,6 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
\
MCFG_SOUND_ADD("ym1", YM2203, freq) \
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2203_irqhandler)) \
- MCFG_YM2203_AY8910_INTF(&seibu_ay8910_config) \
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) \
\
MCFG_SOUND_ADD("ym2", YM2203, freq) \
diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c
index 9466f329707..b42dc256714 100644
--- a/src/mame/audio/timeplt.c
+++ b/src/mame/audio/timeplt.c
@@ -168,25 +168,6 @@ static ADDRESS_MAP_START( locomotn_sound_map, AS_PROGRAM, 8, driver_device )
ADDRESS_MAP_END
-
-/*************************************
- *
- * Sound chip interfaces
- *
- *************************************/
-
-static const ay8910_interface timeplt_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DEVICE_MEMBER("timeplt_audio", timeplt_audio_device, portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* Machine drivers
@@ -205,7 +186,8 @@ MACHINE_CONFIG_FRAGMENT( timeplt_sound )
MCFG_SOUND_ADD("timeplt_audio", TIMEPLT_AUDIO, 0)
MCFG_SOUND_ADD("ay1", AY8910, MASTER_CLOCK/8)
- MCFG_SOUND_CONFIG(timeplt_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("timeplt_audio", timeplt_audio_device, portB_r))
MCFG_SOUND_ROUTE(0, "filter.0.0", 0.60)
MCFG_SOUND_ROUTE(1, "filter.0.1", 0.60)
MCFG_SOUND_ROUTE(2, "filter.0.2", 0.60)
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index 97104b72950..5717e581386 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -517,16 +517,6 @@ void _1942_state::machine_reset()
m_scroll[1] = 0;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_RESISTOR_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( 1942, _1942_state )
/* basic machine hardware */
@@ -558,12 +548,14 @@ static MACHINE_CONFIG_START( 1942, _1942_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, AUDIO_CLOCK) /* 1.5 MHz */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_RESISTOR_OUTPUT)
+
MCFG_SOUND_ROUTE_EX(0, "snd_nl", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "snd_nl", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "snd_nl", 1.0, 2)
MCFG_SOUND_ADD("ay2", AY8910, AUDIO_CLOCK) /* 1.5 MHz */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_RESISTOR_OUTPUT)
+
MCFG_SOUND_ROUTE_EX(0, "snd_nl", 1.0, 3)
MCFG_SOUND_ROUTE_EX(1, "snd_nl", 1.0, 4)
MCFG_SOUND_ROUTE_EX(2, "snd_nl", 1.0, 5)
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index b5b2dcf9869..41955a00268 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -470,6 +470,7 @@ static MACHINE_CONFIG_START( drill, _2mindril_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(_2mindril_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index 94145bb5fcf..d8ee762b8c9 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -953,16 +953,6 @@ static GFXDECODE_START( 40love )
GFXDECODE_ENTRY( "gfx1", 0, sprite_layout, 0, 64 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(fortyl_state,sound_control_2_w),
- DEVCB_DRIVER_MEMBER(fortyl_state,sound_control_3_w)
-};
-
/*******************************************************************************/
MACHINE_START_MEMBER(fortyl_state,40love)
@@ -1077,7 +1067,8 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
@@ -1133,7 +1124,8 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
diff --git a/src/mame/drivers/4enlinea.c b/src/mame/drivers/4enlinea.c
index 5e4e6ff3a79..65236874ec3 100644
--- a/src/mame/drivers/4enlinea.c
+++ b/src/mame/drivers/4enlinea.c
@@ -460,28 +460,6 @@ void _4enlinea_state::machine_reset()
{
}
-
-/**********************************
-* CRTC Interface *
-**********************************/
-
-
-
-/***********************************
-* Sound Interface *
-***********************************/
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN-P2"),
- DEVCB_INPUT_PORT("IN-P1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/***********************************
* Machine Drivers *
***********************************/
@@ -540,7 +518,8 @@ static MACHINE_CONFIG_START( 4enlinea, _4enlinea_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SND_AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN-P2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN-P1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c
index 6daf30633c4..00fe7dc63dd 100644
--- a/src/mame/drivers/4roses.c
+++ b/src/mame/drivers/4roses.c
@@ -343,21 +343,6 @@ static GFXDECODE_START( 4roses )
GFXDECODE_END
-/************************
-* Sound Interface *
-************************/
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA in */
- DEVCB_NULL, /* portB in */
- DEVCB_NULL, /* portA out */
- DEVCB_NULL /* portB out */
-};
-
-
/**************************
* Machine Drivers *
**************************/
@@ -392,7 +377,6 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz, guess */
- MCFG_SOUND_CONFIG(ay8910_intf)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c
index 0276eac06ba..af5e6ebfb28 100644
--- a/src/mame/drivers/5clown.c
+++ b/src/mame/drivers/5clown.c
@@ -995,21 +995,6 @@ static GFXDECODE_START( fclown )
GFXDECODE_END
/*************************
-* Sound Interfaces *
-*************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-/*************************
* Machine Drivers *
*************************/
@@ -1057,7 +1042,6 @@ static MACHINE_CONFIG_START( fclown, _5clown_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* guess, seems ok */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_OKIM6295_ADD("oki6295", MASTER_CLOCK/12, OKIM6295_PIN7_LOW) /* guess, seems ok; pin7 guessed, seems ok */
diff --git a/src/mame/drivers/aces1.c b/src/mame/drivers/aces1.c
index 2d573ac03ec..5092c13fdb0 100644
--- a/src/mame/drivers/aces1.c
+++ b/src/mame/drivers/aces1.c
@@ -252,18 +252,6 @@ static INPUT_PORTS_START( aces1 )
INPUT_PORTS_END
-// 0xadf0 - Dips, Sound
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( aces1, aces1_state )
MCFG_CPU_ADD("maincpu", Z80, 4000000) /* ?? Mhz */
@@ -293,8 +281,10 @@ static MACHINE_CONFIG_START( aces1, aces1_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
+ // 0xadf0 - Dips, Sound
MCFG_SOUND_ADD("aysnd", AY8910, 1500000) /* ?? MHz */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index 63962608837..337c4bac5c8 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -622,15 +622,6 @@ INTERRUPT_GEN_MEMBER(adp_state::adp_int)
device.execute().set_input_line(1, HOLD_LINE); // ??? All irqs have the same vector, and the mask used is 0 or 7
}
*/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("PA"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
static ADDRESS_MAP_START( adp_h63484_map, AS_0, 16, adp_state )
AM_RANGE(0x00000, 0x1ffff) AM_MIRROR(0x60000) AM_RAM
@@ -680,7 +671,7 @@ static MACHINE_CONFIG_START( quickjac, adp_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 3686400/2)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("PA"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
index 5a02dadf9fb..77be1977be8 100644
--- a/src/mame/drivers/aeroboto.c
+++ b/src/mame/drivers/aeroboto.c
@@ -207,18 +207,6 @@ static GFXDECODE_START( aeroboto )
GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0, 8 )
GFXDECODE_END
-
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
void aeroboto_state::machine_start()
{
m_stars_rom = memregion("gfx2")->base();
@@ -270,7 +258,8 @@ static MACHINE_CONFIG_START( formatz, aeroboto_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_10MHz/8) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_10MHz/16) /* verified on pcb */
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c
index 37f151a92f0..541df681856 100644
--- a/src/mame/drivers/aerofgt.c
+++ b/src/mame/drivers/aerofgt.c
@@ -1344,6 +1344,7 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1503,6 +1504,7 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz ) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1557,6 +1559,7 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1610,6 +1613,7 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1664,6 +1668,7 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1712,6 +1717,7 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(aerofgt_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 9855672611b..41f59aef56d 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -516,17 +516,6 @@ static GFXDECODE_START( airbustr )
GFXDECODE_ENTRY( "gfx2", 0, sprite_gfxlayout, 512, 16 ) // sprites
GFXDECODE_END
-/* Sound Interfaces */
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"), // DSW-1 connected to port A
- DEVCB_INPUT_PORT("DSW2"), // DSW-2 connected to port B
- DEVCB_NULL,
- DEVCB_NULL
-};
/* Interrupt Generators */
@@ -634,7 +623,8 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1")) // DSW-1 connected to port A
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2")) // DSW-2 connected to port B
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c
index 5d677127bd8..6ba972d9c41 100644
--- a/src/mame/drivers/albazc.c
+++ b/src/mame/drivers/albazc.c
@@ -261,17 +261,6 @@ static GFXDECODE_START( hanaroku )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( hanaroku, albazc_state )
MCFG_CPU_ADD("maincpu", Z80,6000000) /* ? MHz */
@@ -296,7 +285,8 @@ static MACHINE_CONFIG_START( hanaroku, albazc_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000) /* ? MHz */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c
index 79c5e4eb6d5..4d1b330f73f 100644
--- a/src/mame/drivers/albazg.c
+++ b/src/mame/drivers/albazg.c
@@ -200,16 +200,6 @@ WRITE8_MEMBER(albazg_state::yumefuda_output_w)
flip_screen_set(~data & 0x20);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_DRIVER_MEMBER(albazg_state,yumefuda_output_w),
- DEVCB_NULL
-};
-
/***************************************************************************************/
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, albazg_state )
@@ -392,7 +382,9 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/16) /* guessed to use the same xtal as the crtc */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(albazg_state, yumefuda_output_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c
index fcb3eb4210c..a091f0954bd 100644
--- a/src/mame/drivers/alpha68k.c
+++ b/src/mame/drivers/alpha68k.c
@@ -1811,13 +1811,6 @@ GFXDECODE_END
/******************************************************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r)
-};
-
WRITE8_MEMBER(alpha68k_state::porta_w)
{
if(data == 0xff)
@@ -1833,16 +1826,6 @@ WRITE8_MEMBER(alpha68k_state::porta_w)
m_sound_pa_latch = data & 1;
}
-static const ay8910_interface ym2203_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(alpha68k_state, porta_w),
- DEVCB_NULL
-};
-
WRITE_LINE_MEMBER(alpha68k_state::ym3812_irq)
{
m_audiocpu->set_input_line(0, (state) ? HOLD_LINE : CLEAR_LINE);
@@ -2069,7 +2052,7 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MACHINE_CONFIG_END
@@ -2148,7 +2131,8 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
@@ -2198,7 +2182,8 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
@@ -2242,7 +2227,8 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
@@ -2285,7 +2271,8 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c
index 23b0fd82896..3ac2b861ee5 100644
--- a/src/mame/drivers/ambush.c
+++ b/src/mame/drivers/ambush.c
@@ -195,33 +195,6 @@ GFXDECODE_END
/*************************************
*
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8912_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("SYSTEM"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8912_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("INPUTS"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -251,11 +224,11 @@ static MACHINE_CONFIG_START( ambush, ambush_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8912, XTAL_18_432MHz/6/2) /* XTAL confirmed, divisor guessed */
- MCFG_SOUND_CONFIG(ay8912_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SYSTEM"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MCFG_SOUND_ADD("ay2", AY8912, XTAL_18_432MHz/6/2) /* XTAL confirmed, divisor guessed */
- MCFG_SOUND_CONFIG(ay8912_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("INPUTS"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ampoker2.c b/src/mame/drivers/ampoker2.c
index 0f3c78ef532..a332dcb5ee6 100644
--- a/src/mame/drivers/ampoker2.c
+++ b/src/mame/drivers/ampoker2.c
@@ -1146,19 +1146,6 @@ static GFXDECODE_START( sigma2k )
GFXDECODE_ENTRY( "gfx1", 0x0000, s2k_charlayout, 0, 16 )
GFXDECODE_END
-
-/*******************
-* AY8910 Interfase *
-*******************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL /* no ports used */
-};
-
-
/*************************
* Machine Driver *
*************************/
@@ -1192,7 +1179,6 @@ static MACHINE_CONFIG_START( ampoker2, ampoker2_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910,MASTER_CLOCK/4) /* 1.5 MHz, measured */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c
index bd9c0bd25f3..dd9ea07423b 100644
--- a/src/mame/drivers/angelkds.c
+++ b/src/mame/drivers/angelkds.c
@@ -512,13 +512,6 @@ WRITE_LINE_MEMBER(angelkds_state::irqhandler)
m_subcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
/*** Graphics Decoding
all the 8x8 tiles are in one format, the 16x16 sprites in another
@@ -621,7 +614,6 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_4MHz)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(angelkds_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.65)
MCFG_SOUND_ROUTE(1, "mono", 0.65)
MCFG_SOUND_ROUTE(2, "mono", 0.65)
diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c
index 397d116518d..0ddde8616db 100644
--- a/src/mame/drivers/arabian.c
+++ b/src/mame/drivers/arabian.c
@@ -312,25 +312,6 @@ static INPUT_PORTS_START( arabiana )
INPUT_PORTS_END
-
-/*************************************
- *
- * Sound definitions
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(arabian_state,ay8910_porta_w),
- DEVCB_DRIVER_MEMBER(arabian_state,ay8910_portb_w)
-};
-
-
-
/*************************************
*
* Machine driver
@@ -379,7 +360,8 @@ static MACHINE_CONFIG_START( arabian, arabian_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MAIN_OSC/4/2)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(arabian_state, ay8910_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(arabian_state, ay8910_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c
index af97b2e169f..b62a00f4b93 100644
--- a/src/mame/drivers/argus.c
+++ b/src/mame/drivers/argus.c
@@ -157,14 +157,6 @@ WRITE_LINE_MEMBER(argus_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
/***************************************************************************
Memory Handler(s)
@@ -569,7 +561,6 @@ static MACHINE_CONFIG_START( argus, argus_state )
MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -614,7 +605,6 @@ static MACHINE_CONFIG_START( valtric, argus_state )
MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -659,7 +649,6 @@ static MACHINE_CONFIG_START( butasan, argus_state )
MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.30)
MCFG_SOUND_ROUTE(1, "mono", 0.30)
MCFG_SOUND_ROUTE(2, "mono", 0.30)
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index 52a2e57bfd6..76aa0838ba7 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -1548,26 +1548,6 @@ static GFXDECODE_START(aristmk4)
GFXDECODE_ENTRY("tile_gfx",0x0,layout8x8x6, 0, 8 )
GFXDECODE_END
-static const ay8910_interface ay8910_config1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(aristmk4_state,zn434_w) // Port write to set Vout of the DA convertors ( 2 x ZN434 )
-};
-
-static const ay8910_interface ay8910_config2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, // Port A read
- DEVCB_NULL, // Port B read
- DEVCB_DRIVER_MEMBER(aristmk4_state,pblp_out), // Port A write - goes to lamps on the buttons x8
- DEVCB_DRIVER_MEMBER(aristmk4_state,pbltlp_out) // Port B write - goes to lamps on the buttons x4 and light tower x4
-};
-
/* read m/c number */
READ8_MEMBER(aristmk4_state::pa1_r)
@@ -1718,11 +1698,13 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state )
// the Mark IV has X 2 AY8910 sound chips which are tied to the VIA
MCFG_SOUND_ADD("ay1", AY8910 , MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(aristmk4_state, zn434_w)) // Port write to set Vout of the DA convertors ( 2 x ZN434 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ay2", AY8910 , MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(aristmk4_state, pblp_out)) // Port A write - goes to lamps on the buttons x8
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(aristmk4_state, pbltlp_out)) // Port B write - goes to lamps on the buttons x4 and light tower x4
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SAMPLES_ADD("samples", meter_samples_interface)
diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c
index b9d8dda1744..17803409f1f 100644
--- a/src/mame/drivers/arkanoid.c
+++ b/src/mame/drivers/arkanoid.c
@@ -1129,32 +1129,6 @@ static GFXDECODE_START( hexa )
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0 , 32 )
GFXDECODE_END
-
-/* Sound Interfaces */
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("UNUSED"),
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-static const ay8910_interface hexa_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("INPUTS"),
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/* Machine Drivers */
MACHINE_START_MEMBER(arkanoid_state,arkanoid)
@@ -1228,7 +1202,8 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", YM2149, XTAL_12MHz/4/2) /* YM2149 clock is 3mhz, pin 26 is low so 3mhz/2 */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("UNUSED"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
@@ -1259,7 +1234,8 @@ static MACHINE_CONFIG_START( hexa, arkanoid_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_12MHz/4/2) /* Imported from arkanoid - correct? */
- MCFG_SOUND_CONFIG(hexa_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("INPUTS"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -1303,7 +1279,8 @@ static MACHINE_CONFIG_START( brixian, arkanoid_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_12MHz/4/2) /* Imported from arkanoid - correct? */
- MCFG_SOUND_CONFIG(hexa_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("INPUTS"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c
index 96bafa0974e..34b67bdbf13 100644
--- a/src/mame/drivers/ashnojoe.c
+++ b/src/mame/drivers/ashnojoe.c
@@ -289,16 +289,6 @@ WRITE8_MEMBER(ashnojoe_state::ym2203_write_b)
membank("bank4")->set_entry(data & 0x0f);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_a),
- DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_b),
-};
-
WRITE_LINE_MEMBER(ashnojoe_state::ashnojoe_vclk_cb)
{
if (m_msm5205_vclk_toggle == 0)
@@ -359,7 +349,8 @@ static MACHINE_CONFIG_START( ashnojoe, ashnojoe_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(ashnojoe_state, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ashnojoe_state, ym2203_write_a))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ashnojoe_state, ym2203_write_b))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.1)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index 9b234c83755..cf1d15836bc 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -474,17 +474,6 @@ WRITE8_MEMBER(astrocde_state::demndrgn_sound_w)
*
*************************************/
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DIPSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
WRITE8_MEMBER(astrocde_state::tenpindx_sound_w)
{
soundlatch_byte_w(space, offset, data);
@@ -1478,7 +1467,7 @@ static MACHINE_CONFIG_DERIVED( tenpindx, astrocade_16color_base )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, ASTROCADE_CLOCK/4) /* real clock unknown */
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DIPSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index c1cb77132e1..52444615175 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -864,6 +864,7 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(asuka_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c
index 7cfcadeb0bd..0126d4efe77 100644
--- a/src/mame/drivers/avt.c
+++ b/src/mame/drivers/avt.c
@@ -846,22 +846,6 @@ static GFXDECODE_START( avt )
GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 )
GFXDECODE_END
-
-/********************************************
-* Sound Interfaces *
-********************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/*********************************************
* Machine Drivers *
*********************************************/
@@ -901,7 +885,6 @@ static MACHINE_CONFIG_START( avt, avt_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, CPU_CLOCK/2) /* 1.25 MHz.?? */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c
index c829877036e..3cf3fd9bc67 100644
--- a/src/mame/drivers/bagman.c
+++ b/src/mame/drivers/bagman.c
@@ -359,17 +359,6 @@ static GFXDECODE_START( pickin )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/* squaitsa doesn't map the dial directly, instead it polls the results of the dial through an external circuitry.
I don't know if the following is correct, there can possbily be multiple solutions for the same problem. */
READ8_MEMBER(bagman_state::dial_input_p1_r)
@@ -412,26 +401,6 @@ READ8_MEMBER(bagman_state::dial_input_p2_r)
return (ioport("P2")->read() & 0x9f) | (m_p2_res);
}
-static const ay8910_interface ay8910_dial_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(bagman_state,dial_input_p1_r),
- DEVCB_DRIVER_MEMBER(bagman_state,dial_input_p2_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(bagman_state::vblank_irq)
{
if(m_irq_mask)
@@ -479,7 +448,8 @@ static MACHINE_CONFIG_START( bagman, bagman_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, BAGMAN_H0 / 2)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("tms", TMS5110A, 640000)
@@ -514,12 +484,12 @@ static MACHINE_CONFIG_START( pickin, bagman_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
/* maybe */
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
@@ -567,17 +537,19 @@ static MACHINE_CONFIG_START( botanic, bagman_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( squaitsa, botanic )
MCFG_SOUND_MODIFY("aysnd")
- MCFG_SOUND_CONFIG(ay8910_dial_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(bagman_state, dial_input_p1_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(bagman_state, dial_input_p2_r))
+
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c
index b5327c41c97..40fefef2018 100644
--- a/src/mame/drivers/battlex.c
+++ b/src/mame/drivers/battlex.c
@@ -214,16 +214,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface battlex_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
void battlex_state::machine_start()
{
/* register for save states */
@@ -265,7 +255,6 @@ static MACHINE_CONFIG_START( battlex, battlex_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_10MHz/8) // ?
- MCFG_SOUND_CONFIG(battlex_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index ad621ad37f8..7b405c1fbf5 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -645,13 +645,6 @@ WRITE_LINE_MEMBER(bbusters_state::sound_irq)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
/******************************************************************************/
void bbusters_state::screen_eof_bbuster(screen_device &screen, bool state)
@@ -696,6 +689,7 @@ static MACHINE_CONFIG_START( bbusters, bbusters_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(bbusters_state, sound_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -735,7 +729,7 @@ static MACHINE_CONFIG_START( mechatt, bbusters_state )
MCFG_SOUND_ADD("ymsnd", YM2608, 8000000)
MCFG_YM2608_IRQ_HANDLER(WRITELINE(bbusters_state, sound_irq))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/big10.c b/src/mame/drivers/big10.c
index a152b7dcfc6..426adf18b80 100644
--- a/src/mame/drivers/big10.c
+++ b/src/mame/drivers/big10.c
@@ -226,21 +226,6 @@ static INPUT_PORTS_START( big10 )
INPUT_PORTS_END
-/**********************************
-* AY-3-8910 Interface *
-**********************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_DRIVER_MEMBER(big10_state,mux_w),
- DEVCB_NULL
-};
-
-
/**************************************
* Machine Driver *
**************************************/
@@ -271,7 +256,9 @@ static MACHINE_CONFIG_START( big10, big10_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/12) /* guess */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(big10_state, mux_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c
index 6a0183e4092..a297b407517 100644
--- a/src/mame/drivers/bking.c
+++ b/src/mame/drivers/bking.c
@@ -376,16 +376,6 @@ WRITE8_MEMBER(bking_state::port_b_w)
logerror("port_b = %02x\n", data);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("dac", dac_device, write_signed8),
- DEVCB_DRIVER_MEMBER(bking_state,port_b_w)
-};
-
void bking_state::machine_start()
{
/* video */
@@ -492,7 +482,8 @@ static MACHINE_CONFIG_START( bking, bking_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_6MHz/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_device, write_signed8))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(bking_state, port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index dc9612a007d..f39618057f0 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -268,17 +268,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("upd", upd775x_device, port_w),
- DEVCB_DRIVER_MEMBER(bladestl_state,bladestl_port_B_w)
-};
-
-
void bladestl_state::machine_start()
{
m_rombank->configure_entries(0, 4, memregion("maincpu")->base(), 0x2000);
@@ -349,7 +338,8 @@ static MACHINE_CONFIG_START( bladestl, bladestl_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MCFG_SOUND_ADD("ymsnd", YM2203, 3579545)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("upd", upd775x_device, port_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(bladestl_state, bladestl_port_B_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.45)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c
index 895d9e4f7be..63e21dac120 100644
--- a/src/mame/drivers/blktiger.c
+++ b/src/mame/drivers/blktiger.c
@@ -264,13 +264,6 @@ WRITE_LINE_MEMBER(blktiger_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
void blktiger_state::machine_start()
{
/* configure bankswitching */
@@ -341,7 +334,6 @@ static MACHINE_CONFIG_START( blktiger, blktiger_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(blktiger_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */
diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c
index b790d812546..9d42f0eeb28 100644
--- a/src/mame/drivers/blueprnt.c
+++ b/src/mame/drivers/blueprnt.c
@@ -318,33 +318,6 @@ GFXDECODE_END
/*************************************
*
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(blueprnt_state,dipsw_w),
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DILSW1"),
- DEVCB_INPUT_PORT("DILSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -394,11 +367,13 @@ static MACHINE_CONFIG_START( blueprnt, blueprnt_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 10000000/2/2/2)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(blueprnt_state, dipsw_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 10000000/2/2/2/2)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DILSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DILSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index b6a1e0d74c5..4f4d6a619cb 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -459,18 +459,6 @@ WRITE8_MEMBER(bmcbowl_state::input_mux_w)
m_bmc_input=data;
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(bmcbowl_state,dips1_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(bmcbowl_state,input_mux_w)
-};
-
-
static MACHINE_CONFIG_START( bmcbowl, bmcbowl_state )
MCFG_CPU_ADD("maincpu", M68000, XTAL_21_4772MHz / 2 )
MCFG_CPU_PROGRAM_MAP(bmcbowl_mem)
@@ -495,7 +483,8 @@ static MACHINE_CONFIG_START( bmcbowl, bmcbowl_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_3_579545MHz / 2)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(bmcbowl_state, dips1_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(bmcbowl_state, input_mux_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
diff --git a/src/mame/drivers/bogeyman.c b/src/mame/drivers/bogeyman.c
index d893d2f2796..7cabb0a7918 100644
--- a/src/mame/drivers/bogeyman.c
+++ b/src/mame/drivers/bogeyman.c
@@ -222,16 +222,6 @@ WRITE8_MEMBER(bogeyman_state::bogeyman_colbank_w)
}
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(bogeyman_state,bogeyman_colbank_w),
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( bogeyman, bogeyman_state )
// basic machine hardware
@@ -259,7 +249,7 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1500000) /* Verified */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(bogeyman_state, bogeyman_colbank_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, 1500000) /* Verified */
diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c
index a458e757e30..9cd825f4a6d 100644
--- a/src/mame/drivers/btime.c
+++ b/src/mame/drivers/btime.c
@@ -1151,20 +1151,6 @@ GFXDECODE_END
****************************************************************************/
-static const ay8910_interface ay1_intf =
-{
- AY8910_DISCRETE_OUTPUT,
- {RES_K(5), RES_K(5), RES_K(5)},
- DEVCB_NULL, DEVCB_NULL, DEVCB_DRIVER_MEMBER(btime_state,ay_audio_nmi_enable_w), DEVCB_NULL
-};
-
-static const ay8910_interface ay2_intf =
-{
- AY8910_DISCRETE_OUTPUT,
- {RES_K(1), RES_K(5), RES_K(5)},
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static const discrete_mixer_desc btime_sound_mixer_desc =
{DISC_MIXER_IS_OP_AMP,
{RES_K(100), RES_K(100)},
@@ -1328,13 +1314,16 @@ static MACHINE_CONFIG_START( btime, btime_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, HCLK2)
- MCFG_SOUND_CONFIG(ay1_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(5), RES_K(5), RES_K(5))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(btime_state, ay_audio_nmi_enable_w))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 2)
MCFG_SOUND_ADD("ay2", AY8910, HCLK2)
- MCFG_SOUND_CONFIG(ay2_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(1), RES_K(5), RES_K(5))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 3)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 4)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 5)
@@ -1447,7 +1436,9 @@ static MACHINE_CONFIG_DERIVED( zoar, btime )
/* sound hardware */
MCFG_SOUND_REPLACE("ay1", AY8910, HCLK1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.23)
- MCFG_SOUND_CONFIG(ay1_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(5), RES_K(5), RES_K(5))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(btime_state, ay_audio_nmi_enable_w))
MCFG_SOUND_REPLACE("ay2", AY8910, HCLK1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.23)
diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c
index 65668b08a3a..78697ed358e 100644
--- a/src/mame/drivers/bublbobl.c
+++ b/src/mame/drivers/bublbobl.c
@@ -701,15 +701,6 @@ WRITE_LINE_MEMBER(bublbobl_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
-
/*************************************
*
* Machine driver
@@ -781,7 +772,6 @@ static MACHINE_CONFIG_START( tokio, bublbobl_state )
MCFG_SOUND_ADD("ymsnd", YM2203, MAIN_XTAL/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(bublbobl_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.08)
MCFG_SOUND_ROUTE(1, "mono", 0.08)
MCFG_SOUND_ROUTE(2, "mono", 0.08)
@@ -864,7 +854,6 @@ static MACHINE_CONFIG_START( bublbobl, bublbobl_state )
MCFG_SOUND_ADD("ym1", YM2203, MAIN_XTAL/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(bublbobl_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ym2", YM3526, MAIN_XTAL/8)
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index 42365414050..32d7d5825c4 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -325,28 +325,6 @@ WRITE8_MEMBER(buggychl_state::port_b_1_w)
/* TRBL/BASS for the 7630 on this 8910 output */
}
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(buggychl_state,port_a_0_w),
- DEVCB_DRIVER_MEMBER(buggychl_state,port_b_0_w)
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(buggychl_state,port_a_1_w),
- DEVCB_DRIVER_MEMBER(buggychl_state,port_b_1_w)
-};
-
-
void buggychl_state::machine_start()
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -413,11 +391,13 @@ static MACHINE_CONFIG_START( buggychl, buggychl_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(buggychl_state, port_a_0_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(buggychl_state, port_b_0_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(buggychl_state, port_a_1_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(buggychl_state, port_b_1_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c
index 031561bcbda..1c231211412 100644
--- a/src/mame/drivers/calomega.c
+++ b/src/mame/drivers/calomega.c
@@ -2565,41 +2565,6 @@ WRITE_LINE_MEMBER(calomega_state::write_acia_clock)
}
/*************************************************
-* Sound Interfaces *
-*************************************************/
-
-static const ay8910_interface sys903_ay8912_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("SW3"), /* from schematics */
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface sys905_ay8912_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface sys906_ay8912_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("SW2"), /* From PCB pic. Value is stored at $0539 */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(calomega_state,ay_aout_w),
- DEVCB_DRIVER_MEMBER(calomega_state,ay_bout_w)
-};
-
-
-/*************************************************
* Machine Drivers *
*************************************************/
@@ -2640,7 +2605,7 @@ static MACHINE_CONFIG_START( sys903, calomega_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8912", AY8912, SND_CLOCK) /* confirmed */
- MCFG_SOUND_CONFIG(sys903_ay8912_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SW3")) /* from schematics */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
/* acia */
@@ -2661,7 +2626,7 @@ static MACHINE_CONFIG_DERIVED( s903mod, sys903 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8912")
- MCFG_SOUND_CONFIG(sys905_ay8912_intf)
+ MCFG_AY8910_PORT_A_READ_CB(NULL)
MCFG_DEVICE_REMOVE("acia6850_0")
@@ -2685,7 +2650,7 @@ static MACHINE_CONFIG_DERIVED( sys905, sys903 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8912")
- MCFG_SOUND_CONFIG(sys905_ay8912_intf)
+ MCFG_AY8910_PORT_A_READ_CB(NULL)
MCFG_DEVICE_REMOVE("acia6850_0")
@@ -2717,7 +2682,9 @@ static MACHINE_CONFIG_DERIVED( sys906, sys903 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8912")
- MCFG_SOUND_CONFIG(sys906_ay8912_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SW2")) /* From PCB pic. Value is stored at $0539 */
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(calomega_state, ay_aout_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(calomega_state, ay_bout_w))
MCFG_DEVICE_REMOVE("acia6850_0")
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index bc9417d5006..a39f650957d 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -299,23 +299,6 @@ static INPUT_PORTS_START( capbowl )
INPUT_PORTS_END
-
-/*************************************
- *
- * Sound definitions
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, read),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, write), /* Also a status LED. See memory map above */
-};
-
/*************************************
*
* TMS34061 interfacing
@@ -383,7 +366,8 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK/2)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(capbowl_state, firqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("ticket", ticket_dispenser_device, read))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("ticket", ticket_dispenser_device, write)) /* Also a status LED. See memory map above */
MCFG_SOUND_ROUTE(0, "mono", 0.07)
MCFG_SOUND_ROUTE(1, "mono", 0.07)
MCFG_SOUND_ROUTE(2, "mono", 0.07)
diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c
index 94cf851fbf6..2c163970c11 100644
--- a/src/mame/drivers/carrera.c
+++ b/src/mame/drivers/carrera.c
@@ -277,17 +277,6 @@ READ8_MEMBER(carrera_state::unknown_r)
return machine().rand();
}
-/* these are set as input, but I have no idea which input port it uses is for the AY */
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(carrera_state,unknown_r),
- DEVCB_DRIVER_MEMBER(carrera_state,unknown_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
PALETTE_INIT_MEMBER(carrera_state, carrera)
{
const UINT8 *color_prom = memregion("proms")->base();
@@ -343,7 +332,9 @@ static MACHINE_CONFIG_START( carrera, carrera_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ /* these are set as input, but I have no idea which input port it uses is for the AY */
+ MCFG_AY8910_PORT_A_READ_CB(READ8(carrera_state, unknown_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(carrera_state, unknown_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c
index c9a1f25792d..606c82bedf1 100644
--- a/src/mame/drivers/caswin.c
+++ b/src/mame/drivers/caswin.c
@@ -290,16 +290,6 @@ static GFXDECODE_START( vvillage )
GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 16 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
PALETTE_INIT_MEMBER(caswin_state, caswin)
{
const UINT8 *color_prom = memregion("proms")->base();
@@ -352,7 +342,8 @@ static MACHINE_CONFIG_START( vvillage, caswin_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 4000000 / 4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index b26814b8e16..cdd58236046 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -1973,13 +1973,6 @@ WRITE_LINE_MEMBER(cave_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
/***************************************************************************
Dangun Feveron
***************************************************************************/
@@ -2273,7 +2266,6 @@ static MACHINE_CONFIG_START( hotdogst, cave_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_32MHz/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.20)
@@ -2380,7 +2372,6 @@ static MACHINE_CONFIG_START( mazinger, cave_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_4MHz)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.20)
@@ -2612,7 +2603,6 @@ static MACHINE_CONFIG_START( pwrinst2, cave_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.40)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.40)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.40)
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c
index 9284c9fe91a..d4b758b908c 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -803,16 +803,6 @@ PALETTE_INIT_MEMBER(cb2001_state, cb2001)
}
}
-static const ay8910_interface cb2001_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_INPUT_PORT("DSW5"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( cb2001, cb2001_state )
MCFG_CPU_ADD("maincpu", V35, 20000000) // CPU91A-011-0016JK004; encrypted cpu like nec v25/35 used in some irem game
MCFG_V25_CONFIG(cb2001_decryption_table)
@@ -845,7 +835,8 @@ static MACHINE_CONFIG_START( cb2001, cb2001_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000) // wrong
- MCFG_SOUND_CONFIG(cb2001_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cchance.c b/src/mame/drivers/cchance.c
index 4eb90a36ae9..19795c2a568 100644
--- a/src/mame/drivers/cchance.c
+++ b/src/mame/drivers/cchance.c
@@ -183,16 +183,6 @@ static GFXDECODE_START( cchance )
GFXDECODE_ENTRY( "gfx1", 0, cchance_layout, 0x0, 32 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
MACHINE_START_MEMBER(cchance_state,cchance)
{
save_item(NAME(m_screenflip));
@@ -240,7 +230,8 @@ static MACHINE_CONFIG_START( cchance, cchance_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000/2)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c
index a8ea4683b5a..782cec77460 100644
--- a/src/mame/drivers/centiped.c
+++ b/src/mame/drivers/centiped.c
@@ -1692,14 +1692,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface centipdb_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(centiped_state,caterplr_rand_r)
-};
-
-
static const pokey_interface milliped_pokey_interface_1 =
{
{ DEVCB_NULL },
@@ -1796,7 +1788,7 @@ static MACHINE_CONFIG_DERIVED( centipdb, centiped )
/* sound hardware */
MCFG_SOUND_REPLACE("pokey", AY8910, 12096000/8)
- MCFG_SOUND_CONFIG(centipdb_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_rand_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
MACHINE_CONFIG_END
@@ -1812,7 +1804,7 @@ static MACHINE_CONFIG_DERIVED( magworm, centiped_base )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("pokey", AY8910, 12096000/8)
- MCFG_SOUND_CONFIG(centipdb_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_rand_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chaknpop.c b/src/mame/drivers/chaknpop.c
index c781634431d..e4af56e852c 100644
--- a/src/mame/drivers/chaknpop.c
+++ b/src/mame/drivers/chaknpop.c
@@ -161,27 +161,6 @@ static ADDRESS_MAP_START( chaknpop_map, AS_PROGRAM, 8, chaknpop_state )
AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank1") // bitmap plane 1-4
ADDRESS_MAP_END
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"), // DSW A
- DEVCB_INPUT_PORT("DSWB"), // DSW B
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(chaknpop_state,unknown_port_1_w), // ??
- DEVCB_DRIVER_MEMBER(chaknpop_state,unknown_port_2_w) // ??
-};
-
-
/***************************************************************************
Input Port(s)
@@ -394,11 +373,13 @@ static MACHINE_CONFIG_START( chaknpop, chaknpop_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18MHz / 12) /* Verified on PCB */
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_18MHz / 12) /* Verified on PCB */
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(chaknpop_state, unknown_port_1_w)) // ??
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(chaknpop_state, unknown_port_2_w)) // ??
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c
index 7c4d7b4f272..91852d7971f 100644
--- a/src/mame/drivers/chanbara.c
+++ b/src/mame/drivers/chanbara.c
@@ -373,18 +373,6 @@ WRITE_LINE_MEMBER(chanbara_state::sound_irq)
m_maincpu->set_input_line(0, state);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_0_w),
- DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_1_w),
-};
-
-
void chanbara_state::machine_start()
{
save_item(NAME(m_scroll));
@@ -421,7 +409,10 @@ static MACHINE_CONFIG_START( chanbara, chanbara_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 12000000/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(chanbara_state, sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+
+
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(chanbara_state, chanbara_ay_out_0_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(chanbara_state, chanbara_ay_out_1_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c
index 521ebe88bf1..7aec5cc449e 100644
--- a/src/mame/drivers/changela.c
+++ b/src/mame/drivers/changela.c
@@ -379,28 +379,6 @@ static INPUT_PORTS_START( changela )
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_CONDITION("DSWA", 0x20, EQUALS, 0x00)
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWC"),
- DEVCB_INPUT_PORT("DSWD"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
TIMER_DEVICE_CALLBACK_MEMBER(changela_state::changela_scanline)
{
int scanline = param;
@@ -517,11 +495,13 @@ static MACHINE_CONFIG_START( changela, changela_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWC"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWD"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c
index 90414bd0611..d8868b233bb 100644
--- a/src/mame/drivers/chinagat.c
+++ b/src/mame/drivers/chinagat.c
@@ -510,15 +510,6 @@ WRITE_LINE_MEMBER(chinagat_state::chinagat_irq_handler)
m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE );
}
-/* This is only on the second bootleg board */
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
MACHINE_START_MEMBER(chinagat_state,chinagat)
{
/* configure banks */
@@ -682,7 +673,6 @@ static MACHINE_CONFIG_START( saiyugoub2, chinagat_state )
MCFG_SOUND_ADD("ym1", YM2203, 3579545)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(chinagat_state, chinagat_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c
index c67b589d150..b9fe7c3d179 100644
--- a/src/mame/drivers/chinsan.c
+++ b/src/mame/drivers/chinsan.c
@@ -150,17 +150,6 @@ WRITE8_MEMBER(chinsan_state::ym_port_w2)
logerror("ym_write port 2 %02x\n", data);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w1),
- DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w2)
-};
-
WRITE8_MEMBER(chinsan_state::chinsan_port00_w)
{
m_port_select = data;
@@ -618,7 +607,10 @@ static MACHINE_CONFIG_START( chinsan, chinsan_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000) /* ? Mhz */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(chinsan_state, ym_port_w1))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(chinsan_state, ym_port_w2))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c
index 2cf4c720b30..73156ba3d92 100644
--- a/src/mame/drivers/citycon.c
+++ b/src/mame/drivers/citycon.c
@@ -169,20 +169,6 @@ static GFXDECODE_START( citycon )
GFXDECODE_ENTRY( "gfx3", 0x0b000, tilelayout, 256, 16 )
GFXDECODE_END
-
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
void citycon_state::machine_start()
{
save_item(NAME(m_bg_image));
@@ -226,7 +212,8 @@ static MACHINE_CONFIG_START( citycon, citycon_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ymsnd", YM2203, 1250000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r))
MCFG_SOUND_ROUTE(0, "mono", 0.40)
MCFG_SOUND_ROUTE(1, "mono", 0.40)
MCFG_SOUND_ROUTE(2, "mono", 0.40)
diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c
index 066df5cf216..c4ce91c563c 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -867,16 +867,6 @@ MACHINE_RESET_MEMBER(cntsteer_state,zerotrgt)
MACHINE_RESET_CALL_MEMBER(cntsteer);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("dac", dac_device, write_unsigned8),
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( cntsteer, cntsteer_state )
/* basic machine hardware */
@@ -916,7 +906,7 @@ static MACHINE_CONFIG_START( cntsteer, cntsteer_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c
index f483ca33f1f..c5841c2b679 100644
--- a/src/mame/drivers/coinmstr.c
+++ b/src/mame/drivers/coinmstr.c
@@ -1437,18 +1437,6 @@ UINT32 coinmstr_state::screen_update_coinmstr(screen_device &screen, bitmap_ind1
}
-
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( coinmstr, coinmstr_state )
MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) // 7 MHz.
MCFG_CPU_PROGRAM_MAP(coinmstr_map)
@@ -1486,7 +1474,7 @@ static MACHINE_CONFIG_START( coinmstr, coinmstr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c
index 1352998d428..f12a86b2ed7 100644
--- a/src/mame/drivers/combatsc.c
+++ b/src/mame/drivers/combatsc.c
@@ -635,26 +635,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(combatsc_state,combatsc_portA_w),
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_bootleg_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
MACHINE_START_MEMBER(combatsc_state,combatsc)
{
UINT8 *MEM = memregion("maincpu")->base() + 0x38000;
@@ -748,7 +728,7 @@ static MACHINE_CONFIG_START( combatsc, combatsc_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(combatsc_state, combatsc_portA_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK)
@@ -792,7 +772,6 @@ static MACHINE_CONFIG_START( combatscb, combatsc_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_bootleg_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("msm5205", MSM5205, 384000)
diff --git a/src/mame/drivers/compgolf.c b/src/mame/drivers/compgolf.c
index fecbd1143cf..b8135384a2b 100644
--- a/src/mame/drivers/compgolf.c
+++ b/src/mame/drivers/compgolf.c
@@ -204,17 +204,6 @@ WRITE_LINE_MEMBER(compgolf_state::sound_irq)
m_maincpu->set_input_line(0, state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrollx_lo_w),
- DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrolly_lo_w),
-};
-
-
/*************************************
*
* Machine driver
@@ -265,7 +254,8 @@ static MACHINE_CONFIG_START( compgolf, compgolf_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(compgolf_state, sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(compgolf_state, compgolf_scrollx_lo_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(compgolf_state, compgolf_scrolly_lo_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c
index cfbafe535d6..e4cac2d16c0 100644
--- a/src/mame/drivers/corona.c
+++ b/src/mame/drivers/corona.c
@@ -1342,20 +1342,6 @@ INPUT_PORTS_END
/*******************************************
-* Sound Interface *
-*******************************************/
-static const ay8910_interface aysnd_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* Port A read */
- DEVCB_NULL, /* Port B read */
- DEVCB_DRIVER_MEMBER(corona_state,ay_port_a_out), /* Port A write */
- DEVCB_DRIVER_MEMBER(corona_state,ay_port_b_out) /* Port B write */
-};
-
-
-/*******************************************
* Machine Drivers *
*******************************************/
@@ -1388,7 +1374,8 @@ static MACHINE_CONFIG_START( winner81, corona_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, AY_CLK1) /* measured */
- MCFG_SOUND_CONFIG(aysnd_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(corona_state, ay_port_a_out)) /* Port A write */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(corona_state, ay_port_b_out)) /* Port B write */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c
index 6f87b0d3a28..0c54c5a8e5d 100644
--- a/src/mame/drivers/crshrace.c
+++ b/src/mame/drivers/crshrace.c
@@ -467,6 +467,7 @@ static MACHINE_CONFIG_START( crshrace, crshrace_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(crshrace_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c
index 17fce3f8465..c29b570b3d2 100644
--- a/src/mame/drivers/darius.c
+++ b/src/mame/drivers/darius.c
@@ -759,27 +759,6 @@ WRITE_LINE_MEMBER(darius_state::irqhandler) /* assumes Z80 sandwiched between 68
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA read */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA0), /* portA write */
- DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB0), /* portB write */
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA read */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA1), /* portA write */
- DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB1) /* portB write */
-};
-
-
/***********************************************************
MACHINE DRIVERS
***********************************************************/
@@ -898,7 +877,8 @@ static MACHINE_CONFIG_START( darius, darius_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(darius_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(darius_state, darius_write_portA0)) /* portA write */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(darius_state, darius_write_portB0)) /* portB write */
MCFG_SOUND_ROUTE(0, "filter0.0l", 0.08)
MCFG_SOUND_ROUTE(0, "filter0.0r", 0.08)
MCFG_SOUND_ROUTE(1, "filter0.1l", 0.08)
@@ -909,7 +889,8 @@ static MACHINE_CONFIG_START( darius, darius_state )
MCFG_SOUND_ROUTE(3, "filter0.3r", 0.60)
MCFG_SOUND_ADD("ym2", YM2203, 4000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(darius_state, darius_write_portA1)) /* portA write */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(darius_state, darius_write_portB1)) /* portB write */
MCFG_SOUND_ROUTE(0, "filter1.0l", 0.08)
MCFG_SOUND_ROUTE(0, "filter1.0r", 0.08)
MCFG_SOUND_ROUTE(1, "filter1.1l", 0.08)
diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c
index 33eca144b7f..664c564b396 100644
--- a/src/mame/drivers/ddayjlc.c
+++ b/src/mame/drivers/ddayjlc.c
@@ -429,16 +429,6 @@ UINT32 ddayjlc_state::screen_update_ddayjlc(screen_device &screen, bitmap_ind16
return 0;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(ddayjlc_state::ddayjlc_interrupt)
{
if(m_main_nmi_enable)
@@ -542,7 +532,7 @@ static MACHINE_CONFIG_START( ddayjlc, ddayjlc_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 12000000/6)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ay2", AY8910, 12000000/6)
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index c265ca3ebd9..30184da8de4 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -4182,15 +4182,6 @@ ADDRESS_MAP_END
Hanafuda Hana Tengoku
***************************************************************************/
-static const ay8910_interface htengoku_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_DRIVER_MEMBER(ddenlovr_state,htengoku_dsw_r), DEVCB_NULL, // R
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(ddenlovr_state,htengoku_dsw_w) // W
-};
-
static ADDRESS_MAP_START( yarunara_mem_map, AS_PROGRAM, 8, dynax_state )
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
@@ -4231,7 +4222,8 @@ static MACHINE_CONFIG_START( htengoku, ddenlovr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 20000000 / 16)
- MCFG_SOUND_CONFIG(htengoku_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ddenlovr_state, htengoku_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, htengoku_dsw_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ymsnd", YM2413, 3579545)
@@ -9475,16 +9467,6 @@ static MACHINE_CONFIG_DERIVED( akamaru, ddenlovr )
MCFG_CPU_PROGRAM_MAP(akamaru_map)
MACHINE_CONFIG_END
-
-static const ay8910_interface quiz365_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_DRIVER_MEMBER(ddenlovr_state,quiz365_input_r), DEVCB_NULL, // R
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(ddenlovr_state,ddenlovr_select_w) // W
-};
-
static MACHINE_CONFIG_DERIVED( quiz365, ddenlovr )
/* basic machine hardware */
@@ -9492,7 +9474,8 @@ static MACHINE_CONFIG_DERIVED( quiz365, ddenlovr )
MCFG_CPU_PROGRAM_MAP(quiz365_map)
MCFG_SOUND_MODIFY("aysnd")
- MCFG_SOUND_CONFIG(quiz365_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ddenlovr_state, quiz365_input_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( nettoqc, ddenlovr )
@@ -9902,15 +9885,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddenlovr_state::mjmyster_irq)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa);
}
-static const ay8910_interface mjmyster_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_NULL, DEVCB_NULL, // R
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(ddenlovr_state,ddenlovr_select_w) // W
-};
-
WRITE_LINE_MEMBER(ddenlovr_state::mjmyster_rtc_irq)
{
/* I haven't found a irq ack register, so I need this kludge to
@@ -9939,7 +9913,7 @@ static MACHINE_CONFIG_DERIVED( mjmyster, quizchq )
MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster)
MCFG_SOUND_ADD("aysnd", AY8910, 3579545)
- MCFG_SOUND_CONFIG(mjmyster_ay8910_interface)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -9966,15 +9940,6 @@ INTERRUPT_GEN_MEMBER(ddenlovr_state::hginga_irq)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
}
-static const ay8910_interface hginga_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_DRIVER_MEMBER(ddenlovr_state,hginga_dsw_r), DEVCB_NULL, // R
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(ddenlovr_state,ddenlovr_select_w) // W
-};
-
WRITE_LINE_MEMBER(ddenlovr_state::hginga_rtc_irq)
{
/* I haven't found a irq ack register, so I need this kludge to
@@ -10001,7 +9966,8 @@ static MACHINE_CONFIG_DERIVED( hginga, quizchq )
MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster)
MCFG_SOUND_ADD("aysnd", AY8910, 3579545)
- MCFG_SOUND_CONFIG(hginga_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ddenlovr_state, hginga_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -10019,7 +9985,8 @@ static MACHINE_CONFIG_DERIVED( hgokou, quizchq )
MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster)
MCFG_SOUND_ADD("aysnd", AY8910, 3579545)
- MCFG_SOUND_CONFIG(hginga_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ddenlovr_state, hginga_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -10055,7 +10022,7 @@ static MACHINE_CONFIG_DERIVED( mjmyuniv, quizchq )
MCFG_MSM6242_OUT_INT_HANDLER(WRITELINE(ddenlovr_state, mjmyster_rtc_irq))
MCFG_SOUND_ADD("aysnd", AY8910, 1789772)
- MCFG_SOUND_CONFIG(mjmyster_ay8910_interface)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -10075,7 +10042,7 @@ static MACHINE_CONFIG_DERIVED( mjmyornt, quizchq )
MCFG_MSM6242_OUT_INT_HANDLER(WRITELINE(ddenlovr_state, mjmyster_rtc_irq))
MCFG_SOUND_ADD("aysnd", AY8910, 1789772)
- MCFG_SOUND_CONFIG(mjmyster_ay8910_interface)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -10277,15 +10244,6 @@ MACHINE_CONFIG_END
Return Of Sel Jan II
***************************************************************************/
-static const ay8910_interface seljan2_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_DRIVER_MEMBER(ddenlovr_state,seljan2_dsw_r), DEVCB_NULL, // R
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(ddenlovr_state,ddenlovr_select_w) // W
-};
-
MACHINE_START_MEMBER(ddenlovr_state,seljan2)
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -10332,7 +10290,8 @@ static MACHINE_CONFIG_START( seljan2, ddenlovr_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_28_63636MHz / 8)
- MCFG_SOUND_CONFIG(seljan2_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ddenlovr_state, seljan2_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ddenlovr_state, ddenlovr_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_OKIM6295_ADD("oki", XTAL_28_63636MHz / 28, OKIM6295_PIN7_HIGH) // ?
diff --git a/src/mame/drivers/ddribble.c b/src/mame/drivers/ddribble.c
index ff440e8c588..52c1355de09 100644
--- a/src/mame/drivers/ddribble.c
+++ b/src/mame/drivers/ddribble.c
@@ -219,17 +219,6 @@ static GFXDECODE_START( ddribble )
GFXDECODE_ENTRY( "gfx2", 0x40000, spritelayout, 64, 16 ) /* colors 0-15 but using lookup table */
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_busy_r),
- DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_ctrl_w),
- DEVCB_NULL
-};
-
-
void ddribble_state::machine_start()
{
@@ -296,7 +285,8 @@ static MACHINE_CONFIG_START( ddribble, ddribble_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_3_579545MHz) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(ddribble_state, ddribble_vlm5030_busy_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ddribble_state, ddribble_vlm5030_ctrl_w))
MCFG_SOUND_ROUTE(0, "filter1", 0.25)
MCFG_SOUND_ROUTE(1, "filter2", 0.25)
MCFG_SOUND_ROUTE(2, "filter3", 0.25)
diff --git a/src/mame/drivers/dfruit.c b/src/mame/drivers/dfruit.c
index 07bb36b2143..1c806079423 100644
--- a/src/mame/drivers/dfruit.c
+++ b/src/mame/drivers/dfruit.c
@@ -360,15 +360,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::dfruit_irq_scanline)
}
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN4"), DEVCB_INPUT_PORT("IN5"), DEVCB_NULL, DEVCB_NULL,
-};
-
-
-
#define MASTER_CLOCK XTAL_14MHz
static MACHINE_CONFIG_START( dfruit, dfruit_state )
@@ -406,7 +397,8 @@ static MACHINE_CONFIG_START( dfruit, dfruit_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn", YM2203, MASTER_CLOCK/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index 04dfb4af081..771fd47a4f5 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -687,23 +687,6 @@ static GFXDECODE_START( dlair )
GFXDECODE_END
-
-/*************************************
- *
- * Sound chip definitions
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2")
-};
-
-
-
/*************************************
*
* Machine drivers
@@ -724,7 +707,8 @@ static MACHINE_CONFIG_START( dlair_base, dlair_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK_US/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c
index 6ffee9346d9..6e936f7815e 100644
--- a/src/mame/drivers/dominob.c
+++ b/src/mame/drivers/dominob.c
@@ -286,17 +286,6 @@ static GFXDECODE_START( dominob )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( dominob, dominob_state )
/* basic machine hardware */
@@ -322,7 +311,7 @@ static MACHINE_CONFIG_START( dominob, dominob_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_12MHz/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c
index a0f01eca09e..9e9963ea8c7 100644
--- a/src/mame/drivers/dooyong.c
+++ b/src/mame/drivers/dooyong.c
@@ -789,20 +789,6 @@ WRITE_LINE_MEMBER(dooyong_state::irqhandler_2203_2)
m_audiocpu->set_input_line(0, (m_interrupt_line_1 | m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
/***************************************************************************
Machine driver(s)
@@ -815,12 +801,12 @@ static MACHINE_CONFIG_FRAGMENT( sound_2203 )
MCFG_SOUND_ADD("ym1", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state,irqhandler_2203_1))
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dooyong_state, unk_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state, irqhandler_2203_2))
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dooyong_state, unk_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
@@ -885,12 +871,12 @@ static MACHINE_CONFIG_START( lastday, dooyong_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state,irqhandler_2203_1))
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dooyong_state, unk_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state, irqhandler_2203_2))
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dooyong_state, unk_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c
index 736d4a5d834..1f2452a0370 100644
--- a/src/mame/drivers/dunhuang.c
+++ b/src/mame/drivers/dunhuang.c
@@ -761,17 +761,6 @@ GFXDECODE_END
Machine Drivers
***************************************************************************/
-static const ay8910_interface dunhuang_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A B
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(dunhuang_state,dunhuang_dsw_r), // R
- DEVCB_DRIVER_MEMBER(dunhuang_state, dunhuang_input_w), DEVCB_NULL // W
-};
-
-
-
void dunhuang_state::machine_start()
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -850,7 +839,8 @@ static MACHINE_CONFIG_START( dunhuang, dunhuang_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("ay8910", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(dunhuang_ay8910_interface)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(dunhuang_state, dunhuang_dsw_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(dunhuang_state, dunhuang_input_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_OKIM6295_ADD("oki", 12000000/8, OKIM6295_PIN7_HIGH)
diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c
index 00fdc877e0c..da1e1717d60 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -999,17 +999,6 @@ PALETTE_INIT_MEMBER(dwarfd_state, dwarfd)
palette.set_pen_color(6, rgb_t(255, 0, 0));
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN2"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
void dwarfd_state::machine_start()
{
save_item(NAME(m_bank));
@@ -1077,7 +1066,8 @@ static MACHINE_CONFIG_START( dwarfd, dwarfd_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c
index 7f79d9695b5..99fa5c1c17f 100644
--- a/src/mame/drivers/dynax.c
+++ b/src/mame/drivers/dynax.c
@@ -4056,17 +4056,6 @@ MACHINE_START_MEMBER(dynax_state,hnoridur)
Hana no Mai
***************************************************************************/
-static const ay8910_interface hanamai_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"), /* Port A Read: DSW */
- DEVCB_INPUT_PORT("DSW0"), /* Port B Read: DSW */
- DEVCB_NULL, /* Port A Write */
- DEVCB_NULL, /* Port B Write */
-};
-
-
static MACHINE_CONFIG_START( hanamai, dynax_state )
/* basic machine hardware */
@@ -4102,7 +4091,8 @@ static MACHINE_CONFIG_START( hanamai, dynax_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, sprtmtch_sound_callback))
- MCFG_YM2203_AY8910_INTF(&hanamai_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW0"))
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
@@ -4120,13 +4110,6 @@ MACHINE_CONFIG_END
Hana Oriduru
***************************************************************************/
-static const ay8910_interface hnoridur_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0") /* Port A Read: DSW */
-};
-
static MACHINE_CONFIG_START( hnoridur, dynax_state )
/* basic machine hardware */
@@ -4157,7 +4140,7 @@ static MACHINE_CONFIG_START( hnoridur, dynax_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 22000000 / 16)
- MCFG_SOUND_CONFIG(hnoridur_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ymsnd", YM2413, 3579545)
@@ -4204,7 +4187,7 @@ static MACHINE_CONFIG_START( hjingi, dynax_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_22MHz / 16)
- MCFG_SOUND_CONFIG(hnoridur_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ymsnd", YM2413, XTAL_3_579545MHz )
@@ -4221,16 +4204,6 @@ MACHINE_CONFIG_END
Sports Match
***************************************************************************/
-static const ay8910_interface sprtmtch_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"), /* Port A Read: DSW */
- DEVCB_INPUT_PORT("DSW1"), /* Port B Read: DSW */
- DEVCB_NULL, /* Port A Write */
- DEVCB_NULL, /* Port B Write */
-};
-
static MACHINE_CONFIG_START( sprtmtch, dynax_state )
/* basic machine hardware */
@@ -4263,7 +4236,8 @@ static MACHINE_CONFIG_START( sprtmtch, dynax_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, sprtmtch_sound_callback))
- MCFG_YM2203_AY8910_INTF(&sprtmtch_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
@@ -4390,13 +4364,6 @@ MACHINE_CONFIG_END
// dual monitor, 2 CPU's, 2 blitters
-static const ay8910_interface jantouki_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
MACHINE_START_MEMBER(dynax_state,jantouki)
{
UINT8 *MAIN = memregion("maincpu")->base();
@@ -4461,7 +4428,6 @@ static MACHINE_CONFIG_START( jantouki, dynax_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, jantouki_sound_callback))
- MCFG_YM2203_AY8910_INTF(&jantouki_ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
@@ -4594,15 +4560,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::tenkai_interrupt)
m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE);
}
-static const ay8910_interface tenkai_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- // A // B
- DEVCB_DRIVER_MEMBER(dynax_state,tenkai_dsw_r), DEVCB_NULL, // Read
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(dynax_state,tenkai_dswsel_w) // Write
-};
-
MACHINE_START_MEMBER(dynax_state,tenkai)
{
MACHINE_START_CALL_MEMBER(dynax);
@@ -4646,7 +4603,8 @@ static MACHINE_CONFIG_START( tenkai, dynax_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 22000000 / 16)
- MCFG_SOUND_CONFIG(tenkai_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dynax_state, tenkai_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(dynax_state, tenkai_dswsel_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ymsnd", YM2413, 3579545)
@@ -4716,7 +4674,8 @@ static MACHINE_CONFIG_START( gekisha, dynax_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz / 16) // ?
- MCFG_SOUND_CONFIG(tenkai_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dynax_state, tenkai_dsw_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(dynax_state, tenkai_dswsel_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ymsnd", YM2413, XTAL_24MHz / 8) // ?
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index b19f9db34d8..c64965c982b 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -437,20 +437,6 @@ CUSTOM_INPUT_MEMBER(enigma2_state::p2_controls_r)
return ioport("P1CONTROLS")->read();
}
-
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(enigma2_state,sound_latch_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(enigma2_state,protection_data_w)
-};
-
-
-
static ADDRESS_MAP_START( engima2_main_cpu_map, AS_PROGRAM, 8, enigma2_state )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x1fff) AM_ROM AM_WRITENOP
@@ -628,7 +614,8 @@ static MACHINE_CONFIG_START( enigma2, enigma2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY8910_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(enigma2_state, sound_latch_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(enigma2_state, protection_data_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -654,7 +641,8 @@ static MACHINE_CONFIG_START( enigma2a, enigma2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY8910_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(enigma2_state, sound_latch_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(enigma2_state, protection_data_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c
index dec2a2d1d6c..c1b4ed45cdc 100644
--- a/src/mame/drivers/equites.c
+++ b/src/mame/drivers/equites.c
@@ -1089,17 +1089,6 @@ GFXDECODE_END
/******************************************************************************/
-static const ay8910_interface equites_8910intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(equites_state,equites_8910porta_w),
- DEVCB_DRIVER_MEMBER(equites_state,equites_8910portb_w)
-};
-
-
static const char *const alphamc07_sample_names[] =
{
"*equites",
@@ -1144,7 +1133,8 @@ static MACHINE_CONFIG_FRAGMENT( common_sound )
MCFG_SOUND_ROUTE(10,"mono", 0.12) // pin 22 Noise Output (this actually feeds an analog section)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_6_144MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(equites_8910intf)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(equites_state, equites_8910porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(equites_state, equites_8910portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_DAC_ADD("dac1")
diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c
index 398725fb4e7..bfdaee6a80f 100644
--- a/src/mame/drivers/ettrivia.c
+++ b/src/mame/drivers/ettrivia.c
@@ -273,27 +273,6 @@ UINT32 ettrivia_state::screen_update_ettrivia(screen_device &screen, bitmap_ind1
return 0;
}
-static const ay8910_interface ay8912_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8912_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
INTERRUPT_GEN_MEMBER(ettrivia_state::ettrivia_interrupt)
{
if( ioport("COIN")->read() & 0x01 )
@@ -330,11 +309,11 @@ static MACHINE_CONFIG_START( ettrivia, ettrivia_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8912_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay3", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8912_interface_3)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/exerion.c b/src/mame/drivers/exerion.c
index 5097a1f6be6..b01ffcdf4cd 100644
--- a/src/mame/drivers/exerion.c
+++ b/src/mame/drivers/exerion.c
@@ -335,25 +335,6 @@ static GFXDECODE_START( exerion )
GFXDECODE_END
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(exerion_state,exerion_porta_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(exerion_state,exerion_portb_w)
-};
-
-
-
/*************************************
*
* Machine drivers
@@ -413,7 +394,8 @@ static MACHINE_CONFIG_START( exerion, exerion_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, EXERION_AY8910_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(exerion_state, exerion_porta_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(exerion_state, exerion_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c
index 278ca0602d9..91b9b6646e8 100644
--- a/src/mame/drivers/f1gp.c
+++ b/src/mame/drivers/f1gp.c
@@ -450,6 +450,7 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(f1gp_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/fireball.c b/src/mame/drivers/fireball.c
index 2501aec1421..9f8f7f2e07e 100644
--- a/src/mame/drivers/fireball.c
+++ b/src/mame/drivers/fireball.c
@@ -459,21 +459,6 @@ void fireball_state::machine_reset()
output_set_value("RV", 0);
}
-
-/******************************
-* AY 3-8910 *
-******************************/
-
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/*************************
* INT callback *
*************************/
@@ -515,7 +500,6 @@ static MACHINE_CONFIG_START( fireball, fireball_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, AY_CLK)
- MCFG_SOUND_CONFIG(ay8912_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
/* Video */
diff --git a/src/mame/drivers/flipjack.c b/src/mame/drivers/flipjack.c
index 73eb8b51171..10b9db22923 100644
--- a/src/mame/drivers/flipjack.c
+++ b/src/mame/drivers/flipjack.c
@@ -403,27 +403,6 @@ INPUT_PORTS_END
***************************************************************************/
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT, /* Flags */
- AY8910_DEFAULT_LOADS, /* Load on channel in ohms */
- DEVCB_DRIVER_MEMBER(flipjack_state,flipjack_soundlatch_r), /* Port A read */
- DEVCB_NULL, /* Port B read */
- DEVCB_NULL, /* Port A write */
- DEVCB_NULL /* Port B write */
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT, /* Flags */
- AY8910_DEFAULT_LOADS, /* Load on channel in ohms */
- DEVCB_NULL, /* Port A read */
- DEVCB_NULL, /* Port B read */
- DEVCB_NULL, /* Port A write */
- DEVCB_NULL /* Port B write */
-};
-
-
static const gfx_layout tilelayout =
{
8, 8,
@@ -490,11 +469,10 @@ static MACHINE_CONFIG_START( flipjack, flipjack_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MASTER_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(flipjack_state, flipjack_soundlatch_r)) /* Port A read */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, MASTER_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config_2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c
index 8b03dd7231c..ea264722867 100644
--- a/src/mame/drivers/flstory.c
+++ b/src/mame/drivers/flstory.c
@@ -972,16 +972,6 @@ static GFXDECODE_START( flstory )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(flstory_state,sound_control_2_w),
- DEVCB_DRIVER_MEMBER(flstory_state,sound_control_3_w)
-};
-
void flstory_state::machine_start()
{
/* video */
@@ -1087,7 +1077,8 @@ static MACHINE_CONFIG_START( flstory, flstory_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_8MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("msm", MSM5232, XTAL_8MHz/4) /* verified on pcb */
@@ -1146,7 +1137,8 @@ static MACHINE_CONFIG_START( onna34ro, flstory_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
@@ -1205,7 +1197,8 @@ static MACHINE_CONFIG_START( victnine, flstory_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
@@ -1270,7 +1263,8 @@ static MACHINE_CONFIG_START( rumba, flstory_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_8MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("msm", MSM5232, XTAL_8MHz/4) /* verified on pcb */
diff --git a/src/mame/drivers/forte2.c b/src/mame/drivers/forte2.c
index 20c51193c70..c6e74670df4 100644
--- a/src/mame/drivers/forte2.c
+++ b/src/mame/drivers/forte2.c
@@ -87,17 +87,6 @@ WRITE8_MEMBER(forte2_state::forte2_ay8910_set_input_mask)
m_input_mask = data;
}
-static const ay8910_interface forte2_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(forte2_state,forte2_ay8910_read_input),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(forte2_state,forte2_ay8910_set_input_mask)
-};
-
-
WRITE_LINE_MEMBER(forte2_state::vdp_interrupt)
{
m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
@@ -132,7 +121,8 @@ static MACHINE_CONFIG_START( pesadelo, forte2_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, (float)XTAL_3_579545MHz/2)
- MCFG_SOUND_CONFIG(forte2_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(forte2_state, forte2_ay8910_read_input))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(forte2_state, forte2_ay8910_set_input_mask))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c
index af596c8483d..89a6854c2b4 100644
--- a/src/mame/drivers/fortecar.c
+++ b/src/mame/drivers/fortecar.c
@@ -514,18 +514,6 @@ Seems to work properly, but must be checked closely...
// logerror("AY port B write %02x\n",data);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(fortecar_state,ayporta_w),
- DEVCB_DRIVER_MEMBER(fortecar_state,ayportb_w)
-};
-
-
static ADDRESS_MAP_START( fortecar_map, AS_PROGRAM, 8, fortecar_state )
AM_RANGE(0x0000, 0xbfff) AM_ROM
AM_RANGE(0xc000, 0xc7ff) AM_ROM
@@ -690,7 +678,8 @@ static MACHINE_CONFIG_START( fortecar, fortecar_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) /* 1.5 MHz, measured */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortecar_state, ayporta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortecar_state, ayportb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c
index 23226dda05d..afeb54b7efd 100644
--- a/src/mame/drivers/fromanc2.c
+++ b/src/mame/drivers/fromanc2.c
@@ -564,6 +564,7 @@ static MACHINE_CONFIG_START( fromanc2, fromanc2_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(fromanc2_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.75)
MCFG_SOUND_ROUTE(2, "mono", 0.75)
@@ -616,6 +617,7 @@ static MACHINE_CONFIG_START( fromancr, fromanc2_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(fromanc2_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.75)
MCFG_SOUND_ROUTE(2, "mono", 0.75)
@@ -665,6 +667,7 @@ static MACHINE_CONFIG_START( fromanc4, fromanc2_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(fromanc2_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.75)
MCFG_SOUND_ROUTE(2, "mono", 0.75)
diff --git a/src/mame/drivers/funkybee.c b/src/mame/drivers/funkybee.c
index f07d3d80ac6..9b19f67873e 100644
--- a/src/mame/drivers/funkybee.c
+++ b/src/mame/drivers/funkybee.c
@@ -267,17 +267,6 @@ static GFXDECODE_START( funkybee )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
void funkybee_state::machine_start()
{
save_item(NAME(m_gfx_bank));
@@ -314,7 +303,7 @@ static MACHINE_CONFIG_START( funkybee, funkybee_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c
index 5a6d652b123..3e0dfa3ed39 100644
--- a/src/mame/drivers/funworld.c
+++ b/src/mame/drivers/funworld.c
@@ -2843,30 +2843,6 @@ READ8_MEMBER(funworld_state::funquiz_ay8910_b_r)
return 0x00;
}
-/************************
-* Sound Interface *
-************************/
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA in */
- DEVCB_NULL, /* portB in */
- DEVCB_DRIVER_MEMBER(funworld_state,funworld_lamp_a_w), /* portA out */
- DEVCB_DRIVER_MEMBER(funworld_state,funworld_lamp_b_w) /* portB out */
-};
-
-static const ay8910_interface funquiz_ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(funworld_state,funquiz_ay8910_a_r), /* portA in */
- DEVCB_DRIVER_MEMBER(funworld_state,funquiz_ay8910_b_r), /* portB in */
- DEVCB_DRIVER_MEMBER(funworld_state,funworld_lamp_a_w), /* portA out */
- DEVCB_DRIVER_MEMBER(funworld_state,funworld_lamp_b_w) /* portB out */
-};
-
/********************************
* Machine Start & Reset *
********************************/
@@ -2930,7 +2906,8 @@ static MACHINE_CONFIG_START( fw1stpal, funworld_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, SND_CLOCK) /* 2MHz */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(funworld_state, funworld_lamp_a_w)) /* portA out */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(funworld_state, funworld_lamp_b_w)) /* portB out */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.5) /* analyzed to avoid clips */
MACHINE_CONFIG_END
@@ -2950,7 +2927,10 @@ static MACHINE_CONFIG_DERIVED( funquiz, fw1stpal )
MCFG_CPU_PROGRAM_MAP(funquiz_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", funworld_state, nmi_line_pulse)
MCFG_SOUND_REPLACE("ay8910", AY8910, SND_CLOCK) /* 2MHz */
- MCFG_SOUND_CONFIG(funquiz_ay8910_intf)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(funworld_state, funquiz_ay8910_a_r)) /* portA in */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(funworld_state, funquiz_ay8910_b_r)) /* portB in */
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(funworld_state, funworld_lamp_a_w)) /* portA out */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(funworld_state, funworld_lamp_b_w)) /* portB out */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.5)
MACHINE_CONFIG_END
@@ -2968,7 +2948,8 @@ static MACHINE_CONFIG_DERIVED( magicrd2, fw1stpal )
MCFG_MC6845_CHAR_WIDTH(4)
MCFG_SOUND_REPLACE("ay8910", AY8910, SND_CLOCK) /* 2MHz */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(funworld_state, funworld_lamp_a_w)) /* portA out */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(funworld_state, funworld_lamp_b_w)) /* portB out */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.5) /* analyzed to avoid clips */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c
index 9b3501d4cf2..f00bd32ef0c 100644
--- a/src/mame/drivers/gaiden.c
+++ b/src/mame/drivers/gaiden.c
@@ -741,13 +741,6 @@ WRITE_LINE_MEMBER(gaiden_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( shadoww, gaiden_state )
/* basic machine hardware */
@@ -781,7 +774,6 @@ static MACHINE_CONFIG_START( shadoww, gaiden_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(gaiden_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -957,7 +949,6 @@ static MACHINE_CONFIG_START( mastninj, gaiden_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000) /* ?? MHz */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(gaiden_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index 212a3ee48c2..22511269a26 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -4933,86 +4933,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface frogger_ay8910_interface =
-{
- AY8910_DISCRETE_OUTPUT,
- {RES_K(5.1), RES_K(5.1), RES_K(5.1)},
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(galaxian_state,frogger_sound_timer_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface konami_ay8910_interface_1 =
-{
- AY8910_DISCRETE_OUTPUT,
- {RES_K(5.1), RES_K(5.1), RES_K(5.1)},
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(galaxian_state,konami_sound_timer_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface konami_ay8910_interface_2 =
-{
- AY8910_DISCRETE_OUTPUT,
- {RES_K(5.1), RES_K(5.1), RES_K(5.1)},
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface explorer_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(galaxian_state,explorer_sound_latch_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface explorer_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(galaxian_state,konami_sound_timer_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface sfx_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_w),
- DEVCB_DRIVER_MEMBER(galaxian_state,sfx_sample_control_w)
-};
-
-static const ay8910_interface scorpion_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("digitalker", digitalker_device, digitalker_data_w),
- DEVCB_DRIVER_MEMBER(galaxian_state,scorpion_digitalker_control_w)
-};
-
-static const ay8910_interface checkmaj_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static const discrete_mixer_desc konami_sound_mixer_desc =
{DISC_MIXER_IS_OP_AMP,
{RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1)},
@@ -5123,7 +5043,10 @@ static MACHINE_CONFIG_FRAGMENT( konami_sound_1x_ay8910 )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(frogger_ay8910_interface)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(5.1), RES_K(5.1), RES_K(5.1))
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(galaxian_state, frogger_sound_timer_r))
MCFG_SOUND_ROUTE_EX(0, "konami", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "konami", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "konami", 1.0, 2)
@@ -5143,13 +5066,17 @@ static MACHINE_CONFIG_FRAGMENT( konami_sound_2x_ay8910 )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(konami_ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(5.1), RES_K(5.1), RES_K(5.1))
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(galaxian_state, konami_sound_timer_r))
MCFG_SOUND_ROUTE_EX(0, "konami", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "konami", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "konami", 1.0, 2)
MCFG_SOUND_ADD("8910.1", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(konami_ay8910_interface_2)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(5.1), RES_K(5.1), RES_K(5.1))
MCFG_SOUND_ROUTE_EX(0, "konami", 1.0, 3)
MCFG_SOUND_ROUTE_EX(1, "konami", 1.0, 4)
MCFG_SOUND_ROUTE_EX(2, "konami", 1.0, 5)
@@ -5203,7 +5130,6 @@ static MACHINE_CONFIG_DERIVED( zigzag, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, 1789750)
-
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -5314,7 +5240,7 @@ static MACHINE_CONFIG_DERIVED( checkmaj, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, 1620000)
- MCFG_SOUND_CONFIG(checkmaj_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2)
MACHINE_CONFIG_END
@@ -5444,11 +5370,11 @@ static MACHINE_CONFIG_DERIVED( explorer, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(explorer_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, explorer_sound_latch_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("8910.1", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(explorer_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, konami_sound_timer_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -5472,7 +5398,8 @@ static MACHINE_CONFIG_DERIVED( scorpion, theend )
/* extra AY8910 with I/O ports */
MCFG_SOUND_ADD("8910.2", AY8910, KONAMI_SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(scorpion_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("digitalker", digitalker_device, digitalker_data_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(galaxian_state, scorpion_digitalker_control_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DIGITALKER_ADD("digitalker", 4000000)
@@ -5511,7 +5438,8 @@ static MACHINE_CONFIG_DERIVED( sfx, galaxian_base )
/* port on 2nd 8910 is used for communication */
MCFG_SOUND_MODIFY("8910.1")
- MCFG_SOUND_CONFIG(sfx_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(driver_device, soundlatch2_byte_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(galaxian_state, sfx_sample_control_w))
/* DAC for the sample player */
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c
index 69eaa11fbd3..3ffa6de7f11 100644
--- a/src/mame/drivers/galaxold.c
+++ b/src/mame/drivers/galaxold.c
@@ -2317,17 +2317,6 @@ static GFXDECODE_START( _4in1 )
GFXDECODE_END
-static const ay8910_interface bongo_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( galaxold_base, galaxold_state )
/* basic machine hardware */
@@ -2579,7 +2568,7 @@ static MACHINE_CONFIG_DERIVED( bongo, galaxold_base )
/* sound hardware */
MCFG_SOUND_ADD("aysnd", AY8910, PIXEL_CLOCK/4)
- MCFG_SOUND_CONFIG(bongo_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index 1135ce3958d..6995d53d9fd 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -931,16 +931,6 @@ INPUT_PORTS_END
*
*************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW3")
-};
-
-
-
MACHINE_START_MEMBER(gameplan_state,gameplan)
{
/* register for save states */
@@ -987,7 +977,8 @@ static MACHINE_CONFIG_START( gameplan, gameplan_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, GAMEPLAN_AY8910_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
/* via */
diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c
index c79aa852c07..321f7037766 100644
--- a/src/mame/drivers/gladiatr.c
+++ b/src/mame/drivers/gladiatr.c
@@ -616,27 +616,6 @@ READ8_MEMBER(gladiatr_state::f1_r)
return machine().rand();
}
-static const ay8910_interface ppking_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
- DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_INPUT_PORT("DSW3"), /* port B read */
- DEVCB_DRIVER_MEMBER(gladiatr_state,gladiator_int_control_w), /* port A write */
- DEVCB_NULL,
-};
-
-
static MACHINE_CONFIG_START( ppking, gladiatr_state )
/* basic machine hardware */
@@ -676,7 +655,8 @@ static MACHINE_CONFIG_START( ppking, gladiatr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&ppking_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(gladiatr_state, f1_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(gladiatr_state, f1_r))
MCFG_SOUND_ROUTE(0, "mono", 0.60)
MCFG_SOUND_ROUTE(1, "mono", 0.60)
MCFG_SOUND_ROUTE(2, "mono", 0.60)
@@ -731,7 +711,8 @@ static MACHINE_CONFIG_START( gladiatr, gladiatr_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(gladiatr_state, gladiator_ym_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3")) /* port B read */
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gladiatr_state, gladiator_int_control_w)) /* port A write */
MCFG_SOUND_ROUTE(0, "mono", 0.60)
MCFG_SOUND_ROUTE(1, "mono", 0.60)
MCFG_SOUND_ROUTE(2, "mono", 0.60)
diff --git a/src/mame/drivers/gluck2.c b/src/mame/drivers/gluck2.c
index 2e14e67280a..4fb3ffa322d 100644
--- a/src/mame/drivers/gluck2.c
+++ b/src/mame/drivers/gluck2.c
@@ -502,26 +502,6 @@ static GFXDECODE_START( gluck2 )
GFXDECODE_ENTRY( "gfx", 0x3800, tilelayout, 0, 16 )
GFXDECODE_END
-
-/*************************************************
-* Sound Interfaces *
-*************************************************/
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("SW3"),
- DEVCB_INPUT_PORT("SW2"),
-
-/* Output ports have a minimal activity during init.
- They seems unused (at least for Good Luck II)
-*/
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/*********************************************
* Machine Drivers *
*********************************************/
@@ -560,7 +540,11 @@ static MACHINE_CONFIG_START( gluck2, gluck2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* guess */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("SW2"))
+/* Output ports have a minimal activity during init.
+ They seems unused (at least for Good Luck II)
+*/
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ymsnd", YM2413, SND_CLOCK)
diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c
index ef37253cbea..d29089d12c3 100644
--- a/src/mame/drivers/goal92.c
+++ b/src/mame/drivers/goal92.c
@@ -214,13 +214,6 @@ WRITE_LINE_MEMBER(goal92_state::irqhandler)
//m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
WRITE_LINE_MEMBER(goal92_state::goal92_adpcm_int)
{
m_msm->data_w(m_msm5205next);
@@ -327,7 +320,6 @@ static MACHINE_CONFIG_START( goal92, goal92_state )
MCFG_SOUND_ADD("ym1", YM2203, 2500000/2)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(goal92_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ym2", YM2203, 2500000/2)
diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c
index 83b5aa9f7c0..c00a366c3cf 100644
--- a/src/mame/drivers/goldngam.c
+++ b/src/mame/drivers/goldngam.c
@@ -544,16 +544,6 @@ GFXDECODE_END
*************************/
-static const ay8910_interface goldngam_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, //r
- DEVCB_NULL, //r
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( swisspkr, goldngam_state )
/* basic machine hardware */
@@ -579,7 +569,6 @@ static MACHINE_CONFIG_START( swisspkr, goldngam_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/4)
- MCFG_SOUND_CONFIG(goldngam_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c
index 57f4431ab10..2fa73365111 100644
--- a/src/mame/drivers/goldnpkr.c
+++ b/src/mame/drivers/goldnpkr.c
@@ -3662,21 +3662,6 @@ static DISCRETE_SOUND_START( pottnpkr )
DISCRETE_SOUND_END
-/*******************************************
-* Other Sound Interfaces *
-*******************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/******************************************
* Machine Start & Reset *
******************************************/
@@ -3805,7 +3790,6 @@ static MACHINE_CONFIG_DERIVED( wcfalcon, goldnpkr_base )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/4) /* guess, seems ok */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -3883,7 +3867,6 @@ static MACHINE_CONFIG_DERIVED( wildcrdb, goldnpkr_base )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/4) /* guess, seems ok */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c
index c06aa5c13cd..f87de448e96 100644
--- a/src/mame/drivers/goldstar.c
+++ b/src/mame/drivers/goldstar.c
@@ -6168,26 +6168,6 @@ WRITE8_MEMBER(goldstar_state::system_outputc_w)
//popmessage("system_outputc_w %02x",data);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface cm_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_INPUT_PORT("DSW5"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
WRITE8_MEMBER(goldstar_state::ay8910_outputa_w)
{
//popmessage("ay8910_outputa_w %02x",data);
@@ -6198,27 +6178,6 @@ WRITE8_MEMBER(goldstar_state::ay8910_outputb_w)
//popmessage("ay8910_outputb_w %02x",data);
}
-static const ay8910_interface lucky8_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_DRIVER_MEMBER(goldstar_state,ay8910_outputa_w),
- DEVCB_DRIVER_MEMBER(goldstar_state,ay8910_outputb_w)
-};
-
-static const ay8910_interface ladylinr_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( goldstar, goldstar_state )
/* basic machine hardware */
@@ -6246,7 +6205,8 @@ static MACHINE_CONFIG_START( goldstar, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -6282,7 +6242,8 @@ static MACHINE_CONFIG_START( goldstbl, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -6317,7 +6278,8 @@ static MACHINE_CONFIG_START( moonlght, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -6353,7 +6315,8 @@ static MACHINE_CONFIG_START( goldfrui, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -6390,7 +6353,8 @@ static MACHINE_CONFIG_START( super9, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -6501,7 +6465,8 @@ static MACHINE_CONFIG_START( chrygld, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6550,7 +6515,8 @@ static MACHINE_CONFIG_START( cb3e, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6599,7 +6565,8 @@ static MACHINE_CONFIG_START( cb3c, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6648,7 +6615,8 @@ static MACHINE_CONFIG_START( ncb3, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6696,7 +6664,8 @@ static MACHINE_CONFIG_START( wcherry, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6739,7 +6708,8 @@ static MACHINE_CONFIG_START( cm, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6786,7 +6756,8 @@ static MACHINE_CONFIG_START( cmnobmp, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
#endif
@@ -6828,7 +6799,8 @@ static MACHINE_CONFIG_START( cmast91, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6886,7 +6858,10 @@ static MACHINE_CONFIG_START( lucky8, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6937,7 +6912,10 @@ static MACHINE_CONFIG_START( bingowng, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -6988,7 +6966,10 @@ static MACHINE_CONFIG_START( bingownga, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -7056,7 +7037,10 @@ static MACHINE_CONFIG_START( magodds, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.00) // shut up annoying whine
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_CONFIG_END
@@ -7144,7 +7128,6 @@ static MACHINE_CONFIG_START( ladylinr, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(ladylinr_ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -7196,7 +7179,10 @@ static MACHINE_CONFIG_START( wcat3, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -7240,7 +7226,8 @@ static MACHINE_CONFIG_START( amcoe1, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -7286,7 +7273,8 @@ static MACHINE_CONFIG_START( amcoe1a, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH) /* clock frequency & pin 7 not verified */
@@ -7332,7 +7320,8 @@ static MACHINE_CONFIG_START( amcoe2, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.00) /* analyzed for clips */
MACHINE_CONFIG_END
@@ -7373,7 +7362,8 @@ static MACHINE_CONFIG_START( nfm, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.00) /* analyzed for clips */
MACHINE_CONFIG_END
@@ -7407,7 +7397,10 @@ static MACHINE_CONFIG_START( unkch, goldstar_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
// MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
-// MCFG_SOUND_CONFIG(ay8910_config)
+//
+//
+// MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+// MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -7461,7 +7454,8 @@ static MACHINE_CONFIG_START( pkrmast, goldstar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(cm_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW5"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -7507,7 +7501,10 @@ static MACHINE_CONFIG_START( megaline, goldstar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
- MCFG_SOUND_CONFIG(lucky8_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(goldstar_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(goldstar_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 83e3e360548..bbe2750672c 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -428,35 +428,6 @@ WRITE8_MEMBER(grchamp_state::grchamp_portB_2_w)
}
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(grchamp_state,grchamp_portA_0_w),
- DEVCB_DRIVER_MEMBER(grchamp_state,grchamp_portB_0_w)
-};
-
-static const ay8910_interface ay8910_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(grchamp_state,grchamp_portA_2_w),
- DEVCB_DRIVER_MEMBER(grchamp_state,grchamp_portB_2_w)
-};
-
-
-
/*************************************
*
* Graphics Layouts
@@ -694,14 +665,16 @@ static MACHINE_CONFIG_START( grchamp, grchamp_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, SOUND_CLOCK/4) /* 3B */
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(grchamp_state, grchamp_portA_0_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(grchamp_state, grchamp_portB_0_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
MCFG_SOUND_ADD("ay2", AY8910, SOUND_CLOCK/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
MCFG_SOUND_ADD("ay3", AY8910, SOUND_CLOCK/4) /* 1B */
- MCFG_SOUND_CONFIG(ay8910_interface_3)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(grchamp_state, grchamp_portA_2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(grchamp_state, grchamp_portB_2_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
MCFG_SOUND_ADD("discrete", DISCRETE, 0)
diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c
index 1d3782d14c6..e971201ab34 100644
--- a/src/mame/drivers/gstriker.c
+++ b/src/mame/drivers/gstriker.c
@@ -570,6 +570,7 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(gstriker_state, gs_ym2610_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -619,6 +620,7 @@ static MACHINE_CONFIG_START( vgoal, gstriker_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(gstriker_state, gs_ym2610_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index 814b4697c74..c4ad07f9098 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -620,17 +620,6 @@ static GFXDECODE_START( gsword )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(gsword_state,gsword_nmi_set_w), /* portA write */
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( gsword, gsword_state )
/* basic machine hardware */
@@ -681,7 +670,7 @@ static MACHINE_CONFIG_START( gsword, gsword_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, gsword_nmi_set_w)) /* portA write */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("msm", MSM5205, XTAL_400kHz) /* verified on pcb */
@@ -730,7 +719,7 @@ static MACHINE_CONFIG_START( josvolly, gsword_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, gsword_nmi_set_w)) /* portA write */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
#if 0
diff --git a/src/mame/drivers/gundealr.c b/src/mame/drivers/gundealr.c
index 35d482f0cd0..10ab4dceb32 100644
--- a/src/mame/drivers/gundealr.c
+++ b/src/mame/drivers/gundealr.c
@@ -390,16 +390,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::gundealr_scanline)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( gundealr, gundealr_state )
/* basic machine hardware */
@@ -426,7 +416,6 @@ static MACHINE_CONFIG_START( gundealr, gundealr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c
index 9a5bef30c32..1c4a525478c 100644
--- a/src/mame/drivers/gyruss.c
+++ b/src/mame/drivers/gyruss.c
@@ -344,57 +344,6 @@ static GFXDECODE_START( gyruss )
GFXDECODE_ENTRY( "gfx2", 0x0000, charlayout, 16*16, 16 )
GFXDECODE_END
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_DISCRETE_OUTPUT,
- { RES_K(3.3), RES_K(3.3), RES_K(3.3) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(gyruss_state,gyruss_filter0_w)
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_DISCRETE_OUTPUT,
- { RES_K(3.3), RES_K(3.3), RES_K(3.3) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(gyruss_state,gyruss_filter1_w)
-};
-
-static const ay8910_interface ay8910_interface_3 =
-{
- AY8910_DISCRETE_OUTPUT,
- { RES_K(3.3), RES_K(3.3), RES_K(3.3) },
- DEVCB_DRIVER_MEMBER(gyruss_state,gyruss_portA_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_4 =
-{
- AY8910_DISCRETE_OUTPUT,
- { RES_K(3.3), RES_K(3.3), RES_K(3.3) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_5 =
-{
- AY8910_DISCRETE_OUTPUT,
- { RES_K(3.3), RES_K(3.3), RES_K(3.3) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static const discrete_mixer_desc konami_right_mixer_desc =
{DISC_MIXER_IS_RESISTOR,
{RES_K(2.2), RES_K(2.2), RES_K(2.2), RES_K(3.3)/3, RES_K(3.3)/3 },
@@ -543,31 +492,39 @@ static MACHINE_CONFIG_START( gyruss, gyruss_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ay1", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(3.3), RES_K(3.3), RES_K(3.3))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(gyruss_state, gyruss_filter0_w))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 2)
MCFG_SOUND_ADD("ay2", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(3.3), RES_K(3.3), RES_K(3.3))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(gyruss_state, gyruss_filter1_w))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 3)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 4)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 5)
MCFG_SOUND_ADD("ay3", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_3)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(3.3), RES_K(3.3), RES_K(3.3))
+ MCFG_AY8910_PORT_A_READ_CB(READ8(gyruss_state, gyruss_portA_r))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 6)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 7)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 8)
MCFG_SOUND_ADD("ay4", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_4)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(3.3), RES_K(3.3), RES_K(3.3))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 9)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 10)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 11)
MCFG_SOUND_ADD("ay5", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_5)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(3.3), RES_K(3.3), RES_K(3.3))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 12)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 13)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 14)
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index f0952306428..9188d591c6e 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -1967,17 +1967,6 @@ void halleys_state::machine_reset()
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(halleys_state,sndnmi_msk_w) // port Bwrite
-};
-
-
static MACHINE_CONFIG_START( halleys, halleys_state )
MCFG_CPU_ADD("maincpu", M6809, XTAL_19_968MHz/12) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(halleys_map)
@@ -2014,7 +2003,7 @@ static MACHINE_CONFIG_START( halleys, halleys_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay4", AY8910, XTAL_6MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(halleys_state, sndnmi_msk_w)) // port Bwrite
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hanaawas.c b/src/mame/drivers/hanaawas.c
index 39b944906f8..82e62665b39 100644
--- a/src/mame/drivers/hanaawas.c
+++ b/src/mame/drivers/hanaawas.c
@@ -171,17 +171,6 @@ static GFXDECODE_START( hanaawas )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(hanaawas_state, hanaawas_portB_w)
-};
-
-
void hanaawas_state::machine_start()
{
save_item(NAME(m_mux));
@@ -219,7 +208,8 @@ static MACHINE_CONFIG_START( hanaawas, hanaawas_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 18432000/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(hanaawas_state, hanaawas_portB_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c
index 17681857388..588a1e3aa9f 100644
--- a/src/mame/drivers/hitpoker.c
+++ b/src/mame/drivers/hitpoker.c
@@ -462,17 +462,6 @@ static GFXDECODE_START( hitpoker )
GFXDECODE_ENTRY( "gfx1", 0, hitpoker_layout_8bpp, 0, 8 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
INTERRUPT_GEN_MEMBER(hitpoker_state::hitpoker_irq)
{
device.execute().set_input_line(MC68HC11_IRQ_LINE, HOLD_LINE);
@@ -506,7 +495,8 @@ static MACHINE_CONFIG_START( hitpoker, hitpoker_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", YM2149, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c
index 457ebe19c75..e2c36d57973 100644
--- a/src/mame/drivers/hnayayoi.c
+++ b/src/mame/drivers/hnayayoi.c
@@ -504,18 +504,6 @@ WRITE_LINE_MEMBER(hnayayoi_state::irqhandler)
// m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL,
-};
-
-
void hnayayoi_state::machine_start()
{
save_item(NAME(m_palbank));
@@ -566,7 +554,8 @@ static MACHINE_CONFIG_START( hnayayoi, hnayayoi_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 20000000/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(hnayayoi_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
diff --git a/src/mame/drivers/holeland.c b/src/mame/drivers/holeland.c
index 003f524efb9..e82a1cb3f3d 100644
--- a/src/mame/drivers/holeland.c
+++ b/src/mame/drivers/holeland.c
@@ -251,29 +251,6 @@ static GFXDECODE_START( crzrally )
GFXDECODE_END
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
static MACHINE_CONFIG_START( holeland, holeland_state )
/* basic machine hardware */
@@ -299,11 +276,13 @@ static MACHINE_CONFIG_START( holeland, holeland_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1818182)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 1818182)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -368,11 +347,13 @@ static MACHINE_CONFIG_START( crzrally, holeland_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 20000000/16)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 20000000/16)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c
index 804ad7dd814..0dded98ce4e 100644
--- a/src/mame/drivers/homedata.c
+++ b/src/mame/drivers/homedata.c
@@ -1260,18 +1260,6 @@ MACHINE_CONFIG_END
/**************************************************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( reikaids, homedata_state )
/* basic machine hardware */
@@ -1309,7 +1297,8 @@ static MACHINE_CONFIG_START( reikaids, homedata_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
diff --git a/src/mame/drivers/homerun.c b/src/mame/drivers/homerun.c
index bf56fad9448..ebdd39f94eb 100644
--- a/src/mame/drivers/homerun.c
+++ b/src/mame/drivers/homerun.c
@@ -321,17 +321,6 @@ static GFXDECODE_START( homerun )
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0, 16 )
GFXDECODE_END
-/**************************************************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(homerun_state, homerun_banking_w)
-};
/**************************************************************************/
@@ -388,7 +377,8 @@ static MACHINE_CONFIG_START( dynashot, homerun_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_20MHz/8)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(homerun_state, homerun_banking_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c
index e51a83b03fa..06175652e3f 100644
--- a/src/mame/drivers/hotblock.c
+++ b/src/mame/drivers/hotblock.c
@@ -205,17 +205,6 @@ INTERRUPT_GEN_MEMBER(hotblock_state::hotblocks_irq)/* right? */
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( hotblock, hotblock_state )
/* basic machine hardware */
@@ -240,7 +229,8 @@ static MACHINE_CONFIG_START( hotblock, hotblock_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hyhoo.c b/src/mame/drivers/hyhoo.c
index 8ab8043acf7..e03a93df36d 100644
--- a/src/mame/drivers/hyhoo.c
+++ b/src/mame/drivers/hyhoo.c
@@ -219,18 +219,6 @@ static INPUT_PORTS_START( hyhoo2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( hyhoo, hyhoo_state )
/* basic machine hardware */
@@ -257,7 +245,8 @@ static MACHINE_CONFIG_START( hyhoo, hyhoo_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
diff --git a/src/mame/drivers/icecold.c b/src/mame/drivers/icecold.c
index 8de45fdf570..11c9be97df6 100644
--- a/src/mame/drivers/icecold.c
+++ b/src/mame/drivers/icecold.c
@@ -327,27 +327,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(icecold_state::icecold_motors_timer)
}
}
-static const ay8910_interface icecold_ay8910_0_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(icecold_state, ay8910_0_b_w)
-};
-
-static const ay8910_interface icecold_ay8910_1_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(icecold_state, ay8910_1_a_w),
- DEVCB_DRIVER_MEMBER(icecold_state, ay8910_1_b_w)
-};
-
-
static MACHINE_CONFIG_START( icecold, icecold_state )
/* basic machine hardware */
@@ -389,11 +368,13 @@ static MACHINE_CONFIG_START( icecold, icecold_state )
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay0", AY8910, XTAL_6MHz/4)
- MCFG_SOUND_CONFIG(icecold_ay8910_0_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW4"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(icecold_state, ay8910_0_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay1", AY8910, XTAL_6MHz/4)
- MCFG_SOUND_CONFIG(icecold_ay8910_1_intf)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(icecold_state, ay8910_1_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(icecold_state, ay8910_1_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c
index e9f7c4ff33e..19842999234 100644
--- a/src/mame/drivers/inufuku.c
+++ b/src/mame/drivers/inufuku.c
@@ -404,6 +404,7 @@ static MACHINE_CONFIG_START( inufuku, inufuku_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 32000000/4)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(inufuku_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.75)
MCFG_SOUND_ROUTE(2, "mono", 0.75)
diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c
index d6f9d9e8bb2..a3bbf090fe1 100644
--- a/src/mame/drivers/ironhors.c
+++ b/src/mame/drivers/ironhors.c
@@ -340,17 +340,6 @@ DISCRETE_SOUND_END
*
*************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
- DEVCB_NULL
-};
-
-
void ironhors_state::machine_start()
{
save_item(NAME(m_palettebank));
@@ -395,7 +384,7 @@ static MACHINE_CONFIG_START( ironhors, ironhors_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym2203", YM2203, 18432000/6)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ironhors_state, ironhors_filter_w))
MCFG_SOUND_ROUTE_EX(0, "disc_ih", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "disc_ih", 1.0, 1)
@@ -429,18 +418,6 @@ READ8_MEMBER(ironhors_state::farwest_soundlatch_r)
return soundlatch_byte_r(m_soundcpu->space(AS_PROGRAM), 0);
}
-static const ay8910_interface farwest_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ironhors_state,farwest_soundlatch_r),
- DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
- DEVCB_NULL
-};
-
-
-
static MACHINE_CONFIG_DERIVED( farwest, ironhors )
MCFG_CPU_MODIFY("maincpu")
@@ -458,7 +435,8 @@ static MACHINE_CONFIG_DERIVED( farwest, ironhors )
MCFG_SCREEN_UPDATE_DRIVER(ironhors_state, screen_update_farwest)
MCFG_SOUND_MODIFY("ym2203")
- MCFG_YM2203_AY8910_INTF(&farwest_ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(ironhors_state, farwest_soundlatch_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ironhors_state, ironhors_filter_w))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 789342ded9a..65fe9f652db 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -1584,24 +1584,6 @@ static INPUT_PORTS_START( gpgolf )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-
-
-/*************************************
- *
- * Sound definitions
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(itech8_state,ym2203_portb_out),
-};
-
/*************************************
*
* TMS34061 interfacing
@@ -1674,7 +1656,7 @@ static MACHINE_CONFIG_FRAGMENT( itech8_sound_ym2203 )
/* sound hardware */
MCFG_SOUND_ADD("ymsnd", YM2203, CLOCK_8MHz/2)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(itech8_state, generate_sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(itech8_state, ym2203_portb_out))
MCFG_SOUND_ROUTE(0, "mono", 0.07)
MCFG_SOUND_ROUTE(1, "mono", 0.07)
MCFG_SOUND_ROUTE(2, "mono", 0.07)
@@ -1694,7 +1676,7 @@ static MACHINE_CONFIG_FRAGMENT( itech8_sound_ym2608b )
/* sound hardware */
MCFG_SOUND_ADD("ymsnd", YM2608, CLOCK_8MHz)
MCFG_YM2608_IRQ_HANDLER(WRITELINE(itech8_state, generate_sound_irq))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(itech8_state, ym2203_portb_out))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c
index 90aa33e1483..5a9cd99acd5 100644
--- a/src/mame/drivers/jack.c
+++ b/src/mame/drivers/jack.c
@@ -849,16 +849,6 @@ static GFXDECODE_START( joinem )
GFXDECODE_ENTRY( "gfx1", 0, joinem_charlayout, 0, 32 )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(jack_state, timer_r)
-};
-
-
/***************************************************************/
void jack_state::machine_start()
@@ -932,7 +922,8 @@ static MACHINE_CONFIG_START( jack, jack_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18MHz/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(jack_state, timer_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c
index 14ff0e00b45..790187166fc 100644
--- a/src/mame/drivers/jangou.c
+++ b/src/mame/drivers/jangou.c
@@ -890,22 +890,6 @@ INPUT_PORTS_END
/*************************************
*
- * Sound HW Config
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(jangou_state,input_mux_r),
- DEVCB_DRIVER_MEMBER(jangou_state,input_system_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -1001,7 +985,8 @@ static MACHINE_CONFIG_START( jangou, jangou_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK / 16)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(jangou_state, input_mux_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(jangou_state, input_system_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("cvsd", HC55516, MASTER_CLOCK / 1024)
diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c
index 5a58e1282f7..055f9576517 100644
--- a/src/mame/drivers/jongkyo.c
+++ b/src/mame/drivers/jongkyo.c
@@ -460,23 +460,6 @@ PALETTE_INIT_MEMBER(jongkyo_state, jongkyo)
/*************************************
*
- * Sound interface
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(jongkyo_state,input_1p_r),
- DEVCB_DRIVER_MEMBER(jongkyo_state,input_2p_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -519,7 +502,8 @@ static MACHINE_CONFIG_START( jongkyo, jongkyo_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, JONGKYO_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(jongkyo_state, input_1p_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(jongkyo_state, input_2p_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jpms80.c b/src/mame/drivers/jpms80.c
index 1ef17cda903..c506538863b 100644
--- a/src/mame/drivers/jpms80.c
+++ b/src/mame/drivers/jpms80.c
@@ -64,18 +64,6 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( jpms80 )
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_interface_jpm =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
// these are wrong
#define MAIN_CLOCK 2000000
#define SOUND_CLOCK 2000000
@@ -95,7 +83,6 @@ static MACHINE_CONFIG_START( jpms80, jpms80_state )
MCFG_DEVICE_ADD("tms9902duart", TMS9902, DUART_CLOCK)
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_interface_jpm)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c
index e01b4c32801..0948663cc99 100644
--- a/src/mame/drivers/junofrst.c
+++ b/src/mame/drivers/junofrst.c
@@ -368,18 +368,6 @@ static INPUT_PORTS_START( junofrst )
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(junofrst_state,junofrst_portA_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(junofrst_state,junofrst_portB_w)
-};
-
-
MACHINE_START_MEMBER(junofrst_state,junofrst)
{
m_filter_0_0 = machine().device("filter.0.0");
@@ -444,7 +432,8 @@ static MACHINE_CONFIG_START( junofrst, junofrst_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(junofrst_state, junofrst_portA_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(junofrst_state, junofrst_portB_w))
MCFG_SOUND_ROUTE(0, "filter.0.0", 0.30)
MCFG_SOUND_ROUTE(1, "filter.0.1", 0.30)
MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30)
diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c
index 04e50f4ca7a..b12593e7be5 100644
--- a/src/mame/drivers/kaneko16.c
+++ b/src/mame/drivers/kaneko16.c
@@ -87,7 +87,6 @@ Dip locations verified from manual for:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
-#include "machine/eepromser.h"
#include "includes/kaneko16.h"
#include "sound/2203intf.h"
#include "sound/2151intf.h"
@@ -219,6 +218,15 @@ WRITE16_MEMBER(kaneko16_state::kaneko16_eeprom_w)
}
}
+READ8_MEMBER(kaneko16_state::eeprom_r)
+{
+ return m_eeprom->do_read();
+}
+
+WRITE8_MEMBER(kaneko16_state::eeprom_w)
+{
+ m_eeprom->cs_write(data);
+}
/***************************************************************************
@@ -1654,27 +1662,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::kaneko16_interrupt)
m_maincpu->set_input_line(3, HOLD_LINE);
}
-static const ay8910_interface ay8910_intf_dsw =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL,
-};
-
-static const ay8910_interface ay8910_intf_eeprom =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DEVICE_LINE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read), /* inputs A: 0,EEPROM bit read */
- DEVCB_NULL, /* inputs B */
- DEVCB_NULL, /* outputs A */
- DEVCB_DEVICE_LINE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write) /* outputs B: 0,EEPROM reset */
-};
-
-
/***************************************************************************
The Berlin Wall
***************************************************************************/
@@ -1728,7 +1715,8 @@ static MACHINE_CONFIG_START( berlwall, kaneko16_berlwall_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ay1", YM2149, 1000000)
- MCFG_SOUND_CONFIG(ay8910_intf_dsw)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD("ay2", YM2149, 1000000)
@@ -1794,7 +1782,8 @@ static MACHINE_CONFIG_START( bakubrkr, kaneko16_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ay2", YM2149, XTAL_12MHz/6) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_intf_eeprom)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(kaneko16_state, eeprom_r)) /* inputs A: 0,EEPROM bit read */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kaneko16_state, eeprom_w)) /* outputs B: 0,EEPROM reset */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, OKIM6295_PIN7_HIGH) /* verified on pcb */
@@ -2051,7 +2040,8 @@ static MACHINE_CONFIG_START( mgcrystl, kaneko16_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ay2", YM2149, XTAL_12MHz/6) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_intf_eeprom)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(kaneko16_state, eeprom_r)) /* inputs A: 0,EEPROM bit read */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kaneko16_state, eeprom_w)) /* outputs B: 0,EEPROM reset */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, OKIM6295_PIN7_HIGH) /* verified on pcb */
diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c
index 88cc456b237..a95db485102 100644
--- a/src/mame/drivers/kas89.c
+++ b/src/mame/drivers/kas89.c
@@ -751,21 +751,6 @@ static INPUT_PORTS_START( kas89 )
INPUT_PORTS_END
-/**********************************
-* AY-3-8910 Interface *
-**********************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, // Nothing connected here.
- DEVCB_NULL, // Nothing connected here.
- DEVCB_NULL, // Nothing connected here.
- DEVCB_NULL // Nothing connected here.
-};
-
-
/**************************************
* Machine Driver *
**************************************/
@@ -802,7 +787,6 @@ static MACHINE_CONFIG_START( kas89, kas89_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/12) /* Confirmed */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c
index 00b7bed9eaa..43a53a6667a 100644
--- a/src/mame/drivers/kingdrby.c
+++ b/src/mame/drivers/kingdrby.c
@@ -864,26 +864,6 @@ GFXDECODE_END
*
*************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(kingdrby_state,sound_cmd_r),
- DEVCB_NULL, /* discrete read? */
- DEVCB_NULL,
- DEVCB_NULL /* discrete write? */
-};
-
-static const ay8910_interface cowrace_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(kingdrby_state,sound_cmd_r), // read A
- DEVCB_DEVICE_MEMBER("oki", okim6295_device, read), // read B
- DEVCB_NULL, // write A
- DEVCB_DEVICE_MEMBER("oki", okim6295_device, write) // write B
-};
-
PALETTE_INIT_MEMBER(kingdrby_state,kingdrby)
{
const UINT8 *color_prom = memregion("proms")->base();
@@ -993,7 +973,7 @@ static MACHINE_CONFIG_START( kingdrby, kingdrby_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, CLK_1/8) /* guess */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(kingdrby_state, sound_cmd_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -1032,7 +1012,9 @@ static MACHINE_CONFIG_DERIVED( cowrace, kingdrbb )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_REPLACE("aysnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&cowrace_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(kingdrby_state, sound_cmd_r))
+ MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("oki", okim6295_device, read)) // read B
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("oki", okim6295_device, write)) // write B
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c
index c1df39e9d66..2b7d4603831 100644
--- a/src/mame/drivers/kingobox.c
+++ b/src/mame/drivers/kingobox.c
@@ -435,13 +435,6 @@ static GFXDECODE_START( rk )
GFXDECODE_ENTRY( "gfx4", 0x00000, rk_bglayout, 0, 32 ) /* bg tiles */
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r)
-};
-
INTERRUPT_GEN_MEMBER(kingofb_state::kingofb_interrupt)
{
if (m_nmi_enable)
@@ -502,7 +495,7 @@ static MACHINE_CONFIG_START( kingofb, kingofb_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DAC_ADD("dac")
@@ -553,7 +546,7 @@ static MACHINE_CONFIG_START( ringking, kingofb_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/kingpin.c b/src/mame/drivers/kingpin.c
index e6933020301..e2ff12c64bc 100644
--- a/src/mame/drivers/kingpin.c
+++ b/src/mame/drivers/kingpin.c
@@ -126,16 +126,6 @@ WRITE_LINE_MEMBER(kingpin_state::vdp_interrupt)
m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( kingpin, kingpin_state )
/* basic machine hardware */
@@ -170,7 +160,6 @@ static MACHINE_CONFIG_START( kingpin, kingpin_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, XTAL_3_579545MHz)
- MCFG_SOUND_CONFIG(ay8912_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c
index 75e0ddb3005..b1a4b98782b 100644
--- a/src/mame/drivers/kncljoe.c
+++ b/src/mame/drivers/kncljoe.c
@@ -229,15 +229,6 @@ static GFXDECODE_START( kncljoe )
GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0x80, 16 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(kncljoe_state,unused_w)
-};
INTERRUPT_GEN_MEMBER(kncljoe_state::sound_nmi)
{
@@ -294,7 +285,8 @@ static MACHINE_CONFIG_START( kncljoe, kncljoe_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_3_579545MHz/4) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kncljoe_state, unused_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("sn1", SN76489, XTAL_3_579545MHz) /* verified on pcb */
diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c
index 7d2f4ef2ff1..e514b334d3e 100644
--- a/src/mame/drivers/koikoi.c
+++ b/src/mame/drivers/koikoi.c
@@ -319,21 +319,6 @@ GFXDECODE_END
/*************************************
*
- * Sound interface
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_DRIVER_MEMBER(koikoi_state,input_r),
- DEVCB_DRIVER_MEMBER(koikoi_state,unknown_w), DEVCB_NULL
-};
-
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -385,7 +370,8 @@ static MACHINE_CONFIG_START( koikoi, koikoi_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, KOIKOI_CRYSTAL/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(koikoi_state, input_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(koikoi_state, unknown_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ksayakyu.c b/src/mame/drivers/ksayakyu.c
index abc22dc6a77..9ed7b750ae0 100644
--- a/src/mame/drivers/ksayakyu.c
+++ b/src/mame/drivers/ksayakyu.c
@@ -183,27 +183,6 @@ WRITE8_MEMBER(ksayakyu_state::dummy3_w)
// printf("%02x 3\n", data);
}
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ksayakyu_state,dummy1_w)
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ksayakyu_state,dummy2_w),
- DEVCB_DRIVER_MEMBER(ksayakyu_state,dummy3_w)
-};
-
static const gfx_layout charlayout =
{
8,8,
@@ -296,11 +275,13 @@ static MACHINE_CONFIG_START( ksayakyu, ksayakyu_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/16) //unknown clock
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ksayakyu_state, dummy1_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/16) //unknown clock
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ksayakyu_state, dummy2_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ksayakyu_state, dummy3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/kurukuru.c b/src/mame/drivers/kurukuru.c
index f21e3dd21de..9ed799a789e 100644
--- a/src/mame/drivers/kurukuru.c
+++ b/src/mame/drivers/kurukuru.c
@@ -534,22 +534,6 @@ void kurukuru_state::machine_reset()
update_sound_irq(0);
}
-
-/*************************************************
-* Sound Interfaces *
-*************************************************/
-
-static const ay8910_interface ym2149_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_UNMAPPED,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_DRIVER_MEMBER(kurukuru_state, ym2149_aout_w),
- DEVCB_DRIVER_MEMBER(kurukuru_state, ym2149_bout_w)
-};
-
-
/*************************************************
* Machine Driver *
*************************************************/
@@ -586,7 +570,9 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym2149", YM2149, YM2149_CLOCK)
- MCFG_SOUND_CONFIG(ym2149_intf)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(kurukuru_state, ym2149_aout_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kurukuru_state, ym2149_bout_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("adpcm", MSM5205, M5205_CLOCK)
diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c
index cbc21f757b1..7e2afd7fc16 100644
--- a/src/mame/drivers/kyugo.c
+++ b/src/mame/drivers/kyugo.c
@@ -472,23 +472,6 @@ GFXDECODE_END
/*************************************
*
- * Sound definition
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-/*************************************
- *
* Machine drivers
*
*************************************/
@@ -555,7 +538,8 @@ static MACHINE_CONFIG_START( gyrodine, kyugo_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
diff --git a/src/mame/drivers/labyrunr.c b/src/mame/drivers/labyrunr.c
index 1869c9e863f..72ae74e0abe 100644
--- a/src/mame/drivers/labyrunr.c
+++ b/src/mame/drivers/labyrunr.c
@@ -153,28 +153,6 @@ GFXDECODE_END
***************************************************************************/
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
void labyrunr_state::machine_start()
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -214,14 +192,15 @@ static MACHINE_CONFIG_START( labyrunr, labyrunr_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.40)
MCFG_SOUND_ROUTE(1, "mono", 0.40)
MCFG_SOUND_ROUTE(2, "mono", 0.40)
MCFG_SOUND_ROUTE(3, "mono", 0.80)
MCFG_SOUND_ADD("ym2", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(0, "mono", 0.40)
MCFG_SOUND_ROUTE(1, "mono", 0.40)
MCFG_SOUND_ROUTE(2, "mono", 0.40)
diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c
index bfb3ce7f8b7..b9035bc6003 100644
--- a/src/mame/drivers/ladyfrog.c
+++ b/src/mame/drivers/ladyfrog.c
@@ -102,16 +102,6 @@ WRITE8_MEMBER(ladyfrog_state::unk_w)
{
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(ladyfrog_state,unk_w),
- DEVCB_DRIVER_MEMBER(ladyfrog_state,unk_w)
-};
-
READ8_MEMBER(ladyfrog_state::snd_flag_r)
{
return m_snd_flag | 0xfd;
@@ -317,7 +307,8 @@ static MACHINE_CONFIG_START( ladyfrog, ladyfrog_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ladyfrog_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ladyfrog_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index 0a8b055cd91..ce63e464965 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -612,17 +612,6 @@ WRITE8_MEMBER(laserbat_state::zaccaria_port0b_w)
m_last_port0b = data;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,//ay8910_port0a_w,
- DEVCB_NULL
-};
-
-
INTERRUPT_GEN_MEMBER(laserbat_state::laserbat_interrupt)
{
device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a);
@@ -779,7 +768,7 @@ static MACHINE_CONFIG_START( catnmous, laserbat_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 3580000/2) // ?
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ay2", AY8910, 3580000/2) // ?
diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c
index b50090aa865..a8be5729635 100644
--- a/src/mame/drivers/lastduel.c
+++ b/src/mame/drivers/lastduel.c
@@ -449,13 +449,6 @@ WRITE_LINE_MEMBER(lastduel_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::lastduel_timer_cb)
{
m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */
@@ -527,7 +520,6 @@ static MACHINE_CONFIG_START( lastduel, lastduel_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lastduel_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz)
@@ -571,7 +563,6 @@ static MACHINE_CONFIG_START( madgear, lastduel_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lastduel_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz)
diff --git a/src/mame/drivers/leland.c b/src/mame/drivers/leland.c
index 7bb30685bb7..28ec0524db8 100644
--- a/src/mame/drivers/leland.c
+++ b/src/mame/drivers/leland.c
@@ -716,17 +716,6 @@ INPUT_PORTS_END
it does not take cross-chip mixing effects into account.
*/
-static const ay8910_interface ay8910_config =
-{
- AY8910_SINGLE_OUTPUT,
- {1000, 0, 0},
- DEVCB_DRIVER_MEMBER(leland_state, leland_sound_port_r),
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(leland_state, leland_sound_port_w),
- DEVCB_NULL
-};
-
-
/*************************************
*
@@ -758,11 +747,17 @@ static MACHINE_CONFIG_START( leland, leland_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910.1", AY8910, 10000000/6)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(1000, 0, 0)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(leland_state, leland_sound_port_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(leland_state, leland_sound_port_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910.2", AY8910, 10000000/6)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(1000, 0, 0)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(leland_state, leland_sound_port_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(leland_state, leland_sound_port_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("dac0", DAC, 0)
diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c
index 70c527cd423..65b71fc8b16 100644
--- a/src/mame/drivers/lkage.c
+++ b/src/mame/drivers/lkage.c
@@ -479,13 +479,6 @@ WRITE_LINE_MEMBER(lkage_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
void lkage_state::machine_start()
{
save_item(NAME(m_bg_tile_bank));
@@ -573,7 +566,6 @@ static MACHINE_CONFIG_START( lkage, lkage_state )
MCFG_SOUND_ADD("ym1", YM2203, AUDIO_CLOCK )
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lkage_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -619,7 +611,6 @@ static MACHINE_CONFIG_START( lkageb, lkage_state )
MCFG_SOUND_ADD("ym1", YM2203, AUDIO_CLOCK)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lkage_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c
index 72242cc62ab..28f4b365b0c 100644
--- a/src/mame/drivers/lockon.c
+++ b/src/mame/drivers/lockon.c
@@ -429,17 +429,6 @@ WRITE8_MEMBER(lockon_state::ym2203_out_b)
set_led_status(machine(), 1, !(data & 0x10));
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("YM2203"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(lockon_state,ym2203_out_b),
-};
-
-
/*************************************
*
* Machine driver
@@ -520,7 +509,8 @@ static MACHINE_CONFIG_START( lockon, lockon_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lockon_state, ym2203_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("YM2203"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(lockon_state, ym2203_out_b))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.40)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.40)
MCFG_SOUND_ROUTE(1, "f2203.1l", 1.0)
diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c
index 03c32b22650..9c244919ac8 100644
--- a/src/mame/drivers/looping.c
+++ b/src/mame/drivers/looping.c
@@ -617,23 +617,6 @@ static GFXDECODE_START( looping )
GFXDECODE_END
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/*************************************
*
* Machine drivers
@@ -670,7 +653,7 @@ static MACHINE_CONFIG_START( looping, looping_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SOUND_CLOCK/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("tms", TMS5220, TMS_CLOCK)
diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c
index 41f02b1c0fd..16073a9995d 100644
--- a/src/mame/drivers/lsasquad.c
+++ b/src/mame/drivers/lsasquad.c
@@ -547,18 +547,6 @@ WRITE8_MEMBER(lsasquad_state::unk)
{
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
- DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
-};
-
-
MACHINE_START_MEMBER(lsasquad_state,lsasquad)
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -644,7 +632,8 @@ static MACHINE_CONFIG_START( lsasquad, lsasquad_state )
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lsasquad_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(lsasquad_state, unk))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(lsasquad_state, unk))
MCFG_SOUND_ROUTE(0, "mono", 0.12)
MCFG_SOUND_ROUTE(1, "mono", 0.12)
MCFG_SOUND_ROUTE(2, "mono", 0.12)
@@ -700,7 +689,8 @@ static MACHINE_CONFIG_START( daikaiju, lsasquad_state )
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(lsasquad_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(lsasquad_state, unk))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(lsasquad_state, unk))
MCFG_SOUND_ROUTE(0, "mono", 0.12)
MCFG_SOUND_ROUTE(1, "mono", 0.12)
MCFG_SOUND_ROUTE(2, "mono", 0.12)
diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c
index c293512a5a9..238382736d5 100644
--- a/src/mame/drivers/lucky74.c
+++ b/src/mame/drivers/lucky74.c
@@ -1451,22 +1451,6 @@ WRITE_LINE_MEMBER(lucky74_state::lucky74_adpcm_int)
return;
}
-
-/*****************************
-* Sound Interfaces *
-*****************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN3"),
- DEVCB_NULL, /* a sort of status byte */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(lucky74_state,ym2149_portb_w)
-};
-
-
/*************************
* Machine Drivers *
*************************/
@@ -1529,7 +1513,9 @@ static MACHINE_CONFIG_START( lucky74, lucky74_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_SOUND_ADD("aysnd", AY8910, C_06B49P_CLKOUT_04) /* 1.5 MHz. */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN3"))
+ /* port b read is a sort of status byte */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(lucky74_state, ym2149_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.00) /* not routed to audio hardware */
MCFG_SOUND_ADD("msm", MSM5205, C_06B49P_CLKOUT_06) /* 375 kHz. */
diff --git a/src/mame/drivers/lvcards.c b/src/mame/drivers/lvcards.c
index 382c95b730e..cd6939802b3 100644
--- a/src/mame/drivers/lvcards.c
+++ b/src/mame/drivers/lvcards.c
@@ -447,17 +447,6 @@ GFXDECODE_END
/* Sound Interfaces */
-static const ay8910_interface lcay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( lvcards, lvcards_state )
// basic machine hardware
MCFG_CPU_ADD("maincpu",Z80, 18432000/6) // 3.072 MHz ?
@@ -484,7 +473,8 @@ static MACHINE_CONFIG_START( lvcards, lvcards_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 18432000/12)
- MCFG_SOUND_CONFIG(lcay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c
index 8bdeb52e773..f430d4e2b82 100644
--- a/src/mame/drivers/madalien.c
+++ b/src/mame/drivers/madalien.c
@@ -157,17 +157,6 @@ static INPUT_PORTS_START( madalien )
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(madalien_state,madalien_portA_w),
- DEVCB_DRIVER_MEMBER(madalien_state,madalien_portB_w)
-};
-
-
static MACHINE_CONFIG_START( madalien, madalien_state )
/* main CPU */
@@ -185,7 +174,8 @@ static MACHINE_CONFIG_START( madalien, madalien_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SOUND_CLOCK / 4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(madalien_state, madalien_portA_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(madalien_state, madalien_portB_w))
MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "discrete", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "discrete", 1.0, 2)
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c
index 584d3edd082..194f46adb64 100644
--- a/src/mame/drivers/magmax.c
+++ b/src/mame/drivers/magmax.c
@@ -330,17 +330,6 @@ static GFXDECODE_START( magmax )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(magmax_state,ay8910_portA_0_w), /*write port A*/
- DEVCB_DRIVER_MEMBER(magmax_state,ay8910_portB_0_w) /*write port B*/
-};
-
-
static MACHINE_CONFIG_START( magmax, magmax_state )
/* basic machine hardware */
@@ -372,7 +361,8 @@ static MACHINE_CONFIG_START( magmax, magmax_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_20MHz/16) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(magmax_state, ay8910_portA_0_w)) /*write port A*/
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(magmax_state, ay8910_portB_0_w)) /*write port B*/
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_20MHz/16) /* verified on pcb */
diff --git a/src/mame/drivers/maygay1b.c b/src/mame/drivers/maygay1b.c
index a8e87c635fd..809063c113d 100644
--- a/src/mame/drivers/maygay1b.c
+++ b/src/mame/drivers/maygay1b.c
@@ -454,15 +454,6 @@ static ADDRESS_MAP_START( m1_memmap, AS_PROGRAM, 8, maygay1b_state )
AM_RANGE(0x2800, 0xffff) AM_ROM
ADDRESS_MAP_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(maygay1b_state,m1_meter_w),
- DEVCB_DRIVER_MEMBER(maygay1b_state,m1_lockout_w),
-};
/*************************************
*
@@ -538,8 +529,9 @@ MACHINE_CONFIG_START( maygay_m1, maygay1b_state )
MCFG_S16LF01_ADD("vfd",0)
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("aysnd",YM2149, M1_MASTER_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_SOUND_ADD("aysnd", YM2149, M1_MASTER_CLOCK)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(maygay1b_state, m1_meter_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(maygay1b_state, m1_lockout_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ymsnd", YM2413, M1_MASTER_CLOCK/4)
diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c
index 889f38526b5..f93b10a6a79 100644
--- a/src/mame/drivers/mayumi.c
+++ b/src/mame/drivers/mayumi.c
@@ -343,22 +343,6 @@ GFXDECODE_END
/*************************************
*
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -409,7 +393,8 @@ static MACHINE_CONFIG_START( mayumi, mayumi_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, MCLK/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index 0b9d927258a..73014eab723 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -1346,27 +1346,6 @@ INPUT_PORTS_END
*
*************************************/
-/* only Great Guns */
-static const ay8910_interface ay8912_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(mazerbla_state,soundcommand_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8912_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(mazerbla_state,gg_led_ctrl_w)
-};
-
IRQ_CALLBACK_MEMBER(mazerbla_state::irq_callback)
{
/* all data lines are tied to +5V via 10K resistors */
@@ -1547,11 +1526,11 @@ static MACHINE_CONFIG_START( greatgun, mazerbla_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, SOUND_CLOCK / 8)
- MCFG_SOUND_CONFIG(ay8912_interface_1)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(mazerbla_state, soundcommand_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("ay2", AY8910, SOUND_CLOCK / 8)
- MCFG_SOUND_CONFIG(ay8912_interface_2)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(mazerbla_state, gg_led_ctrl_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c
index ee9ab9db7db..67d0e5d5756 100644
--- a/src/mame/drivers/mcatadv.c
+++ b/src/mame/drivers/mcatadv.c
@@ -464,6 +464,7 @@ static MACHINE_CONFIG_START( mcatadv, mcatadv_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(mcatadv_state, sound_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.32)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.32)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.5)
diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c
index 41d4a72eccb..94985fddb29 100644
--- a/src/mame/drivers/megasys1.c
+++ b/src/mame/drivers/megasys1.c
@@ -1643,14 +1643,6 @@ WRITE_LINE_MEMBER(megasys1_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( system_Z, megasys1_state )
/* basic machine hardware */
@@ -1682,7 +1674,6 @@ static MACHINE_CONFIG_START( system_Z, megasys1_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(megasys1_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c
index 04930e7681f..b92acdb4490 100644
--- a/src/mame/drivers/megazone.c
+++ b/src/mame/drivers/megazone.c
@@ -210,20 +210,6 @@ static GFXDECODE_START( megazone )
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 16*16, 16 )
GFXDECODE_END
-
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(megazone_state,megazone_port_a_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(megazone_state,megazone_port_b_w)
-};
-
-
-
void megazone_state::machine_start()
{
save_item(NAME(m_flipscreen));
@@ -279,7 +265,8 @@ static MACHINE_CONFIG_START( megazone, megazone_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(megazone_state, megazone_port_a_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(megazone_state, megazone_port_b_w))
MCFG_SOUND_ROUTE(0, "filter.0.0", 0.30)
MCFG_SOUND_ROUTE(1, "filter.0.1", 0.30)
MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30)
diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c
index 1422a717845..0aeaaf24e38 100644
--- a/src/mame/drivers/meijinsn.c
+++ b/src/mame/drivers/meijinsn.c
@@ -328,13 +328,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(meijinsn_state::meijinsn_interrupt)
m_maincpu->set_input_line(2, HOLD_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r)
-};
-
void meijinsn_state::machine_start()
{
save_item(NAME(m_deposits1));
@@ -379,7 +372,7 @@ static MACHINE_CONFIG_START( meijinsn, meijinsn_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index 8e06b873f71..8153344482b 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -1121,14 +1121,6 @@ static INPUT_PORTS_START( couplep )
INPUT_PORTS_END
-static const ay8910_interface merit_ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(merit_state,led2_w), DEVCB_NULL
-};
-
void merit_state::dodge_nvram_init(nvram_device &nvram, void *base, size_t size)
{
memset(base, 0x00, size);
@@ -1176,7 +1168,7 @@ static MACHINE_CONFIG_START( pitboss, merit_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, CRTC_CLOCK)
- MCFG_SOUND_CONFIG(merit_ay8912_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(merit_state, led2_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c
index dc85d4f820e..5ff860b1dc2 100644
--- a/src/mame/drivers/meritm.c
+++ b/src/mame/drivers/meritm.c
@@ -854,16 +854,6 @@ WRITE8_MEMBER(meritm_state::meritm_ay8930_port_b_w)
// lamps
};
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"), /* Port A read */
- DEVCB_NULL, /* Port B read */
- DEVCB_NULL, /* Port A write */
- DEVCB_DRIVER_MEMBER(meritm_state,meritm_ay8930_port_b_w) /* Port B write */
-};
-
/*************************************
*
* PIOs
@@ -1115,7 +1105,8 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SYSTEM_CLK/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW")) /* Port A read */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(meritm_state, meritm_ay8930_port_b_w)) /* Port B write */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c
index 8260ef82b9a..b62d78b5e5b 100644
--- a/src/mame/drivers/metro.c
+++ b/src/mame/drivers/metro.c
@@ -4541,6 +4541,7 @@ static MACHINE_CONFIG_START( blzntrnd, metro_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(metro_state, blzntrnd_irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -4586,6 +4587,7 @@ static MACHINE_CONFIG_START( gstrik2, metro_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(metro_state, blzntrnd_irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c
index e56fd25d10c..9aa70347760 100644
--- a/src/mame/drivers/mexico86.c
+++ b/src/mame/drivers/mexico86.c
@@ -391,24 +391,6 @@ static GFXDECODE_START( mexico86 )
GFXDECODE_END
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/*************************************
*
* Machine driver
@@ -496,7 +478,8 @@ static MACHINE_CONFIG_START( mexico86, mexico86_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(0, "mono", 0.30)
MCFG_SOUND_ROUTE(1, "mono", 0.30)
MCFG_SOUND_ROUTE(2, "mono", 0.30)
diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c
index a35549bf001..9a6f97d65d1 100644
--- a/src/mame/drivers/miniboy7.c
+++ b/src/mame/drivers/miniboy7.c
@@ -390,22 +390,6 @@ static GFXDECODE_START( miniboy7 )
GFXDECODE_END
-
-/***********************************
-* Sound Interface *
-***********************************/
-
-static const ay8910_interface miniboy7_ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/***********************************
* Machine Drivers *
***********************************/
@@ -441,7 +425,6 @@ static MACHINE_CONFIG_START( miniboy7, miniboy7_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* guess */
- MCFG_SOUND_CONFIG(miniboy7_ay8910_intf)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c
index f7144b76c7f..29248a3fcbd 100644
--- a/src/mame/drivers/mjsister.c
+++ b/src/mame/drivers/mjsister.c
@@ -445,22 +445,6 @@ INPUT_PORTS_END
/*************************************
*
- * Sound interface
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -537,7 +521,8 @@ static MACHINE_CONFIG_START( mjsister, mjsister_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MCLK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/momoko.c b/src/mame/drivers/momoko.c
index 30fd5e50075..1bd6507ccdc 100644
--- a/src/mame/drivers/momoko.c
+++ b/src/mame/drivers/momoko.c
@@ -214,16 +214,6 @@ GFXDECODE_END
/****************************************************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
void momoko_state::machine_start()
{
UINT8 *BG_MAP = memregion("user1")->base();
@@ -290,7 +280,7 @@ static MACHINE_CONFIG_START( momoko, momoko_state )
MCFG_SOUND_ROUTE(3, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 1250000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/mosaic.c b/src/mame/drivers/mosaic.c
index 6786f80207c..88b7e5d9e93 100644
--- a/src/mame/drivers/mosaic.c
+++ b/src/mame/drivers/mosaic.c
@@ -230,20 +230,6 @@ static GFXDECODE_START( mosaic )
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 1 )
GFXDECODE_END
-
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
void mosaic_state::machine_start()
{
save_item(NAME(m_prot_val));
@@ -281,7 +267,7 @@ static MACHINE_CONFIG_START( mosaic, mosaic_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mpu12wbk.c b/src/mame/drivers/mpu12wbk.c
index 57445b630d5..4236d71cc12 100644
--- a/src/mame/drivers/mpu12wbk.c
+++ b/src/mame/drivers/mpu12wbk.c
@@ -475,22 +475,6 @@ static GFXDECODE_START( mpu12wbk )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 )
GFXDECODE_END
-
-/*************************
-* Sound Interface *
-*************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/*************************
* Machine Drivers *
*************************/
@@ -525,7 +509,6 @@ static MACHINE_CONFIG_START( mpu12wbk, mpu12wbk_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, MASTER_CLOCK/8) /* guess */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c
index 2b69ec3d60b..61cd45287b5 100644
--- a/src/mame/drivers/mpu4dealem.c
+++ b/src/mame/drivers/mpu4dealem.c
@@ -202,7 +202,8 @@ static MACHINE_CONFIG_START( dealem, mpu4dealem_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8913",AY8913, MPU4_MASTER_CLOCK/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(820, 0, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/mpu4hw.c b/src/mame/drivers/mpu4hw.c
index 6595149dd7b..63e1a2f2339 100644
--- a/src/mame/drivers/mpu4hw.c
+++ b/src/mame/drivers/mpu4hw.c
@@ -2610,15 +2610,6 @@ static ADDRESS_MAP_START( mpu4_memmap, AS_PROGRAM, 8, mpu4_state )
AM_RANGE(0x1000, 0xffff) AM_ROMBANK("bank1") /* 64k paged ROM (4 pages) */
ADDRESS_MAP_END
-const ay8910_interface ay8910_config =
-{
- AY8910_SINGLE_OUTPUT,
- {820,0,0},
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
MACHINE_CONFIG_FRAGMENT( mpu4_common )
MCFG_TIMER_DRIVER_ADD_PERIODIC("50hz", mpu4_state, gen_50hz, attotime::from_hz(100))
@@ -2712,8 +2703,9 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_DERIVED( mod2 , mpu4base )
- MCFG_SOUND_ADD("ay8913",AY8913, MPU4_MASTER_CLOCK/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_SOUND_ADD("ay8913", AY8913, MPU4_MASTER_CLOCK/4)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(820, 0, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c
index 3ab64ee4462..5ca2badfb6a 100644
--- a/src/mame/drivers/mrflea.c
+++ b/src/mame/drivers/mrflea.c
@@ -299,28 +299,6 @@ GFXDECODE_END
/*************************************
*
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface mrflea_ay8910_interface_0 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_INPUT_PORT("IN0")
-};
-
-static const ay8910_interface mrflea_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW1")
-};
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -377,11 +355,13 @@ static MACHINE_CONFIG_START( mrflea, mrflea_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 2000000)
- MCFG_SOUND_CONFIG(mrflea_ay8910_interface_0)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN0"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 2000000)
- MCFG_SOUND_CONFIG(mrflea_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay3", AY8910, 2000000)
diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c
index 97b436e2e91..2076ef5ae2a 100644
--- a/src/mame/drivers/multfish.c
+++ b/src/mame/drivers/multfish.c
@@ -1031,17 +1031,6 @@ void igrosoft_gamble_state::machine_reset()
m_hopper = 0;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
MACHINE_CONFIG_START( igrosoft_gamble, igrosoft_gamble_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/4)
@@ -1065,7 +1054,6 @@ MACHINE_CONFIG_START( igrosoft_gamble, igrosoft_gamble_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 6000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_M48T35_ADD( "m48t35" )
diff --git a/src/mame/drivers/nbmj8688.c b/src/mame/drivers/nbmj8688.c
index 56d4e6cae4c..61155d623a4 100644
--- a/src/mame/drivers/nbmj8688.c
+++ b/src/mame/drivers/nbmj8688.c
@@ -2753,17 +2753,6 @@ READ8_MEMBER(nbmj8688_state::dipsw2_r)
return m_nb1413m3->dipsw2_r(space,offset);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(nbmj8688_state, dipsw1_r), // DIPSW-A read
- DEVCB_DRIVER_MEMBER(nbmj8688_state, dipsw2_r), // DIPSW-B read
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( NBMJDRV_4096, nbmj8688_state )
/* basic machine hardware */
@@ -2791,7 +2780,8 @@ static MACHINE_CONFIG_START( NBMJDRV_4096, nbmj8688_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("psg", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nbmj8688_state, dipsw1_r)) // DIPSW-A read
+ MCFG_AY8910_PORT_B_READ_CB(READ8(nbmj8688_state, dipsw2_r)) // DIPSW-B read
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_DAC_ADD("dac")
@@ -2969,7 +2959,8 @@ static MACHINE_CONFIG_START( mbmj_p16bit_LCD, nbmj8688_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("psg", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nbmj8688_state, dipsw1_r)) // DIPSW-A read
+ MCFG_AY8910_PORT_B_READ_CB(READ8(nbmj8688_state, dipsw2_r)) // DIPSW-B read
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/nbmj8891.c b/src/mame/drivers/nbmj8891.c
index fac3fbf055b..1dd197f7c61 100644
--- a/src/mame/drivers/nbmj8891.c
+++ b/src/mame/drivers/nbmj8891.c
@@ -2506,18 +2506,6 @@ static INPUT_PORTS_START( taiwanmb )
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( gionbana, nbmj8891_state )
/* basic machine hardware */
@@ -2578,7 +2566,8 @@ static MACHINE_CONFIG_DERIVED( omotesnd, gionbana )
/* sound hardware */
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MACHINE_CONFIG_END
@@ -2828,7 +2817,8 @@ static MACHINE_CONFIG_DERIVED( mjfocusm, gionbana )
/* sound hardware */
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_CONFIG_END
@@ -2858,7 +2848,8 @@ static MACHINE_CONFIG_DERIVED( taiwanmb, gionbana )
/* sound hardware */
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nbmj8991.c b/src/mame/drivers/nbmj8991.c
index d25c3448778..ae7982fb79a 100644
--- a/src/mame/drivers/nbmj8991.c
+++ b/src/mame/drivers/nbmj8991.c
@@ -1383,17 +1383,6 @@ static INPUT_PORTS_START( av2mj2rg )
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( nbmjdrv1, nbmj8991_state ) // galkoku
/* basic machine hardware */
@@ -1471,7 +1460,8 @@ static MACHINE_CONFIG_DERIVED( nbmjdrv3, nbmjdrv1 )
/* sound hardware */
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c
index a3b4d6694a2..86ed7236788 100644
--- a/src/mame/drivers/nemesis.c
+++ b/src/mame/drivers/nemesis.c
@@ -1425,26 +1425,6 @@ GFXDECODE_END
/******************************************************************************/
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(nemesis_state,nemesis_portA_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("k005289", k005289_device, k005289_control_A_w),
- DEVCB_DEVICE_MEMBER("k005289", k005289_device, k005289_control_B_w)
-};
-
WRITE_LINE_MEMBER(nemesis_state::sound_irq)
{
/* Interrupts _are_ generated, I wonder where they go.. */
@@ -1522,11 +1502,13 @@ static MACHINE_CONFIG_START( nemesis, nemesis_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nemesis_state, nemesis_portA_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_B_w))
MCFG_SOUND_ROUTE(0, "filter2", 1.00)
MCFG_SOUND_ROUTE(1, "filter3", 1.00)
MCFG_SOUND_ROUTE(2, "filter4", 1.00)
@@ -1574,11 +1556,13 @@ static MACHINE_CONFIG_START( gx400, nemesis_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nemesis_state, nemesis_portA_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_B_w))
MCFG_SOUND_ROUTE(0, "filter2", 1.00)
MCFG_SOUND_ROUTE(1, "filter3", 1.00)
MCFG_SOUND_ROUTE(2, "filter4", 1.00)
@@ -1628,11 +1612,13 @@ static MACHINE_CONFIG_START( konamigt, nemesis_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nemesis_state, nemesis_portA_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_B_w))
MCFG_SOUND_ROUTE(0, "filter2", 1.00)
MCFG_SOUND_ROUTE(1, "filter3", 1.00)
MCFG_SOUND_ROUTE(2, "filter4", 1.00)
@@ -1680,11 +1666,13 @@ static MACHINE_CONFIG_START( rf2_gx400, nemesis_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nemesis_state, nemesis_portA_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_B_w))
MCFG_SOUND_ROUTE(0, "filter2", 1.00)
MCFG_SOUND_ROUTE(1, "filter3", 1.00)
MCFG_SOUND_ROUTE(2, "filter4", 1.00)
@@ -2667,11 +2655,13 @@ static MACHINE_CONFIG_START( bubsys, nemesis_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nemesis_state, nemesis_portA_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, 14318180/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("k005289", k005289_device, k005289_control_B_w))
MCFG_SOUND_ROUTE(0, "filter2", 1.00)
MCFG_SOUND_ROUTE(1, "filter3", 1.00)
MCFG_SOUND_ROUTE(2, "filter4", 1.00)
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index 348185dc6b1..b017bd14201 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -1792,6 +1792,7 @@ MACHINE_CONFIG_START( neogeo_base, neogeo_state )
MCFG_SOUND_ADD("ymsnd", YM2610, NEOGEO_YM2610_CLOCK)
MCFG_YM2610_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.60)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c
index 5df9d3eaa04..736b987ba93 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -507,6 +507,7 @@ static MACHINE_CONFIG_START( neoprint, neoprint_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 24000000 / 3)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(neoprint_state, audio_cpu_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.60)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -550,6 +551,7 @@ static MACHINE_CONFIG_START( nprsp, neoprint_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 24000000 / 3)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(neoprint_state, audio_cpu_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.60)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c
index 493984e8909..fcf144b2ca9 100644
--- a/src/mame/drivers/nightgal.c
+++ b/src/mame/drivers/nightgal.c
@@ -867,17 +867,6 @@ static INPUT_PORTS_START( sexygal )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(nightgal_state,input_1p_r),
- DEVCB_DRIVER_MEMBER(nightgal_state,input_2p_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
void nightgal_state::machine_start()
{
save_item(NAME(m_nsc_latch));
@@ -933,7 +922,8 @@ static MACHINE_CONFIG_START( royalqn, nightgal_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK / 8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nightgal_state, input_1p_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(nightgal_state, input_2p_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
@@ -952,7 +942,8 @@ static MACHINE_CONFIG_DERIVED( sexygal, royalqn )
MCFG_DEVICE_REMOVE("aysnd")
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK / 8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(nightgal_state, input_1p_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(nightgal_state, input_2p_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c
index 2aeb76d4041..32f74fe140f 100644
--- a/src/mame/drivers/ninjakd2.c
+++ b/src/mame/drivers/ninjakd2.c
@@ -870,14 +870,6 @@ WRITE_LINE_MEMBER(ninjakd2_state::irqhandler)
m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
static const samples_interface ninjakd2_samples_interface =
{
1, /* 1 channel */
@@ -958,7 +950,6 @@ static MACHINE_CONFIG_START( ninjakd2, ninjakd2_state )
MCFG_SOUND_ADD("2203.1", YM2203, MAIN_CLOCK_12/8) /* verified */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(ninjakd2_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ROUTE(1, "mono", 0.10)
MCFG_SOUND_ROUTE(2, "mono", 0.10)
diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c
index 88bc4590687..71607aeeafe 100644
--- a/src/mame/drivers/ninjaw.c
+++ b/src/mame/drivers/ninjaw.c
@@ -846,6 +846,7 @@ static MACHINE_CONFIG_START( ninjaw, ninjaw_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(ninjaw_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 1.0)
@@ -966,6 +967,7 @@ static MACHINE_CONFIG_START( darius2, ninjaw_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(ninjaw_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 1.0)
diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c
index 2d751effd90..4b535d932fd 100644
--- a/src/mame/drivers/nmk16.c
+++ b/src/mame/drivers/nmk16.c
@@ -3604,13 +3604,6 @@ WRITE_LINE_MEMBER(nmk16_state::ym2203_irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline)
{
int scanline = param;
@@ -3669,7 +3662,6 @@ static MACHINE_CONFIG_START( tharrier, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -3715,7 +3707,6 @@ static MACHINE_CONFIG_START( manybloc, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -3759,7 +3750,6 @@ static MACHINE_CONFIG_START( mustang, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -3837,7 +3827,6 @@ static MACHINE_CONFIG_START( bioship, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, BIOSHIP_CRYSTAL2 / 8) /* 1.5 Mhz (verified) */
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -3881,7 +3870,6 @@ static MACHINE_CONFIG_START( vandyke, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -3961,7 +3949,6 @@ static MACHINE_CONFIG_START( acrobatm, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000) /* (verified on pcb) */
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4039,7 +4026,6 @@ static MACHINE_CONFIG_START( tdragon, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4118,7 +4104,6 @@ static MACHINE_CONFIG_START( strahl, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4163,7 +4148,6 @@ static MACHINE_CONFIG_START( hachamf, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4207,7 +4191,6 @@ static MACHINE_CONFIG_START( macross, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4251,7 +4234,6 @@ static MACHINE_CONFIG_START( blkheart, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8 ) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4295,7 +4277,6 @@ static MACHINE_CONFIG_START( gunnail, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("nmk004", nmk004_device, ym2203_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
@@ -4341,7 +4322,6 @@ static MACHINE_CONFIG_START( macross2, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW)
@@ -4388,7 +4368,6 @@ static MACHINE_CONFIG_START( tdragon2, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW)
@@ -4434,7 +4413,6 @@ static MACHINE_CONFIG_START( raphero, nmk16_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.70)
MCFG_SOUND_ROUTE(1, "mono", 0.70)
MCFG_SOUND_ROUTE(2, "mono", 0.70)
diff --git a/src/mame/drivers/nova2001.c b/src/mame/drivers/nova2001.c
index 3a67cc61282..5bf9d3b9413 100644
--- a/src/mame/drivers/nova2001.c
+++ b/src/mame/drivers/nova2001.c
@@ -623,55 +623,6 @@ static GFXDECODE_START( raiders5 )
GFXDECODE_END
-
-/*************************************
- *
- * Sound definitions
- *
- *************************************/
-
-static const ay8910_interface nova2001_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(nova2001_state, nova2001_scroll_x_w),
- DEVCB_DRIVER_MEMBER(nova2001_state, nova2001_scroll_y_w)
-};
-
-static const ay8910_interface nova2001_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface pkunwar_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface pkunwar_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN2"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* Machine drivers
@@ -704,11 +655,13 @@ static MACHINE_CONFIG_START( nova2001, nova2001_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/6) // 2 MHz verified on schematics
- MCFG_SOUND_CONFIG(nova2001_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nova2001_state, nova2001_scroll_x_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nova2001_state, nova2001_scroll_y_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/6)
- MCFG_SOUND_CONFIG(nova2001_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -746,11 +699,13 @@ static MACHINE_CONFIG_START( ninjakun, nova2001_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/4) // 3 MHz
- MCFG_SOUND_CONFIG(nova2001_ay8910_interface_2) // note swapped order wrt nova2001
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/4) // 3 MHz
- MCFG_SOUND_CONFIG(nova2001_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nova2001_state, nova2001_scroll_x_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nova2001_state, nova2001_scroll_y_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MACHINE_CONFIG_END
@@ -781,11 +736,13 @@ static MACHINE_CONFIG_START( pkunwar, nova2001_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/8) // 1.5MHz (correct?)
- MCFG_SOUND_CONFIG(pkunwar_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(pkunwar_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -821,11 +778,13 @@ static MACHINE_CONFIG_START( raiders5, nova2001_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/8) // 1.5MHz
- MCFG_SOUND_CONFIG(pkunwar_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(pkunwar_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c
index dff1bfb4d34..a90af31d6c6 100644
--- a/src/mame/drivers/nycaptor.c
+++ b/src/mame/drivers/nycaptor.c
@@ -293,16 +293,6 @@ WRITE8_MEMBER(nycaptor_state::unk_w)
{
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(nycaptor_state,unk_w),
- DEVCB_DRIVER_MEMBER(nycaptor_state,unk_w)
-};
-
READ8_MEMBER(nycaptor_state::nycaptor_generic_control_r)
{
return m_generic_control_reg;
@@ -843,11 +833,13 @@ static MACHINE_CONFIG_START( nycaptor, nycaptor_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
@@ -902,11 +894,13 @@ static MACHINE_CONFIG_START( cyclshtg, nycaptor_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
@@ -961,11 +955,13 @@ static MACHINE_CONFIG_START( bronx, nycaptor_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c
index 580dd33d359..7deb94c061b 100644
--- a/src/mame/drivers/nyny.c
+++ b/src/mame/drivers/nyny.c
@@ -384,30 +384,6 @@ WRITE8_MEMBER(nyny_state::nyny_ay8910_37_port_a_w)
/*logerror("%x PORT A write %x at Y=%x X=%x\n", space.device().safe_pc(), data, m_screen->vpos(), m_screen->hpos());*/
}
-
-static const ay8910_interface ay8910_37_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(nyny_state,nyny_ay8910_37_port_a_w),
- DEVCB_DEVICE_MEMBER("dac", dac_device, write_unsigned8)
-};
-
-
-static const ay8910_interface ay8910_64_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("SW2"),
- DEVCB_INPUT_PORT("SW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* Audio system - CPU 2
@@ -666,11 +642,13 @@ static MACHINE_CONFIG_START( nyny, nyny_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, AUDIO_CPU_1_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_37_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nyny_state, nyny_ay8910_37_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, AUDIO_CPU_1_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_64_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("SW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay3", AY8910, AUDIO_CPU_2_CLOCK)
diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c
index 65c38addab8..ca15ea912d0 100644
--- a/src/mame/drivers/ojankohs.c
+++ b/src/mame/drivers/ojankohs.c
@@ -750,32 +750,6 @@ static GFXDECODE_START( ojankohs )
GFXDECODE_ENTRY( "gfx1", 0, ojankohs_bglayout, 0, 64 )
GFXDECODE_END
-
-static const ay8910_interface ojankohs_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(ojankohs_state,ojankohs_ay8910_0_r), /* read port #0 */
- DEVCB_DRIVER_MEMBER(ojankohs_state,ojankohs_ay8910_1_r) /* read port #1 */
-};
-
-static const ay8910_interface ojankoy_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"), /* read port #0 */
- DEVCB_INPUT_PORT("DSW2"), /* read port #1 */
-};
-
-static const ay8910_interface ojankoc_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"), /* read port #0 */
- DEVCB_INPUT_PORT("DSW2"), /* read port #1 */
-};
-
-
MACHINE_START_MEMBER(ojankohs_state,common)
{
save_item(NAME(m_gfxreg));
@@ -862,7 +836,8 @@ static MACHINE_CONFIG_START( ojankohs, ojankohs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 12000000/6)
- MCFG_SOUND_CONFIG(ojankohs_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(ojankohs_state, ojankohs_ay8910_0_r)) /* read port #0 */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(ojankohs_state, ojankohs_ay8910_1_r)) /* read port #1 */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
@@ -901,7 +876,8 @@ static MACHINE_CONFIG_START( ojankoy, ojankohs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(ojankoy_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
@@ -939,7 +915,8 @@ static MACHINE_CONFIG_START( ccasino, ojankohs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(ojankoy_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
@@ -976,7 +953,8 @@ static MACHINE_CONFIG_START( ojankoc, ojankohs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
- MCFG_SOUND_CONFIG(ojankoc_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("msm", MSM5205, 8000000/22)
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index ec04fa72a3a..dc0b573ccad 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -689,6 +689,7 @@ static MACHINE_CONFIG_START( othunder, othunder_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(othunder_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "2610.0l", 0.25)
MCFG_SOUND_ROUTE(0, "2610.0r", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1l", 1.0)
diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c
index 87c408ae27c..37d1ae0974d 100644
--- a/src/mame/drivers/pacman.c
+++ b/src/mame/drivers/pacman.c
@@ -3556,16 +3556,6 @@ static MACHINE_CONFIG_DERIVED( crush4, mschamp )
MCFG_GFXDECODE_MODIFY("gfxdecode", crush4)
MACHINE_CONFIG_END
-static const ay8910_interface crushs_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_DERIVED( crushs, pacman )
/* basic machine hardware */
@@ -3575,7 +3565,6 @@ static MACHINE_CONFIG_DERIVED( crushs, pacman )
/* sound hardware */
MCFG_SOUND_ADD("ay8912", AY8912, 1789750)
- MCFG_SOUND_CONFIG(crushs_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c
index d7dadd2ba36..27fe69bf05b 100644
--- a/src/mame/drivers/pandoras.c
+++ b/src/mame/drivers/pandoras.c
@@ -315,16 +315,6 @@ READ8_MEMBER(pandoras_state::pandoras_portB_r)
return (m_audiocpu->total_cycles() / 512) & 0x0f;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(pandoras_state,pandoras_portA_r), // not used
- DEVCB_DRIVER_MEMBER(pandoras_state,pandoras_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( pandoras, pandoras_state )
/* basic machine hardware */
@@ -364,7 +354,8 @@ static MACHINE_CONFIG_START( pandoras, pandoras_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SOUND_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pandoras_state, pandoras_portA_r)) // not used
+ MCFG_AY8910_PORT_B_READ_CB(READ8(pandoras_state, pandoras_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c
index eb864d79349..f561d50cfaf 100644
--- a/src/mame/drivers/pastelg.c
+++ b/src/mame/drivers/pastelg.c
@@ -392,16 +392,6 @@ static INPUT_PORTS_START( galds )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( pastelg, pastelg_state )
@@ -432,7 +422,8 @@ static MACHINE_CONFIG_START( pastelg, pastelg_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWB"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWA"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_DAC_ADD("dac")
@@ -489,7 +480,8 @@ static MACHINE_CONFIG_START( threeds, pastelg_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWB"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWA"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/pengadvb.c b/src/mame/drivers/pengadvb.c
index 23ebbc34dfb..c51ff8f2a47 100644
--- a/src/mame/drivers/pengadvb.c
+++ b/src/mame/drivers/pengadvb.c
@@ -148,16 +148,6 @@ WRITE8_MEMBER(pengadvb_state::pengadvb_psg_port_b_w)
// leftover from msx ver?
}
-static const ay8910_interface pengadvb_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(pengadvb_state,pengadvb_psg_port_b_w)
-};
-
/**************************************************************************/
// I8255
@@ -263,7 +253,8 @@ static MACHINE_CONFIG_START( pengadvb, pengadvb_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_10_738635MHz/6)
- MCFG_SOUND_CONFIG(pengadvb_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(pengadvb_state, pengadvb_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/phoenix.c b/src/mame/drivers/phoenix.c
index f3c8183312c..6bb9585e26e 100644
--- a/src/mame/drivers/phoenix.c
+++ b/src/mame/drivers/phoenix.c
@@ -411,18 +411,6 @@ static GFXDECODE_START( pleiads )
GFXDECODE_END
-static const ay8910_interface survival_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(phoenix_state, survival_protection_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
MACHINE_RESET_MEMBER(phoenix_state,phoenix)
{
membank("bank1")->set_base(memregion("maincpu")->base() + 0x4000);
@@ -528,7 +516,7 @@ static MACHINE_CONFIG_START( survival, phoenix_state )
/* FIXME: check clock */
MCFG_SOUND_ADD("aysnd", AY8910, 11000000/4)
- MCFG_SOUND_CONFIG(survival_ay8910_interface)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(phoenix_state, survival_protection_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c
index d8a03d367da..f84df2c184d 100644
--- a/src/mame/drivers/pipedrm.c
+++ b/src/mame/drivers/pipedrm.c
@@ -580,16 +580,6 @@ WRITE_LINE_MEMBER(pipedrm_state::irqhandler)
m_subcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
-
/*************************************
*
* Machine driver
@@ -679,6 +669,7 @@ static MACHINE_CONFIG_START( pipedrm, pipedrm_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(pipedrm_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -720,7 +711,7 @@ static MACHINE_CONFIG_START( hatris, pipedrm_state )
MCFG_SOUND_ADD("ymsnd", YM2608, 8000000)
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pipedrm_state, irqhandler))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index 8423140c162..89dd381d2ee 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -321,13 +321,6 @@ static const z80_daisy_config daisy_chain_sound[] =
{ NULL }
};
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
PALETTE_INIT_MEMBER(pipeline_state, pipeline)
{
int r,g,b,i,c;
@@ -395,7 +388,6 @@ static MACHINE_CONFIG_START( pipeline, pipeline_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 7372800/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c
index 4340aa3a5fc..656fb03c633 100644
--- a/src/mame/drivers/pitnrun.c
+++ b/src/mame/drivers/pitnrun.c
@@ -211,16 +211,6 @@ static const gfx_layout charlayout =
8*8*2
};
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static GFXDECODE_START( pitnrun )
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 64, 2 )
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32, 2 )
@@ -260,11 +250,13 @@ static MACHINE_CONFIG_START( pitnrun, pitnrun_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c
index e8c278afe06..6b05a667340 100644
--- a/src/mame/drivers/pkscram.c
+++ b/src/mame/drivers/pkscram.c
@@ -281,13 +281,6 @@ WRITE_LINE_MEMBER(pkscram_state::irqhandler)
m_maincpu->set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
void pkscram_state::machine_start()
{
save_item(NAME(m_out));
@@ -332,7 +325,6 @@ static MACHINE_CONFIG_START( pkscramble, pkscram_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 12000000/4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pkscram_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/poker72.c b/src/mame/drivers/poker72.c
index c58f7606ced..1f8df5c34fc 100644
--- a/src/mame/drivers/poker72.c
+++ b/src/mame/drivers/poker72.c
@@ -337,16 +337,6 @@ PALETTE_INIT_MEMBER(poker72_state, poker72)
}
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
void poker72_state::machine_reset()
{
UINT8 *ROM = memregion("maincpu")->base();
@@ -379,7 +369,8 @@ static MACHINE_CONFIG_START( poker72, poker72_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay", AY8910, 8000000/8) /* ? Mhz */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/popeye.c b/src/mame/drivers/popeye.c
index 48c5f0cee63..c3bf61bffca 100644
--- a/src/mame/drivers/popeye.c
+++ b/src/mame/drivers/popeye.c
@@ -444,27 +444,6 @@ WRITE8_MEMBER(popeye_state::popeye_portB_w)
m_dswbit = (data & 0x0e) >> 1;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(popeye_state,popeye_portB_w)
-};
-
-/* Does Sky Skipper have the same filtering? */
-static const ay8910_interface ay8910_nl_config =
-{
- AY8910_RESISTOR_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(popeye_state,popeye_portB_w)
-};
-
static MACHINE_CONFIG_START( skyskipr, popeye_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) /* 4 MHz */
@@ -489,7 +468,8 @@ static MACHINE_CONFIG_START( skyskipr, popeye_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_8MHz/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(popeye_state, popeye_portB_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
@@ -500,7 +480,9 @@ static MACHINE_CONFIG_DERIVED( popeye, skyskipr )
MCFG_SOUND_MODIFY("aysnd")
MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_CONFIG(ay8910_nl_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_RESISTOR_OUTPUT) /* Does Sky Skipper have the same filtering? */
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(popeye_state, popeye_portB_w))
MCFG_SOUND_ROUTE_EX(0, "snd_nl", 1.0, 0)
MCFG_SOUND_ROUTE_EX(1, "snd_nl", 1.0, 1)
MCFG_SOUND_ROUTE_EX(2, "snd_nl", 1.0, 2)
diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c
index 1cdf79c4274..bb41ed749d4 100644
--- a/src/mame/drivers/powerins.c
+++ b/src/mame/drivers/powerins.c
@@ -321,13 +321,6 @@ WRITE_LINE_MEMBER(powerins_state::irqhandler)
m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
static MACHINE_CONFIG_START( powerins, powerins_state )
/* basic machine hardware */
@@ -365,7 +358,6 @@ static MACHINE_CONFIG_START( powerins, powerins_state )
MCFG_SOUND_ADD("ym2203", YM2203, 12000000 / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(powerins_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
MCFG_DEVICE_ADD("nmk112", NMK112, 0)
diff --git a/src/mame/drivers/proconn.c b/src/mame/drivers/proconn.c
index 93082ec1f98..50309875134 100644
--- a/src/mame/drivers/proconn.c
+++ b/src/mame/drivers/proconn.c
@@ -311,16 +311,6 @@ WRITE8_MEMBER(proconn_state::meter_w)
}
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(proconn_state,meter_w),
-};
-
-
static const z80_daisy_config z80_daisy_chain[] =
{
{ "z80ctc" },
@@ -396,7 +386,7 @@ static MACHINE_CONFIG_START( proconn, proconn_state )
MCFG_DEFAULT_LAYOUT(layout_proconn)
MCFG_SOUND_ADD("aysnd", AY8910, 1000000) /* ?? Mhz */ // YM2149F on PC92?
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(proconn_state, meter_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c
index 7024ccf9cb2..8fd3c8c9466 100644
--- a/src/mame/drivers/psikyo.c
+++ b/src/mame/drivers/psikyo.c
@@ -1062,6 +1062,7 @@ static MACHINE_CONFIG_START( sngkace, psikyo_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_32MHz/4) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(psikyo_state, sound_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.2)
MCFG_SOUND_ROUTE(0, "rspeaker", 1.2)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -1108,6 +1109,7 @@ static MACHINE_CONFIG_START( gunbird, psikyo_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(psikyo_state, sound_irq))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.2)
MCFG_SOUND_ROUTE(0, "rspeaker", 1.2)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c
index 7e2eaa15c36..ce8011e38de 100644
--- a/src/mame/drivers/psychic5.c
+++ b/src/mame/drivers/psychic5.c
@@ -648,13 +648,6 @@ WRITE_LINE_MEMBER(psychic5_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( psychic5, psychic5_state )
/* basic machine hardware */
@@ -688,7 +681,6 @@ static MACHINE_CONFIG_START( psychic5, psychic5_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(psychic5_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -733,7 +725,6 @@ static MACHINE_CONFIG_START( bombsa, psychic5_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(psychic5_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.30)
MCFG_SOUND_ROUTE(1, "mono", 0.30)
MCFG_SOUND_ROUTE(2, "mono", 0.30)
diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c
index dadfc98ca1d..8cb8c3c69c3 100644
--- a/src/mame/drivers/pushman.c
+++ b/src/mame/drivers/pushman.c
@@ -383,14 +383,6 @@ WRITE_LINE_MEMBER(pushman_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
-
void pushman_state::machine_start()
{
save_item(NAME(m_control));
@@ -447,7 +439,6 @@ static MACHINE_CONFIG_START( pushman, pushman_state )
MCFG_SOUND_ADD("ym1", YM2203, 2000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pushman_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 2000000)
@@ -495,7 +486,6 @@ static MACHINE_CONFIG_START( bballs, pushman_state )
MCFG_SOUND_ADD("ym1", YM2203, 2000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pushman_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 2000000)
diff --git a/src/mame/drivers/quizdna.c b/src/mame/drivers/quizdna.c
index 9dacfaf2ddf..b7273faeb1d 100644
--- a/src/mame/drivers/quizdna.c
+++ b/src/mame/drivers/quizdna.c
@@ -427,17 +427,6 @@ static GFXDECODE_START( quizdna )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( quizdna, quizdna_state )
/* basic machine hardware */
@@ -463,7 +452,8 @@ static MACHINE_CONFIG_START( quizdna, quizdna_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, MCLK/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ROUTE(1, "mono", 0.10)
MCFG_SOUND_ROUTE(2, "mono", 0.10)
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 7289e3a1692..aebd8b349b5 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -201,29 +201,6 @@ WRITE8_MEMBER(r2dtank_state::AY8910_port_w)
}
-static const ay8910_interface ay8910_1_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-static const ay8910_interface ay8910_2_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* 74123
@@ -514,11 +491,12 @@ static MACHINE_CONFIG_START( r2dtank, r2dtank_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, (4000000 / 4))
- MCFG_SOUND_CONFIG(ay8910_1_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, (4000000 / 4))
- MCFG_SOUND_CONFIG(ay8910_2_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWA"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c
index e8339bd863f..4b5b6fbb6eb 100644
--- a/src/mame/drivers/re900.c
+++ b/src/mame/drivers/re900.c
@@ -366,31 +366,6 @@ static INPUT_PORTS_START( bs94 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Auditor") PORT_CODE(KEYCODE_9)
INPUT_PORTS_END
-
-/*************************
-* AY8910 Interfase *
-*************************/
-
-static const ay8910_interface ay8910_re900 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(re900_state,re_psg_portA_r),
- DEVCB_DRIVER_MEMBER(re900_state,re_psg_portB_r),
- DEVCB_DRIVER_MEMBER(re900_state,re_mux_port_A_w),
- DEVCB_DRIVER_MEMBER(re900_state,re_mux_port_B_w)
-};
-
-static const ay8910_interface ay8910_bs94 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/***************************
* Machine Driver *
***************************/
@@ -414,7 +389,10 @@ static MACHINE_CONFIG_START( re900, re900_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay_re900", AY8910, TMS_CLOCK) /* From TMS9128NL - Pin 37 (GROMCLK) */
- MCFG_SOUND_CONFIG(ay8910_re900)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(re900_state, re_psg_portA_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(re900_state, re_psg_portB_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(re900_state, re_mux_port_A_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(re900_state, re_mux_port_B_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
@@ -422,7 +400,10 @@ static MACHINE_CONFIG_DERIVED( bs94, re900 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay_re900")
- MCFG_SOUND_CONFIG(ay8910_bs94)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
+ MCFG_AY8910_PORT_A_WRITE_CB(NULL)
+ MCFG_AY8910_PORT_B_WRITE_CB(NULL)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c
index 7e83db4c306..ea01d7c335f 100644
--- a/src/mame/drivers/rgum.c
+++ b/src/mame/drivers/rgum.c
@@ -234,16 +234,6 @@ static GFXDECODE_START( rgum )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( rgum, rgum_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M65C02,24000000/16) /* ? MHz */
@@ -274,7 +264,6 @@ static MACHINE_CONFIG_START( rgum, rgum_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 24000000/16) /* guessed to use the same xtal as the crtc */
- MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/rmhaihai.c b/src/mame/drivers/rmhaihai.c
index f18c2a9e3af..63463470401 100644
--- a/src/mame/drivers/rmhaihai.c
+++ b/src/mame/drivers/rmhaihai.c
@@ -451,15 +451,6 @@ static GFXDECODE_START( themj )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW1")
-};
-
static MACHINE_CONFIG_START( rmhaihai, rmhaihai_state )
/* basic machine hardware */
@@ -485,7 +476,8 @@ static MACHINE_CONFIG_START( rmhaihai, rmhaihai_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 20000000/16)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("msm", MSM5205, 500000)
diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c
index 531a7c6f65f..68c3591323d 100644
--- a/src/mame/drivers/route16.c
+++ b/src/mame/drivers/route16.c
@@ -553,18 +553,6 @@ static INPUT_PORTS_START( ttmahjng )
INPUT_PORTS_END
-
-static const ay8910_interface stratvox_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(route16_state,stratvox_sn76477_w), /* SN76477 commands (not used in Route 16?) */
- DEVCB_NULL
-};
-
-
static const sn76477_interface sn76477_intf =
{
RES_K(47), /* 4 noise_res */
@@ -642,7 +630,7 @@ static MACHINE_CONFIG_DERIVED( stratvox, route16 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8910")
- MCFG_SOUND_CONFIG(stratvox_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(route16_state, stratvox_sn76477_w)) /* SN76477 commands (not used in Route 16?) */
MCFG_SOUND_ADD("snsnd", SN76477, 0)
MCFG_SOUND_CONFIG(sn76477_intf)
diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c
index 94a46e4870c..c77a3f2d979 100644
--- a/src/mame/drivers/royalmah.c
+++ b/src/mame/drivers/royalmah.c
@@ -3213,14 +3213,6 @@ static INPUT_PORTS_START( mjvegasa )
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(royalmah_state,royalmah_player_1_port_r),
- DEVCB_DRIVER_MEMBER(royalmah_state,royalmah_player_2_port_r)
-};
-
static MACHINE_CONFIG_START( royalmah, royalmah_state )
/* basic machine hardware */
@@ -3247,7 +3239,8 @@ static MACHINE_CONFIG_START( royalmah, royalmah_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 18432000/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(royalmah_state, royalmah_player_1_port_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(royalmah_state, royalmah_player_2_port_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c
index 736f6327306..198bf5cdc1d 100644
--- a/src/mame/drivers/sandscrp.c
+++ b/src/mame/drivers/sandscrp.c
@@ -469,17 +469,6 @@ WRITE_LINE_MEMBER(sandscrp_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"), /* Port A Read */
- DEVCB_INPUT_PORT("DSW2"), /* Port B Read */
- DEVCB_NULL, /* Port A Write */
- DEVCB_NULL, /* Port B Write */
-};
-
-
static MACHINE_CONFIG_START( sandscrp, sandscrp_state )
/* basic machine hardware */
@@ -528,7 +517,8 @@ static MACHINE_CONFIG_START( sandscrp, sandscrp_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sandscrp_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sanremo.c b/src/mame/drivers/sanremo.c
index 5843ca17b3d..2c25c399d0c 100644
--- a/src/mame/drivers/sanremo.c
+++ b/src/mame/drivers/sanremo.c
@@ -332,20 +332,6 @@ static GFXDECODE_START( sanremo )
GFXDECODE_ENTRY( "gfx", 0, tilelayout, 0, 1 )
GFXDECODE_END
-/********************************************
-* Sound Interface *
-********************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/*********************************************
* Machine Drivers *
@@ -385,7 +371,7 @@ static MACHINE_CONFIG_START( sanremo, sanremo_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, SND_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c
index f733c68b7e5..82b67c2ef58 100644
--- a/src/mame/drivers/scobra.c
+++ b/src/mame/drivers/scobra.c
@@ -92,17 +92,6 @@ static GFXDECODE_START( scobra )
GFXDECODE_END
-
-static const ay8910_interface hustler_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(scramble_state, hustler_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
READ8_MEMBER(scobra_state::scobra_type2_ppi8255_0_r){ return m_ppi8255_0->read(space, offset >> 2); }
READ8_MEMBER(scobra_state::scobra_type2_ppi8255_1_r){ return m_ppi8255_1->read(space, offset >> 2); }
WRITE8_MEMBER(scobra_state::scobra_type2_ppi8255_0_w){ m_ppi8255_0->write(space, offset >> 2, data); }
@@ -713,17 +702,6 @@ static INPUT_PORTS_START( mimonsco )
INPUT_PORTS_END
-static const ay8910_interface scobra_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(scramble_state, scramble_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( type1, scobra_state )
/* basic machine hardware */
@@ -777,7 +755,8 @@ static MACHINE_CONFIG_START( type1, scobra_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
MCFG_SOUND_ADD("ay2", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(scobra_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(scramble_state, scramble_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
MACHINE_CONFIG_END
@@ -914,7 +893,8 @@ static MACHINE_CONFIG_START( hustler, scobra_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(hustler_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(scramble_state, hustler_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c
index 08276bfa40b..8cad6609f3c 100644
--- a/src/mame/drivers/scramble.c
+++ b/src/mame/drivers/scramble.c
@@ -1345,47 +1345,6 @@ static GFXDECODE_START( ad2083 )
GFXDECODE_END
-static const ay8910_interface scramble_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_DRIVER_MEMBER(scramble_state, scramble_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface hotshock_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(scramble_state, hotshock_soundlatch_r),
- DEVCB_DRIVER_MEMBER(scramble_state, scramble_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface triplep_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface harem_ay8910_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, // Port A read
- DEVCB_NULL, // Port B read
- DEVCB_DRIVER_MEMBER(scramble_state, harem_portA_w), // Port A write
- DEVCB_DRIVER_MEMBER(scramble_state, harem_portB_w), // Port B write
-};
-
-
/**************************************************************************/
static MACHINE_CONFIG_START( scramble, scramble_state )
@@ -1442,7 +1401,8 @@ static MACHINE_CONFIG_START( scramble, scramble_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
MCFG_SOUND_ADD("8910.2", AY8910, 14318000/8)
- MCFG_SOUND_CONFIG(scramble_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(scramble_state, scramble_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
MACHINE_CONFIG_END
@@ -1564,7 +1524,8 @@ static MACHINE_CONFIG_DERIVED( hotshock, scramble )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MCFG_SOUND_MODIFY("8910.2")
- MCFG_SOUND_CONFIG(hotshock_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(scramble_state, hotshock_soundlatch_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(scramble_state, scramble_portB_r))
MCFG_SOUND_ROUTES_RESET()
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MACHINE_CONFIG_END
@@ -1610,7 +1571,8 @@ static MACHINE_CONFIG_DERIVED( triplep, scramble )
/* sound hardware */
MCFG_SOUND_MODIFY("8910.1")
MCFG_SOUND_CLOCK(18432000/12) // triple punch/knock out ay clock is 1.535MHz, derived from main cpu xtal; verified on hardware
- MCFG_SOUND_CONFIG(triplep_ay8910_interface)
+
+
MCFG_SOUND_ROUTES_RESET()
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
@@ -1719,7 +1681,8 @@ static MACHINE_CONFIG_DERIVED( harem, scramble )
/* sound hardware */
MCFG_SOUND_ADD("8910.3", AY8910, 14318000/8)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
- MCFG_SOUND_CONFIG(harem_ay8910_interface_3)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(scramble_state, harem_portA_w)) // Port A write
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(scramble_state, harem_portB_w)) // Port B write
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c
index 8fd5fe34975..5600f4b7350 100644
--- a/src/mame/drivers/segahang.c
+++ b/src/mame/drivers/segahang.c
@@ -738,18 +738,6 @@ static INPUT_PORTS_START( enduror )
INPUT_PORTS_END
-
-//**************************************************************************
-// SOUND CONFIGURATIONS
-//**************************************************************************
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
//**************************************************************************
// GRAPHICS DECODING
//**************************************************************************
@@ -842,7 +830,6 @@ static MACHINE_CONFIG_FRAGMENT( sound_board_2203 )
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK_8MHz/2)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(segahang_state, sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.13)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.13)
@@ -871,7 +858,6 @@ static MACHINE_CONFIG_FRAGMENT( sound_board_2203x2 )
MCFG_SOUND_ADD("ym1", YM2203, MASTER_CLOCK_8MHz/2)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(segahang_state, sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.13)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.13)
diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c
index 4295aeefe37..a3875a7f839 100644
--- a/src/mame/drivers/seicross.c
+++ b/src/mame/drivers/seicross.c
@@ -362,17 +362,6 @@ static GFXDECODE_START( seicross )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(seicross_state,friskyt_portB_r),
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(seicross_state,friskyt_portB_w)
-};
-
INTERRUPT_GEN_MEMBER(seicross_state::vblank_irq)
{
if(m_irq_mask)
@@ -412,7 +401,8 @@ static MACHINE_CONFIG_START( no_nvram, seicross_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 1536000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(seicross_state, friskyt_portB_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(seicross_state, friskyt_portB_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c
index 789177a5bd0..acdf9845bb6 100644
--- a/src/mame/drivers/seta.c
+++ b/src/mame/drivers/seta.c
@@ -7534,17 +7534,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(seta_state::seta_sub_interrupt)
Thundercade
***************************************************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(seta_state,dsw1_r), /* input A: DSW 1 */
- DEVCB_DRIVER_MEMBER(seta_state,dsw2_r), /* input B: DSW 2 */
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
TIMER_DEVICE_CALLBACK_MEMBER(seta_state::tndrcade_sub_interrupt)
{
int scanline = param;
@@ -7589,7 +7578,8 @@ static MACHINE_CONFIG_START( tndrcade, seta_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ym1", YM2203, 16000000/4) /* 4 MHz */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(seta_state, dsw1_r)) /* input A: DSW 1 */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(seta_state, dsw2_r)) /* input B: DSW 2 */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.35)
diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c
index 972f8dc4e9e..08fbb430105 100644
--- a/src/mame/drivers/sfkick.c
+++ b/src/mame/drivers/sfkick.c
@@ -455,13 +455,6 @@ WRITE_LINE_MEMBER(sfkick_state::irqhandler)
m_soundcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,
-};
-
static MACHINE_CONFIG_START( sfkick, sfkick_state )
MCFG_CPU_ADD("maincpu",Z80,MASTER_CLOCK/6)
@@ -494,7 +487,6 @@ static MACHINE_CONFIG_START( sfkick, sfkick_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, MASTER_CLOCK/6)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sfkick_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c
index 91ccd4d8328..4b67b014b20 100644
--- a/src/mame/drivers/shangha3.c
+++ b/src/mame/drivers/shangha3.c
@@ -451,17 +451,6 @@ static GFXDECODE_START( shangha3 )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
WRITE_LINE_MEMBER(shangha3_state::irqhandler)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, state);
@@ -496,7 +485,8 @@ static MACHINE_CONFIG_START( shangha3, shangha3_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_48MHz/32) // 1.5MHz
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_OKIM6295_ADD("oki", XTAL_1_056MHz, OKIM6295_PIN7_HIGH) // pin 7 not verified
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index 6bad3906ec6..d48b5223e16 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -415,26 +415,6 @@ static INPUT_PORTS_START( shangha2 )
INPUT_PORTS_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-static const ay8910_interface kothello_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( shanghai, shanghai_state )
/* basic machine hardware */
@@ -462,7 +442,8 @@ static MACHINE_CONFIG_START( shanghai, shanghai_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -496,7 +477,8 @@ static MACHINE_CONFIG_START( shangha2, shanghai_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -535,7 +517,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state )
/* same as standard seibu ym2203, but "ym1" also reads "DSW" */
MCFG_SOUND_ADD("ym1", YM2203, XTAL_16MHz/4)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2203_irqhandler))
- MCFG_YM2203_AY8910_INTF(&kothello_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_16MHz/4)
diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c
index dafaf7f9147..6f35463e666 100644
--- a/src/mame/drivers/shangkid.c
+++ b/src/mame/drivers/shangkid.c
@@ -336,28 +336,6 @@ ADDRESS_MAP_END
/***************************************************************************************/
-static const ay8910_interface chinhero_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(shangkid_state,chinhero_ay8910_porta_w),
- DEVCB_DRIVER_MEMBER(shangkid_state,ay8910_portb_w)
-};
-
-
-static const ay8910_interface shangkid_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(shangkid_state,shangkid_ay8910_porta_w),
- DEVCB_DRIVER_MEMBER(shangkid_state,ay8910_portb_w)
-};
-
-
static MACHINE_CONFIG_START( chinhero, shangkid_state )
/* basic machine hardware */
@@ -398,7 +376,8 @@ static MACHINE_CONFIG_START( chinhero, shangkid_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
- MCFG_SOUND_CONFIG(chinhero_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shangkid_state, chinhero_ay8910_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(shangkid_state, ay8910_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
@@ -422,7 +401,8 @@ static MACHINE_CONFIG_DERIVED( shangkid, chinhero )
MCFG_GFXDECODE_MODIFY("gfxdecode", shangkid)
MCFG_SOUND_MODIFY("aysnd")
- MCFG_SOUND_CONFIG(shangkid_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shangkid_state, shangkid_ay8910_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(shangkid_state, ay8910_portb_w))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c
index 44aa4120be4..ad29e5ed565 100644
--- a/src/mame/drivers/shootout.c
+++ b/src/mame/drivers/shootout.c
@@ -239,23 +239,6 @@ WRITE_LINE_MEMBER(shootout_state::shootout_snd2_irq)
m_maincpu->set_input_line(0, state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(shootout_state, shootout_bankswitch_w),
- DEVCB_DRIVER_MEMBER(shootout_state, shootout_flipscreen_w)
-};
-
static MACHINE_CONFIG_START( shootout, shootout_state )
/* basic machine hardware */
@@ -283,7 +266,6 @@ static MACHINE_CONFIG_START( shootout, shootout_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(shootout_state, shootout_snd_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -312,7 +294,8 @@ static MACHINE_CONFIG_START( shootouj, shootout_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(shootout_state, shootout_snd2_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shootout_state, shootout_bankswitch_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(shootout_state, shootout_flipscreen_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c
index a527178265c..95c433cec8e 100644
--- a/src/mame/drivers/sidearms.c
+++ b/src/mame/drivers/sidearms.c
@@ -594,13 +594,6 @@ WRITE_LINE_MEMBER( sidearms_state::irqhandler )
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
static MACHINE_CONFIG_START( sidearms, sidearms_state )
/* basic machine hardware */
@@ -633,7 +626,6 @@ static MACHINE_CONFIG_START( sidearms, sidearms_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -679,7 +671,6 @@ static MACHINE_CONFIG_START( turtship, sidearms_state )
MCFG_SOUND_ADD("ym1", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index 763619cbfca..b20b7dd3e39 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -902,21 +902,6 @@ static INPUT_PORTS_START( sstar97 )
INPUT_PORTS_END
-/**********************************
-* AY-3-8910 Interface *
-**********************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_INPUT_PORT("DSW4"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
// It runs in IM 0, thus needs an opcode on the data bus
INTERRUPT_GEN_MEMBER(skylncr_state::skylncr_vblank_interrupt)
{
@@ -964,7 +949,8 @@ static MACHINE_CONFIG_START( skylncr, skylncr_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW3"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW4"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/slapfght.c b/src/mame/drivers/slapfght.c
index 7f10406a51c..9849c46822c 100644
--- a/src/mame/drivers/slapfght.c
+++ b/src/mame/drivers/slapfght.c
@@ -963,28 +963,6 @@ static GFXDECODE_START( slapfght )
GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0, 16 )
GFXDECODE_END
-/**************************************************************************/
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/***************************************************************************
@@ -1027,11 +1005,13 @@ static MACHINE_CONFIG_START( perfrman, slapfght_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_16MHz/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_16MHz/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -1073,11 +1053,13 @@ static MACHINE_CONFIG_START( tigerh, slapfght_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_36MHz/24) // 1.5MHz
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_36MHz/24) // 1.5MHz
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -1136,11 +1118,13 @@ static MACHINE_CONFIG_START( slapfigh, slapfght_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_36MHz/24) // 1.5MHz
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_36MHz/24) // 1.5MHz
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c
index 3173bee068f..240085621fd 100644
--- a/src/mame/drivers/slapshot.c
+++ b/src/mame/drivers/slapshot.c
@@ -525,6 +525,7 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(slapshot_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -586,6 +587,7 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(slapshot_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index d55d2915ad5..854a5baaa91 100644
--- a/src/mame/drivers/slotcarn.c
+++ b/src/mame/drivers/slotcarn.c
@@ -529,22 +529,6 @@ void slotcarn_state::machine_start()
save_pointer(NAME(m_ram_palette), RAM_PALETTE_SIZE);
}
-
-/*************************************
-* AY8910 Interface *
-*************************************/
-
-static const ay8910_interface scarn_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/***********************************
* Machine Driver *
***********************************/
@@ -588,7 +572,7 @@ static MACHINE_CONFIG_START( slotcarn, slotcarn_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd",AY8910, SND_CLOCK)
- MCFG_SOUND_CONFIG(scarn_ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c
index 93fc6f31490..ddffd7fa874 100644
--- a/src/mame/drivers/sothello.c
+++ b/src/mame/drivers/sothello.c
@@ -344,16 +344,6 @@ void sothello_state::machine_reset()
{
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL,
-};
-
static MACHINE_CONFIG_START( sothello, sothello_state )
/* basic machine hardware */
@@ -387,7 +377,8 @@ static MACHINE_CONFIG_START( sothello, sothello_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, YM_CLOCK)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sothello_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
diff --git a/src/mame/drivers/speedatk.c b/src/mame/drivers/speedatk.c
index 5a871816bd6..a342e3871f3 100644
--- a/src/mame/drivers/speedatk.c
+++ b/src/mame/drivers/speedatk.c
@@ -293,16 +293,6 @@ WRITE8_MEMBER(speedatk_state::speedatk_output_w)
logerror("%02x\n",data);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_DRIVER_MEMBER(speedatk_state,speedatk_output_w),
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( speedatk, speedatk_state )
MCFG_CPU_ADD("maincpu", Z80,MASTER_CLOCK/2) //divider is unknown
@@ -334,7 +324,8 @@ static MACHINE_CONFIG_START( speedatk, speedatk_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/4) //divider is unknown
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(speedatk_state, speedatk_output_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c
index 150de6ef881..82d8fd328f9 100644
--- a/src/mame/drivers/splash.c
+++ b/src/mame/drivers/splash.c
@@ -518,14 +518,6 @@ static MACHINE_CONFIG_START( splash, splash_state )
MACHINE_CONFIG_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_NULL, DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(splash_state::roldfrog_interrupt)
{
m_vblank_irq = 1;
@@ -565,7 +557,6 @@ static MACHINE_CONFIG_START( roldfrog, splash_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_24MHz / 8)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(splash_state, ym_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c
index 9bd8509f39c..8a2670f699d 100644
--- a/src/mame/drivers/srmp2.c
+++ b/src/mame/drivers/srmp2.c
@@ -1112,17 +1112,6 @@ INPUT_PORTS_END
***************************************************************************/
-static const ay8910_interface srmp2_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static const gfx_layout charlayout =
{
16, 16,
@@ -1183,7 +1172,8 @@ static MACHINE_CONFIG_START( srmp2, srmp2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 20000000/16)
- MCFG_SOUND_CONFIG(srmp2_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
@@ -1229,7 +1219,8 @@ static MACHINE_CONFIG_START( srmp3, srmp2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 16000000/16)
- MCFG_SOUND_CONFIG(srmp2_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
@@ -1282,7 +1273,8 @@ static MACHINE_CONFIG_START( mjyuugi, srmp2_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 16000000/16)
- MCFG_SOUND_CONFIG(srmp2_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c
index 1a86ff428a2..e1549e2dcb1 100644
--- a/src/mame/drivers/sshangha.c
+++ b/src/mame/drivers/sshangha.c
@@ -372,13 +372,6 @@ WRITE_LINE_MEMBER(sshangha_state::irqhandler)
m_audiocpu->set_input_line(0, state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
DECO16IC_BANK_CB_MEMBER(sshangha_state::bank_callback)
{
return (bank >> 4) * 0x1000;
@@ -440,7 +433,6 @@ static MACHINE_CONFIG_START( sshangha, sshangha_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(sshangha_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33)
diff --git a/src/mame/drivers/ssrj.c b/src/mame/drivers/ssrj.c
index d47872ce85b..24c4a937063 100644
--- a/src/mame/drivers/ssrj.c
+++ b/src/mame/drivers/ssrj.c
@@ -128,17 +128,6 @@ static GFXDECODE_START( ssrj )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 0x10 )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* not used ? */
- DEVCB_INPUT_PORT("IN3"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( ssrj, ssrj_state )
/* basic machine hardware */
@@ -165,7 +154,7 @@ static MACHINE_CONFIG_START( ssrj, ssrj_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/5)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/stuntair.c b/src/mame/drivers/stuntair.c
index eecf8d3157a..5b59f3594e4 100644
--- a/src/mame/drivers/stuntair.c
+++ b/src/mame/drivers/stuntair.c
@@ -471,28 +471,6 @@ WRITE8_MEMBER(stuntair_state::ay8910_portb_w)
logerror("ay8910_portb_w: %02x\n", data);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(stuntair_state, ay8910_portb_w)
-};
-
-static const ay8910_interface ay8910_2_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/***************************************************************************
Machine Config
@@ -552,11 +530,11 @@ static MACHINE_CONFIG_START( stuntair, stuntair_state )
MCFG_SPEAKER_STANDARD_MONO("mono") // stereo?
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(stuntair_state, ay8910_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_CONFIG(ay8910_2_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c
index 6705386b3b7..791ee872c6b 100644
--- a/src/mame/drivers/suna16.c
+++ b/src/mame/drivers/suna16.c
@@ -956,14 +956,6 @@ WRITE8_MEMBER(suna16_state::bestbest_ay8910_port_a_w)
// ?
}
-static const ay8910_interface bestbest_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(suna16_state,bestbest_ay8910_port_a_w), DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( bestbest, suna16_state )
/* basic machine hardware */
@@ -999,7 +991,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/16) /* 1.5MHz */
- MCFG_SOUND_CONFIG(bestbest_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna16_state, bestbest_ay8910_port_a_w))
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c
index c947ee34d1b..8a99225ebff 100644
--- a/src/mame/drivers/suna8.c
+++ b/src/mame/drivers/suna8.c
@@ -1802,16 +1802,6 @@ WRITE_LINE_MEMBER(suna8_state::soundirq)
/* 1 x 24 MHz crystal */
-static const ay8910_interface hardhead_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(suna8_state, suna8_play_samples_w),
- DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w)
-};
-
static const samples_interface suna8_samples_interface =
{
1,
@@ -1856,7 +1846,8 @@ static MACHINE_CONFIG_START( hardhead, suna8_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16) /* verified on pcb */
- MCFG_SOUND_CONFIG(hardhead_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
@@ -1873,16 +1864,6 @@ MACHINE_CONFIG_END
/* 1 x 24 MHz crystal */
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(suna8_state, rranger_play_samples_w),
- DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w),
-};
-
/* 2203 + 8910 */
static MACHINE_CONFIG_START( rranger, suna8_state )
@@ -1916,7 +1897,8 @@ static MACHINE_CONFIG_START( rranger, suna8_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 6)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, rranger_play_samples_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
@@ -2042,16 +2024,6 @@ MACHINE_CONFIG_END
Star Fighter
***************************************************************************/
-static const ay8910_interface starfigh_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(suna8_state, suna8_play_samples_w),
- DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w)
-};
-
static MACHINE_CONFIG_START( starfigh, suna8_state )
/* basic machine hardware */
@@ -2089,7 +2061,8 @@ static MACHINE_CONFIG_START( starfigh, suna8_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16)
- MCFG_SOUND_CONFIG(starfigh_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
@@ -2139,7 +2112,8 @@ static MACHINE_CONFIG_START( sparkman, suna8_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16)
- MCFG_SOUND_CONFIG(hardhead_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c
index a139f2045a3..2166afa9c9d 100644
--- a/src/mame/drivers/supdrapo.c
+++ b/src/mame/drivers/supdrapo.c
@@ -434,17 +434,6 @@ WRITE8_MEMBER(supdrapo_state::ay8910_outputb_w)
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(supdrapo_state,ay8910_outputa_w),
- DEVCB_DRIVER_MEMBER(supdrapo_state,ay8910_outputb_w)
-};
-
-
/*********************************************************************
Machine Driver
**********************************************************************/
@@ -474,7 +463,8 @@ static MACHINE_CONFIG_START( supdrapo, supdrapo_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK) /* guess */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(supdrapo_state, ay8910_outputa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(supdrapo_state, ay8910_outputb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index dc67c53cb07..34219bfc746 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -915,66 +915,6 @@ static const samples_interface pbillian_samples_interface =
pbillian_sh_start
};
-static const ay8910_interface pbillian_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(superqix_state,pbillian_ay_port_a_r), /* port Aread */
- DEVCB_INPUT_PORT("SYSTEM"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface hotsmash_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(superqix_state,hotsmash_ay_port_a_r), /* port Aread */
- DEVCB_INPUT_PORT("SYSTEM"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface sqix_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_DRIVER_MEMBER(superqix_state,in4_mcu_r), /* port Bread */
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface sqix_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_DRIVER_MEMBER(superqix_state,sqix_from_mcu_r), /* port Bread */
- DEVCB_NULL, /* port Awrite */
- DEVCB_DRIVER_MEMBER(superqix_state,sqix_z80_mcu_w) /* port Bwrite */
-};
-
-static const ay8910_interface bootleg_ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface bootleg_ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_DRIVER_MEMBER(superqix_state,bootleg_in0_r), /* port Bread */
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(superqix_state::vblank_irq)
{
if(m_nmi_mask)
@@ -1015,7 +955,8 @@ static MACHINE_CONFIG_START( pbillian, superqix_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(pbillian_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(superqix_state, pbillian_ay_port_a_r)) /* port Aread */
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("SYSTEM"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SAMPLES_ADD("samples", pbillian_samples_interface)
@@ -1051,7 +992,8 @@ static MACHINE_CONFIG_START( hotsmash, superqix_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(hotsmash_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(superqix_state, hotsmash_ay_port_a_r)) /* port Aread */
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("SYSTEM"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SAMPLES_ADD("samples", pbillian_samples_interface)
@@ -1092,11 +1034,14 @@ static MACHINE_CONFIG_START( sqix, superqix_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(sqix_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(superqix_state, in4_mcu_r)) /* port Bread */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(sqix_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(superqix_state, sqix_from_mcu_r)) /* port Bread */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(superqix_state,sqix_z80_mcu_w)) /* port Bwrite */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -1137,11 +1082,13 @@ static MACHINE_CONFIG_START( sqixbl, superqix_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(bootleg_ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 12000000/8)
- MCFG_SOUND_CONFIG(bootleg_ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(superqix_state, bootleg_in0_r)) /* port Bread */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c
index 89f898aab79..74bf70fda34 100644
--- a/src/mame/drivers/superwng.c
+++ b/src/mame/drivers/superwng.c
@@ -441,26 +441,6 @@ void superwng_state::machine_reset()
m_nmi_enable = 0;
}
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(superwng_state,superwng_sound_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( superwng, superwng_state )
/* basic machine hardware */
@@ -490,11 +470,10 @@ static MACHINE_CONFIG_START( superwng, superwng_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, MASTER_CLOCK/12)
- MCFG_SOUND_CONFIG(ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(superwng_state, superwng_sound_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay2", AY8910, MASTER_CLOCK/12)
- MCFG_SOUND_CONFIG(ay8910_config_2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c
index e2f2d1b8310..d8542d39c38 100644
--- a/src/mame/drivers/suprgolf.c
+++ b/src/mame/drivers/suprgolf.c
@@ -429,16 +429,6 @@ WRITE_LINE_MEMBER(suprgolf_state::irqhandler)
//m_maincpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW0"),
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeA),
- DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeB),
-};
-
WRITE_LINE_MEMBER(suprgolf_state::adpcm_int)
{
m_msm->reset_w(0);
@@ -513,7 +503,10 @@ static MACHINE_CONFIG_START( suprgolf, suprgolf_state )
MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK/4) /* guess */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(suprgolf_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suprgolf_state, suprgolf_writeA))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suprgolf_state, suprgolf_writeB))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* guess */
diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c
index ddc792bd077..284d66c2970 100644
--- a/src/mame/drivers/suprridr.c
+++ b/src/mame/drivers/suprridr.c
@@ -329,25 +329,6 @@ static GFXDECODE_START( suprridr )
GFXDECODE_END
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(suprridr_state,sound_data_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* Machine driver
@@ -386,7 +367,7 @@ static MACHINE_CONFIG_START( suprridr, suprridr_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_49_152MHz/32)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(suprridr_state, sound_data_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c
index ad8e9968a9a..7c568b17a3b 100644
--- a/src/mame/drivers/suprslam.c
+++ b/src/mame/drivers/suprslam.c
@@ -336,6 +336,7 @@ static MACHINE_CONFIG_START( suprslam, suprslam_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(suprslam_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c
index 938a670dedf..d55d0b67080 100644
--- a/src/mame/drivers/tail2nos.c
+++ b/src/mame/drivers/tail2nos.c
@@ -180,17 +180,6 @@ WRITE_LINE_MEMBER(tail2nos_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tail2nos_state,sound_bankswitch_w)
-};
-
-
static const k051316_interface tail2nos_k051316_intf =
{
"gfx3", 2,
@@ -257,7 +246,8 @@ static MACHINE_CONFIG_START( tail2nos, tail2nos_state )
MCFG_SOUND_ADD("ymsnd", YM2608, XTAL_8MHz) /* verified on pcb */
MCFG_YM2608_IRQ_HANDLER(WRITELINE(tail2nos_state, irqhandler))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tail2nos_state, sound_bankswitch_w))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c
index 55a5c09a537..c563ad96038 100644
--- a/src/mame/drivers/taito_b.c
+++ b/src/mame/drivers/taito_b.c
@@ -1872,16 +1872,6 @@ WRITE_LINE_MEMBER(taitob_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitob_state, bankswitch_w),
- DEVCB_NULL,
-};
-
/*
Games that use the mb87078 are: pbobble, spacedx and qzshowby
schems are not available, but from the writes I guess that
@@ -1968,6 +1958,7 @@ static MACHINE_CONFIG_START( rastsag2, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2024,7 +2015,7 @@ static MACHINE_CONFIG_START( masterw, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_24MHz/8) /* 3 MHz */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitob_state, bankswitch_w))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
@@ -2099,6 +2090,7 @@ static MACHINE_CONFIG_START( ashura, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2155,6 +2147,7 @@ static MACHINE_CONFIG_START( crimec, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2212,7 +2205,7 @@ static MACHINE_CONFIG_START( hitice, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_24MHz/8) /* 3 MHz */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitob_state, bankswitch_w))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
@@ -2273,6 +2266,7 @@ static MACHINE_CONFIG_START( rambo3p, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2329,6 +2323,7 @@ static MACHINE_CONFIG_START( rambo3, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2391,6 +2386,7 @@ static MACHINE_CONFIG_START( pbobble, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2453,6 +2449,7 @@ static MACHINE_CONFIG_START( spacedx, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2509,6 +2506,7 @@ static MACHINE_CONFIG_START( spacedxo, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* 8 MHz */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2571,6 +2569,7 @@ static MACHINE_CONFIG_START( qzshowby, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2627,7 +2626,7 @@ static MACHINE_CONFIG_START( viofight, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_24MHz/8) /* 3 MHz */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitob_state, bankswitch_w))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.25)
@@ -2872,6 +2871,7 @@ static MACHINE_CONFIG_START( sbm, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -2929,6 +2929,7 @@ static MACHINE_CONFIG_START( realpunc, taitob_state )
MCFG_SOUND_ADD("ymsnd", YM2610B, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c
index a0afb5349de..76093c80de8 100644
--- a/src/mame/drivers/taito_f2.c
+++ b/src/mame/drivers/taito_f2.c
@@ -2818,17 +2818,6 @@ WRITE8_MEMBER(taitof2_state::cameltrya_porta_w)
// Implement //
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA read */
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitof2_state,cameltrya_porta_w), /* portA write - not implemented */
- DEVCB_NULL, /* portB write */
-};
-
-
/***********************************************************
MACHINE DRIVERS
***********************************************************/
@@ -2875,6 +2864,7 @@ static MACHINE_CONFIG_START( taito_f2, taitof2_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 24000000/3) /* Was 16000000/2, but only a 24Mhz OSC */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitof2_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -3709,7 +3699,7 @@ static MACHINE_CONFIG_START( cameltrya, taitof2_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 24000000/8) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitof2_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitof2_state, cameltrya_porta_w)) /* portA write - not implemented */
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c
index 20baa4c0a37..234d296db44 100644
--- a/src/mame/drivers/taito_h.c
+++ b/src/mame/drivers/taito_h.c
@@ -692,6 +692,7 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoh_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -748,6 +749,7 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoh_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -812,6 +814,7 @@ static MACHINE_CONFIG_START( dleague, taitoh_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_8MHz)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoh_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c
index 34f226035b6..33f76bdbbf2 100644
--- a/src/mame/drivers/taito_l.c
+++ b/src/mame/drivers/taito_l.c
@@ -1750,36 +1750,6 @@ WRITE8_MEMBER(taitol_state::portA_w)
}
}
-static const ay8910_interface triple_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
- DEVCB_NULL,
-};
-
-static const ay8910_interface champwr_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
- DEVCB_DRIVER_MEMBER(taitol_state,champwr_msm5205_volume_w),
-};
-
-static const ay8910_interface single_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(taitol_state,portA_r),
- DEVCB_DRIVER_MEMBER(taitol_state,portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( fhawk, taitol_state )
@@ -1822,7 +1792,7 @@ static MACHINE_CONFIG_START( fhawk, taitol_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitol_state,irqhandler))
- MCFG_YM2203_AY8910_INTF(&triple_ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitol_state, portA_w))
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
@@ -1851,7 +1821,8 @@ static MACHINE_CONFIG_DERIVED( champwr, fhawk )
/* sound hardware */
MCFG_SOUND_MODIFY("ymsnd")
MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitol_state,irqhandler))
- MCFG_YM2203_AY8910_INTF(&champwr_ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitol_state, portA_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitol_state, champwr_msm5205_volume_w))
MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz)
MCFG_MSM5205_VCLK_CB(WRITELINE(taitol_state, champwr_msm5205_vck)) /* VCK function */
@@ -1878,6 +1849,7 @@ static MACHINE_CONFIG_DERIVED( raimais, fhawk )
/* sound hardware */
MCFG_SOUND_REPLACE("ymsnd", YM2610, XTAL_8MHz) /* verified on pcb (8Mhz OSC is also for the 2nd z80) */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitol_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -1967,7 +1939,8 @@ static MACHINE_CONFIG_START( plotting, taitol_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_13_33056MHz/4) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&single_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(taitol_state, portA_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(taitol_state, portB_r))
MCFG_SOUND_ROUTE(0, "mono", 0.20)
MCFG_SOUND_ROUTE(1, "mono", 0.20)
MCFG_SOUND_ROUTE(2, "mono", 0.20)
diff --git a/src/mame/drivers/taito_o.c b/src/mame/drivers/taito_o.c
index 322852655ae..d800e89c341 100644
--- a/src/mame/drivers/taito_o.c
+++ b/src/mame/drivers/taito_o.c
@@ -222,14 +222,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(taitoo_state::parentj_interrupt)
m_maincpu->set_input_line(5, HOLD_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL, DEVCB_NULL,
-};
-
void taitoo_state::machine_start()
{
}
@@ -264,7 +256,8 @@ static MACHINE_CONFIG_START( parentj, taitoo_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, 2000000) /*?? MHz */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c
index ccd8ddb84b8..0ae800e4d3e 100644
--- a/src/mame/drivers/taito_x.c
+++ b/src/mame/drivers/taito_x.c
@@ -836,6 +836,7 @@ static MACHINE_CONFIG_START( superman, taitox_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz/2) /* verified on pcb */
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitox_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -930,6 +931,7 @@ static MACHINE_CONFIG_START( gigandes, taitox_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitox_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
@@ -978,6 +980,7 @@ static MACHINE_CONFIG_START( ballbros, taitox_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitox_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index 39bc2259ea1..1975bc3248c 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -3055,6 +3055,7 @@ static MACHINE_CONFIG_START( contcirc, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "subwoofer", 0.20)
MCFG_SOUND_ROUTE(1, "2610.1.l", 2.0)
MCFG_SOUND_ROUTE(1, "2610.1.r", 2.0)
@@ -3134,6 +3135,7 @@ static MACHINE_CONFIG_START( chasehq, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "subwoofer", 0.20)
MCFG_SOUND_ROUTE(1, "2610.1.l", 1.0)
MCFG_SOUND_ROUTE(1, "2610.1.r", 1.0)
@@ -3213,6 +3215,7 @@ static MACHINE_CONFIG_START( enforce, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 20.0)
@@ -3287,6 +3290,7 @@ static MACHINE_CONFIG_START( bshark, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandlerb))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 28.0)
@@ -3369,6 +3373,7 @@ static MACHINE_CONFIG_START( sci, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 2.0)
@@ -3451,6 +3456,7 @@ static MACHINE_CONFIG_START( nightstr, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "subwoofer", 0.20)
MCFG_SOUND_ROUTE(1, "2610.1.l", 2.0)
MCFG_SOUND_ROUTE(1, "2610.1.r", 2.0)
@@ -3530,6 +3536,7 @@ static MACHINE_CONFIG_START( aquajack, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 2.0)
@@ -3604,6 +3611,7 @@ static MACHINE_CONFIG_START( spacegun, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandlerb))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 8.0)
@@ -3678,6 +3686,7 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_32MHz/4)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 8.0)
@@ -3755,6 +3764,7 @@ static MACHINE_CONFIG_START( racingb, taitoz_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_32MHz/4)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoz_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 8.0)
diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c
index 2743ce45d2e..a6ce18c011f 100644
--- a/src/mame/drivers/taitoair.c
+++ b/src/mame/drivers/taitoair.c
@@ -722,6 +722,7 @@ static MACHINE_CONFIG_START( airsys, taitoair_state )
MCFG_SOUND_ADD("ymsnd", YM2610, XTAL_16MHz / 2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taitoair_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.30)
MCFG_SOUND_ROUTE(1, "mono", 0.60)
MCFG_SOUND_ROUTE(2, "mono", 0.60)
diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c
index 33a34292175..d0e11798c01 100644
--- a/src/mame/drivers/taitosj.c
+++ b/src/mame/drivers/taitosj.c
@@ -1741,49 +1741,6 @@ WRITE8_MEMBER(taitosj_state::dac_vol_w)
m_dac->write_signed16(m_dac_out * m_dac_vol + 0x8000);
}
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_INPUT_PORT("DSW3"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitosj_state,dac_out_w), /* port Awrite */
- DEVCB_DRIVER_MEMBER(taitosj_state,dac_vol_w) /* port Bwrite */
-};
-
-static const ay8910_interface ay8910_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitosj_state,input_port_4_f0_w),
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_4 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taitosj_state,taitosj_sndnmi_msk_w) /* port Bwrite */
-};
-
-
-
static MACHINE_CONFIG_START( nomcu, taitosj_state )
/* basic machine hardware */
@@ -1817,19 +1774,21 @@ static MACHINE_CONFIG_START( nomcu, taitosj_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 6000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 6000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitosj_state, dac_out_w)) /* port Awrite */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitosj_state, dac_vol_w)) /* port Bwrite */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay3", AY8910, 6000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_3)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitosj_state, input_port_4_f0_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay4", AY8910, 6000000/4)
- MCFG_SOUND_CONFIG(ay8910_interface_4)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitosj_state, taitosj_sndnmi_msk_w)) /* port Bwrite */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 4a3c5bf41e6..96f20cfd1f4 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -301,16 +301,6 @@ static GFXDECODE_START( tankbust )
GFXDECODE_ENTRY( "gfx3", 0, charlayout2, 0x60, 16 ) /* txt tilemap characters*/
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(tankbust_state,tankbust_soundlatch_r),
- DEVCB_DRIVER_MEMBER(tankbust_state,tankbust_soundtimer_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
void tankbust_state::machine_reset()
{
m_variable_data = 0x11;
@@ -356,7 +346,8 @@ static MACHINE_CONFIG_START( tankbust, tankbust_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_14_31818MHz/16) /* Verified on PCB */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(tankbust_state, tankbust_soundlatch_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(tankbust_state, tankbust_soundtimer_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_14_31818MHz/16) /* Verified on PCB */
diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c
index eb93af9996f..c7bc0e39f9b 100644
--- a/src/mame/drivers/taotaido.c
+++ b/src/mame/drivers/taotaido.c
@@ -391,6 +391,7 @@ static MACHINE_CONFIG_START( taotaido, taotaido_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(taotaido_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/taxidriv.c b/src/mame/drivers/taxidriv.c
index de0088849ed..515a6b8d7e9 100644
--- a/src/mame/drivers/taxidriv.c
+++ b/src/mame/drivers/taxidriv.c
@@ -289,28 +289,6 @@ static GFXDECODE_START( taxidriv )
GFXDECODE_ENTRY( "gfx5", 0, charlayout2, 0, 1 )
GFXDECODE_END
-
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(taxidriv_state,p8910_0a_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(taxidriv_state,p8910_0b_w)
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(taxidriv_state,p8910_1a_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
PALETTE_INIT_MEMBER(taxidriv_state, taxidriv)
{
const UINT8 *color_prom = memregion("proms")->base();
@@ -399,11 +377,12 @@ static MACHINE_CONFIG_START( taxidriv, taxidriv_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(taxidriv_state, p8910_0a_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taxidriv_state, p8910_0b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 1250000)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(taxidriv_state, p8910_1a_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c
index db6bec13515..13802477966 100644
--- a/src/mame/drivers/tehkanwc.c
+++ b/src/mame/drivers/tehkanwc.c
@@ -614,28 +614,6 @@ static GFXDECODE_START( tehkanwc )
GFXDECODE_END
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tehkanwc_state,tehkanwc_portA_w),
- DEVCB_DRIVER_MEMBER(tehkanwc_state,tehkanwc_portB_w)
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(tehkanwc_state,tehkanwc_portA_r),
- DEVCB_DRIVER_MEMBER(tehkanwc_state,tehkanwc_portB_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( tehkanwc, tehkanwc_state )
/* basic machine hardware */
@@ -672,11 +650,13 @@ static MACHINE_CONFIG_START( tehkanwc, tehkanwc_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 1536000)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tehkanwc_state, tehkanwc_portA_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tehkanwc_state, tehkanwc_portB_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 1536000)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(tehkanwc_state, tehkanwc_portA_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(tehkanwc_state, tehkanwc_portB_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c
index e970070daa6..29ba5db1500 100644
--- a/src/mame/drivers/thedeep.c
+++ b/src/mame/drivers/thedeep.c
@@ -392,13 +392,6 @@ WRITE_LINE_MEMBER(thedeep_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::thedeep_interrupt)
{
int scanline = param;
@@ -471,7 +464,6 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(thedeep_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c
index 672552c0220..c56392d8c20 100644
--- a/src/mame/drivers/thepit.c
+++ b/src/mame/drivers/thepit.c
@@ -692,16 +692,6 @@ static GFXDECODE_START( suprmous )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(thepit_state::vblank_irq)
{
if(m_nmi_mask)
@@ -734,7 +724,7 @@ static MACHINE_CONFIG_START( thepit, thepit_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, PIXEL_CLOCK/4)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, PIXEL_CLOCK/4)
diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c
index f29284b40ac..f5dc04c6674 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -729,36 +729,6 @@ static INPUT_PORTS_START( rapidfir )
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
-
-
-/*************************************
- *
- * Sound interfaces
- *
- *************************************/
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW"),
- DEVCB_INPUT_PORT("IN1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("IN0"),
- DEVCB_INPUT_PORT("IN2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-
/*************************************
*
* 34010 configuration
@@ -826,11 +796,13 @@ static MACHINE_CONFIG_START( tickee, tickee_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2149, VIDEO_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ym2", YM2149, VIDEO_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -894,7 +866,8 @@ static MACHINE_CONFIG_START( mouseatk, tickee_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym", YM2149, OKI_CLOCK)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_OKIM6295_ADD("oki", OKI_CLOCK, OKIM6295_PIN7_HIGH)
diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c
index 8f0cda93a66..b0378a198b4 100644
--- a/src/mame/drivers/tigeroad.c
+++ b/src/mame/drivers/tigeroad.c
@@ -496,14 +496,6 @@ WRITE_LINE_MEMBER(tigeroad_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
-};
-
-
static MACHINE_CONFIG_START( tigeroad, tigeroad_state )
/* basic machine hardware */
@@ -539,7 +531,6 @@ static MACHINE_CONFIG_START( tigeroad, tigeroad_state )
MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(tigeroad_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */
diff --git a/src/mame/drivers/timelimt.c b/src/mame/drivers/timelimt.c
index 60e71f0e34c..3399176ab99 100644
--- a/src/mame/drivers/timelimt.c
+++ b/src/mame/drivers/timelimt.c
@@ -204,16 +204,6 @@ GFXDECODE_END
/***************************************************************************/
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(timelimt_state::timelimt_irq)
{
if ( m_nmi_enabled )
@@ -258,7 +248,7 @@ static MACHINE_CONFIG_START( timelimt, timelimt_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 18432000/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(driver_device, soundlatch_byte_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/timeplt.c b/src/mame/drivers/timeplt.c
index f378a1c12a9..221a8cc00d2 100644
--- a/src/mame/drivers/timeplt.c
+++ b/src/mame/drivers/timeplt.c
@@ -105,16 +105,6 @@ WRITE8_MEMBER(timeplt_state::chkun_sound_w)
m_tc8830f->reset();
}
-static const ay8910_interface chkun_ay2_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(timeplt_state,chkun_sound_w),
- DEVCB_NULL
-};
-
CUSTOM_INPUT_MEMBER(timeplt_state::chkun_hopper_status_r)
{
// temp workaround, needs hopper
@@ -510,8 +500,8 @@ static MACHINE_CONFIG_DERIVED( chkun, bikkuric )
/* sound hardware */
MCFG_SOUND_MODIFY("ay2")
- MCFG_SOUND_CONFIG(chkun_ay2_interface)
-
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(timeplt_state, chkun_sound_w))
+
MCFG_TC8830F_ADD("tc8830f", XTAL_512kHz)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c
index cf90027c006..62c926078f0 100644
--- a/src/mame/drivers/tnzs.c
+++ b/src/mame/drivers/tnzs.c
@@ -1527,51 +1527,12 @@ static GFXDECODE_START( insectx )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
/* handler called by the 2203 emulator when the internal timers cause an IRQ */
WRITE_LINE_MEMBER(tnzs_state::irqhandler)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface kageki_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_w)
-};
-
-
-static const ay8910_interface tnzsb_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-static const ay8910_interface kabukiz_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sound_bank_w),
- DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sample_w)
-};
-
static const samples_interface tnzs_samples_interface =
{
1,
@@ -1619,7 +1580,8 @@ static MACHINE_CONFIG_START( arknoid2, tnzs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -1663,7 +1625,8 @@ static MACHINE_CONFIG_START( drtoppel, tnzs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -1709,7 +1672,8 @@ static MACHINE_CONFIG_START( tnzs, tnzs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -1752,7 +1716,8 @@ static MACHINE_CONFIG_START( insectx, tnzs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
@@ -1795,7 +1760,8 @@ static MACHINE_CONFIG_START( kageki, tnzs_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
- MCFG_YM2203_AY8910_INTF(&kageki_ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(tnzs_state, kageki_csport_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tnzs_state, kageki_csport_w))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
@@ -1849,7 +1815,6 @@ static MACHINE_CONFIG_START( tnzsb, tnzs_state )
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(tnzs_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&tnzsb_ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 1.0)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
@@ -1867,7 +1832,8 @@ static MACHINE_CONFIG_DERIVED( kabukiz, tnzsb )
MCFG_CPU_PROGRAM_MAP(kabukiz_cpu2_map)
MCFG_SOUND_MODIFY("ymsnd")
- MCFG_YM2203_AY8910_INTF(&kabukiz_ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tnzs_state, kabukiz_sound_bank_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tnzs_state, kabukiz_sample_w))
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
diff --git a/src/mame/drivers/tonton.c b/src/mame/drivers/tonton.c
index 5a5fb720f38..4e15285c057 100644
--- a/src/mame/drivers/tonton.c
+++ b/src/mame/drivers/tonton.c
@@ -230,30 +230,6 @@ WRITE8_MEMBER(tonton_state::ay_bout_w)
logerror("AY8910: Port B out: %02X\n", data);
}
-
-/*************************************************
-* Sound Interfaces *
-*************************************************/
-
-static const ay8910_interface ay8910_intf =
-{
-/*
- AY8910: Port A out: FF
- AY8910: Port B out: FF
- AY8910: Port A out: FF
- AY8910: Port B out: FF
- AY8910: Port A out: 00
- AY8910: Port B out: 00
-*/
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* Seems unused */
- DEVCB_NULL, /* Seems unused */
- DEVCB_DRIVER_MEMBER(tonton_state,ay_aout_w), /* Write all bits twice, and then reset them at boot */
- DEVCB_DRIVER_MEMBER(tonton_state,ay_bout_w) /* Write all bits twice, and then reset them at boot */
-};
-
-
/*************************************************
* Machine Driver *
*************************************************/
@@ -288,7 +264,16 @@ static MACHINE_CONFIG_START( tonton, tonton_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", YM2149, YM2149_CLOCK) /* Guess. According to other MSX2 based gambling games */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ /*
+ AY8910: Port A out: FF
+ AY8910: Port B out: FF
+ AY8910: Port A out: FF
+ AY8910: Port B out: FF
+ AY8910: Port A out: 00
+ AY8910: Port B out: 00
+ */
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tonton_state, ay_aout_w)) /* Write all bits twice, and then reset them at boot */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tonton_state, ay_bout_w)) /* Write all bits twice, and then reset them at boot */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c
index 0ce71cbfce5..52c1a890607 100644
--- a/src/mame/drivers/tubep.c
+++ b/src/mame/drivers/tubep.c
@@ -847,44 +847,6 @@ static INPUT_PORTS_START( rjammer )
INPUT_PORTS_END
-
-/*************************************
- *
- * Sound definitions
- *
- *************************************/
-
-static const ay8910_interface ay8910_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portA_0_w), /* write port A */
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portB_0_w) /* write port B */
-};
-
-static const ay8910_interface ay8910_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portA_1_w), /* write port A */
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portB_1_w) /* write port B */
-};
-
-static const ay8910_interface ay8910_interface_3 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portA_2_w), /* write port A */
- DEVCB_DRIVER_MEMBER(tubep_state,ay8910_portB_2_w) /* write port B */
-};
-
-
/*************************************
*
* Machine driver
@@ -932,15 +894,18 @@ static MACHINE_CONFIG_START( tubep, tubep_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_0_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_0_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("ay2", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_1_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_1_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("ay3", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_3)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_2_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_2_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MACHINE_CONFIG_END
@@ -993,15 +958,18 @@ static MACHINE_CONFIG_START( rjammer, tubep_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_0_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_0_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("ay2", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_1_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_1_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("ay3", AY8910, 19968000 / 8 / 2)
- MCFG_SOUND_CONFIG(ay8910_interface_3)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tubep_state, ay8910_portA_2_w)) /* write port A */
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tubep_state, ay8910_portB_2_w)) /* write port B */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ADD("msm", MSM5205, 384000)
diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c
index b7a2dea899c..a80c9b1e685 100644
--- a/src/mame/drivers/twins.c
+++ b/src/mame/drivers/twins.c
@@ -186,14 +186,6 @@ static INPUT_PORTS_START(twins)
INPUT_PORTS_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2")
-};
-
static MACHINE_CONFIG_START( twins, twins_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", V30, 8000000)
@@ -218,7 +210,8 @@ static MACHINE_CONFIG_START( twins, twins_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -308,7 +301,8 @@ static MACHINE_CONFIG_START( twinsa, twins_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_16MHz/8) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c
index 5ba7dcf3890..bb6150dab9c 100644
--- a/src/mame/drivers/tx1.c
+++ b/src/mame/drivers/tx1.c
@@ -594,68 +594,6 @@ static ADDRESS_MAP_START( buggyboy_sound_io, AS_IO, 8, tx1_state )
AM_RANGE(0x80, 0x81) AM_DEVWRITE("ym2", ay8910_device, data_address_w)
ADDRESS_MAP_END
-
-/*************************************
- *
- * Sound Hardware
- *
- *************************************/
-
-static const ay8910_interface tx1_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("tx1", tx1_sound_device, ay8910_a_w),
- DEVCB_DEVICE_MEMBER("tx1", tx1_sound_device, ay8910_b_w),
-};
-
-
-static const ay8910_interface buggyboy_ym2149_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("buggyboy", buggyboy_sound_device, ym1_a_w),
- DEVCB_NULL,
-};
-
-static const ay8910_interface buggyboy_ym2149_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("buggyboy", buggyboy_sound_device, ym2_a_w),
- DEVCB_DEVICE_MEMBER("buggyboy", buggyboy_sound_device, ym2_b_w),
-};
-
-
-/* YM2149 IC19 */
-static const ay8910_interface buggybjr_ym2149_interface_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("YM2149_IC19_A"),
- DEVCB_INPUT_PORT("YM2149_IC19_B"),
- DEVCB_NULL,
- DEVCB_NULL,
-};
-
-/* YM2149 IC24 */
-static const ay8910_interface buggybjr_ym2149_interface_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DEVICE_MEMBER("buggyboy", buggyboy_sound_device, ym2_a_w),
- DEVCB_DEVICE_MEMBER("buggyboy", buggyboy_sound_device, ym2_b_w),
-};
-
-
/*************************************
*
* Machine driver
@@ -712,7 +650,8 @@ static MACHINE_CONFIG_START( tx1, tx1_state )
MCFG_SOUND_ADD("aysnd", AY8910, TX1_PIXEL_CLOCK / 8)
- MCFG_SOUND_CONFIG(tx1_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("tx1", tx1_sound_device, ay8910_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("tx1", tx1_sound_device, ay8910_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontleft", 0.1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontright", 0.1)
@@ -770,11 +709,12 @@ static MACHINE_CONFIG_START( buggyboy, tx1_state )
// MCFG_SPEAKER_STANDARD_STEREO("rearleft", "rearright")
MCFG_SOUND_ADD("ym1", YM2149, BUGGYBOY_ZCLK / 4)
- MCFG_SOUND_CONFIG(buggyboy_ym2149_interface_1)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("buggyboy", buggyboy_sound_device, ym1_a_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontleft", 0.15)
MCFG_SOUND_ADD("ym2", YM2149, BUGGYBOY_ZCLK / 4)
- MCFG_SOUND_CONFIG(buggyboy_ym2149_interface_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("buggyboy", buggyboy_sound_device, ym2_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("buggyboy", buggyboy_sound_device, ym2_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontright", 0.15)
MCFG_SOUND_ADD("buggyboy", BUGGYBOY, 0)
@@ -812,12 +752,14 @@ static MACHINE_CONFIG_START( buggybjr, tx1_state )
MCFG_SPEAKER_STANDARD_STEREO("frontleft", "frontright")
// MCFG_SPEAKER_STANDARD_STEREO("rearleft", "rearright")
- MCFG_SOUND_ADD("ym1", YM2149, BUGGYBOY_ZCLK / 4)
- MCFG_SOUND_CONFIG(buggybjr_ym2149_interface_1)
+ MCFG_SOUND_ADD("ym1", YM2149, BUGGYBOY_ZCLK / 4) /* YM2149 IC19 */
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("YM2149_IC19_A"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("YM2149_IC19_B"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontleft", 0.15)
- MCFG_SOUND_ADD("ym2", YM2149, BUGGYBOY_ZCLK / 4)
- MCFG_SOUND_CONFIG(buggybjr_ym2149_interface_2)
+ MCFG_SOUND_ADD("ym2", YM2149, BUGGYBOY_ZCLK / 4) /* YM2149 IC24 */
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("buggyboy", buggyboy_sound_device, ym2_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("buggyboy", buggyboy_sound_device, ym2_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "frontright", 0.15)
MCFG_SOUND_ADD("buggyboy", BUGGYBOY, 0)
diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c
index 018c5503d88..64b794f8475 100644
--- a/src/mame/drivers/vastar.c
+++ b/src/mame/drivers/vastar.c
@@ -403,17 +403,6 @@ static GFXDECODE_START( vastar )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(vastar_state::vblank_irq)
{
if(m_nmi_mask)
@@ -451,7 +440,8 @@ static MACHINE_CONFIG_START( vastar, vastar_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vectrex.c b/src/mame/drivers/vectrex.c
index ac417cc4113..7e6bd5792b8 100644
--- a/src/mame/drivers/vectrex.c
+++ b/src/mame/drivers/vectrex.c
@@ -84,18 +84,6 @@ static INPUT_PORTS_START(vectrex)
INPUT_PORTS_END
-
-
-static const ay8910_interface vectrex_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("BUTTONS"),
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(vectrex_state, vectrex_psg_port_w),
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( vectrex, vectrex_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6809, XTAL_6MHz / 4)
@@ -115,7 +103,8 @@ static MACHINE_CONFIG_START( vectrex, vectrex_state )
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay8912", AY8912, 1500000)
- MCFG_SOUND_CONFIG(vectrex_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("BUTTONS"))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(vectrex_state, vectrex_psg_port_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
/* via */
diff --git a/src/mame/drivers/vega.c b/src/mame/drivers/vega.c
index 4d19eb34a20..349b48b3ee3 100644
--- a/src/mame/drivers/vega.c
+++ b/src/mame/drivers/vega.c
@@ -795,17 +795,6 @@ READ8_MEMBER(vega_state::randomizer )
return (ioport("IN1")->read()&7)|(machine().rand()&(~7));
}
-
-static const ay8910_interface ay8910_inf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(vega_state, ay8910_pa_r),
- DEVCB_DRIVER_MEMBER(vega_state, ay8910_pb_r),
- DEVCB_DRIVER_MEMBER(vega_state, ay8910_pa_w),
- DEVCB_DRIVER_MEMBER(vega_state, ay8910_pb_w)
-};
-
void vega_state::machine_start()
{
}
@@ -852,7 +841,10 @@ static MACHINE_CONFIG_START( vega, vega_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, 1500000 )
- MCFG_SOUND_CONFIG(ay8910_inf)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(vega_state, ay8910_pa_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(vega_state, ay8910_pb_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(vega_state, ay8910_pa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(vega_state, ay8910_pb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/videopkr.c b/src/mame/drivers/videopkr.c
index 7a9a6945464..a55048bfc8d 100644
--- a/src/mame/drivers/videopkr.c
+++ b/src/mame/drivers/videopkr.c
@@ -1222,17 +1222,6 @@ void videopkr_state::machine_start()
machine().device<nvram_device>("nvram")->set_base(m_data_ram, sizeof(m_data_ram));
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- /* no ports used */
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/************************
* Machine Drivers *
************************/
@@ -1322,8 +1311,7 @@ static MACHINE_CONFIG_DERIVED( babypkr, videopkr )
MCFG_GFXDECODE_MODIFY("gfxdecode", videodad)
MCFG_VIDEO_START_OVERRIDE(videopkr_state,vidadcba)
- MCFG_SOUND_ADD("aysnd", AY8910, CPU_CLOCK / 6)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_SOUND_ADD("aysnd", AY8910, CPU_CLOCK / 6) /* no ports used */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c
index 77c25efb6ed..4df1ad1c28e 100644
--- a/src/mame/drivers/vigilant.c
+++ b/src/mame/drivers/vigilant.c
@@ -459,15 +459,6 @@ static GFXDECODE_START( kikcubic )
GFXDECODE_END
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
-
static MACHINE_CONFIG_START( vigilant, vigilant_state )
/* basic machine hardware */
@@ -542,7 +533,6 @@ static MACHINE_CONFIG_START( buccanrs, vigilant_state )
MCFG_SOUND_ADD("ym1", YM2203, 18432000/6)
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("m72", m72_audio_device, ym2151_irq_handler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.35)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.35)
diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c
index 8c7bbc3a12a..afdd8074447 100644
--- a/src/mame/drivers/volfied.c
+++ b/src/mame/drivers/volfied.c
@@ -210,17 +210,6 @@ WRITE_LINE_MEMBER(volfied_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL,
-};
-
-
/***********************************************************
MACHINE DRIVERS
***********************************************************/
@@ -270,7 +259,8 @@ static MACHINE_CONFIG_START( volfied, volfied_state )
MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(volfied_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c
index 0c1d2e89b43..7c0c4e4a014 100644
--- a/src/mame/drivers/vroulet.c
+++ b/src/mame/drivers/vroulet.c
@@ -250,18 +250,6 @@ static GFXDECODE_START( vroulet )
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 32 )
GFXDECODE_END
-/* Sound Interface */
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSWA"),
- DEVCB_INPUT_PORT("DSWB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/* PPI8255 Interface */
WRITE8_MEMBER(vroulet_state::ppi8255_a_w){}// watchdog ?
@@ -305,7 +293,8 @@ static MACHINE_CONFIG_START( vroulet, vroulet_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c
index d1e5ac643e7..67b15324864 100644
--- a/src/mame/drivers/warriorb.c
+++ b/src/mame/drivers/warriorb.c
@@ -506,6 +506,7 @@ static MACHINE_CONFIG_START( darius2d, warriorb_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(warriorb_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 1.0)
@@ -595,6 +596,7 @@ static MACHINE_CONFIG_START( warriorb, warriorb_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(warriorb_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "2610.1.l", 1.0)
diff --git a/src/mame/drivers/wc90.c b/src/mame/drivers/wc90.c
index bfd0dcf9cb3..8e91db51ee0 100644
--- a/src/mame/drivers/wc90.c
+++ b/src/mame/drivers/wc90.c
@@ -295,13 +295,6 @@ WRITE_LINE_MEMBER(wc90_state::irqhandler)
m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( wc90, wc90_state )
/* basic machine hardware */
@@ -336,7 +329,7 @@ static MACHINE_CONFIG_START( wc90, wc90_state )
MCFG_SOUND_ADD("ymsnd", YM2608, XTAL_8MHz) /* verified on pcb */
MCFG_YM2608_IRQ_HANDLER(WRITELINE(wc90_state, irqhandler))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 1.0)
MCFG_SOUND_ROUTE(2, "mono", 1.0)
diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c
index d8cfba9486b..4a6567bf9fc 100644
--- a/src/mame/drivers/wc90b.c
+++ b/src/mame/drivers/wc90b.c
@@ -329,13 +329,6 @@ WRITE_LINE_MEMBER(wc90b_state::irqhandler)
//m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
WRITE_LINE_MEMBER(wc90b_state::adpcm_int)
{
m_toggle ^= 1;
@@ -383,7 +376,6 @@ static MACHINE_CONFIG_START( wc90b, wc90b_state )
MCFG_SOUND_ADD("ymsnd", YM2203, YM2203_CLOCK)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(wc90b_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("msm", MSM5205, MSM5205_CLOCK)
diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c
index 0a2f85af086..746462c8f72 100644
--- a/src/mame/drivers/welltris.c
+++ b/src/mame/drivers/welltris.c
@@ -729,6 +729,7 @@ static MACHINE_CONFIG_START( welltris, welltris_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 8000000)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(welltris_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.75)
MCFG_SOUND_ROUTE(2, "mono", 0.75)
diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c
index 15690550362..6227105cee6 100644
--- a/src/mame/drivers/wgp.c
+++ b/src/mame/drivers/wgp.c
@@ -981,6 +981,7 @@ static MACHINE_CONFIG_START( wgp, wgp_state )
MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(wgp_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c
index d124bd167f7..3e7a8975669 100644
--- a/src/mame/drivers/wink.c
+++ b/src/mame/drivers/wink.c
@@ -325,16 +325,6 @@ READ8_MEMBER(wink_state::sound_r)
return m_sound_flag;
}
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(wink_state,sound_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
//AY portA is fed by an input clock at 15625 Hz
INTERRUPT_GEN_MEMBER(wink_state::wink_sound)
{
@@ -377,7 +367,7 @@ static MACHINE_CONFIG_START( wink, wink_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, 12000000 / 8)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(wink_state, sound_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c
index a1c98e52b53..8c61a876179 100644
--- a/src/mame/drivers/witch.c
+++ b/src/mame/drivers/witch.c
@@ -487,26 +487,6 @@ WRITE8_MEMBER(witch_state::yscroll_w)
m_scrolly=data;
}
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("YM_PortA"),
- DEVCB_INPUT_PORT("YM_PortB"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(witch_state,xscroll_w),
- DEVCB_DRIVER_MEMBER(witch_state,yscroll_w)
-};
-
static ADDRESS_MAP_START( map_main, AS_PROGRAM, 8, witch_state )
AM_RANGE(0x0000, UNBANKED_SIZE-1) AM_ROM
AM_RANGE(UNBANKED_SIZE, 0x7fff) AM_ROMBANK("bank1")
@@ -858,11 +838,13 @@ static MACHINE_CONFIG_START( witch, witch_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("ym1", YM2203, YM2203_CLOCK) /* 3 MHz */
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("YM_PortA"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("YM_PortB"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MCFG_SOUND_ADD("ym2", YM2203, YM2203_CLOCK) /* 3 MHz */
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(witch_state, xscroll_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(witch_state, yscroll_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/wyvernf0.c b/src/mame/drivers/wyvernf0.c
index 26d980e84a5..6a8fe99b5e4 100644
--- a/src/mame/drivers/wyvernf0.c
+++ b/src/mame/drivers/wyvernf0.c
@@ -594,26 +594,6 @@ GFXDECODE_END
***************************************************************************/
-static const ay8910_interface wyvernf0_ay8910_intf_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface wyvernf0_ay8910_intf_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
MACHINE_START_MEMBER(wyvernf0_state,wyvernf0)
{
UINT8 *ROM = memregion("rombank")->base();
@@ -682,12 +662,10 @@ static MACHINE_CONFIG_START( wyvernf0, wyvernf0_state )
// coin, fire, lift-off
MCFG_SOUND_ADD("ay1", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
- MCFG_SOUND_CONFIG(wyvernf0_ay8910_intf_1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
// lift-off, explosion (saucers), boss alarm
MCFG_SOUND_ADD("ay2", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
- MCFG_SOUND_CONFIG(wyvernf0_ay8910_intf_2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
// music
diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c
index a68156453da..146066a87b2 100644
--- a/src/mame/drivers/xain.c
+++ b/src/mame/drivers/xain.c
@@ -555,13 +555,6 @@ WRITE_LINE_MEMBER(xain_state::irqhandler)
m_audiocpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
-};
-
void xain_state::machine_start()
{
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x4000, 0xc000);
@@ -604,7 +597,6 @@ static MACHINE_CONFIG_START( xsleena, xain_state )
MCFG_SOUND_ADD("ym1", YM2203, MCU_CLOCK)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(xain_state, irqhandler))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c
index 72157105d14..4d247909568 100644
--- a/src/mame/drivers/xxmissio.c
+++ b/src/mame/drivers/xxmissio.c
@@ -253,26 +253,6 @@ GFXDECODE_END
/****************************************************************************/
-static const ay8910_interface ay8910_config_1 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("DSW1"),
- DEVCB_INPUT_PORT("DSW2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface ay8910_config_2 =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_x_w),
- DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_y_w)
-};
-
static MACHINE_CONFIG_START( xxmissio, xxmissio_state )
/* basic machine hardware */
@@ -305,14 +285,16 @@ static MACHINE_CONFIG_START( xxmissio, xxmissio_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym1", YM2203, 12000000/8)
- MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
MCFG_SOUND_ROUTE(3, "mono", 0.40)
MCFG_SOUND_ADD("ym2", YM2203, 12000000/8)
- MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(xxmissio_state, xxmissio_scroll_x_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(xxmissio_state, xxmissio_scroll_y_w))
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index 763c0230d0e..51b7067b544 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -508,16 +508,6 @@ static GFXDECODE_START( zaccaria )
GFXDECODE_END
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r),
- DEVCB_DRIVER_MEMBER(zaccaria_state,ay8910_port0a_w),
- DEVCB_NULL
-};
-
INTERRUPT_GEN_MEMBER(zaccaria_state::vblank_irq)
{
if(m_nmi_mask)
@@ -578,7 +568,8 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zaccaria_state, ay8910_port0a_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c
index e71c2e7661a..9fa08e60f9e 100644
--- a/src/mame/drivers/zn.c
+++ b/src/mame/drivers/zn.c
@@ -1153,6 +1153,7 @@ static MACHINE_CONFIG_DERIVED( coh1000ta, zn1_1mb_vram )
MCFG_SOUND_ADD("ymsnd", YM2610B, XTAL_16MHz/2)
MCFG_YM2610_IRQ_HANDLER(WRITELINE(zn_state, irqhandler))
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h
index c79fa505b35..c49ac9bfb8b 100644
--- a/src/mame/includes/kaneko16.h
+++ b/src/mame/includes/kaneko16.h
@@ -11,6 +11,7 @@
#include "video/kan_pand.h"
#include "video/kaneko_tmap.h"
#include "video/kaneko_spr.h"
+#include "machine/eepromser.h"
#include "machine/kaneko_calc3.h"
#include "machine/kaneko_toybox.h"
#include "sound/okim6295.h"
@@ -32,7 +33,8 @@ public:
m_view2_1(*this, "view2_1"),
m_kaneko_spr(*this, "kan_spr"),
m_pandora(*this, "pandora"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_eeprom(*this, "eeprom")
{ }
required_device<cpu_device> m_maincpu;
@@ -47,6 +49,7 @@ public:
optional_device<kaneko16_sprite_device> m_kaneko_spr;
optional_device<kaneko_pandora_device> m_pandora;
required_device<palette_device> m_palette;
+ optional_device<eeprom_serial_93cxx_device> m_eeprom;
UINT16 m_disp_enable;
@@ -65,6 +68,9 @@ public:
DECLARE_READ16_MEMBER(kaneko16_ay2_YM2149_r);
DECLARE_WRITE16_MEMBER(kaneko16_ay2_YM2149_w);
DECLARE_WRITE16_MEMBER(bakubrkr_oki_bank_sw);
+
+ DECLARE_READ8_MEMBER(eeprom_r);
+ DECLARE_WRITE8_MEMBER(eeprom_w);
DECLARE_DRIVER_INIT(kaneko16);
DECLARE_DRIVER_INIT(samplebank);
diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h
index 27b889f1998..e1544759850 100644
--- a/src/mame/includes/mpu4.h
+++ b/src/mame/includes/mpu4.h
@@ -317,6 +317,4 @@ MACHINE_CONFIG_EXTERN( mpu4_common2 );
MACHINE_CONFIG_EXTERN( mod2 );
-extern const ay8910_interface ay8910_config;
-
INPUT_PORTS_EXTERN( mpu4 );
diff --git a/src/mame/video/cidelsa.c b/src/mame/video/cidelsa.c
index 04e6497150c..f942bf187fb 100644
--- a/src/mame/video/cidelsa.c
+++ b/src/mame/video/cidelsa.c
@@ -147,16 +147,6 @@ WRITE8_MEMBER( draco_state::psg_pb_w )
*/
}
-static const ay8910_interface psg_intf =
-{
- AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(draco_state, psg_pb_w)
-};
-
/* Machine Drivers */
MACHINE_CONFIG_FRAGMENT( destryer_video )
@@ -199,6 +189,7 @@ MACHINE_CONFIG_FRAGMENT( draco_video )
MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC)
MCFG_CDP1869_PRD_CALLBACK(INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1))
MCFG_SOUND_ADD(AY8910_TAG, AY8910, DRACO_SND_CHR1)
- MCFG_SOUND_CONFIG(psg_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(draco_state, psg_pb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/ace.c b/src/mess/drivers/ace.c
index 12eb777e6ad..226417c2fbe 100644
--- a/src/mess/drivers/ace.c
+++ b/src/mess/drivers/ace.c
@@ -531,21 +531,6 @@ UINT32 ace_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
//**************************************************************************
//-------------------------------------------------
-// ay8910_interface psg_intf
-//-------------------------------------------------
-
-static const ay8910_interface psg_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
-//-------------------------------------------------
// I8255A interface
//-------------------------------------------------
@@ -704,7 +689,6 @@ static MACHINE_CONFIG_START( ace, ace_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD(AY8910_TAG, AY8910, XTAL_6_5MHz/2)
- MCFG_SOUND_CONFIG(psg_intf)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD(SP0256AL2_TAG, SP0256, XTAL_3MHz)
diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c
index 149f4808a1f..64e8bcaa124 100644
--- a/src/mess/drivers/amstrad.c
+++ b/src/mess/drivers/amstrad.c
@@ -745,19 +745,6 @@ static INPUT_PORTS_START( aleste )
INPUT_PORTS_END
-/* --------------------
- - ay8910_interface -
- --------------------*/
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(amstrad_state, amstrad_psg_porta_read), /* portA read */
- DEVCB_DRIVER_MEMBER(amstrad_state, amstrad_psg_porta_read), /* portB read */
- DEVCB_NULL, /* portA write */
- DEVCB_NULL /* portB write */
-};
-
#if 0
static const gfx_layout asic_sprite_layout =
@@ -880,7 +867,8 @@ static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay", AY8912, XTAL_16MHz / 16)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portA read */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portB read */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* printer */
@@ -975,7 +963,8 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay", AY8912, XTAL_40MHz / 40)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portA read */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portB read */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* printer */
@@ -1051,7 +1040,8 @@ static MACHINE_CONFIG_START( gx4000, amstrad_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay", AY8912, XTAL_40MHz / 40)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portA read */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portB read */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_FRAGMENT_ADD(cpcplus_cartslot)
@@ -1067,7 +1057,8 @@ static MACHINE_CONFIG_DERIVED( aleste, amstrad )
MCFG_MACHINE_RESET_OVERRIDE(amstrad_state,aleste)
MCFG_SOUND_REPLACE("ay", AY8912, XTAL_16MHz / 16)
- MCFG_SOUND_CONFIG(ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portA read */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(amstrad_state, amstrad_psg_porta_read)) /* portB read */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_PALETTE_MODIFY("palette")
diff --git a/src/mess/drivers/aquarius.c b/src/mess/drivers/aquarius.c
index c5e1472404c..358337ac8ad 100644
--- a/src/mess/drivers/aquarius.c
+++ b/src/mess/drivers/aquarius.c
@@ -337,16 +337,6 @@ GFXDECODE_END
MACHINE DRIVERS
***************************************************************************/
-static const ay8910_interface aquarius_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("RIGHT"),
- DEVCB_INPUT_PORT("LEFT"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
static MACHINE_CONFIG_START( aquarius, aquarius_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) // ???
@@ -374,7 +364,8 @@ static MACHINE_CONFIG_START( aquarius, aquarius_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_3_579545MHz/2) // ??? AY-3-8914
- MCFG_SOUND_CONFIG(aquarius_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("RIGHT"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("LEFT"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* cassette */
diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c
index 698e6aaf156..8cf77636b80 100644
--- a/src/mess/drivers/atarist.c
+++ b/src/mess/drivers/atarist.c
@@ -1764,17 +1764,6 @@ WRITE8_MEMBER( st_state::psg_pa_w )
m_centronics->write_strobe(BIT(data, 5));
}
-static const ay8910_interface psg_intf =
-{
- AY8910_SINGLE_OUTPUT,
- { RES_K(1) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(st_state, psg_pa_w),
- DEVCB_DEVICE_MEMBER("cent_data_out", output_latch_device, write),
-};
-
-
//-------------------------------------------------
// ay8910_interface stbook_psg_intf
//-------------------------------------------------
@@ -1822,19 +1811,6 @@ WRITE8_MEMBER( stbook_state::psg_pa_w )
m_fdc->dden_w(BIT(data, 7));
}
-#if 0
-static const ay8910_interface stbook_psg_intf =
-{
- AY8910_SINGLE_OUTPUT,
- { RES_K(1) },
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(stbook_state, psg_pa_w),
- DEVCB_DEVICE_MEMBER("cent_data_out", output_latch_device, write),
-};
-#endif
-
-
WRITE_LINE_MEMBER( st_state::ikbd_tx_w )
{
m_ikbd_tx = state;
@@ -2107,7 +2083,10 @@ static MACHINE_CONFIG_START( st, st_state )
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(YM2149_TAG, YM2149, Y2/16)
- MCFG_SOUND_CONFIG(psg_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(1), 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(st_state, psg_pa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("cent_data_out", output_latch_device, write))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
// devices
@@ -2194,7 +2173,10 @@ static MACHINE_CONFIG_START( megast, megast_state )
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(YM2149_TAG, YM2149, Y2/16)
- MCFG_SOUND_CONFIG(psg_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(1), 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(st_state, psg_pa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("cent_data_out", output_latch_device, write))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
// devices
@@ -2283,7 +2265,10 @@ static MACHINE_CONFIG_START( ste, ste_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD(YM2149_TAG, YM2149, Y2/16)
- MCFG_SOUND_CONFIG(psg_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(1), 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(st_state, psg_pa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("cent_data_out", output_latch_device, write))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.50)
/*
@@ -2394,7 +2379,10 @@ static MACHINE_CONFIG_START( stbook, stbook_state )
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(YM3439_TAG, YM3439, U517/8)
- MCFG_SOUND_CONFIG(stbook_psg_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(1), 0, 0)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(stbook_state, psg_pa_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("cent_data_out", output_latch_device, write))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_DEVICE_ADD(MC68901_TAG, MC68901, U517/8)
diff --git a/src/mess/drivers/attache.c b/src/mess/drivers/attache.c
index 5c1dfd3039f..c64b7905e06 100644
--- a/src/mess/drivers/attache.c
+++ b/src/mess/drivers/attache.c
@@ -861,16 +861,6 @@ static INPUT_PORTS_START(attache)
INPUT_PORTS_END
-static const ay8910_interface ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL, /* portA write */
- DEVCB_NULL /* portB write */
-};
-
// IRQ daisy chain = CTC -> SIO -> Expansion
static const z80_daisy_config attache_daisy_chain[] =
{
@@ -952,7 +942,6 @@ static MACHINE_CONFIG_START( attache, attache_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("psg", AY8912, XTAL_8MHz / 4)
- MCFG_SOUND_CONFIG(ay8912_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_MSM5832_ADD("rtc",XTAL_32_768kHz)
diff --git a/src/mess/drivers/cgc7900.c b/src/mess/drivers/cgc7900.c
index 550ceb4d4d5..ed30f5ac999 100644
--- a/src/mess/drivers/cgc7900.c
+++ b/src/mess/drivers/cgc7900.c
@@ -337,23 +337,6 @@ static INPUT_PORTS_START( cgc7900 )
PORT_BIT( 0x1ff, 0x0c0, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0, 383) PORT_SENSITIVITY(20) PORT_KEYDELTA(25)
INPUT_PORTS_END
-/***************************************************************************
- DEVICE CONFIGURATION
-***************************************************************************/
-
-/*-------------------------------------------------
- ay8910_interface ay8910_intf
--------------------------------------------------*/
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
/***************************************************************************
MACHINE INITIALIZATION
@@ -400,7 +383,6 @@ static MACHINE_CONFIG_START( cgc7900, cgc7900_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY8910_TAG, AY8910, XTAL_28_48MHz/16)
- MCFG_SOUND_CONFIG(ay8910_intf)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c
index 28c10c3279b..1d2db709a95 100644
--- a/src/mess/drivers/cgenie.c
+++ b/src/mess/drivers/cgenie.c
@@ -471,17 +471,6 @@ PALETTE_INIT_MEMBER(cgenie_state,cgenienz)
palette.set_pen_indirect(i, cgenie_palette[i]);
}
-static const ay8910_interface cgenie_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(cgenie_state, cgenie_psg_port_a_r),
- DEVCB_DRIVER_MEMBER(cgenie_state, cgenie_psg_port_b_r),
- DEVCB_DRIVER_MEMBER(cgenie_state, cgenie_psg_port_a_w),
- DEVCB_DRIVER_MEMBER(cgenie_state, cgenie_psg_port_b_w)
-};
-
-
// This is currently broken
static LEGACY_FLOPPY_OPTIONS_START(cgenie )
LEGACY_FLOPPY_OPTION( cgd, "cgd", "Colour Genie disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
@@ -529,7 +518,10 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state )
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_17_73447MHz/8)
- MCFG_SOUND_CONFIG(cgenie_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(cgenie_state, cgenie_psg_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(cgenie_state, cgenie_psg_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cgenie_state, cgenie_psg_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(cgenie_state, cgenie_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_CASSETTE_ADD( "cassette" )
diff --git a/src/mess/drivers/dragon.c b/src/mess/drivers/dragon.c
index 1011f5c3fa1..c41f1bbcc94 100644
--- a/src/mess/drivers/dragon.c
+++ b/src/mess/drivers/dragon.c
@@ -225,7 +225,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( dgnalpha, dragon_base, dragon_alpha_state )
// sound hardware
MCFG_SOUND_ADD(AY8912_TAG, AY8912, 1000000)
- MCFG_SOUND_CONFIG(dragon_alpha_state::ay8912_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(dragon_alpha_state, psg_porta_read))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(dragon_alpha_state, psg_porta_write))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
// pia 2
diff --git a/src/mess/drivers/einstein.c b/src/mess/drivers/einstein.c
index 06067b70a53..a645fdb9a16 100644
--- a/src/mess/drivers/einstein.c
+++ b/src/mess/drivers/einstein.c
@@ -665,16 +665,6 @@ INPUT_PORTS_END
MACHINE DRIVERS
***************************************************************************/
-static const ay8910_interface einstein_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(einstein_state, einstein_keyboard_data_read),
- DEVCB_DRIVER_MEMBER(einstein_state, einstein_keyboard_line_write),
- DEVCB_NULL
-};
-
/* F4 Character Displayer */
static const gfx_layout einstei2_charlayout =
{
@@ -736,7 +726,8 @@ static MACHINE_CONFIG_START( einstein, einstein_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(IC_I030, AY8910, XTAL_X002 / 4)
- MCFG_SOUND_CONFIG(einstein_ay_interface)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(einstein_state, einstein_keyboard_data_read))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(einstein_state, einstein_keyboard_line_write))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
/* printer */
diff --git a/src/mess/drivers/fc100.c b/src/mess/drivers/fc100.c
index eff0fe9ad0e..18eb722bb16 100644
--- a/src/mess/drivers/fc100.c
+++ b/src/mess/drivers/fc100.c
@@ -334,16 +334,6 @@ WRITE8_MEMBER( fc100_state::ay_port_a_w )
}
#endif
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("JOY0"),
- DEVCB_INPUT_PORT("JOY1"),
- DEVCB_NULL,//DEVCB_DRIVER_MEMBER(fc100_state, ay_port_a_w),
- DEVCB_NULL,//DEVCB_DRIVER_MEMBER(fc100_state, ay_port_b_w)
-};
-
//******************** VIDEO **********************************
READ8_MEMBER( fc100_state::mc6847_videoram_r )
@@ -547,7 +537,10 @@ static MACHINE_CONFIG_START( fc100, fc100_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("psg", AY8910, XTAL_7_15909MHz/3/2) /* AY-3-8910 - clock not verified */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("JOY1"))
+ //MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fc100_state, ay_port_a_w))
+ //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fc100_state, ay_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.50)
/* Devices */
diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c
index 6684ae14773..c07394a4cbc 100644
--- a/src/mess/drivers/fm7.c
+++ b/src/mess/drivers/fm7.c
@@ -1971,26 +1971,6 @@ static const wd17xx_interface fm7_mb8877a_interface =
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
-static const ay8910_interface fm7_psg_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA read */
- DEVCB_NULL, /* portB read */
- DEVCB_NULL, /* portA write */
- DEVCB_NULL /* portB write */
-};
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_1_r),
- DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_2_r),
- DEVCB_NULL, /* portA write */
- DEVCB_NULL /* portB write */
-};
-
static const floppy_interface fm7_floppy_interface =
{
FLOPPY_STANDARD_5_25_DSHD,
@@ -2012,7 +1992,6 @@ static MACHINE_CONFIG_START( fm7, fm7_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("psg", AY8910, XTAL_4_9152MHz / 4)
- MCFG_SOUND_CONFIG(fm7_psg_intf)
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 1.00)
MCFG_SOUND_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.50)
@@ -2121,7 +2100,8 @@ static MACHINE_CONFIG_START( fm77av, fm7_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym", YM2203, XTAL_4_9152MHz / 4)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(fm7_state, fm77av_fmirq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(fm7_state, fm77av_joy_1_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(fm7_state, fm77av_joy_2_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",1.0)
MCFG_SOUND_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
diff --git a/src/mess/drivers/galaxy.c b/src/mess/drivers/galaxy.c
index 095aa88f956..c6f6c168a35 100644
--- a/src/mess/drivers/galaxy.c
+++ b/src/mess/drivers/galaxy.c
@@ -144,13 +144,6 @@ static INPUT_PORTS_START( galaxyp )
PORT_INCLUDE( galaxy_common )
INPUT_PORTS_END
-static const ay8910_interface galaxy_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
#define XTAL 6144000
/* F4 Character Displayer */
@@ -242,7 +235,6 @@ static MACHINE_CONFIG_START( galaxyp, galaxy_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, XTAL/4)
- MCFG_SOUND_CONFIG(galaxy_ay_interface)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mess/drivers/intv.c b/src/mess/drivers/intv.c
index 13f87f9d723..0e62702dc71 100644
--- a/src/mess/drivers/intv.c
+++ b/src/mess/drivers/intv.c
@@ -117,26 +117,6 @@ PALETTE_INIT_MEMBER(intv_state, intv)
}
}
-static const ay8910_interface intv_ay8914_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(intv_state, intv_right_control_r),
- DEVCB_DRIVER_MEMBER(intv_state, intv_left_control_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface intv_ay8914_ecs_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(intv_state, intv_ecs_porta_r),
- DEVCB_DRIVER_MEMBER(intv_state, intv_ecs_portb_r),
- DEVCB_DRIVER_MEMBER(intv_state, intv_ecs_porta_w),
- DEVCB_NULL
-};
-
/* graphics output */
static const gfx_layout intvkbd_charlayout =
@@ -814,7 +794,8 @@ static MACHINE_CONFIG_START( intv, intv_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8914.1", AY8914, XTAL_3_579545MHz/2)
- MCFG_SOUND_CONFIG(intv_ay8914_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(intv_state, intv_right_control_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(intv_state, intv_left_control_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
MCFG_SOUND_ADD("sp0256_speech", SP0256, 3120000)
@@ -841,7 +822,9 @@ static MACHINE_CONFIG_DERIVED( intvecs, intv )
MCFG_SOFTWARE_LIST_ADD("cart_list_ecs","intvecs")
MCFG_SOUND_ADD("ay8914.2", AY8914, XTAL_3_579545MHz/2)
- MCFG_SOUND_CONFIG(intv_ay8914_ecs_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(intv_state, intv_ecs_porta_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(intv_state, intv_ecs_portb_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(intv_state, intv_ecs_porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
/* cassette */
diff --git a/src/mess/drivers/lola8a.c b/src/mess/drivers/lola8a.c
index ae3417b45e5..80170fbf2ac 100644
--- a/src/mess/drivers/lola8a.c
+++ b/src/mess/drivers/lola8a.c
@@ -257,16 +257,6 @@ WRITE_LINE_MEMBER(lola8a_state::crtc_vsync)
m_maincpu->set_input_line(I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE);
}
-static const ay8910_interface psg_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(lola8a_state, lola8a_port_a_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(lola8a_state, lola8a_port_b_w)
-};
-
static MACHINE_CONFIG_START( lola8a, lola8a_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8085A, XTAL_4_9152MHz)
@@ -277,7 +267,8 @@ static MACHINE_CONFIG_START( lola8a, lola8a_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY8910_TAG, AY8910, XTAL_4_9152MHz / 4)
- MCFG_SOUND_CONFIG(psg_intf)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(lola8a_state, lola8a_port_a_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(lola8a_state, lola8a_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",1.0)
/* video hardware */
diff --git a/src/mess/drivers/mc1000.c b/src/mess/drivers/mc1000.c
index a4e0efc0b56..e386d570c3e 100644
--- a/src/mess/drivers/mc1000.c
+++ b/src/mess/drivers/mc1000.c
@@ -316,16 +316,6 @@ READ8_MEMBER( mc1000_state::keydata_r )
return data;
}
-static const ay8910_interface ay8910_intf =
-{
- AY8910_SINGLE_OUTPUT,
- { RES_K(2.2), 0, 0 },
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(mc1000_state, keydata_r),
- DEVCB_DRIVER_MEMBER(mc1000_state, keylatch_w),
- DEVCB_NULL
-};
-
/* Machine Initialization */
void mc1000_state::machine_start()
@@ -454,7 +444,10 @@ static MACHINE_CONFIG_START( mc1000, mc1000_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY8910_TAG, AY8910, 3579545/2)
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(RES_K(2.2), 0, 0)
+ MCFG_AY8910_PORT_B_READ_CB(READ8(mc1000_state, keydata_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(mc1000_state, keylatch_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
diff --git a/src/mess/drivers/microtan.c b/src/mess/drivers/microtan.c
index 1b7128c9bfa..327b6710b64 100644
--- a/src/mess/drivers/microtan.c
+++ b/src/mess/drivers/microtan.c
@@ -204,15 +204,6 @@ static GFXDECODE_START( microtan )
GFXDECODE_ENTRY( "gfx2", 0, chunky_layout, 0, 1 )
GFXDECODE_END
-static const ay8910_interface microtan_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
static MACHINE_CONFIG_START( microtan, microtan_state )
/* basic machine hardware */
@@ -241,10 +232,8 @@ static MACHINE_CONFIG_START( microtan, microtan_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910.1", AY8910, 1000000)
- MCFG_SOUND_CONFIG(microtan_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("ay8910.2", AY8910, 1000000)
- MCFG_SOUND_CONFIG(microtan_ay8910_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* snapshot/quickload */
diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c
index 579a4c50b81..21413d0a441 100644
--- a/src/mess/drivers/msx.c
+++ b/src/mess/drivers/msx.c
@@ -1045,16 +1045,6 @@ static INPUT_PORTS_START( msx2kr )
PORT_INCLUDE( msx_dips )
INPUT_PORTS_END
-static const ay8910_interface msx_ay8910_interface =
-{
- AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(msx_state, msx_psg_port_a_r),
- DEVCB_DRIVER_MEMBER(msx_state, msx_psg_port_b_r),
- DEVCB_DRIVER_MEMBER(msx_state, msx_psg_port_a_w),
- DEVCB_DRIVER_MEMBER(msx_state, msx_psg_port_b_w)
-};
-
#define MSX_XBORDER_PIXELS 15
#define MSX_YBORDER_PIXELS 27
#define MSX_TOTAL_XRES_PIXELS 256 + (MSX_XBORDER_PIXELS * 2)
@@ -1196,7 +1186,11 @@ static MACHINE_CONFIG_START( msx, msx_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_10_738635MHz/3/2)
- MCFG_SOUND_CONFIG(msx_ay8910_interface)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("k051649", K051649, XTAL_10_738635MHz/3/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
@@ -1288,7 +1282,11 @@ static MACHINE_CONFIG_START( msx2, msx_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_21_4772MHz/6/2)
- MCFG_SOUND_CONFIG(msx_ay8910_interface)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("k051649", K051649, XTAL_21_4772MHz/6/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
@@ -1356,7 +1354,11 @@ static MACHINE_CONFIG_START( msx2p, msx_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_21_4772MHz/6/2)
- MCFG_SOUND_CONFIG(msx_ay8910_interface)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("k051649", K051649, XTAL_21_4772MHz/6/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
diff --git a/src/mess/drivers/multi8.c b/src/mess/drivers/multi8.c
index 3c01000b25e..083412eb85a 100644
--- a/src/mess/drivers/multi8.c
+++ b/src/mess/drivers/multi8.c
@@ -609,17 +609,6 @@ WRITE8_MEMBER( multi8_state::ym2203_porta_w )
m_beeper->set_state((data & 0x08));
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(multi8_state, ym2203_porta_w ),
- DEVCB_NULL
-};
-
-
void multi8_state::machine_start()
{
m_p_vram = memregion("vram")->base();
@@ -656,7 +645,7 @@ static MACHINE_CONFIG_START( multi8, multi8_state )
/* Audio */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8912, 1500000) //unknown clock / divider
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(multi8_state, ym2203_porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
diff --git a/src/mess/drivers/myvision.c b/src/mess/drivers/myvision.c
index f121324384b..9b8506eaf0b 100644
--- a/src/mess/drivers/myvision.c
+++ b/src/mess/drivers/myvision.c
@@ -214,18 +214,6 @@ WRITE8_MEMBER( myvision_state::ay_port_b_w )
m_column = data;
}
-
-static const ay8910_interface myvision_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_r),
- DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_r),
- DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_w),
- DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_w)
-};
-
-
static MACHINE_CONFIG_START( myvision, myvision_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",Z80, XTAL_10_738635MHz/3) /* Not verified */
@@ -242,7 +230,10 @@ static MACHINE_CONFIG_START( myvision, myvision_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_10_738635MHz/3/2) /* Exact model and clock not verified */
- MCFG_SOUND_CONFIG(myvision_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(myvision_state, ay_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(myvision_state, ay_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(myvision_state, ay_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(myvision_state, ay_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* cartridge */
diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c
index 761479f80de..36446977170 100644
--- a/src/mess/drivers/mz2500.c
+++ b/src/mess/drivers/mz2500.c
@@ -1998,16 +1998,6 @@ WRITE8_MEMBER(mz2500_state::opn_porta_w)
m_ym_porta = data;
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_r), // read A
- DEVCB_INPUT_PORT("DSW1"), // read B
- DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_w), // write A
- DEVCB_NULL // write B
-};
-
PALETTE_INIT_MEMBER(mz2500_state, mz2500)
{
int i;
@@ -2113,7 +2103,9 @@ static MACHINE_CONFIG_START( mz2500, mz2500_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym", YM2203, 2000000) //unknown clock / divider
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(mz2500_state, opn_porta_r)) // read A
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1")) // read B
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(mz2500_state, opn_porta_w)) // write A
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
diff --git a/src/mess/drivers/oric.c b/src/mess/drivers/oric.c
index 6ee1f730fad..6299fc972b7 100644
--- a/src/mess/drivers/oric.c
+++ b/src/mess/drivers/oric.c
@@ -767,17 +767,6 @@ static INPUT_PORTS_START(telstrat)
INPUT_PORTS_END
-static const ay8910_interface oric_ay_interface =
-{
- AY8910_DISCRETE_OUTPUT,
- { 4700, 4700, 4700},
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(oric_state, psg_a_w),
- DEVCB_NULL,
-};
-
-
static MACHINE_CONFIG_START( oric, oric_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6502, XTAL_12MHz/12)
@@ -798,7 +787,9 @@ static MACHINE_CONFIG_START( oric, oric_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8912", AY8912, XTAL_12MHz/12)
- MCFG_SOUND_CONFIG(oric_ay_interface)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_DISCRETE_OUTPUT)
+ MCFG_AY8910_RES_LOADS(4700, 4700, 4700)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(oric_state, psg_a_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* printer */
diff --git a/src/mess/drivers/orion.c b/src/mess/drivers/orion.c
index 2a21555cebb..7382e2083d9 100644
--- a/src/mess/drivers/orion.c
+++ b/src/mess/drivers/orion.c
@@ -153,12 +153,6 @@ static MACHINE_CONFIG_DERIVED( orion128ms, orion128 )
MCFG_I8255_OUT_PORTC_CB(WRITE8(radio86_state, radio86_8255_portc_w2))
MACHINE_CONFIG_END
-static const ay8910_interface orionz80_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
static MACHINE_CONFIG_START( orionz80, orion_state )
MCFG_CPU_ADD("maincpu", Z80, 2500000)
@@ -202,7 +196,6 @@ static MACHINE_CONFIG_START( orionz80, orion_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8912", AY8912, 1773400)
- MCFG_SOUND_CONFIG(orionz80_ay_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_CASSETTE_ADD( "cassette" )
@@ -278,7 +271,6 @@ static MACHINE_CONFIG_START( orionpro, orion_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8912", AY8912, 1773400)
- MCFG_SOUND_CONFIG(orionz80_ay_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_CASSETTE_ADD( "cassette" )
diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c
index 644e9670e8b..7aeaf9541a1 100644
--- a/src/mess/drivers/pc6001.c
+++ b/src/mess/drivers/pc6001.c
@@ -1908,18 +1908,6 @@ READ8_MEMBER(pc6001_state::pc6001_8255_portc_r)
return 0x88;
}
-
-
-static const ay8910_interface pc6001_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
UINT8 pc6001_state::check_keyboard_press()
{
ioport_port *ports[3] = { m_io_key1, m_io_key2, m_io_key3 };
@@ -2343,7 +2331,8 @@ static MACHINE_CONFIG_START( pc6001, pc6001_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, PC6001_MAIN_CLOCK/4)
- MCFG_SOUND_CONFIG(pc6001_ay_interface)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
// MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c
index 713dc8be82b..d126ed0d336 100644
--- a/src/mess/drivers/pc8801.c
+++ b/src/mess/drivers/pc8801.c
@@ -2559,28 +2559,7 @@ READ8_MEMBER(pc8801_state::opn_porta_r)
}
READ8_MEMBER(pc8801_state::opn_portb_r){ return ioport("OPN_PB")->read(); }
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(pc8801_state,opn_porta_r),
- DEVCB_DRIVER_MEMBER(pc8801_state,opn_portb_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-static const ay8910_interface single_ay8910_config =
-{
- AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(pc8801_state,opn_porta_r),
- DEVCB_DRIVER_MEMBER(pc8801_state,opn_portb_r),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/* Cassette Configuration */
-
WRITE_LINE_MEMBER( pc8801_state::txdata_callback )
{
//m_cass->output( (state) ? 0.8 : -0.8);
@@ -2656,12 +2635,15 @@ static MACHINE_CONFIG_START( pc8801, pc8801_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn", YM2203, MASTER_CLOCK)
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pc8801_state, pc8801_sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pc8801_state, opn_porta_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(pc8801_state, opn_portb_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("opna", YM2608, MASTER_CLOCK*2)
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc8801_state, pc8801_sound_irq))
- MCFG_YM2608_AY8910_INTF(&single_ay8910_config)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pc8801_state, opn_porta_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(pc8801_state, opn_portb_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("beeper", BEEP, 0)
diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c
index 5b380fee1f4..4f98ce743b9 100644
--- a/src/mess/drivers/pc88va.c
+++ b/src/mess/drivers/pc88va.c
@@ -1722,17 +1722,6 @@ WRITE_LINE_MEMBER( pc88va_state::fdc_irq )
#endif
}
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
-};
-
WRITE_LINE_MEMBER(pc88va_state::pc88va_hlda_w)
{
m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
@@ -1844,7 +1833,6 @@ static MACHINE_CONFIG_START( pc88va, pc88va_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ym", YM2203, 3993600) //unknown clock / divider
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
MCFG_SOUND_ROUTE(0, "mono", 0.25)
MCFG_SOUND_ROUTE(1, "mono", 0.25)
MCFG_SOUND_ROUTE(2, "mono", 0.50)
diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c
index 631fd63eb57..9ae7089b034 100644
--- a/src/mess/drivers/pc9801.c
+++ b/src/mess/drivers/pc9801.c
@@ -3751,7 +3751,7 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
// MCFG_SOUND_ADD("opna", YM2608, MAIN_CLOCK_X1*4) // unknown clock / divider
-// MCFG_SOUND_CONFIG(pc98_ym2608_intf)
+// MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("beeper", BEEP, 0)
@@ -3869,7 +3869,7 @@ static MACHINE_CONFIG_START( pc9821, pc9801_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
// MCFG_SOUND_ADD("opna", YM2608, MAIN_CLOCK_X1*4) // unknown clock / divider
-// MCFG_SOUND_CONFIG(pc98_ym2608_intf)
+// MCFG_AY8910_OUTPUT_TYPE(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT)
// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("beeper", BEEP, 0)
diff --git a/src/mess/drivers/phc25.c b/src/mess/drivers/phc25.c
index d892fac2c3c..1c5bf2ff16d 100644
--- a/src/mess/drivers/phc25.c
+++ b/src/mess/drivers/phc25.c
@@ -339,18 +339,6 @@ void phc25_state::video_start()
m_port40 = 0;
}
-/* AY-3-8910 Interface */
-
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("JOY0"),
- DEVCB_INPUT_PORT("JOY1"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
/* Machine Driver */
static MACHINE_CONFIG_START( phc25, phc25_state )
@@ -362,7 +350,8 @@ static MACHINE_CONFIG_START( phc25, phc25_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY8910_TAG, AY8910, 1996750)
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY0"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("JOY1"))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
diff --git a/src/mess/drivers/rmnimbus.c b/src/mess/drivers/rmnimbus.c
index c936c44d9e9..e3ea9d3da06 100644
--- a/src/mess/drivers/rmnimbus.c
+++ b/src/mess/drivers/rmnimbus.c
@@ -49,19 +49,6 @@ static SLOT_INTERFACE_START(keyboard)
SLOT_INTERFACE("rmnkbd", RMNIMBUS_KEYBOARD)
SLOT_INTERFACE_END
-/* Null port handlers for now, I believe that the IO ports are used for */
-/* the nimbus rompacks */
-
-static const ay8910_interface nimbus_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL, /* portA read */
- DEVCB_NULL, /* portB read */
- DEVCB_DRIVER_MEMBER(rmnimbus_state, nimbus_sound_ay8910_porta_w), /* portA write */
- DEVCB_DRIVER_MEMBER(rmnimbus_state, nimbus_sound_ay8910_portb_w) /* portB write */
-};
-
static ADDRESS_MAP_START(nimbus_mem, AS_PROGRAM, 16, rmnimbus_state )
AM_RANGE( 0x00000, 0x1FFFF ) AM_RAMBANK(RAM_BANK00_TAG)
AM_RANGE( 0x20000, 0x3FFFF ) AM_RAMBANK(RAM_BANK01_TAG)
@@ -234,7 +221,8 @@ static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO(MONO_TAG)
MCFG_SOUND_ADD(AY8910_TAG, AY8910, 2000000)
- MCFG_SOUND_CONFIG(nimbus_ay8910_interface)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(rmnimbus_state, nimbus_sound_ay8910_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(rmnimbus_state, nimbus_sound_ay8910_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS,MONO_TAG, 0.75)
MCFG_SOUND_ADD(MSM5205_TAG, MSM5205, 384000)
diff --git a/src/mess/drivers/sbc6510.c b/src/mess/drivers/sbc6510.c
index ff72fd8ad2c..d9414f75ca0 100644
--- a/src/mess/drivers/sbc6510.c
+++ b/src/mess/drivers/sbc6510.c
@@ -241,17 +241,6 @@ READ8_MEMBER( sbc6510_state::psg_b_r )
return 0x7f;
}
-// Ports A and B connect to the IDE socket
-static const ay8910_interface sbc6510_ay_interface =
-{
- AY8910_LEGACY_OUTPUT, // flags
- AY8910_DEFAULT_LOADS, // channel load in ohms
- DEVCB_DRIVER_MEMBER(sbc6510_state, psg_a_r), // port A read
- DEVCB_DRIVER_MEMBER(sbc6510_state, psg_b_r), // port B read
- DEVCB_NULL, // port A write
- DEVCB_NULL // port B write
-};
-
READ8_MEMBER( sbc6510_state::key_r )
{
UINT8 data=0;
@@ -313,7 +302,9 @@ static MACHINE_CONFIG_START( sbc6510, sbc6510_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_1MHz)
- MCFG_SOUND_CONFIG(sbc6510_ay_interface)
+ // Ports A and B connect to the IDE socket
+ MCFG_AY8910_PORT_A_READ_CB(READ8(sbc6510_state, psg_a_r)) // port A read
+ MCFG_AY8910_PORT_B_READ_CB(READ8(sbc6510_state, psg_b_r)) // port B read
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_DEVICE_ADD("cia6526", MOS6526, XTAL_1MHz)
diff --git a/src/mess/drivers/spc1000.c b/src/mess/drivers/spc1000.c
index 09f7dd99952..430ae561043 100644
--- a/src/mess/drivers/spc1000.c
+++ b/src/mess/drivers/spc1000.c
@@ -287,16 +287,6 @@ READ8_MEMBER( spc1000_state::porta_r )
return data;
}
-static const ay8910_interface spc1000_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(spc1000_state, porta_r), //portA_r
- DEVCB_NULL, // portB_r
- DEVCB_NULL, // portA_w
- DEVCB_NULL // portB_w
-};
-
// irq is inverted in emulation, so we need this trampoline
WRITE_LINE_MEMBER( spc1000_state::irq_w )
{
@@ -333,7 +323,7 @@ static MACHINE_CONFIG_START( spc1000, spc1000_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_4MHz / 1)
- MCFG_SOUND_CONFIG(spc1000_ay_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(spc1000_state, porta_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mess/drivers/spec128.c b/src/mess/drivers/spec128.c
index 5cdc252c4a3..2e5935bbad0 100644
--- a/src/mess/drivers/spec128.c
+++ b/src/mess/drivers/spec128.c
@@ -159,13 +159,6 @@ resulting mess can be seen in the F4 viewer display.
#include "formats/tzx_cas.h"
#include "machine/ram.h"
-static const ay8910_interface spectrum_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
/****************************************************************************************************/
/* Spectrum 128 specific functions */
@@ -310,7 +303,6 @@ MACHINE_CONFIG_DERIVED( spectrum_128, spectrum )
/* sound hardware */
MCFG_SOUND_ADD("ay8912", AY8912, 1773400)
- MCFG_SOUND_CONFIG(spectrum_ay_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* internal ram */
diff --git a/src/mess/drivers/sv8000.c b/src/mess/drivers/sv8000.c
index 23e3f18ed26..3783110db01 100644
--- a/src/mess/drivers/sv8000.c
+++ b/src/mess/drivers/sv8000.c
@@ -344,18 +344,6 @@ WRITE8_MEMBER( sv8000_state::ay_port_b_w )
//logerror("ay_port_b_w: %02X\n", data);
}
-
-static const ay8910_interface sv8000_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(sv8000_state, ay_port_a_r),
- DEVCB_DRIVER_MEMBER(sv8000_state, ay_port_b_r),
- DEVCB_DRIVER_MEMBER(sv8000_state, ay_port_a_w),
- DEVCB_DRIVER_MEMBER(sv8000_state, ay_port_b_w)
-};
-
-
READ8_MEMBER( sv8000_state::mc6847_videoram_r )
{
if (offset == ~0) return 0xff;
@@ -427,7 +415,10 @@ static MACHINE_CONFIG_START( sv8000, sv8000_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_10_738635MHz/3/2) /* Exact model and clock not verified */
- MCFG_SOUND_CONFIG(sv8000_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(sv8000_state, ay_port_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(sv8000_state, ay_port_b_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(sv8000_state, ay_port_a_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(sv8000_state, ay_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* cartridge */
diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c
index 0af55cfb21d..46cd0b3cc7c 100644
--- a/src/mess/drivers/svi318.c
+++ b/src/mess/drivers/svi318.c
@@ -250,16 +250,6 @@ static INPUT_PORTS_START( svi328 )
PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_DEL_PAD)
INPUT_PORTS_END
-static const ay8910_interface svi318_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(svi318_state, svi318_psg_port_a_r),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(svi318_state, svi318_psg_port_b_w)
-};
-
WRITE_LINE_MEMBER(svi318_state::vdp_interrupt)
{
m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
@@ -316,7 +306,8 @@ static MACHINE_CONFIG_START( svi318, svi318_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, 1789773)
- MCFG_SOUND_CONFIG(svi318_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, svi318_psg_port_a_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, svi318_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
/* printer */
@@ -447,7 +438,8 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, 1789773)
- MCFG_SOUND_CONFIG(svi318_ay8910_interface)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, svi318_psg_port_a_r))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, svi318_psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
/* printer */
diff --git a/src/mess/drivers/tiki100.c b/src/mess/drivers/tiki100.c
index 98c8dcc4abd..d357130cabb 100644
--- a/src/mess/drivers/tiki100.c
+++ b/src/mess/drivers/tiki100.c
@@ -577,16 +577,6 @@ WRITE8_MEMBER( tiki100_state::video_scroll_w )
m_scroll = data;
}
-static const ay8910_interface ay8910_intf =
-{
- AY8910_SINGLE_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_DRIVER_MEMBER(tiki100_state, video_scroll_w),
- DEVCB_NULL
-};
-
/* Z80 Daisy Chain */
static const z80_daisy_config tiki100_daisy_chain[] =
@@ -713,7 +703,8 @@ static MACHINE_CONFIG_START( tiki100, tiki100_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY8912_TAG, AY8912, XTAL_8MHz/4)
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tiki100_state, video_scroll_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* internal ram */
diff --git a/src/mess/drivers/timex.c b/src/mess/drivers/timex.c
index 85fd38d606b..d64309dbe28 100644
--- a/src/mess/drivers/timex.c
+++ b/src/mess/drivers/timex.c
@@ -179,13 +179,6 @@ const timex_cart_t *timex_cart_data(void)
return &timex_cart;
}
-static const ay8910_interface spectrum_ay_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
/****************************************************************************************************/
/* TS2048 specific functions */
@@ -740,7 +733,6 @@ static MACHINE_CONFIG_DERIVED( ts2068, spectrum_128 )
/* sound */
MCFG_SOUND_REPLACE("ay8912", AY8912, XTAL_14_112MHz/8) /* From Schematic; 1.764 MHz */
- MCFG_SOUND_CONFIG(spectrum_ay_interface)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* cartridge */
diff --git a/src/mess/drivers/votrpss.c b/src/mess/drivers/votrpss.c
index 80d53ac1f61..99811f4a15d 100644
--- a/src/mess/drivers/votrpss.c
+++ b/src/mess/drivers/votrpss.c
@@ -235,16 +235,6 @@ WRITE8_MEMBER( votrpss_state::ppi_pc_w )
m_portc = data;
}
-static const ay8910_interface ay8910_intf =
-{
- AY8910_LEGACY_OUTPUT, // flags
- AY8910_DEFAULT_LOADS, // channel load in ohms
- DEVCB_NULL, // port A read
- DEVCB_INPUT_PORT("DSW1"), // port B read
- DEVCB_DEVICE_MEMBER("votrax", votrax_sc01_device, write), // port A write
- DEVCB_NULL // port B write
-};
-
WRITE8_MEMBER( votrpss_state::kbd_put )
{
m_term_data = data;
@@ -273,7 +263,8 @@ static MACHINE_CONFIG_START( votrpss, votrpss_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay", AY8910, XTAL_8MHz/4) /* 2.000 MHz, verified */
- MCFG_SOUND_CONFIG(ay8910_intf)
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1")) // port B read
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("votrax", votrax_sc01_device, write)) // port A write
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DEVICE_ADD("votrax", VOTRAX_SC01, 720000) /* 720 kHz? needs verify */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index 379cc4eb29d..53058a064a8 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -2244,23 +2244,6 @@ static const z80_daisy_config x1turbo_daisy[] =
/*************************************
*
- * Sound HW Config
- *
- *************************************/
-
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-// (ym-2151 handler here)
-/*************************************
- *
* Machine Functions
*
*************************************/
@@ -2518,7 +2501,8 @@ static MACHINE_CONFIG_START( x1, x1_state )
/* TODO:is the AY mono or stereo? Also volume balance isn't right. */
MCFG_SOUND_ADD("ay", AY8910, MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 0.5)
diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c
index fcd53de111f..661f6613bdf 100644
--- a/src/mess/drivers/x1twin.c
+++ b/src/mess/drivers/x1twin.c
@@ -402,17 +402,6 @@ static const z80_daisy_config x1_daisy[] =
{ NULL }
};
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_INPUT_PORT("P1"),
- DEVCB_INPUT_PORT("P2"),
- DEVCB_NULL,
- DEVCB_NULL
-};
-
-
static LEGACY_FLOPPY_OPTIONS_START( x1 )
LEGACY_FLOPPY_OPTION( img2d, "2d", "2D disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
HEADS([2])
@@ -505,7 +494,8 @@ static MACHINE_CONFIG_START( x1twin, x1twin_state )
/* TODO:is the AY mono or stereo? Also volume balance isn't right. */
MCFG_SOUND_ADD("ay", AY8910, MAIN_CLOCK/8)
- MCFG_SOUND_CONFIG(ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
MCFG_SOUND_ROUTE(0, "x1_l", 0.25)
MCFG_SOUND_ROUTE(0, "x1_r", 0.25)
MCFG_SOUND_ROUTE(1, "x1_l", 0.5)
diff --git a/src/mess/includes/dgnalpha.h b/src/mess/includes/dgnalpha.h
index b37d1e29b4d..a1607965ca9 100644
--- a/src/mess/includes/dgnalpha.h
+++ b/src/mess/includes/dgnalpha.h
@@ -52,8 +52,11 @@ public:
DECLARE_WRITE8_MEMBER( pia2_pa_w );
DECLARE_WRITE_LINE_MEMBER( pia2_firq_a );
DECLARE_WRITE_LINE_MEMBER( pia2_firq_b );
+
+ /* psg */
+ DECLARE_READ8_MEMBER( psg_porta_read );
+ DECLARE_WRITE8_MEMBER( psg_porta_write );
- static const ay8910_interface ay8912_interface;
static const wd17xx_interface fdc_interface;
protected:
@@ -71,10 +74,6 @@ protected:
private:
UINT8 m_just_reset;
- /* psg */
- DECLARE_READ8_MEMBER( psg_porta_read );
- DECLARE_WRITE8_MEMBER( psg_porta_write );
-
/* fdc */
DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w );
DECLARE_WRITE_LINE_MEMBER( fdc_drq_w );
diff --git a/src/mess/machine/dgnalpha.c b/src/mess/machine/dgnalpha.c
index f27d6a028c9..8ec09a26daf 100644
--- a/src/mess/machine/dgnalpha.c
+++ b/src/mess/machine/dgnalpha.c
@@ -331,25 +331,6 @@ WRITE8_MEMBER( dragon_alpha_state::psg_porta_write )
}
}
-
-
-//-------------------------------------------------
-// ay8912_interface - AY-8912 for Dragon Alpha, the
-// AY-8912 simply an AY-8910 with only one io port.
-//-------------------------------------------------
-
-const ay8910_interface dragon_alpha_state::ay8912_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DRIVER_MEMBER(dragon_alpha_state, psg_porta_read), /* portA read */
- DEVCB_NULL, /* portB read */
- DEVCB_DRIVER_MEMBER(dragon_alpha_state, psg_porta_write), /* portA write */
- DEVCB_NULL /* portB write */
-};
-
-
-
/***************************************************************************
FDC
***************************************************************************/
diff --git a/src/mess/machine/pc9801_118.c b/src/mess/machine/pc9801_118.c
index 16a992f2512..9dcf6e7d0c6 100644
--- a/src/mess/machine/pc9801_118.c
+++ b/src/mess/machine/pc9801_118.c
@@ -43,21 +43,14 @@ WRITE_LINE_MEMBER(pc9801_118_device::pc9801_sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_118_device,opn_porta_r),
- DEVCB_NULL,//(pc9801_state,opn_portb_r),
- DEVCB_NULL,//(pc9801_state,opn_porta_w),
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_118_device,opn_portb_w),
-};
-
static MACHINE_CONFIG_FRAGMENT( pc9801_118_config )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn3", YM2608, MAIN_CLOCK_X1*4) // actually YMF288, unknown clock / divider
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc9801_118_device, pc9801_sound_irq))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pc9801_118_device, opn_porta_r))
+ //MCFG_AY8910_PORT_B_READ_CB(READ8(pc9801_state, opn_portb_r))
+ //MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(pc9801_state, opn_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(pc9801_118_device, opn_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/pc9801_26.c b/src/mess/machine/pc9801_26.c
index a63f7103358..9b3bb88b158 100644
--- a/src/mess/machine/pc9801_26.c
+++ b/src/mess/machine/pc9801_26.c
@@ -43,21 +43,14 @@ WRITE_LINE_MEMBER(pc9801_26_device::pc9801_sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_porta_r),
- DEVCB_NULL,//(pc9801_state,opn_portb_r),
- DEVCB_NULL,//(pc9801_state,opn_porta_w),
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_portb_w),
-};
-
static MACHINE_CONFIG_FRAGMENT( pc9801_26_config )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opn", YM2203, MAIN_CLOCK_X1*2) // unknown clock / divider
MCFG_YM2203_IRQ_HANDLER(WRITELINE(pc9801_26_device, pc9801_sound_irq))
- MCFG_YM2203_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pc9801_26_device, opn_porta_r))
+ //MCFG_AY8910_PORT_B_READ_CB(READ8(pc9801_state, opn_portb_r))
+ //MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(pc9801_state, opn_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(pc9801_26_device, opn_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/pc9801_86.c b/src/mess/machine/pc9801_86.c
index de8d54ccc79..10380c146fb 100644
--- a/src/mess/machine/pc9801_86.c
+++ b/src/mess/machine/pc9801_86.c
@@ -43,21 +43,14 @@ WRITE_LINE_MEMBER(pc9801_86_device::pc9801_sound_irq)
machine().device<pic8259_device>(":pic8259_slave")->ir4_w(state);
}
-static const ay8910_interface ay8910_config =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_86_device,opn_porta_r),
- DEVCB_NULL,//(pc9801_state,opn_portb_r),
- DEVCB_NULL,//(pc9801_state,opn_porta_w),
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_86_device,opn_portb_w),
-};
-
static MACHINE_CONFIG_FRAGMENT( pc9801_86_config )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("opna", YM2608, MAIN_CLOCK_X1*4) // unknown clock / divider
MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc9801_86_device, pc9801_sound_irq))
- MCFG_YM2608_AY8910_INTF(&ay8910_config)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(pc9801_86_device, opn_porta_r))
+ //MCFG_AY8910_PORT_B_READ_CB(READ8(pc9801_state, opn_portb_r))
+ //MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(pc9801_state, opn_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(pc9801_86_device, opn_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END