summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/astinvad.c
diff options
context:
space:
mode:
author Fabio Priuli <etabeta78@users.noreply.github.com>2014-04-17 05:49:48 +0000
committer Fabio Priuli <etabeta78@users.noreply.github.com>2014-04-17 05:49:48 +0000
commita2bdecb0716607331febcb702563e78c40ba2f62 (patch)
tree82d192231d376fcb7f88512bb7c30629f775d2d8 /src/mame/drivers/astinvad.c
parent7030ff593e2dc3d071b0f1df7d3d9085516cf414 (diff)
converted i8255 to devcb2. nw.
p.s. I tested several games/systems and I triple checked the diff to be sure I did not make any copy and paste mistake in the 195 files touched by this, but let me know if any system suddenly stops working!
Diffstat (limited to 'src/mame/drivers/astinvad.c')
-rw-r--r--src/mame/drivers/astinvad.c42
1 files changed, 9 insertions, 33 deletions
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 0240a488745..0290220a8ca 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -104,37 +104,6 @@ protected:
/*************************************
*
- * Prototypes and interfaces
- *
- *************************************/
-
-
-
-
-
-static I8255A_INTERFACE( ppi8255_0_intf )
-{
- DEVCB_INPUT_PORT("IN0"), /* Port A read */
- DEVCB_NULL, /* Port A write */
- DEVCB_INPUT_PORT("IN1"), /* Port B read */
- DEVCB_NULL, /* Port B write */
- DEVCB_INPUT_PORT("IN2"), /* Port C read */
- DEVCB_NULL /* Port C write */
-};
-
-static I8255A_INTERFACE( ppi8255_1_intf )
-{
- DEVCB_NULL, /* Port A read */
- DEVCB_DRIVER_MEMBER(astinvad_state,astinvad_sound1_w), /* Port A write */
- DEVCB_INPUT_PORT("CABINET"), /* Port B read */
- DEVCB_DRIVER_MEMBER(astinvad_state,astinvad_sound2_w), /* Port B write */
- DEVCB_NULL, /* Port C read */
- DEVCB_NULL /* Port C write */
-};
-
-
-/*************************************
- *
* Spaceint color RAM handling
*
*************************************/
@@ -624,8 +593,15 @@ static MACHINE_CONFIG_START( kamikaze, astinvad_state )
MCFG_MACHINE_START_OVERRIDE(astinvad_state, kamikaze)
MCFG_MACHINE_RESET_OVERRIDE(astinvad_state, kamikaze)
- MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf )
- MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf )
+ MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
+ MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
+ MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
+ MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
+
+ MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
+ MCFG_I8255_OUT_PORTA_CB(WRITE8(astinvad_state, astinvad_sound1_w))
+ MCFG_I8255_IN_PORTB_CB(IOPORT("CABINET"))
+ MCFG_I8255_OUT_PORTB_CB(WRITE8(astinvad_state, astinvad_sound2_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)