summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/caswin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/caswin.c')
-rw-r--r--src/mame/drivers/caswin.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c
index f2da6ecf7a2..5e7ca6510e4 100644
--- a/src/mame/drivers/caswin.c
+++ b/src/mame/drivers/caswin.c
@@ -68,16 +68,6 @@ static WRITE8_HANDLER( vregs_w )
*
**********************/
-static READ8_HANDLER( input_buttons_r )
-{
- return input_port_read(space->machine,"DSW1");
-}
-
-static READ8_HANDLER( input_coins_r )
-{
- return input_port_read(space->machine,"DSW2");
-}
-
static READ8_HANDLER( vvillage_rng_r )
{
return mame_rand(space->machine);
@@ -112,9 +102,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x01,0x01) AM_READ(ay8910_read_port_0_r)
- AM_RANGE(0x02,0x02) AM_WRITE(ay8910_write_port_0_w)
- AM_RANGE(0x03,0x03) AM_WRITE(ay8910_control_port_0_w)
+ AM_RANGE(0x01,0x01) AM_DEVREAD(SOUND, "ay", ay8910_r)
+ AM_RANGE(0x02,0x03) AM_DEVWRITE(SOUND, "ay", ay8910_data_address_w)
AM_RANGE(0x10,0x10) AM_READ_PORT("IN0")
AM_RANGE(0x11,0x11) AM_READ_PORT("IN1")
AM_RANGE(0x10,0x10) AM_WRITE(scroll_w)
@@ -211,10 +200,10 @@ static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
- input_buttons_r,
- input_coins_r,
- NULL,
- NULL
+ DEVCB_INPUT_PORT("DSW1"),
+ DEVCB_INPUT_PORT("DSW2"),
+ DEVCB_NULL,
+ DEVCB_NULL
};
static PALETTE_INIT( caswin )