mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
simplified ay8910_start_ym now that all sound chips that use it are devices (nw)
This commit is contained in:
parent
10a80d903b
commit
30f001dbe9
@ -136,7 +136,7 @@ void ym2203_device::device_start()
|
|||||||
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
|
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
|
||||||
|
|
||||||
m_irq_handler.resolve();
|
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");
|
assert_always(m_psg != NULL, "Error creating YM2203/AY8910 chip");
|
||||||
|
|
||||||
/* Timer Handler set */
|
/* Timer Handler set */
|
||||||
|
@ -150,7 +150,7 @@ void ym2608_device::device_start()
|
|||||||
|
|
||||||
m_irq_handler.resolve();
|
m_irq_handler.resolve();
|
||||||
/* FIXME: Force to use simgle output */
|
/* 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");
|
assert_always(m_psg != NULL, "Error creating YM2608/AY8910 chip");
|
||||||
|
|
||||||
/* Timer Handler set */
|
/* Timer Handler set */
|
||||||
|
@ -159,7 +159,7 @@ void ym2610_device::device_start()
|
|||||||
astring name;
|
astring name;
|
||||||
|
|
||||||
m_irq_handler.resolve();
|
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");
|
assert_always(m_psg != NULL, "Error creating YM2610/AY8910 chip");
|
||||||
|
|
||||||
/* Timer Handler set */
|
/* Timer Handler set */
|
||||||
|
@ -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;
|
device_type chip_type = device->type();
|
||||||
int master_clock = clock;
|
int master_clock = device->clock();
|
||||||
|
|
||||||
if (info == NULL)
|
ay8910_context *info = auto_alloc_clear(device->machine(), ay8910_context);
|
||||||
info = auto_alloc_clear(device->machine(), ay8910_context);
|
|
||||||
|
|
||||||
info->device = device;
|
info->device = device;
|
||||||
info->intf = intf;
|
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;
|
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;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -86,7 +86,7 @@ struct ay8910_interface
|
|||||||
|
|
||||||
/*********** An interface for SSG of YM2203 ***********/
|
/*********** 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_stop_ym(void *chip);
|
||||||
void ay8910_reset_ym(void *chip);
|
void ay8910_reset_ym(void *chip);
|
||||||
|
Loading…
Reference in New Issue
Block a user