summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
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 /src/mess/machine
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.
Diffstat (limited to 'src/mess/machine')
-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
4 files changed, 12 insertions, 52 deletions
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