Previous 199869 Revisions Next

r22765 Saturday 11th May, 2013 at 13:20:38 UTC by smf
modernised YM2203 [smf]
[src/emu/sound]2203intf.c 2203intf.h
[src/mame/audio]seibu.c seibu.h
[src/mame/drivers]1943.c actfancr.c airbustr.c alpha68k.c angelkds.c argus.c ashnojoe.c battlera.c bladestl.c blktiger.c brkthru.c bublbobl.c capbowl.c cave.c cbuster.c chanbara.c chinagat.c chinsan.c citycon.c cninja.c combatsc.c commando.c compgolf.c cshooter.c cyclemb.c darius.c darkseal.c dassault.c ddealer.c ddribble.c dec0.c dec8.c dfruit.c djboy.c dooyong.c dynax.c exprraid.c fcrash.c fuukifg2.c gaiden.c gladiatr.c gng.c goal92.c goindol.c gundealr.c gunsmoke.c himesiki.c hnayayoi.c homedata.c homerun.c hvyunit.c ironhors.c itech8.c karnov.c kingdrby.c labyrunr.c lastduel.c lkage.c lockon.c lsasquad.c lwings.c madmotor.c mayumi.c megasys1.c metlclsh.c mexico86.c momoko.c mosaic.c nightgal.c ninjakd2.c nmk16.c pass.c pcktgal.c pipeline.c pkscram.c pokechmp.c powerins.c psychic5.c pushman.c quizdna.c quizpun2.c rainbow.c sandscrp.c scotrsht.c segahang.c seta.c sfkick.c shanghai.c shootout.c sidearms.c sidepckt.c skyfox.c sothello.c splash.c srumbler.c sshangha.c stadhero.c stfight.c suna8.c suprgolf.c taito_b.c taito_f2.c taito_l.c taito_o.c terracre.c thedeep.c tigeroad.c tnzs.c tryout.c vaportra.c vigilant.c volfied.c wc90b.c witch.c xain.c xxmissio.c
[src/mame/includes]homedata.h mexico86.h taito_l.h
[src/mame/machine]nmk004.c
[src/mess/drivers]bml3.c fm7.c multi8.c mz2500.c pc8801.c pc88va.c
[src/mess/includes]fm7.h
[src/mess/machine]pc9801_26.c

trunk/src/emu/sound/2203intf.c
r22764r22765
22#include "2203intf.h"
33#include "fm.h"
44
5
6struct ym2203_state
7{
8   sound_stream *  stream;
9   emu_timer *     timer[2];
10   void *          chip;
11   void *          psg;
12   const ym2203_interface *intf;
13   devcb_resolved_write_line irqhandler;
14   device_t *device;
15};
16
17
18INLINE ym2203_state *get_safe_token(device_t *device)
19{
20   assert(device != NULL);
21   assert(device->type() == YM2203);
22   return (ym2203_state *)downcast<ym2203_device *>(device)->token();
23}
24
25
265static void psg_set_clock(void *param, int clock)
276{
28   ym2203_state *info = (ym2203_state *)param;
29   ay8910_set_clock_ym(info->psg, clock);
7   ym2203_device *ym2203 = (ym2203_device *) param;
8   ay8910_set_clock_ym(ym2203->_psg(), clock);
309}
3110
3211static void psg_write(void *param, int address, int data)
3312{
34   ym2203_state *info = (ym2203_state *)param;
35   ay8910_write_ym(info->psg, address, data);
13   ym2203_device *ym2203 = (ym2203_device *) param;
14   ay8910_write_ym(ym2203->_psg(), address, data);
3615}
3716
3817static int psg_read(void *param)
3918{
40   ym2203_state *info = (ym2203_state *)param;
41   return ay8910_read_ym(info->psg);
19   ym2203_device *ym2203 = (ym2203_device *) param;
20   return ay8910_read_ym(ym2203->_psg());
4221}
4322
4423static void psg_reset(void *param)
4524{
46   ym2203_state *info = (ym2203_state *)param;
47   ay8910_reset_ym(info->psg);
25   ym2203_device *ym2203 = (ym2203_device *) param;
26   ay8910_reset_ym(ym2203->_psg());
4827}
4928
5029static const ssg_callbacks psgintf =
r22764r22765
5534   psg_reset
5635};
5736
37void *ym2203_device::_psg()
38{
39   return m_psg;
40}
41
5842/* IRQ Handler */
5943static void IRQHandler(void *param,int irq)
6044{
61   ym2203_state *info = (ym2203_state *)param;
62   if (!info->irqhandler.isnull())
63      info->irqhandler(irq);
45   ym2203_device *ym2203 = (ym2203_device *) param;
46   ym2203->_IRQHandler(irq);
6447}
6548
66/* Timer overflow callback from timer.c */
67static TIMER_CALLBACK( timer_callback_2203_0 )
49void ym2203_device::_IRQHandler(int irq)
6850{
69   ym2203_state *info = (ym2203_state *)ptr;
70   ym2203_timer_over(info->chip,0);
51   if (!m_irq_handler.isnull())
52      m_irq_handler(irq);
7153}
7254
73static TIMER_CALLBACK( timer_callback_2203_1 )
55/* Timer overflow callback from timer.c */
56void ym2203_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
7457{
75   ym2203_state *info = (ym2203_state *)ptr;
76   ym2203_timer_over(info->chip,1);
58   switch(id)
59   {
60   case 0:
61      ym2203_timer_over(m_chip,0);
62      break;
63
64   case 1:
65      ym2203_timer_over(m_chip,1);
66      break;
67   }
7768}
7869
79/* update request from fm.c */
80void ym2203_update_request(void *param)
70static void timer_handler(void *param,int c,int count,int clock)
8171{
82   ym2203_state *info = (ym2203_state *)param;
83   info->stream->update();
72   ym2203_device *ym2203 = (ym2203_device *) param;
73   ym2203->_timer_handler(c, count, clock);
8474}
8575
86
87static void timer_handler(void *param,int c,int count,int clock)
76void ym2203_device::_timer_handler(int c,int count,int clock)
8877{
89   ym2203_state *info = (ym2203_state *)param;
9078   if( count == 0 )
9179   {   /* Reset FM Timer */
92      info->timer[c]->enable(false);
80      m_timer[c]->enable(false);
9381   }
9482   else
9583   {   /* Start FM Timer */
9684      attotime period = attotime::from_hz(clock) * count;
97      if (!info->timer[c]->enable(true))
98         info->timer[c]->adjust(period);
85
86      if (!m_timer[c]->enable(true))
87         m_timer[c]->adjust(period);
9988   }
10089}
10190
102static STREAM_UPDATE( ym2203_stream_update )
91/* update request from fm.c */
92void ym2203_update_request(void *param)
10393{
104   ym2203_state *info = (ym2203_state *)param;
105   ym2203_update_one(info->chip, outputs[0], samples);
94   ym2203_device *ym2203 = (ym2203_device *) param;
95   ym2203->_ym2203_update_request();
10696}
10797
98void ym2203_device::_ym2203_update_request()
99{
100   m_stream->update();
101}
108102
109static void ym2203_intf_postload (ym2203_state *info)
103
104
105//-------------------------------------------------
106//  sound_stream_update - handle a stream update
107//-------------------------------------------------
108
109void ym2203_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
110110{
111   ym2203_postload(info->chip);
111   ym2203_update_one(m_chip, outputs[0], samples);
112112}
113113
114114
115static DEVICE_START( ym2203 )
115void ym2203_device::device_post_load()
116116{
117   static const ym2203_interface generic_2203 =
117   ym2203_postload(m_chip);
118}
119
120
121//-------------------------------------------------
122//  device_start - device-specific startup
123//-------------------------------------------------
124
125void ym2203_device::device_start()
126{
127   static const ay8910_interface default_ay8910_config =
118128   {
119      {
120         AY8910_LEGACY_OUTPUT,
121         AY8910_DEFAULT_LOADS,
122         DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
123      },
124      DEVCB_NULL
129      AY8910_LEGACY_OUTPUT,
130      AY8910_DEFAULT_LOADS,
131      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
125132   };
126   const ym2203_interface *intf = device->static_config() ? (const ym2203_interface *)device->static_config() : &generic_2203;
127   ym2203_state *info = get_safe_token(device);
128   int rate = device->clock()/72; /* ??? */
129133
130   info->irqhandler.resolve(intf->irqhandler, *device);
131   info->intf = intf;
132   info->device = device;
133   info->psg = ay8910_start_ym(NULL, YM2203, device, device->clock(), &intf->ay8910_intf);
134   assert_always(info->psg != NULL, "Error creating YM2203/AY8910 chip");
134   int rate = clock()/72; /* ??? */
135135
136   const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
137
138   m_irq_handler.resolve();
139   m_psg = ay8910_start_ym(NULL, YM2203, this, clock(), ay8910_config);
140   assert_always(m_psg != NULL, "Error creating YM2203/AY8910 chip");
141
136142   /* Timer Handler set */
137   info->timer[0] = device->machine().scheduler().timer_alloc(FUNC(timer_callback_2203_0), info);
138   info->timer[1] = device->machine().scheduler().timer_alloc(FUNC(timer_callback_2203_1), info);
143   m_timer[0] = timer_alloc(0);
144   m_timer[1] = timer_alloc(1);
139145
140146   /* stream system initialize */
141   info->stream = device->machine().sound().stream_alloc(*device,0,1,rate,info,ym2203_stream_update);
147   m_stream = machine().sound().stream_alloc(*this,0,1,rate);
142148
143149   /* Initialize FM emurator */
144   info->chip = ym2203_init(info,device,device->clock(),rate,timer_handler,IRQHandler,&psgintf);
145   assert_always(info->chip != NULL, "Error creating YM2203 chip");
146
147   device->machine().save().register_postload(save_prepost_delegate(FUNC(ym2203_intf_postload), info));
150   m_chip = ym2203_init(this,this,clock(),rate,timer_handler,IRQHandler,&psgintf);
151   assert_always(m_chip != NULL, "Error creating YM2203 chip");
148152}
149153
150static DEVICE_STOP( ym2203 )
154//-------------------------------------------------
155//  device_stop - device-specific stop
156//-------------------------------------------------
157
158void ym2203_device::device_stop()
151159{
152   ym2203_state *info = get_safe_token(device);
153   ym2203_shutdown(info->chip);
154   ay8910_stop_ym(info->psg);
160   ym2203_shutdown(m_chip);
161   ay8910_stop_ym(m_psg);
155162}
156163
157static DEVICE_RESET( ym2203 )
164//-------------------------------------------------
165//  device_reset - device-specific reset
166//-------------------------------------------------
167
168void ym2203_device::device_reset()
158169{
159   ym2203_state *info = get_safe_token(device);
160   ym2203_reset_chip(info->chip);
170   ym2203_reset_chip(m_chip);
161171}
162172
163173
164
165READ8_DEVICE_HANDLER( ym2203_r )
174READ8_MEMBER( ym2203_device::read )
166175{
167   ym2203_state *info = get_safe_token(device);
168   return ym2203_read(info->chip, offset & 1);
176   return ym2203_read(m_chip, offset & 1);
169177}
170178
171WRITE8_DEVICE_HANDLER( ym2203_w )
179WRITE8_MEMBER( ym2203_device::write )
172180{
173   ym2203_state *info = get_safe_token(device);
174   ym2203_write(info->chip, offset & 1, data);
181   ym2203_write(m_chip, offset & 1, data);
175182}
176183
177
178READ8_DEVICE_HANDLER( ym2203_status_port_r ) { return ym2203_r(device, space, 0); }
179READ8_DEVICE_HANDLER( ym2203_read_port_r ) { return ym2203_r(device, space, 1); }
180WRITE8_DEVICE_HANDLER( ym2203_control_port_w ) { ym2203_w(device, space, 0, data); }
181WRITE8_DEVICE_HANDLER( ym2203_write_port_w ) { ym2203_w(device, space, 1, data); }
182
183const device_type YM2203 = &device_creator<ym2203_device>;
184
185ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
186   : device_t(mconfig, YM2203, "YM2203", tag, owner, clock),
187      device_sound_interface(mconfig, *this)
184READ8_MEMBER( ym2203_device::status_port_r )
188185{
189   m_token = global_alloc_clear(ym2203_state);
186   return read(space, 0);
190187}
191188
192//-------------------------------------------------
193//  device_config_complete - perform any
194//  operations now that the configuration is
195//  complete
196//-------------------------------------------------
197
198void ym2203_device::device_config_complete()
189READ8_MEMBER( ym2203_device::read_port_r )
199190{
191   return read(space, 1);
200192}
201193
202//-------------------------------------------------
203//  device_start - device-specific startup
204//-------------------------------------------------
205
206void ym2203_device::device_start()
194WRITE8_MEMBER( ym2203_device::control_port_w )
207195{
208   DEVICE_START_NAME( ym2203 )(this);
196   write(space, 0, data);
209197}
210198
211//-------------------------------------------------
212//  device_reset - device-specific reset
213//-------------------------------------------------
214
215void ym2203_device::device_reset()
199WRITE8_MEMBER( ym2203_device::write_port_w )
216200{
217   DEVICE_RESET_NAME( ym2203 )(this);
201   write(space, 1, data);
218202}
219203
220//-------------------------------------------------
221//  device_stop - device-specific stop
222//-------------------------------------------------
204const device_type YM2203 = &device_creator<ym2203_device>;
223205
224void ym2203_device::device_stop()
206ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
207   : device_t(mconfig, YM2203, "YM2203", tag, owner, clock),
208      device_sound_interface(mconfig, *this),
209      m_irq_handler(*this)
225210{
226   DEVICE_STOP_NAME( ym2203 )(this);
227211}
228212
229213//-------------------------------------------------
230//  sound_stream_update - handle a stream update
214//  device_config_complete - perform any
215//  operations now that the configuration is
216//  complete
231217//-------------------------------------------------
232218
233void ym2203_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
219void ym2203_device::device_config_complete()
234220{
235   // should never get here
236   fatalerror("sound_stream_update called; not applicable to legacy sound devices\n");
237221}
trunk/src/emu/sound/2203intf.h
r22764r22765
33#ifndef __2203INTF_H__
44#define __2203INTF_H__
55
6#include "devlegcy.h"
7
6#include "emu.h"
87#include "ay8910.h"
98
109void ym2203_update_request(void *param);
1110
12struct ym2203_interface
13{
14   const ay8910_interface ay8910_intf;
15   devcb_write_line irqhandler;
16};
11#define MCFG_YM2203_IRQ_HANDLER(_devcb) \
12   devcb = &ym2203_device::set_irq_handler(*device, DEVCB2_##_devcb);
1713
18DECLARE_READ8_DEVICE_HANDLER( ym2203_r );
19DECLARE_WRITE8_DEVICE_HANDLER( ym2203_w );
14#define MCFG_YM2203_AY8910_INTF(_ay8910_config) \
15   ym2203_device::set_ay8910_config(*device, _ay8910_config);
2016
21DECLARE_READ8_DEVICE_HANDLER( ym2203_status_port_r );
22DECLARE_READ8_DEVICE_HANDLER( ym2203_read_port_r );
23DECLARE_WRITE8_DEVICE_HANDLER( ym2203_control_port_w );
24DECLARE_WRITE8_DEVICE_HANDLER( ym2203_write_port_w );
25
2617class ym2203_device : public device_t,
2718                           public device_sound_interface
2819{
2920public:
3021   ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
31   ~ym2203_device() { global_free(m_token); }
3222
33   // access to legacy token
34   void *token() const { assert(m_token != NULL); return m_token; }
23   // static configuration helpers
24   template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym2203_device &>(device).m_irq_handler.set_callback(object); }
25   static void set_ay8910_config(device_t &device, const ay8910_interface *ay8910_config) { downcast<ym2203_device &>(device).m_ay8910_config = ay8910_config; }
26
27   DECLARE_READ8_MEMBER( read );
28   DECLARE_WRITE8_MEMBER( write );
29
30   DECLARE_READ8_MEMBER( status_port_r );
31   DECLARE_READ8_MEMBER( read_port_r );
32   DECLARE_WRITE8_MEMBER( control_port_w );
33   DECLARE_WRITE8_MEMBER( write_port_w );
34
35   void *_psg();
36   void _IRQHandler(int irq);
37   void _timer_handler(int c,int count,int clock);
38   void _ym2203_update_request();
39
3540protected:
3641   // device-level overrides
3742   virtual void device_config_complete();
3843   virtual void device_start();
44   virtual void device_post_load();
3945   virtual void device_stop();
4046   virtual void device_reset();
4147
48   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
49
4250   // sound stream update overrides
4351   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
4452private:
4553   // internal state
46   void *m_token;
54   sound_stream *  m_stream;
55   emu_timer *     m_timer[2];
56   void *          m_chip;
57   void *          m_psg;
58   devcb2_write_line m_irq_handler;
59   const ay8910_interface *m_ay8910_config;
4760};
4861
4962extern const device_type YM2203;
trunk/src/mess/drivers/mz2500.c
r22764r22765
15321532   AM_RANGE(0xbf, 0xbf) AM_READ(mz2500_iplane_latch_r)
15331533   AM_RANGE(0xc6, 0xc6) AM_WRITE(mz2500_irq_sel_w)
15341534   AM_RANGE(0xc7, 0xc7) AM_WRITE(mz2500_irq_data_w)
1535   AM_RANGE(0xc8, 0xc9) AM_DEVREADWRITE_LEGACY("ym", ym2203_r, ym2203_w)
1535   AM_RANGE(0xc8, 0xc9) AM_DEVREADWRITE("ym", ym2203_device, read, write)
15361536//  AM_RANGE(0xca, 0xca) AM_READWRITE(voice_r,voice_w)
15371537   AM_RANGE(0xcc, 0xcc) AM_READWRITE(rp5c15_8_r, rp5c15_8_w)
15381538   AM_RANGE(0xce, 0xce) AM_WRITE(mz2500_dictionary_bank_w)
r22764r22765
20182018   m_ym_porta = data;
20192019}
20202020
2021static const ym2203_interface ym2203_interface_1 =
2021static const ay8910_interface ay8910_config =
20222022{
2023   {
2024      AY8910_LEGACY_OUTPUT,
2025      AY8910_DEFAULT_LOADS,
2026      DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_r),  // read A
2027      DEVCB_INPUT_PORT("DSW1"),   // read B
2028      DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_w),  // write A
2029      DEVCB_NULL                  // write B
2030   },
2031   DEVCB_NULL
2023   AY8910_LEGACY_OUTPUT,
2024   AY8910_DEFAULT_LOADS,
2025   DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_r),  // read A
2026   DEVCB_INPUT_PORT("DSW1"),   // read B
2027   DEVCB_DRIVER_MEMBER(mz2500_state,opn_porta_w),  // write A
2028   DEVCB_NULL                  // write B
20322029};
20332030
20342031void mz2500_state::palette_init()
r22764r22765
21532150   MCFG_SPEAKER_STANDARD_MONO("mono")
21542151
21552152   MCFG_SOUND_ADD("ym", YM2203, 2000000) //unknown clock / divider
2156   MCFG_SOUND_CONFIG(ym2203_interface_1)
2153   MCFG_YM2203_AY8910_INTF(&ay8910_config)
21572154   MCFG_SOUND_ROUTE(0, "mono", 0.25)
21582155   MCFG_SOUND_ROUTE(1, "mono", 0.25)
21592156   MCFG_SOUND_ROUTE(2, "mono", 0.50)
trunk/src/mess/drivers/multi8.c
r22764r22765
632632   m_beeper->set_state((data & 0x08));
633633}
634634
635static const ym2203_interface ym2203_config =
635static const ay8910_interface ay8910_config =
636636{
637   {
638      AY8910_LEGACY_OUTPUT,
639      AY8910_DEFAULT_LOADS,
640      DEVCB_NULL,
641      DEVCB_NULL,
642      DEVCB_DRIVER_MEMBER(multi8_state, ym2203_porta_w ),
643      DEVCB_NULL
644   },
637   AY8910_LEGACY_OUTPUT,
638   AY8910_DEFAULT_LOADS,
639   DEVCB_NULL,
640   DEVCB_NULL,
641   DEVCB_DRIVER_MEMBER(multi8_state, ym2203_porta_w ),
645642   DEVCB_NULL
646643};
647644
r22764r22765
680677   /* Audio */
681678   MCFG_SPEAKER_STANDARD_MONO("mono")
682679   MCFG_SOUND_ADD("aysnd", AY8912, 1500000) //unknown clock / divider
683   MCFG_SOUND_CONFIG(ym2203_config)
680   MCFG_YM2203_AY8910_INTF(&ay8910_config)
684681   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
685682   MCFG_SOUND_ADD("beeper", BEEP, 0)
686683   MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
trunk/src/mess/drivers/fm7.c
r22764r22765
845845            break;
846846         case 0x01:
847847            // Data read
848            m_psg_data = ym2203_r(space.machine().device("ym"),space, 1);
848            m_psg_data = m_ym->read(space, 1);
849849            break;
850850         case 0x02:
851851            // Data write
852            ym2203_w(space.machine().device("ym"),space, 1,m_psg_data);
852            m_ym->write(space, 1,m_psg_data);
853853            logerror("YM: data write 0x%02x\n",m_psg_data);
854854            break;
855855         case 0x03:
856856            // Address latch
857            ym2203_w(space.machine().device("ym"),space, 0,m_psg_data);
857            m_ym->write(space, 0,m_psg_data);
858858            logerror("YM: address latch 0x%02x\n",m_psg_data);
859859            break;
860860         case 0x04:
861861            // Status register
862            m_psg_data = ym2203_r(space.machine().device("ym"),space, 0);
862            m_psg_data = m_ym->read(space, 0);
863863            break;
864864         case 0x09:
865865            // Joystick port read
r22764r22765
19731973   DEVCB_NULL                  /* portB write */
19741974};
19751975
1976static const ym2203_interface fm7_ym_intf =
1976static const ay8910_interface ay8910_config =
19771977{
1978   {
1979      AY8910_LEGACY_OUTPUT,
1980      AY8910_DEFAULT_LOADS,
1981      DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_1_r),
1982      DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_2_r),
1983      DEVCB_NULL,                 /* portA write */
1984      DEVCB_NULL                  /* portB write */
1985   },
1986   DEVCB_DRIVER_LINE_MEMBER(fm7_state,fm77av_fmirq)
1978   AY8910_LEGACY_OUTPUT,
1979   AY8910_DEFAULT_LOADS,
1980   DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_1_r),
1981   DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_2_r),
1982   DEVCB_NULL,                 /* portA write */
1983   DEVCB_NULL                  /* portB write */
19871984};
19881985
19891986static const cassette_interface fm7_cassette_interface =
r22764r22765
21052102
21062103   MCFG_SPEAKER_STANDARD_MONO("mono")
21072104   MCFG_SOUND_ADD("ym", YM2203, XTAL_4_9152MHz / 4)
2108   MCFG_SOUND_CONFIG(fm7_ym_intf)
2105   MCFG_YM2203_IRQ_HANDLER(WRITELINE(fm7_state, fm77av_fmirq))
2106   MCFG_YM2203_AY8910_INTF(&ay8910_config)
21092107   MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",1.0)
21102108   MCFG_SOUND_ADD("beeper", BEEP, 0)
21112109   MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
trunk/src/mess/drivers/pc88va.c
r22764r22765
12011201//  AM_RANGE(0x0034, 0x0034) GVRAM Control Port 1
12021202//  AM_RANGE(0x0035, 0x0035) GVRAM Control Port 2
12031203   AM_RANGE(0x0040, 0x0041) AM_READ(sys_port4_r) // (R) System Port 4 (W) System port 3 (strobe port)
1204   AM_RANGE(0x0044, 0x0045) AM_MIRROR(0x0002) AM_DEVREADWRITE8_LEGACY("ym", ym2203_r,ym2203_w,0xffff)
1204   AM_RANGE(0x0044, 0x0045) AM_MIRROR(0x0002) AM_DEVREADWRITE8("ym", ym2203_device, read, write, 0xffff)
12051205//  AM_RANGE(0x005c, 0x005c) (R) GVRAM status
12061206//  AM_RANGE(0x005c, 0x005f) (W) GVRAM selection
12071207//  AM_RANGE(0x0070, 0x0070) ? (*)
r22764r22765
17651765}
17661766
17671767
1768static const ym2203_interface pc88va_ym2203_intf =
1768static const ay8910_interface ay8910_config =
17691769{
1770   {
1771      AY8910_LEGACY_OUTPUT,
1772      AY8910_DEFAULT_LOADS,
1773      DEVCB_NULL,
1774      DEVCB_NULL,
1775      DEVCB_NULL,
1776      DEVCB_NULL
1777   },
1770   AY8910_LEGACY_OUTPUT,
1771   AY8910_DEFAULT_LOADS,
1772   DEVCB_NULL,
1773   DEVCB_NULL,
1774   DEVCB_NULL,
17781775   DEVCB_NULL
17791776};
17801777
r22764r22765
18731870
18741871   MCFG_SPEAKER_STANDARD_MONO("mono")
18751872   MCFG_SOUND_ADD("ym", YM2203, 3993600) //unknown clock / divider
1876   MCFG_SOUND_CONFIG(pc88va_ym2203_intf)
1873   MCFG_YM2203_AY8910_INTF(&ay8910_config)
18771874   MCFG_SOUND_ROUTE(0, "mono", 0.25)
18781875   MCFG_SOUND_ROUTE(1, "mono", 0.25)
18791876   MCFG_SOUND_ROUTE(2, "mono", 0.50)
trunk/src/mess/drivers/pc8801.c
r22764r22765
305305         m_rtc(*this, UPD1990A_TAG),
306306         m_cassette(*this, "cassette"),
307307         m_beeper(*this, "beeper"),
308         m_opna(*this, "opna")
308         m_opna(*this, "opna"),
309         m_opn(*this, "opn")
309310   { }
310311
311312   required_device<cpu_device> m_maincpu;
r22764r22765
315316   required_device<cassette_image_device> m_cassette;
316317   required_device<beep_device> m_beeper;
317318   required_device<ym2608_device> m_opna;
319   required_device<ym2203_device> m_opn;
318320   UINT8 *m_work_ram;
319321   UINT8 *m_hi_work_ram;
320322   UINT8 *m_ext_work_ram;
r22764r22765
17001702   if(m_has_opna)
17011703      return m_opna->read(space, offset);
17021704
1703   return (offset & 2) ? 0xff : ym2203_r(machine().device("opn"), space, offset);
1705   return (offset & 2) ? 0xff : m_opn->read(space, offset);
17041706}
17051707
17061708WRITE8_MEMBER(pc8801_state::pc8801_sound_board_w)
r22764r22765
17081710   if(m_has_opna)
17091711      m_opna->write(space, offset,data);
17101712   else if((offset & 2) == 0)
1711      ym2203_w(machine().device("opn"), space, offset,data);
1713      m_opn->write(space, offset, data);
17121714}
17131715
17141716READ8_MEMBER(pc8801_state::pc8801_opna_r)
r22764r22765
25882590}
25892591READ8_MEMBER(pc8801_state::opn_portb_r){ return ioport("OPN_PB")->read(); }
25902592
2591static const ym2203_interface pc88_ym2203_intf =
2593static const ay8910_interface ay8910_config =
25922594{
2593   {
2594      AY8910_LEGACY_OUTPUT,
2595      AY8910_DEFAULT_LOADS,
2596      DEVCB_DRIVER_MEMBER(pc8801_state,opn_porta_r),
2597      DEVCB_DRIVER_MEMBER(pc8801_state,opn_portb_r),
2598      DEVCB_NULL,
2599      DEVCB_NULL
2600   },
2601   DEVCB_DRIVER_LINE_MEMBER(pc8801_state,pc8801_sound_irq)
2595   AY8910_LEGACY_OUTPUT,
2596   AY8910_DEFAULT_LOADS,
2597   DEVCB_DRIVER_MEMBER(pc8801_state,opn_porta_r),
2598   DEVCB_DRIVER_MEMBER(pc8801_state,opn_portb_r),
2599   DEVCB_NULL,
2600   DEVCB_NULL
26022601};
26032602
2604static const ay8910_interface ay8910_config =
2603static const ay8910_interface single_ay8910_config =
26052604{
26062605   AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
26072606   AY8910_DEFAULT_LOADS,
r22764r22765
27022701   /* sound hardware */
27032702   MCFG_SPEAKER_STANDARD_MONO("mono")
27042703   MCFG_SOUND_ADD("opn", YM2203, MASTER_CLOCK)
2705   MCFG_SOUND_CONFIG(pc88_ym2203_intf)
2704   MCFG_YM2203_IRQ_HANDLER(WRITELINE(pc8801_state, pc8801_sound_irq))
2705   MCFG_YM2203_AY8910_INTF(&ay8910_config)
27062706   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
27072707
27082708   MCFG_SOUND_ADD("opna", YM2608, MASTER_CLOCK*2)
27092709   MCFG_YM2608_IRQ_HANDLER(WRITELINE(pc8801_state, pc8801_sound_irq))
2710   MCFG_YM2608_AY8910_INTF(&ay8910_config)
2710   MCFG_YM2608_AY8910_INTF(&single_ay8910_config)
27112711   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
27122712
27132713   MCFG_SOUND_ADD("beeper", BEEP, 0)
trunk/src/mess/drivers/bml3.c
r22764r22765
4646public:
4747   bml3_state(const machine_config &mconfig, device_type type, const char *tag)
4848      : driver_device(mconfig, type, tag),
49   m_maincpu(*this, "maincpu"),
50   m_crtc(*this, "crtc"),
51   //m_cass(*this, "cassette"),
52   m_beep(*this, "beeper")
53   { }
49      m_maincpu(*this, "maincpu"),
50      m_crtc(*this, "crtc"),
51      //m_cass(*this, "cassette"),
52      m_beep(*this, "beeper"),
53      m_ym2203(*this, "ym2203")
54   {
55   }
5456
5557   required_device<cpu_device> m_maincpu;
5658   required_device<mc6845_device> m_crtc;
5759   //required_device<cassette_image_device> m_cass;
5860   required_device<beep_device> m_beep;
61   required_device<ym2203_device> m_ym2203;
5962   DECLARE_WRITE8_MEMBER(bml3_6845_w);
6063   DECLARE_READ8_MEMBER(bml3_keyboard_r);
6164   DECLARE_WRITE8_MEMBER(bml3_hres_reg_w);
r22764r22765
333336
334337READ8_MEMBER(bml3_state::bml3_ym2203_r)
335338{
336   device_t *device = machine().device("ym2203");
337339   UINT8 dev_offs = ((m_psg_latch & 3) != 3);
338340
339   return ym2203_r(device,space, dev_offs);
341   return m_ym2203->read(space, dev_offs);
340342}
341343
342344WRITE8_MEMBER(bml3_state::bml3_ym2203_w)
343345{
344   device_t *device = machine().device("ym2203");
345346   UINT8 dev_offs = ((m_psg_latch & 3) != 3);
346347
347   ym2203_w(device,space, dev_offs,data);
348   m_ym2203->write(space, dev_offs, data);
348349}
349350
350351READ8_MEMBER( bml3_state::bml3_vram_attr_r)
r22764r22765
861862   DEVCB_DRIVER_LINE_MEMBER(bml3_state, bml3_acia_irq_w)
862863};
863864
864static const ym2203_interface ym2203_interface_1 =
865static const ay8910_interface ay8910_config =
865866{
866   {
867      AY8910_LEGACY_OUTPUT,
868      AY8910_DEFAULT_LOADS,
869      DEVCB_NULL, // read A
870      DEVCB_NULL, // read B
871      DEVCB_NULL, // write A
872      DEVCB_NULL  // write B
873   },
874   DEVCB_NULL
867   AY8910_LEGACY_OUTPUT,
868   AY8910_DEFAULT_LOADS,
869   DEVCB_NULL, // read A
870   DEVCB_NULL, // read B
871   DEVCB_NULL, // write A
872   DEVCB_NULL  // write B
875873};
876874
877875/* TODO */
r22764r22765
922920   MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
923921
924922   MCFG_SOUND_ADD("ym2203", YM2203, 2000000) //unknown clock / divider
925   MCFG_SOUND_CONFIG(ym2203_interface_1)
923   MCFG_YM2203_AY8910_INTF(&ay8910_config)
926924   MCFG_SOUND_ROUTE(0, "mono", 0.25)
927925   MCFG_SOUND_ROUTE(1, "mono", 0.25)
928926   MCFG_SOUND_ROUTE(2, "mono", 0.50)
trunk/src/mess/machine/pc9801_26.c
r22764r22765
4141   pic8259_ir4_w(machine().device("pic8259_slave"), state);
4242}
4343
44static const ym2203_interface pc98_ym2203_intf =
44static const ay8910_interface ay8910_config =
4545{
46   {
47      AY8910_LEGACY_OUTPUT,
48      AY8910_DEFAULT_LOADS,
49      DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_porta_r),
50      DEVCB_NULL,//(pc9801_state,opn_portb_r),
51      DEVCB_NULL,//(pc9801_state,opn_porta_w),
52      DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_portb_w),
53   },
54   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,pc9801_sound_irq)
46   AY8910_LEGACY_OUTPUT,
47   AY8910_DEFAULT_LOADS,
48   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_porta_r),
49   DEVCB_NULL,//(pc9801_state,opn_portb_r),
50   DEVCB_NULL,//(pc9801_state,opn_porta_w),
51   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_26_device,opn_portb_w),
5552};
5653
5754static MACHINE_CONFIG_FRAGMENT( pc9801_26_config )
5855   MCFG_SPEAKER_STANDARD_MONO("mono")
5956   MCFG_SOUND_ADD("opn", YM2203, MAIN_CLOCK_X1*2) // unknown clock / divider
60   MCFG_SOUND_CONFIG(pc98_ym2203_intf)
57   MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE(DEVICE_SELF_OWNER, pc9801_26_device, pc9801_sound_irq))
58   MCFG_YM2203_AY8910_INTF(&ay8910_config)
6159   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
6260MACHINE_CONFIG_END
6361
r22764r22765
183181{
184182   if((offset & 1) == 0)
185183   {
186      return offset & 4 ? 0xff : ym2203_r(m_opn,space, offset >> 1);
184      return offset & 4 ? 0xff : m_opn->read(space, offset >> 1);
187185   }
188186   else // odd
189187   {
r22764r22765
196194WRITE8_MEMBER(pc9801_26_device::pc9801_26_w)
197195{
198196   if((offset & 5) == 0)
199      ym2203_w(m_opn,space, offset >> 1,data);
197      m_opn->write(space, offset >> 1, data);
200198   else // odd
201199      printf("PC9801-26: Write to undefined port [%02x] %02x\n",offset+0x188,data);
202200}
trunk/src/mess/includes/fm7.h
r22764r22765
11#include "imagedev/cassette.h"
22#include "sound/beep.h"
3#include "sound/2203intf.h"
34
45/*
56 *
r22764r22765
112113      m_sub(*this, "sub"),
113114      m_x86(*this, "x86"),
114115      m_cassette(*this, "cassette"),
115      m_beeper(*this, "beeper") { }
116      m_beeper(*this, "beeper"),
117      m_ym(*this, "ym")
118   {
119   }
116120
117121   optional_shared_ptr<UINT8> m_shared_ram;
118122   optional_shared_ptr<UINT8> m_boot_ram;
r22764r22765
265269   optional_device<cpu_device> m_x86;
266270   required_device<cassette_image_device> m_cassette;
267271   required_device<beep_device> m_beeper;
272   optional_device<ym2203_device> m_ym;
268273   void fm7_alu_mask_write(UINT32 offset, int bank, UINT8 dat);
269274   void fm7_alu_function_compare(UINT32 offset);
270275   void fm7_alu_function_pset(UINT32 offset);
trunk/src/mame/drivers/pcktgal.c
r22764r22765
8989
9090static ADDRESS_MAP_START( pcktgal_sound_map, AS_PROGRAM, 8, pcktgal_state )
9191   AM_RANGE(0x0000, 0x07ff) AM_RAM
92   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
92   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
9393   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
9494   AM_RANGE(0x1800, 0x1800) AM_WRITE(pcktgal_adpcm_data_w) /* ADPCM data for the MSM5205 chip */
9595   AM_RANGE(0x2000, 0x2000) AM_WRITE(pcktgal_sound_bank_w)
trunk/src/mame/drivers/goindol.c
r22764r22765
103103
104104static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, goindol_state )
105105   AM_RANGE(0x0000, 0x7fff) AM_ROM
106   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)
106   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ymsnd", ym2203_device, write)
107107   AM_RANGE(0xc000, 0xc7ff) AM_RAM
108108   AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r)
109109ADDRESS_MAP_END
trunk/src/mame/drivers/homerun.c
r22764r22765
117117   AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
118118   AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
119119   AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
120   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
120   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
121121ADDRESS_MAP_END
122122
123123
r22764r22765
335335   DEVCB_DRIVER_MEMBER(homerun_state, homerun_scrollx_w)   /* Port C write */
336336};
337337
338static const ym2203_interface ym2203_config =
338static const ay8910_interface ay8910_config =
339339{
340   {
341      AY8910_LEGACY_OUTPUT,
342      AY8910_DEFAULT_LOADS,
343      DEVCB_INPUT_PORT("DSW"),
344      DEVCB_NULL,
345      DEVCB_NULL,
346      DEVCB_DRIVER_MEMBER(homerun_state, homerun_banking_w)
347   },
348   DEVCB_NULL
340   AY8910_LEGACY_OUTPUT,
341   AY8910_DEFAULT_LOADS,
342   DEVCB_INPUT_PORT("DSW"),
343   DEVCB_NULL,
344   DEVCB_NULL,
345   DEVCB_DRIVER_MEMBER(homerun_state, homerun_banking_w)
349346};
350347
351348/**************************************************************************/
r22764r22765
400397   MCFG_SPEAKER_STANDARD_MONO("mono")
401398
402399   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_20MHz/8)
403   MCFG_SOUND_CONFIG(ym2203_config)
400   MCFG_YM2203_AY8910_INTF(&ay8910_config)
404401   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
405402MACHINE_CONFIG_END
406403
trunk/src/mame/drivers/argus.c
r22764r22765
157157   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
158158}
159159
160static const ym2203_interface ym2203_config =
160static const ay8910_interface ay8910_config =
161161{
162   {
163      AY8910_LEGACY_OUTPUT,
164      AY8910_DEFAULT_LOADS,
165      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
166   },
167   DEVCB_DRIVER_LINE_MEMBER(argus_state,irqhandler)
162   AY8910_LEGACY_OUTPUT,
163   AY8910_DEFAULT_LOADS,
164   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
168165};
169166
170167
r22764r22765
280277#if 0
281278static ADDRESS_MAP_START( sound_portmap_1, AS_IO, 8, argus_state )
282279   ADDRESS_MAP_GLOBAL_MASK(0xff)
283   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
280   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
284281ADDRESS_MAP_END
285282#endif
286283
287284static ADDRESS_MAP_START( sound_portmap_2, AS_IO, 8, argus_state )
288285   ADDRESS_MAP_GLOBAL_MASK(0xff)
289   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
290   AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
286   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
287   AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
291288ADDRESS_MAP_END
292289
293290
r22764r22765
571568   MCFG_SPEAKER_STANDARD_MONO("mono")
572569
573570   MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
574   MCFG_SOUND_CONFIG(ym2203_config)
571   MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
572   MCFG_YM2203_AY8910_INTF(&ay8910_config)
575573   MCFG_SOUND_ROUTE(0, "mono", 0.15)
576574   MCFG_SOUND_ROUTE(1, "mono", 0.15)
577575   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
615613   MCFG_SPEAKER_STANDARD_MONO("mono")
616614
617615   MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
618   MCFG_SOUND_CONFIG(ym2203_config)
616   MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
617   MCFG_YM2203_AY8910_INTF(&ay8910_config)
619618   MCFG_SOUND_ROUTE(0, "mono", 0.15)
620619   MCFG_SOUND_ROUTE(1, "mono", 0.15)
621620   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
659658   MCFG_SPEAKER_STANDARD_MONO("mono")
660659
661660   MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
662   MCFG_SOUND_CONFIG(ym2203_config)
661   MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler))
662   MCFG_YM2203_AY8910_INTF(&ay8910_config)
663663   MCFG_SOUND_ROUTE(0, "mono", 0.30)
664664   MCFG_SOUND_ROUTE(1, "mono", 0.30)
665665   MCFG_SOUND_ROUTE(2, "mono", 0.30)
trunk/src/mame/drivers/goal92.c
r22764r22765
8484   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
8585   AM_RANGE(0xe000, 0xe000) AM_WRITE(adpcm_control_w)
8686   AM_RANGE(0xe400, 0xe400) AM_WRITE(adpcm_data_w)
87   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
88   AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
87   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
88   AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
8989   AM_RANGE(0xf000, 0xf7ff) AM_RAM
9090   AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r)
9191ADDRESS_MAP_END
r22764r22765
214214   //m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
215215}
216216
217static const ym2203_interface ym2203_config =
217static const ay8910_interface ay8910_config =
218218{
219   {
220      AY8910_LEGACY_OUTPUT,
221      AY8910_DEFAULT_LOADS,
222      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
223   },
224   DEVCB_DRIVER_LINE_MEMBER(goal92_state,irqhandler)
219   AY8910_LEGACY_OUTPUT,
220   AY8910_DEFAULT_LOADS,
221   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
225222};
226223
227224WRITE_LINE_MEMBER(goal92_state::goal92_adpcm_int)
r22764r22765
334331   MCFG_SPEAKER_STANDARD_MONO("mono")
335332
336333   MCFG_SOUND_ADD("ym1", YM2203, 2500000/2)
337   MCFG_SOUND_CONFIG(ym2203_config)
334   MCFG_YM2203_IRQ_HANDLER(WRITELINE(goal92_state, irqhandler))
335   MCFG_YM2203_AY8910_INTF(&ay8910_config)
338336   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
339337
340338   MCFG_SOUND_ADD("ym2", YM2203, 2500000/2)
trunk/src/mame/drivers/ironhors.c
r22764r22765
9191
9292static ADDRESS_MAP_START( slave_io_map, AS_IO, 8, ironhors_state )
9393   ADDRESS_MAP_GLOBAL_MASK(0xff)
94   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym2203", ym2203_r, ym2203_w)
94   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym2203", ym2203_device, read, write)
9595ADDRESS_MAP_END
9696
9797static ADDRESS_MAP_START( farwest_master_map, AS_PROGRAM, 8, ironhors_state )
r22764r22765
131131static ADDRESS_MAP_START( farwest_slave_map, AS_PROGRAM, 8, ironhors_state )
132132   AM_RANGE(0x0000, 0x3fff) AM_ROM
133133   AM_RANGE(0x4000, 0x43ff) AM_RAM
134   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym2203", ym2203_r, ym2203_w)
134   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym2203", ym2203_device, read, write)
135135ADDRESS_MAP_END
136136
137137
r22764r22765
340340 *
341341 *************************************/
342342
343static const ym2203_interface ym2203_config =
343static const ay8910_interface ay8910_config =
344344{
345   {
346      AY8910_LEGACY_OUTPUT,
347      AY8910_DEFAULT_LOADS,
348      DEVCB_NULL,
349      DEVCB_NULL,
350      DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
351      DEVCB_NULL
352   },
345   AY8910_LEGACY_OUTPUT,
346   AY8910_DEFAULT_LOADS,
347   DEVCB_NULL,
348   DEVCB_NULL,
349   DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
353350   DEVCB_NULL
354351};
355352
r22764r22765
396393   MCFG_SPEAKER_STANDARD_MONO("mono")
397394
398395   MCFG_SOUND_ADD("ym2203", YM2203, 18432000/6)
399   MCFG_SOUND_CONFIG(ym2203_config)
396   MCFG_YM2203_AY8910_INTF(&ay8910_config)
400397
401398   MCFG_SOUND_ROUTE_EX(0, "disc_ih", 1.0, 0)
402399   MCFG_SOUND_ROUTE_EX(1, "disc_ih", 1.0, 1)
r22764r22765
430427   return soundlatch_byte_r(m_soundcpu->space(AS_PROGRAM), 0);
431428}
432429
433static const ym2203_interface farwest_ym2203_config =
430static const ay8910_interface farwest_ay8910_config =
434431{
435   {
436      AY8910_LEGACY_OUTPUT,
437      AY8910_DEFAULT_LOADS,
438      DEVCB_NULL,
439      DEVCB_DRIVER_MEMBER(ironhors_state,farwest_soundlatch_r),
440      DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
441      DEVCB_NULL
442   },
432   AY8910_LEGACY_OUTPUT,
433   AY8910_DEFAULT_LOADS,
434   DEVCB_NULL,
435   DEVCB_DRIVER_MEMBER(ironhors_state,farwest_soundlatch_r),
436   DEVCB_DRIVER_MEMBER(ironhors_state,ironhors_filter_w),
443437   DEVCB_NULL
444438};
445439
r22764r22765
462456   MCFG_SCREEN_UPDATE_DRIVER(ironhors_state, screen_update_farwest)
463457
464458   MCFG_SOUND_MODIFY("ym2203")
465   MCFG_SOUND_CONFIG(farwest_ym2203_config)
459   MCFG_YM2203_AY8910_INTF(&farwest_ay8910_config)
466460MACHINE_CONFIG_END
467461
468462
trunk/src/mame/drivers/hvyunit.c
r22764r22765
449449static ADDRESS_MAP_START( sound_io, AS_IO, 8, hvyunit_state )
450450   ADDRESS_MAP_GLOBAL_MASK(0xff)
451451   AM_RANGE(0x00, 0x00) AM_WRITE(sound_bankswitch_w)
452   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
452   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
453453   AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r)
454454ADDRESS_MAP_END
455455
trunk/src/mame/drivers/alpha68k.c
r22764r22765
792792   AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w)
793793   AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_device, write_signed8)
794794   AM_RANGE(0x0a, 0x0b) AM_DEVWRITE_LEGACY("ym2", ym2413_w)
795   AM_RANGE(0x0c, 0x0d) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
795   AM_RANGE(0x0c, 0x0d) AM_DEVWRITE("ym1", ym2203_device, write)
796796   AM_RANGE(0x0e, 0x0e) AM_WRITE(sound_bank_w)
797797ADDRESS_MAP_END
798798
799799static ADDRESS_MAP_START( kyros_sound_portmap, AS_IO, 8, alpha68k_state )
800800   ADDRESS_MAP_GLOBAL_MASK(0xff)
801   AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
802   AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("ym2", ym2203_write_port_w)
803   AM_RANGE(0x81, 0x81) AM_DEVWRITE_LEGACY("ym2", ym2203_control_port_w)
804   AM_RANGE(0x90, 0x90) AM_DEVWRITE_LEGACY("ym3", ym2203_write_port_w)
805   AM_RANGE(0x91, 0x91) AM_DEVWRITE_LEGACY("ym3", ym2203_control_port_w)
801   AM_RANGE(0x10, 0x11) AM_DEVWRITE("ym1", ym2203_device, write)
802   AM_RANGE(0x80, 0x80) AM_DEVWRITE("ym2", ym2203_device, write_port_w)
803   AM_RANGE(0x81, 0x81) AM_DEVWRITE("ym2", ym2203_device, control_port_w)
804   AM_RANGE(0x90, 0x90) AM_DEVWRITE("ym3", ym2203_device, write_port_w)
805   AM_RANGE(0x91, 0x91) AM_DEVWRITE("ym3", ym2203_device, control_port_w)
806806ADDRESS_MAP_END
807807
808808static ADDRESS_MAP_START( jongbou_sound_portmap, AS_IO, 8, alpha68k_state )
r22764r22765
18331833   m_sound_pa_latch = data & 1;
18341834}
18351835
1836static const ym2203_interface ym2203_config =
1836static const ay8910_interface ym2203_ay8910_config =
18371837{
1838   {
1839      AY8910_LEGACY_OUTPUT,
1840      AY8910_DEFAULT_LOADS,
1841      DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
1842      DEVCB_NULL,
1843      DEVCB_DRIVER_MEMBER(alpha68k_state, porta_w),
1844      DEVCB_NULL
1845   },
1838   AY8910_LEGACY_OUTPUT,
1839   AY8910_DEFAULT_LOADS,
1840   DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
1841   DEVCB_NULL,
1842   DEVCB_DRIVER_MEMBER(alpha68k_state, porta_w),
18461843   DEVCB_NULL
18471844};
18481845
r22764r22765
21462143   MCFG_SPEAKER_STANDARD_MONO("mono")
21472144
21482145   MCFG_SOUND_ADD("ym1", YM2203, 3000000)
2149   MCFG_SOUND_CONFIG(ym2203_config)
2146   MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
21502147   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
21512148
21522149   MCFG_SOUND_ADD("ym2", YM2413, 3579545)
r22764r22765
21952192   MCFG_SPEAKER_STANDARD_MONO("mono")
21962193
21972194   MCFG_SOUND_ADD("ym1", YM2203, 3000000)
2198   MCFG_SOUND_CONFIG(ym2203_config)
2195   MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
21992196   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
22002197
22012198   MCFG_SOUND_ADD("ym2", YM2413, 3579545)
r22764r22765
22382235   MCFG_SPEAKER_STANDARD_MONO("mono")
22392236
22402237   MCFG_SOUND_ADD("ym1", YM2203, 3000000)
2241   MCFG_SOUND_CONFIG(ym2203_config)
2238   MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
22422239   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
22432240
22442241   MCFG_SOUND_ADD("ym2", YM2413, 3579545)
r22764r22765
22802277   MCFG_SPEAKER_STANDARD_MONO("mono")
22812278
22822279   MCFG_SOUND_ADD("ym1", YM2203, 3000000)
2283   MCFG_SOUND_CONFIG(ym2203_config)
2280   MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config)
22842281   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
22852282
22862283   MCFG_SOUND_ADD("ym2", YM2413, 3579545)
trunk/src/mame/drivers/taito_o.c
r22764r22765
6464   AM_RANGE(0x000000, 0x01ffff) AM_ROM
6565   AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM
6666   AM_RANGE(0x200000, 0x20000f) AM_READWRITE(io_r, io_w) /* TC0220IOC ? */
67   AM_RANGE(0x300000, 0x300003) AM_DEVREADWRITE8_LEGACY("ymsnd", ym2203_r, ym2203_w, 0x00ff)
67   AM_RANGE(0x300000, 0x300003) AM_DEVREADWRITE8("ymsnd", ym2203_device, read, write, 0x00ff)
6868   AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
6969   AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
7070ADDRESS_MAP_END
r22764r22765
223223      m_maincpu->set_input_line(5, HOLD_LINE);
224224}
225225
226static const ym2203_interface ym2203_config =
226static const ay8910_interface ay8910_config =
227227{
228   {
229      AY8910_LEGACY_OUTPUT,
230      AY8910_DEFAULT_LOADS,
231      DEVCB_INPUT_PORT("DSWA"),DEVCB_INPUT_PORT("DSWB"),
232      DEVCB_NULL, DEVCB_NULL,
233   },
234   DEVCB_NULL
228   AY8910_LEGACY_OUTPUT,
229   AY8910_DEFAULT_LOADS,
230   DEVCB_INPUT_PORT("DSWA"),DEVCB_INPUT_PORT("DSWB"),
231   DEVCB_NULL, DEVCB_NULL,
235232};
236233
237234static const tc0080vco_interface parentj_intf =
r22764r22765
267264   MCFG_SPEAKER_STANDARD_MONO("mono")
268265
269266   MCFG_SOUND_ADD("ymsnd", YM2203, 2000000) /*?? MHz */
270   MCFG_SOUND_CONFIG(ym2203_config)
267   MCFG_YM2203_AY8910_INTF(&ay8910_config)
271268   MCFG_SOUND_ROUTE(0, "mono",  0.25)
272269   MCFG_SOUND_ROUTE(0, "mono", 0.25)
273270   MCFG_SOUND_ROUTE(1, "mono",  1.0)
trunk/src/mame/drivers/suna8.c
r22764r22765
11971197
11981198static ADDRESS_MAP_START( rranger_sound_map, AS_PROGRAM, 8, suna8_state )
11991199   AM_RANGE(0x0000, 0x7fff) AM_ROM // ROM
1200   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ym1", ym2203_w         )   // Samples + Music
1201   AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("ym2", ym2203_w         )   // Music + FX
1200   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ym1", ym2203_device, write)   // Samples + Music
1201   AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ym2", ym2203_device, write)   // Music + FX
12021202   AM_RANGE(0xc000, 0xc7ff) AM_RAM // RAM
12031203   AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_byte_w                )   // To Sound CPU
12041204   AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r                  )   // From Main CPU
r22764r22765
18451845
18461846/* 1 x 24 MHz crystal */
18471847
1848static const ym2203_interface rranger_ym2203_interface =
1848static const ay8910_interface ay8910_config =
18491849{
1850   {
18511850   AY8910_LEGACY_OUTPUT,
18521851   AY8910_DEFAULT_LOADS,
18531852   DEVCB_NULL,
18541853   DEVCB_NULL,
18551854   DEVCB_DRIVER_MEMBER(suna8_state, rranger_play_samples_w),
18561855   DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w),
1857   },
1858   DEVCB_NULL
18591856};
18601857
18611858/* 2203 + 8910 */
r22764r22765
18881885   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
18891886
18901887   MCFG_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 6)
1891   MCFG_SOUND_CONFIG(rranger_ym2203_interface)
1888   MCFG_YM2203_AY8910_INTF(&ay8910_config)
18921889   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
18931890   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
18941891
trunk/src/mame/drivers/gng.c
r22764r22765
7070   AM_RANGE(0x0000, 0x7fff) AM_ROM
7171   AM_RANGE(0xc000, 0xc7ff) AM_RAM
7272   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
73   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
74   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
73   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ym1", ym2203_device, write)
74   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE("ym2", ym2203_device, write)
7575ADDRESS_MAP_END
7676
7777
trunk/src/mame/drivers/dfruit.c
r22764r22765
178178static ADDRESS_MAP_START( dfruit_map, AS_PROGRAM, 8, dfruit_state )
179179   AM_IMPORT_FROM(tc0091lvc_map)
180180   AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
181   AM_RANGE(0xa004, 0xa005) AM_DEVREADWRITE_LEGACY("opn",ym2203_r,ym2203_w)
181   AM_RANGE(0xa004, 0xa005) AM_DEVREADWRITE("opn", ym2203_device, read, write)
182182   AM_RANGE(0xa008, 0xa008) AM_READNOP //watchdog
183183ADDRESS_MAP_END
184184
r22764r22765
368368   }
369369}
370370
371static const ym2203_interface ym2203_config =
371static const ay8910_interface ay8910_config =
372372{
373   {
374      AY8910_LEGACY_OUTPUT,
375      AY8910_DEFAULT_LOADS,
376      DEVCB_INPUT_PORT("IN4"), DEVCB_INPUT_PORT("IN5"), DEVCB_NULL, DEVCB_NULL,
377   },
378   DEVCB_NULL
373   AY8910_LEGACY_OUTPUT,
374   AY8910_DEFAULT_LOADS,
375   DEVCB_INPUT_PORT("IN4"), DEVCB_INPUT_PORT("IN5"), DEVCB_NULL, DEVCB_NULL,
379376};
380377
381378
r22764r22765
410407   /* sound hardware */
411408   MCFG_SPEAKER_STANDARD_MONO("mono")
412409   MCFG_SOUND_ADD("opn", YM2203, MASTER_CLOCK/4)
413   MCFG_SOUND_CONFIG(ym2203_config)
410   MCFG_YM2203_AY8910_INTF(&ay8910_config)
414411   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
415412MACHINE_CONFIG_END
416413
trunk/src/mame/drivers/cave.c
r22764r22765
10571057   AM_RANGE(0x00, 0x00) AM_WRITE(hotdogst_rombank_w)                   // ROM bank
10581058   AM_RANGE(0x30, 0x30) AM_READ(soundlatch_lo_r)                       // From Main CPU
10591059   AM_RANGE(0x40, 0x40) AM_READ(soundlatch_hi_r)                       //
1060   AM_RANGE(0x50, 0x51) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)    //
1060   AM_RANGE(0x50, 0x51) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)   //
10611061   AM_RANGE(0x60, 0x60) AM_DEVREADWRITE("oki", okim6295_device, read, write)   // M6295
10621062   AM_RANGE(0x70, 0x70) AM_WRITE(hotdogst_okibank_w)                   // Samples bank
10631063ADDRESS_MAP_END
r22764r22765
10871087   AM_RANGE(0x00, 0x00) AM_WRITE(mazinger_rombank_w)   // ROM bank
10881088   AM_RANGE(0x10, 0x10) AM_WRITE(soundlatch_ack_w)     // To Main CPU
10891089   AM_RANGE(0x30, 0x30) AM_READ(soundlatch_lo_r)       // From Main CPU
1090   AM_RANGE(0x50, 0x51) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)  // YM2203
1091   AM_RANGE(0x52, 0x53) AM_DEVREAD_LEGACY("ymsnd", ym2203_r)   // YM2203
1090   AM_RANGE(0x50, 0x51) AM_DEVWRITE("ymsnd", ym2203_device, write) // YM2203
1091   AM_RANGE(0x52, 0x53) AM_DEVREAD("ymsnd", ym2203_device, read)   // YM2203
10921092   AM_RANGE(0x70, 0x70) AM_DEVWRITE("oki", okim6295_device, write) // M6295
10931093   AM_RANGE(0x74, 0x74) AM_WRITE(hotdogst_okibank_w)   // Samples bank
10941094ADDRESS_MAP_END
r22764r22765
11651165   AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki1", okim6295_device, read, write)  // M6295
11661166   AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("oki2", okim6295_device, read, write)  //
11671167   AM_RANGE(0x10, 0x17) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w)         // Samples bank
1168   AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)        //
1168   AM_RANGE(0x40, 0x41) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)   //
11691169   AM_RANGE(0x50, 0x50) AM_WRITE(soundlatch_ack_w)                         // To Main CPU
11701170//  AM_RANGE(0x51, 0x51) AM_WRITENOP                                         // ?? volume
11711171   AM_RANGE(0x80, 0x80) AM_WRITE(pwrinst2_rombank_w)                       // ROM bank
r22764r22765
18021802   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
18031803}
18041804
1805static const ym2203_interface ym2203_config =
1805static const ay8910_interface ay8910_config =
18061806{
1807   {
1808      AY8910_LEGACY_OUTPUT,
1809      AY8910_DEFAULT_LOADS,
1810      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
1811   },
1812   DEVCB_DRIVER_LINE_MEMBER(cave_state,irqhandler)
1807   AY8910_LEGACY_OUTPUT,
1808   AY8910_DEFAULT_LOADS,
1809   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
18131810};
18141811
18151812/***************************************************************************
r22764r22765
21062103   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
21072104
21082105   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_4MHz)
2109   MCFG_SOUND_CONFIG(ym2203_config)
2106   MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
2107   MCFG_YM2203_AY8910_INTF(&ay8910_config)
21102108   MCFG_SOUND_ROUTE(0, "lspeaker",  0.20)
21112109   MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
21122110   MCFG_SOUND_ROUTE(1, "lspeaker",  0.20)
r22764r22765
22122210   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
22132211
22142212   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_4MHz)
2215   MCFG_SOUND_CONFIG(ym2203_config)
2213   MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
2214   MCFG_YM2203_AY8910_INTF(&ay8910_config)
22162215   MCFG_SOUND_ROUTE(0, "lspeaker",  0.20)
22172216   MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
22182217   MCFG_SOUND_ROUTE(1, "lspeaker",  0.20)
r22764r22765
23812380   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
23822381
23832382   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz / 4)
2384   MCFG_SOUND_CONFIG(ym2203_config)
2383   MCFG_YM2203_IRQ_HANDLER(WRITELINE(cave_state, irqhandler))
2384   MCFG_YM2203_AY8910_INTF(&ay8910_config)
23852385   MCFG_SOUND_ROUTE(0, "lspeaker",  0.40)
23862386   MCFG_SOUND_ROUTE(0, "rspeaker", 0.40)
23872387   MCFG_SOUND_ROUTE(1, "lspeaker",  0.40)
trunk/src/mame/drivers/dec8.c
r22764r22765
845845/* Used for Cobra Command, Maze Hunter, Super Real Darwin etc */
846846static ADDRESS_MAP_START( dec8_s_map, AS_PROGRAM, 8, dec8_state )
847847   AM_RANGE(0x0000, 0x05ff) AM_RAM
848   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
848   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym1", ym2203_device, write)
849849   AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
850850   AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
851851   AM_RANGE(0x8000, 0xffff) AM_ROM
r22764r22765
854854/* Used by Gondomania, Psycho-Nics Oscar & Garyo Retsuden */
855855static ADDRESS_MAP_START( oscar_s_map, AS_PROGRAM, 8, dec8_state )
856856   AM_RANGE(0x0000, 0x05ff) AM_RAM
857   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
857   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym1", ym2203_device, write)
858858   AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
859859   AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
860860   AM_RANGE(0x8000, 0xffff) AM_ROM
r22764r22765
863863/* Used by Last Mission, Shackled & Breywood */
864864static ADDRESS_MAP_START( ym3526_s_map, AS_PROGRAM, 8, dec8_state )
865865   AM_RANGE(0x0000, 0x05ff) AM_RAM
866   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
866   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
867867   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
868868   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
869869   AM_RANGE(0x8000, 0xffff) AM_ROM
r22764r22765
872872/* Captain Silver - same sound system as Pocket Gal */
873873static ADDRESS_MAP_START( csilver_s_map, AS_PROGRAM, 8, dec8_state )
874874   AM_RANGE(0x0000, 0x07ff) AM_RAM
875   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
875   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
876876   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
877877   AM_RANGE(0x1800, 0x1800) AM_WRITE(csilver_adpcm_data_w) /* ADPCM data for the MSM5205 chip */
878878   AM_RANGE(0x2000, 0x2000) AM_WRITE(csilver_sound_bank_w)
trunk/src/mame/drivers/psychic5.c
r22764r22765
429429
430430static ADDRESS_MAP_START( psychic5_soundport_map, AS_IO, 8, psychic5_state )
431431   ADDRESS_MAP_GLOBAL_MASK(0xff)
432   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
433   AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
432   AM_RANGE(0x00, 0x01) AM_DEVWRITE("ym1", ym2203_device, write)
433   AM_RANGE(0x80, 0x81) AM_DEVWRITE("ym2", ym2203_device, write)
434434ADDRESS_MAP_END
435435
436436
r22764r22765
462462
463463static ADDRESS_MAP_START( bombsa_soundport_map, AS_IO, 8, psychic5_state )
464464   ADDRESS_MAP_GLOBAL_MASK(0xff)
465   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
466   AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
465   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
466   AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
467467ADDRESS_MAP_END
468468
469469
r22764r22765
648648   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
649649}
650650
651static const ym2203_interface ym2203_config =
651static const ay8910_interface ay8910_config =
652652{
653   {
654      AY8910_LEGACY_OUTPUT,
655      AY8910_DEFAULT_LOADS,
656      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
657   },
658   DEVCB_DRIVER_LINE_MEMBER(psychic5_state,irqhandler)
653   AY8910_LEGACY_OUTPUT,
654   AY8910_DEFAULT_LOADS,
655   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
659656};
660657
661658static MACHINE_CONFIG_START( psychic5, psychic5_state )
r22764r22765
690687   MCFG_SPEAKER_STANDARD_MONO("mono")
691688
692689   MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
693   MCFG_SOUND_CONFIG(ym2203_config)
690   MCFG_YM2203_IRQ_HANDLER(WRITELINE(psychic5_state, irqhandler))
691   MCFG_YM2203_AY8910_INTF(&ay8910_config)
694692   MCFG_SOUND_ROUTE(0, "mono", 0.15)
695693   MCFG_SOUND_ROUTE(1, "mono", 0.15)
696694   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
734732   MCFG_SPEAKER_STANDARD_MONO("mono")
735733
736734   MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
737   MCFG_SOUND_CONFIG(ym2203_config)
735   MCFG_YM2203_IRQ_HANDLER(WRITELINE(psychic5_state, irqhandler))
736   MCFG_YM2203_AY8910_INTF(&ay8910_config)
738737   MCFG_SOUND_ROUTE(0, "mono", 0.30)
739738   MCFG_SOUND_ROUTE(1, "mono", 0.30)
740739   MCFG_SOUND_ROUTE(2, "mono", 0.30)
trunk/src/mame/drivers/sidearms.c
r22764r22765
114114   AM_RANGE(0x0000, 0x7fff) AM_ROM
115115   AM_RANGE(0xc000, 0xc7ff) AM_RAM
116116   AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r)
117   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
118   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
117   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
118   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
119119ADDRESS_MAP_END
120120
121121/* Whizz */
r22764r22765
594594   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
595595}
596596
597static const ym2203_interface ym2203_config =
597static const ay8910_interface ay8910_config =
598598{
599   {
600      AY8910_LEGACY_OUTPUT,
601      AY8910_DEFAULT_LOADS,
602      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
603   },
604   DEVCB_DRIVER_LINE_MEMBER(sidearms_state, irqhandler)
599   AY8910_LEGACY_OUTPUT,
600   AY8910_DEFAULT_LOADS,
601   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
605602};
606603
607604static MACHINE_CONFIG_START( sidearms, sidearms_state )
r22764r22765
633630   MCFG_SPEAKER_STANDARD_MONO("mono")
634631
635632   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
636   MCFG_SOUND_CONFIG(ym2203_config)
633   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
634   MCFG_YM2203_AY8910_INTF(&ay8910_config)
637635   MCFG_SOUND_ROUTE(0, "mono", 0.15)
638636   MCFG_SOUND_ROUTE(1, "mono", 0.15)
639637   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
675673   MCFG_SPEAKER_STANDARD_MONO("mono")
676674
677675   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
678   MCFG_SOUND_CONFIG(ym2203_config)
676   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
677   MCFG_YM2203_AY8910_INTF(&ay8910_config)
679678   MCFG_SOUND_ROUTE(0, "mono", 0.15)
680679   MCFG_SOUND_ROUTE(1, "mono", 0.15)
681680   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/taito_b.c
r22764r22765
725725   AM_RANGE(0x0000, 0x3fff) AM_ROM
726726   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
727727   AM_RANGE(0x8000, 0x8fff) AM_RAM
728   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
728   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
729729   AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
730730   AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
731731ADDRESS_MAP_END
r22764r22765
749749   AM_RANGE(0x0000, 0x3fff) AM_ROM
750750   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
751751   AM_RANGE(0x8000, 0x8fff) AM_RAM
752   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
752   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
753753   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("oki", okim6295_device, read, write)       /* yes, both addresses for the same chip */
754754   AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
755755   AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
r22764r22765
18951895   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
18961896}
18971897
1898static const ym2203_interface ym2203_config =
1898static const ay8910_interface ay8910_config =
18991899{
1900   {
1901      AY8910_LEGACY_OUTPUT,
1902      AY8910_DEFAULT_LOADS,
1903      DEVCB_NULL,
1904      DEVCB_NULL,
1905      DEVCB_DRIVER_MEMBER(taitob_state, bankswitch_w),
1906      DEVCB_NULL,
1907   },
1908   DEVCB_DRIVER_LINE_MEMBER(taitob_state,irqhandler)
1900   AY8910_LEGACY_OUTPUT,
1901   AY8910_DEFAULT_LOADS,
1902   DEVCB_NULL,
1903   DEVCB_NULL,
1904   DEVCB_DRIVER_MEMBER(taitob_state, bankswitch_w),
1905   DEVCB_NULL,
19091906};
19101907
19111908/*
r22764r22765
22192216   MCFG_SPEAKER_STANDARD_MONO("mono")
22202217
22212218   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
2222   MCFG_SOUND_CONFIG(ym2203_config)
2219   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
2220   MCFG_YM2203_AY8910_INTF(&ay8910_config)
22232221   MCFG_SOUND_ROUTE(0, "mono", 0.25)
22242222   MCFG_SOUND_ROUTE(1, "mono", 0.25)
22252223   MCFG_SOUND_ROUTE(2, "mono", 0.25)
r22764r22765
22642262   MCFG_SPEAKER_STANDARD_MONO("mono")
22652263
22662264   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
2267   MCFG_SOUND_CONFIG(ym2203_config)
2265   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
2266   MCFG_YM2203_AY8910_INTF(&ay8910_config)
22682267   MCFG_SOUND_ROUTE(0, "mono", 0.25)
22692268   MCFG_SOUND_ROUTE(1, "mono", 0.25)
22702269   MCFG_SOUND_ROUTE(2, "mono", 0.25)
r22764r22765
25872586   MCFG_SPEAKER_STANDARD_MONO("mono")
25882587
25892588   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
2590   MCFG_SOUND_CONFIG(ym2203_config)
2589   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
2590   MCFG_YM2203_AY8910_INTF(&ay8910_config)
25912591   MCFG_SOUND_ROUTE(0, "mono", 0.25)
25922592   MCFG_SOUND_ROUTE(1, "mono", 0.25)
25932593   MCFG_SOUND_ROUTE(2, "mono", 0.25)
r22764r22765
26342634   MCFG_SPEAKER_STANDARD_MONO("mono")
26352635
26362636   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
2637   MCFG_SOUND_CONFIG(ym2203_config)
2637   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitob_state, irqhandler))
2638   MCFG_YM2203_AY8910_INTF(&ay8910_config)
26382639   MCFG_SOUND_ROUTE(0, "mono", 0.25)
26392640   MCFG_SOUND_ROUTE(1, "mono", 0.25)
26402641   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/bladestl.c
r22764r22765
139139
140140static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bladestl_state )
141141   AM_RANGE(0x0000, 0x07ff) AM_RAM
142   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)    /* YM2203 */
142   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)    /* YM2203 */
143143   AM_RANGE(0x3000, 0x3000) AM_WRITE(bladestl_speech_ctrl_w)   /* UPD7759 */
144144   AM_RANGE(0x4000, 0x4000) AM_READ(bladestl_speech_busy_r)    /* UPD7759 */
145145   AM_RANGE(0x5000, 0x5000) AM_WRITENOP                                /* ??? */
r22764r22765
271271 *
272272 *************************************/
273273
274static const ym2203_interface ym2203_config =
274static const ay8910_interface ay8910_config =
275275{
276   {
277      AY8910_LEGACY_OUTPUT,
278      AY8910_DEFAULT_LOADS,
279      DEVCB_NULL,
280      DEVCB_NULL,
281      DEVCB_DEVICE_HANDLER("upd", upd7759_port_w),
282      DEVCB_DRIVER_MEMBER(bladestl_state,bladestl_port_B_w)
283   },
284   DEVCB_NULL
276   AY8910_LEGACY_OUTPUT,
277   AY8910_DEFAULT_LOADS,
278   DEVCB_NULL,
279   DEVCB_NULL,
280   DEVCB_DEVICE_HANDLER("upd", upd7759_port_w),
281   DEVCB_DRIVER_MEMBER(bladestl_state,bladestl_port_B_w)
285282};
286283
287284static const k007342_interface bladestl_k007342_intf =
r22764r22765
355352   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
356353
357354   MCFG_SOUND_ADD("ymsnd", YM2203, 3579545)
358   MCFG_SOUND_CONFIG(ym2203_config)
355   MCFG_YM2203_AY8910_INTF(&ay8910_config)
359356   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.45)
360357MACHINE_CONFIG_END
361358
trunk/src/mame/drivers/srumbler.c
r22764r22765
9999
100100static ADDRESS_MAP_START( srumbler_sound_map, AS_PROGRAM, 8, srumbler_state )
101101   AM_RANGE(0x0000, 0x7fff) AM_ROM
102   AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
103   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
102   AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ym1", ym2203_device, write)
103   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ym2", ym2203_device, write)
104104   AM_RANGE(0xc000, 0xc7ff) AM_RAM
105105   AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r)
106106ADDRESS_MAP_END
trunk/src/mame/drivers/pushman.c
r22764r22765
166166
167167static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, pushman_state )
168168   ADDRESS_MAP_GLOBAL_MASK(0xff)
169   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
170   AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
169   AM_RANGE(0x00, 0x01) AM_DEVWRITE("ym1", ym2203_device, write)
170   AM_RANGE(0x80, 0x81) AM_DEVWRITE("ym2", ym2203_device, write)
171171ADDRESS_MAP_END
172172
173173static ADDRESS_MAP_START( bballs_map, AS_PROGRAM, 16, pushman_state )
r22764r22765
383383   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
384384}
385385
386static const ym2203_interface ym2203_config =
386static const ay8910_interface ay8910_config =
387387{
388   {
389      AY8910_LEGACY_OUTPUT,
390      AY8910_DEFAULT_LOADS,
391      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
392   },
393   DEVCB_DRIVER_LINE_MEMBER(pushman_state,irqhandler)
388   AY8910_LEGACY_OUTPUT,
389   AY8910_DEFAULT_LOADS,
390   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
394391};
395392
396393
r22764r22765
447444   MCFG_SPEAKER_STANDARD_MONO("mono")
448445
449446   MCFG_SOUND_ADD("ym1", YM2203, 2000000)
450   MCFG_SOUND_CONFIG(ym2203_config)
447   MCFG_YM2203_IRQ_HANDLER(WRITELINE(pushman_state, irqhandler))
448   MCFG_YM2203_AY8910_INTF(&ay8910_config)
451449   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
452450
453451   MCFG_SOUND_ADD("ym2", YM2203, 2000000)
r22764r22765
492490   MCFG_SPEAKER_STANDARD_MONO("mono")
493491
494492   MCFG_SOUND_ADD("ym1", YM2203, 2000000)
495   MCFG_SOUND_CONFIG(ym2203_config)
493   MCFG_YM2203_IRQ_HANDLER(WRITELINE(pushman_state, irqhandler))
494   MCFG_YM2203_AY8910_INTF(&ay8910_config)
496495   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
497496
498497   MCFG_SOUND_ADD("ym2", YM2203, 2000000)
trunk/src/mame/drivers/exprraid.c
r22764r22765
269269
270270static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, exprraid_state )
271271   AM_RANGE(0x0000, 0x1fff) AM_RAM
272   AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
272   AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
273273   AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w)
274274   AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
275275   AM_RANGE(0x8000, 0xffff) AM_ROM
trunk/src/mame/drivers/wc90b.c
r22764r22765
176176   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank3")
177177   AM_RANGE(0xe000, 0xe000) AM_WRITE(adpcm_control_w)
178178   AM_RANGE(0xe400, 0xe400) AM_WRITE(adpcm_data_w)
179   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
179   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
180180   AM_RANGE(0xf000, 0xf7ff) AM_RAM
181181   AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r)
182182ADDRESS_MAP_END
r22764r22765
329329   //m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
330330}
331331
332static const ym2203_interface ym2203_config =
332static const ay8910_interface ay8910_config =
333333{
334   {
335      AY8910_LEGACY_OUTPUT,
336      AY8910_DEFAULT_LOADS,
337      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
338   },
339   DEVCB_DRIVER_LINE_MEMBER(wc90b_state,irqhandler)
334   AY8910_LEGACY_OUTPUT,
335   AY8910_DEFAULT_LOADS,
336   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
340337};
341338
342339WRITE_LINE_MEMBER(wc90b_state::adpcm_int)
r22764r22765
388385   MCFG_SPEAKER_STANDARD_MONO("mono")
389386
390387   MCFG_SOUND_ADD("ymsnd", YM2203, YM2203_CLOCK)
391   MCFG_SOUND_CONFIG(ym2203_config)
388   MCFG_YM2203_IRQ_HANDLER(WRITELINE(wc90b_state, irqhandler))
389   MCFG_YM2203_AY8910_INTF(&ay8910_config)
392390   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
393391
394392   MCFG_SOUND_ADD("msm", MSM5205, MSM5205_CLOCK)
trunk/src/mame/drivers/citycon.c
r22764r22765
4545   AM_RANGE(0x0000, 0x0fff) AM_RAM
4646   AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)
4747//  AM_RANGE(0x4002, 0x4002) AM_DEVREAD_LEGACY("aysnd", ay8910_r)  /* ?? */
48   AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
48   AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
4949   AM_RANGE(0x8000, 0xffff) AM_ROM
5050ADDRESS_MAP_END
5151
r22764r22765
171171
172172
173173
174static const ym2203_interface ym2203_config =
174static const ay8910_interface ay8910_config =
175175{
176   {
177      AY8910_LEGACY_OUTPUT,
178      AY8910_DEFAULT_LOADS,
179      DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
180      DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r),
181      DEVCB_NULL,
182      DEVCB_NULL
183   },
176   AY8910_LEGACY_OUTPUT,
177   AY8910_DEFAULT_LOADS,
178   DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
179   DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r),
180   DEVCB_NULL,
184181   DEVCB_NULL
185182};
186183
r22764r22765
229226   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
230227
231228   MCFG_SOUND_ADD("ymsnd", YM2203, 1250000)
232   MCFG_SOUND_CONFIG(ym2203_config)
229   MCFG_YM2203_AY8910_INTF(&ay8910_config)
233230   MCFG_SOUND_ROUTE(0, "mono", 0.40)
234231   MCFG_SOUND_ROUTE(1, "mono", 0.40)
235232   MCFG_SOUND_ROUTE(2, "mono", 0.40)
trunk/src/mame/drivers/scotrsht.c
r22764r22765
8989
9090static ADDRESS_MAP_START( scotrsht_sound_port, AS_IO, 8, scotrsht_state )
9191   ADDRESS_MAP_GLOBAL_MASK(0xff)
92   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
92   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
9393ADDRESS_MAP_END
9494
9595
trunk/src/mame/drivers/capbowl.c
r22764r22765
259259
260260static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, capbowl_state )
261261   AM_RANGE(0x0000, 0x07ff) AM_RAM
262   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
262   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
263263   AM_RANGE(0x2000, 0x2000) AM_WRITENOP                /* Not hooked up according to the schematics */
264264   AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
265265   AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r)
r22764r22765
311311 *
312312 *************************************/
313313
314static const ym2203_interface ym2203_config =
314static const ay8910_interface ay8910_config =
315315{
316   {
317      AY8910_LEGACY_OUTPUT,
318      AY8910_DEFAULT_LOADS,
319      DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, read),
320      DEVCB_NULL,
321      DEVCB_NULL,
322      DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, write),  /* Also a status LED. See memory map above */
323   },
324   DEVCB_DRIVER_LINE_MEMBER(capbowl_state,firqhandler)
316   AY8910_LEGACY_OUTPUT,
317   AY8910_DEFAULT_LOADS,
318   DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, read),
319   DEVCB_NULL,
320   DEVCB_NULL,
321   DEVCB_DEVICE_MEMBER("ticket", ticket_dispenser_device, write),  /* Also a status LED. See memory map above */
325322};
326323
327324
r22764r22765
375372   MCFG_SPEAKER_STANDARD_MONO("mono")
376373
377374   MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK/2)
378   MCFG_SOUND_CONFIG(ym2203_config)
375   MCFG_YM2203_IRQ_HANDLER(WRITELINE(capbowl_state, firqhandler))
376   MCFG_YM2203_AY8910_INTF(&ay8910_config)
379377   MCFG_SOUND_ROUTE(0, "mono", 0.07)
380378   MCFG_SOUND_ROUTE(1, "mono", 0.07)
381379   MCFG_SOUND_ROUTE(2, "mono", 0.07)
trunk/src/mame/drivers/skyfox.c
r22764r22765
6767   AM_RANGE(0x0000, 0x7fff) AM_ROM                             // ROM
6868   AM_RANGE(0x8000, 0x87ff) AM_RAM                             // RAM
6969//  AM_RANGE(0x9000, 0x9001) AM_WRITENOP                        // ??
70   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)  // YM2203 #1
70   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym1", ym2203_device, read, write) // YM2203 #1
7171//  AM_RANGE(0xb000, 0xb001) AM_WRITENOP                        // ??
72   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)  // YM2203 #2
72   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ym2", ym2203_device, read, write) // YM2203 #2
7373   AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r)             // From Main CPU
7474ADDRESS_MAP_END
7575
trunk/src/mame/drivers/combatsc.c
r22764r22765
394394   AM_RANGE(0xc000, 0xc000) AM_WRITE(combatsc_voice_reset_w)           /* upd7759 reset? */
395395
396396   AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r)                             /* soundlatch_byte_r? */
397   AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)    /* YM 2203 intercepted */
397   AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)   /* YM 2203 intercepted */
398398ADDRESS_MAP_END
399399
400400WRITE8_MEMBER(combatsc_state::combatscb_dac_w)
r22764r22765
413413static ADDRESS_MAP_START( combatscb_sound_map, AS_PROGRAM, 8, combatsc_state )
414414   AM_RANGE(0x0000, 0x7fff) AM_ROM                                     /* ROM */
415415   AM_RANGE(0x8000, 0x87ff) AM_RAM                                     /* RAM */
416   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)    /* YM 2203 */
417   AM_RANGE(0x9008, 0x9009) AM_DEVREAD_LEGACY("ymsnd", ym2203_r)                   /* ??? */
416   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)   /* YM 2203 */
417   AM_RANGE(0x9008, 0x9009) AM_DEVREAD("ymsnd", ym2203_device, read)               /* ??? */
418418   AM_RANGE(0x9800, 0x9800) AM_WRITE(combatscb_dac_w)
419419   AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r)                     /* soundlatch_byte_r? */
420420   AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bl_abank")
r22764r22765
638638 *
639639 *************************************/
640640
641static const ym2203_interface ym2203_config =
641static const ay8910_interface ay8910_config =
642642{
643   {
644      AY8910_LEGACY_OUTPUT,
645      AY8910_DEFAULT_LOADS,
646      DEVCB_NULL,
647      DEVCB_NULL,
648      DEVCB_DRIVER_MEMBER(combatsc_state,combatsc_portA_w),
649      DEVCB_NULL
650   },
643   AY8910_LEGACY_OUTPUT,
644   AY8910_DEFAULT_LOADS,
645   DEVCB_NULL,
646   DEVCB_NULL,
647   DEVCB_DRIVER_MEMBER(combatsc_state,combatsc_portA_w),
651648   DEVCB_NULL
652649};
653650
654static const ym2203_interface ym2203_bootleg_config =
651static const ay8910_interface ay8910_bootleg_config =
655652{
656   {
657      AY8910_LEGACY_OUTPUT,
658      AY8910_DEFAULT_LOADS,
659      DEVCB_NULL,
660      DEVCB_NULL,
661      DEVCB_NULL,
662      DEVCB_NULL
663   },
653   AY8910_LEGACY_OUTPUT,
654   AY8910_DEFAULT_LOADS,
655   DEVCB_NULL,
656   DEVCB_NULL,
657   DEVCB_NULL,
664658   DEVCB_NULL
665659};
666660
r22764r22765
752746   MCFG_SPEAKER_STANDARD_MONO("mono")
753747
754748   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
755   MCFG_SOUND_CONFIG(ym2203_config)
749   MCFG_YM2203_AY8910_INTF(&ay8910_config)
756750   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
757751
758752   MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK)
r22764r22765
799793   MCFG_SPEAKER_STANDARD_MONO("mono")
800794
801795   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
802   MCFG_SOUND_CONFIG(ym2203_bootleg_config)
796   MCFG_YM2203_AY8910_INTF(&ay8910_bootleg_config)
803797   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
804798
805799   MCFG_SOUND_ADD("msm5205", MSM5205, 384000)
trunk/src/mame/drivers/quizpun2.c
r22764r22765
400400   AM_RANGE( 0x00, 0x00 ) AM_WRITENOP  // IRQ end
401401   AM_RANGE( 0x20, 0x20 ) AM_WRITENOP  // NMI end
402402   AM_RANGE( 0x40, 0x40 ) AM_READ(soundlatch_byte_r )
403   AM_RANGE( 0x60, 0x61 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w )
403   AM_RANGE( 0x60, 0x61 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write )
404404ADDRESS_MAP_END
405405
406406
trunk/src/mame/drivers/sandscrp.c
r22764r22765
323323static ADDRESS_MAP_START( sandscrp_soundport, AS_IO, 8, sandscrp_state )
324324   ADDRESS_MAP_GLOBAL_MASK(0xff)
325325   AM_RANGE(0x00, 0x00) AM_WRITE(sandscrp_bankswitch_w)    // ROM Bank
326   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)        // PORTA/B read
326   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)        // PORTA/B read
327327   AM_RANGE(0x04, 0x04) AM_DEVWRITE("oki", okim6295_device, write)     // OKIM6295
328328   AM_RANGE(0x06, 0x06) AM_WRITE(sandscrp_soundlatch_w)    //
329329   AM_RANGE(0x07, 0x07) AM_READ(sandscrp_soundlatch_r)     //
r22764r22765
468468   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
469469}
470470
471static const ym2203_interface ym2203_intf_sandscrp =
471static const ay8910_interface ay8910_config =
472472{
473   {
474      AY8910_LEGACY_OUTPUT,
475      AY8910_DEFAULT_LOADS,
476      DEVCB_INPUT_PORT("DSW1"), /* Port A Read */
477      DEVCB_INPUT_PORT("DSW2"), /* Port B Read */
478      DEVCB_NULL, /* Port A Write */
479      DEVCB_NULL, /* Port B Write */
480   },
481   DEVCB_DRIVER_LINE_MEMBER(sandscrp_state,irqhandler) /* IRQ handler */
473   AY8910_LEGACY_OUTPUT,
474   AY8910_DEFAULT_LOADS,
475   DEVCB_INPUT_PORT("DSW1"), /* Port A Read */
476   DEVCB_INPUT_PORT("DSW2"), /* Port B Read */
477   DEVCB_NULL, /* Port A Write */
478   DEVCB_NULL, /* Port B Write */
482479};
483480
484481
r22764r22765
532529   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
533530
534531   MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
535   MCFG_SOUND_CONFIG(ym2203_intf_sandscrp)
532   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sandscrp_state, irqhandler))
533   MCFG_YM2203_AY8910_INTF(&ay8910_config)
536534   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
537535   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
538536MACHINE_CONFIG_END
trunk/src/mame/drivers/homedata.c
r22764r22765
357357   coin_counter_w(machine(), 0, ~data & 0x80);
358358
359359   if (BIT(m_upd7807_portc, 5) && !BIT(data, 5))   /* write clock 1->0 */
360      ym2203_w(m_ym, space, BIT(data, 3), m_upd7807_porta);
360      m_ymsnd->write(space, BIT(data, 3), m_upd7807_porta);
361361
362362   if (BIT(m_upd7807_portc, 4) && !BIT(data, 4))   /* read clock 1->0 */
363      m_upd7807_porta = ym2203_r(m_ym, space, BIT(data, 3));
363      m_upd7807_porta = m_ymsnd->read(space, BIT(data, 3));
364364
365365   m_upd7807_portc = data;
366366}
r22764r22765
11401140
11411141MACHINE_START_MEMBER(homedata_state,homedata)
11421142{
1143   m_ym = machine().device("ymsnd");
11441143   m_sn = machine().device<sn76489a_device>("snsnd");
11451144
11461145   save_item(NAME(m_visible_page));
r22764r22765
12791278/**************************************************************************/
12801279
12811280
1282static const ym2203_interface ym2203_config =
1281static const ay8910_interface ay8910_config =
12831282{
1284   {
1285      AY8910_LEGACY_OUTPUT,
1286      AY8910_DEFAULT_LOADS,
1287      DEVCB_INPUT_PORT("DSW1"),
1288      DEVCB_INPUT_PORT("DSW2"),
1289      DEVCB_NULL,
1290      DEVCB_NULL
1291   },
1283   AY8910_LEGACY_OUTPUT,
1284   AY8910_DEFAULT_LOADS,
1285   DEVCB_INPUT_PORT("DSW1"),
1286   DEVCB_INPUT_PORT("DSW2"),
1287   DEVCB_NULL,
12921288   DEVCB_NULL
12931289};
12941290
r22764r22765
13371333   MCFG_SPEAKER_STANDARD_MONO("mono")
13381334
13391335   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
1340   MCFG_SOUND_CONFIG(ym2203_config)
1336   MCFG_YM2203_AY8910_INTF(&ay8910_config)
13411337   MCFG_SOUND_ROUTE(0, "mono", 0.25)
13421338   MCFG_SOUND_ROUTE(1, "mono", 0.25)
13431339   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/gladiatr.c
r22764r22765
396396
397397static ADDRESS_MAP_START( ppking_cpu2_io, AS_IO, 8, gladiatr_state )
398398   ADDRESS_MAP_GLOBAL_MASK(0xff)
399   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
399   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
400400   AM_RANGE(0x20, 0x21) AM_READ(qx1_r) AM_WRITE(qx1_w)
401401   AM_RANGE(0x40, 0x40) AM_READNOP
402402   AM_RANGE(0x60, 0x61) AM_READWRITE(qx2_r,qx2_w)
r22764r22765
443443
444444static ADDRESS_MAP_START( gladiatr_cpu2_io, AS_IO, 8, gladiatr_state )
445445   ADDRESS_MAP_GLOBAL_MASK(0xff)
446   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
446   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
447447   AM_RANGE(0x20, 0x21) AM_READWRITE_LEGACY(TAITO8741_1_r, TAITO8741_1_w)
448448   AM_RANGE(0x40, 0x40) AM_NOP // WRITE(sub_irq_ack_w)
449449   AM_RANGE(0x60, 0x61) AM_READWRITE_LEGACY(TAITO8741_2_r, TAITO8741_2_w)
r22764r22765
625625   return machine().rand();
626626}
627627
628static const ym2203_interface ppking_ym2203_interface =
628static const ay8910_interface ppking_ay8910_config =
629629{
630   {
631      AY8910_LEGACY_OUTPUT,
632      AY8910_DEFAULT_LOADS,
633      DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
634      DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
635      DEVCB_NULL,
636      DEVCB_NULL
637   },
630   AY8910_LEGACY_OUTPUT,
631   AY8910_DEFAULT_LOADS,
632   DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
633   DEVCB_DRIVER_MEMBER(gladiatr_state,f1_r),
634   DEVCB_NULL,
638635   DEVCB_NULL
639636};
640637
641static const ym2203_interface gladiatr_ym2203_interface =
638static const ay8910_interface ay8910_config =
642639{
643   {
644      AY8910_LEGACY_OUTPUT,
645      AY8910_DEFAULT_LOADS,
646      DEVCB_NULL,
647      DEVCB_INPUT_PORT("DSW3"),               /* port B read */
648      DEVCB_DRIVER_MEMBER(gladiatr_state,gladiator_int_control_w), /* port A write */
649      DEVCB_NULL,
650   },
651   DEVCB_DRIVER_LINE_MEMBER(gladiatr_state,gladiator_ym_irq)          /* NMI request for 2nd cpu */
640   AY8910_LEGACY_OUTPUT,
641   AY8910_DEFAULT_LOADS,
642   DEVCB_NULL,
643   DEVCB_INPUT_PORT("DSW3"),               /* port B read */
644   DEVCB_DRIVER_MEMBER(gladiatr_state,gladiator_int_control_w), /* port A write */
645   DEVCB_NULL,
652646};
653647
654648static const msm5205_interface msm5205_config =
r22764r22765
697691   MCFG_SPEAKER_STANDARD_MONO("mono")
698692
699693   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
700   MCFG_SOUND_CONFIG(ppking_ym2203_interface)
694   MCFG_YM2203_AY8910_INTF(&ppking_ay8910_config)
701695   MCFG_SOUND_ROUTE(0, "mono", 0.60)
702696   MCFG_SOUND_ROUTE(1, "mono", 0.60)
703697   MCFG_SOUND_ROUTE(2, "mono", 0.60)
r22764r22765
745739   MCFG_SPEAKER_STANDARD_MONO("mono")
746740
747741   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
748   MCFG_SOUND_CONFIG(gladiatr_ym2203_interface)
742   MCFG_YM2203_IRQ_HANDLER(WRITELINE(gladiatr_state, gladiator_ym_irq))
743   MCFG_YM2203_AY8910_INTF(&ay8910_config)
749744   MCFG_SOUND_ROUTE(0, "mono", 0.60)
750745   MCFG_SOUND_ROUTE(1, "mono", 0.60)
751746   MCFG_SOUND_ROUTE(2, "mono", 0.60)
trunk/src/mame/drivers/megasys1.c
r22764r22765
442442
443443static ADDRESS_MAP_START( z80_sound_io_map, AS_IO, 8, megasys1_state )
444444   ADDRESS_MAP_GLOBAL_MASK(0xff)
445   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
445   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
446446ADDRESS_MAP_END
447447
448448
r22764r22765
16401640}
16411641
16421642
1643static const ym2203_interface ym2203_config =
1643static const ay8910_interface ay8910_config =
16441644{
1645   {
1646      AY8910_LEGACY_OUTPUT,
1647      AY8910_DEFAULT_LOADS,
1648      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
1649   },
1650   DEVCB_DRIVER_LINE_MEMBER(megasys1_state,irqhandler)
1645   AY8910_LEGACY_OUTPUT,
1646   AY8910_DEFAULT_LOADS,
1647   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
16511648};
16521649
16531650static MACHINE_CONFIG_START( system_Z, megasys1_state )
r22764r22765
16781675   MCFG_SPEAKER_STANDARD_MONO("mono")
16791676
16801677   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
1681   MCFG_SOUND_CONFIG(ym2203_config)
1678   MCFG_YM2203_IRQ_HANDLER(WRITELINE(megasys1_state, irqhandler))
1679   MCFG_YM2203_AY8910_INTF(&ay8910_config)
16821680   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
16831681MACHINE_CONFIG_END
16841682
trunk/src/mame/drivers/airbustr.c
r22764r22765
388388static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, airbustr_state )
389389   ADDRESS_MAP_GLOBAL_MASK(0xff)
390390   AM_RANGE(0x00, 0x00) AM_WRITE(sound_bankswitch_w)
391   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
391   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
392392   AM_RANGE(0x04, 0x04) AM_DEVREADWRITE("oki", okim6295_device, read, write)
393393   AM_RANGE(0x06, 0x06) AM_READWRITE(soundcommand_r, soundcommand2_w)
394394ADDRESS_MAP_END
r22764r22765
529529
530530/* Sound Interfaces */
531531
532static const ym2203_interface ym2203_config =
532static const ay8910_interface ay8910_config =
533533{
534   {
535      AY8910_LEGACY_OUTPUT,
536      AY8910_DEFAULT_LOADS,
537      DEVCB_INPUT_PORT("DSW1"),       // DSW-1 connected to port A
538      DEVCB_INPUT_PORT("DSW2"),       // DSW-2 connected to port B
539      DEVCB_NULL,
540      DEVCB_NULL
541   },
534   AY8910_LEGACY_OUTPUT,
535   AY8910_DEFAULT_LOADS,
536   DEVCB_INPUT_PORT("DSW1"),       // DSW-1 connected to port A
537   DEVCB_INPUT_PORT("DSW2"),       // DSW-2 connected to port B
538   DEVCB_NULL,
542539   DEVCB_NULL
543540};
544541
r22764r22765
653650   MCFG_SPEAKER_STANDARD_MONO("mono")
654651
655652   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
656   MCFG_SOUND_CONFIG(ym2203_config)
653   MCFG_YM2203_AY8910_INTF(&ay8910_config)
657654   MCFG_SOUND_ROUTE(0, "mono", 0.25)
658655   MCFG_SOUND_ROUTE(1, "mono", 0.25)
659656   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/karnov.c
r22764r22765
433433static ADDRESS_MAP_START( karnov_sound_map, AS_PROGRAM, 8, karnov_state )
434434   AM_RANGE(0x0000, 0x05ff) AM_RAM
435435   AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r)
436   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
436   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym1", ym2203_device, write)
437437   AM_RANGE(0x1800, 0x1801) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
438438   AM_RANGE(0x8000, 0xffff) AM_ROM
439439ADDRESS_MAP_END
trunk/src/mame/drivers/lwings.c
r22764r22765
347347   AM_RANGE(0x0000, 0x7fff) AM_ROM
348348   AM_RANGE(0xc000, 0xc7ff) AM_RAM
349349   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
350   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("2203a", ym2203_w)
351   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("2203b", ym2203_w)
350   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("2203a", ym2203_device, write)
351   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE("2203b", ym2203_device, write)
352352   AM_RANGE(0xe006, 0xe006) AM_READ(avengers_soundlatch2_r) //AT: (avengers061gre)
353353   AM_RANGE(0xe006, 0xe006) AM_WRITEONLY AM_SHARE("soundlatch2")
354354ADDRESS_MAP_END
trunk/src/mame/drivers/blktiger.c
r22764r22765
116116   AM_RANGE(0x0000, 0x7fff) AM_ROM
117117   AM_RANGE(0xc000, 0xc7ff) AM_RAM
118118   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
119   AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
120   AM_RANGE(0xe002, 0xe003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
119   AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
120   AM_RANGE(0xe002, 0xe003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
121121ADDRESS_MAP_END
122122
123123static ADDRESS_MAP_START( blktiger_mcu_map, AS_PROGRAM, 8, blktiger_state )
r22764r22765
264264   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
265265}
266266
267static const ym2203_interface ym2203_config =
267static const ay8910_interface ay8910_config =
268268{
269   {
270         AY8910_LEGACY_OUTPUT,
271         AY8910_DEFAULT_LOADS,
272         DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
273   },
274   DEVCB_DRIVER_LINE_MEMBER(blktiger_state,irqhandler)
269   AY8910_LEGACY_OUTPUT,
270   AY8910_DEFAULT_LOADS,
271   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
275272};
276273
277274void blktiger_state::machine_start()
r22764r22765
341338   MCFG_SPEAKER_STANDARD_MONO("mono")
342339
343340   MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz) /* verified on pcb */
344   MCFG_SOUND_CONFIG(ym2203_config)
341   MCFG_YM2203_IRQ_HANDLER(WRITELINE(blktiger_state, irqhandler))
342   MCFG_YM2203_AY8910_INTF(&ay8910_config)
345343   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
346344
347345   MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */
trunk/src/mame/drivers/bublbobl.c
r22764r22765
306306static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bublbobl_state )
307307   AM_RANGE(0x0000, 0x7fff) AM_ROM
308308   AM_RANGE(0x8000, 0x8fff) AM_RAM
309   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
309   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
310310   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w)
311311   AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITE(bublbobl_sound_status_w)
312312   AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP
r22764r22765
396396   AM_RANGE(0x9800, 0x9800) AM_READNOP // ???
397397   AM_RANGE(0xa000, 0xa000) AM_WRITE(bublbobl_sh_nmi_disable_w)
398398   AM_RANGE(0xa800, 0xa800) AM_WRITE(bublbobl_sh_nmi_enable_w)
399   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
399   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
400400   AM_RANGE(0xe000, 0xffff) AM_ROM // space for diagnostic ROM?
401401ADDRESS_MAP_END
402402
r22764r22765
701701   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
702702}
703703
704static const ym2203_interface ym2203_config =
704static const ay8910_interface ay8910_config =
705705{
706   {
707      AY8910_LEGACY_OUTPUT,
708      AY8910_DEFAULT_LOADS,
709      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
710   },
711   DEVCB_DRIVER_LINE_MEMBER(bublbobl_state,irqhandler)
706   AY8910_LEGACY_OUTPUT,
707   AY8910_DEFAULT_LOADS,
708   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
712709};
713710
714711
r22764r22765
780777   MCFG_SPEAKER_STANDARD_MONO("mono")
781778
782779   MCFG_SOUND_ADD("ymsnd", YM2203, MAIN_XTAL/8)
783   MCFG_SOUND_CONFIG(ym2203_config)
780   MCFG_YM2203_IRQ_HANDLER(WRITELINE(bublbobl_state, irqhandler))
781   MCFG_YM2203_AY8910_INTF(&ay8910_config)
784782   MCFG_SOUND_ROUTE(0, "mono", 0.08)
785783   MCFG_SOUND_ROUTE(1, "mono", 0.08)
786784   MCFG_SOUND_ROUTE(2, "mono", 0.08)
r22764r22765
859857   MCFG_SPEAKER_STANDARD_MONO("mono")
860858
861859   MCFG_SOUND_ADD("ym1", YM2203, MAIN_XTAL/8)
862   MCFG_SOUND_CONFIG(ym2203_config)
860   MCFG_YM2203_IRQ_HANDLER(WRITELINE(bublbobl_state, irqhandler))
861   MCFG_YM2203_AY8910_INTF(&ay8910_config)
863862   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
864863
865864   MCFG_SOUND_ADD("ym2", YM3526, MAIN_XTAL/8)
trunk/src/mame/drivers/labyrunr.c
r22764r22765
4646static ADDRESS_MAP_START( labyrunr_map, AS_PROGRAM, 8, labyrunr_state )
4747   AM_RANGE(0x0000, 0x0007) AM_DEVWRITE_LEGACY("k007121", k007121_ctrl_w)
4848   AM_RANGE(0x0020, 0x005f) AM_RAM AM_SHARE("scrollram")
49   AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE_LEGACY("ym1", ym2203_read_port_r, ym2203_write_port_w)
50   AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_status_port_r, ym2203_control_port_w)
51   AM_RANGE(0x0900, 0x0900) AM_DEVREADWRITE_LEGACY("ym2", ym2203_read_port_r, ym2203_write_port_w)
52   AM_RANGE(0x0901, 0x0901) AM_DEVREADWRITE_LEGACY("ym2", ym2203_status_port_r, ym2203_control_port_w)
49   AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE("ym1", ym2203_device, read_port_r, write_port_w)
50   AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("ym1", ym2203_device, status_port_r, control_port_w)
51   AM_RANGE(0x0900, 0x0900) AM_DEVREADWRITE("ym2", ym2203_device, read_port_r, write_port_w)
52   AM_RANGE(0x0901, 0x0901) AM_DEVREADWRITE("ym2", ym2203_device, status_port_r, control_port_w)
5353   AM_RANGE(0x0a00, 0x0a00) AM_READ_PORT("P2")
5454   AM_RANGE(0x0a01, 0x0a01) AM_READ_PORT("P1")
5555   AM_RANGE(0x0b00, 0x0b00) AM_READ_PORT("SYSTEM")
r22764r22765
153153
154154***************************************************************************/
155155
156static const ym2203_interface ym2203_interface_1 =
156static const ay8910_interface ay8910_config_1 =
157157{
158   {
159      AY8910_LEGACY_OUTPUT,
160      AY8910_DEFAULT_LOADS,
161      DEVCB_INPUT_PORT("DSW1"),
162      DEVCB_INPUT_PORT("DSW2"),
163      DEVCB_NULL,
164      DEVCB_NULL
165   },
158   AY8910_LEGACY_OUTPUT,
159   AY8910_DEFAULT_LOADS,
160   DEVCB_INPUT_PORT("DSW1"),
161   DEVCB_INPUT_PORT("DSW2"),
162   DEVCB_NULL,
166163   DEVCB_NULL
167164};
168165
169static const ym2203_interface ym2203_interface_2 =
166static const ay8910_interface ay8910_config_2 =
170167{
171   {
172      AY8910_LEGACY_OUTPUT,
173      AY8910_DEFAULT_LOADS,
174      DEVCB_NULL,
175      DEVCB_INPUT_PORT("DSW3"),
176      DEVCB_NULL,
177      DEVCB_NULL
178   },
168   AY8910_LEGACY_OUTPUT,
169   AY8910_DEFAULT_LOADS,
170   DEVCB_NULL,
171   DEVCB_INPUT_PORT("DSW3"),
172   DEVCB_NULL,
179173   DEVCB_NULL
180174};
181175
r22764r22765
216210   MCFG_SPEAKER_STANDARD_MONO("mono")
217211
218212   MCFG_SOUND_ADD("ym1", YM2203, 3000000)
219   MCFG_SOUND_CONFIG(ym2203_interface_1)
213   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
220214   MCFG_SOUND_ROUTE(0, "mono", 0.40)
221215   MCFG_SOUND_ROUTE(1, "mono", 0.40)
222216   MCFG_SOUND_ROUTE(2, "mono", 0.40)
223217   MCFG_SOUND_ROUTE(3, "mono", 0.80)
224218
225219   MCFG_SOUND_ADD("ym2", YM2203, 3000000)
226   MCFG_SOUND_CONFIG(ym2203_interface_2)
220   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
227221   MCFG_SOUND_ROUTE(0, "mono", 0.40)
228222   MCFG_SOUND_ROUTE(1, "mono", 0.40)
229223   MCFG_SOUND_ROUTE(2, "mono", 0.40)
trunk/src/mame/drivers/powerins.c
r22764r22765
121121
122122static ADDRESS_MAP_START( powerins_sound_io_map, AS_IO, 8, powerins_state )
123123   ADDRESS_MAP_GLOBAL_MASK(0xff)
124   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym2203", ym2203_r, ym2203_w)
124   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym2203", ym2203_device, read, write)
125125   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
126126   AM_RANGE(0x88, 0x88) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
127127   AM_RANGE(0x90, 0x97) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w)
r22764r22765
322322   m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
323323}
324324
325static const ym2203_interface ym2203_config =
325static const ay8910_interface ay8910_config =
326326{
327   {
328         AY8910_LEGACY_OUTPUT,
329         AY8910_DEFAULT_LOADS,
330         DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
331   },
332   DEVCB_DRIVER_LINE_MEMBER(powerins_state,irqhandler)
327   AY8910_LEGACY_OUTPUT,
328   AY8910_DEFAULT_LOADS,
329   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
333330};
334331
335332static const nmk112_interface powerins_nmk112_intf =
r22764r22765
372369   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
373370
374371   MCFG_SOUND_ADD("ym2203", YM2203, 12000000 / 8)
375   MCFG_SOUND_CONFIG(ym2203_config)
372   MCFG_YM2203_IRQ_HANDLER(WRITELINE(powerins_state, irqhandler))
373   MCFG_YM2203_AY8910_INTF(&ay8910_config)
376374   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
377375
378376   MCFG_NMK112_ADD("nmk112", powerins_nmk112_intf)
trunk/src/mame/drivers/fcrash.c
r22764r22765
804804   AM_RANGE(0x0000, 0x7fff) AM_ROM
805805   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
806806   AM_RANGE(0xd000, 0xd7ff) AM_RAM
807   AM_RANGE(0xd800, 0xd801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
808   AM_RANGE(0xdc00, 0xdc01) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
807   AM_RANGE(0xd800, 0xd801) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
808   AM_RANGE(0xdc00, 0xdc01) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
809809   AM_RANGE(0xe000, 0xe000) AM_WRITE(fcrash_snd_bankswitch_w)
810810   AM_RANGE(0xe400, 0xe400) AM_READ(soundlatch_byte_r)
811811   AM_RANGE(0xe800, 0xe800) AM_WRITE(fcrash_msm5205_0_data_w)
trunk/src/mame/drivers/terracre.c
r22764r22765
243243
244244static ADDRESS_MAP_START( sound_2203_io_map, AS_IO, 8, terracre_state )
245245   ADDRESS_MAP_GLOBAL_MASK(0xff)
246   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
246   AM_RANGE(0x00, 0x01) AM_DEVWRITE("ym1", ym2203_device, write)
247247   AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_signed8)
248248   AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_signed8)
249249   AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
trunk/src/mame/drivers/ddribble.c
r22764r22765
138138
139139static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8, ddribble_state )
140140   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("snd_sharedram")       /* shared RAM with CPU #1 */
141   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)    /* YM2203 */
141   AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)    /* YM2203 */
142142   AM_RANGE(0x3000, 0x3000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w)          /* Speech data */
143143   AM_RANGE(0x8000, 0xffff) AM_ROM                                     /* ROM */
144144ADDRESS_MAP_END
r22764r22765
223223   GFXDECODE_ENTRY( "gfx2", 0x40000, spritelayout,  64, 16 )   /* colors  0-15 but using lookup table */
224224GFXDECODE_END
225225
226static const ym2203_interface ym2203_config =
226static const ay8910_interface ay8910_config =
227227{
228   {
229      AY8910_LEGACY_OUTPUT,
230      AY8910_DEFAULT_LOADS,
231      DEVCB_NULL,
232      DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_busy_r),
233      DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_ctrl_w),
234      DEVCB_NULL
235   },
228   AY8910_LEGACY_OUTPUT,
229   AY8910_DEFAULT_LOADS,
230   DEVCB_NULL,
231   DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_busy_r),
232   DEVCB_DRIVER_MEMBER(ddribble_state,ddribble_vlm5030_ctrl_w),
236233   DEVCB_NULL
237234};
238235
r22764r22765
310307   MCFG_SPEAKER_STANDARD_MONO("mono")
311308
312309   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_3_579545MHz) /* verified on pcb */
313   MCFG_SOUND_CONFIG(ym2203_config)
310   MCFG_YM2203_AY8910_INTF(&ay8910_config)
314311   MCFG_SOUND_ROUTE(0, "filter1", 0.25)
315312   MCFG_SOUND_ROUTE(1, "filter2", 0.25)
316313   MCFG_SOUND_ROUTE(2, "filter3", 0.25)
trunk/src/mame/drivers/seta.c
r22764r22765
30913091   AM_RANGE(0x1000, 0x1000) AM_WRITE(sub_bankswitch_lockout_w) // ROM Bank + Coin Lockout
30923092   AM_RANGE(0x1001, 0x1001) AM_READ_PORT("P2")                 // P2
30933093   AM_RANGE(0x1002, 0x1002) AM_READ_PORT("COINS")              // Coins
3094   AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
3094   AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
30953095   AM_RANGE(0x3000, 0x3001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
30963096   AM_RANGE(0x5000, 0x57ff) AM_RAM AM_SHARE("sharedram")       // Shared RAM
30973097   AM_RANGE(0x6000, 0x7fff) AM_ROM                             // ROM
r22764r22765
74397439                                Thundercade
74407440***************************************************************************/
74417441
7442static const ym2203_interface tndrcade_ym2203_interface =
7442static const ay8910_interface ay8910_config =
74437443{
7444   {
7445      AY8910_LEGACY_OUTPUT,
7446      AY8910_DEFAULT_LOADS,
7447      DEVCB_DRIVER_MEMBER(seta_state,dsw1_r),     /* input A: DSW 1 */
7448      DEVCB_DRIVER_MEMBER(seta_state,dsw2_r),     /* input B: DSW 2 */
7449      DEVCB_NULL,
7450      DEVCB_NULL
7451   },
7444   AY8910_LEGACY_OUTPUT,
7445   AY8910_DEFAULT_LOADS,
7446   DEVCB_DRIVER_MEMBER(seta_state,dsw1_r),     /* input A: DSW 1 */
7447   DEVCB_DRIVER_MEMBER(seta_state,dsw2_r),     /* input B: DSW 2 */
7448   DEVCB_NULL,
74527449   DEVCB_NULL
74537450};
74547451
r22764r22765
74947491   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
74957492
74967493   MCFG_SOUND_ADD("ym1", YM2203, 16000000/4)   /* 4 MHz */
7497   MCFG_SOUND_CONFIG(tndrcade_ym2203_interface)
7494   MCFG_YM2203_AY8910_INTF(&ay8910_config)
74987495   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.35)
74997496   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.35)
75007497
trunk/src/mame/drivers/darius.c
r22764r22765
464464static ADDRESS_MAP_START( darius_sound_map, AS_PROGRAM, 8, darius_state )
465465   AM_RANGE(0x0000, 0x7fff) AM_ROMBANK("bank1")
466466   AM_RANGE(0x8000, 0x8fff) AM_RAM
467   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
468   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
467   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
468   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
469469   AM_RANGE(0xb000, 0xb000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
470470   AM_RANGE(0xb001, 0xb001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
471471   AM_RANGE(0xc000, 0xc000) AM_WRITE(darius_fm0_pan)
r22764r22765
767767   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
768768}
769769
770static const ym2203_interface ym2203_interface_1 =
770static const ay8910_interface ay8910_config_1 =
771771{
772   {
773      AY8910_LEGACY_OUTPUT,
774      AY8910_DEFAULT_LOADS,
775      DEVCB_NULL,                 /* portA read */
776      DEVCB_NULL,
777      DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA0),  /* portA write */
778      DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB0),  /* portB write */
779   },
780   DEVCB_DRIVER_LINE_MEMBER(darius_state,irqhandler)
772   AY8910_LEGACY_OUTPUT,
773   AY8910_DEFAULT_LOADS,
774   DEVCB_NULL,                 /* portA read */
775   DEVCB_NULL,
776   DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA0),  /* portA write */
777   DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB0),  /* portB write */
781778};
782779
783static const ym2203_interface ym2203_interface_2 =
780static const ay8910_interface ay8910_config_2 =
784781{
785   {
786      AY8910_LEGACY_OUTPUT,
787      AY8910_DEFAULT_LOADS,
788      DEVCB_NULL,                 /* portA read */
789      DEVCB_NULL,
790      DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA1),  /* portA write */
791      DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB1)       /* portB write */
792   },
793   DEVCB_NULL
782   AY8910_LEGACY_OUTPUT,
783   AY8910_DEFAULT_LOADS,
784   DEVCB_NULL,                 /* portA read */
785   DEVCB_NULL,
786   DEVCB_DRIVER_MEMBER(darius_state,darius_write_portA1),  /* portA write */
787   DEVCB_DRIVER_MEMBER(darius_state,darius_write_portB1)       /* portB write */
794788};
795789
796790
r22764r22765
913907   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
914908
915909   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
916   MCFG_SOUND_CONFIG(ym2203_interface_1)
910   MCFG_YM2203_IRQ_HANDLER(WRITELINE(darius_state, irqhandler))
911   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
917912   MCFG_SOUND_ROUTE(0, "filter0.0l", 0.08)
918913   MCFG_SOUND_ROUTE(0, "filter0.0r", 0.08)
919914   MCFG_SOUND_ROUTE(1, "filter0.1l", 0.08)
r22764r22765
924919   MCFG_SOUND_ROUTE(3, "filter0.3r", 0.60)
925920
926921   MCFG_SOUND_ADD("ym2", YM2203, 4000000)
927   MCFG_SOUND_CONFIG(ym2203_interface_2)
922   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
928923   MCFG_SOUND_ROUTE(0, "filter1.0l", 0.08)
929924   MCFG_SOUND_ROUTE(0, "filter1.0r", 0.08)
930925   MCFG_SOUND_ROUTE(1, "filter1.1l", 0.08)
trunk/src/mame/drivers/quizdna.c
r22764r22765
6363   AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE")
6464   AM_RANGE(0xc0, 0xc0) AM_WRITE(quizdna_rombank_w)
6565   AM_RANGE(0xd0, 0xd0) AM_WRITE(quizdna_screen_ctrl_w)
66   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
66   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
6767   AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
6868ADDRESS_MAP_END
6969
r22764r22765
7878   AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE")
7979   AM_RANGE(0xc0, 0xc0) AM_WRITE(quizdna_rombank_w)
8080   AM_RANGE(0xd0, 0xd0) AM_WRITE(quizdna_screen_ctrl_w)
81   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
81   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
8282   AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
8383ADDRESS_MAP_END
8484
r22764r22765
9393   AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE")
9494   AM_RANGE(0xc0, 0xc0) AM_WRITE(gekiretu_rombank_w)
9595   AM_RANGE(0xd0, 0xd0) AM_WRITE(quizdna_screen_ctrl_w)
96   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
96   AM_RANGE(0xe0, 0xe1) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
9797   AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
9898ADDRESS_MAP_END
9999
r22764r22765
427427GFXDECODE_END
428428
429429
430static const ym2203_interface ym2203_config =
430static const ay8910_interface ay8910_config =
431431{
432   {
433      AY8910_LEGACY_OUTPUT,
434      AY8910_DEFAULT_LOADS,
435      DEVCB_INPUT_PORT("DSW3"),
436      DEVCB_INPUT_PORT("DSW2"),
437      DEVCB_NULL,
438      DEVCB_NULL
439   },
432   AY8910_LEGACY_OUTPUT,
433   AY8910_DEFAULT_LOADS,
434   DEVCB_INPUT_PORT("DSW3"),
435   DEVCB_INPUT_PORT("DSW2"),
436   DEVCB_NULL,
440437   DEVCB_NULL
441438};
442439
r22764r22765
465462   MCFG_SPEAKER_STANDARD_MONO("mono")
466463
467464   MCFG_SOUND_ADD("ymsnd", YM2203, MCLK/4)
468   MCFG_SOUND_CONFIG(ym2203_config)
465   MCFG_YM2203_AY8910_INTF(&ay8910_config)
469466   MCFG_SOUND_ROUTE(0, "mono", 0.10)
470467   MCFG_SOUND_ROUTE(1, "mono", 0.10)
471468   MCFG_SOUND_ROUTE(2, "mono", 0.10)
trunk/src/mame/drivers/chinagat.c
r22764r22765
363363// 8804 and/or 8805 make a gong sound when the coin goes in
364364// but only on the title screen....
365365
366   AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
366   AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
367367//  AM_RANGE(0x8802, 0x8802) AM_DEVREADWRITE("oki", okim6295_device, read, write)
368368//  AM_RANGE(0x8803, 0x8803) AM_DEVWRITE("oki", okim6295_device, write)
369   AM_RANGE(0x8804, 0x8805) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
369   AM_RANGE(0x8804, 0x8805) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
370370//  AM_RANGE(0x8804, 0x8804) AM_WRITEONLY
371371//  AM_RANGE(0x8805, 0x8805) AM_WRITEONLY
372372
r22764r22765
518518};
519519
520520/* This is only on the second bootleg board */
521static const ym2203_interface ym2203_config =
521static const ay8910_interface ay8910_config =
522522{
523   {
524      AY8910_LEGACY_OUTPUT,
525      AY8910_DEFAULT_LOADS,
526      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
527   },
528   DEVCB_DRIVER_LINE_MEMBER(chinagat_state,chinagat_irq_handler)
523   AY8910_LEGACY_OUTPUT,
524   AY8910_DEFAULT_LOADS,
525   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
529526};
530527
531528
r22764r22765
684681   MCFG_SPEAKER_STANDARD_MONO("mono")
685682
686683   MCFG_SOUND_ADD("ym1", YM2203, 3579545)
687   MCFG_SOUND_CONFIG(ym2203_config)
684   MCFG_YM2203_IRQ_HANDLER(WRITELINE(chinagat_state, chinagat_irq_handler))
685   MCFG_YM2203_AY8910_INTF(&ay8910_config)
688686   MCFG_SOUND_ROUTE(0, "mono", 0.50)
689687   MCFG_SOUND_ROUTE(1, "mono", 0.50)
690688   MCFG_SOUND_ROUTE(2, "mono", 0.50)
trunk/src/mame/drivers/darkseal.c
r22764r22765
8383
8484static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, darkseal_state )
8585   AM_RANGE(0x000000, 0x00ffff) AM_ROM
86   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
86   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
8787   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
8888   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
8989   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/xain.c
r22764r22765
437437static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xain_state )
438438   AM_RANGE(0x0000, 0x07ff) AM_RAM
439439   AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r)
440   AM_RANGE(0x2800, 0x2801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
441   AM_RANGE(0x3000, 0x3001) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
440   AM_RANGE(0x2800, 0x2801) AM_DEVWRITE("ym1", ym2203_device, write)
441   AM_RANGE(0x3000, 0x3001) AM_DEVWRITE("ym2", ym2203_device, write)
442442   AM_RANGE(0x4000, 0xffff) AM_ROM
443443ADDRESS_MAP_END
444444
r22764r22765
555555   m_audiocpu->set_input_line(M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
556556}
557557
558static const ym2203_interface ym2203_config =
558static const ay8910_interface ay8910_config =
559559{
560   {
561      AY8910_LEGACY_OUTPUT,
562      AY8910_DEFAULT_LOADS,
563      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
564   },
565   DEVCB_DRIVER_LINE_MEMBER(xain_state,irqhandler)
560   AY8910_LEGACY_OUTPUT,
561   AY8910_DEFAULT_LOADS,
562   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
566563};
567564
568565void xain_state::machine_start()
r22764r22765
605602   MCFG_SPEAKER_STANDARD_MONO("mono")
606603
607604   MCFG_SOUND_ADD("ym1", YM2203, MCU_CLOCK)
608   MCFG_SOUND_CONFIG(ym2203_config)
605   MCFG_YM2203_IRQ_HANDLER(WRITELINE(xain_state, irqhandler))
606   MCFG_YM2203_AY8910_INTF(&ay8910_config)
609607   MCFG_SOUND_ROUTE(0, "mono", 0.50)
610608   MCFG_SOUND_ROUTE(1, "mono", 0.50)
611609   MCFG_SOUND_ROUTE(2, "mono", 0.50)
trunk/src/mame/drivers/pipeline.c
r22764r22765
359359   DEVCB_NULL                          /* Port C write */
360360};
361361
362static const ym2203_interface ym2203_config =
362static const ay8910_interface ay8910_config =
363363{
364   {
365      AY8910_LEGACY_OUTPUT,
366      AY8910_DEFAULT_LOADS,
367      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
368   },
369   DEVCB_NULL
364   AY8910_LEGACY_OUTPUT,
365   AY8910_DEFAULT_LOADS,
366   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
370367};
371368
372369void pipeline_state::palette_init()
r22764r22765
425422   MCFG_SPEAKER_STANDARD_MONO("mono")
426423
427424   MCFG_SOUND_ADD("ymsnd", YM2203, 7372800/4)
428   MCFG_SOUND_CONFIG(ym2203_config)
425   MCFG_YM2203_AY8910_INTF(&ay8910_config)
429426   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
430427
431428MACHINE_CONFIG_END
trunk/src/mame/drivers/stadhero.c
r22764r22765
8585
8686static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, stadhero_state )
8787   AM_RANGE(0x0000, 0x05ff) AM_RAM
88   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
88   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
8989   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
9090   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
9191   AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write)
trunk/src/mame/drivers/vaportra.c
r22764r22765
7676
7777static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, vaportra_state )
7878   AM_RANGE(0x000000, 0x00ffff) AM_ROM
79   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
79   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
8080   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
8181   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
8282   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/chanbara.c
r22764r22765
227227   AM_RANGE(0x2001, 0x2001) AM_READ_PORT("SYSTEM")
228228   AM_RANGE(0x2002, 0x2002) AM_READ_PORT("P2")
229229   AM_RANGE(0x2003, 0x2003) AM_READ_PORT("P1")
230   AM_RANGE(0x3800, 0x3801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
230   AM_RANGE(0x3800, 0x3801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
231231   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
232232   AM_RANGE(0x8000, 0xffff) AM_ROM
233233ADDRESS_MAP_END
r22764r22765
369369}
370370
371371
372static const ym2203_interface ym2203_config =
372static const ay8910_interface ay8910_config =
373373{
374   {
375         AY8910_LEGACY_OUTPUT,
376         AY8910_DEFAULT_LOADS,
377         DEVCB_NULL,
378         DEVCB_NULL,
379         DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_0_w),
380         DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_1_w),
381   },
382   DEVCB_DRIVER_LINE_MEMBER(chanbara_state,sound_irq)
374   AY8910_LEGACY_OUTPUT,
375   AY8910_DEFAULT_LOADS,
376   DEVCB_NULL,
377   DEVCB_NULL,
378   DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_0_w),
379   DEVCB_DRIVER_MEMBER(chanbara_state,chanbara_ay_out_1_w),
383380};
384381
385382
r22764r22765
416413   MCFG_SPEAKER_STANDARD_MONO("mono")
417414
418415   MCFG_SOUND_ADD("ymsnd", YM2203, 12000000/8)
419   MCFG_SOUND_CONFIG(ym2203_config)
416   MCFG_YM2203_IRQ_HANDLER(WRITELINE(chanbara_state, sound_irq))
417   MCFG_YM2203_AY8910_INTF(&ay8910_config)
420418   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
421419MACHINE_CONFIG_END
422420
trunk/src/mame/drivers/taito_l.c
r22764r22765
470470
471471READ8_MEMBER(taitol_state::extport_select_and_ym2203_r)
472472{
473   device_t *device = machine().device("ymsnd");
474473   m_extport = (offset >> 1) & 1;
475   return ym2203_r(device, space, offset & 1);
474   return m_ymsnd->read(space, offset & 1);
476475}
477476
478477WRITE8_MEMBER(taitol_state::mcu_data_w)
r22764r22765
645644   AM_RANGE(0xff08, 0xff08) AM_READWRITE(rombankswitch_r, rombankswitch_w)
646645
647646#define COMMON_SINGLE_MAP \
648   AM_RANGE(0xa000, 0xa003) AM_READ(extport_select_and_ym2203_r) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w) \
647   AM_RANGE(0xa000, 0xa003) AM_READ(extport_select_and_ym2203_r) AM_DEVWRITE("ymsnd", ym2203_device, write) \
649648   AM_RANGE(0x8000, 0x9fff) AM_RAM
650649
651650
r22764r22765
678677   AM_RANGE(0x8000, 0x9fff) AM_RAM
679678   AM_RANGE(0xe000, 0xe000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
680679   AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
681   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
680   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
682681ADDRESS_MAP_END
683682
684683
r22764r22765
748747   AM_RANGE(0x0000, 0x3fff) AM_ROM
749748   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank7")
750749   AM_RANGE(0x8000, 0x8fff) AM_RAM
751   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
750   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
752751   AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
753752   AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
754753   AM_RANGE(0xb000, 0xb000) AM_WRITE(champwr_msm5205_hi_w)
r22764r22765
771770   AM_RANGE(0x0000, 0x7fff) AM_ROM
772771   AM_RANGE(0xc000, 0xdfff) AM_RAM
773772   AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1")
774   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
773   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
775774#if 0
776775   AM_RANGE(0xc000, 0xc000) AM_WRITE(rombank2switch_w)
777776   AM_RANGE(0xd000, 0xd000) AM_READ_PORT("DSWA")
r22764r22765
870869   AM_RANGE(0x0000, 0xbfff) AM_ROM
871870   AM_RANGE(0xc000, 0xdfff) AM_RAM
872871   AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1")
873   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
872   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
874873   AM_RANGE(0xf000, 0xf7ff) AM_ROMBANK("bank7")
875874ADDRESS_MAP_END
876875
r22764r22765
17511750   }
17521751}
17531752
1754static const ym2203_interface ym2203_interface_triple =
1753static const ay8910_interface triple_ay8910_config =
17551754{
1756   {
1757      AY8910_LEGACY_OUTPUT,
1758      AY8910_DEFAULT_LOADS,
1759      DEVCB_NULL,
1760      DEVCB_NULL,
1761      DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
1762      DEVCB_NULL,
1763   },
1764   DEVCB_DRIVER_LINE_MEMBER(taitol_state,irqhandler)
1755   AY8910_LEGACY_OUTPUT,
1756   AY8910_DEFAULT_LOADS,
1757   DEVCB_NULL,
1758   DEVCB_NULL,
1759   DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
1760   DEVCB_NULL,
17651761};
17661762
1767static const ym2203_interface ym2203_interface_champwr =
1763static const ay8910_interface champwr_ay8910_config =
17681764{
1769   {
1770      AY8910_LEGACY_OUTPUT,
1771      AY8910_DEFAULT_LOADS,
1772      DEVCB_NULL,
1773      DEVCB_NULL,
1774      DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
1775      DEVCB_DRIVER_MEMBER(taitol_state,champwr_msm5205_volume_w),
1776   },
1777   DEVCB_DRIVER_LINE_MEMBER(taitol_state,irqhandler)
1765   AY8910_LEGACY_OUTPUT,
1766   AY8910_DEFAULT_LOADS,
1767   DEVCB_NULL,
1768   DEVCB_NULL,
1769   DEVCB_DRIVER_MEMBER(taitol_state,portA_w),
1770   DEVCB_DRIVER_MEMBER(taitol_state,champwr_msm5205_volume_w),
17781771};
17791772
17801773
r22764r22765
17841777   MSM5205_S48_4B      /* 8 kHz */
17851778};
17861779
1787static const ym2203_interface ym2203_interface_single =
1780static const ay8910_interface single_ay8910_config =
17881781{
1789   {
1790      AY8910_LEGACY_OUTPUT,
1791      AY8910_DEFAULT_LOADS,
1792      DEVCB_DRIVER_MEMBER(taitol_state,portA_r),
1793      DEVCB_DRIVER_MEMBER(taitol_state,portB_r),
1794      DEVCB_NULL,
1795      DEVCB_NULL
1796   },
1782   AY8910_LEGACY_OUTPUT,
1783   AY8910_DEFAULT_LOADS,
1784   DEVCB_DRIVER_MEMBER(taitol_state,portA_r),
1785   DEVCB_DRIVER_MEMBER(taitol_state,portB_r),
1786   DEVCB_NULL,
17971787   DEVCB_NULL
17981788};
17991789
r22764r22765
18411831   MCFG_SPEAKER_STANDARD_MONO("mono")
18421832
18431833   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)       /* verified on pcb */
1844   MCFG_SOUND_CONFIG(ym2203_interface_triple)
1834   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitol_state,irqhandler))
1835   MCFG_YM2203_AY8910_INTF(&triple_ay8910_config)
18451836   MCFG_SOUND_ROUTE(0, "mono", 0.20)
18461837   MCFG_SOUND_ROUTE(1, "mono", 0.20)
18471838   MCFG_SOUND_ROUTE(2, "mono", 0.20)
r22764r22765
18671858
18681859   /* sound hardware */
18691860   MCFG_SOUND_MODIFY("ymsnd")
1870   MCFG_SOUND_CONFIG(ym2203_interface_champwr)
1861   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitol_state,irqhandler))
1862   MCFG_YM2203_AY8910_INTF(&champwr_ay8910_config)
18711863
18721864   MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz)
18731865   MCFG_SOUND_CONFIG(msm5205_config)
r22764r22765
19791971   MCFG_SPEAKER_STANDARD_MONO("mono")
19801972
19811973   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_13_33056MHz/4) /* verified on pcb */
1982   MCFG_SOUND_CONFIG(ym2203_interface_single)
1974   MCFG_YM2203_AY8910_INTF(&single_ay8910_config)
19831975   MCFG_SOUND_ROUTE(0, "mono", 0.20)
19841976   MCFG_SOUND_ROUTE(1, "mono", 0.20)
19851977   MCFG_SOUND_ROUTE(2, "mono", 0.20)
trunk/src/mame/drivers/sshangha.c
r22764r22765
227227/* Note: there's rom data after 0x8000 but the game never seem to call a rom bank, left-over? */
228228static ADDRESS_MAP_START( sshangha_sound_map, AS_PROGRAM, 8, sshangha_state )
229229   AM_RANGE(0x0000, 0x7fff) AM_ROM
230   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r,ym2203_w)
230   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
231231   AM_RANGE(0xc200, 0xc201) AM_DEVREADWRITE("oki", okim6295_device, read, write)
232232   AM_RANGE(0xf800, 0xf807) AM_READWRITE(sshangha_sound_shared_r,sshangha_sound_shared_w)
233233   AM_RANGE(0xf808, 0xffff) AM_RAM
r22764r22765
360360   m_audiocpu->set_input_line(0, state);
361361}
362362
363static const ym2203_interface ym2203_config =
363static const ay8910_interface ay8910_config =
364364{
365   {
366      AY8910_LEGACY_OUTPUT,
367      AY8910_DEFAULT_LOADS,
368      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
369   },
370   DEVCB_DRIVER_LINE_MEMBER(sshangha_state,irqhandler)
365   AY8910_LEGACY_OUTPUT,
366   AY8910_DEFAULT_LOADS,
367   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
371368};
372369
373370static int sshangha_bank_callback( int bank )
r22764r22765
426423   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") /* sure it's stereo? */
427424
428425   MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4)
429   MCFG_SOUND_CONFIG(ym2203_config)
426   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sshangha_state, irqhandler))
427   MCFG_YM2203_AY8910_INTF(&ay8910_config)
430428   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33)
431429   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33)
432430
trunk/src/mame/drivers/pkscram.c
r22764r22765
126126   AM_RANGE(0x049018, 0x049019) AM_WRITENOP
127127   AM_RANGE(0x04901c, 0x04901d) AM_WRITENOP
128128   AM_RANGE(0x049020, 0x049021) AM_WRITENOP
129   AM_RANGE(0x04900c, 0x04900f) AM_DEVREADWRITE8_LEGACY("ymsnd", ym2203_r, ym2203_w, 0x00ff)
129   AM_RANGE(0x04900c, 0x04900f) AM_DEVREADWRITE8("ymsnd", ym2203_device, read, write, 0x00ff)
130130   AM_RANGE(0x052086, 0x052087) AM_WRITENOP
131131ADDRESS_MAP_END
132132
r22764r22765
277277      m_maincpu->set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
278278}
279279
280static const ym2203_interface ym2203_config =
280static const ay8910_interface ay8910_config =
281281{
282   {
283      AY8910_LEGACY_OUTPUT,
284      AY8910_DEFAULT_LOADS,
285      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
286   },
287   DEVCB_DRIVER_LINE_MEMBER(pkscram_state,irqhandler)
282   AY8910_LEGACY_OUTPUT,
283   AY8910_DEFAULT_LOADS,
284   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
288285};
289286
290287void pkscram_state::machine_start()
r22764r22765
328325   MCFG_SPEAKER_STANDARD_MONO("mono")
329326
330327   MCFG_SOUND_ADD("ymsnd", YM2203, 12000000/4)
331   MCFG_SOUND_CONFIG(ym2203_config)
328   MCFG_YM2203_IRQ_HANDLER(WRITELINE(pkscram_state, irqhandler))
329   MCFG_YM2203_AY8910_INTF(&ay8910_config)
332330   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
333331MACHINE_CONFIG_END
334332
trunk/src/mame/drivers/compgolf.c
r22764r22765
6565   AM_RANGE(0x3001, 0x3001) AM_READ_PORT("P2") AM_WRITE(compgolf_ctrl_w)
6666   AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW1")
6767   AM_RANGE(0x3003, 0x3003) AM_READ_PORT("DSW2")
68   AM_RANGE(0x3800, 0x3801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
68   AM_RANGE(0x3800, 0x3801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
6969   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
7070   AM_RANGE(0x8000, 0xffff) AM_ROM
7171ADDRESS_MAP_END
r22764r22765
202202   m_maincpu->set_input_line(0, state);
203203}
204204
205static const ym2203_interface ym2203_config =
205static const ay8910_interface ay8910_config =
206206{
207   {
208         AY8910_LEGACY_OUTPUT,
209         AY8910_DEFAULT_LOADS,
210         DEVCB_NULL,
211         DEVCB_NULL,
212         DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrollx_lo_w),
213         DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrolly_lo_w),
214   },
215   DEVCB_DRIVER_LINE_MEMBER(compgolf_state,sound_irq)
207   AY8910_LEGACY_OUTPUT,
208   AY8910_DEFAULT_LOADS,
209   DEVCB_NULL,
210   DEVCB_NULL,
211   DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrollx_lo_w),
212   DEVCB_DRIVER_MEMBER(compgolf_state,compgolf_scrolly_lo_w),
216213};
217214
218215
r22764r22765
263260   MCFG_SPEAKER_STANDARD_MONO("mono")
264261
265262   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
266   MCFG_SOUND_CONFIG(ym2203_config)
263   MCFG_YM2203_IRQ_HANDLER(WRITELINE(compgolf_state, sound_irq))
264   MCFG_YM2203_AY8910_INTF(&ay8910_config)
267265   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
268266MACHINE_CONFIG_END
269267
trunk/src/mame/drivers/cyclemb.c
r22764r22765
583583
584584static ADDRESS_MAP_START( cyclemb_sound_io, AS_IO, 8, cyclemb_state )
585585   ADDRESS_MAP_GLOBAL_MASK(0xff)
586   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
586   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
587587   AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITE(soundlatch2_byte_w)
588588ADDRESS_MAP_END
589589
trunk/src/mame/drivers/witch.c
r22764r22765
479479   m_scrolly=data;
480480}
481481
482static const ym2203_interface ym2203_interface_0 =
482static const ay8910_interface ay8910_config_1 =
483483{
484   {
485      AY8910_LEGACY_OUTPUT,
486      AY8910_DEFAULT_LOADS,
487      DEVCB_INPUT_PORT("YM_PortA"),
488      DEVCB_INPUT_PORT("YM_PortB"),
489      DEVCB_NULL,
490      DEVCB_NULL
491   },
484   AY8910_LEGACY_OUTPUT,
485   AY8910_DEFAULT_LOADS,
486   DEVCB_INPUT_PORT("YM_PortA"),
487   DEVCB_INPUT_PORT("YM_PortB"),
488   DEVCB_NULL,
492489   DEVCB_NULL
493490};
494491
495static const ym2203_interface ym2203_interface_1 =
492static const ay8910_interface ay8910_config_2 =
496493{
497   {
498      AY8910_LEGACY_OUTPUT,
499      AY8910_DEFAULT_LOADS,
500      DEVCB_NULL,
501      DEVCB_NULL,
502      DEVCB_DRIVER_MEMBER(witch_state,xscroll_w),
503      DEVCB_DRIVER_MEMBER(witch_state,yscroll_w)
504   },
505   DEVCB_NULL
494   AY8910_LEGACY_OUTPUT,
495   AY8910_DEFAULT_LOADS,
496   DEVCB_NULL,
497   DEVCB_NULL,
498   DEVCB_DRIVER_MEMBER(witch_state,xscroll_w),
499   DEVCB_DRIVER_MEMBER(witch_state,yscroll_w)
506500};
507501
508502static ADDRESS_MAP_START( map_main, AS_PROGRAM, 8, witch_state )
509503   AM_RANGE(0x0000, UNBANKED_SIZE-1) AM_ROM
510504   AM_RANGE(UNBANKED_SIZE, 0x7fff) AM_ROMBANK("bank1")
511   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
512   AM_RANGE(0x8008, 0x8009) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
505   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
506   AM_RANGE(0x8008, 0x8009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
513507   AM_RANGE(0xa000, 0xa00f) AM_READWRITE(read_a00x, write_a00x)
514508   AM_RANGE(0xc000, 0xc3ff) AM_READWRITE(gfx0_vram_r, gfx0_vram_w) AM_SHARE("gfx0_vram")
515509   AM_RANGE(0xc400, 0xc7ff) AM_READWRITE(gfx0_cram_r, gfx0_cram_w) AM_SHARE("gfx0_cram")
r22764r22765
526520
527521static ADDRESS_MAP_START( map_sub, AS_PROGRAM, 8, witch_state )
528522   AM_RANGE(0x0000, 0x7fff) AM_ROM
529   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
530   AM_RANGE(0x8008, 0x8009) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
523   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
524   AM_RANGE(0x8008, 0x8009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
531525   AM_RANGE(0x8010, 0x8016) AM_READ(read_8010) AM_DEVWRITE("essnd", es8712_device, es8712_w)
532526   AM_RANGE(0xa000, 0xa00f) AM_READWRITE(read_a00x, write_a00x)
533527   AM_RANGE(0xf000, 0xf0ff) AM_RAM AM_SHARE("share1")
r22764r22765
863857   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
864858
865859   MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz / 8)   /* 1.5MHz?? */
866   MCFG_SOUND_CONFIG(ym2203_interface_0)
860   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
867861   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
868862
869863   MCFG_SOUND_ADD("ym2", YM2203, XTAL_12MHz / 8)   /* 1.5MHz?? */
870   MCFG_SOUND_CONFIG(ym2203_interface_1)
864   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
871865   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
872866
873867MACHINE_CONFIG_END
trunk/src/mame/drivers/hnayayoi.c
r22764r22765
9696
9797static ADDRESS_MAP_START( hnayayoi_io_map, AS_IO, 8, hnayayoi_state )
9898   ADDRESS_MAP_GLOBAL_MASK(0xff)
99   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)
100   AM_RANGE(0x02, 0x03) AM_DEVREAD_LEGACY("ymsnd", ym2203_r)
99   AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym2203_device, write)
100   AM_RANGE(0x02, 0x03) AM_DEVREAD("ymsnd", ym2203_device, read)
101101   AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW3")
102102   AM_RANGE(0x06, 0x06) AM_WRITE(adpcm_data_w)
103103//  AM_RANGE(0x08, 0x08) AM_WRITENOP // CRT Controller
r22764r22765
118118   AM_RANGE(0x0000, 0x77ff) AM_ROM
119119   AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("nvram")
120120   AM_RANGE(0x8000, 0xfeff) AM_ROM
121   AM_RANGE(0xff00, 0xff01) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)
122   AM_RANGE(0xff02, 0xff03) AM_DEVREAD_LEGACY("ymsnd", ym2203_r)
121   AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("ymsnd", ym2203_device, write)
122   AM_RANGE(0xff02, 0xff03) AM_DEVREAD("ymsnd", ym2203_device, read)
123123   AM_RANGE(0xff04, 0xff04) AM_READ_PORT("DSW3")
124124   AM_RANGE(0xff06, 0xff06) AM_WRITE(adpcm_data_w)
125125//  AM_RANGE(0xff08, 0xff08) AM_WRITENOP // CRT Controller
r22764r22765
144144
145145static ADDRESS_MAP_START( untoucha_io_map, AS_IO, 8, hnayayoi_state )
146146   ADDRESS_MAP_GLOBAL_MASK(0xff)
147   AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ymsnd", ym2203_control_port_w)
148   AM_RANGE(0x11, 0x11) AM_DEVREAD_LEGACY("ymsnd", ym2203_status_port_r)
147   AM_RANGE(0x10, 0x10) AM_DEVWRITE("ymsnd", ym2203_device, control_port_w)
148   AM_RANGE(0x11, 0x11) AM_DEVREAD("ymsnd", ym2203_device, status_port_r)
149149//  AM_RANGE(0x12, 0x12) AM_WRITENOP // CRT Controller
150150   AM_RANGE(0x13, 0x13) AM_WRITE(adpcm_data_w)
151151   AM_RANGE(0x14, 0x14) AM_READ_PORT("COIN")
r22764r22765
158158   AM_RANGE(0x28, 0x28) AM_WRITE(dynax_blitter_rev1_start_w)
159159   AM_RANGE(0x31, 0x31) AM_WRITE(adpcm_vclk_w)
160160   AM_RANGE(0x32, 0x32) AM_WRITE(adpcm_reset_inv_w)
161   AM_RANGE(0x50, 0x50) AM_DEVWRITE_LEGACY("ymsnd", ym2203_write_port_w)
162   AM_RANGE(0x51, 0x51) AM_DEVREAD_LEGACY("ymsnd", ym2203_read_port_r)
161   AM_RANGE(0x50, 0x50) AM_DEVWRITE("ymsnd", ym2203_device, write_port_w)
162   AM_RANGE(0x51, 0x51) AM_DEVREAD("ymsnd", ym2203_device, read_port_r)
163163//  AM_RANGE(0x52, 0x52) AM_WRITENOP // CRT Controller
164164ADDRESS_MAP_END
165165
r22764r22765
505505}
506506
507507
508static const ym2203_interface ym2203_config =
508static const ay8910_interface ay8910_config =
509509{
510   {
511      AY8910_LEGACY_OUTPUT,
512      AY8910_DEFAULT_LOADS,
513      DEVCB_INPUT_PORT("DSW1"),
514      DEVCB_INPUT_PORT("DSW2"),
515      DEVCB_NULL,
516      DEVCB_NULL,
517   },
518   DEVCB_DRIVER_LINE_MEMBER(hnayayoi_state,irqhandler)
510   AY8910_LEGACY_OUTPUT,
511   AY8910_DEFAULT_LOADS,
512   DEVCB_INPUT_PORT("DSW1"),
513   DEVCB_INPUT_PORT("DSW2"),
514   DEVCB_NULL,
515   DEVCB_NULL,
519516};
520517
521518static const msm5205_interface msm5205_config =
r22764r22765
576573   MCFG_SPEAKER_STANDARD_MONO("mono")
577574
578575   MCFG_SOUND_ADD("ymsnd", YM2203, 20000000/8)
579   MCFG_SOUND_CONFIG(ym2203_config)
576   MCFG_YM2203_IRQ_HANDLER(WRITELINE(hnayayoi_state, irqhandler))
577   MCFG_YM2203_AY8910_INTF(&ay8910_config)
580578   MCFG_SOUND_ROUTE(0, "mono", 0.25)
581579   MCFG_SOUND_ROUTE(1, "mono", 0.25)
582580   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/shanghai.c
r22764r22765
157157static ADDRESS_MAP_START( shanghai_portmap, AS_IO, 16, shanghai_state )
158158   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_status_r, hd63484_address_w)
159159   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_data_r, hd63484_data_w)
160   AM_RANGE(0x20, 0x23) AM_DEVREADWRITE8_LEGACY("ymsnd", ym2203_r, ym2203_w, 0x00ff)
160   AM_RANGE(0x20, 0x23) AM_DEVREADWRITE8("ymsnd", ym2203_device, read, write, 0x00ff)
161161   AM_RANGE(0x40, 0x41) AM_READ_PORT("P1")
162162   AM_RANGE(0x44, 0x45) AM_READ_PORT("P2")
163163   AM_RANGE(0x48, 0x49) AM_READ_PORT("SYSTEM")
r22764r22765
171171   AM_RANGE(0x20, 0x21) AM_READ_PORT("SYSTEM")
172172   AM_RANGE(0x30, 0x31) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_status_r, hd63484_address_w)
173173   AM_RANGE(0x32, 0x33) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_data_r, hd63484_data_w)
174   AM_RANGE(0x40, 0x43) AM_DEVREADWRITE8_LEGACY("ymsnd", ym2203_r, ym2203_w, 0x00ff)
174   AM_RANGE(0x40, 0x43) AM_DEVREADWRITE8("ymsnd", ym2203_device, read, write, 0x00ff)
175175   AM_RANGE(0x50, 0x51) AM_WRITE(shanghai_coin_w)
176176ADDRESS_MAP_END
177177
r22764r22765
416416
417417
418418
419static const ym2203_interface sh_ym2203_interface =
419static const ay8910_interface ay8910_config =
420420{
421   {
422      AY8910_LEGACY_OUTPUT,
423      AY8910_DEFAULT_LOADS,
424      DEVCB_INPUT_PORT("DSW1"),
425      DEVCB_INPUT_PORT("DSW2"),
426      DEVCB_NULL,
427      DEVCB_NULL
428   },
421   AY8910_LEGACY_OUTPUT,
422   AY8910_DEFAULT_LOADS,
423   DEVCB_INPUT_PORT("DSW1"),
424   DEVCB_INPUT_PORT("DSW2"),
425   DEVCB_NULL,
429426   DEVCB_NULL
430427};
431428
432429
433static const ym2203_interface kothello_ym2203_interface =
430static const ay8910_interface kothello_ay8910_config =
434431{
435   {
436      AY8910_LEGACY_OUTPUT,
437      AY8910_DEFAULT_LOADS,
438      DEVCB_INPUT_PORT("DSW"),
439      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
440   },
441   DEVCB_LINE(seibu_ym2203_irqhandler)
432   AY8910_LEGACY_OUTPUT,
433   AY8910_DEFAULT_LOADS,
434   DEVCB_INPUT_PORT("DSW"),
435   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
442436};
443437
444438static const hd63484_interface shanghai_hd63484_intf = { 0 };
r22764r22765
468462   MCFG_SPEAKER_STANDARD_MONO("mono")
469463
470464   MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4)
471   MCFG_SOUND_CONFIG(sh_ym2203_interface)
465   MCFG_YM2203_AY8910_INTF(&ay8910_config)
472466   MCFG_SOUND_ROUTE(0, "mono", 0.15)
473467   MCFG_SOUND_ROUTE(1, "mono", 0.15)
474468   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
500494   MCFG_SPEAKER_STANDARD_MONO("mono")
501495
502496   MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4)
503   MCFG_SOUND_CONFIG(sh_ym2203_interface)
497   MCFG_YM2203_AY8910_INTF(&ay8910_config)
504498   MCFG_SOUND_ROUTE(0, "mono", 0.15)
505499   MCFG_SOUND_ROUTE(1, "mono", 0.15)
506500   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
538532
539533   /* same as standard seibu ym2203, but "ym1" also reads "DSW" */
540534   MCFG_SOUND_ADD("ym1", YM2203, 14318180/4)
541   MCFG_SOUND_CONFIG(kothello_ym2203_interface)
535   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2203_irqhandler>))
536   MCFG_YM2203_AY8910_INTF(&kothello_ay8910_config)
542537   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
543538
544539   MCFG_SOUND_ADD("ym2", YM2203, 14318180/4)
trunk/src/mame/drivers/dynax.c
r22764r22765
531531   AM_RANGE( 0x74, 0x74 ) AM_WRITE(dynax_blitter_ack_w)        // Blitter IRQ Ack
532532   AM_RANGE( 0x76, 0x76 ) AM_WRITE(dynax_blit_palbank_w)       // Layers Palettes (High Bit)
533533   AM_RANGE( 0x77, 0x77 ) AM_WRITE(hanamai_layer_half_w)       // half of the interleaved layer to write to
534   AM_RANGE( 0x78, 0x79 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) // 2 x DSW
534   AM_RANGE( 0x78, 0x79 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) // 2 x DSW
535535   AM_RANGE( 0x7a, 0x7b ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)   // AY8910
536536//  AM_RANGE( 0x7c, 0x7c ) AM_WRITENOP   // CRT Controller
537537//  AM_RANGE( 0x7d, 0x7d ) AM_WRITENOP   //
r22764r22765
845845static ADDRESS_MAP_START( sprtmtch_io_map, AS_IO, 8, dynax_state )
846846   ADDRESS_MAP_GLOBAL_MASK(0xff)
847847   AM_RANGE( 0x01, 0x07 ) AM_WRITE(dynax_blitter_rev2_w)       // Blitter
848   AM_RANGE( 0x10, 0x11 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)  // 2 x DSW
848   AM_RANGE( 0x10, 0x11 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)  // 2 x DSW
849849//  AM_RANGE( 0x12, 0x12 ) AM_WRITENOP   // CRT Controller
850850//  AM_RANGE( 0x13, 0x13 ) AM_WRITENOP   // CRT Controller
851851   AM_RANGE( 0x20, 0x20 ) AM_READ_PORT("P1")               // P1
r22764r22765
10221022   AM_RANGE( 0x10, 0x10 ) AM_WRITE(jantouki_sound_vblank_ack_w)    // VBlank IRQ Ack
10231023   AM_RANGE( 0x21, 0x21 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r)         // AY8910
10241024   AM_RANGE( 0x22, 0x23 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)   //
1025   AM_RANGE( 0x28, 0x29 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) //
1025   AM_RANGE( 0x28, 0x29 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) //
10261026   AM_RANGE( 0x30, 0x30 ) AM_WRITE(adpcm_reset_w)      // MSM5205 reset
10271027   AM_RANGE( 0x40, 0x40 ) AM_WRITE(adpcm_data_w)               // MSM5205 data
10281028   AM_RANGE( 0x50, 0x50 ) AM_READ(jantouki_soundlatch_status_r)    // Soundlatch status
r22764r22765
40654065                                Hana no Mai
40664066***************************************************************************/
40674067
4068static const ym2203_interface hanamai_ym2203_interface =
4068static const ay8910_interface hanamai_ay8910_config =
40694069{
4070   {
4071      AY8910_LEGACY_OUTPUT,
4072      AY8910_DEFAULT_LOADS,
4073      DEVCB_INPUT_PORT("DSW1"),           /* Port A Read: DSW */
4074      DEVCB_INPUT_PORT("DSW0"),           /* Port B Read: DSW */
4075      DEVCB_NULL,                         /* Port A Write */
4076      DEVCB_NULL,                         /* Port B Write */
4077   },
4078   DEVCB_DRIVER_LINE_MEMBER(dynax_state,sprtmtch_sound_callback)     /* IRQ handler */
4070   AY8910_LEGACY_OUTPUT,
4071   AY8910_DEFAULT_LOADS,
4072   DEVCB_INPUT_PORT("DSW1"),           /* Port A Read: DSW */
4073   DEVCB_INPUT_PORT("DSW0"),           /* Port B Read: DSW */
4074   DEVCB_NULL,                         /* Port A Write */
4075   DEVCB_NULL,                         /* Port B Write */
40794076};
40804077
40814078static const msm5205_interface hanamai_msm5205_interface =
r22764r22765
41194116   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
41204117
41214118   MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
4122   MCFG_SOUND_CONFIG(hanamai_ym2203_interface)
4119   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, sprtmtch_sound_callback))
4120   MCFG_YM2203_AY8910_INTF(&hanamai_ay8910_config)
41234121   MCFG_SOUND_ROUTE(0, "mono", 0.20)
41244122   MCFG_SOUND_ROUTE(1, "mono", 0.20)
41254123   MCFG_SOUND_ROUTE(2, "mono", 0.20)
r22764r22765
42334231                                Sports Match
42344232***************************************************************************/
42354233
4236static const ym2203_interface sprtmtch_ym2203_interface =
4234static const ay8910_interface sprtmtch_ay8910_config =
42374235{
4238   {
4239      AY8910_LEGACY_OUTPUT,
4240      AY8910_DEFAULT_LOADS,
4241      DEVCB_INPUT_PORT("DSW0"),   /* Port A Read: DSW */
4242      DEVCB_INPUT_PORT("DSW1"),   /* Port B Read: DSW */
4243      DEVCB_NULL,                 /* Port A Write */
4244      DEVCB_NULL,                 /* Port B Write */
4245   },
4246   DEVCB_DRIVER_LINE_MEMBER(dynax_state,sprtmtch_sound_callback),    /* IRQ handler */
4236   AY8910_LEGACY_OUTPUT,
4237   AY8910_DEFAULT_LOADS,
4238   DEVCB_INPUT_PORT("DSW0"),   /* Port A Read: DSW */
4239   DEVCB_INPUT_PORT("DSW1"),   /* Port B Read: DSW */
4240   DEVCB_NULL,                 /* Port A Write */
4241   DEVCB_NULL,                 /* Port B Write */
42474242};
42484243
42494244static MACHINE_CONFIG_START( sprtmtch, dynax_state )
r22764r22765
42764271   MCFG_SPEAKER_STANDARD_MONO("mono")
42774272
42784273   MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
4279   MCFG_SOUND_CONFIG(sprtmtch_ym2203_interface)
4274   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, sprtmtch_sound_callback))
4275   MCFG_YM2203_AY8910_INTF(&sprtmtch_ay8910_config)
42804276   MCFG_SOUND_ROUTE(0, "mono", 0.20)
42814277   MCFG_SOUND_ROUTE(1, "mono", 0.20)
42824278   MCFG_SOUND_ROUTE(2, "mono", 0.20)
r22764r22765
44074403
44084404// dual monitor, 2 CPU's, 2 blitters
44094405
4410static const ym2203_interface jantouki_ym2203_interface =
4406static const ay8910_interface jantouki_ay8910_config =
44114407{
4412   {
4413      AY8910_LEGACY_OUTPUT,
4414      AY8910_DEFAULT_LOADS,
4415      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
4416   },
4417   DEVCB_DRIVER_LINE_MEMBER(dynax_state,jantouki_sound_callback)     /* IRQ handler */
4408   AY8910_LEGACY_OUTPUT,
4409   AY8910_DEFAULT_LOADS,
4410   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
44184411};
44194412
44204413static const msm5205_interface jantouki_msm5205_interface =
r22764r22765
44894482   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
44904483
44914484   MCFG_SOUND_ADD("ymsnd", YM2203, 22000000 / 8)
4492   MCFG_SOUND_CONFIG(jantouki_ym2203_interface)
4485   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dynax_state, jantouki_sound_callback))
4486   MCFG_YM2203_AY8910_INTF(&jantouki_ay8910_config)
44934487   MCFG_SOUND_ROUTE(0, "mono", 0.20)
44944488   MCFG_SOUND_ROUTE(1, "mono", 0.20)
44954489   MCFG_SOUND_ROUTE(2, "mono", 0.20)
trunk/src/mame/drivers/dooyong.c
r22764r22765
286286   AM_RANGE(0x0000, 0x7fff) AM_ROM
287287   AM_RANGE(0xc000, 0xc7ff) AM_RAM
288288   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
289   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
290   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
289   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
290   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
291291ADDRESS_MAP_END
292292
293293static ADDRESS_MAP_START( pollux_sound_map, AS_PROGRAM, 8, dooyong_state )
294294   AM_RANGE(0x0000, 0xefff) AM_ROM
295295   AM_RANGE(0xf000, 0xf7ff) AM_RAM
296296   AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r)
297   AM_RANGE(0xf802, 0xf803) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
298   AM_RANGE(0xf804, 0xf805) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
297   AM_RANGE(0xf802, 0xf803) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
298   AM_RANGE(0xf804, 0xf805) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
299299ADDRESS_MAP_END
300300
301301static ADDRESS_MAP_START( bluehawk_sound_map, AS_PROGRAM, 8, dooyong_state )
r22764r22765
784784   m_audiocpu->set_input_line(0, (m_interrupt_line_1 | m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE);
785785}
786786
787static const ym2203_interface ym2203_interface_1 =
787static const ay8910_interface ay8910_config_1 =
788788{
789   {
790      AY8910_LEGACY_OUTPUT,
791      AY8910_DEFAULT_LOADS,
792      DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
793   },
794   DEVCB_DRIVER_LINE_MEMBER(dooyong_state,irqhandler_2203_1)
789   AY8910_LEGACY_OUTPUT,
790   AY8910_DEFAULT_LOADS,
791   DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
795792};
796793
797static const ym2203_interface ym2203_interface_2 =
794static const ay8910_interface ay8910_config_2 =
798795{
799   {
800      AY8910_LEGACY_OUTPUT,
801      AY8910_DEFAULT_LOADS,
802      DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
803   },
804   DEVCB_DRIVER_LINE_MEMBER(dooyong_state,irqhandler_2203_2)
796   AY8910_LEGACY_OUTPUT,
797   AY8910_DEFAULT_LOADS,
798   DEVCB_DRIVER_MEMBER(dooyong_state,unk_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
805799};
806800
807801/***************************************************************************
r22764r22765
815809   MCFG_SPEAKER_STANDARD_MONO("mono")
816810
817811   MCFG_SOUND_ADD("ym1", YM2203, 1500000)
818   MCFG_SOUND_CONFIG(ym2203_interface_1)
812   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state,irqhandler_2203_1))
813   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
819814   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
820815
821816   MCFG_SOUND_ADD("ym2", YM2203, 1500000)
822   MCFG_SOUND_CONFIG(ym2203_interface_2)
817   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state, irqhandler_2203_2))
818   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
823819   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
824820MACHINE_CONFIG_END
825821
r22764r22765
881877   MCFG_SPEAKER_STANDARD_MONO("mono")
882878
883879   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
884   MCFG_SOUND_CONFIG(ym2203_interface_1)
880   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state,irqhandler_2203_1))
881   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
885882   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
886883
887884   MCFG_SOUND_ADD("ym2", YM2203, 4000000)
888   MCFG_SOUND_CONFIG(ym2203_interface_2)
885   MCFG_YM2203_IRQ_HANDLER(WRITELINE(dooyong_state, irqhandler_2203_2))
886   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
889887   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
890888
891889MACHINE_CONFIG_END
trunk/src/mame/drivers/brkthru.c
r22764r22765
149149   AM_RANGE(0x0000, 0x1fff) AM_RAM
150150   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
151151   AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r)
152   AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
152   AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
153153   AM_RANGE(0x8000, 0xffff) AM_ROM
154154ADDRESS_MAP_END
155155
trunk/src/mame/drivers/lkage.c
r22764r22765
183183static ADDRESS_MAP_START( lkage_sound_map, AS_PROGRAM, 8, lkage_state )
184184   AM_RANGE(0x0000, 0x7fff) AM_ROM
185185   AM_RANGE(0x8000, 0x87ff) AM_RAM
186   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
187   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
186   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
187   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
188188   AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ??? */
189189   AM_RANGE(0xb001, 0xb001) AM_READNOP /* ??? */ AM_WRITE(lkage_sh_nmi_enable_w)
190190   AM_RANGE(0xb002, 0xb002) AM_WRITE(lkage_sh_nmi_disable_w)
r22764r22765
479479   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
480480}
481481
482static const ym2203_interface ym2203_config =
482static const ay8910_interface ay8910_config =
483483{
484   {
485      AY8910_LEGACY_OUTPUT,
486      AY8910_DEFAULT_LOADS,
487      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
488   },
489   DEVCB_DRIVER_LINE_MEMBER(lkage_state,irqhandler)
484   AY8910_LEGACY_OUTPUT,
485   AY8910_DEFAULT_LOADS,
486   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
490487};
491488
492489void lkage_state::machine_start()
r22764r22765
573570   MCFG_SPEAKER_STANDARD_MONO("mono")
574571
575572   MCFG_SOUND_ADD("ym1", YM2203, AUDIO_CLOCK )
576   MCFG_SOUND_CONFIG(ym2203_config)
573   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lkage_state, irqhandler))
574   MCFG_YM2203_AY8910_INTF(&ay8910_config)
577575   MCFG_SOUND_ROUTE(0, "mono", 0.15)
578576   MCFG_SOUND_ROUTE(1, "mono", 0.15)
579577   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
616614   MCFG_SPEAKER_STANDARD_MONO("mono")
617615
618616   MCFG_SOUND_ADD("ym1", YM2203, AUDIO_CLOCK)
619   MCFG_SOUND_CONFIG(ym2203_config)
617   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lkage_state, irqhandler))
618   MCFG_YM2203_AY8910_INTF(&ay8910_config)
620619   MCFG_SOUND_ROUTE(0, "mono", 0.15)
621620   MCFG_SOUND_ROUTE(1, "mono", 0.15)
622621   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/suprgolf.c
r22764r22765
320320   ADDRESS_MAP_GLOBAL_MASK(0xff)
321321   AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
322322   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
323   AM_RANGE(0x08, 0x09) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
323   AM_RANGE(0x08, 0x09) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
324324   AM_RANGE(0x0c, 0x0c) AM_WRITE(adpcm_data_w)
325325   ADDRESS_MAP_END
326326
r22764r22765
424424   //m_maincpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
425425}
426426
427static const ym2203_interface ym2203_config =
427static const ay8910_interface ay8910_config =
428428{
429   {
430      AY8910_LEGACY_OUTPUT,
431      AY8910_DEFAULT_LOADS,
432      DEVCB_INPUT_PORT("DSW0"),
433      DEVCB_INPUT_PORT("DSW1"),
434      DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeA),
435      DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeB),
436   },
437   DEVCB_DRIVER_LINE_MEMBER(suprgolf_state,irqhandler)
429   AY8910_LEGACY_OUTPUT,
430   AY8910_DEFAULT_LOADS,
431   DEVCB_INPUT_PORT("DSW0"),
432   DEVCB_INPUT_PORT("DSW1"),
433   DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeA),
434   DEVCB_DRIVER_MEMBER(suprgolf_state,suprgolf_writeB),
438435};
439436
440437WRITE_LINE_MEMBER(suprgolf_state::adpcm_int)
r22764r22765
529526   MCFG_SPEAKER_STANDARD_MONO("mono")
530527
531528   MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK/4) /* guess */
532   MCFG_SOUND_CONFIG(ym2203_config)
529   MCFG_YM2203_IRQ_HANDLER(WRITELINE(suprgolf_state, irqhandler))
530   MCFG_YM2203_AY8910_INTF(&ay8910_config)
533531   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
534532
535533   MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* guess */
trunk/src/mame/drivers/mayumi.c
r22764r22765
129129   ADDRESS_MAP_GLOBAL_MASK(0xff)
130130   AM_RANGE(0x30, 0x30) AM_READ_PORT("IN0") AM_WRITE(bank_sel_w)
131131   AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE("i8255", i8255_device, read, write)
132   AM_RANGE(0xd0, 0xd1) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
132   AM_RANGE(0xd0, 0xd1) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
133133ADDRESS_MAP_END
134134
135135/*************************************
r22764r22765
356356 *
357357 *************************************/
358358
359static const ym2203_interface ym2203_config =
359static const ay8910_interface ay8910_config =
360360{
361   {
362      AY8910_LEGACY_OUTPUT,
363      AY8910_DEFAULT_LOADS,
364      DEVCB_INPUT_PORT("DSW1"),
365      DEVCB_INPUT_PORT("DSW2"),
366      DEVCB_NULL,
367      DEVCB_NULL
368   },
361   AY8910_LEGACY_OUTPUT,
362   AY8910_DEFAULT_LOADS,
363   DEVCB_INPUT_PORT("DSW1"),
364   DEVCB_INPUT_PORT("DSW2"),
365   DEVCB_NULL,
369366   DEVCB_NULL
370367};
371368
r22764r22765
420417   MCFG_SPEAKER_STANDARD_MONO("mono")
421418
422419   MCFG_SOUND_ADD("ymsnd", YM2203, MCLK/4)
423   MCFG_SOUND_CONFIG(ym2203_config)
420   MCFG_YM2203_AY8910_INTF(&ay8910_config)
424421   MCFG_SOUND_ROUTE(0, "mono", 0.15)
425422   MCFG_SOUND_ROUTE(1, "mono", 0.15)
426423   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/himesiki.c
r22764r22765
136136
137137static ADDRESS_MAP_START( himesiki_iom1, AS_IO, 8, himesiki_state )
138138   ADDRESS_MAP_GLOBAL_MASK(0xff)
139   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym2203", ym2203_r, ym2203_w)
139   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym2203", ym2203_device, read, write)
140140   AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r)
141141ADDRESS_MAP_END
142142
trunk/src/mame/drivers/rainbow.c
r22764r22765
418418static ADDRESS_MAP_START( jumping_sound_map, AS_PROGRAM, 8, rbisland_state )
419419   AM_RANGE(0x0000, 0x7fff) AM_ROM
420420   AM_RANGE(0x8000, 0x8fff) AM_RAM
421   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
422   AM_RANGE(0xb400, 0xb401) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
421   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
422   AM_RANGE(0xb400, 0xb401) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
423423   AM_RANGE(0xb800, 0xb800) AM_READ(jumping_latch_r)
424424   AM_RANGE(0xbc00, 0xbc00) AM_WRITENOP    /* looks like a bankswitch, but sound works with or without it */
425425   AM_RANGE(0xc000, 0xffff) AM_ROM
trunk/src/mame/drivers/lastduel.c
r22764r22765
168168static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, lastduel_state )
169169   AM_RANGE(0x0000, 0xdfff) AM_ROM
170170   AM_RANGE(0xe000, 0xe7ff) AM_RAM
171   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
172   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
171   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
172   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
173173   AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r)
174174ADDRESS_MAP_END
175175
r22764r22765
182182   AM_RANGE(0x0000, 0x7fff) AM_ROM
183183   AM_RANGE(0x8000, 0xcfff) AM_ROMBANK("bank1")
184184   AM_RANGE(0xd000, 0xd7ff) AM_RAM
185   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
186   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
185   AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
186   AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
187187   AM_RANGE(0xf004, 0xf004) AM_DEVWRITE("oki", okim6295_device, write)
188188   AM_RANGE(0xf006, 0xf006) AM_READ(soundlatch_byte_r)
189189   AM_RANGE(0xf00a, 0xf00a) AM_WRITE(mg_bankswitch_w)
r22764r22765
444444   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
445445}
446446
447static const ym2203_interface ym2203_config =
447static const ay8910_interface ay8910_config =
448448{
449   {
450      AY8910_LEGACY_OUTPUT,
451      AY8910_DEFAULT_LOADS,
452      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
453   },
454   DEVCB_DRIVER_LINE_MEMBER(lastduel_state,irqhandler)
449   AY8910_LEGACY_OUTPUT,
450   AY8910_DEFAULT_LOADS,
451   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
455452};
456453
457454TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::lastduel_timer_cb)
r22764r22765
524521   MCFG_SPEAKER_STANDARD_MONO("mono")
525522
526523   MCFG_SOUND_ADD("ym1", YM2203, 3579545)
527   MCFG_SOUND_CONFIG(ym2203_config)
524   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lastduel_state, irqhandler))
525   MCFG_YM2203_AY8910_INTF(&ay8910_config)
528526   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
529527
530528   MCFG_SOUND_ADD("ym2", YM2203, 3579545)
r22764r22765
567565   MCFG_SPEAKER_STANDARD_MONO("mono")
568566
569567   MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz) /* verified on pcb */
570   MCFG_SOUND_CONFIG(ym2203_config)
568   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lastduel_state, irqhandler))
569   MCFG_YM2203_AY8910_INTF(&ay8910_config)
571570   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
572571
573572   MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */
trunk/src/mame/drivers/chinsan.c
r22764r22765
147147}
148148
149149
150static const ym2203_interface ym2203_config =
150static const ay8910_interface ay8910_config =
151151{
152   {
153      AY8910_LEGACY_OUTPUT,
154      AY8910_DEFAULT_LOADS,
155      DEVCB_INPUT_PORT("DSW1"),
156      DEVCB_INPUT_PORT("DSW2"),
157      DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w1),
158      DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w2)
159   },
160   DEVCB_NULL
152   AY8910_LEGACY_OUTPUT,
153   AY8910_DEFAULT_LOADS,
154   DEVCB_INPUT_PORT("DSW1"),
155   DEVCB_INPUT_PORT("DSW2"),
156   DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w1),
157   DEVCB_DRIVER_MEMBER(chinsan_state,ym_port_w2)
161158};
162159
163160WRITE8_MEMBER(chinsan_state::chinsan_port00_w)
r22764r22765
261258   AM_RANGE(0x00, 0x00) AM_WRITE(chinsan_port00_w)
262259   AM_RANGE(0x01, 0x01) AM_READ(chinsan_input_port_0_r)
263260   AM_RANGE(0x02, 0x02) AM_READ(chinsan_input_port_1_r)
264   AM_RANGE(0x10, 0x11) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
261   AM_RANGE(0x10, 0x11) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
265262   AM_RANGE(0x20, 0x20) AM_WRITE(chin_adpcm_w)
266263   AM_RANGE(0x30, 0x30) AM_WRITE(ctrl_w)   // ROM bank + unknown stuff (input mutliplex?)
267264ADDRESS_MAP_END
r22764r22765
621618   MCFG_SPEAKER_STANDARD_MONO("mono")
622619
623620   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000) /* ? Mhz */
624   MCFG_SOUND_CONFIG(ym2203_config)
621   MCFG_YM2203_AY8910_INTF(&ay8910_config)
625622   MCFG_SOUND_ROUTE(0, "mono", 0.15)
626623   MCFG_SOUND_ROUTE(1, "mono", 0.15)
627624   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/cninja.c
r22764r22765
302302
303303static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cninja_state )
304304   AM_RANGE(0x000000, 0x00ffff) AM_ROM
305   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
305   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
306306   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
307307   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
308308   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/angelkds.c
r22764r22765
236236
237237static ADDRESS_MAP_START( sub_portmap, AS_IO, 8, angelkds_state )
238238   ADDRESS_MAP_GLOBAL_MASK(0xff)
239   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
240   AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
239   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
240   AM_RANGE(0x40, 0x41) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
241241   AM_RANGE(0x80, 0x83) AM_READWRITE(angelkds_sub_sound_r, angelkds_sub_sound_w) // spcpostn
242242ADDRESS_MAP_END
243243
r22764r22765
512512   m_subcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
513513}
514514
515static const ym2203_interface ym2203_config =
515static const ay8910_interface ay8910_config =
516516{
517   {
518      AY8910_LEGACY_OUTPUT,
519      AY8910_DEFAULT_LOADS,
520      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
521   },
522   DEVCB_DRIVER_LINE_MEMBER(angelkds_state,irqhandler)
517   AY8910_LEGACY_OUTPUT,
518   AY8910_DEFAULT_LOADS,
519   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
523520};
524521
525522/*** Graphics Decoding
r22764r22765
622619   MCFG_SPEAKER_STANDARD_MONO("mono")
623620
624621   MCFG_SOUND_ADD("ym1", YM2203, XTAL_4MHz)
625   MCFG_SOUND_CONFIG(ym2203_config)
622   MCFG_YM2203_IRQ_HANDLER(WRITELINE(angelkds_state, irqhandler))
623   MCFG_YM2203_AY8910_INTF(&ay8910_config)
626624   MCFG_SOUND_ROUTE(0, "mono", 0.65)
627625   MCFG_SOUND_ROUTE(1, "mono", 0.65)
628626   MCFG_SOUND_ROUTE(2, "mono", 0.65)
trunk/src/mame/drivers/splash.c
r22764r22765
194194
195195static ADDRESS_MAP_START( roldfrog_sound_io_map, AS_IO, 8, splash_state )
196196   ADDRESS_MAP_GLOBAL_MASK(0xff)
197   AM_RANGE(0x10, 0x11) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
197   AM_RANGE(0x10, 0x11) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
198198   AM_RANGE(0x40, 0x40) AM_NOP
199199   AM_RANGE(0x31, 0x31) AM_WRITE(sound_bank_w)
200200   AM_RANGE(0x37, 0x37) AM_WRITE(roldfrog_vblank_ack_w )
r22764r22765
520520MACHINE_CONFIG_END
521521
522522
523static const ym2203_interface ym2203_config =
523static const ay8910_interface ay8910_config =
524524{
525   {
526      AY8910_LEGACY_OUTPUT,
527      AY8910_DEFAULT_LOADS,
528      DEVCB_NULL, DEVCB_NULL,
529      DEVCB_NULL, DEVCB_NULL
530   },
531   DEVCB_DRIVER_LINE_MEMBER(splash_state,ym_irq)
525   AY8910_LEGACY_OUTPUT,
526   AY8910_DEFAULT_LOADS,
527   DEVCB_NULL, DEVCB_NULL,
528   DEVCB_NULL, DEVCB_NULL
532529};
533530
534531INTERRUPT_GEN_MEMBER(splash_state::roldfrog_interrupt)
r22764r22765
568565   MCFG_SPEAKER_STANDARD_MONO("mono")
569566
570567   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_24MHz / 8)
571   MCFG_SOUND_CONFIG(ym2203_config)
568   MCFG_YM2203_IRQ_HANDLER(WRITELINE(splash_state, ym_irq))
569   MCFG_YM2203_AY8910_INTF(&ay8910_config)
572570   MCFG_SOUND_ROUTE(0, "mono", 0.20)
573571   MCFG_SOUND_ROUTE(1, "mono", 0.20)
574572   MCFG_SOUND_ROUTE(2, "mono", 0.20)
trunk/src/mame/drivers/nightgal.c
r22764r22765
563563
564564static ADDRESS_MAP_START( sexygal_io, AS_IO, 8, nightgal_state )
565565   ADDRESS_MAP_GLOBAL_MASK(0xff)
566   AM_RANGE(0x00,0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
566   AM_RANGE(0x00,0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
567567//  AM_RANGE(0x10,0x10) AM_WRITE(output_w)
568568   AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC")
569569   AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA") AM_WRITE(mux_w)
trunk/src/mame/drivers/commando.c
r22764r22765
7474   AM_RANGE(0x0000, 0x3fff) AM_ROM
7575   AM_RANGE(0x4000, 0x47ff) AM_RAM
7676   AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
77   AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
78   AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
77   AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ym1", ym2203_device, write)
78   AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ym2", ym2203_device, write)
7979ADDRESS_MAP_END
8080
8181/* Input Ports */
trunk/src/mame/drivers/ninjakd2.c
r22764r22765
458458
459459static ADDRESS_MAP_START( ninjakd2_sound_io, AS_IO, 8, ninjakd2_state )
460460   ADDRESS_MAP_GLOBAL_MASK(0xff)
461   AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("2203.1", ym2203_w)
462   AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("2203.2", ym2203_w)
461   AM_RANGE(0x00, 0x01) AM_DEVWRITE("2203.1", ym2203_device, write)
462   AM_RANGE(0x80, 0x81) AM_DEVWRITE("2203.2", ym2203_device, write)
463463ADDRESS_MAP_END
464464
465465
r22764r22765
870870   m_soundcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
871871}
872872
873static const ym2203_interface ym2203_config =
873static const ay8910_interface ay8910_config =
874874{
875   {
876      AY8910_LEGACY_OUTPUT,
877      AY8910_DEFAULT_LOADS,
878      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
879   },
880   DEVCB_DRIVER_LINE_MEMBER(ninjakd2_state,irqhandler)
875   AY8910_LEGACY_OUTPUT,
876   AY8910_DEFAULT_LOADS,
877   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
881878};
882879
883880
r22764r22765
957954   MCFG_SPEAKER_STANDARD_MONO("mono")
958955
959956   MCFG_SOUND_ADD("2203.1", YM2203, MAIN_CLOCK_12/8)       /* verified */
960   MCFG_SOUND_CONFIG(ym2203_config)
957   MCFG_YM2203_IRQ_HANDLER(WRITELINE(ninjakd2_state, irqhandler))
958   MCFG_YM2203_AY8910_INTF(&ay8910_config)
961959   MCFG_SOUND_ROUTE(0, "mono", 0.10)
962960   MCFG_SOUND_ROUTE(1, "mono", 0.10)
963961   MCFG_SOUND_ROUTE(2, "mono", 0.10)
trunk/src/mame/drivers/volfied.c
r22764r22765
8383   AM_RANGE(0x8000, 0x87ff) AM_RAM
8484   AM_RANGE(0x8800, 0x8800) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
8585   AM_RANGE(0x8801, 0x8801) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
86   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
86   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
8787   AM_RANGE(0x9800, 0x9800) AM_WRITENOP    /* ? */
8888ADDRESS_MAP_END
8989
r22764r22765
212212   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
213213}
214214
215static const ym2203_interface ym2203_config =
215static const ay8910_interface ay8910_config =
216216{
217   {
218      AY8910_LEGACY_OUTPUT,
219      AY8910_DEFAULT_LOADS,
220      DEVCB_INPUT_PORT("DSWA"),
221      DEVCB_INPUT_PORT("DSWB"),
222      DEVCB_NULL,
223      DEVCB_NULL,
224   },
225   DEVCB_DRIVER_LINE_MEMBER(volfied_state,irqhandler)
217   AY8910_LEGACY_OUTPUT,
218   AY8910_DEFAULT_LOADS,
219   DEVCB_INPUT_PORT("DSWA"),
220   DEVCB_INPUT_PORT("DSWB"),
221   DEVCB_NULL,
222   DEVCB_NULL,
226223};
227224
228225
r22764r22765
281278   MCFG_SPEAKER_STANDARD_MONO("mono")
282279
283280   MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
284   MCFG_SOUND_CONFIG(ym2203_config)
281   MCFG_YM2203_IRQ_HANDLER(WRITELINE(volfied_state, irqhandler))
282   MCFG_YM2203_AY8910_INTF(&ay8910_config)
285283   MCFG_SOUND_ROUTE(0, "mono", 0.15)
286284   MCFG_SOUND_ROUTE(1, "mono", 0.15)
287285   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/gunsmoke.c
r22764r22765
122122   AM_RANGE(0x0000, 0x7fff) AM_ROM
123123   AM_RANGE(0xc000, 0xc7ff) AM_RAM
124124   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
125   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
126   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
125   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ym1", ym2203_device, write)
126   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE("ym2", ym2203_device, write)
127127ADDRESS_MAP_END
128128
129129/* Input Ports */
trunk/src/mame/drivers/momoko.c
r22764r22765
8282   AM_RANGE(0x0000, 0x7fff) AM_ROM
8383   AM_RANGE(0x8000, 0x87ff) AM_RAM
8484   AM_RANGE(0x9000, 0x9000) AM_WRITENOP /* unknown */
85   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
85   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
8686   AM_RANGE(0xb000, 0xb000) AM_WRITENOP /* unknown */
87   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w)
87   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
8888ADDRESS_MAP_END
8989
9090
r22764r22765
212212
213213/****************************************************************************/
214214
215static const ym2203_interface ym2203_config =
215static const ay8910_interface ay8910_config =
216216{
217   {
218      AY8910_LEGACY_OUTPUT,
219      AY8910_DEFAULT_LOADS,
220      DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
221      DEVCB_NULL,
222      DEVCB_NULL,
223      DEVCB_NULL
224   },
217   AY8910_LEGACY_OUTPUT,
218   AY8910_DEFAULT_LOADS,
219   DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
220   DEVCB_NULL,
221   DEVCB_NULL,
225222   DEVCB_NULL
226223};
227224
r22764r22765
289286   MCFG_SOUND_ROUTE(3, "mono", 0.40)
290287
291288   MCFG_SOUND_ADD("ym2", YM2203, 1250000)
292   MCFG_SOUND_CONFIG(ym2203_config)
289   MCFG_YM2203_AY8910_INTF(&ay8910_config)
293290   MCFG_SOUND_ROUTE(0, "mono", 0.15)
294291   MCFG_SOUND_ROUTE(1, "mono", 0.15)
295292   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/lockon.c
r22764r22765
197197
198198static ADDRESS_MAP_START( sound_io, AS_IO, 8, lockon_state )
199199   ADDRESS_MAP_GLOBAL_MASK(0xff)
200   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
200   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
201201   AM_RANGE(0x02, 0x02) AM_NOP
202202ADDRESS_MAP_END
203203
r22764r22765
429429   set_led_status(machine(), 1, !(data & 0x10));
430430}
431431
432static const ym2203_interface ym2203_config =
432static const ay8910_interface ay8910_config =
433433{
434   {
435      AY8910_LEGACY_OUTPUT,
436      AY8910_DEFAULT_LOADS,
437      DEVCB_INPUT_PORT("YM2203"),
438      DEVCB_NULL,
439      DEVCB_NULL,
440      DEVCB_DRIVER_MEMBER(lockon_state,ym2203_out_b),
441   },
442   DEVCB_DRIVER_LINE_MEMBER(lockon_state,ym2203_irq)
434   AY8910_LEGACY_OUTPUT,
435   AY8910_DEFAULT_LOADS,
436   DEVCB_INPUT_PORT("YM2203"),
437   DEVCB_NULL,
438   DEVCB_NULL,
439   DEVCB_DRIVER_MEMBER(lockon_state,ym2203_out_b),
443440};
444441
445442
r22764r22765
522519   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
523520
524521   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_16MHz / 4)
525   MCFG_SOUND_CONFIG(ym2203_config)
522   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lockon_state, ym2203_irq))
523   MCFG_YM2203_AY8910_INTF(&ay8910_config)
526524   MCFG_SOUND_ROUTE(0, "lspeaker", 0.40)
527525   MCFG_SOUND_ROUTE(0, "rspeaker", 0.40)
528526   MCFG_SOUND_ROUTE(1, "f2203.1l", 1.0)
trunk/src/mame/drivers/battlera.c
r22764r22765
105105
106106static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, battlera_state )
107107   AM_RANGE(0x000000, 0x00ffff) AM_ROM
108   AM_RANGE(0x040000, 0x040001) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)
108   AM_RANGE(0x040000, 0x040001) AM_DEVWRITE("ymsnd", ym2203_device, write)
109109   AM_RANGE(0x080000, 0x080001) AM_WRITE(battlera_adpcm_data_w)
110110   AM_RANGE(0x1fe800, 0x1fe80f) AM_DEVWRITE("c6280", c6280_device, c6280_w)
111111   AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank7") /* Main ram */
trunk/src/mame/drivers/gundealr.c
r22764r22765
7878
7979static ADDRESS_MAP_START( main_portmap, AS_IO, 8, gundealr_state )
8080   ADDRESS_MAP_GLOBAL_MASK(0xff)
81   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
81   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
8282ADDRESS_MAP_END
8383
8484
r22764r22765
390390      m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
391391}
392392
393static const ym2203_interface ym2203_config =
393static const ay8910_interface ay8910_config =
394394{
395   {
396      AY8910_LEGACY_OUTPUT,
397      AY8910_DEFAULT_LOADS,
398      DEVCB_NULL,
399      DEVCB_NULL,
400      DEVCB_NULL,
401      DEVCB_NULL
402   },
395   AY8910_LEGACY_OUTPUT,
396   AY8910_DEFAULT_LOADS,
397   DEVCB_NULL,
398   DEVCB_NULL,
399   DEVCB_NULL,
403400   DEVCB_NULL
404401};
405402
r22764r22765
428425   MCFG_SPEAKER_STANDARD_MONO("mono")
429426
430427   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
431   MCFG_SOUND_CONFIG(ym2203_config)
428   MCFG_YM2203_AY8910_INTF(&ay8910_config)
432429   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
433430MACHINE_CONFIG_END
434431
trunk/src/mame/drivers/vigilant.c
r22764r22765
118118
119119static ADDRESS_MAP_START( buccanrs_sound_io_map, AS_IO, 8, vigilant_state )
120120   ADDRESS_MAP_GLOBAL_MASK(0xff)
121   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
122   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
121   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
122   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
123123   AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r)             /* SDRE */
124124   AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("m72", vigilant_sample_addr_w)  /* STL / STH */
125125   AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w)                /* COUNT UP */
r22764r22765
461461
462462
463463
464static const ym2203_interface ym2203_config =
464static const ay8910_interface ay8910_config =
465465{
466   {
467      AY8910_LEGACY_OUTPUT,
468      AY8910_DEFAULT_LOADS,
469      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
470   },
471   DEVCB_LINE(m72_ym2151_irq_handler)
466   AY8910_LEGACY_OUTPUT,
467   AY8910_DEFAULT_LOADS,
468   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
472469};
473470
474471
r22764r22765
543540   MCFG_SOUND_ADD("m72", M72, 0)
544541
545542   MCFG_SOUND_ADD("ym1", YM2203, 18432000/6)
546   MCFG_SOUND_CONFIG(ym2203_config)
543   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<m72_ym2151_irq_handler>))
544   MCFG_YM2203_AY8910_INTF(&ay8910_config)
547545   MCFG_SOUND_ROUTE(0, "lspeaker",  0.35)
548546   MCFG_SOUND_ROUTE(0, "rspeaker", 0.35)
549547   MCFG_SOUND_ROUTE(1, "lspeaker",  0.35)
trunk/src/mame/drivers/dassault.c
r22764r22765
260260
261261static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, dassault_state )
262262   AM_RANGE(0x000000, 0x00ffff) AM_ROM
263   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
263   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
264264   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
265265   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
266266   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/pokechmp.c
r22764r22765
104104
105105static ADDRESS_MAP_START( pokechmp_sound_map, AS_PROGRAM, 8, pokechmp_state )
106106   AM_RANGE(0x0000, 0x07ff) AM_RAM
107   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
107   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
108108   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
109109   AM_RANGE(0x1800, 0x1800) AM_WRITENOP    /* MSM5205 chip on Pocket Gal, not connected here? */
110110   AM_RANGE(0x2000, 0x2000) AM_WRITE(pokechmp_sound_bank_w) /* sound rom bank seems to be replaced with OKI bank */
trunk/src/mame/drivers/sothello.c
r22764r22765
165165   AM_RANGE( 0x33, 0x33) AM_READ(soundcpu_status_r)
166166   AM_RANGE( 0x40, 0x4f) AM_WRITE(soundlatch_byte_w)
167167   AM_RANGE( 0x50, 0x50) AM_WRITE(bank_w)
168   AM_RANGE( 0x60, 0x61) AM_MIRROR(0x02) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
168   AM_RANGE( 0x60, 0x61) AM_MIRROR(0x02) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
169169                  /* not sure, but the A1 line is ignored, code @ $8b8 */
170170   AM_RANGE( 0x70, 0x73) AM_DEVREADWRITE( "v9938", v9938_device, read, write )
171171ADDRESS_MAP_END
r22764r22765
351351{
352352}
353353
354static const ym2203_interface ym2203_config =
354static const ay8910_interface ay8910_config =
355355{
356   {
357      AY8910_LEGACY_OUTPUT,
358      AY8910_DEFAULT_LOADS,
359      DEVCB_INPUT_PORT("DSWA"),
360      DEVCB_INPUT_PORT("DSWB"),
361      DEVCB_NULL,
362      DEVCB_NULL,
363   },
364   DEVCB_DRIVER_LINE_MEMBER(sothello_state,irqhandler)
356   AY8910_LEGACY_OUTPUT,
357   AY8910_DEFAULT_LOADS,
358   DEVCB_INPUT_PORT("DSWA"),
359   DEVCB_INPUT_PORT("DSWB"),
360   DEVCB_NULL,
361   DEVCB_NULL,
365362};
366363
367364static MACHINE_CONFIG_START( sothello, sothello_state )
r22764r22765
398395   /* sound hardware */
399396   MCFG_SPEAKER_STANDARD_MONO("mono")
400397   MCFG_SOUND_ADD("ymsnd", YM2203, YM_CLOCK)
401   MCFG_SOUND_CONFIG(ym2203_config)
398   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sothello_state, irqhandler))
399   MCFG_YM2203_AY8910_INTF(&ay8910_config)
402400   MCFG_SOUND_ROUTE(0, "mono", 0.25)
403401   MCFG_SOUND_ROUTE(1, "mono", 0.25)
404402   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/ddealer.c
r22764r22765
471471   AM_RANGE(0x080002, 0x080003) AM_READ_PORT("IN1")
472472   AM_RANGE(0x080008, 0x080009) AM_READ_PORT("DSW1")
473473   AM_RANGE(0x08000a, 0x08000b) AM_READ_PORT("UNK")
474   AM_RANGE(0x084000, 0x084003) AM_DEVWRITE8_LEGACY("ymsnd", ym2203_w, 0x00ff) // ym ?
474   AM_RANGE(0x084000, 0x084003) AM_DEVWRITE8("ymsnd", ym2203_device, write, 0x00ff) // ym ?
475475   AM_RANGE(0x088000, 0x0887ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram") // palette ram
476476   AM_RANGE(0x08c000, 0x08cfff) AM_RAM_WRITE(ddealer_vregs_w) AM_SHARE("vregs") // palette ram
477477
trunk/src/mame/drivers/kingdrby.c
r22764r22765
466466
467467static ADDRESS_MAP_START( cowrace_sound_io, AS_IO, 8, kingdrby_state )
468468   ADDRESS_MAP_GLOBAL_MASK(0xff)
469   AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ym2203_w)
469   AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ym2203_device, write)
470470ADDRESS_MAP_END
471471
472472
r22764r22765
945945   DEVCB_NULL /* discrete write? */
946946};
947947
948static const ym2203_interface cowrace_ym2203_interface =
948static const ay8910_interface cowrace_ay8910_config =
949949{
950   {
951      AY8910_LEGACY_OUTPUT,
952      AY8910_DEFAULT_LOADS,
953      DEVCB_DRIVER_MEMBER(kingdrby_state,sound_cmd_r),                                    // read A
954      DEVCB_DEVICE_MEMBER("oki", okim6295_device, read),          // read B
955      DEVCB_NULL,                                                 // write A
956      DEVCB_DEVICE_MEMBER("oki", okim6295_device, write)          // write B
957   },
958   DEVCB_NULL
950   AY8910_LEGACY_OUTPUT,
951   AY8910_DEFAULT_LOADS,
952   DEVCB_DRIVER_MEMBER(kingdrby_state,sound_cmd_r),                                    // read A
953   DEVCB_DEVICE_MEMBER("oki", okim6295_device, read),          // read B
954   DEVCB_NULL,                                                 // write A
955   DEVCB_DEVICE_MEMBER("oki", okim6295_device, write)          // write B
959956};
960957
961958PALETTE_INIT_MEMBER(kingdrby_state,kingdrby)
r22764r22765
10841081   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
10851082
10861083   MCFG_SOUND_REPLACE("aysnd", YM2203, 3000000)
1087   MCFG_SOUND_CONFIG(cowrace_ym2203_interface)
1084   MCFG_YM2203_AY8910_INTF(&cowrace_ay8910_config)
10881085   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
10891086MACHINE_CONFIG_END
10901087
trunk/src/mame/drivers/tigeroad.c
r22764r22765
183183
184184static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tigeroad_state )
185185   AM_RANGE(0x0000, 0x7fff) AM_ROM
186   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
187   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
186   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
187   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
188188   AM_RANGE(0xc000, 0xc7ff) AM_RAM
189189   AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r)
190190ADDRESS_MAP_END
r22764r22765
496496   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
497497}
498498
499static const ym2203_interface ym2203_config =
499static const ay8910_interface ay8910_config =
500500{
501   {
502         AY8910_LEGACY_OUTPUT,
503         AY8910_DEFAULT_LOADS,
504         DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
505   },
506   DEVCB_DRIVER_LINE_MEMBER(tigeroad_state,irqhandler)
501   AY8910_LEGACY_OUTPUT,
502   AY8910_DEFAULT_LOADS,
503   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
507504};
508505
509506static const msm5205_interface msm5205_config =
r22764r22765
545542   MCFG_SPEAKER_STANDARD_MONO("mono")
546543
547544   MCFG_SOUND_ADD("ym1", YM2203, XTAL_3_579545MHz) /* verified on pcb */
548   MCFG_SOUND_CONFIG(ym2203_config)
545   MCFG_YM2203_IRQ_HANDLER(WRITELINE(tigeroad_state, irqhandler))
546   MCFG_YM2203_AY8910_INTF(&ay8910_config)
549547   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
550548
551549   MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */
trunk/src/mame/drivers/mosaic.c
r22764r22765
105105   ADDRESS_MAP_GLOBAL_MASK(0xff)
106106   AM_RANGE(0x00, 0x3f) AM_WRITENOP    /* Z180 internal registers */
107107   AM_RANGE(0x30, 0x30) AM_READNOP /* Z180 internal registers */
108   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
108   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
109109   AM_RANGE(0x72, 0x72) AM_READWRITE(protection_r, protection_w)
110110   AM_RANGE(0x74, 0x74) AM_READ_PORT("P1")
111111   AM_RANGE(0x76, 0x76) AM_READ_PORT("P2")
r22764r22765
115115   ADDRESS_MAP_GLOBAL_MASK(0xff)
116116   AM_RANGE(0x00, 0x3f) AM_WRITENOP    /* Z180 internal registers */
117117   AM_RANGE(0x30, 0x30) AM_READNOP /* Z180 internal registers */
118   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
118   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
119119   AM_RANGE(0x72, 0x72) AM_READWRITE(gfire2_protection_r, gfire2_protection_w)
120120   AM_RANGE(0x74, 0x74) AM_READ_PORT("P1")
121121   AM_RANGE(0x76, 0x76) AM_READ_PORT("P2")
r22764r22765
232232
233233
234234
235static const ym2203_interface ym2203_config =
235static const ay8910_interface ay8910_config =
236236{
237   {
238      AY8910_LEGACY_OUTPUT,
239      AY8910_DEFAULT_LOADS,
240      DEVCB_INPUT_PORT("DSW"),
241      DEVCB_NULL,
242      DEVCB_NULL,
243      DEVCB_NULL
244   },
237   AY8910_LEGACY_OUTPUT,
238   AY8910_DEFAULT_LOADS,
239   DEVCB_INPUT_PORT("DSW"),
240   DEVCB_NULL,
241   DEVCB_NULL,
245242   DEVCB_NULL
246243};
247244
r22764r22765
282279   MCFG_SPEAKER_STANDARD_MONO("mono")
283280
284281   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
285   MCFG_SOUND_CONFIG(ym2203_config)
282   MCFG_YM2203_AY8910_INTF(&ay8910_config)
286283   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
287284MACHINE_CONFIG_END
288285
trunk/src/mame/drivers/tryout.c
r22764r22765
7575
7676static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, tryout_state )
7777   AM_RANGE(0x0000, 0x07ff) AM_RAM
78   AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
78   AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
7979   AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r)
8080   AM_RANGE(0xd000, 0xd000) AM_WRITE(tryout_sound_irq_ack_w)
8181   AM_RANGE(0xc000, 0xffff) AM_ROM
trunk/src/mame/drivers/segahang.c
r22764r22765
520520   ADDRESS_MAP_UNMAP_HIGH
521521   AM_RANGE(0x0000, 0x7fff) AM_ROM
522522   AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x0800) AM_RAM
523   AM_RANGE(0xd000, 0xd001) AM_MIRROR(0x0ffe) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
523   AM_RANGE(0xd000, 0xd001) AM_MIRROR(0x0ffe) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
524524   AM_RANGE(0xe000, 0xe0ff) AM_MIRROR(0x0f00) AM_DEVREADWRITE("pcm", segapcm_device, sega_pcm_r, sega_pcm_w)
525525ADDRESS_MAP_END
526526
r22764r22765
547547static ADDRESS_MAP_START( sound_portmap_2203x2, AS_IO, 8, segahang_state )
548548   ADDRESS_MAP_UNMAP_HIGH
549549   ADDRESS_MAP_GLOBAL_MASK(0xff)
550   AM_RANGE(0x00, 0x01) AM_MIRROR(0x3e) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
550   AM_RANGE(0x00, 0x01) AM_MIRROR(0x3e) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
551551   AM_RANGE(0x40, 0x40) AM_MIRROR(0x3f) AM_READ(sound_data_r)
552   AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x3e) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
552   AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x3e) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
553553ADDRESS_MAP_END
554554
555555
r22764r22765
802802//  SOUND CONFIGURATIONS
803803//**************************************************************************
804804
805static const ym2203_interface ym2203_config =
805static const ay8910_interface ay8910_config =
806806{
807   {
808      AY8910_LEGACY_OUTPUT,
809      AY8910_DEFAULT_LOADS,
810      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
811   },
812   DEVCB_DRIVER_LINE_MEMBER(segahang_state, sound_irq)
807   AY8910_LEGACY_OUTPUT,
808   AY8910_DEFAULT_LOADS,
809   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
813810};
814811
815812static const sega_pcm_interface segapcm_interface =
r22764r22765
899896   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
900897
901898   MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK_8MHz/2)
902   MCFG_SOUND_CONFIG(ym2203_config)
899   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segahang_state, sound_irq))
900   MCFG_YM2203_AY8910_INTF(&ay8910_config)
903901   MCFG_SOUND_ROUTE(0, "lspeaker",  0.13)
904902   MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
905903   MCFG_SOUND_ROUTE(1, "lspeaker",  0.13)
r22764r22765
927925   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
928926
929927   MCFG_SOUND_ADD("ym1", YM2203, MASTER_CLOCK_8MHz/2)
930   MCFG_SOUND_CONFIG(ym2203_config)
928   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segahang_state, sound_irq))
929   MCFG_YM2203_AY8910_INTF(&ay8910_config)
931930   MCFG_SOUND_ROUTE(0, "lspeaker",  0.13)
932931   MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
933932   MCFG_SOUND_ROUTE(1, "lspeaker",  0.13)
trunk/src/mame/drivers/djboy.c
r22764r22765
289289static ADDRESS_MAP_START( cpu2_port_am, AS_IO, 8, djboy_state )
290290   ADDRESS_MAP_GLOBAL_MASK(0xff)
291291   AM_RANGE(0x00, 0x00) AM_WRITE(cpu2_bankswitch_w)
292   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
292   AM_RANGE(0x02, 0x03) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
293293   AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r)
294294   AM_RANGE(0x06, 0x06) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
295295   AM_RANGE(0x07, 0x07) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/taito_f2.c
r22764r22765
11701170static ADDRESS_MAP_START( cameltrya_sound_map, AS_PROGRAM, 8, taitof2_state )
11711171   AM_RANGE(0x0000, 0x7fff) AM_ROM     // I can't see a bank control, but there ARE some bytes past 0x8000
11721172   AM_RANGE(0x8000, 0x8fff) AM_RAM
1173   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
1173   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
11741174   AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
11751175   AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
11761176//  AM_RANGE(0xb000, 0xb000) AM_WRITE(unknown_w)    // probably controlling sample player?
r22764r22765
28132813   // Implement //
28142814}
28152815
2816static const ym2203_interface ym2203_config =
2816static const ay8910_interface ay8910_config =
28172817{
2818   {
2819      AY8910_LEGACY_OUTPUT,
2820      AY8910_DEFAULT_LOADS,
2821      DEVCB_NULL,             /* portA read */
2822      DEVCB_NULL,
2823      DEVCB_DRIVER_MEMBER(taitof2_state,cameltrya_porta_w),   /* portA write - not implemented */
2824      DEVCB_NULL,             /* portB write */
2825   },
2826   DEVCB_DRIVER_LINE_MEMBER(taitof2_state,irqhandler)
2818   AY8910_LEGACY_OUTPUT,
2819   AY8910_DEFAULT_LOADS,
2820   DEVCB_NULL,             /* portA read */
2821   DEVCB_NULL,
2822   DEVCB_DRIVER_MEMBER(taitof2_state,cameltrya_porta_w),   /* portA write - not implemented */
2823   DEVCB_NULL,             /* portB write */
28272824};
28282825
28292826
r22764r22765
36073604   MCFG_SPEAKER_STANDARD_MONO("mono")
36083605
36093606   MCFG_SOUND_ADD("ymsnd", YM2203, 24000000/8) /* verified on pcb  */
3610   MCFG_SOUND_CONFIG(ym2203_config)
3607   MCFG_YM2203_IRQ_HANDLER(WRITELINE(taitof2_state, irqhandler))
3608   MCFG_YM2203_AY8910_INTF(&ay8910_config)
36113609   MCFG_SOUND_ROUTE(0, "mono", 0.20)
36123610   MCFG_SOUND_ROUTE(1, "mono", 0.20)
36133611   MCFG_SOUND_ROUTE(2, "mono", 0.20)
trunk/src/mame/drivers/xxmissio.c
r22764r22765
8686static ADDRESS_MAP_START( map1, AS_PROGRAM, 8, xxmissio_state )
8787   AM_RANGE(0x0000, 0x7fff) AM_ROM
8888
89   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
90   AM_RANGE(0x8002, 0x8003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
89   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
90   AM_RANGE(0x8002, 0x8003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
9191
9292   AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1")
9393   AM_RANGE(0xa001, 0xa001) AM_READ_PORT("P2")
r22764r22765
110110   AM_RANGE(0x0000, 0x3fff) AM_ROM
111111   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
112112
113   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
114   AM_RANGE(0x8002, 0x8003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
113   AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
114   AM_RANGE(0x8002, 0x8003) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
115115   AM_RANGE(0x8006, 0x8006) AM_WRITE(xxmissio_bank_sel_w)
116116
117117   AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1")
r22764r22765
253253
254254/****************************************************************************/
255255
256static const ym2203_interface ym2203_interface_1 =
256static const ay8910_interface ay8910_config_1 =
257257{
258   {
259      AY8910_LEGACY_OUTPUT,
260      AY8910_DEFAULT_LOADS,
261      DEVCB_INPUT_PORT("DSW1"),
262      DEVCB_INPUT_PORT("DSW2"),
263      DEVCB_NULL,
264      DEVCB_NULL
265   },
258   AY8910_LEGACY_OUTPUT,
259   AY8910_DEFAULT_LOADS,
260   DEVCB_INPUT_PORT("DSW1"),
261   DEVCB_INPUT_PORT("DSW2"),
262   DEVCB_NULL,
266263   DEVCB_NULL
267264};
268265
269static const ym2203_interface ym2203_interface_2 =
266static const ay8910_interface ay8910_config_2 =
270267{
271   {
272      AY8910_LEGACY_OUTPUT,
273      AY8910_DEFAULT_LOADS,
274      DEVCB_NULL,
275      DEVCB_NULL,
276      DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_x_w),
277      DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_y_w)
278   },
279   DEVCB_NULL
268   AY8910_LEGACY_OUTPUT,
269   AY8910_DEFAULT_LOADS,
270   DEVCB_NULL,
271   DEVCB_NULL,
272   DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_x_w),
273   DEVCB_DRIVER_MEMBER(xxmissio_state, xxmissio_scroll_y_w)
280274};
281275
282276static MACHINE_CONFIG_START( xxmissio, xxmissio_state )
r22764r22765
309303   MCFG_SPEAKER_STANDARD_MONO("mono")
310304
311305   MCFG_SOUND_ADD("ym1", YM2203, 12000000/8)
312   MCFG_SOUND_CONFIG(ym2203_interface_1)
306   MCFG_YM2203_AY8910_INTF(&ay8910_config_1)
313307   MCFG_SOUND_ROUTE(0, "mono", 0.15)
314308   MCFG_SOUND_ROUTE(1, "mono", 0.15)
315309   MCFG_SOUND_ROUTE(2, "mono", 0.15)
316310   MCFG_SOUND_ROUTE(3, "mono", 0.40)
317311
318312   MCFG_SOUND_ADD("ym2", YM2203, 12000000/8)
319   MCFG_SOUND_CONFIG(ym2203_interface_2)
313   MCFG_YM2203_AY8910_INTF(&ay8910_config_2)
320314   MCFG_SOUND_ROUTE(0, "mono", 0.15)
321315   MCFG_SOUND_ROUTE(1, "mono", 0.15)
322316   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/fuukifg2.c
r22764r22765
142142   AM_RANGE(0x11, 0x11) AM_READ(soundlatch_byte_r) AM_WRITENOP // From Main CPU / ? To Main CPU ?
143143   AM_RANGE(0x20, 0x20) AM_WRITE(fuuki16_oki_banking_w)    // Oki Banking
144144   AM_RANGE(0x30, 0x30) AM_WRITENOP    // ? In the NMI routine
145   AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
145   AM_RANGE(0x40, 0x41) AM_DEVWRITE("ym1", ym2203_device, write)
146146   AM_RANGE(0x50, 0x51) AM_DEVREADWRITE_LEGACY("ym2", ym3812_r, ym3812_w)
147147   AM_RANGE(0x60, 0x60) AM_DEVREAD("oki", okim6295_device, read)   // M6295
148148   AM_RANGE(0x61, 0x61) AM_DEVWRITE("oki", okim6295_device, write) // M6295
trunk/src/mame/drivers/cbuster.c
r22764r22765
127127
128128static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cbuster_state )
129129   AM_RANGE(0x000000, 0x00ffff) AM_ROM
130   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
130   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
131131   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
132132   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
133133   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
trunk/src/mame/drivers/lsasquad.c
r22764r22765
189189static ADDRESS_MAP_START( lsasquad_sound_map, AS_PROGRAM, 8, lsasquad_state )
190190   AM_RANGE(0x0000, 0x7fff) AM_ROM
191191   AM_RANGE(0x8000, 0x87ff) AM_RAM
192   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r,ym2203_w)
192   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
193193   AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)
194194   AM_RANGE(0xd000, 0xd000) AM_READWRITE(lsasquad_sh_sound_command_r, lsasquad_sh_result_w)
195195   AM_RANGE(0xd400, 0xd400) AM_WRITE(lsasquad_sh_nmi_disable_w)
r22764r22765
396396static ADDRESS_MAP_START( daikaiju_sound_map, AS_PROGRAM, 8, lsasquad_state )
397397   AM_RANGE(0x0000, 0x7fff) AM_ROM
398398   AM_RANGE(0x8000, 0x87ff) AM_RAM
399   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
399   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
400400   AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)
401401   AM_RANGE(0xd000, 0xd000) AM_READ(daikaiju_sh_sound_command_r)
402402   AM_RANGE(0xd400, 0xd400) AM_WRITENOP
r22764r22765
548548}
549549
550550
551static const ym2203_interface ym2203_config =
551static const ay8910_interface ay8910_config =
552552{
553   {
554      AY8910_LEGACY_OUTPUT,
555      AY8910_DEFAULT_LOADS,
556      DEVCB_NULL,
557      DEVCB_NULL,
558      DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
559      DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
560   },
561   DEVCB_DRIVER_LINE_MEMBER(lsasquad_state,irqhandler)
553   AY8910_LEGACY_OUTPUT,
554   AY8910_DEFAULT_LOADS,
555   DEVCB_NULL,
556   DEVCB_NULL,
557   DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
558   DEVCB_DRIVER_MEMBER(lsasquad_state,unk),
562559};
563560
564561
r22764r22765
647644   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12)
648645
649646   MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK / 8)
650   MCFG_SOUND_CONFIG(ym2203_config)
647   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lsasquad_state, irqhandler))
648   MCFG_YM2203_AY8910_INTF(&ay8910_config)
651649   MCFG_SOUND_ROUTE(0, "mono", 0.12)
652650   MCFG_SOUND_ROUTE(1, "mono", 0.12)
653651   MCFG_SOUND_ROUTE(2, "mono", 0.12)
r22764r22765
703701   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12)
704702
705703   MCFG_SOUND_ADD("ymsnd", YM2203, MASTER_CLOCK / 8)
706   MCFG_SOUND_CONFIG(ym2203_config)
704   MCFG_YM2203_IRQ_HANDLER(WRITELINE(lsasquad_state, irqhandler))
705   MCFG_YM2203_AY8910_INTF(&ay8910_config)
707706   MCFG_SOUND_ROUTE(0, "mono", 0.12)
708707   MCFG_SOUND_ROUTE(1, "mono", 0.12)
709708   MCFG_SOUND_ROUTE(2, "mono", 0.12)
trunk/src/mame/drivers/gaiden.c
r22764r22765
428428   AM_RANGE(0xe000, 0xefff) AM_ROM /* raiga only */
429429   AM_RANGE(0xf000, 0xf7ff) AM_RAM
430430   AM_RANGE(0xf800, 0xf800) AM_DEVREADWRITE("oki", okim6295_device, read, write)
431   AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
432   AM_RANGE(0xf820, 0xf821) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
431   AM_RANGE(0xf810, 0xf811) AM_DEVWRITE("ym1", ym2203_device, write)
432   AM_RANGE(0xf820, 0xf821) AM_DEVWRITE("ym2", ym2203_device, write)
433433   AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */
434434   AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r)
435435ADDRESS_MAP_END
r22764r22765
741741   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
742742}
743743
744static const ym2203_interface ym2203_config =
744static const ay8910_interface ay8910_config =
745745{
746   {
747      AY8910_LEGACY_OUTPUT,
748      AY8910_DEFAULT_LOADS,
749      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
750   },
751   DEVCB_DRIVER_LINE_MEMBER(gaiden_state,irqhandler)
746   AY8910_LEGACY_OUTPUT,
747   AY8910_DEFAULT_LOADS,
748   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
752749};
753750
754751static MACHINE_CONFIG_START( shadoww, gaiden_state )
r22764r22765
782779   MCFG_SPEAKER_STANDARD_MONO("mono")
783780
784781   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
785   MCFG_SOUND_CONFIG(ym2203_config)
782   MCFG_YM2203_IRQ_HANDLER(WRITELINE(gaiden_state, irqhandler))
783   MCFG_YM2203_AY8910_INTF(&ay8910_config)
786784   MCFG_SOUND_ROUTE(0, "mono", 0.15)
787785   MCFG_SOUND_ROUTE(1, "mono", 0.15)
788786   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
893891static ADDRESS_MAP_START( mastninj_sound_map, AS_PROGRAM, 8, gaiden_state )
894892   AM_RANGE(0x0000, 0xdfff) AM_ROM
895893   AM_RANGE(0xf000, 0xf7ff) AM_RAM
896   AM_RANGE(0xc400, 0xc401) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
897   AM_RANGE(0xc800, 0xc801) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
894   AM_RANGE(0xc400, 0xc401) AM_DEVWRITE("ym1", ym2203_device, write)
895   AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("ym2", ym2203_device, write)
898896//  AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */
899897//  AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r)
900898ADDRESS_MAP_END
r22764r22765
954952   MCFG_SPEAKER_STANDARD_MONO("mono")
955953
956954   MCFG_SOUND_ADD("ym1", YM2203, 4000000) /* ?? MHz */
957   MCFG_SOUND_CONFIG(ym2203_config)
955   MCFG_YM2203_IRQ_HANDLER(WRITELINE(gaiden_state, irqhandler))
956   MCFG_YM2203_AY8910_INTF(&ay8910_config)
958957   MCFG_SOUND_ROUTE(0, "mono", 0.15)
959958   MCFG_SOUND_ROUTE(1, "mono", 0.15)
960959   MCFG_SOUND_ROUTE(2, "mono", 0.15)
trunk/src/mame/drivers/sidepckt.c
r22764r22765
245245
246246static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sidepckt_state )
247247   AM_RANGE(0x0000, 0x0fff) AM_RAM
248   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
248   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym1", ym2203_device, write)
249249   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
250250   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
251251   AM_RANGE(0x8000, 0xffff) AM_ROM
trunk/src/mame/drivers/madmotor.c
r22764r22765
6767/* Physical memory map (21 bits) */
6868static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, madmotor_state )
6969   AM_RANGE(0x000000, 0x00ffff) AM_ROM
70   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
71   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device,read,write)
70   AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
71   AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ym2", ym2151_device, read, write)
7272   AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
7373   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
7474   AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r)
trunk/src/mame/drivers/cshooter.c
r22764r22765
326326
327327static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cshooter_state )
328328   AM_RANGE(0x0000, 0x1fff) AM_ROM
329   AM_RANGE(0xc000, 0xc001) AM_WRITENOP // AM_DEVWRITE_LEGACY("ym1", ym2203_w) ?
330   AM_RANGE(0xc800, 0xc801) AM_WRITENOP // AM_DEVWRITE_LEGACY("ym2", ym2203_w) ?
329   AM_RANGE(0xc000, 0xc001) AM_WRITENOP // AM_DEVWRITE("ym1", ym2203_device, write) ?
330   AM_RANGE(0xc800, 0xc801) AM_WRITENOP // AM_DEVWRITE("ym2", ym2203_device, write) ?
331331   AM_RANGE(0xf800, 0xffff) AM_RAM
332332ADDRESS_MAP_END
333333
trunk/src/mame/drivers/dec0.c
r22764r22765
546546
547547static ADDRESS_MAP_START( dec0_s_map, AS_PROGRAM, 8, dec0_state )
548548   AM_RANGE(0x0000, 0x05ff) AM_RAM
549   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
549   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
550550   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
551551   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
552552   AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write)
r22764r22765
558558   AM_RANGE(0x000000, 0x00ffff) AM_ROM
559559   AM_RANGE(0x090000, 0x090001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
560560   AM_RANGE(0x0a0000, 0x0a0001) AM_READNOP /* Protection counter */
561   AM_RANGE(0x0b0000, 0x0b0001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
561   AM_RANGE(0x0b0000, 0x0b0001) AM_DEVWRITE("ym1", ym2203_device, write)
562562   AM_RANGE(0x0e0000, 0x0e0001) AM_DEVREADWRITE("oki", okim6295_device, read, write)
563563   AM_RANGE(0x0f0000, 0x0f0001) AM_READ(soundlatch_byte_r)
564564   AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8")
r22764r22765
568568static ADDRESS_MAP_START( midres_s_map, AS_PROGRAM, 8, dec0_state )
569569   AM_RANGE(0x000000, 0x00ffff) AM_ROM
570570   AM_RANGE(0x108000, 0x108001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
571   AM_RANGE(0x118000, 0x118001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
571   AM_RANGE(0x118000, 0x118001) AM_DEVWRITE("ym1", ym2203_device, write)
572572   AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki", okim6295_device, read, write)
573573   AM_RANGE(0x138000, 0x138001) AM_READ(soundlatch_byte_r)
574574   AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8")
r22764r22765
667667static ADDRESS_MAP_START( automat_s_map, AS_PROGRAM, 8, dec0_automat_state )
668668   AM_RANGE(0x0103, 0x0103) AM_WRITENOP
669669   AM_RANGE(0xc000, 0xc7ff) AM_RAM
670   AM_RANGE(0xc800, 0xc801) AM_DEVWRITE_LEGACY("2203a", ym2203_w)
670   AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("2203a", ym2203_device, write)
671671   AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r)
672   AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("2203b", ym2203_w)
672   AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("2203b", ym2203_device, write)
673673   AM_RANGE(0xf000, 0xf000) AM_WRITE(automat_adpcm_w)
674674   AM_RANGE(0x0000, 0xffff) AM_ROM
675675ADDRESS_MAP_END
trunk/src/mame/drivers/itech8.c
r22764r22765
925925static ADDRESS_MAP_START( sound2203_map, AS_PROGRAM, 8, itech8_state )
926926   AM_RANGE(0x0000, 0x0000) AM_WRITENOP
927927   AM_RANGE(0x1000, 0x1000) AM_READ(sound_data_r)
928   AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x0002) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
928   AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x0002) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
929929   AM_RANGE(0x3000, 0x37ff) AM_RAM
930930   AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
931931   AM_RANGE(0x8000, 0xffff) AM_ROM
r22764r22765
16351635 *
16361636 *************************************/
16371637
1638static const ym2203_interface ym2203_config =
1639{
1640   {
1641      AY8910_LEGACY_OUTPUT,
1642      AY8910_DEFAULT_LOADS,
1643      DEVCB_NULL,
1644      DEVCB_NULL,
1645      DEVCB_NULL,
1646      DEVCB_DRIVER_MEMBER(itech8_state,ym2203_portb_out)
1647   },
1648   DEVCB_DRIVER_LINE_MEMBER(itech8_state,generate_sound_irq)
1649};
1650
1651
16521638static const ay8910_interface ay8910_config =
16531639{
16541640   AY8910_LEGACY_OUTPUT,
r22764r22765
17191705
17201706   /* sound hardware */
17211707   MCFG_SOUND_ADD("ymsnd", YM2203, CLOCK_8MHz/2)
1722   MCFG_SOUND_CONFIG(ym2203_config)
1708   MCFG_YM2203_IRQ_HANDLER(WRITELINE(itech8_state, generate_sound_irq))
1709   MCFG_YM2203_AY8910_INTF(&ay8910_config)
17231710   MCFG_SOUND_ROUTE(0, "mono", 0.07)
17241711   MCFG_SOUND_ROUTE(1, "mono", 0.07)
17251712   MCFG_SOUND_ROUTE(2, "mono", 0.07)
trunk/src/mame/drivers/sfkick.c
r22764r22765
356356static ADDRESS_MAP_START( sfkick_sound_io_map, AS_IO, 8, sfkick_state )
357357   ADDRESS_MAP_GLOBAL_MASK(0xff)
358358   AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r)
359   AM_RANGE(0x04, 0x05) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
359   AM_RANGE(0x04, 0x05) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
360360ADDRESS_MAP_END
361361
362362WRITE8_MEMBER(sfkick_state::ppi_port_c_w)
r22764r22765
466466   m_soundcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff);
467467}
468468
469static const ym2203_interface ym2203_config =
469static const ay8910_interface ay8910_config =
470470{
471   {
472      AY8910_LEGACY_OUTPUT,
473      AY8910_DEFAULT_LOADS,
474      DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,
475   },
476   DEVCB_DRIVER_LINE_MEMBER(sfkick_state,irqhandler)
471   AY8910_LEGACY_OUTPUT,
472   AY8910_DEFAULT_LOADS,
473   DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,DEVCB_NULL,
477474};
478475
479476static MACHINE_CONFIG_START( sfkick, sfkick_state )
r22764r22765
508505
509506   MCFG_SPEAKER_STANDARD_MONO("mono")
510507   MCFG_SOUND_ADD("ym1", YM2203, MASTER_CLOCK/6)
511   MCFG_SOUND_CONFIG(ym2203_config)
508   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sfkick_state, irqhandler))
509   MCFG_YM2203_AY8910_INTF(&ay8910_config)
512510   MCFG_SOUND_ROUTE(0, "mono", 0.25)
513511   MCFG_SOUND_ROUTE(1, "mono", 0.25)
514512   MCFG_SOUND_ROUTE(2, "mono", 0.25)
trunk/src/mame/drivers/thedeep.c
r22764r22765
175175
176176static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, thedeep_state )
177177   AM_RANGE(0x0000, 0x07ff) AM_RAM
178   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)  //
178   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ymsnd", ym2203_device, write)  //
179179   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) // From Main CPU
180180   AM_RANGE(0x8000, 0xffff) AM_ROM
181181ADDRESS_MAP_END
r22764r22765
394394   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
395395}
396396
397static const ym2203_interface thedeep_ym2203_intf =
397static const ay8910_interface ay8910_config =
398398{
399   {
400      AY8910_LEGACY_OUTPUT,
401      AY8910_DEFAULT_LOADS,
402      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
403   },
404   DEVCB_DRIVER_LINE_MEMBER(thedeep_state,irqhandler)
399   AY8910_LEGACY_OUTPUT,
400   AY8910_DEFAULT_LOADS,
401   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
405402};
406403
407404TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::thedeep_interrupt)
r22764r22765
473470   MCFG_SPEAKER_STANDARD_MONO("mono")
474471
475472   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)  /* verified on pcb */
476   MCFG_SOUND_CONFIG(thedeep_ym2203_intf)
473   MCFG_YM2203_IRQ_HANDLER(WRITELINE(thedeep_state, irqhandler))
474   MCFG_YM2203_AY8910_INTF(&ay8910_config)
477475   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
478476MACHINE_CONFIG_END
479477
trunk/src/mame/drivers/shootout.c
r22764r22765
8787   AM_RANGE(0x1003, 0x1003) AM_READ_PORT("DSW2")
8888   AM_RANGE(0x1800, 0x1800) AM_WRITE(shootout_coin_counter_w)
8989   AM_RANGE(0x2000, 0x21ff) AM_RAM AM_SHARE("spriteram")
90   AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r,ym2203_w)
90   AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
9191   AM_RANGE(0x3000, 0x37ff) AM_RAM_WRITE(shootout_textram_w) AM_SHARE("textram")
9292   AM_RANGE(0x3800, 0x3fff) AM_RAM_WRITE(shootout_videoram_w) AM_SHARE("videoram")
9393   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
r22764r22765
9999/* same as Tryout */
100100static ADDRESS_MAP_START( shootout_sound_map, AS_PROGRAM, 8, shootout_state )
101101   AM_RANGE(0x0000, 0x07ff) AM_RAM
102   AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r,ym2203_w)
102   AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
103103   AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r)
104104   AM_RANGE(0xc000, 0xffff) AM_ROM
105105   AM_RANGE(0xd000, 0xd000) AM_WRITENOP // unknown, NOT irq/nmi mask
r22764r22765
239239   m_maincpu->set_input_line(0, state);
240240}
241241
242static const ym2203_interface ym2203_config =
242static const ay8910_interface ay8910_config =
243243{
244   {
245      AY8910_LEGACY_OUTPUT,
246      AY8910_DEFAULT_LOADS,
247      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
248   },
249   DEVCB_DRIVER_LINE_MEMBER(shootout_state,shootout_snd_irq)
244   AY8910_LEGACY_OUTPUT,
245   AY8910_DEFAULT_LOADS,
246   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
250247};
251248
252static const ym2203_interface ym2203_interface2 =
249static const ay8910_interface ay8910_config2 =
253250{
254   {
255      AY8910_LEGACY_OUTPUT,
256      AY8910_DEFAULT_LOADS,
257      DEVCB_NULL,
258      DEVCB_NULL,
259      DEVCB_DRIVER_MEMBER(shootout_state, shootout_bankswitch_w),
260      DEVCB_DRIVER_MEMBER(shootout_state, shootout_flipscreen_w)
261   },
262   DEVCB_DRIVER_LINE_MEMBER(shootout_state,shootout_snd2_irq)
251   AY8910_LEGACY_OUTPUT,
252   AY8910_DEFAULT_LOADS,
253   DEVCB_NULL,
254   DEVCB_NULL,
255   DEVCB_DRIVER_MEMBER(shootout_state, shootout_bankswitch_w),
256   DEVCB_DRIVER_MEMBER(shootout_state, shootout_flipscreen_w)
263257};
264258
265259static MACHINE_CONFIG_START( shootout, shootout_state )
r22764r22765
287281   MCFG_SPEAKER_STANDARD_MONO("mono")
288282
289283   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
290   MCFG_SOUND_CONFIG(ym2203_config)
284   MCFG_YM2203_IRQ_HANDLER(WRITELINE(shootout_state, shootout_snd_irq))
285   MCFG_YM2203_AY8910_INTF(&ay8910_config)
291286   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
292287MACHINE_CONFIG_END
293288
r22764r22765
314309   MCFG_SPEAKER_STANDARD_MONO("mono")
315310
316311   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
317   MCFG_SOUND_CONFIG(ym2203_interface2)
312   MCFG_YM2203_IRQ_HANDLER(WRITELINE(shootout_state, shootout_snd2_irq))
313   MCFG_YM2203_AY8910_INTF(&ay8910_config2)
318314   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
319315MACHINE_CONFIG_END
320316
trunk/src/mame/drivers/mexico86.c
r22764r22765
6565
6666READ8_MEMBER(mexico86_state::kiki_ym2203_r)
6767{
68   device_t *device = machine().device("ymsnd");
69   UINT8 result = ym2203_r(device, space, offset);
68   UINT8 result = m_ymsnd->read(space, offset);
7069
7170   if (offset == 0)
7271      result &= 0x7f;
r22764r22765
10099   AM_RANGE(0x0000, 0x7fff) AM_ROM
101100   AM_RANGE(0x8000, 0xa7ff) AM_RAM AM_SHARE("share1")
102101   AM_RANGE(0xa800, 0xbfff) AM_RAM
103   AM_RANGE(0xc000, 0xc001) AM_READ(kiki_ym2203_r) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w)
102   AM_RANGE(0xc000, 0xc001) AM_READ(kiki_ym2203_r) AM_DEVWRITE("ymsnd", ym2203_device, write)
104103ADDRESS_MAP_END
105104
106105static ADDRESS_MAP_START( mexico86_m68705_map, AS_PROGRAM, 8, mexico86_state )
r22764r22765
399398 *
400399 *************************************/
401400
402static const ym2203_interface ym2203_config =
401static const ay8910_interface ay8910_config =
403402{
404   {
405      AY8910_LEGACY_OUTPUT,
406      AY8910_DEFAULT_LOADS,
407      DEVCB_INPUT_PORT("DSW0"),
408      DEVCB_INPUT_PORT("DSW1"),
409      DEVCB_NULL,
410      DEVCB_NULL
411   },
403   AY8910_LEGACY_OUTPUT,
404   AY8910_DEFAULT_LOADS,
405   DEVCB_INPUT_PORT("DSW0"),
406   DEVCB_INPUT_PORT("DSW1"),
407   DEVCB_NULL,
412408   DEVCB_NULL
413409};
414410
r22764r22765
501497   MCFG_SPEAKER_STANDARD_MONO("mono")
502498
503499   MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
504   MCFG_SOUND_CONFIG(ym2203_config)
500   MCFG_YM2203_AY8910_INTF(&ay8910_config)
505501   MCFG_SOUND_ROUTE(0, "mono", 0.30)
506502   MCFG_SOUND_ROUTE(1, "mono", 0.30)
507503   MCFG_SOUND_ROUTE(2, "mono", 0.30)
trunk/src/mame/drivers/ashnojoe.c
r22764r22765
142142
143143static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, ashnojoe_state )
144144   ADDRESS_MAP_GLOBAL_MASK(0xff)
145   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
145   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
146146   AM_RANGE(0x02, 0x02) AM_WRITE(adpcm_w)
147147   AM_RANGE(0x04, 0x04) AM_READ(sound_latch_r)
148148   AM_RANGE(0x06, 0x06) AM_READ(sound_latch_status_r)
r22764r22765
289289   membank("bank4")->set_entry(data & 0x0f);
290290}
291291
292static const ym2203_interface ym2203_config =
292static const ay8910_interface ay8910_config =
293293{
294   {
295      AY8910_LEGACY_OUTPUT,
296      AY8910_DEFAULT_LOADS,
297      DEVCB_NULL,
298      DEVCB_NULL,
299      DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_a),
300      DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_b),
301   },
302   DEVCB_DRIVER_LINE_MEMBER(ashnojoe_state,ym2203_irq_handler)
294   AY8910_LEGACY_OUTPUT,
295   AY8910_DEFAULT_LOADS,
296   DEVCB_NULL,
297   DEVCB_NULL,
298   DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_a),
299   DEVCB_DRIVER_MEMBER(ashnojoe_state,ym2203_write_b),
303300};
304301
305302WRITE_LINE_MEMBER(ashnojoe_state::ashnojoe_vclk_cb)
r22764r22765
367364   MCFG_SPEAKER_STANDARD_MONO("mono")
368365
369366   MCFG_SOUND_ADD("ymsnd", YM2203, 4000000)
370   MCFG_SOUND_CONFIG(ym2203_config)
367   MCFG_YM2203_IRQ_HANDLER(WRITELINE(ashnojoe_state, ym2203_irq_handler))
368   MCFG_YM2203_AY8910_INTF(&ay8910_config)
371369   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.1)
372370
373371   MCFG_SOUND_ADD("msm", MSM5205, 384000)
trunk/src/mame/drivers/tnzs.c
r22764r22765
779779   AM_RANGE(0x0000, 0x7fff) AM_ROM
780780   AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("subbank")
781781   AM_RANGE(0xa000, 0xa000) AM_WRITE(tnzs_bankswitch1_w)
782   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
782   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
783783   AM_RANGE(0xc000, 0xc001) AM_READWRITE(tnzs_mcu_r, tnzs_mcu_w)   /* not present in insectx */
784784   AM_RANGE(0xd000, 0xdfff) AM_RAM
785785   AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
r22764r22765
792792   AM_RANGE(0x0000, 0x7fff) AM_ROM
793793   AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("subbank")
794794   AM_RANGE(0xa000, 0xa000) AM_WRITE(tnzs_bankswitch1_w)
795   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
795   AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
796796   AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0")
797797   AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN1")
798798   AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN2")
r22764r22765
852852
853853static ADDRESS_MAP_START( tnzsb_io_map, AS_IO, 8, tnzs_state )
854854   ADDRESS_MAP_GLOBAL_MASK(0xff)
855   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
855   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
856856   AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r)
857857ADDRESS_MAP_END
858858
r22764r22765
15481548GFXDECODE_END
15491549
15501550
1551static const ym2203_interface ym2203_config =
1551static const ay8910_interface ay8910_config =
15521552{
1553   {
1554      AY8910_LEGACY_OUTPUT,
1555      AY8910_DEFAULT_LOADS,
1556      DEVCB_INPUT_PORT("DSWA"),
1557      DEVCB_INPUT_PORT("DSWB"),
1558      DEVCB_NULL,
1559      DEVCB_NULL
1560   },
1553   AY8910_LEGACY_OUTPUT,
1554   AY8910_DEFAULT_LOADS,
1555   DEVCB_INPUT_PORT("DSWA"),
1556   DEVCB_INPUT_PORT("DSWB"),
1557   DEVCB_NULL,
15611558   DEVCB_NULL
15621559};
15631560
r22764r22765
15681565   m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
15691566}
15701567
1571static const ym2203_interface kageki_ym2203_interface =
1568static const ay8910_interface kageki_ay8910_config =
15721569{
1573   {
1574      AY8910_LEGACY_OUTPUT,
1575      AY8910_DEFAULT_LOADS,
1576      DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_r),
1577      DEVCB_NULL,
1578      DEVCB_NULL,
1579      DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_w)
1580   },
1581   DEVCB_NULL
1570   AY8910_LEGACY_OUTPUT,
1571   AY8910_DEFAULT_LOADS,
1572   DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_r),
1573   DEVCB_NULL,
1574   DEVCB_NULL,
1575   DEVCB_DRIVER_MEMBER(tnzs_state,kageki_csport_w)
15821576};
15831577
1584static const ym2203_interface ym2203b_interface =
1578
1579static const ay8910_interface tnzsb_ay8910_config =
15851580{
1586   {
1587      AY8910_LEGACY_OUTPUT,
1588      AY8910_DEFAULT_LOADS,
1589      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
1590   },
1591   DEVCB_DRIVER_LINE_MEMBER(tnzs_state,irqhandler)
1581   AY8910_LEGACY_OUTPUT,
1582   AY8910_DEFAULT_LOADS,
1583   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
15921584};
15931585
1594static const ym2203_interface kabukiz_ym2203_interface =
1586static const ay8910_interface kabukiz_ay8910_config =
15951587{
1596   {
1597      AY8910_LEGACY_OUTPUT,
1598      AY8910_DEFAULT_LOADS,
1599      DEVCB_NULL,
1600      DEVCB_NULL,
1601      DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sound_bank_w),
1602      DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sample_w)
1603   },
1604   DEVCB_DRIVER_LINE_MEMBER(tnzs_state,irqhandler)
1588   AY8910_LEGACY_OUTPUT,
1589   AY8910_DEFAULT_LOADS,
1590   DEVCB_NULL,
1591   DEVCB_NULL,
1592   DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sound_bank_w),
1593   DEVCB_DRIVER_MEMBER(tnzs_state,kabukiz_sample_w)
16051594};
16061595
16071596static const samples_interface tnzs_samples_interface =
r22764r22765
16471636   MCFG_SPEAKER_STANDARD_MONO("mono")
16481637
16491638   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
1650   MCFG_SOUND_CONFIG(ym2203_config)
1639   MCFG_YM2203_AY8910_INTF(&ay8910_config)
16511640   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
16521641MACHINE_CONFIG_END
16531642
r22764r22765
16881677   MCFG_SPEAKER_STANDARD_MONO("mono")
16891678
16901679   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
1691   MCFG_SOUND_CONFIG(ym2203_config)
1680   MCFG_YM2203_AY8910_INTF(&ay8910_config)
16921681   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
16931682MACHINE_CONFIG_END
16941683
r22764r22765
17311720   MCFG_SPEAKER_STANDARD_MONO("mono")
17321721
17331722   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
1734   MCFG_SOUND_CONFIG(ym2203_config)
1723   MCFG_YM2203_AY8910_INTF(&ay8910_config)
17351724   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
17361725MACHINE_CONFIG_END
17371726
r22764r22765
17701759   MCFG_SPEAKER_STANDARD_MONO("mono")
17711760
17721761   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
1773   MCFG_SOUND_CONFIG(ym2203_config)
1762   MCFG_YM2203_AY8910_INTF(&ay8910_config)
17741763   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
17751764MACHINE_CONFIG_END
17761765
r22764r22765
18091798   MCFG_SPEAKER_STANDARD_MONO("mono")
18101799
18111800   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
1812   MCFG_SOUND_CONFIG(kageki_ym2203_interface)
1801   MCFG_YM2203_AY8910_INTF(&kageki_ay8910_config)
18131802   MCFG_SOUND_ROUTE(0, "mono", 0.15)
18141803   MCFG_SOUND_ROUTE(1, "mono", 0.15)
18151804   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r22764r22765
18581847   MCFG_SPEAKER_STANDARD_MONO("mono")
18591848
18601849   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
1861   MCFG_SOUND_CONFIG(ym2203b_interface)
1850   MCFG_YM2203_IRQ_HANDLER(WRITELINE(tnzs_state, irqhandler))
1851   MCFG_YM2203_AY8910_INTF(&tnzsb_ay8910_config)
18621852   MCFG_SOUND_ROUTE(0, "mono", 1.0)
18631853   MCFG_SOUND_ROUTE(1, "mono", 1.0)
18641854   MCFG_SOUND_ROUTE(2, "mono", 1.0)
r22764r22765
18761866   MCFG_CPU_PROGRAM_MAP(kabukiz_cpu2_map)
18771867
18781868   MCFG_SOUND_MODIFY("ymsnd")
1879   MCFG_SOUND_CONFIG(kabukiz_ym2203_interface)
1869   MCFG_YM2203_AY8910_INTF(&kabukiz_ay8910_config)
18801870
18811871   MCFG_DAC_ADD("dac")
18821872   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
trunk/src/mame/drivers/metlclsh.c
r22764r22765
6767   AM_RANGE(0xc0c3, 0xc0c3) AM_WRITE(metlclsh_ack_nmi)             // nmi ack
6868/**/AM_RANGE(0xc800, 0xc82f) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
6969/**/AM_RANGE(0xcc00, 0xcc2f) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
70   AM_RANGE(0xd000, 0xd001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w)
70   AM_RANGE(0xd000, 0xd001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
7171/**/AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(metlclsh_fgram_w) AM_SHARE("fgram")
7272   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym2", ym3526_w )
7373   AM_RANGE(0xe800, 0xe9ff) AM_RAM AM_SHARE("spriteram")
trunk/src/mame/drivers/nmk16.c
r22764r22765
395395
396396static ADDRESS_MAP_START( tharrier_sound_io_map, AS_IO, 8, nmk16_state )
397397   ADDRESS_MAP_GLOBAL_MASK(0xff)
398   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
398   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
399399ADDRESS_MAP_END
400400
401401//Read input port 1 030c8/  BAD
r22764r22765
10771077static ADDRESS_MAP_START( raphero_sound_mem_map, AS_PROGRAM, 8, nmk16_state )
10781078   AM_RANGE(0x0000, 0x7fff) AM_ROM
10791079   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
1080   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
1080   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
10811081   AM_RANGE(0xc800, 0xc800) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
10821082   AM_RANGE(0xc808, 0xc808) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
10831083   AM_RANGE(0xc810, 0xc817) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w)
r22764r22765
10981098
10991099static ADDRESS_MAP_START( macross2_sound_io_map, AS_IO, 8, nmk16_state )
11001100   ADDRESS_MAP_GLOBAL_MASK(0xff)
1101   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
1101   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
11021102   AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
11031103   AM_RANGE(0x88, 0x88) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
11041104   AM_RANGE(0x90, 0x97) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w)
r22764r22765
34913491
34923492
34933493
3494static const ym2203_interface ym2203_nmk004_interface =
3495{
3496   {
3497      AY8910_LEGACY_OUTPUT,
3498      AY8910_DEFAULT_LOADS,
3499      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
3500   },
3501   DEVCB_LINE(NMK004_irq)
3502};
3503
35043494WRITE_LINE_MEMBER(nmk16_state::ym2203_irqhandler)
35053495{
35063496   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
35073497}
35083498
3509static const ym2203_interface ym2203_config =
3499static const ay8910_interface ay8910_config =
35103500{
3511   {
3512      AY8910_LEGACY_OUTPUT,
3513      AY8910_DEFAULT_LOADS,
3514      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
3515   },
3516   DEVCB_DRIVER_LINE_MEMBER(nmk16_state,ym2203_irqhandler)
3501   AY8910_LEGACY_OUTPUT,
3502   AY8910_DEFAULT_LOADS,
3503   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
35173504};
35183505
35193506TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline)
r22764r22765
35803567   MCFG_SPEAKER_STANDARD_MONO("mono")
35813568
35823569   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
3583   MCFG_SOUND_CONFIG(ym2203_config)
3570   MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
3571   MCFG_YM2203_AY8910_INTF(&ay8910_config)
35843572   MCFG_SOUND_ROUTE(0, "mono", 0.50)
35853573   MCFG_SOUND_ROUTE(1, "mono", 0.50)
35863574   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
36233611   MCFG_SPEAKER_STANDARD_MONO("mono")
36243612
36253613   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
3626   MCFG_SOUND_CONFIG(ym2203_config)
3614   MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
3615   MCFG_YM2203_AY8910_INTF(&ay8910_config)
36273616   MCFG_SOUND_ROUTE(0, "mono", 0.50)
36283617   MCFG_SOUND_ROUTE(1, "mono", 0.50)
36293618   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
36643653   MCFG_SPEAKER_STANDARD_MONO("mono")
36653654
36663655   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
3667   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
3656   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
3657   MCFG_YM2203_AY8910_INTF(&ay8910_config)
36683658   MCFG_SOUND_ROUTE(0, "mono", 0.50)
36693659   MCFG_SOUND_ROUTE(1, "mono", 0.50)
36703660   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
37393729   MCFG_SPEAKER_STANDARD_MONO("mono")
37403730
37413731   MCFG_SOUND_ADD("ymsnd", YM2203, BIOSHIP_CRYSTAL2 / 8) /* 1.5 Mhz (verified) */
3742   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
3732   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
3733   MCFG_YM2203_AY8910_INTF(&ay8910_config)
37433734   MCFG_SOUND_ROUTE(0, "mono", 0.50)
37443735   MCFG_SOUND_ROUTE(1, "mono", 0.50)
37453736   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
37803771   MCFG_SPEAKER_STANDARD_MONO("mono")
37813772
37823773   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
3783   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
3774   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
3775   MCFG_YM2203_AY8910_INTF(&ay8910_config)
37843776   MCFG_SOUND_ROUTE(0, "mono", 0.50)
37853777   MCFG_SOUND_ROUTE(1, "mono", 0.50)
37863778   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
38553847   MCFG_SPEAKER_STANDARD_MONO("mono")
38563848
38573849   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000) /* (verified on pcb) */
3858   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
3850   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
3851   MCFG_YM2203_AY8910_INTF(&ay8910_config)
38593852   MCFG_SOUND_ROUTE(0, "mono", 0.50)
38603853   MCFG_SOUND_ROUTE(1, "mono", 0.50)
38613854   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
39303923   MCFG_SPEAKER_STANDARD_MONO("mono")
39313924
39323925   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
3933   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
3926   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
3927   MCFG_YM2203_AY8910_INTF(&ay8910_config)
39343928   MCFG_SOUND_ROUTE(0, "mono", 0.50)
39353929   MCFG_SOUND_ROUTE(1, "mono", 0.50)
39363930   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
40043998   MCFG_SPEAKER_STANDARD_MONO("mono")
40053999
40064000   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4007   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
4001   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
4002   MCFG_YM2203_AY8910_INTF(&ay8910_config)
40084003   MCFG_SOUND_ROUTE(0, "mono", 0.50)
40094004   MCFG_SOUND_ROUTE(1, "mono", 0.50)
40104005   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
40464041   MCFG_SPEAKER_STANDARD_MONO("mono")
40474042
40484043   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4049   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
4044   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
4045   MCFG_YM2203_AY8910_INTF(&ay8910_config)
40504046   MCFG_SOUND_ROUTE(0, "mono", 0.50)
40514047   MCFG_SOUND_ROUTE(1, "mono", 0.50)
40524048   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
40874083   MCFG_SPEAKER_STANDARD_MONO("mono")
40884084
40894085   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4090   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
4086   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
4087   MCFG_YM2203_AY8910_INTF(&ay8910_config)
40914088   MCFG_SOUND_ROUTE(0, "mono", 0.50)
40924089   MCFG_SOUND_ROUTE(1, "mono", 0.50)
40934090   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
41284125   MCFG_SPEAKER_STANDARD_MONO("mono")
41294126
41304127   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8 ) /* verified on pcb */
4131   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
4128   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
4129   MCFG_YM2203_AY8910_INTF(&ay8910_config)
41324130   MCFG_SOUND_ROUTE(0, "mono", 0.50)
41334131   MCFG_SOUND_ROUTE(1, "mono", 0.50)
41344132   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
41694167   MCFG_SPEAKER_STANDARD_MONO("mono")
41704168
41714169   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4172   MCFG_SOUND_CONFIG(ym2203_nmk004_interface)
4170   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<NMK004_irq>))
4171   MCFG_YM2203_AY8910_INTF(&ay8910_config)
41734172   MCFG_SOUND_ROUTE(0, "mono", 0.50)
41744173   MCFG_SOUND_ROUTE(1, "mono", 0.50)
41754174   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r22764r22765
42124211   MCFG_SPEAKER_STANDARD_MONO("mono")
42134212
42144213   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4215   MCFG_SOUND_CONFIG(ym2203_config)
4214   MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
4215   MCFG_YM2203_AY8910_INTF(&ay8910_config)
42164216   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
42174217
42184218   MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW)
r22764r22765
42544254   MCFG_SPEAKER_STANDARD_MONO("mono")
42554255
42564256   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4257   MCFG_SOUND_CONFIG(ym2203_config)
4257   MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
4258   MCFG_YM2203_AY8910_INTF(&ay8910_config)
42584259   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
42594260
42604261   MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW)
r22764r22765
42954296   MCFG_SPEAKER_STANDARD_MONO("mono")
42964297
42974298   MCFG_SOUND_ADD("ymsnd", YM2203, 1500000)
4298   MCFG_SOUND_CONFIG(ym2203_config)
4299   MCFG_YM2203_IRQ_HANDLER(WRITELINE(nmk16_state, ym2203_irqhandler))
4300   MCFG_YM2203_AY8910_INTF(&ay8910_config)
42994301   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
43004302
43014303   MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW)
trunk/src/mame/drivers/pass.c
r22764r22765
128128static ADDRESS_MAP_START( pass_sound_io_map, AS_IO, 8, pass_state )
129129   ADDRESS_MAP_GLOBAL_MASK(0xff)
130130   AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r)
131   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
131   AM_RANGE(0x70, 0x71) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
132132   AM_RANGE(0x80, 0x80) AM_DEVWRITE("oki", okim6295_device, write)
133133   AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_byte_w)
134134ADDRESS_MAP_END
trunk/src/mame/drivers/actfancr.c
r22764r22765
115115
116116static ADDRESS_MAP_START( dec0_s_map, AS_PROGRAM, 8, actfancr_state )
117117   AM_RANGE(0x0000, 0x07ff) AM_RAM
118   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
118   AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
119119   AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
120120   AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
121121   AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write)
trunk/src/mame/drivers/1943.c
r22764r22765
8181   AM_RANGE(0x0000, 0x7fff) AM_ROM
8282   AM_RANGE(0xc000, 0xc7ff) AM_RAM
8383   AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r)
84   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
85   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w)
84   AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ym1", ym2203_device, write)
85   AM_RANGE(0xe002, 0xe003) AM_DEVWRITE("ym2", ym2203_device, write)
8686ADDRESS_MAP_END
8787
8888/* Input Ports */
trunk/src/mame/drivers/stfight.c
r22764r22765
258258
259259static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8, stfight_state )
260260   AM_RANGE(0x0000, 0x7fff) AM_ROM
261   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
262   AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
261   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
262   AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
263263   AM_RANGE(0xe800, 0xe800) AM_WRITE(stfight_e800_w)
264264   AM_RANGE(0xf000, 0xf000) AM_READ(stfight_fm_r)
265265   AM_RANGE(0xf800, 0xffff) AM_RAM
trunk/src/mame/audio/seibu.c
r22764r22765
450450   DEVCB_LINE(seibu_ym3812_irqhandler)
451451};
452452
453const ym2203_interface seibu_ym2203_interface =
453const ay8910_interface seibu_ay8910_config =
454454{
455   {
456      AY8910_LEGACY_OUTPUT,
457      AY8910_DEFAULT_LOADS,
458      DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
459   },
460   DEVCB_LINE(seibu_ym2203_irqhandler)
455   AY8910_LEGACY_OUTPUT,
456   AY8910_DEFAULT_LOADS,
457   DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
461458};
462459
463460/***************************************************************************/
r22764r22765
563560   AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
564561   AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
565562   AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
566   AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
563   AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
567564   AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
568565   AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
569566   AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
570567   AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
571568   AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
572   AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
569   AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
573570   AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
574571ADDRESS_MAP_END
575572
r22764r22765
582579   AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
583580   AM_RANGE(0x4005, 0x4006) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_adr_w)
584581   AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
585   AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
582   AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
586583   AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
587584   AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
588585   AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
r22764r22765
590587   AM_RANGE(0x401a, 0x401a) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_ctl_w)
591588   AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
592589   AM_RANGE(0x6005, 0x6006) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_adr_w)
593   AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
590   AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
594591   AM_RANGE(0x601a, 0x601a) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_ctl_w)
595592   AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
596593ADDRESS_MAP_END
trunk/src/mame/audio/seibu.h
r22764r22765
8888
8989
9090extern const ym3812_interface seibu_ym3812_interface;
91extern const ym2203_interface seibu_ym2203_interface;
91extern const ay8910_interface seibu_ay8910_config;
9292
9393struct seibu_adpcm_interface
9494{
r22764r22765
189189   MCFG_SPEAKER_STANDARD_MONO("mono")                              \
190190                                                   \
191191   MCFG_SOUND_ADD("ym1", YM2203, freq)                             \
192   MCFG_SOUND_CONFIG(seibu_ym2203_interface)                       \
192   MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2203_irqhandler>)) \
193   MCFG_YM2203_AY8910_INTF(&seibu_ay8910_config)                   \
193194   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)                     \
194195                                                   \
195196   MCFG_SOUND_ADD("ym2", YM2203, freq)                             \
trunk/src/mame/machine/nmk004.c
r22764r22765
9999   UINT8 to_main;      // answer to main CPU
100100   int protection_check;
101101
102   device_t *ymdevice;
102   ym2203_device *ymdevice;
103103   okim6295_device *oki1device;
104104   okim6295_device *oki2device;
105105
r22764r22765
357357                     fm->slot = read8(fm->current++);
358358                     if (channel < 3 || !(NMK004_state.fm_control[channel-3].flags & FM_FLAG_ACTIVE))
359359                     {
360                        ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x28);   // keyon/off
361                        ym2203_write_port_w(NMK004_state.ymdevice, space, 0, channel % 3);
360                        NMK004_state.ymdevice->control_port_w(space, 0, 0x28);   // keyon/off
361                        NMK004_state.ymdevice->write_port_w(space, 0, channel % 3);
362362                     }
363363                     break;
364364
r22764r22765
607607
608608         for (i = 0; i < 0x18; i++)
609609         {
610            ym2203_control_port_w(NMK004_state.ymdevice, space, 0, ym2203_registers[i] + channel);
611            ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm1->voice_params[i]);
610            NMK004_state.ymdevice->control_port_w(space, 0, ym2203_registers[i] + channel);
611            NMK004_state.ymdevice->write_port_w(space, 0, fm1->voice_params[i]);
612612         }
613613      }
614614
r22764r22765
620620         {
621621            for (i = 0; i < 0x18; i++)
622622            {
623               ym2203_control_port_w(NMK004_state.ymdevice, space, 0, ym2203_registers[i] + channel);
624               ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm2->voice_params[i]);
623               NMK004_state.ymdevice->control_port_w(space, 0, ym2203_registers[i] + channel);
624               NMK004_state.ymdevice->write_port_w(space, 0, fm2->voice_params[i]);
625625            }
626626         }
627627      }
r22764r22765
629629
630630      if (fm1->flags & FM_FLAG_ACTIVE)
631631      {
632         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xb0 + channel); // self-feedback
633         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm1->self_feedback);
632         NMK004_state.ymdevice->control_port_w(space, 0, 0xb0 + channel); // self-feedback
633         NMK004_state.ymdevice->write_port_w(space, 0, fm1->self_feedback);
634634
635         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xa4 + channel); // F-number
636         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm1->f_number >> 8);
635         NMK004_state.ymdevice->control_port_w(space, 0, 0xa4 + channel); // F-number
636         NMK004_state.ymdevice->write_port_w(space, 0, fm1->f_number >> 8);
637637
638         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xa0 + channel); // F-number
639         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm1->f_number & 0xff);
638         NMK004_state.ymdevice->control_port_w(space, 0, 0xa0 + channel); // F-number
639         NMK004_state.ymdevice->write_port_w(space, 0, fm1->f_number & 0xff);
640640      }
641641      else
642642      {
643         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xb0 + channel); // self-feedback
644         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm2->self_feedback);
643         NMK004_state.ymdevice->control_port_w(space, 0, 0xb0 + channel); // self-feedback
644         NMK004_state.ymdevice->write_port_w(space, 0, fm2->self_feedback);
645645
646         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xa4 + channel); // F-number
647         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm2->f_number >> 8);
646         NMK004_state.ymdevice->control_port_w(space, 0, 0xa4 + channel); // F-number
647         NMK004_state.ymdevice->write_port_w(space, 0, fm2->f_number >> 8);
648648
649         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0xa0 + channel); // F-number
650         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm2->f_number & 0xff);
649         NMK004_state.ymdevice->control_port_w(space, 0, 0xa0 + channel); // F-number
650         NMK004_state.ymdevice->write_port_w(space, 0, fm2->f_number & 0xff);
651651      }
652652
653653
r22764r22765
656656      {
657657         fm1->flags &= ~FM_FLAG_MUST_SEND_KEYON;
658658
659         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x28);   // keyon/off
660         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm1->slot | channel);
659         NMK004_state.ymdevice->control_port_w(space, 0, 0x28);   // keyon/off
660         NMK004_state.ymdevice->write_port_w(space, 0, fm1->slot | channel);
661661      }
662662
663663      if (fm2->flags & FM_FLAG_MUST_SEND_KEYON)
r22764r22765
666666
667667         if (!(fm1->flags & FM_FLAG_ACTIVE))
668668         {
669            ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x28);   // keyon/off
670            ym2203_write_port_w(NMK004_state.ymdevice, space, 0, fm2->slot | channel);
669            NMK004_state.ymdevice->control_port_w(space, 0, 0x28);   // keyon/off
670            NMK004_state.ymdevice->write_port_w(space, 0, fm2->slot | channel);
671671         }
672672      }
673673   }
r22764r22765
706706         psg->flags &= ~PSG_FLAG_NOISE_NOT_ENABLED;
707707
708708         // enable noise, disable tone on this channel
709         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x07);
710         enable = ym2203_read_port_r(NMK004_state.ymdevice, space, 0);
709         NMK004_state.ymdevice->control_port_w(space, 0, 0x07);
710         enable = NMK004_state.ymdevice->read_port_r(space, 0);
711711         enable |=  (0x01 << channel);   // disable tone
712712         enable &= ~(0x08 << channel);   // enable noise
713         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, enable);
713         NMK004_state.ymdevice->write_port_w(space, 0, enable);
714714      }
715715
716716
r22764r22765
744744                     psg->flags &= ~PSG_FLAG_NOISE_NOT_ENABLED;
745745
746746                     // enable noise, disable tone on this channel
747                     ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x07);
748                     enable = ym2203_read_port_r(NMK004_state.ymdevice, space, 0);
747                     NMK004_state.ymdevice->control_port_w(space, 0, 0x07);
748                     enable = NMK004_state.ymdevice->read_port_r(space, 0);
749749                     enable |=  (0x01 << channel);   // disable tone
750750                     enable &= ~(0x08 << channel);   // enable noise
751                     ym2203_write_port_w(NMK004_state.ymdevice, space, 0, enable);
751                     NMK004_state.ymdevice->write_port_w(space, 0, enable);
752752                     break;
753753
754754                  case 0xf2:  // set volume shape
r22764r22765
793793                     psg->volume_shape = 0;
794794
795795                     // mute channel
796                     ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 8 + channel);
797                     ym2203_write_port_w(NMK004_state.ymdevice, space, 0, 0);
796                     NMK004_state.ymdevice->control_port_w(space, 0, 8 + channel);
797                     NMK004_state.ymdevice->write_port_w(space, 0, 0);
798798                     return;
799799               }
800800            }
r22764r22765
834834
835835               period >>= octave;
836836
837               ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 2 * channel + 1);
838               ym2203_write_port_w(NMK004_state.ymdevice, space, 0, (period & 0x0f00) >> 8);
839               ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 2 * channel + 0);
840               ym2203_write_port_w(NMK004_state.ymdevice, space, 0, (period & 0x00ff));
837               NMK004_state.ymdevice->control_port_w(space, 0, 2 * channel + 1);
838               NMK004_state.ymdevice->write_port_w(space, 0, (period & 0x0f00) >> 8);
839               NMK004_state.ymdevice->control_port_w(space, 0, 2 * channel + 0);
840               NMK004_state.ymdevice->write_port_w(space, 0, (period & 0x00ff));
841841
842842               psg->note_period_hi_bits = (period & 0x0f00) >> 8;
843843            }
r22764r22765
850850                  psg->flags |= PSG_FLAG_NOISE_NOT_ENABLED;
851851
852852                  // disable noise, enable tone on this channel
853                  ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x07);
854                  enable = ym2203_read_port_r(NMK004_state.ymdevice, space, 0);
853                  NMK004_state.ymdevice->control_port_w(space, 0, 0x07);
854                  enable = NMK004_state.ymdevice->read_port_r(space, 0);
855855                  enable &= ~(0x01 << channel);   // enable tone
856856                  enable |=  (0x08 << channel);   // disable noise
857                  ym2203_write_port_w(NMK004_state.ymdevice, space, 0, enable);
857                  NMK004_state.ymdevice->write_port_w(space, 0, enable);
858858               }
859859
860               ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x06);   // noise period
861               ym2203_write_port_w(NMK004_state.ymdevice, space, 0, psg->note);
860               NMK004_state.ymdevice->control_port_w(space, 0, 0x06);   // noise period
861               NMK004_state.ymdevice->write_port_w(space, 0, psg->note);
862862               psg->note_period_hi_bits = psg->note;
863863            }
864864         }
r22764r22765
883883            volume = 0;
884884
885885         // set volume
886         ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 8 + channel);
887         ym2203_write_port_w(NMK004_state.ymdevice, space, 0, volume & 0x0f);
886         NMK004_state.ymdevice->control_port_w(space, 0, 8 + channel);
887         NMK004_state.ymdevice->write_port_w(space, 0, volume & 0x0f);
888888      }
889889   }
890890}
r22764r22765
10041004   if (irq)
10051005   {
10061006      address_space &space = NMK004_state.machine().firstcpu->space(AS_PROGRAM);
1007      int status = ym2203_status_port_r(device,space,0);
1007      int status = NMK004_state.ymdevice->status_port_r(space,0);
10081008
10091009      if (status & 1) // timer A expired
10101010      {
r22764r22765
10131013         update_music();
10141014
10151015         // restart timer
1016         ym2203_control_port_w(device, space, 0, 0x27);
1017         ym2203_write_port_w(device, space, 0, 0x15);
1016         NMK004_state.ymdevice->control_port_w(space, 0, 0x27);
1017         NMK004_state.ymdevice->write_port_w(space, 0, 0x15);
10181018      }
10191019   }
10201020}
r22764r22765
10331033   memset(&NMK004_state, 0, sizeof(NMK004_state));
10341034
10351035   NMK004_state.set_machine(machine);
1036   NMK004_state.ymdevice = machine.device("ymsnd");
1036   NMK004_state.ymdevice = machine.device<ym2203_device>("ymsnd");
10371037   NMK004_state.oki1device = machine.device<okim6295_device>("oki1");
10381038   NMK004_state.oki2device = machine.device<okim6295_device>("oki2");
10391039
10401040   NMK004_state.rom = machine.root_device().memregion("audiocpu")->base();
10411041
10421042   address_space &space = NMK004_state.machine().firstcpu->space(AS_PROGRAM);
1043   ym2203_control_port_w(NMK004_state.ymdevice, space, 0, 0x2f);
1043   NMK004_state.ymdevice->control_port_w(space, 0, 0x2f);
10441044
10451045   i = 0;
10461046   while (ym2203_init[i] != 0xff)
10471047   {
1048      ym2203_control_port_w(NMK004_state.ymdevice, space, 0, ym2203_init[i++]);
1049      ym2203_write_port_w(NMK004_state.ymdevice, space, 0, ym2203_init[i++]);
1048      NMK004_state.ymdevice->control_port_w(space, 0, ym2203_init[i++]);
1049      NMK004_state.ymdevice->write_port_w(space, 0, ym2203_init[i++]);
10501050   }
10511051
10521052   NMK004_state.oki_playing = 0;
trunk/src/mame/includes/homedata.h
r22764r22765
11#include "sound/dac.h"
22#include "sound/sn76496.h"
3#include "sound/2203intf.h"
34
45class homedata_state : public driver_device
56{
r22764r22765
1011      m_videoram(*this, "videoram"),
1112      m_maincpu(*this, "maincpu"),
1213      m_audiocpu(*this, "audiocpu"),
13      m_dac(*this, "dac") {}
14      m_dac(*this, "dac"),
15      m_ymsnd(*this, "ymsnd")
16   {
17   }
1418
1519   /* memory pointers */
1620   optional_shared_ptr<UINT8> m_vreg;
r22764r22765
4246   required_device<cpu_device> m_maincpu;
4347   optional_device<cpu_device> m_audiocpu;
4448   optional_device<dac_device> m_dac;
45   device_t *m_ym;
49   optional_device<ym2203_device> m_ymsnd;
4650   sn76489a_device *m_sn;
4751   UINT8 m_prot_data;
4852   DECLARE_READ8_MEMBER(mrokumei_keyboard_r);
trunk/src/mame/includes/mexico86.h
r22764r22765
1#include "sound/2203intf.h"
12
23class mexico86_state : public driver_device
34{
r22764r22765
1011      m_maincpu(*this, "maincpu"),
1112      m_audiocpu(*this, "audiocpu"),
1213      m_subcpu(*this, "sub"),
13      m_mcu(*this, "mcu"){ }
14      m_mcu(*this, "mcu"),
15      m_ymsnd(*this, "ymsnd")
16   {
17   }
1418
1519   /* memory pointers */
1620   required_shared_ptr<UINT8> m_objectram;
r22764r22765
4044   required_device<cpu_device> m_audiocpu;
4145   optional_device<cpu_device> m_subcpu;
4246   optional_device<cpu_device> m_mcu;
47   required_device<ym2203_device> m_ymsnd;
4348
4449   /* queue */
4550   UINT8 m_queue[64];
trunk/src/mame/includes/taito_l.h
r22764r22765
11#include "sound/msm5205.h"
2#include "sound/2203intf.h"
23
34#define TAITOL_SPRITERAM_SIZE 0x400
45
r22764r22765
910      : driver_device(mconfig, type, tag),
1011      m_maincpu(*this, "maincpu"),
1112      m_audiocpu(*this, "audiocpu"),
12      m_msm(*this, "msm") { }
13      m_msm(*this, "msm"),
14      m_ymsnd(*this, "ymsnd")
15   {
16   }
1317
1418   /* memory pointers */
1519   UINT8 *       m_shared_ram;
r22764r22765
5963   required_device<cpu_device> m_maincpu;
6064   optional_device<cpu_device> m_audiocpu;
6165   optional_device<msm5205_device> m_msm;
66   optional_device<ym2203_device> m_ymsnd;
6267
6368   /* memory buffers */
6469   UINT8         m_rambanks[0x1000 * 12];

Previous 199869 Revisions Next


© 1997-2024 The MAME Team