simplified ay8910_start_ym now that all sound chips that use it are devices (nw)

This commit is contained in:
smf- 2013-05-12 11:54:24 +00:00
parent 10a80d903b
commit 30f001dbe9
5 changed files with 10 additions and 11 deletions

View File

@ -136,7 +136,7 @@ void ym2203_device::device_start()
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
m_irq_handler.resolve();
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
m_psg = ay8910_start_ym(this, ay8910_config);
assert_always(m_psg != NULL, "Error creating YM2203/AY8910 chip");
/* Timer Handler set */

View File

@ -150,7 +150,7 @@ void ym2608_device::device_start()
m_irq_handler.resolve();
/* FIXME: Force to use simgle output */
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
m_psg = ay8910_start_ym(this, ay8910_config);
assert_always(m_psg != NULL, "Error creating YM2608/AY8910 chip");
/* Timer Handler set */

View File

@ -159,7 +159,7 @@ void ym2610_device::device_start()
astring name;
m_irq_handler.resolve();
m_psg = ay8910_start_ym(NULL, type(), this, clock(), &generic_ay8910);
m_psg = ay8910_start_ym(this, &generic_ay8910);
assert_always(m_psg != NULL, "Error creating YM2610/AY8910 chip");
/* Timer Handler set */

View File

@ -730,13 +730,12 @@ static void ay8910_statesave(ay8910_context *psg, device_t *device)
*
*************************************/
void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf)
void *ay8910_start_ym(device_t *device, const ay8910_interface *intf)
{
ay8910_context *info = (ay8910_context *)infoptr;
int master_clock = clock;
device_type chip_type = device->type();
int master_clock = device->clock();
if (info == NULL)
info = auto_alloc_clear(device->machine(), ay8910_context);
ay8910_context *info = auto_alloc_clear(device->machine(), ay8910_context);
info->device = device;
info->intf = intf;
@ -946,7 +945,7 @@ void ay8910_device::device_start()
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
m_psg = ay8910_start_ym(this, ay8910_config);
}
//-------------------------------------------------
@ -966,7 +965,7 @@ void ym2149_device::device_start()
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
m_psg = ay8910_start_ym(this, ay8910_config);
}
//-------------------------------------------------

View File

@ -86,7 +86,7 @@ struct ay8910_interface
/*********** An interface for SSG of YM2203 ***********/
void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf);
void *ay8910_start_ym(device_t *device, const ay8910_interface *intf);
void ay8910_stop_ym(void *chip);
void ay8910_reset_ym(void *chip);