summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cchance.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cchance.c')
-rw-r--r--src/mame/drivers/cchance.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/mame/drivers/cchance.c b/src/mame/drivers/cchance.c
index 2f82d208e70..7fa443c2477 100644
--- a/src/mame/drivers/cchance.c
+++ b/src/mame/drivers/cchance.c
@@ -74,8 +74,8 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xf000, 0xf000) AM_READNOP AM_WRITENOP //???
AM_RANGE(0xf001, 0xf001) AM_READ(input_1_r) AM_WRITE(output_0_w)
AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN0") AM_WRITE(output_1_w)
- AM_RANGE(0xf800, 0xf800) AM_WRITE(ay8910_control_port_0_w)
- AM_RANGE(0xf801, 0xf801) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w)
+ AM_RANGE(0xf800, 0xf801) AM_DEVWRITE(SOUND, "ay", ay8910_address_data_w)
+ AM_RANGE(0xf801, 0xf801) AM_DEVREAD(SOUND, "ay", ay8910_r)
ADDRESS_MAP_END
@@ -169,24 +169,14 @@ static GFXDECODE_START( cchance )
GFXDECODE_ENTRY( "gfx1", 0, cchance_layout, 0x0, 32 )
GFXDECODE_END
-static READ8_HANDLER( dsw1_r )
-{
- return input_port_read(space->machine, "DSW1");
-}
-
-static READ8_HANDLER( dsw2_r )
-{
- return input_port_read(space->machine, "DSW2");
-}
-
static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
- dsw1_r,
- dsw2_r,
- NULL,
- NULL
+ DEVCB_INPUT_PORT("DSW1"),
+ DEVCB_INPUT_PORT("DSW2"),
+ DEVCB_NULL,
+ DEVCB_NULL
};
static MACHINE_DRIVER_START( cchance )