Previous 199869 Revisions Next

r22785 Sunday 12th May, 2013 at 11:54:24 UTC by smf
simplified ay8910_start_ym now that all sound chips that use it are devices (nw)
[src/emu/sound]2203intf.c 2608intf.c 2610intf.c ay8910.c ay8910.h

trunk/src/emu/sound/ay8910.c
r22784r22785
730730 *
731731 *************************************/
732732
733void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf)
733void *ay8910_start_ym(device_t *device, const ay8910_interface *intf)
734734{
735   ay8910_context *info = (ay8910_context *)infoptr;
736   int master_clock = clock;
735   device_type chip_type = device->type();
736   int master_clock = device->clock();
737737
738   if (info == NULL)
739      info = auto_alloc_clear(device->machine(), ay8910_context);
738   ay8910_context *info = auto_alloc_clear(device->machine(), ay8910_context);
740739
741740   info->device = device;
742741   info->intf = intf;
r22784r22785
946945
947946   const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
948947
949   m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
948   m_psg = ay8910_start_ym(this, ay8910_config);
950949}
951950
952951//-------------------------------------------------
r22784r22785
966965
967966   const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
968967
969   m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
968   m_psg = ay8910_start_ym(this, ay8910_config);
970969}
971970
972971//-------------------------------------------------
trunk/src/emu/sound/ay8910.h
r22784r22785
8686
8787/*********** An interface for SSG of YM2203 ***********/
8888
89void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf);
89void *ay8910_start_ym(device_t *device, const ay8910_interface *intf);
9090
9191void ay8910_stop_ym(void *chip);
9292void ay8910_reset_ym(void *chip);
trunk/src/emu/sound/2608intf.c
r22784r22785
150150
151151   m_irq_handler.resolve();
152152   /* FIXME: Force to use simgle output */
153   m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
153   m_psg = ay8910_start_ym(this, ay8910_config);
154154   assert_always(m_psg != NULL, "Error creating YM2608/AY8910 chip");
155155
156156   /* Timer Handler set */
trunk/src/emu/sound/2203intf.c
r22784r22785
136136   const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
137137
138138   m_irq_handler.resolve();
139   m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
139   m_psg = ay8910_start_ym(this, ay8910_config);
140140   assert_always(m_psg != NULL, "Error creating YM2203/AY8910 chip");
141141
142142   /* Timer Handler set */
trunk/src/emu/sound/2610intf.c
r22784r22785
159159   astring name;
160160
161161   m_irq_handler.resolve();
162   m_psg = ay8910_start_ym(NULL, type(), this, clock(), &generic_ay8910);
162   m_psg = ay8910_start_ym(this, &generic_ay8910);
163163   assert_always(m_psg != NULL, "Error creating YM2610/AY8910 chip");
164164
165165   /* Timer Handler set */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team