diff options
author | 2013-03-29 13:23:17 +0000 | |
---|---|---|
committer | 2013-03-29 13:23:17 +0000 | |
commit | 624dfff24e0e6257dd7101f131656b6dd0be9421 (patch) | |
tree | 902c8f6ffce0d0eee8aee13ed15ed33c034689b6 | |
parent | 46587ba9139754e935df659b5e86f24b52f480ab (diff) |
made some of sound devices use device callbacks instead of function callbacks part 3 (nw)
73 files changed, 156 insertions, 154 deletions
diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c index 85aa61ff04e..63e216cca89 100644 --- a/src/emu/sound/msm5205.c +++ b/src/emu/sound/msm5205.c @@ -54,7 +54,7 @@ struct msm5205_state { - const msm5205_interface *intf; + const msm5205_interface *intf; device_t *device; sound_stream * stream; /* number of stream system */ INT32 clock; /* clock rate */ @@ -67,6 +67,7 @@ struct msm5205_state INT32 signal; /* current ADPCM signal */ INT32 step; /* current ADPCM step */ int diff_lookup[49*16]; + devcb_resolved_write_line vclk_callback; }; INLINE msm5205_state *get_safe_token(device_t *device) @@ -149,7 +150,7 @@ static TIMER_CALLBACK( MSM5205_vclk_callback ) int new_signal; /* callback user handler and latch next data */ - if(voice->intf->vclk_callback) (*voice->intf->vclk_callback)(voice->device); + if(!voice->vclk_callback.isnull()) voice->vclk_callback(1); /* reset check at last hiedge of VCLK */ if(voice->reset) @@ -209,6 +210,7 @@ static DEVICE_START( msm5205 ) voice->intf = (const msm5205_interface *)device->static_config(); voice->device = device; voice->clock = device->clock(); + voice->vclk_callback.resolve(voice->intf->vclk_callback,*device); /* compute the difference tables */ ComputeTables (voice); diff --git a/src/emu/sound/msm5205.h b/src/emu/sound/msm5205.h index 94c90d8faa0..98e5b045a0f 100644 --- a/src/emu/sound/msm5205.h +++ b/src/emu/sound/msm5205.h @@ -26,7 +26,7 @@ struct msm5205_interface { - void (*vclk_callback)(device_t *); /* VCLK callback */ + devcb_write_line vclk_callback; /* VCLK callback */ int select; /* prescaler / bit width selector */ }; diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index 806a36e8e03..f39555a2492 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -110,7 +110,7 @@ static ADDRESS_MAP_START( hyprolyb_adpcm_map, AS_PROGRAM, 8, driver_device ) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END -static void adpcm_vck_callback( device_t *device ) +static void adpcm_vck_callback( device_t *device, int st ) { device_t *adpcm = device->machine().device("hyprolyb_adpcm"); hyprolyb_adpcm_state *state = get_safe_token(adpcm); @@ -120,7 +120,7 @@ static void adpcm_vck_callback( device_t *device ) static const msm5205_interface hyprolyb_msm5205_config = { - adpcm_vck_callback, /* VCK function */ + DEVCB_LINE(adpcm_vck_callback), /* VCK function */ MSM5205_S96_4B /* 4 kHz */ }; diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index 740a3dab482..794f85d5572 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -218,7 +218,7 @@ static WRITE8_DEVICE_HANDLER( m62_adpcm_w ) * *************************************/ -static void adpcm_int(device_t *device) +static void adpcm_int(device_t *device,int st) { device_t *adpcm2 = device->machine().device("msm2"); @@ -268,13 +268,13 @@ static const ay8910_interface irem_ay8910_interface_2 = static const msm5205_interface irem_msm5205_interface_1 = { - adpcm_int, /* interrupt function */ + DEVCB_LINE(adpcm_int), /* interrupt function */ MSM5205_S96_4B /* default to 4KHz, but can be changed at run time */ }; static const msm5205_interface irem_msm5205_interface_2 = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* default to 4KHz, but can be changed at run time, slave */ }; diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index 6835a19d91b..cfdf2318328 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -169,7 +169,7 @@ Language #include "sound/sn76496.h" -static void appoooh_adpcm_int(device_t *device) +static void appoooh_adpcm_int(device_t *device, int st) { appoooh_state *state = device->machine().driver_data<appoooh_state>(); @@ -387,7 +387,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - appoooh_adpcm_int,/* interrupt function */ + DEVCB_LINE(appoooh_adpcm_int),/* interrupt function */ MSM5205_S64_4B /* 6KHz */ }; diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index a3f802500ae..57f641b9844 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -304,7 +304,7 @@ static const ym2203_interface ym2203_config = DEVCB_LINE(ym2203_irq_handler) }; -static void ashnojoe_vclk_cb( device_t *device ) +static void ashnojoe_vclk_cb( device_t *device, int st ) { ashnojoe_state *state = device->machine().driver_data<ashnojoe_state>(); if (state->m_msm5205_vclk_toggle == 0) @@ -322,7 +322,7 @@ static void ashnojoe_vclk_cb( device_t *device ) static const msm5205_interface msm5205_config = { - ashnojoe_vclk_cb, + DEVCB_LINE(ashnojoe_vclk_cb), MSM5205_S48_4B }; diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index 262667eb8db..62212a8c496 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -258,7 +258,7 @@ WRITE8_MEMBER(asuka_state::sound_bankswitch_2151_w) -static void asuka_msm5205_vck( device_t *device ) +static void asuka_msm5205_vck( device_t *device, int st ) { asuka_state *state = device->machine().driver_data<asuka_state>(); @@ -779,7 +779,7 @@ static const ym2610_interface ym2610_config = static const msm5205_interface msm5205_config = { - asuka_msm5205_vck, /* VCK function */ + DEVCB_LINE(asuka_msm5205_vck), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c index dc59b37fbe6..424e599f0c1 100644 --- a/src/mame/drivers/battlera.c +++ b/src/mame/drivers/battlera.c @@ -83,7 +83,7 @@ ADDRESS_MAP_END /******************************************************************************/ -static void battlera_adpcm_int(device_t *device) +static void battlera_adpcm_int(device_t *device, int st) { battlera_state *state = device->machine().driver_data<battlera_state>(); @@ -217,7 +217,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - battlera_adpcm_int,/* interrupt function */ + DEVCB_LINE(battlera_adpcm_int),/* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index f4f32892823..d2372678a5e 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -463,13 +463,13 @@ GFXDECODE_END static const msm5205_interface msm5205_interface_1 = { - 0, + DEVCB_NULL, MSM5205_SEX_4B }; static const msm5205_interface msm5205_interface_2 = { - 0, + DEVCB_NULL, MSM5205_SEX_4B }; diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index 9e53d5ddde4..02ac2eb1717 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -311,7 +311,7 @@ READ8_MEMBER(chinagat_state::saiyugoub1_m5205_irq_r ) return 0; } -static void saiyugoub1_m5205_irq_w( device_t *device ) +static void saiyugoub1_m5205_irq_w( device_t *device, int st ) { chinagat_state *state = device->machine().driver_data<chinagat_state>(); state->m_adpcm_sound_irq = 1; @@ -513,7 +513,7 @@ static void chinagat_irq_handler(device_t *device, int irq ) /* This on the bootleg board, instead of the m6295 */ static const msm5205_interface msm5205_config = { - saiyugoub1_m5205_irq_w, /* Interrupt function */ + DEVCB_LINE(saiyugoub1_m5205_irq_w), /* Interrupt function */ MSM5205_S64_4B /* vclk input mode (6030Hz, 4-bit) */ }; diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index 5a98023919d..229aeac2233 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -535,7 +535,7 @@ GFXDECODE_END * *************************************/ -static void chin_adpcm_int( device_t *device ) +static void chin_adpcm_int( device_t *device, int st ) { chinsan_state *state = device->machine().driver_data<chinsan_state>(); @@ -563,7 +563,7 @@ static void chin_adpcm_int( device_t *device ) static const msm5205_interface msm5205_config = { - chin_adpcm_int, /* interrupt function */ + DEVCB_LINE(chin_adpcm_int), /* interrupt function */ MSM5205_S64_4B /* 8kHz */ }; diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c index 99b9ebc5bab..f64ba08fac4 100644 --- a/src/mame/drivers/combatsc.c +++ b/src/mame/drivers/combatsc.c @@ -770,7 +770,7 @@ MACHINE_CONFIG_END static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* 8KHz playback ? */ }; diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c index af531d065ad..b223206715e 100644 --- a/src/mame/drivers/crgolf.c +++ b/src/mame/drivers/crgolf.c @@ -198,7 +198,7 @@ READ8_MEMBER(crgolf_state::sound_to_main_r) * *************************************/ -static void vck_callback( device_t *device ) +static void vck_callback( device_t *device, int st ) { crgolf_state *state = device->machine().driver_data<crgolf_state>(); @@ -378,7 +378,7 @@ INPUT_PORTS_END static const msm5205_interface msm5205_intf = { - vck_callback, + DEVCB_LINE(vck_callback), MSM5205_S64_4B }; diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index da70aed8829..2dc31dded95 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -557,7 +557,7 @@ INTERRUPT_GEN_MEMBER(dacholer_state::sound_irq) } } -static void adpcm_int( device_t *device ) +static void adpcm_int( device_t *device, int st ) { dacholer_state *state = device->machine().driver_data<dacholer_state>(); if (state->m_snd_interrupt_enable == 1 || (state->m_snd_interrupt_enable == 0 && state->m_msm_toggle == 1)) @@ -574,7 +574,7 @@ static void adpcm_int( device_t *device ) static const msm5205_interface msm_interface = { - adpcm_int, /* interrupt function */ + DEVCB_LINE(adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 1 / 96 = 3906.25Hz playback - guess */ }; diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c index 7a112ffb4d4..656f5be29d3 100644 --- a/src/mame/drivers/darius.c +++ b/src/mame/drivers/darius.c @@ -484,7 +484,7 @@ static ADDRESS_MAP_START( darius_sound2_map, AS_PROGRAM, 8, darius_state ) ADDRESS_MAP_END -static void darius_adpcm_int( device_t *device ) +static void darius_adpcm_int( device_t *device, int st ) { darius_state *state = device->machine().driver_data<darius_state>(); @@ -494,7 +494,7 @@ static void darius_adpcm_int( device_t *device ) static const msm5205_interface msm5205_config = { - darius_adpcm_int, /* interrupt function */ + DEVCB_LINE(darius_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index f849adf39f1..5e68d7bf5de 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -439,7 +439,7 @@ WRITE8_MEMBER(ddragon_state::dd_adpcm_w) } -static void dd_adpcm_int( device_t *device ) +static void dd_adpcm_int( device_t *device, int st ) { ddragon_state *state = device->machine().driver_data<ddragon_state>(); int chip = (device == state->m_adpcm_1) ? 0 : 1; @@ -937,7 +937,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - dd_adpcm_int, /* interrupt function */ + DEVCB_LINE(dd_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8kHz */ }; diff --git a/src/mame/drivers/de_2.c b/src/mame/drivers/de_2.c index 692eccc41ac..196f4587451 100644 --- a/src/mame/drivers/de_2.c +++ b/src/mame/drivers/de_2.c @@ -263,7 +263,7 @@ WRITE_LINE_MEMBER(de_2_state::ym2151_irq_w) } //WRITE_LINE_MEMBER(de_2_state::msm5205_irq_w) -static void msm5205_irq_w(device_t* device) +static void msm5205_irq_w(device_t* device,int st) { de_2_state* state = device->machine().driver_data<de_2_state>(); msm5205_data_w(state->m_msm5205,state->m_sample_data >> 4); @@ -547,7 +547,7 @@ WRITE8_MEMBER( de_2_state::sample_bank_w ) static const msm5205_interface msm5205_intf = { - msm5205_irq_w, + DEVCB_LINE(msm5205_irq_w), MSM5205_S96_4B }; diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 5592021ffad..ecb4fabc6e8 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -1384,7 +1384,7 @@ MACHINE_CONFIG_END #define DEC0_VBSTART 256-8 -static void automat_vclk_cb(device_t *device) +static void automat_vclk_cb(device_t *device,int st) { dec0_automat_state *state = device->machine().driver_data<dec0_automat_state>(); if (state->m_automat_msm5205_vclk_toggle == 0) @@ -1402,7 +1402,7 @@ static void automat_vclk_cb(device_t *device) static const msm5205_interface msm5205_config = { - automat_vclk_cb, + DEVCB_LINE(automat_vclk_cb), MSM5205_S48_4B }; diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c index db9ab1cd3a4..4e25fd235a6 100644 --- a/src/mame/drivers/dec8.c +++ b/src/mame/drivers/dec8.c @@ -478,7 +478,7 @@ WRITE8_MEMBER(dec8_state::dec8_sound_w) m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static void csilver_adpcm_int( device_t *device ) +static void csilver_adpcm_int( device_t *device ,int st) { dec8_state *state = device->machine().driver_data<dec8_state>(); state->m_toggle ^= 1; @@ -1923,7 +1923,7 @@ static const ym3812_interface ym3812_config = static const msm5205_interface msm5205_config = { - csilver_adpcm_int, /* interrupt function */ + DEVCB_LINE(csilver_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 5ab0f9f6bab..6039cf1faed 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -469,7 +469,7 @@ void discoboy_state::machine_reset() m_toggle = 0; } -static void yunsung8_adpcm_int( device_t *device ) +static void yunsung8_adpcm_int( device_t *device,int st ) { discoboy_state *state = device->machine().driver_data<discoboy_state>(); @@ -481,7 +481,7 @@ static void yunsung8_adpcm_int( device_t *device ) static const msm5205_interface yunsung8_msm5205_interface = { - yunsung8_adpcm_int, /* interrupt function */ + DEVCB_LINE(yunsung8_adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 4KHz, 4 Bits */ }; diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index 1fc057cbb84..0cf7267ef1e 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -160,7 +160,7 @@ Dip locations verified with manual for docastle, dorunrun and dowild. /* Read/Write Handlers */ -static void idsoccer_adpcm_int( device_t *device ) +static void idsoccer_adpcm_int( device_t *device,int st ) { docastle_state *state = device->machine().driver_data<docastle_state>(); @@ -552,7 +552,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - idsoccer_adpcm_int, // interrupt function + DEVCB_LINE(idsoccer_adpcm_int), // interrupt function MSM5205_S64_4B // 6 kHz ??? }; diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c index 9b49ed34823..df45335d31a 100644 --- a/src/mame/drivers/drmicro.c +++ b/src/mame/drivers/drmicro.c @@ -39,7 +39,7 @@ WRITE8_MEMBER(drmicro_state::nmi_enable_w) } -static void pcm_w(device_t *device) +static void pcm_w(device_t *device,int st) { drmicro_state *state = device->machine().driver_data<drmicro_state>(); UINT8 *PCM = state->memregion("adpcm")->base(); @@ -63,7 +63,7 @@ static void pcm_w(device_t *device) WRITE8_MEMBER(drmicro_state::pcm_set_w) { m_pcm_adr = ((data & 0x3f) << 9); - pcm_w(m_msm); + pcm_w(m_msm,1); } /************************************* @@ -214,7 +214,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - pcm_w, /* IRQ handler */ + DEVCB_LINE(pcm_w), /* IRQ handler */ MSM5205_S64_4B /* 6 KHz */ }; diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index 0c1b71228ee..4127fa63efd 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -392,7 +392,7 @@ WRITE8_MEMBER(dynax_state::nanajign_palette_w) } -static void adpcm_int( device_t *device ) +static void adpcm_int( device_t *device,int st ) { dynax_state *state = device->machine().driver_data<dynax_state>(); msm5205_data_w(device, state->m_msm5205next >> 4); @@ -407,7 +407,7 @@ static void adpcm_int( device_t *device ) } } -static void adpcm_int_cpu1( device_t *device ) +static void adpcm_int_cpu1( device_t *device,int st ) { dynax_state *state = device->machine().driver_data<dynax_state>(); msm5205_data_w(device, state->m_msm5205next >> 4); @@ -4361,7 +4361,7 @@ static const ym2203_interface hanamai_ym2203_interface = static const msm5205_interface hanamai_msm5205_interface = { - adpcm_int, /* IRQ handler */ + DEVCB_LINE(adpcm_int), /* IRQ handler */ MSM5205_S48_4B /* 8 KHz, 4 Bits */ }; @@ -4700,7 +4700,7 @@ static const ym2203_interface jantouki_ym2203_interface = static const msm5205_interface jantouki_msm5205_interface = { - adpcm_int_cpu1, /* IRQ handler */ + DEVCB_LINE(adpcm_int_cpu1), /* IRQ handler */ MSM5205_S48_4B /* 8 KHz, 4 Bits */ }; diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index 1e32332f2ad..8e068b98a53 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -392,10 +392,10 @@ static void borntofi_adpcm_int( device_t *device, int voice ) } } -static void borntofi_adpcm_int_0(device_t *device) { borntofi_adpcm_int(device, 0); } -static void borntofi_adpcm_int_1(device_t *device) { borntofi_adpcm_int(device, 1); } -static void borntofi_adpcm_int_2(device_t *device) { borntofi_adpcm_int(device, 2); } -static void borntofi_adpcm_int_3(device_t *device) { borntofi_adpcm_int(device, 3); } +static void borntofi_adpcm_int_0(device_t *device,int state) { borntofi_adpcm_int(device, 0); } +static void borntofi_adpcm_int_1(device_t *device,int state) { borntofi_adpcm_int(device, 1); } +static void borntofi_adpcm_int_2(device_t *device,int state) { borntofi_adpcm_int(device, 2); } +static void borntofi_adpcm_int_3(device_t *device,int state) { borntofi_adpcm_int(device, 3); } static ADDRESS_MAP_START( borntofi_sound_map, AS_PROGRAM, 8, fantland_state ) @@ -925,22 +925,22 @@ MACHINE_CONFIG_END // OKI M5205 running at 384kHz [18.432/48]. Sample rate = 384000 / 48 static const msm5205_interface msm5205_config_0 = { - borntofi_adpcm_int_0, /* IRQ handler */ + DEVCB_LINE(borntofi_adpcm_int_0), /* IRQ handler */ MSM5205_S48_4B /* 8 kHz, 4 Bits */ }; static const msm5205_interface msm5205_config_1 = { - borntofi_adpcm_int_1, /* IRQ handler */ + DEVCB_LINE(borntofi_adpcm_int_1), /* IRQ handler */ MSM5205_S48_4B /* 8 kHz, 4 Bits */ }; static const msm5205_interface msm5205_config_2 = { - borntofi_adpcm_int_2, /* IRQ handler */ + DEVCB_LINE(borntofi_adpcm_int_2), /* IRQ handler */ MSM5205_S48_4B /* 8 kHz, 4 Bits */ }; static const msm5205_interface msm5205_config_3 = { - borntofi_adpcm_int_3, /* IRQ handler */ + DEVCB_LINE(borntofi_adpcm_int_3), /* IRQ handler */ MSM5205_S48_4B /* 8 kHz, 4 Bits */ }; diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 5acd74b34d0..8d52fee4e25 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -117,7 +117,7 @@ WRITE8_MEMBER( cps_state::knightsb_snd_bankswitch_w ) membank("bank1")->set_entry(data & 0x0f); } -static void m5205_int1( device_t *device ) +static void m5205_int1( device_t *device,int st ) { cps_state *state = device->machine().driver_data<cps_state>(); @@ -128,7 +128,7 @@ static void m5205_int1( device_t *device ) state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static void m5205_int2( device_t *device ) +static void m5205_int2( device_t *device,int st ) { cps_state *state = device->machine().driver_data<cps_state>(); @@ -1141,13 +1141,13 @@ INPUT_PORTS_END static const msm5205_interface msm5205_interface1 = { - m5205_int1, /* interrupt function */ + DEVCB_LINE(m5205_int1), /* interrupt function */ MSM5205_S96_4B /* 4KHz 4-bit */ }; static const msm5205_interface msm5205_interface2 = { - m5205_int2, /* interrupt function */ + DEVCB_LINE(m5205_int2), /* interrupt function */ MSM5205_S96_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 12a1d9d5f79..59d2fa8e189 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -318,7 +318,7 @@ WRITE8_MEMBER(firetrap_state::firetrap_sound_bankselect_w) membank("bank2")->set_entry(data & 0x01); } -static void firetrap_adpcm_int( device_t *device ) +static void firetrap_adpcm_int( device_t *device,int st ) { firetrap_state *state = device->machine().driver_data<firetrap_state>(); @@ -576,7 +576,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - firetrap_adpcm_int, /* interrupt function */ + DEVCB_LINE(firetrap_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 7.8125kHz */ }; diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c index 416acf6fcb7..9cfab25f2f6 100644 --- a/src/mame/drivers/fromance.c +++ b/src/mame/drivers/fromance.c @@ -137,7 +137,7 @@ WRITE8_MEMBER(fromance_state::fromance_adpcm_w) } -static void fromance_adpcm_int( device_t *device ) +static void fromance_adpcm_int( device_t *device, int st ) { fromance_state *state = device->machine().driver_data<fromance_state>(); @@ -937,7 +937,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - fromance_adpcm_int, /* IRQ handler */ + DEVCB_LINE(fromance_adpcm_int), /* IRQ handler */ MSM5205_S48_4B /* 8 KHz */ }; diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c index 239b6f131f9..adc1abe3e0d 100644 --- a/src/mame/drivers/gcpinbal.c +++ b/src/mame/drivers/gcpinbal.c @@ -202,7 +202,7 @@ WRITE16_MEMBER(gcpinbal_state::ioc_w) /* Controlled through ioc? */ -static void gcp_adpcm_int( device_t *device ) +static void gcp_adpcm_int( device_t *device,int st ) { gcpinbal_state *state = device->machine().driver_data<gcpinbal_state>(); @@ -384,7 +384,7 @@ GFXDECODE_END static const msm5205_interface msm6585_config = { - gcp_adpcm_int, /* VCK function */ + DEVCB_LINE(gcp_adpcm_int), /* VCK function */ MSM6585_S40 /* 16 kHz */ }; diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index 8e096cc78b4..e77eccc9ac2 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -654,7 +654,7 @@ static const ym2203_interface gladiatr_ym2203_interface = static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* vclk input mode */ }; diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c index 1f4217d5eed..be51fc8219a 100644 --- a/src/mame/drivers/goal92.c +++ b/src/mame/drivers/goal92.c @@ -226,7 +226,7 @@ static const ym2203_interface ym2203_config = DEVCB_LINE(irqhandler) }; -static void goal92_adpcm_int( device_t *device ) +static void goal92_adpcm_int( device_t *device,int st ) { goal92_state *state = device->machine().driver_data<goal92_state>(); msm5205_data_w(device, state->m_msm5205next); @@ -239,7 +239,7 @@ static void goal92_adpcm_int( device_t *device ) static const msm5205_interface msm5205_config = { - goal92_adpcm_int, /* interrupt function */ + DEVCB_LINE(goal92_adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c index f45e00d7091..1278af32e3c 100644 --- a/src/mame/drivers/gsword.c +++ b/src/mame/drivers/gsword.c @@ -649,7 +649,7 @@ static const ay8910_interface ay8910_config = static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* vclk input mode */ }; diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c index 962ddb6595f..9985df1f7d6 100644 --- a/src/mame/drivers/hnayayoi.c +++ b/src/mame/drivers/hnayayoi.c @@ -524,7 +524,7 @@ static const ym2203_interface ym2203_config = static const msm5205_interface msm5205_config = { - 0, /* IRQ handler */ + DEVCB_NULL, /* IRQ handler */ MSM5205_SEX_4B }; diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 7eb905732e0..3dc0875ef3a 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -346,7 +346,7 @@ WRITE8_MEMBER(jangou_state::adpcm_w) m_adpcm_byte = data; } -static void jngolady_vclk_cb( device_t *device ) +static void jngolady_vclk_cb( device_t *device,int st ) { jangou_state *state = device->machine().driver_data<jangou_state>(); @@ -895,7 +895,7 @@ static const ay8910_interface ay8910_config = static const msm5205_interface msm5205_config = { - jngolady_vclk_cb, + DEVCB_LINE(jngolady_vclk_cb), MSM5205_S96_4B }; diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index de3913a070a..7e470128674 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -290,7 +290,7 @@ WRITE8_MEMBER(jantotsu_state::jan_adpcm_w) } } -static void jan_adpcm_int( device_t *device ) +static void jan_adpcm_int( device_t *device ,int st) { jantotsu_state *state = device->machine().driver_data<jantotsu_state>(); @@ -465,7 +465,7 @@ INPUT_PORTS_END static const msm5205_interface msm5205_config = { - jan_adpcm_int, /* interrupt function */ + DEVCB_LINE(jan_adpcm_int), /* interrupt function */ MSM5205_S64_4B /* 6 KHz */ }; diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c index 64f556caef5..d6f5b4cd687 100644 --- a/src/mame/drivers/kchamp.c +++ b/src/mame/drivers/kchamp.c @@ -345,7 +345,7 @@ INTERRUPT_GEN_MEMBER(kchamp_state::kc_interrupt) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -static void msmint( device_t *device ) +static void msmint( device_t *device,int st ) { kchamp_state *state = device->machine().driver_data<kchamp_state>(); @@ -365,7 +365,7 @@ static void msmint( device_t *device ) static const msm5205_interface msm_interface = { - msmint, /* interrupt function */ + DEVCB_LINE(msmint), /* interrupt function */ MSM5205_S96_4B /* 1 / 96 = 3906.25Hz playback */ }; diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c index dd50fca56dc..7a781d89288 100644 --- a/src/mame/drivers/kungfur.c +++ b/src/mame/drivers/kungfur.c @@ -188,7 +188,7 @@ WRITE8_MEMBER(kungfur_state::kungfur_adpcm2_w) } // adpcm callbacks -static void kfr_adpcm1_int(device_t *device) +static void kfr_adpcm1_int(device_t *device, int st) { kungfur_state *state = device->machine().driver_data<kungfur_state>(); UINT8 *ROM = state->memregion("adpcm1")->base(); @@ -199,7 +199,7 @@ static void kfr_adpcm1_int(device_t *device) state->m_adpcm_sel[0] ^= 1; } -static void kfr_adpcm2_int(device_t *device) +static void kfr_adpcm2_int(device_t *device,int st) { kungfur_state *state = device->machine().driver_data<kungfur_state>(); UINT8 *ROM = state->memregion("adpcm2")->base(); @@ -284,13 +284,13 @@ static I8255A_INTERFACE( ppi8255_1_intf ) static const msm5205_interface msm5205_config_1 = { - kfr_adpcm1_int, + DEVCB_LINE(kfr_adpcm1_int), MSM5205_S48_4B }; static const msm5205_interface msm5205_config_2 = { - kfr_adpcm2_int, + DEVCB_LINE(kfr_adpcm2_int), MSM5205_S48_4B }; diff --git a/src/mame/drivers/kurukuru.c b/src/mame/drivers/kurukuru.c index a4504e6e8c9..9f83010401d 100644 --- a/src/mame/drivers/kurukuru.c +++ b/src/mame/drivers/kurukuru.c @@ -283,7 +283,7 @@ void kurukuru_state::update_sound_irq(UINT8 cause) } -static void kurukuru_msm5205_vck(device_t *device) +static void kurukuru_msm5205_vck(device_t *device,int st) { kurukuru_state *state = device->machine().driver_data<kurukuru_state>(); state->update_sound_irq(state->m_sound_irq_cause | 2); @@ -548,7 +548,7 @@ static const ay8910_interface ym2149_intf = static const msm5205_interface msm5205_config = { - kurukuru_msm5205_vck, + DEVCB_LINE(kurukuru_msm5205_vck), MSM5205_S48_4B /* changed on the fly */ }; diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index 00e33b2a864..c9bf8e69fcd 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -1402,7 +1402,7 @@ static SOUND_START( lucky74 ) state->m_adpcm_busy_line = 0x01; /* free and ready */ } -static void lucky74_adpcm_int(device_t *device) +static void lucky74_adpcm_int(device_t *device,int st) { lucky74_state *state = device->machine().driver_data<lucky74_state>(); if (state->m_adpcm_reg[05] == 0x01) /* register 0x05 (bit 0 activated), trigger the sample */ @@ -1515,7 +1515,7 @@ static const ay8910_interface ay8910_config = static const msm5205_interface msm5205_config = { - lucky74_adpcm_int, /* interrupt function */ + DEVCB_LINE(lucky74_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/lwings.c b/src/mame/drivers/lwings.c index 74eb9ccac0a..b7f5aea0765 100644 --- a/src/mame/drivers/lwings.c +++ b/src/mame/drivers/lwings.c @@ -729,7 +729,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* slave mode */ }; diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 56193728eb3..bbb8aa713ed 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -667,7 +667,7 @@ WRITE8_MEMBER(mastboy_state::mastboy_msm5205_data_w) m_m5205_next = data; } -static void mastboy_adpcm_int(device_t *device) +static void mastboy_adpcm_int(device_t *device,int st) { mastboy_state *state = device->machine().driver_data<mastboy_state>(); msm5205_data_w(device, state->m_m5205_next); @@ -681,7 +681,7 @@ static void mastboy_adpcm_int(device_t *device) static const msm5205_interface msm5205_config = { - mastboy_adpcm_int, /* interrupt function */ + DEVCB_LINE(mastboy_adpcm_int), /* interrupt function */ MSM5205_SEX_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index ea99816792e..bb047dfe928 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -397,7 +397,7 @@ void mermaid_state::machine_reset() } /* Similar to Jantotsu, apparently the HW has three ports that controls what kind of sample should be played. Every sample size is 0x1000. */ -static void rougien_adpcm_int( device_t *device ) +static void rougien_adpcm_int( device_t *device ,int st) { mermaid_state *state = device->machine().driver_data<mermaid_state>(); @@ -428,7 +428,7 @@ static void rougien_adpcm_int( device_t *device ) static const msm5205_interface msm5205_config = { - rougien_adpcm_int, /* interrupt function */ + DEVCB_LINE(rougien_adpcm_int), /* interrupt function */ MSM5205_S96_4B }; diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index 70ff8542231..159c6fba516 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -1182,7 +1182,7 @@ GFXDECODE_END -static void spangbl_adpcm_int( device_t *device ) +static void spangbl_adpcm_int( device_t *device,int st ) { mitchell_state *state = device->machine().driver_data<mitchell_state>(); msm5205_data_w(device, state->m_sample_buffer & 0x0f); @@ -1195,7 +1195,7 @@ static void spangbl_adpcm_int( device_t *device ) static const msm5205_interface msm5205_config = { - spangbl_adpcm_int, /* interrupt function */ + DEVCB_LINE(spangbl_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index 289883705cb..9307b8f5605 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -280,7 +280,7 @@ WRITE8_MEMBER(mlanding_state::sound_bankswitch_w) membank("bank1")->set_base(memregion("audiocpu")->base() + ((data) & 0x03) * 0x4000 + 0x10000 ); } -static void ml_msm5205_vck(device_t *device) +static void ml_msm5205_vck(device_t *device,int st) { mlanding_state *state = device->machine().driver_data<mlanding_state>(); @@ -732,7 +732,7 @@ INPUT_PORTS_END static const msm5205_interface msm5205_config = { - ml_msm5205_vck, /* VCK function */ + DEVCB_LINE(ml_msm5205_vck), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c index a09de847a53..2c6e5879f1f 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -70,7 +70,7 @@ WRITE8_MEMBER(ojankohs_state::ojankohs_msm5205_w) m_vclk_left = 2; } -static void ojankohs_adpcm_int( device_t *device ) +static void ojankohs_adpcm_int( device_t *device ,int st) { ojankohs_state *state = device->machine().driver_data<ojankohs_state>(); @@ -782,7 +782,7 @@ static const ay8910_interface ojankoc_ay8910_interface = static const msm5205_interface msm5205_config = { - ojankohs_adpcm_int, /* IRQ handler */ + DEVCB_LINE(ojankohs_adpcm_int), /* IRQ handler */ MSM5205_S48_4B /* 8 KHz */ }; diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 90085ae8845..e979681db5c 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -459,7 +459,7 @@ MACHINE_RESET_MEMBER(opwolf_state,opwolf) msm5205_reset_w(machine().device("msm2"), 1); } -static void opwolf_msm5205_vck( device_t *device ) +static void opwolf_msm5205_vck( device_t *device ,int st) { opwolf_state *state = device->machine().driver_data<opwolf_state>(); int chip = (strcmp(device->tag(), ":msm1") == 0) ? 0 : 1; @@ -686,7 +686,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - opwolf_msm5205_vck, /* VCK function */ + DEVCB_LINE(opwolf_msm5205_vck), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/pachifev.c b/src/mame/drivers/pachifev.c index af07cb4db69..397b5d0d43a 100644 --- a/src/mame/drivers/pachifev.c +++ b/src/mame/drivers/pachifev.c @@ -267,7 +267,7 @@ static const sn76496_config psg_intf = #if USE_MSM -static void pf_adpcm_int(device_t *device) +static void pf_adpcm_int(device_t *device,int state) { pachifev_state *state = device->machine().driver_data<pachifev_state>(); @@ -295,7 +295,7 @@ static void pf_adpcm_int(device_t *device) static const msm5205_interface msm5205_config = { - pf_adpcm_int, /* interrupt function */ + DEVCB_LINE(pf_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8kHz */ }; diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c index e30f869b6e5..b4e5ac85938 100644 --- a/src/mame/drivers/pcktgal.c +++ b/src/mame/drivers/pcktgal.c @@ -46,7 +46,7 @@ WRITE8_MEMBER(pcktgal_state::pcktgal_sound_w) } -static void pcktgal_adpcm_int(device_t *device) +static void pcktgal_adpcm_int(device_t *device,int st) { pcktgal_state *state = device->machine().driver_data<pcktgal_state>(); @@ -212,7 +212,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - pcktgal_adpcm_int, /* interrupt function */ + DEVCB_LINE(pcktgal_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c index b487061a3b3..4cafc186f0b 100644 --- a/src/mame/drivers/rastan.c +++ b/src/mame/drivers/rastan.c @@ -167,7 +167,7 @@ WRITE8_MEMBER(rastan_state::rastan_bankswitch_w) } -static void rastan_msm5205_vck( device_t *device ) +static void rastan_msm5205_vck( device_t *device ,int st) { rastan_state *state = device->machine().driver_data<rastan_state>(); if (state->m_adpcm_data != -1) @@ -340,7 +340,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - rastan_msm5205_vck, /* VCK function */ + DEVCB_LINE(rastan_msm5205_vck), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/rmhaihai.c b/src/mame/drivers/rmhaihai.c index 2308f6e1782..8b933513317 100644 --- a/src/mame/drivers/rmhaihai.c +++ b/src/mame/drivers/rmhaihai.c @@ -457,7 +457,7 @@ static const ay8910_interface ay8910_config = static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* vclk input mode */ }; diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 030053d0692..981a540ceab 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -797,7 +797,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* 8KHz playback ? */ }; diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c index ee2d627637b..64695519fb2 100644 --- a/src/mame/drivers/sothello.c +++ b/src/mame/drivers/sothello.c @@ -323,7 +323,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(sothello_state::sothello_interrupt) m_v9938->interrupt(); } -static void adpcm_int(device_t *device) +static void adpcm_int(device_t *device,int st) { sothello_state *state = device->machine().driver_data<sothello_state>(); /* only 4 bits are used */ @@ -334,7 +334,7 @@ static void adpcm_int(device_t *device) static const msm5205_interface msm_interface = { - adpcm_int, /* interrupt function */ + DEVCB_LINE(adpcm_int), /* interrupt function */ MSM5205_S48_4B /* changed on the fly */ }; diff --git a/src/mame/drivers/spdodgeb.c b/src/mame/drivers/spdodgeb.c index a8341158ece..daaa7c384e4 100644 --- a/src/mame/drivers/spdodgeb.c +++ b/src/mame/drivers/spdodgeb.c @@ -62,7 +62,7 @@ WRITE8_MEMBER(spdodgeb_state::spd_adpcm_w) } } -static void spd_adpcm_int(device_t *device) +static void spd_adpcm_int(device_t *device,int st) { spdodgeb_state *state = device->machine().driver_data<spdodgeb_state>(); int chip = (strcmp(device->tag(), ":msm1") == 0) ? 0 : 1; @@ -387,7 +387,7 @@ static const ym3812_interface ym3812_config = static const msm5205_interface msm5205_config = { - spd_adpcm_int, /* interrupt function */ + DEVCB_LINE(spd_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8kHz? */ }; diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index 2fe180e0b24..088f36f25b0 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -110,7 +110,7 @@ WRITE8_MEMBER(splash_state::splash_adpcm_data_w) m_adpcm_data = data; } -static void splash_msm5205_int(device_t *device) +static void splash_msm5205_int(device_t *device,int st) { splash_state *state = device->machine().driver_data<splash_state>(); @@ -476,7 +476,7 @@ GFXDECODE_END static const msm5205_interface splash_msm5205_interface = { - splash_msm5205_int, /* IRQ handler */ + DEVCB_LINE(splash_msm5205_int), /* IRQ handler */ MSM5205_S48_4B /* 8KHz */ }; @@ -578,7 +578,7 @@ static MACHINE_CONFIG_START( roldfrog, splash_state ) MCFG_SOUND_ROUTE(3, "mono", 1.0) MACHINE_CONFIG_END -static void adpcm_int1( device_t *device ) +static void adpcm_int1( device_t *device,int st) { splash_state *state = device->machine().driver_data<splash_state>(); if (state->m_snd_interrupt_enable1 || state->m_msm_toggle1 == 1) @@ -594,7 +594,7 @@ static void adpcm_int1( device_t *device ) } } -static void adpcm_int2( device_t *device ) +static void adpcm_int2( device_t *device,int st ) { splash_state *state = device->machine().driver_data<splash_state>(); if (state->m_snd_interrupt_enable2 || state->m_msm_toggle2 == 1) @@ -612,13 +612,13 @@ static void adpcm_int2( device_t *device ) static const msm5205_interface msm_interface1 = { - adpcm_int1, /* interrupt function */ + DEVCB_LINE(adpcm_int1), /* interrupt function */ MSM5205_S64_4B /* 1 / 96 = 3906.25Hz playback - guess */ }; static const msm5205_interface msm_interface2 = { - adpcm_int2, /* interrupt function */ + DEVCB_LINE(adpcm_int2), /* interrupt function */ MSM5205_S96_4B /* 1 / 96 = 3906.25Hz playback - guess */ }; diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index f39fda4f972..dac492568ed 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -206,7 +206,7 @@ WRITE8_MEMBER(srmp2_state::srmp3_adpcm_code_w) } -static void srmp2_adpcm_int(device_t *device) +static void srmp2_adpcm_int(device_t *device,int st) { srmp2_state *state = device->machine().driver_data<srmp2_state>(); UINT8 *ROM = state->memregion("adpcm")->base(); @@ -1129,7 +1129,7 @@ static const ay8910_interface srmp2_ay8910_interface = static const msm5205_interface msm5205_config = { - srmp2_adpcm_int, /* IRQ handler */ + DEVCB_LINE(srmp2_adpcm_int), /* IRQ handler */ MSM5205_S48_4B /* 8 KHz, 4 Bits */ }; diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c index 9894e37f537..aeb0e1963f4 100644 --- a/src/mame/drivers/stfight.c +++ b/src/mame/drivers/stfight.c @@ -427,7 +427,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - stfight_adpcm_int, /* interrupt function */ + DEVCB_LINE(stfight_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 03331f741f4..920e849a157 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -431,7 +431,7 @@ static const ym2203_interface ym2203_config = DEVCB_LINE(irqhandler) }; -static void adpcm_int(device_t *device) +static void adpcm_int(device_t *device,int st) { suprgolf_state *state = device->machine().driver_data<suprgolf_state>(); @@ -452,7 +452,7 @@ static void adpcm_int(device_t *device) static const msm5205_interface msm5205_config = { - adpcm_int, /* interrupt function */ + DEVCB_LINE(adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index 6dff75d66c7..66a9d865395 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -357,7 +357,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::tturfbl_msm5205_data_w) m_sample_buffer = data; } -static void tturfbl_msm5205_callback( device_t *device ) +static void tturfbl_msm5205_callback( device_t *device,int st ) { segas1x_bootleg_state *state = device->machine().driver_data<segas1x_bootleg_state>(); msm5205_data_w(device, (state->m_sample_buffer >> 4) & 0x0f); @@ -370,7 +370,7 @@ static void tturfbl_msm5205_callback( device_t *device ) static const msm5205_interface tturfbl_msm5205_interface = { - tturfbl_msm5205_callback, + DEVCB_LINE(tturfbl_msm5205_callback), MSM5205_S48_4B }; @@ -1158,7 +1158,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::shdancbl_msm5205_data_w) m_sample_buffer = data; } -static void shdancbl_msm5205_callback(device_t *device) +static void shdancbl_msm5205_callback(device_t *device, int st) { segas1x_bootleg_state *state = device->machine().driver_data<segas1x_bootleg_state>(); msm5205_data_w(device, state->m_sample_buffer & 0x0f); @@ -1171,7 +1171,7 @@ static void shdancbl_msm5205_callback(device_t *device) static const msm5205_interface shdancbl_msm5205_interface = { - shdancbl_msm5205_callback, + DEVCB_LINE(shdancbl_msm5205_callback), MSM5205_S48_4B }; diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index d036b8456fe..8aac90e3e36 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -557,7 +557,7 @@ WRITE8_MEMBER(taitol_state::mux_ctrl_w) } -static void champwr_msm5205_vck( device_t *device ) +static void champwr_msm5205_vck( device_t *device,int st ) { taitol_state *state = device->machine().driver_data<taitol_state>(); @@ -1792,7 +1792,7 @@ static const ym2203_interface ym2203_interface_champwr = static const msm5205_interface msm5205_config = { - champwr_msm5205_vck,/* VCK function */ + DEVCB_LINE(champwr_msm5205_vck),/* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index fec50f9a2cd..6c9f29a260b 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -161,7 +161,7 @@ WRITE8_MEMBER(tbowl_state::tbowl_adpcm_vol_w) msm5205_set_volume(adpcm, (data & 0x7f) * 100 / 0x7f); } -static void tbowl_adpcm_int(device_t *device) +static void tbowl_adpcm_int(device_t *device,int st) { tbowl_state *state = device->machine().driver_data<tbowl_state>(); int num = (strcmp(device->tag(), ":msm1") == 0) ? 0 : 1; @@ -431,7 +431,7 @@ static const ym3812_interface ym3812_config = static const msm5205_interface msm5205_config = { - tbowl_adpcm_int, /* interrupt function */ + DEVCB_LINE(tbowl_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c index e87d8a036b4..093792a8a09 100644 --- a/src/mame/drivers/tecmo.c +++ b/src/mame/drivers/tecmo.c @@ -94,7 +94,7 @@ WRITE8_MEMBER(tecmo_state::tecmo_adpcm_vol_w) msm5205_set_volume(device,(data & 0x0f) * 100 / 15); } -static void tecmo_adpcm_int(device_t *device) +static void tecmo_adpcm_int(device_t *device,int st) { tecmo_state *state = device->machine().driver_data<tecmo_state>(); if (state->m_adpcm_pos >= state->m_adpcm_end || @@ -616,7 +616,7 @@ static const ym3812_interface ym3812_config = static const msm5205_interface msm5205_config = { - tecmo_adpcm_int, /* interrupt function */ + DEVCB_LINE(tecmo_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index 910d0682036..71b9d473a2e 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -188,7 +188,7 @@ WRITE8_MEMBER(tehkanwc_state::msm_reset_w) msm5205_reset_w(device,data ? 0 : 1); } -static void tehkanwc_adpcm_int(device_t *device) +static void tehkanwc_adpcm_int(device_t *device,int st) { tehkanwc_state *state = device->machine().driver_data<tehkanwc_state>(); @@ -633,7 +633,7 @@ static const ay8910_interface ay8910_interface_2 = static const msm5205_interface msm5205_config = { - tehkanwc_adpcm_int, /* interrupt function */ + DEVCB_LINE(tehkanwc_adpcm_int), /* interrupt function */ MSM5205_S48_4B /* 8KHz */ }; diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c index 0fc9e907d34..0a7d13369f9 100644 --- a/src/mame/drivers/tigeroad.c +++ b/src/mame/drivers/tigeroad.c @@ -509,7 +509,7 @@ static const ym2203_interface ym2203_config = static const msm5205_interface msm5205_config = { - 0, /* interrupt function */ + DEVCB_NULL, /* interrupt function */ MSM5205_SEX_4B /* 4KHz playback ? */ }; diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c index 4ab3cabf97b..24f3de5c05a 100644 --- a/src/mame/drivers/toki.c +++ b/src/mame/drivers/toki.c @@ -56,7 +56,7 @@ READ16_MEMBER(toki_state::pip16_r) -static void toki_adpcm_int (device_t *device) +static void toki_adpcm_int (device_t *device,int st) { toki_state *state = device->machine().driver_data<toki_state>(); @@ -408,7 +408,7 @@ GFXDECODE_END static const msm5205_interface msm5205_config = { - toki_adpcm_int, /* interrupt function */ + DEVCB_LINE(toki_adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 4KHz */ }; diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index 2eaa517fec3..c2f3397bba8 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -437,12 +437,12 @@ static void topspeed_msm5205_clock( device_t *device, int chip ) state->m_msm_pos[chip] = state->m_msm_start[chip]; } -static void topspeed_msm5205_vck_1( device_t *device ) +static void topspeed_msm5205_vck_1( device_t *device ,int state) { topspeed_msm5205_clock(device, 0); } -static void topspeed_msm5205_vck_2( device_t *device ) +static void topspeed_msm5205_vck_2( device_t *device ,int state) { topspeed_msm5205_clock(device, 1); } @@ -655,13 +655,13 @@ GFXDECODE_END static const msm5205_interface msm5205_config_1 = { - topspeed_msm5205_vck_1, /* VCK function */ + DEVCB_LINE(topspeed_msm5205_vck_1), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; static const msm5205_interface msm5205_config_2 = { - topspeed_msm5205_vck_2, /* VCK function */ + DEVCB_LINE(topspeed_msm5205_vck_2), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c index 44d5da6e881..5c833ded43d 100644 --- a/src/mame/drivers/tubep.c +++ b/src/mame/drivers/tubep.c @@ -549,7 +549,7 @@ WRITE8_MEMBER(tubep_state::rjammer_voice_frequency_select_w) } -static void rjammer_adpcm_vck (device_t *device) +static void rjammer_adpcm_vck (device_t *device,int st) { tubep_state *state = device->machine().driver_data<tubep_state>(); state->m_ls74 = (state->m_ls74 + 1) & 1; @@ -870,7 +870,7 @@ static const ay8910_interface ay8910_interface_3 = static const msm5205_interface msm5205_config = { - rjammer_adpcm_vck, /* VCK function */ + DEVCB_LINE(rjammer_adpcm_vck), /* VCK function */ MSM5205_S48_4B /* 8 KHz (changes at run time) */ }; diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c index 9d2ef4bd43d..a07616e6883 100644 --- a/src/mame/drivers/wc90b.c +++ b/src/mame/drivers/wc90b.c @@ -340,7 +340,7 @@ static const ym2203_interface ym2203_config = DEVCB_LINE(irqhandler) }; -static void adpcm_int(device_t *device) +static void adpcm_int(device_t *device,int st) { wc90b_state *state = device->machine().driver_data<wc90b_state>(); @@ -356,7 +356,7 @@ static void adpcm_int(device_t *device) static const msm5205_interface msm5205_config = { - adpcm_int, /* interrupt function */ + DEVCB_LINE(adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 4KHz 4-bit */ }; diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index 69d47b5233c..c0845ccc9a9 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -443,7 +443,7 @@ GFXDECODE_END ***************************************************************************/ -static void yunsung8_adpcm_int( device_t *device ) +static void yunsung8_adpcm_int( device_t *device,int st ) { yunsung8_state *state = device->machine().driver_data<yunsung8_state>(); @@ -457,7 +457,7 @@ static void yunsung8_adpcm_int( device_t *device ) static const msm5205_interface yunsung8_msm5205_interface = { - yunsung8_adpcm_int, /* interrupt function */ + DEVCB_LINE(yunsung8_adpcm_int), /* interrupt function */ MSM5205_S96_4B /* 4KHz, 4 Bits */ }; diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index bbfbbe8c511..1d8fce3b33a 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -54,4 +54,4 @@ public: }; /*----------- defined in machine/stfight.c -----------*/ -void stfight_adpcm_int(device_t *device); +void stfight_adpcm_int(device_t *device, int st); diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index f9abbba0175..26bbb2008d6 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -186,7 +186,7 @@ static const int sampleLimits[] = 0x7200 // (end of samples) }; -void stfight_adpcm_int(device_t *device) +void stfight_adpcm_int(device_t *device, int st) { stfight_state *state = device->machine().driver_data<stfight_state>(); UINT8 *SAMPLES = state->memregion("adpcm")->base(); diff --git a/src/mess/drivers/rmnimbus.c b/src/mess/drivers/rmnimbus.c index d8538fc45bc..9b101fd4420 100644 --- a/src/mess/drivers/rmnimbus.c +++ b/src/mess/drivers/rmnimbus.c @@ -76,7 +76,7 @@ static const ay8910_interface nimbus_ay8910_interface = static const msm5205_interface msm5205_config = { - nimbus_msm5205_vck, /* VCK function */ + DEVCB_LINE(nimbus_msm5205_vck), /* VCK function */ MSM5205_S48_4B /* 8 kHz */ }; diff --git a/src/mess/includes/rmnimbus.h b/src/mess/includes/rmnimbus.h index 97afcbf348b..7155181327c 100644 --- a/src/mess/includes/rmnimbus.h +++ b/src/mess/includes/rmnimbus.h @@ -342,7 +342,7 @@ extern const wd17xx_interface nimbus_wd17xx_interface; #define MSM5205_TAG "msm5205" -void nimbus_msm5205_vck(device_t *device); +void nimbus_msm5205_vck(device_t *device,int st); /* Mouse / Joystick */ diff --git a/src/mess/machine/pce.c b/src/mess/machine/pce.c index 0b5787d8978..542ce6c60d9 100644 --- a/src/mess/machine/pce.c +++ b/src/mess/machine/pce.c @@ -100,9 +100,9 @@ enum { /* CD Unit RAM */ /* MSM5205 ADPCM decoder definition */ -static void pce_cd_msm5205_int(device_t *device); +static void pce_cd_msm5205_int(device_t *device,int state); const msm5205_interface pce_cd_msm5205_interface = { - pce_cd_msm5205_int, /* interrupt function */ + DEVCB_LINE(pce_cd_msm5205_int), /* interrupt function */ MSM5205_S48_4B /* 1/48 prescaler, 4bit data */ }; @@ -424,7 +424,7 @@ static void adpcm_play(running_machine &machine) the MSM5205. Currently we can only use static clocks for the MSM5205. */ -static void pce_cd_msm5205_int(device_t *device) +static void pce_cd_msm5205_int(device_t *device, int st) { pce_state *state = device->machine().driver_data<pce_state>(); pce_cd_t &pce_cd = state->m_cd; diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c index 4a107ec07dd..109e1eb07de 100644 --- a/src/mess/machine/rmnimbus.c +++ b/src/mess/machine/rmnimbus.c @@ -2815,7 +2815,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_portb_w) } } -void nimbus_msm5205_vck(device_t *device) +void nimbus_msm5205_vck(device_t *device, int st) { rmnimbus_state *state = device->machine().driver_data<rmnimbus_state>(); if(state->m_iou_reg092 & MSM5205_INT_ENABLE) |