diff options
Diffstat (limited to 'src/mame/drivers/tehkanwc.c')
-rw-r--r-- | src/mame/drivers/tehkanwc.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index 5493a6b0f3f..8ad2ab2d841 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -181,29 +181,29 @@ static WRITE8_HANDLER( sound_answer_w ) static int msm_data_offs; -static READ8_HANDLER( tehkanwc_portA_r ) +static READ8_DEVICE_HANDLER( tehkanwc_portA_r ) { return msm_data_offs & 0xff; } -static READ8_HANDLER( tehkanwc_portB_r ) +static READ8_DEVICE_HANDLER( tehkanwc_portB_r ) { return (msm_data_offs >> 8) & 0xff; } -static WRITE8_HANDLER( tehkanwc_portA_w ) +static WRITE8_DEVICE_HANDLER( tehkanwc_portA_w ) { msm_data_offs = (msm_data_offs & 0xff00) | data; } -static WRITE8_HANDLER( tehkanwc_portB_w ) +static WRITE8_DEVICE_HANDLER( tehkanwc_portB_w ) { msm_data_offs = (msm_data_offs & 0x00ff) | (data << 8); } -static WRITE8_HANDLER( msm_reset_w ) +static WRITE8_DEVICE_HANDLER( msm_reset_w ) { - msm5205_reset_w(0,data ? 0 : 1); + msm5205_reset_w(device,data ? 0 : 1); } static void tehkanwc_adpcm_int(const device_config *device) @@ -214,10 +214,10 @@ static void tehkanwc_adpcm_int(const device_config *device) int msm_data = SAMPLES[msm_data_offs & 0x7fff]; if (toggle == 0) - msm5205_data_w(0,(msm_data >> 4) & 0x0f); + msm5205_data_w(device,(msm_data >> 4) & 0x0f); else { - msm5205_data_w(0,msm_data & 0x0f); + msm5205_data_w(device,msm_data & 0x0f); msm_data_offs++; } @@ -272,7 +272,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_mem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x8001, 0x8001) AM_WRITE(msm_reset_w)/* MSM51xx reset */ + AM_RANGE(0x8001, 0x8001) AM_DEVWRITE(SOUND, "msm", msm_reset_w)/* MSM51xx reset */ AM_RANGE(0x8002, 0x8002) AM_WRITE(SMH_NOP) /* ?? written in the IRQ handler */ AM_RANGE(0x8003, 0x8003) AM_WRITE(SMH_NOP) /* ?? written in the NMI handler */ AM_RANGE(0xc000, 0xc000) AM_READWRITE(soundlatch_r, sound_answer_w) @@ -280,10 +280,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) - AM_RANGE(0x01, 0x01) AM_WRITE(ay8910_control_port_0_w) - AM_RANGE(0x02, 0x02) AM_READWRITE(ay8910_read_port_1_r, ay8910_write_port_1_w) - AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_control_port_1_w) + AM_RANGE(0x00, 0x00) AM_DEVREAD(SOUND, "ay1", ay8910_r) + AM_RANGE(0x00, 0x01) AM_DEVWRITE(SOUND, "ay1", ay8910_data_address_w) + AM_RANGE(0x02, 0x02) AM_DEVREAD(SOUND, "ay2", ay8910_r) + AM_RANGE(0x02, 0x03) AM_DEVWRITE(SOUND, "ay2", ay8910_data_address_w) ADDRESS_MAP_END @@ -633,20 +633,20 @@ static const ay8910_interface ay8910_interface_1 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - NULL, - NULL, - tehkanwc_portA_w, - tehkanwc_portB_w + DEVCB_NULL, + DEVCB_NULL, + DEVCB_HANDLER(tehkanwc_portA_w), + DEVCB_HANDLER(tehkanwc_portB_w) }; static const ay8910_interface ay8910_interface_2 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - tehkanwc_portA_r, - tehkanwc_portB_r, - NULL, - NULL + DEVCB_HANDLER(tehkanwc_portA_r), + DEVCB_HANDLER(tehkanwc_portB_r), + DEVCB_NULL, + DEVCB_NULL }; static const msm5205_interface msm5205_config = |