trunk/src/emu/sound/2203intf.c
| r22764 | r22765 | |
| 2 | 2 | #include "2203intf.h" |
| 3 | 3 | #include "fm.h" |
| 4 | 4 | |
| 5 | | |
| 6 | | struct 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 | | |
| 18 | | INLINE 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 | | |
| 26 | 5 | static void psg_set_clock(void *param, int clock) |
| 27 | 6 | { |
| 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); |
| 30 | 9 | } |
| 31 | 10 | |
| 32 | 11 | static void psg_write(void *param, int address, int data) |
| 33 | 12 | { |
| 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); |
| 36 | 15 | } |
| 37 | 16 | |
| 38 | 17 | static int psg_read(void *param) |
| 39 | 18 | { |
| 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()); |
| 42 | 21 | } |
| 43 | 22 | |
| 44 | 23 | static void psg_reset(void *param) |
| 45 | 24 | { |
| 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()); |
| 48 | 27 | } |
| 49 | 28 | |
| 50 | 29 | static const ssg_callbacks psgintf = |
| r22764 | r22765 | |
| 55 | 34 | psg_reset |
| 56 | 35 | }; |
| 57 | 36 | |
| 37 | void *ym2203_device::_psg() |
| 38 | { |
| 39 | return m_psg; |
| 40 | } |
| 41 | |
| 58 | 42 | /* IRQ Handler */ |
| 59 | 43 | static void IRQHandler(void *param,int irq) |
| 60 | 44 | { |
| 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); |
| 64 | 47 | } |
| 65 | 48 | |
| 66 | | /* Timer overflow callback from timer.c */ |
| 67 | | static TIMER_CALLBACK( timer_callback_2203_0 ) |
| 49 | void ym2203_device::_IRQHandler(int irq) |
| 68 | 50 | { |
| 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); |
| 71 | 53 | } |
| 72 | 54 | |
| 73 | | static TIMER_CALLBACK( timer_callback_2203_1 ) |
| 55 | /* Timer overflow callback from timer.c */ |
| 56 | void ym2203_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 74 | 57 | { |
| 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 | } |
| 77 | 68 | } |
| 78 | 69 | |
| 79 | | /* update request from fm.c */ |
| 80 | | void ym2203_update_request(void *param) |
| 70 | static void timer_handler(void *param,int c,int count,int clock) |
| 81 | 71 | { |
| 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); |
| 84 | 74 | } |
| 85 | 75 | |
| 86 | | |
| 87 | | static void timer_handler(void *param,int c,int count,int clock) |
| 76 | void ym2203_device::_timer_handler(int c,int count,int clock) |
| 88 | 77 | { |
| 89 | | ym2203_state *info = (ym2203_state *)param; |
| 90 | 78 | if( count == 0 ) |
| 91 | 79 | { /* Reset FM Timer */ |
| 92 | | info->timer[c]->enable(false); |
| 80 | m_timer[c]->enable(false); |
| 93 | 81 | } |
| 94 | 82 | else |
| 95 | 83 | { /* Start FM Timer */ |
| 96 | 84 | 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); |
| 99 | 88 | } |
| 100 | 89 | } |
| 101 | 90 | |
| 102 | | static STREAM_UPDATE( ym2203_stream_update ) |
| 91 | /* update request from fm.c */ |
| 92 | void ym2203_update_request(void *param) |
| 103 | 93 | { |
| 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(); |
| 106 | 96 | } |
| 107 | 97 | |
| 98 | void ym2203_device::_ym2203_update_request() |
| 99 | { |
| 100 | m_stream->update(); |
| 101 | } |
| 108 | 102 | |
| 109 | | static void ym2203_intf_postload (ym2203_state *info) |
| 103 | |
| 104 | |
| 105 | //------------------------------------------------- |
| 106 | // sound_stream_update - handle a stream update |
| 107 | //------------------------------------------------- |
| 108 | |
| 109 | void ym2203_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| 110 | 110 | { |
| 111 | | ym2203_postload(info->chip); |
| 111 | ym2203_update_one(m_chip, outputs[0], samples); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | |
| 115 | | static DEVICE_START( ym2203 ) |
| 115 | void ym2203_device::device_post_load() |
| 116 | 116 | { |
| 117 | | static const ym2203_interface generic_2203 = |
| 117 | ym2203_postload(m_chip); |
| 118 | } |
| 119 | |
| 120 | |
| 121 | //------------------------------------------------- |
| 122 | // device_start - device-specific startup |
| 123 | //------------------------------------------------- |
| 124 | |
| 125 | void ym2203_device::device_start() |
| 126 | { |
| 127 | static const ay8910_interface default_ay8910_config = |
| 118 | 128 | { |
| 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 |
| 125 | 132 | }; |
| 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; /* ??? */ |
| 129 | 133 | |
| 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; /* ??? */ |
| 135 | 135 | |
| 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 | |
| 136 | 142 | /* 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); |
| 139 | 145 | |
| 140 | 146 | /* 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); |
| 142 | 148 | |
| 143 | 149 | /* 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"); |
| 148 | 152 | } |
| 149 | 153 | |
| 150 | | static DEVICE_STOP( ym2203 ) |
| 154 | //------------------------------------------------- |
| 155 | // device_stop - device-specific stop |
| 156 | //------------------------------------------------- |
| 157 | |
| 158 | void ym2203_device::device_stop() |
| 151 | 159 | { |
| 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); |
| 155 | 162 | } |
| 156 | 163 | |
| 157 | | static DEVICE_RESET( ym2203 ) |
| 164 | //------------------------------------------------- |
| 165 | // device_reset - device-specific reset |
| 166 | //------------------------------------------------- |
| 167 | |
| 168 | void ym2203_device::device_reset() |
| 158 | 169 | { |
| 159 | | ym2203_state *info = get_safe_token(device); |
| 160 | | ym2203_reset_chip(info->chip); |
| 170 | ym2203_reset_chip(m_chip); |
| 161 | 171 | } |
| 162 | 172 | |
| 163 | 173 | |
| 164 | | |
| 165 | | READ8_DEVICE_HANDLER( ym2203_r ) |
| 174 | READ8_MEMBER( ym2203_device::read ) |
| 166 | 175 | { |
| 167 | | ym2203_state *info = get_safe_token(device); |
| 168 | | return ym2203_read(info->chip, offset & 1); |
| 176 | return ym2203_read(m_chip, offset & 1); |
| 169 | 177 | } |
| 170 | 178 | |
| 171 | | WRITE8_DEVICE_HANDLER( ym2203_w ) |
| 179 | WRITE8_MEMBER( ym2203_device::write ) |
| 172 | 180 | { |
| 173 | | ym2203_state *info = get_safe_token(device); |
| 174 | | ym2203_write(info->chip, offset & 1, data); |
| 181 | ym2203_write(m_chip, offset & 1, data); |
| 175 | 182 | } |
| 176 | 183 | |
| 177 | | |
| 178 | | READ8_DEVICE_HANDLER( ym2203_status_port_r ) { return ym2203_r(device, space, 0); } |
| 179 | | READ8_DEVICE_HANDLER( ym2203_read_port_r ) { return ym2203_r(device, space, 1); } |
| 180 | | WRITE8_DEVICE_HANDLER( ym2203_control_port_w ) { ym2203_w(device, space, 0, data); } |
| 181 | | WRITE8_DEVICE_HANDLER( ym2203_write_port_w ) { ym2203_w(device, space, 1, data); } |
| 182 | | |
| 183 | | const device_type YM2203 = &device_creator<ym2203_device>; |
| 184 | | |
| 185 | | ym2203_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) |
| 184 | READ8_MEMBER( ym2203_device::status_port_r ) |
| 188 | 185 | { |
| 189 | | m_token = global_alloc_clear(ym2203_state); |
| 186 | return read(space, 0); |
| 190 | 187 | } |
| 191 | 188 | |
| 192 | | //------------------------------------------------- |
| 193 | | // device_config_complete - perform any |
| 194 | | // operations now that the configuration is |
| 195 | | // complete |
| 196 | | //------------------------------------------------- |
| 197 | | |
| 198 | | void ym2203_device::device_config_complete() |
| 189 | READ8_MEMBER( ym2203_device::read_port_r ) |
| 199 | 190 | { |
| 191 | return read(space, 1); |
| 200 | 192 | } |
| 201 | 193 | |
| 202 | | //------------------------------------------------- |
| 203 | | // device_start - device-specific startup |
| 204 | | //------------------------------------------------- |
| 205 | | |
| 206 | | void ym2203_device::device_start() |
| 194 | WRITE8_MEMBER( ym2203_device::control_port_w ) |
| 207 | 195 | { |
| 208 | | DEVICE_START_NAME( ym2203 )(this); |
| 196 | write(space, 0, data); |
| 209 | 197 | } |
| 210 | 198 | |
| 211 | | //------------------------------------------------- |
| 212 | | // device_reset - device-specific reset |
| 213 | | //------------------------------------------------- |
| 214 | | |
| 215 | | void ym2203_device::device_reset() |
| 199 | WRITE8_MEMBER( ym2203_device::write_port_w ) |
| 216 | 200 | { |
| 217 | | DEVICE_RESET_NAME( ym2203 )(this); |
| 201 | write(space, 1, data); |
| 218 | 202 | } |
| 219 | 203 | |
| 220 | | //------------------------------------------------- |
| 221 | | // device_stop - device-specific stop |
| 222 | | //------------------------------------------------- |
| 204 | const device_type YM2203 = &device_creator<ym2203_device>; |
| 223 | 205 | |
| 224 | | void ym2203_device::device_stop() |
| 206 | ym2203_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) |
| 225 | 210 | { |
| 226 | | DEVICE_STOP_NAME( ym2203 )(this); |
| 227 | 211 | } |
| 228 | 212 | |
| 229 | 213 | //------------------------------------------------- |
| 230 | | // sound_stream_update - handle a stream update |
| 214 | // device_config_complete - perform any |
| 215 | // operations now that the configuration is |
| 216 | // complete |
| 231 | 217 | //------------------------------------------------- |
| 232 | 218 | |
| 233 | | void ym2203_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| 219 | void ym2203_device::device_config_complete() |
| 234 | 220 | { |
| 235 | | // should never get here |
| 236 | | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); |
| 237 | 221 | } |
trunk/src/emu/sound/2203intf.h
| r22764 | r22765 | |
| 3 | 3 | #ifndef __2203INTF_H__ |
| 4 | 4 | #define __2203INTF_H__ |
| 5 | 5 | |
| 6 | | #include "devlegcy.h" |
| 7 | | |
| 6 | #include "emu.h" |
| 8 | 7 | #include "ay8910.h" |
| 9 | 8 | |
| 10 | 9 | void ym2203_update_request(void *param); |
| 11 | 10 | |
| 12 | | struct 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); |
| 17 | 13 | |
| 18 | | DECLARE_READ8_DEVICE_HANDLER( ym2203_r ); |
| 19 | | DECLARE_WRITE8_DEVICE_HANDLER( ym2203_w ); |
| 14 | #define MCFG_YM2203_AY8910_INTF(_ay8910_config) \ |
| 15 | ym2203_device::set_ay8910_config(*device, _ay8910_config); |
| 20 | 16 | |
| 21 | | DECLARE_READ8_DEVICE_HANDLER( ym2203_status_port_r ); |
| 22 | | DECLARE_READ8_DEVICE_HANDLER( ym2203_read_port_r ); |
| 23 | | DECLARE_WRITE8_DEVICE_HANDLER( ym2203_control_port_w ); |
| 24 | | DECLARE_WRITE8_DEVICE_HANDLER( ym2203_write_port_w ); |
| 25 | | |
| 26 | 17 | class ym2203_device : public device_t, |
| 27 | 18 | public device_sound_interface |
| 28 | 19 | { |
| 29 | 20 | public: |
| 30 | 21 | ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 31 | | ~ym2203_device() { global_free(m_token); } |
| 32 | 22 | |
| 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 | |
| 35 | 40 | protected: |
| 36 | 41 | // device-level overrides |
| 37 | 42 | virtual void device_config_complete(); |
| 38 | 43 | virtual void device_start(); |
| 44 | virtual void device_post_load(); |
| 39 | 45 | virtual void device_stop(); |
| 40 | 46 | virtual void device_reset(); |
| 41 | 47 | |
| 48 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 49 | |
| 42 | 50 | // sound stream update overrides |
| 43 | 51 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); |
| 44 | 52 | private: |
| 45 | 53 | // 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; |
| 47 | 60 | }; |
| 48 | 61 | |
| 49 | 62 | extern const device_type YM2203; |
trunk/src/mess/drivers/pc8801.c
| r22764 | r22765 | |
| 305 | 305 | m_rtc(*this, UPD1990A_TAG), |
| 306 | 306 | m_cassette(*this, "cassette"), |
| 307 | 307 | m_beeper(*this, "beeper"), |
| 308 | | m_opna(*this, "opna") |
| 308 | m_opna(*this, "opna"), |
| 309 | m_opn(*this, "opn") |
| 309 | 310 | { } |
| 310 | 311 | |
| 311 | 312 | required_device<cpu_device> m_maincpu; |
| r22764 | r22765 | |
| 315 | 316 | required_device<cassette_image_device> m_cassette; |
| 316 | 317 | required_device<beep_device> m_beeper; |
| 317 | 318 | required_device<ym2608_device> m_opna; |
| 319 | required_device<ym2203_device> m_opn; |
| 318 | 320 | UINT8 *m_work_ram; |
| 319 | 321 | UINT8 *m_hi_work_ram; |
| 320 | 322 | UINT8 *m_ext_work_ram; |
| r22764 | r22765 | |
| 1700 | 1702 | if(m_has_opna) |
| 1701 | 1703 | return m_opna->read(space, offset); |
| 1702 | 1704 | |
| 1703 | | return (offset & 2) ? 0xff : ym2203_r(machine().device("opn"), space, offset); |
| 1705 | return (offset & 2) ? 0xff : m_opn->read(space, offset); |
| 1704 | 1706 | } |
| 1705 | 1707 | |
| 1706 | 1708 | WRITE8_MEMBER(pc8801_state::pc8801_sound_board_w) |
| r22764 | r22765 | |
| 1708 | 1710 | if(m_has_opna) |
| 1709 | 1711 | m_opna->write(space, offset,data); |
| 1710 | 1712 | else if((offset & 2) == 0) |
| 1711 | | ym2203_w(machine().device("opn"), space, offset,data); |
| 1713 | m_opn->write(space, offset, data); |
| 1712 | 1714 | } |
| 1713 | 1715 | |
| 1714 | 1716 | READ8_MEMBER(pc8801_state::pc8801_opna_r) |
| r22764 | r22765 | |
| 2588 | 2590 | } |
| 2589 | 2591 | READ8_MEMBER(pc8801_state::opn_portb_r){ return ioport("OPN_PB")->read(); } |
| 2590 | 2592 | |
| 2591 | | static const ym2203_interface pc88_ym2203_intf = |
| 2593 | static const ay8910_interface ay8910_config = |
| 2592 | 2594 | { |
| 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 |
| 2602 | 2601 | }; |
| 2603 | 2602 | |
| 2604 | | static const ay8910_interface ay8910_config = |
| 2603 | static const ay8910_interface single_ay8910_config = |
| 2605 | 2604 | { |
| 2606 | 2605 | AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT, |
| 2607 | 2606 | AY8910_DEFAULT_LOADS, |
| r22764 | r22765 | |
| 2702 | 2701 | /* sound hardware */ |
| 2703 | 2702 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2704 | 2703 | 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) |
| 2706 | 2706 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 2707 | 2707 | |
| 2708 | 2708 | MCFG_SOUND_ADD("opna", YM2608, MASTER_CLOCK*2) |
| 2709 | 2709 | 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) |
| 2711 | 2711 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 2712 | 2712 | |
| 2713 | 2713 | MCFG_SOUND_ADD("beeper", BEEP, 0) |
trunk/src/mess/drivers/bml3.c
| r22764 | r22765 | |
| 46 | 46 | public: |
| 47 | 47 | bml3_state(const machine_config &mconfig, device_type type, const char *tag) |
| 48 | 48 | : 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 | } |
| 54 | 56 | |
| 55 | 57 | required_device<cpu_device> m_maincpu; |
| 56 | 58 | required_device<mc6845_device> m_crtc; |
| 57 | 59 | //required_device<cassette_image_device> m_cass; |
| 58 | 60 | required_device<beep_device> m_beep; |
| 61 | required_device<ym2203_device> m_ym2203; |
| 59 | 62 | DECLARE_WRITE8_MEMBER(bml3_6845_w); |
| 60 | 63 | DECLARE_READ8_MEMBER(bml3_keyboard_r); |
| 61 | 64 | DECLARE_WRITE8_MEMBER(bml3_hres_reg_w); |
| r22764 | r22765 | |
| 333 | 336 | |
| 334 | 337 | READ8_MEMBER(bml3_state::bml3_ym2203_r) |
| 335 | 338 | { |
| 336 | | device_t *device = machine().device("ym2203"); |
| 337 | 339 | UINT8 dev_offs = ((m_psg_latch & 3) != 3); |
| 338 | 340 | |
| 339 | | return ym2203_r(device,space, dev_offs); |
| 341 | return m_ym2203->read(space, dev_offs); |
| 340 | 342 | } |
| 341 | 343 | |
| 342 | 344 | WRITE8_MEMBER(bml3_state::bml3_ym2203_w) |
| 343 | 345 | { |
| 344 | | device_t *device = machine().device("ym2203"); |
| 345 | 346 | UINT8 dev_offs = ((m_psg_latch & 3) != 3); |
| 346 | 347 | |
| 347 | | ym2203_w(device,space, dev_offs,data); |
| 348 | m_ym2203->write(space, dev_offs, data); |
| 348 | 349 | } |
| 349 | 350 | |
| 350 | 351 | READ8_MEMBER( bml3_state::bml3_vram_attr_r) |
| r22764 | r22765 | |
| 861 | 862 | DEVCB_DRIVER_LINE_MEMBER(bml3_state, bml3_acia_irq_w) |
| 862 | 863 | }; |
| 863 | 864 | |
| 864 | | static const ym2203_interface ym2203_interface_1 = |
| 865 | static const ay8910_interface ay8910_config = |
| 865 | 866 | { |
| 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 |
| 875 | 873 | }; |
| 876 | 874 | |
| 877 | 875 | /* TODO */ |
| r22764 | r22765 | |
| 922 | 920 | MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50) |
| 923 | 921 | |
| 924 | 922 | MCFG_SOUND_ADD("ym2203", YM2203, 2000000) //unknown clock / divider |
| 925 | | MCFG_SOUND_CONFIG(ym2203_interface_1) |
| 923 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 926 | 924 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 927 | 925 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 928 | 926 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
trunk/src/mame/drivers/argus.c
| r22764 | r22765 | |
| 157 | 157 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | | static const ym2203_interface ym2203_config = |
| 160 | static const ay8910_interface ay8910_config = |
| 161 | 161 | { |
| 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 |
| 168 | 165 | }; |
| 169 | 166 | |
| 170 | 167 | |
| r22764 | r22765 | |
| 280 | 277 | #if 0 |
| 281 | 278 | static ADDRESS_MAP_START( sound_portmap_1, AS_IO, 8, argus_state ) |
| 282 | 279 | 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) |
| 284 | 281 | ADDRESS_MAP_END |
| 285 | 282 | #endif |
| 286 | 283 | |
| 287 | 284 | static ADDRESS_MAP_START( sound_portmap_2, AS_IO, 8, argus_state ) |
| 288 | 285 | 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) |
| 291 | 288 | ADDRESS_MAP_END |
| 292 | 289 | |
| 293 | 290 | |
| r22764 | r22765 | |
| 571 | 568 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 572 | 569 | |
| 573 | 570 | 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) |
| 575 | 573 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 576 | 574 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 577 | 575 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 615 | 613 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 616 | 614 | |
| 617 | 615 | 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) |
| 619 | 618 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 620 | 619 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 621 | 620 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 659 | 658 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 660 | 659 | |
| 661 | 660 | 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) |
| 663 | 663 | MCFG_SOUND_ROUTE(0, "mono", 0.30) |
| 664 | 664 | MCFG_SOUND_ROUTE(1, "mono", 0.30) |
| 665 | 665 | MCFG_SOUND_ROUTE(2, "mono", 0.30) |
trunk/src/mame/drivers/ironhors.c
| r22764 | r22765 | |
| 91 | 91 | |
| 92 | 92 | static ADDRESS_MAP_START( slave_io_map, AS_IO, 8, ironhors_state ) |
| 93 | 93 | 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) |
| 95 | 95 | ADDRESS_MAP_END |
| 96 | 96 | |
| 97 | 97 | static ADDRESS_MAP_START( farwest_master_map, AS_PROGRAM, 8, ironhors_state ) |
| r22764 | r22765 | |
| 131 | 131 | static ADDRESS_MAP_START( farwest_slave_map, AS_PROGRAM, 8, ironhors_state ) |
| 132 | 132 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 133 | 133 | 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) |
| 135 | 135 | ADDRESS_MAP_END |
| 136 | 136 | |
| 137 | 137 | |
| r22764 | r22765 | |
| 340 | 340 | * |
| 341 | 341 | *************************************/ |
| 342 | 342 | |
| 343 | | static const ym2203_interface ym2203_config = |
| 343 | static const ay8910_interface ay8910_config = |
| 344 | 344 | { |
| 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), |
| 353 | 350 | DEVCB_NULL |
| 354 | 351 | }; |
| 355 | 352 | |
| r22764 | r22765 | |
| 396 | 393 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 397 | 394 | |
| 398 | 395 | MCFG_SOUND_ADD("ym2203", YM2203, 18432000/6) |
| 399 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 396 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 400 | 397 | |
| 401 | 398 | MCFG_SOUND_ROUTE_EX(0, "disc_ih", 1.0, 0) |
| 402 | 399 | MCFG_SOUND_ROUTE_EX(1, "disc_ih", 1.0, 1) |
| r22764 | r22765 | |
| 430 | 427 | return soundlatch_byte_r(m_soundcpu->space(AS_PROGRAM), 0); |
| 431 | 428 | } |
| 432 | 429 | |
| 433 | | static const ym2203_interface farwest_ym2203_config = |
| 430 | static const ay8910_interface farwest_ay8910_config = |
| 434 | 431 | { |
| 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), |
| 443 | 437 | DEVCB_NULL |
| 444 | 438 | }; |
| 445 | 439 | |
| r22764 | r22765 | |
| 462 | 456 | MCFG_SCREEN_UPDATE_DRIVER(ironhors_state, screen_update_farwest) |
| 463 | 457 | |
| 464 | 458 | MCFG_SOUND_MODIFY("ym2203") |
| 465 | | MCFG_SOUND_CONFIG(farwest_ym2203_config) |
| 459 | MCFG_YM2203_AY8910_INTF(&farwest_ay8910_config) |
| 466 | 460 | MACHINE_CONFIG_END |
| 467 | 461 | |
| 468 | 462 | |
trunk/src/mame/drivers/alpha68k.c
| r22764 | r22765 | |
| 792 | 792 | AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w) |
| 793 | 793 | AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_device, write_signed8) |
| 794 | 794 | 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) |
| 796 | 796 | AM_RANGE(0x0e, 0x0e) AM_WRITE(sound_bank_w) |
| 797 | 797 | ADDRESS_MAP_END |
| 798 | 798 | |
| 799 | 799 | static ADDRESS_MAP_START( kyros_sound_portmap, AS_IO, 8, alpha68k_state ) |
| 800 | 800 | 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) |
| 806 | 806 | ADDRESS_MAP_END |
| 807 | 807 | |
| 808 | 808 | static ADDRESS_MAP_START( jongbou_sound_portmap, AS_IO, 8, alpha68k_state ) |
| r22764 | r22765 | |
| 1833 | 1833 | m_sound_pa_latch = data & 1; |
| 1834 | 1834 | } |
| 1835 | 1835 | |
| 1836 | | static const ym2203_interface ym2203_config = |
| 1836 | static const ay8910_interface ym2203_ay8910_config = |
| 1837 | 1837 | { |
| 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), |
| 1846 | 1843 | DEVCB_NULL |
| 1847 | 1844 | }; |
| 1848 | 1845 | |
| r22764 | r22765 | |
| 2146 | 2143 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2147 | 2144 | |
| 2148 | 2145 | MCFG_SOUND_ADD("ym1", YM2203, 3000000) |
| 2149 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 2146 | MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config) |
| 2150 | 2147 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65) |
| 2151 | 2148 | |
| 2152 | 2149 | MCFG_SOUND_ADD("ym2", YM2413, 3579545) |
| r22764 | r22765 | |
| 2195 | 2192 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2196 | 2193 | |
| 2197 | 2194 | MCFG_SOUND_ADD("ym1", YM2203, 3000000) |
| 2198 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 2195 | MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config) |
| 2199 | 2196 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65) |
| 2200 | 2197 | |
| 2201 | 2198 | MCFG_SOUND_ADD("ym2", YM2413, 3579545) |
| r22764 | r22765 | |
| 2238 | 2235 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2239 | 2236 | |
| 2240 | 2237 | MCFG_SOUND_ADD("ym1", YM2203, 3000000) |
| 2241 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 2238 | MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config) |
| 2242 | 2239 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65) |
| 2243 | 2240 | |
| 2244 | 2241 | MCFG_SOUND_ADD("ym2", YM2413, 3579545) |
| r22764 | r22765 | |
| 2280 | 2277 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2281 | 2278 | |
| 2282 | 2279 | MCFG_SOUND_ADD("ym1", YM2203, 3000000) |
| 2283 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 2280 | MCFG_YM2203_AY8910_INTF(&ym2203_ay8910_config) |
| 2284 | 2281 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65) |
| 2285 | 2282 | |
| 2286 | 2283 | MCFG_SOUND_ADD("ym2", YM2413, 3579545) |
trunk/src/mame/drivers/cave.c
| r22764 | r22765 | |
| 1057 | 1057 | AM_RANGE(0x00, 0x00) AM_WRITE(hotdogst_rombank_w) // ROM bank |
| 1058 | 1058 | AM_RANGE(0x30, 0x30) AM_READ(soundlatch_lo_r) // From Main CPU |
| 1059 | 1059 | 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) // |
| 1061 | 1061 | AM_RANGE(0x60, 0x60) AM_DEVREADWRITE("oki", okim6295_device, read, write) // M6295 |
| 1062 | 1062 | AM_RANGE(0x70, 0x70) AM_WRITE(hotdogst_okibank_w) // Samples bank |
| 1063 | 1063 | ADDRESS_MAP_END |
| r22764 | r22765 | |
| 1087 | 1087 | AM_RANGE(0x00, 0x00) AM_WRITE(mazinger_rombank_w) // ROM bank |
| 1088 | 1088 | AM_RANGE(0x10, 0x10) AM_WRITE(soundlatch_ack_w) // To Main CPU |
| 1089 | 1089 | 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 |
| 1092 | 1092 | AM_RANGE(0x70, 0x70) AM_DEVWRITE("oki", okim6295_device, write) // M6295 |
| 1093 | 1093 | AM_RANGE(0x74, 0x74) AM_WRITE(hotdogst_okibank_w) // Samples bank |
| 1094 | 1094 | ADDRESS_MAP_END |
| r22764 | r22765 | |
| 1165 | 1165 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki1", okim6295_device, read, write) // M6295 |
| 1166 | 1166 | AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("oki2", okim6295_device, read, write) // |
| 1167 | 1167 | 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) // |
| 1169 | 1169 | AM_RANGE(0x50, 0x50) AM_WRITE(soundlatch_ack_w) // To Main CPU |
| 1170 | 1170 | // AM_RANGE(0x51, 0x51) AM_WRITENOP // ?? volume |
| 1171 | 1171 | AM_RANGE(0x80, 0x80) AM_WRITE(pwrinst2_rombank_w) // ROM bank |
| r22764 | r22765 | |
| 1802 | 1802 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 1803 | 1803 | } |
| 1804 | 1804 | |
| 1805 | | static const ym2203_interface ym2203_config = |
| 1805 | static const ay8910_interface ay8910_config = |
| 1806 | 1806 | { |
| 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 |
| 1813 | 1810 | }; |
| 1814 | 1811 | |
| 1815 | 1812 | /*************************************************************************** |
| r22764 | r22765 | |
| 2106 | 2103 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 2107 | 2104 | |
| 2108 | 2105 | 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) |
| 2110 | 2108 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.20) |
| 2111 | 2109 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.20) |
| 2112 | 2110 | MCFG_SOUND_ROUTE(1, "lspeaker", 0.20) |
| r22764 | r22765 | |
| 2212 | 2210 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 2213 | 2211 | |
| 2214 | 2212 | 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) |
| 2216 | 2215 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.20) |
| 2217 | 2216 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.20) |
| 2218 | 2217 | MCFG_SOUND_ROUTE(1, "lspeaker", 0.20) |
| r22764 | r22765 | |
| 2381 | 2380 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 2382 | 2381 | |
| 2383 | 2382 | 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) |
| 2385 | 2385 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.40) |
| 2386 | 2386 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.40) |
| 2387 | 2387 | MCFG_SOUND_ROUTE(1, "lspeaker", 0.40) |
trunk/src/mame/drivers/dec8.c
| r22764 | r22765 | |
| 845 | 845 | /* Used for Cobra Command, Maze Hunter, Super Real Darwin etc */ |
| 846 | 846 | static ADDRESS_MAP_START( dec8_s_map, AS_PROGRAM, 8, dec8_state ) |
| 847 | 847 | 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) |
| 849 | 849 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) |
| 850 | 850 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 851 | 851 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r22764 | r22765 | |
| 854 | 854 | /* Used by Gondomania, Psycho-Nics Oscar & Garyo Retsuden */ |
| 855 | 855 | static ADDRESS_MAP_START( oscar_s_map, AS_PROGRAM, 8, dec8_state ) |
| 856 | 856 | 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) |
| 858 | 858 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) |
| 859 | 859 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 860 | 860 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r22764 | r22765 | |
| 863 | 863 | /* Used by Last Mission, Shackled & Breywood */ |
| 864 | 864 | static ADDRESS_MAP_START( ym3526_s_map, AS_PROGRAM, 8, dec8_state ) |
| 865 | 865 | 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) |
| 867 | 867 | AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) |
| 868 | 868 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) |
| 869 | 869 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r22764 | r22765 | |
| 872 | 872 | /* Captain Silver - same sound system as Pocket Gal */ |
| 873 | 873 | static ADDRESS_MAP_START( csilver_s_map, AS_PROGRAM, 8, dec8_state ) |
| 874 | 874 | 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) |
| 876 | 876 | AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) |
| 877 | 877 | AM_RANGE(0x1800, 0x1800) AM_WRITE(csilver_adpcm_data_w) /* ADPCM data for the MSM5205 chip */ |
| 878 | 878 | AM_RANGE(0x2000, 0x2000) AM_WRITE(csilver_sound_bank_w) |
trunk/src/mame/drivers/psychic5.c
| r22764 | r22765 | |
| 429 | 429 | |
| 430 | 430 | static ADDRESS_MAP_START( psychic5_soundport_map, AS_IO, 8, psychic5_state ) |
| 431 | 431 | 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) |
| 434 | 434 | ADDRESS_MAP_END |
| 435 | 435 | |
| 436 | 436 | |
| r22764 | r22765 | |
| 462 | 462 | |
| 463 | 463 | static ADDRESS_MAP_START( bombsa_soundport_map, AS_IO, 8, psychic5_state ) |
| 464 | 464 | 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) |
| 467 | 467 | ADDRESS_MAP_END |
| 468 | 468 | |
| 469 | 469 | |
| r22764 | r22765 | |
| 648 | 648 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 649 | 649 | } |
| 650 | 650 | |
| 651 | | static const ym2203_interface ym2203_config = |
| 651 | static const ay8910_interface ay8910_config = |
| 652 | 652 | { |
| 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 |
| 659 | 656 | }; |
| 660 | 657 | |
| 661 | 658 | static MACHINE_CONFIG_START( psychic5, psychic5_state ) |
| r22764 | r22765 | |
| 690 | 687 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 691 | 688 | |
| 692 | 689 | 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) |
| 694 | 692 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 695 | 693 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 696 | 694 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 734 | 732 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 735 | 733 | |
| 736 | 734 | 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) |
| 738 | 737 | MCFG_SOUND_ROUTE(0, "mono", 0.30) |
| 739 | 738 | MCFG_SOUND_ROUTE(1, "mono", 0.30) |
| 740 | 739 | MCFG_SOUND_ROUTE(2, "mono", 0.30) |
trunk/src/mame/drivers/sidearms.c
| r22764 | r22765 | |
| 114 | 114 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 115 | 115 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 116 | 116 | 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) |
| 119 | 119 | ADDRESS_MAP_END |
| 120 | 120 | |
| 121 | 121 | /* Whizz */ |
| r22764 | r22765 | |
| 594 | 594 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | | static const ym2203_interface ym2203_config = |
| 597 | static const ay8910_interface ay8910_config = |
| 598 | 598 | { |
| 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, |
| 605 | 602 | }; |
| 606 | 603 | |
| 607 | 604 | static MACHINE_CONFIG_START( sidearms, sidearms_state ) |
| r22764 | r22765 | |
| 633 | 630 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 634 | 631 | |
| 635 | 632 | 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) |
| 637 | 635 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 638 | 636 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 639 | 637 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 675 | 673 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 676 | 674 | |
| 677 | 675 | 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) |
| 679 | 678 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 680 | 679 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 681 | 680 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
trunk/src/mame/drivers/taito_b.c
| r22764 | r22765 | |
| 725 | 725 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 726 | 726 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") |
| 727 | 727 | 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) |
| 729 | 729 | AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w) |
| 730 | 730 | AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w) |
| 731 | 731 | ADDRESS_MAP_END |
| r22764 | r22765 | |
| 749 | 749 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 750 | 750 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") |
| 751 | 751 | 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) |
| 753 | 753 | AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("oki", okim6295_device, read, write) /* yes, both addresses for the same chip */ |
| 754 | 754 | AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w) |
| 755 | 755 | AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w) |
| r22764 | r22765 | |
| 1895 | 1895 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 1896 | 1896 | } |
| 1897 | 1897 | |
| 1898 | | static const ym2203_interface ym2203_config = |
| 1898 | static const ay8910_interface ay8910_config = |
| 1899 | 1899 | { |
| 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, |
| 1909 | 1906 | }; |
| 1910 | 1907 | |
| 1911 | 1908 | /* |
| r22764 | r22765 | |
| 2219 | 2216 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2220 | 2217 | |
| 2221 | 2218 | 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) |
| 2223 | 2221 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 2224 | 2222 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 2225 | 2223 | MCFG_SOUND_ROUTE(2, "mono", 0.25) |
| r22764 | r22765 | |
| 2264 | 2262 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2265 | 2263 | |
| 2266 | 2264 | 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) |
| 2268 | 2267 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 2269 | 2268 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 2270 | 2269 | MCFG_SOUND_ROUTE(2, "mono", 0.25) |
| r22764 | r22765 | |
| 2587 | 2586 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2588 | 2587 | |
| 2589 | 2588 | 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) |
| 2591 | 2591 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 2592 | 2592 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 2593 | 2593 | MCFG_SOUND_ROUTE(2, "mono", 0.25) |
| r22764 | r22765 | |
| 2634 | 2634 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2635 | 2635 | |
| 2636 | 2636 | 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) |
| 2638 | 2639 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 2639 | 2640 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 2640 | 2641 | MCFG_SOUND_ROUTE(2, "mono", 0.25) |
trunk/src/mame/drivers/combatsc.c
| r22764 | r22765 | |
| 394 | 394 | AM_RANGE(0xc000, 0xc000) AM_WRITE(combatsc_voice_reset_w) /* upd7759 reset? */ |
| 395 | 395 | |
| 396 | 396 | 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 */ |
| 398 | 398 | ADDRESS_MAP_END |
| 399 | 399 | |
| 400 | 400 | WRITE8_MEMBER(combatsc_state::combatscb_dac_w) |
| r22764 | r22765 | |
| 413 | 413 | static ADDRESS_MAP_START( combatscb_sound_map, AS_PROGRAM, 8, combatsc_state ) |
| 414 | 414 | AM_RANGE(0x0000, 0x7fff) AM_ROM /* ROM */ |
| 415 | 415 | 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) /* ??? */ |
| 418 | 418 | AM_RANGE(0x9800, 0x9800) AM_WRITE(combatscb_dac_w) |
| 419 | 419 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r? */ |
| 420 | 420 | AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bl_abank") |
| r22764 | r22765 | |
| 638 | 638 | * |
| 639 | 639 | *************************************/ |
| 640 | 640 | |
| 641 | | static const ym2203_interface ym2203_config = |
| 641 | static const ay8910_interface ay8910_config = |
| 642 | 642 | { |
| 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), |
| 651 | 648 | DEVCB_NULL |
| 652 | 649 | }; |
| 653 | 650 | |
| 654 | | static const ym2203_interface ym2203_bootleg_config = |
| 651 | static const ay8910_interface ay8910_bootleg_config = |
| 655 | 652 | { |
| 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, |
| 664 | 658 | DEVCB_NULL |
| 665 | 659 | }; |
| 666 | 660 | |
| r22764 | r22765 | |
| 752 | 746 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 753 | 747 | |
| 754 | 748 | MCFG_SOUND_ADD("ymsnd", YM2203, 3000000) |
| 755 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 749 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 756 | 750 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 757 | 751 | |
| 758 | 752 | MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK) |
| r22764 | r22765 | |
| 799 | 793 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 800 | 794 | |
| 801 | 795 | MCFG_SOUND_ADD("ymsnd", YM2203, 3000000) |
| 802 | | MCFG_SOUND_CONFIG(ym2203_bootleg_config) |
| 796 | MCFG_YM2203_AY8910_INTF(&ay8910_bootleg_config) |
| 803 | 797 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 804 | 798 | |
| 805 | 799 | MCFG_SOUND_ADD("msm5205", MSM5205, 384000) |
trunk/src/mame/drivers/gladiatr.c
| r22764 | r22765 | |
| 396 | 396 | |
| 397 | 397 | static ADDRESS_MAP_START( ppking_cpu2_io, AS_IO, 8, gladiatr_state ) |
| 398 | 398 | 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) |
| 400 | 400 | AM_RANGE(0x20, 0x21) AM_READ(qx1_r) AM_WRITE(qx1_w) |
| 401 | 401 | AM_RANGE(0x40, 0x40) AM_READNOP |
| 402 | 402 | AM_RANGE(0x60, 0x61) AM_READWRITE(qx2_r,qx2_w) |
| r22764 | r22765 | |
| 443 | 443 | |
| 444 | 444 | static ADDRESS_MAP_START( gladiatr_cpu2_io, AS_IO, 8, gladiatr_state ) |
| 445 | 445 | 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) |
| 447 | 447 | AM_RANGE(0x20, 0x21) AM_READWRITE_LEGACY(TAITO8741_1_r, TAITO8741_1_w) |
| 448 | 448 | AM_RANGE(0x40, 0x40) AM_NOP // WRITE(sub_irq_ack_w) |
| 449 | 449 | AM_RANGE(0x60, 0x61) AM_READWRITE_LEGACY(TAITO8741_2_r, TAITO8741_2_w) |
| r22764 | r22765 | |
| 625 | 625 | return machine().rand(); |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | | static const ym2203_interface ppking_ym2203_interface = |
| 628 | static const ay8910_interface ppking_ay8910_config = |
| 629 | 629 | { |
| 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, |
| 638 | 635 | DEVCB_NULL |
| 639 | 636 | }; |
| 640 | 637 | |
| 641 | | static const ym2203_interface gladiatr_ym2203_interface = |
| 638 | static const ay8910_interface ay8910_config = |
| 642 | 639 | { |
| 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, |
| 652 | 646 | }; |
| 653 | 647 | |
| 654 | 648 | static const msm5205_interface msm5205_config = |
| r22764 | r22765 | |
| 697 | 691 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 698 | 692 | |
| 699 | 693 | 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) |
| 701 | 695 | MCFG_SOUND_ROUTE(0, "mono", 0.60) |
| 702 | 696 | MCFG_SOUND_ROUTE(1, "mono", 0.60) |
| 703 | 697 | MCFG_SOUND_ROUTE(2, "mono", 0.60) |
| r22764 | r22765 | |
| 745 | 739 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 746 | 740 | |
| 747 | 741 | 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) |
| 749 | 744 | MCFG_SOUND_ROUTE(0, "mono", 0.60) |
| 750 | 745 | MCFG_SOUND_ROUTE(1, "mono", 0.60) |
| 751 | 746 | MCFG_SOUND_ROUTE(2, "mono", 0.60) |
trunk/src/mame/drivers/bublbobl.c
| r22764 | r22765 | |
| 306 | 306 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bublbobl_state ) |
| 307 | 307 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 308 | 308 | 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) |
| 310 | 310 | AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w) |
| 311 | 311 | AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITE(bublbobl_sound_status_w) |
| 312 | 312 | AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP |
| r22764 | r22765 | |
| 396 | 396 | AM_RANGE(0x9800, 0x9800) AM_READNOP // ??? |
| 397 | 397 | AM_RANGE(0xa000, 0xa000) AM_WRITE(bublbobl_sh_nmi_disable_w) |
| 398 | 398 | 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) |
| 400 | 400 | AM_RANGE(0xe000, 0xffff) AM_ROM // space for diagnostic ROM? |
| 401 | 401 | ADDRESS_MAP_END |
| 402 | 402 | |
| r22764 | r22765 | |
| 701 | 701 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 702 | 702 | } |
| 703 | 703 | |
| 704 | | static const ym2203_interface ym2203_config = |
| 704 | static const ay8910_interface ay8910_config = |
| 705 | 705 | { |
| 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 |
| 712 | 709 | }; |
| 713 | 710 | |
| 714 | 711 | |
| r22764 | r22765 | |
| 780 | 777 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 781 | 778 | |
| 782 | 779 | 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) |
| 784 | 782 | MCFG_SOUND_ROUTE(0, "mono", 0.08) |
| 785 | 783 | MCFG_SOUND_ROUTE(1, "mono", 0.08) |
| 786 | 784 | MCFG_SOUND_ROUTE(2, "mono", 0.08) |
| r22764 | r22765 | |
| 859 | 857 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 860 | 858 | |
| 861 | 859 | 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) |
| 863 | 862 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 864 | 863 | |
| 865 | 864 | MCFG_SOUND_ADD("ym2", YM3526, MAIN_XTAL/8) |
trunk/src/mame/drivers/labyrunr.c
| r22764 | r22765 | |
| 46 | 46 | static ADDRESS_MAP_START( labyrunr_map, AS_PROGRAM, 8, labyrunr_state ) |
| 47 | 47 | AM_RANGE(0x0000, 0x0007) AM_DEVWRITE_LEGACY("k007121", k007121_ctrl_w) |
| 48 | 48 | 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) |
| 53 | 53 | AM_RANGE(0x0a00, 0x0a00) AM_READ_PORT("P2") |
| 54 | 54 | AM_RANGE(0x0a01, 0x0a01) AM_READ_PORT("P1") |
| 55 | 55 | AM_RANGE(0x0b00, 0x0b00) AM_READ_PORT("SYSTEM") |
| r22764 | r22765 | |
| 153 | 153 | |
| 154 | 154 | ***************************************************************************/ |
| 155 | 155 | |
| 156 | | static const ym2203_interface ym2203_interface_1 = |
| 156 | static const ay8910_interface ay8910_config_1 = |
| 157 | 157 | { |
| 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, |
| 166 | 163 | DEVCB_NULL |
| 167 | 164 | }; |
| 168 | 165 | |
| 169 | | static const ym2203_interface ym2203_interface_2 = |
| 166 | static const ay8910_interface ay8910_config_2 = |
| 170 | 167 | { |
| 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, |
| 179 | 173 | DEVCB_NULL |
| 180 | 174 | }; |
| 181 | 175 | |
| r22764 | r22765 | |
| 216 | 210 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 217 | 211 | |
| 218 | 212 | MCFG_SOUND_ADD("ym1", YM2203, 3000000) |
| 219 | | MCFG_SOUND_CONFIG(ym2203_interface_1) |
| 213 | MCFG_YM2203_AY8910_INTF(&ay8910_config_1) |
| 220 | 214 | MCFG_SOUND_ROUTE(0, "mono", 0.40) |
| 221 | 215 | MCFG_SOUND_ROUTE(1, "mono", 0.40) |
| 222 | 216 | MCFG_SOUND_ROUTE(2, "mono", 0.40) |
| 223 | 217 | MCFG_SOUND_ROUTE(3, "mono", 0.80) |
| 224 | 218 | |
| 225 | 219 | MCFG_SOUND_ADD("ym2", YM2203, 3000000) |
| 226 | | MCFG_SOUND_CONFIG(ym2203_interface_2) |
| 220 | MCFG_YM2203_AY8910_INTF(&ay8910_config_2) |
| 227 | 221 | MCFG_SOUND_ROUTE(0, "mono", 0.40) |
| 228 | 222 | MCFG_SOUND_ROUTE(1, "mono", 0.40) |
| 229 | 223 | MCFG_SOUND_ROUTE(2, "mono", 0.40) |
trunk/src/mame/drivers/darius.c
| r22764 | r22765 | |
| 464 | 464 | static ADDRESS_MAP_START( darius_sound_map, AS_PROGRAM, 8, darius_state ) |
| 465 | 465 | AM_RANGE(0x0000, 0x7fff) AM_ROMBANK("bank1") |
| 466 | 466 | 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) |
| 469 | 469 | AM_RANGE(0xb000, 0xb000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w) |
| 470 | 470 | AM_RANGE(0xb001, 0xb001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w) |
| 471 | 471 | AM_RANGE(0xc000, 0xc000) AM_WRITE(darius_fm0_pan) |
| r22764 | r22765 | |
| 767 | 767 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | | static const ym2203_interface ym2203_interface_1 = |
| 770 | static const ay8910_interface ay8910_config_1 = |
| 771 | 771 | { |
| 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 */ |
| 781 | 778 | }; |
| 782 | 779 | |
| 783 | | static const ym2203_interface ym2203_interface_2 = |
| 780 | static const ay8910_interface ay8910_config_2 = |
| 784 | 781 | { |
| 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 */ |
| 794 | 788 | }; |
| 795 | 789 | |
| 796 | 790 | |
| r22764 | r22765 | |
| 913 | 907 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 914 | 908 | |
| 915 | 909 | 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) |
| 917 | 912 | MCFG_SOUND_ROUTE(0, "filter0.0l", 0.08) |
| 918 | 913 | MCFG_SOUND_ROUTE(0, "filter0.0r", 0.08) |
| 919 | 914 | MCFG_SOUND_ROUTE(1, "filter0.1l", 0.08) |
| r22764 | r22765 | |
| 924 | 919 | MCFG_SOUND_ROUTE(3, "filter0.3r", 0.60) |
| 925 | 920 | |
| 926 | 921 | MCFG_SOUND_ADD("ym2", YM2203, 4000000) |
| 927 | | MCFG_SOUND_CONFIG(ym2203_interface_2) |
| 922 | MCFG_YM2203_AY8910_INTF(&ay8910_config_2) |
| 928 | 923 | MCFG_SOUND_ROUTE(0, "filter1.0l", 0.08) |
| 929 | 924 | MCFG_SOUND_ROUTE(0, "filter1.0r", 0.08) |
| 930 | 925 | MCFG_SOUND_ROUTE(1, "filter1.1l", 0.08) |
trunk/src/mame/drivers/quizdna.c
| r22764 | r22765 | |
| 63 | 63 | AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE") |
| 64 | 64 | AM_RANGE(0xc0, 0xc0) AM_WRITE(quizdna_rombank_w) |
| 65 | 65 | 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) |
| 67 | 67 | AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 68 | 68 | ADDRESS_MAP_END |
| 69 | 69 | |
| r22764 | r22765 | |
| 78 | 78 | AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE") |
| 79 | 79 | AM_RANGE(0xc0, 0xc0) AM_WRITE(quizdna_rombank_w) |
| 80 | 80 | 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) |
| 82 | 82 | AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 83 | 83 | ADDRESS_MAP_END |
| 84 | 84 | |
| r22764 | r22765 | |
| 93 | 93 | AM_RANGE(0x91, 0x91) AM_READ_PORT("SERVICE") |
| 94 | 94 | AM_RANGE(0xc0, 0xc0) AM_WRITE(gekiretu_rombank_w) |
| 95 | 95 | 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) |
| 97 | 97 | AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 98 | 98 | ADDRESS_MAP_END |
| 99 | 99 | |
| r22764 | r22765 | |
| 427 | 427 | GFXDECODE_END |
| 428 | 428 | |
| 429 | 429 | |
| 430 | | static const ym2203_interface ym2203_config = |
| 430 | static const ay8910_interface ay8910_config = |
| 431 | 431 | { |
| 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, |
| 440 | 437 | DEVCB_NULL |
| 441 | 438 | }; |
| 442 | 439 | |
| r22764 | r22765 | |
| 465 | 462 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 466 | 463 | |
| 467 | 464 | MCFG_SOUND_ADD("ymsnd", YM2203, MCLK/4) |
| 468 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 465 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 469 | 466 | MCFG_SOUND_ROUTE(0, "mono", 0.10) |
| 470 | 467 | MCFG_SOUND_ROUTE(1, "mono", 0.10) |
| 471 | 468 | MCFG_SOUND_ROUTE(2, "mono", 0.10) |
trunk/src/mame/drivers/taito_l.c
| r22764 | r22765 | |
| 470 | 470 | |
| 471 | 471 | READ8_MEMBER(taitol_state::extport_select_and_ym2203_r) |
| 472 | 472 | { |
| 473 | | device_t *device = machine().device("ymsnd"); |
| 474 | 473 | m_extport = (offset >> 1) & 1; |
| 475 | | return ym2203_r(device, space, offset & 1); |
| 474 | return m_ymsnd->read(space, offset & 1); |
| 476 | 475 | } |
| 477 | 476 | |
| 478 | 477 | WRITE8_MEMBER(taitol_state::mcu_data_w) |
| r22764 | r22765 | |
| 645 | 644 | AM_RANGE(0xff08, 0xff08) AM_READWRITE(rombankswitch_r, rombankswitch_w) |
| 646 | 645 | |
| 647 | 646 | #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) \ |
| 649 | 648 | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 650 | 649 | |
| 651 | 650 | |
| r22764 | r22765 | |
| 678 | 677 | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 679 | 678 | AM_RANGE(0xe000, 0xe000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w) |
| 680 | 679 | 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) |
| 682 | 681 | ADDRESS_MAP_END |
| 683 | 682 | |
| 684 | 683 | |
| r22764 | r22765 | |
| 748 | 747 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 749 | 748 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank7") |
| 750 | 749 | 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) |
| 752 | 751 | AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w) |
| 753 | 752 | AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w) |
| 754 | 753 | AM_RANGE(0xb000, 0xb000) AM_WRITE(champwr_msm5205_hi_w) |
| r22764 | r22765 | |
| 771 | 770 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 772 | 771 | AM_RANGE(0xc000, 0xdfff) AM_RAM |
| 773 | 772 | 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) |
| 775 | 774 | #if 0 |
| 776 | 775 | AM_RANGE(0xc000, 0xc000) AM_WRITE(rombank2switch_w) |
| 777 | 776 | AM_RANGE(0xd000, 0xd000) AM_READ_PORT("DSWA") |
| r22764 | r22765 | |
| 870 | 869 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 871 | 870 | AM_RANGE(0xc000, 0xdfff) AM_RAM |
| 872 | 871 | 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) |
| 874 | 873 | AM_RANGE(0xf000, 0xf7ff) AM_ROMBANK("bank7") |
| 875 | 874 | ADDRESS_MAP_END |
| 876 | 875 | |
| r22764 | r22765 | |
| 1751 | 1750 | } |
| 1752 | 1751 | } |
| 1753 | 1752 | |
| 1754 | | static const ym2203_interface ym2203_interface_triple = |
| 1753 | static const ay8910_interface triple_ay8910_config = |
| 1755 | 1754 | { |
| 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, |
| 1765 | 1761 | }; |
| 1766 | 1762 | |
| 1767 | | static const ym2203_interface ym2203_interface_champwr = |
| 1763 | static const ay8910_interface champwr_ay8910_config = |
| 1768 | 1764 | { |
| 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), |
| 1778 | 1771 | }; |
| 1779 | 1772 | |
| 1780 | 1773 | |
| r22764 | r22765 | |
| 1784 | 1777 | MSM5205_S48_4B /* 8 kHz */ |
| 1785 | 1778 | }; |
| 1786 | 1779 | |
| 1787 | | static const ym2203_interface ym2203_interface_single = |
| 1780 | static const ay8910_interface single_ay8910_config = |
| 1788 | 1781 | { |
| 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, |
| 1797 | 1787 | DEVCB_NULL |
| 1798 | 1788 | }; |
| 1799 | 1789 | |
| r22764 | r22765 | |
| 1841 | 1831 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1842 | 1832 | |
| 1843 | 1833 | 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) |
| 1845 | 1836 | MCFG_SOUND_ROUTE(0, "mono", 0.20) |
| 1846 | 1837 | MCFG_SOUND_ROUTE(1, "mono", 0.20) |
| 1847 | 1838 | MCFG_SOUND_ROUTE(2, "mono", 0.20) |
| r22764 | r22765 | |
| 1867 | 1858 | |
| 1868 | 1859 | /* sound hardware */ |
| 1869 | 1860 | 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) |
| 1871 | 1863 | |
| 1872 | 1864 | MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz) |
| 1873 | 1865 | MCFG_SOUND_CONFIG(msm5205_config) |
| r22764 | r22765 | |
| 1979 | 1971 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1980 | 1972 | |
| 1981 | 1973 | 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) |
| 1983 | 1975 | MCFG_SOUND_ROUTE(0, "mono", 0.20) |
| 1984 | 1976 | MCFG_SOUND_ROUTE(1, "mono", 0.20) |
| 1985 | 1977 | MCFG_SOUND_ROUTE(2, "mono", 0.20) |
trunk/src/mame/drivers/witch.c
| r22764 | r22765 | |
| 479 | 479 | m_scrolly=data; |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | | static const ym2203_interface ym2203_interface_0 = |
| 482 | static const ay8910_interface ay8910_config_1 = |
| 483 | 483 | { |
| 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, |
| 492 | 489 | DEVCB_NULL |
| 493 | 490 | }; |
| 494 | 491 | |
| 495 | | static const ym2203_interface ym2203_interface_1 = |
| 492 | static const ay8910_interface ay8910_config_2 = |
| 496 | 493 | { |
| 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) |
| 506 | 500 | }; |
| 507 | 501 | |
| 508 | 502 | static ADDRESS_MAP_START( map_main, AS_PROGRAM, 8, witch_state ) |
| 509 | 503 | AM_RANGE(0x0000, UNBANKED_SIZE-1) AM_ROM |
| 510 | 504 | 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) |
| 513 | 507 | AM_RANGE(0xa000, 0xa00f) AM_READWRITE(read_a00x, write_a00x) |
| 514 | 508 | AM_RANGE(0xc000, 0xc3ff) AM_READWRITE(gfx0_vram_r, gfx0_vram_w) AM_SHARE("gfx0_vram") |
| 515 | 509 | AM_RANGE(0xc400, 0xc7ff) AM_READWRITE(gfx0_cram_r, gfx0_cram_w) AM_SHARE("gfx0_cram") |
| r22764 | r22765 | |
| 526 | 520 | |
| 527 | 521 | static ADDRESS_MAP_START( map_sub, AS_PROGRAM, 8, witch_state ) |
| 528 | 522 | 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) |
| 531 | 525 | AM_RANGE(0x8010, 0x8016) AM_READ(read_8010) AM_DEVWRITE("essnd", es8712_device, es8712_w) |
| 532 | 526 | AM_RANGE(0xa000, 0xa00f) AM_READWRITE(read_a00x, write_a00x) |
| 533 | 527 | AM_RANGE(0xf000, 0xf0ff) AM_RAM AM_SHARE("share1") |
| r22764 | r22765 | |
| 863 | 857 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 864 | 858 | |
| 865 | 859 | 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) |
| 867 | 861 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 868 | 862 | |
| 869 | 863 | 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) |
| 871 | 865 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 872 | 866 | |
| 873 | 867 | MACHINE_CONFIG_END |
trunk/src/mame/drivers/hnayayoi.c
| r22764 | r22765 | |
| 96 | 96 | |
| 97 | 97 | static ADDRESS_MAP_START( hnayayoi_io_map, AS_IO, 8, hnayayoi_state ) |
| 98 | 98 | 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) |
| 101 | 101 | AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW3") |
| 102 | 102 | AM_RANGE(0x06, 0x06) AM_WRITE(adpcm_data_w) |
| 103 | 103 | // AM_RANGE(0x08, 0x08) AM_WRITENOP // CRT Controller |
| r22764 | r22765 | |
| 118 | 118 | AM_RANGE(0x0000, 0x77ff) AM_ROM |
| 119 | 119 | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("nvram") |
| 120 | 120 | 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) |
| 123 | 123 | AM_RANGE(0xff04, 0xff04) AM_READ_PORT("DSW3") |
| 124 | 124 | AM_RANGE(0xff06, 0xff06) AM_WRITE(adpcm_data_w) |
| 125 | 125 | // AM_RANGE(0xff08, 0xff08) AM_WRITENOP // CRT Controller |
| r22764 | r22765 | |
| 144 | 144 | |
| 145 | 145 | static ADDRESS_MAP_START( untoucha_io_map, AS_IO, 8, hnayayoi_state ) |
| 146 | 146 | 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) |
| 149 | 149 | // AM_RANGE(0x12, 0x12) AM_WRITENOP // CRT Controller |
| 150 | 150 | AM_RANGE(0x13, 0x13) AM_WRITE(adpcm_data_w) |
| 151 | 151 | AM_RANGE(0x14, 0x14) AM_READ_PORT("COIN") |
| r22764 | r22765 | |
| 158 | 158 | AM_RANGE(0x28, 0x28) AM_WRITE(dynax_blitter_rev1_start_w) |
| 159 | 159 | AM_RANGE(0x31, 0x31) AM_WRITE(adpcm_vclk_w) |
| 160 | 160 | 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) |
| 163 | 163 | // AM_RANGE(0x52, 0x52) AM_WRITENOP // CRT Controller |
| 164 | 164 | ADDRESS_MAP_END |
| 165 | 165 | |
| r22764 | r22765 | |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | |
| 508 | | static const ym2203_interface ym2203_config = |
| 508 | static const ay8910_interface ay8910_config = |
| 509 | 509 | { |
| 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, |
| 519 | 516 | }; |
| 520 | 517 | |
| 521 | 518 | static const msm5205_interface msm5205_config = |
| r22764 | r22765 | |
| 576 | 573 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 577 | 574 | |
| 578 | 575 | 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) |
| 580 | 578 | MCFG_SOUND_ROUTE(0, "mono", 0.25) |
| 581 | 579 | MCFG_SOUND_ROUTE(1, "mono", 0.25) |
| 582 | 580 | MCFG_SOUND_ROUTE(2, "mono", 0.25) |
trunk/src/mame/drivers/shanghai.c
| r22764 | r22765 | |
| 157 | 157 | static ADDRESS_MAP_START( shanghai_portmap, AS_IO, 16, shanghai_state ) |
| 158 | 158 | AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_status_r, hd63484_address_w) |
| 159 | 159 | 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) |
| 161 | 161 | AM_RANGE(0x40, 0x41) AM_READ_PORT("P1") |
| 162 | 162 | AM_RANGE(0x44, 0x45) AM_READ_PORT("P2") |
| 163 | 163 | AM_RANGE(0x48, 0x49) AM_READ_PORT("SYSTEM") |
| r22764 | r22765 | |
| 171 | 171 | AM_RANGE(0x20, 0x21) AM_READ_PORT("SYSTEM") |
| 172 | 172 | AM_RANGE(0x30, 0x31) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_status_r, hd63484_address_w) |
| 173 | 173 | 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) |
| 175 | 175 | AM_RANGE(0x50, 0x51) AM_WRITE(shanghai_coin_w) |
| 176 | 176 | ADDRESS_MAP_END |
| 177 | 177 | |
| r22764 | r22765 | |
| 416 | 416 | |
| 417 | 417 | |
| 418 | 418 | |
| 419 | | static const ym2203_interface sh_ym2203_interface = |
| 419 | static const ay8910_interface ay8910_config = |
| 420 | 420 | { |
| 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, |
| 429 | 426 | DEVCB_NULL |
| 430 | 427 | }; |
| 431 | 428 | |
| 432 | 429 | |
| 433 | | static const ym2203_interface kothello_ym2203_interface = |
| 430 | static const ay8910_interface kothello_ay8910_config = |
| 434 | 431 | { |
| 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 |
| 442 | 436 | }; |
| 443 | 437 | |
| 444 | 438 | static const hd63484_interface shanghai_hd63484_intf = { 0 }; |
| r22764 | r22765 | |
| 468 | 462 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 469 | 463 | |
| 470 | 464 | MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4) |
| 471 | | MCFG_SOUND_CONFIG(sh_ym2203_interface) |
| 465 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 472 | 466 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 473 | 467 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 474 | 468 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 500 | 494 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 501 | 495 | |
| 502 | 496 | MCFG_SOUND_ADD("ymsnd", YM2203, 16000000/4) |
| 503 | | MCFG_SOUND_CONFIG(sh_ym2203_interface) |
| 497 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 504 | 498 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 505 | 499 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 506 | 500 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 538 | 532 | |
| 539 | 533 | /* same as standard seibu ym2203, but "ym1" also reads "DSW" */ |
| 540 | 534 | 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) |
| 542 | 537 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) |
| 543 | 538 | |
| 544 | 539 | MCFG_SOUND_ADD("ym2", YM2203, 14318180/4) |
trunk/src/mame/drivers/dynax.c
| r22764 | r22765 | |
| 531 | 531 | AM_RANGE( 0x74, 0x74 ) AM_WRITE(dynax_blitter_ack_w) // Blitter IRQ Ack |
| 532 | 532 | AM_RANGE( 0x76, 0x76 ) AM_WRITE(dynax_blit_palbank_w) // Layers Palettes (High Bit) |
| 533 | 533 | 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 |
| 535 | 535 | AM_RANGE( 0x7a, 0x7b ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) // AY8910 |
| 536 | 536 | // AM_RANGE( 0x7c, 0x7c ) AM_WRITENOP // CRT Controller |
| 537 | 537 | // AM_RANGE( 0x7d, 0x7d ) AM_WRITENOP // |
| r22764 | r22765 | |
| 845 | 845 | static ADDRESS_MAP_START( sprtmtch_io_map, AS_IO, 8, dynax_state ) |
| 846 | 846 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 847 | 847 | 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 |
| 849 | 849 | // AM_RANGE( 0x12, 0x12 ) AM_WRITENOP // CRT Controller |
| 850 | 850 | // AM_RANGE( 0x13, 0x13 ) AM_WRITENOP // CRT Controller |
| 851 | 851 | AM_RANGE( 0x20, 0x20 ) AM_READ_PORT("P1") // P1 |
| r22764 | r22765 | |
| 1022 | 1022 | AM_RANGE( 0x10, 0x10 ) AM_WRITE(jantouki_sound_vblank_ack_w) // VBlank IRQ Ack |
| 1023 | 1023 | AM_RANGE( 0x21, 0x21 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // AY8910 |
| 1024 | 1024 | 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) // |
| 1026 | 1026 | AM_RANGE( 0x30, 0x30 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 1027 | 1027 | AM_RANGE( 0x40, 0x40 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 1028 | 1028 | AM_RANGE( 0x50, 0x50 ) AM_READ(jantouki_soundlatch_status_r) // Soundlatch status |
| r22764 | r22765 | |
| 4065 | 4065 | Hana no Mai |
| 4066 | 4066 | ***************************************************************************/ |
| 4067 | 4067 | |
| 4068 | | static const ym2203_interface hanamai_ym2203_interface = |
| 4068 | static const ay8910_interface hanamai_ay8910_config = |
| 4069 | 4069 | { |
| 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 */ |
| 4079 | 4076 | }; |
| 4080 | 4077 | |
| 4081 | 4078 | static const msm5205_interface hanamai_msm5205_interface = |
| r22764 | r22765 | |
| 4119 | 4116 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 4120 | 4117 | |
| 4121 | 4118 | 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) |
| 4123 | 4121 | MCFG_SOUND_ROUTE(0, "mono", 0.20) |
| 4124 | 4122 | MCFG_SOUND_ROUTE(1, "mono", 0.20) |
| 4125 | 4123 | MCFG_SOUND_ROUTE(2, "mono", 0.20) |
| r22764 | r22765 | |
| 4233 | 4231 | Sports Match |
| 4234 | 4232 | ***************************************************************************/ |
| 4235 | 4233 | |
| 4236 | | static const ym2203_interface sprtmtch_ym2203_interface = |
| 4234 | static const ay8910_interface sprtmtch_ay8910_config = |
| 4237 | 4235 | { |
| 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 */ |
| 4247 | 4242 | }; |
| 4248 | 4243 | |
| 4249 | 4244 | static MACHINE_CONFIG_START( sprtmtch, dynax_state ) |
| r22764 | r22765 | |
| 4276 | 4271 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4277 | 4272 | |
| 4278 | 4273 | 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) |
| 4280 | 4276 | MCFG_SOUND_ROUTE(0, "mono", 0.20) |
| 4281 | 4277 | MCFG_SOUND_ROUTE(1, "mono", 0.20) |
| 4282 | 4278 | MCFG_SOUND_ROUTE(2, "mono", 0.20) |
| r22764 | r22765 | |
| 4407 | 4403 | |
| 4408 | 4404 | // dual monitor, 2 CPU's, 2 blitters |
| 4409 | 4405 | |
| 4410 | | static const ym2203_interface jantouki_ym2203_interface = |
| 4406 | static const ay8910_interface jantouki_ay8910_config = |
| 4411 | 4407 | { |
| 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 |
| 4418 | 4411 | }; |
| 4419 | 4412 | |
| 4420 | 4413 | static const msm5205_interface jantouki_msm5205_interface = |
| r22764 | r22765 | |
| 4489 | 4482 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 4490 | 4483 | |
| 4491 | 4484 | 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) |
| 4493 | 4487 | MCFG_SOUND_ROUTE(0, "mono", 0.20) |
| 4494 | 4488 | MCFG_SOUND_ROUTE(1, "mono", 0.20) |
| 4495 | 4489 | MCFG_SOUND_ROUTE(2, "mono", 0.20) |
trunk/src/mame/drivers/dooyong.c
| r22764 | r22765 | |
| 286 | 286 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 287 | 287 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 288 | 288 | 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) |
| 291 | 291 | ADDRESS_MAP_END |
| 292 | 292 | |
| 293 | 293 | static ADDRESS_MAP_START( pollux_sound_map, AS_PROGRAM, 8, dooyong_state ) |
| 294 | 294 | AM_RANGE(0x0000, 0xefff) AM_ROM |
| 295 | 295 | AM_RANGE(0xf000, 0xf7ff) AM_RAM |
| 296 | 296 | 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) |
| 299 | 299 | ADDRESS_MAP_END |
| 300 | 300 | |
| 301 | 301 | static ADDRESS_MAP_START( bluehawk_sound_map, AS_PROGRAM, 8, dooyong_state ) |
| r22764 | r22765 | |
| 784 | 784 | m_audiocpu->set_input_line(0, (m_interrupt_line_1 | m_interrupt_line_2) ? ASSERT_LINE : CLEAR_LINE); |
| 785 | 785 | } |
| 786 | 786 | |
| 787 | | static const ym2203_interface ym2203_interface_1 = |
| 787 | static const ay8910_interface ay8910_config_1 = |
| 788 | 788 | { |
| 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 |
| 795 | 792 | }; |
| 796 | 793 | |
| 797 | | static const ym2203_interface ym2203_interface_2 = |
| 794 | static const ay8910_interface ay8910_config_2 = |
| 798 | 795 | { |
| 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 |
| 805 | 799 | }; |
| 806 | 800 | |
| 807 | 801 | /*************************************************************************** |
| r22764 | r22765 | |
| 815 | 809 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 816 | 810 | |
| 817 | 811 | 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) |
| 819 | 814 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 820 | 815 | |
| 821 | 816 | 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) |
| 823 | 819 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 824 | 820 | MACHINE_CONFIG_END |
| 825 | 821 | |
| r22764 | r22765 | |
| 881 | 877 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 882 | 878 | |
| 883 | 879 | 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) |
| 885 | 882 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 886 | 883 | |
| 887 | 884 | 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) |
| 889 | 887 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 890 | 888 | |
| 891 | 889 | MACHINE_CONFIG_END |
trunk/src/mame/drivers/lkage.c
| r22764 | r22765 | |
| 183 | 183 | static ADDRESS_MAP_START( lkage_sound_map, AS_PROGRAM, 8, lkage_state ) |
| 184 | 184 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 185 | 185 | 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) |
| 188 | 188 | AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ??? */ |
| 189 | 189 | AM_RANGE(0xb001, 0xb001) AM_READNOP /* ??? */ AM_WRITE(lkage_sh_nmi_enable_w) |
| 190 | 190 | AM_RANGE(0xb002, 0xb002) AM_WRITE(lkage_sh_nmi_disable_w) |
| r22764 | r22765 | |
| 479 | 479 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | | static const ym2203_interface ym2203_config = |
| 482 | static const ay8910_interface ay8910_config = |
| 483 | 483 | { |
| 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 |
| 490 | 487 | }; |
| 491 | 488 | |
| 492 | 489 | void lkage_state::machine_start() |
| r22764 | r22765 | |
| 573 | 570 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 574 | 571 | |
| 575 | 572 | 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) |
| 577 | 575 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 578 | 576 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 579 | 577 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 616 | 614 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 617 | 615 | |
| 618 | 616 | 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) |
| 620 | 619 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 621 | 620 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 622 | 621 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
trunk/src/mame/drivers/lastduel.c
| r22764 | r22765 | |
| 168 | 168 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, lastduel_state ) |
| 169 | 169 | AM_RANGE(0x0000, 0xdfff) AM_ROM |
| 170 | 170 | 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) |
| 173 | 173 | AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) |
| 174 | 174 | ADDRESS_MAP_END |
| 175 | 175 | |
| r22764 | r22765 | |
| 182 | 182 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 183 | 183 | AM_RANGE(0x8000, 0xcfff) AM_ROMBANK("bank1") |
| 184 | 184 | 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) |
| 187 | 187 | AM_RANGE(0xf004, 0xf004) AM_DEVWRITE("oki", okim6295_device, write) |
| 188 | 188 | AM_RANGE(0xf006, 0xf006) AM_READ(soundlatch_byte_r) |
| 189 | 189 | AM_RANGE(0xf00a, 0xf00a) AM_WRITE(mg_bankswitch_w) |
| r22764 | r22765 | |
| 444 | 444 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | | static const ym2203_interface ym2203_config = |
| 447 | static const ay8910_interface ay8910_config = |
| 448 | 448 | { |
| 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, |
| 455 | 452 | }; |
| 456 | 453 | |
| 457 | 454 | TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::lastduel_timer_cb) |
| r22764 | r22765 | |
| 524 | 521 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 525 | 522 | |
| 526 | 523 | 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) |
| 528 | 526 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 529 | 527 | |
| 530 | 528 | MCFG_SOUND_ADD("ym2", YM2203, 3579545) |
| r22764 | r22765 | |
| 567 | 565 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 568 | 566 | |
| 569 | 567 | 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) |
| 571 | 570 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 572 | 571 | |
| 573 | 572 | MCFG_SOUND_ADD("ym2", YM2203, XTAL_3_579545MHz) /* verified on pcb */ |
trunk/src/mame/drivers/segahang.c
| r22764 | r22765 | |
| 520 | 520 | ADDRESS_MAP_UNMAP_HIGH |
| 521 | 521 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 522 | 522 | 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) |
| 524 | 524 | AM_RANGE(0xe000, 0xe0ff) AM_MIRROR(0x0f00) AM_DEVREADWRITE("pcm", segapcm_device, sega_pcm_r, sega_pcm_w) |
| 525 | 525 | ADDRESS_MAP_END |
| 526 | 526 | |
| r22764 | r22765 | |
| 547 | 547 | static ADDRESS_MAP_START( sound_portmap_2203x2, AS_IO, 8, segahang_state ) |
| 548 | 548 | ADDRESS_MAP_UNMAP_HIGH |
| 549 | 549 | 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) |
| 551 | 551 | 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) |
| 553 | 553 | ADDRESS_MAP_END |
| 554 | 554 | |
| 555 | 555 | |
| r22764 | r22765 | |
| 802 | 802 | // SOUND CONFIGURATIONS |
| 803 | 803 | //************************************************************************** |
| 804 | 804 | |
| 805 | | static const ym2203_interface ym2203_config = |
| 805 | static const ay8910_interface ay8910_config = |
| 806 | 806 | { |
| 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 |
| 813 | 810 | }; |
| 814 | 811 | |
| 815 | 812 | static const sega_pcm_interface segapcm_interface = |
| r22764 | r22765 | |
| 899 | 896 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 900 | 897 | |
| 901 | 898 | 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) |
| 903 | 901 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.13) |
| 904 | 902 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.13) |
| 905 | 903 | MCFG_SOUND_ROUTE(1, "lspeaker", 0.13) |
| r22764 | r22765 | |
| 927 | 925 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 928 | 926 | |
| 929 | 927 | 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) |
| 931 | 930 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.13) |
| 932 | 931 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.13) |
| 933 | 932 | MCFG_SOUND_ROUTE(1, "lspeaker", 0.13) |
trunk/src/mame/drivers/xxmissio.c
| r22764 | r22765 | |
| 86 | 86 | static ADDRESS_MAP_START( map1, AS_PROGRAM, 8, xxmissio_state ) |
| 87 | 87 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 88 | 88 | |
| 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) |
| 91 | 91 | |
| 92 | 92 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") |
| 93 | 93 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("P2") |
| r22764 | r22765 | |
| 110 | 110 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 111 | 111 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") |
| 112 | 112 | |
| 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) |
| 115 | 115 | AM_RANGE(0x8006, 0x8006) AM_WRITE(xxmissio_bank_sel_w) |
| 116 | 116 | |
| 117 | 117 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") |
| r22764 | r22765 | |
| 253 | 253 | |
| 254 | 254 | /****************************************************************************/ |
| 255 | 255 | |
| 256 | | static const ym2203_interface ym2203_interface_1 = |
| 256 | static const ay8910_interface ay8910_config_1 = |
| 257 | 257 | { |
| 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, |
| 266 | 263 | DEVCB_NULL |
| 267 | 264 | }; |
| 268 | 265 | |
| 269 | | static const ym2203_interface ym2203_interface_2 = |
| 266 | static const ay8910_interface ay8910_config_2 = |
| 270 | 267 | { |
| 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) |
| 280 | 274 | }; |
| 281 | 275 | |
| 282 | 276 | static MACHINE_CONFIG_START( xxmissio, xxmissio_state ) |
| r22764 | r22765 | |
| 309 | 303 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 310 | 304 | |
| 311 | 305 | MCFG_SOUND_ADD("ym1", YM2203, 12000000/8) |
| 312 | | MCFG_SOUND_CONFIG(ym2203_interface_1) |
| 306 | MCFG_YM2203_AY8910_INTF(&ay8910_config_1) |
| 313 | 307 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 314 | 308 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 315 | 309 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| 316 | 310 | MCFG_SOUND_ROUTE(3, "mono", 0.40) |
| 317 | 311 | |
| 318 | 312 | MCFG_SOUND_ADD("ym2", YM2203, 12000000/8) |
| 319 | | MCFG_SOUND_CONFIG(ym2203_interface_2) |
| 313 | MCFG_YM2203_AY8910_INTF(&ay8910_config_2) |
| 320 | 314 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 321 | 315 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 322 | 316 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
trunk/src/mame/drivers/lsasquad.c
| r22764 | r22765 | |
| 189 | 189 | static ADDRESS_MAP_START( lsasquad_sound_map, AS_PROGRAM, 8, lsasquad_state ) |
| 190 | 190 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 191 | 191 | 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) |
| 193 | 193 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) |
| 194 | 194 | AM_RANGE(0xd000, 0xd000) AM_READWRITE(lsasquad_sh_sound_command_r, lsasquad_sh_result_w) |
| 195 | 195 | AM_RANGE(0xd400, 0xd400) AM_WRITE(lsasquad_sh_nmi_disable_w) |
| r22764 | r22765 | |
| 396 | 396 | static ADDRESS_MAP_START( daikaiju_sound_map, AS_PROGRAM, 8, lsasquad_state ) |
| 397 | 397 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 398 | 398 | 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) |
| 400 | 400 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) |
| 401 | 401 | AM_RANGE(0xd000, 0xd000) AM_READ(daikaiju_sh_sound_command_r) |
| 402 | 402 | AM_RANGE(0xd400, 0xd400) AM_WRITENOP |
| r22764 | r22765 | |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | |
| 551 | | static const ym2203_interface ym2203_config = |
| 551 | static const ay8910_interface ay8910_config = |
| 552 | 552 | { |
| 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), |
| 562 | 559 | }; |
| 563 | 560 | |
| 564 | 561 | |
| r22764 | r22765 | |
| 647 | 644 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) |
| 648 | 645 | |
| 649 | 646 | 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) |
| 651 | 649 | MCFG_SOUND_ROUTE(0, "mono", 0.12) |
| 652 | 650 | MCFG_SOUND_ROUTE(1, "mono", 0.12) |
| 653 | 651 | MCFG_SOUND_ROUTE(2, "mono", 0.12) |
| r22764 | r22765 | |
| 703 | 701 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) |
| 704 | 702 | |
| 705 | 703 | 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) |
| 707 | 706 | MCFG_SOUND_ROUTE(0, "mono", 0.12) |
| 708 | 707 | MCFG_SOUND_ROUTE(1, "mono", 0.12) |
| 709 | 708 | MCFG_SOUND_ROUTE(2, "mono", 0.12) |
trunk/src/mame/drivers/gaiden.c
| r22764 | r22765 | |
| 428 | 428 | AM_RANGE(0xe000, 0xefff) AM_ROM /* raiga only */ |
| 429 | 429 | AM_RANGE(0xf000, 0xf7ff) AM_RAM |
| 430 | 430 | 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) |
| 433 | 433 | AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */ |
| 434 | 434 | AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) |
| 435 | 435 | ADDRESS_MAP_END |
| r22764 | r22765 | |
| 741 | 741 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 742 | 742 | } |
| 743 | 743 | |
| 744 | | static const ym2203_interface ym2203_config = |
| 744 | static const ay8910_interface ay8910_config = |
| 745 | 745 | { |
| 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 |
| 752 | 749 | }; |
| 753 | 750 | |
| 754 | 751 | static MACHINE_CONFIG_START( shadoww, gaiden_state ) |
| r22764 | r22765 | |
| 782 | 779 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 783 | 780 | |
| 784 | 781 | 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) |
| 786 | 784 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 787 | 785 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 788 | 786 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 893 | 891 | static ADDRESS_MAP_START( mastninj_sound_map, AS_PROGRAM, 8, gaiden_state ) |
| 894 | 892 | AM_RANGE(0x0000, 0xdfff) AM_ROM |
| 895 | 893 | 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) |
| 898 | 896 | // AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */ |
| 899 | 897 | // AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) |
| 900 | 898 | ADDRESS_MAP_END |
| r22764 | r22765 | |
| 954 | 952 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 955 | 953 | |
| 956 | 954 | 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) |
| 958 | 957 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 959 | 958 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 960 | 959 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
trunk/src/mame/drivers/dec0.c
| r22764 | r22765 | |
| 546 | 546 | |
| 547 | 547 | static ADDRESS_MAP_START( dec0_s_map, AS_PROGRAM, 8, dec0_state ) |
| 548 | 548 | 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) |
| 550 | 550 | AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) |
| 551 | 551 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) |
| 552 | 552 | AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| r22764 | r22765 | |
| 558 | 558 | AM_RANGE(0x000000, 0x00ffff) AM_ROM |
| 559 | 559 | AM_RANGE(0x090000, 0x090001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) |
| 560 | 560 | 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) |
| 562 | 562 | AM_RANGE(0x0e0000, 0x0e0001) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 563 | 563 | AM_RANGE(0x0f0000, 0x0f0001) AM_READ(soundlatch_byte_r) |
| 564 | 564 | AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") |
| r22764 | r22765 | |
| 568 | 568 | static ADDRESS_MAP_START( midres_s_map, AS_PROGRAM, 8, dec0_state ) |
| 569 | 569 | AM_RANGE(0x000000, 0x00ffff) AM_ROM |
| 570 | 570 | 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) |
| 572 | 572 | AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 573 | 573 | AM_RANGE(0x138000, 0x138001) AM_READ(soundlatch_byte_r) |
| 574 | 574 | AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") |
| r22764 | r22765 | |
| 667 | 667 | static ADDRESS_MAP_START( automat_s_map, AS_PROGRAM, 8, dec0_automat_state ) |
| 668 | 668 | AM_RANGE(0x0103, 0x0103) AM_WRITENOP |
| 669 | 669 | 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) |
| 671 | 671 | 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) |
| 673 | 673 | AM_RANGE(0xf000, 0xf000) AM_WRITE(automat_adpcm_w) |
| 674 | 674 | AM_RANGE(0x0000, 0xffff) AM_ROM |
| 675 | 675 | ADDRESS_MAP_END |
trunk/src/mame/drivers/shootout.c
| r22764 | r22765 | |
| 87 | 87 | AM_RANGE(0x1003, 0x1003) AM_READ_PORT("DSW2") |
| 88 | 88 | AM_RANGE(0x1800, 0x1800) AM_WRITE(shootout_coin_counter_w) |
| 89 | 89 | 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) |
| 91 | 91 | AM_RANGE(0x3000, 0x37ff) AM_RAM_WRITE(shootout_textram_w) AM_SHARE("textram") |
| 92 | 92 | AM_RANGE(0x3800, 0x3fff) AM_RAM_WRITE(shootout_videoram_w) AM_SHARE("videoram") |
| 93 | 93 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") |
| r22764 | r22765 | |
| 99 | 99 | /* same as Tryout */ |
| 100 | 100 | static ADDRESS_MAP_START( shootout_sound_map, AS_PROGRAM, 8, shootout_state ) |
| 101 | 101 | 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) |
| 103 | 103 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) |
| 104 | 104 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 105 | 105 | AM_RANGE(0xd000, 0xd000) AM_WRITENOP // unknown, NOT irq/nmi mask |
| r22764 | r22765 | |
| 239 | 239 | m_maincpu->set_input_line(0, state); |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | | static const ym2203_interface ym2203_config = |
| 242 | static const ay8910_interface ay8910_config = |
| 243 | 243 | { |
| 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 |
| 250 | 247 | }; |
| 251 | 248 | |
| 252 | | static const ym2203_interface ym2203_interface2 = |
| 249 | static const ay8910_interface ay8910_config2 = |
| 253 | 250 | { |
| 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) |
| 263 | 257 | }; |
| 264 | 258 | |
| 265 | 259 | static MACHINE_CONFIG_START( shootout, shootout_state ) |
| r22764 | r22765 | |
| 287 | 281 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 288 | 282 | |
| 289 | 283 | 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) |
| 291 | 286 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 292 | 287 | MACHINE_CONFIG_END |
| 293 | 288 | |
| r22764 | r22765 | |
| 314 | 309 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 315 | 310 | |
| 316 | 311 | 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) |
| 318 | 314 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 319 | 315 | MACHINE_CONFIG_END |
| 320 | 316 | |
trunk/src/mame/drivers/tnzs.c
| r22764 | r22765 | |
| 779 | 779 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 780 | 780 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("subbank") |
| 781 | 781 | 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) |
| 783 | 783 | AM_RANGE(0xc000, 0xc001) AM_READWRITE(tnzs_mcu_r, tnzs_mcu_w) /* not present in insectx */ |
| 784 | 784 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 785 | 785 | AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1") |
| r22764 | r22765 | |
| 792 | 792 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 793 | 793 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("subbank") |
| 794 | 794 | 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) |
| 796 | 796 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") |
| 797 | 797 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN1") |
| 798 | 798 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN2") |
| r22764 | r22765 | |
| 852 | 852 | |
| 853 | 853 | static ADDRESS_MAP_START( tnzsb_io_map, AS_IO, 8, tnzs_state ) |
| 854 | 854 | 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) |
| 856 | 856 | AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) |
| 857 | 857 | ADDRESS_MAP_END |
| 858 | 858 | |
| r22764 | r22765 | |
| 1548 | 1548 | GFXDECODE_END |
| 1549 | 1549 | |
| 1550 | 1550 | |
| 1551 | | static const ym2203_interface ym2203_config = |
| 1551 | static const ay8910_interface ay8910_config = |
| 1552 | 1552 | { |
| 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, |
| 1561 | 1558 | DEVCB_NULL |
| 1562 | 1559 | }; |
| 1563 | 1560 | |
| r22764 | r22765 | |
| 1568 | 1565 | m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); |
| 1569 | 1566 | } |
| 1570 | 1567 | |
| 1571 | | static const ym2203_interface kageki_ym2203_interface = |
| 1568 | static const ay8910_interface kageki_ay8910_config = |
| 1572 | 1569 | { |
| 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) |
| 1582 | 1576 | }; |
| 1583 | 1577 | |
| 1584 | | static const ym2203_interface ym2203b_interface = |
| 1578 | |
| 1579 | static const ay8910_interface tnzsb_ay8910_config = |
| 1585 | 1580 | { |
| 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 |
| 1592 | 1584 | }; |
| 1593 | 1585 | |
| 1594 | | static const ym2203_interface kabukiz_ym2203_interface = |
| 1586 | static const ay8910_interface kabukiz_ay8910_config = |
| 1595 | 1587 | { |
| 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) |
| 1605 | 1594 | }; |
| 1606 | 1595 | |
| 1607 | 1596 | static const samples_interface tnzs_samples_interface = |
| r22764 | r22765 | |
| 1647 | 1636 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1648 | 1637 | |
| 1649 | 1638 | MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */ |
| 1650 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 1639 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 1651 | 1640 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 1652 | 1641 | MACHINE_CONFIG_END |
| 1653 | 1642 | |
| r22764 | r22765 | |
| 1688 | 1677 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1689 | 1678 | |
| 1690 | 1679 | MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) |
| 1691 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 1680 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 1692 | 1681 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 1693 | 1682 | MACHINE_CONFIG_END |
| 1694 | 1683 | |
| r22764 | r22765 | |
| 1731 | 1720 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1732 | 1721 | |
| 1733 | 1722 | MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) |
| 1734 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 1723 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 1735 | 1724 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 1736 | 1725 | MACHINE_CONFIG_END |
| 1737 | 1726 | |
| r22764 | r22765 | |
| 1770 | 1759 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1771 | 1760 | |
| 1772 | 1761 | MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */ |
| 1773 | | MCFG_SOUND_CONFIG(ym2203_config) |
| 1762 | MCFG_YM2203_AY8910_INTF(&ay8910_config) |
| 1774 | 1763 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 1775 | 1764 | MACHINE_CONFIG_END |
| 1776 | 1765 | |
| r22764 | r22765 | |
| 1809 | 1798 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1810 | 1799 | |
| 1811 | 1800 | 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) |
| 1813 | 1802 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 1814 | 1803 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 1815 | 1804 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r22764 | r22765 | |
| 1858 | 1847 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1859 | 1848 | |
| 1860 | 1849 | 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) |
| 1862 | 1852 | MCFG_SOUND_ROUTE(0, "mono", 1.0) |
| 1863 | 1853 | MCFG_SOUND_ROUTE(1, "mono", 1.0) |
| 1864 | 1854 | MCFG_SOUND_ROUTE(2, "mono", 1.0) |
| r22764 | r22765 | |
| 1876 | 1866 | MCFG_CPU_PROGRAM_MAP(kabukiz_cpu2_map) |
| 1877 | 1867 | |
| 1878 | 1868 | MCFG_SOUND_MODIFY("ymsnd") |
| 1879 | | MCFG_SOUND_CONFIG(kabukiz_ym2203_interface) |
| 1869 | MCFG_YM2203_AY8910_INTF(&kabukiz_ay8910_config) |
| 1880 | 1870 | |
| 1881 | 1871 | MCFG_DAC_ADD("dac") |
| 1882 | 1872 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
trunk/src/mame/drivers/nmk16.c
| r22764 | r22765 | |
| 395 | 395 | |
| 396 | 396 | static ADDRESS_MAP_START( tharrier_sound_io_map, AS_IO, 8, nmk16_state ) |
| 397 | 397 | 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) |
| 399 | 399 | ADDRESS_MAP_END |
| 400 | 400 | |
| 401 | 401 | //Read input port 1 030c8/ BAD |
| r22764 | r22765 | |
| 1077 | 1077 | static ADDRESS_MAP_START( raphero_sound_mem_map, AS_PROGRAM, 8, nmk16_state ) |
| 1078 | 1078 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 1079 | 1079 | 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) |
| 1081 | 1081 | AM_RANGE(0xc800, 0xc800) AM_DEVREADWRITE("oki1", okim6295_device, read, write) |
| 1082 | 1082 | AM_RANGE(0xc808, 0xc808) AM_DEVREADWRITE("oki2", okim6295_device, read, write) |
| 1083 | 1083 | AM_RANGE(0xc810, 0xc817) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w) |
| r22764 | r22765 | |
| 1098 | 1098 | |
| 1099 | 1099 | static ADDRESS_MAP_START( macross2_sound_io_map, AS_IO, 8, nmk16_state ) |
| 1100 | 1100 | 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) |
| 1102 | 1102 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki1", okim6295_device, read, write) |
| 1103 | 1103 | AM_RANGE(0x88, 0x88) AM_DEVREADWRITE("oki2", okim6295_device, read, write) |
| 1104 | 1104 | AM_RANGE(0x90, 0x97) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w) |
| r22764 | r22765 | |
| 3491 | 3491 | |
| 3492 | 3492 | |
| 3493 | 3493 | |
| 3494 | | static 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 | | |
| 3504 | 3494 | WRITE_LINE_MEMBER(nmk16_state::ym2203_irqhandler) |
| 3505 | 3495 | { |
| 3506 | 3496 | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 3507 | 3497 | } |
| 3508 | 3498 | |
| 3509 | | static const ym2203_interface ym2203_config = |
| 3499 | static const ay8910_interface ay8910_config = |
| 3510 | 3500 | { |
| 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 |
| 3517 | 3504 | }; |
| 3518 | 3505 | |
| 3519 | 3506 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline) |
| r22764 | r22765 | |
| 3580 | 3567 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3581 | 3568 | |
| 3582 | 3569 | 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) |
| 3584 | 3572 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3585 | 3573 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3586 | 3574 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3623 | 3611 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3624 | 3612 | |
| 3625 | 3613 | 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) |
| 3627 | 3616 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3628 | 3617 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3629 | 3618 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3664 | 3653 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3665 | 3654 | |
| 3666 | 3655 | 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) |
| 3668 | 3658 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3669 | 3659 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3670 | 3660 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3739 | 3729 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3740 | 3730 | |
| 3741 | 3731 | 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) |
| 3743 | 3734 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3744 | 3735 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3745 | 3736 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3780 | 3771 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3781 | 3772 | |
| 3782 | 3773 | 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) |
| 3784 | 3776 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3785 | 3777 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3786 | 3778 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3855 | 3847 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3856 | 3848 | |
| 3857 | 3849 | 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) |
| 3859 | 3852 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3860 | 3853 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3861 | 3854 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 3930 | 3923 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 3931 | 3924 | |
| 3932 | 3925 | 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) |
| 3934 | 3928 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 3935 | 3929 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 3936 | 3930 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4004 | 3998 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4005 | 3999 | |
| 4006 | 4000 | 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) |
| 4008 | 4003 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 4009 | 4004 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 4010 | 4005 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4046 | 4041 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4047 | 4042 | |
| 4048 | 4043 | 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) |
| 4050 | 4046 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 4051 | 4047 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 4052 | 4048 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4087 | 4083 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4088 | 4084 | |
| 4089 | 4085 | 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) |
| 4091 | 4088 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 4092 | 4089 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 4093 | 4090 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4128 | 4125 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4129 | 4126 | |
| 4130 | 4127 | 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) |
| 4132 | 4130 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 4133 | 4131 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 4134 | 4132 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4169 | 4167 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4170 | 4168 | |
| 4171 | 4169 | 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) |
| 4173 | 4172 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 4174 | 4173 | MCFG_SOUND_ROUTE(1, "mono", 0.50) |
| 4175 | 4174 | MCFG_SOUND_ROUTE(2, "mono", 0.50) |
| r22764 | r22765 | |
| 4212 | 4211 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4213 | 4212 | |
| 4214 | 4213 | 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) |
| 4216 | 4216 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90) |
| 4217 | 4217 | |
| 4218 | 4218 | MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW) |
| r22764 | r22765 | |
| 4254 | 4254 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4255 | 4255 | |
| 4256 | 4256 | 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) |
| 4258 | 4259 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 4259 | 4260 | |
| 4260 | 4261 | MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW) |
| r22764 | r22765 | |
| 4295 | 4296 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 4296 | 4297 | |
| 4297 | 4298 | 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) |
| 4299 | 4301 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90) |
| 4300 | 4302 | |
| 4301 | 4303 | MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW) |
trunk/src/mame/audio/seibu.c
| r22764 | r22765 | |
| 450 | 450 | DEVCB_LINE(seibu_ym3812_irqhandler) |
| 451 | 451 | }; |
| 452 | 452 | |
| 453 | | const ym2203_interface seibu_ym2203_interface = |
| 453 | const ay8910_interface seibu_ay8910_config = |
| 454 | 454 | { |
| 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 |
| 461 | 458 | }; |
| 462 | 459 | |
| 463 | 460 | /***************************************************************************/ |
| r22764 | r22765 | |
| 563 | 560 | AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w) |
| 564 | 561 | AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w) |
| 565 | 562 | 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) |
| 567 | 564 | AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r) |
| 568 | 565 | AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r) |
| 569 | 566 | AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN") |
| 570 | 567 | AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w) |
| 571 | 568 | 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) |
| 573 | 570 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") |
| 574 | 571 | ADDRESS_MAP_END |
| 575 | 572 | |
| r22764 | r22765 | |
| 582 | 579 | AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w) |
| 583 | 580 | AM_RANGE(0x4005, 0x4006) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_adr_w) |
| 584 | 581 | 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) |
| 586 | 583 | AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r) |
| 587 | 584 | AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r) |
| 588 | 585 | AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN") |
| r22764 | r22765 | |
| 590 | 587 | AM_RANGE(0x401a, 0x401a) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_ctl_w) |
| 591 | 588 | AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w) |
| 592 | 589 | 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) |
| 594 | 591 | AM_RANGE(0x601a, 0x601a) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_ctl_w) |
| 595 | 592 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") |
| 596 | 593 | ADDRESS_MAP_END |
trunk/src/mame/machine/nmk004.c
| r22764 | r22765 | |
| 99 | 99 | UINT8 to_main; // answer to main CPU |
| 100 | 100 | int protection_check; |
| 101 | 101 | |
| 102 | | device_t *ymdevice; |
| 102 | ym2203_device *ymdevice; |
| 103 | 103 | okim6295_device *oki1device; |
| 104 | 104 | okim6295_device *oki2device; |
| 105 | 105 | |
| r22764 | r22765 | |
| 357 | 357 | fm->slot = read8(fm->current++); |
| 358 | 358 | if (channel < 3 || !(NMK004_state.fm_control[channel-3].flags & FM_FLAG_ACTIVE)) |
| 359 | 359 | { |
| 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); |
| 362 | 362 | } |
| 363 | 363 | break; |
| 364 | 364 | |
| r22764 | r22765 | |
| 607 | 607 | |
| 608 | 608 | for (i = 0; i < 0x18; i++) |
| 609 | 609 | { |
| 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]); |
| 612 | 612 | } |
| 613 | 613 | } |
| 614 | 614 | |
| r22764 | r22765 | |
| 620 | 620 | { |
| 621 | 621 | for (i = 0; i < 0x18; i++) |
| 622 | 622 | { |
| 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]); |
| 625 | 625 | } |
| 626 | 626 | } |
| 627 | 627 | } |
| r22764 | r22765 | |
| 629 | 629 | |
| 630 | 630 | if (fm1->flags & FM_FLAG_ACTIVE) |
| 631 | 631 | { |
| 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); |
| 634 | 634 | |
| 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); |
| 637 | 637 | |
| 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); |
| 640 | 640 | } |
| 641 | 641 | else |
| 642 | 642 | { |
| 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); |
| 645 | 645 | |
| 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); |
| 648 | 648 | |
| 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); |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | |
| r22764 | r22765 | |
| 656 | 656 | { |
| 657 | 657 | fm1->flags &= ~FM_FLAG_MUST_SEND_KEYON; |
| 658 | 658 | |
| 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); |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | if (fm2->flags & FM_FLAG_MUST_SEND_KEYON) |
| r22764 | r22765 | |
| 666 | 666 | |
| 667 | 667 | if (!(fm1->flags & FM_FLAG_ACTIVE)) |
| 668 | 668 | { |
| 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); |
| 671 | 671 | } |
| 672 | 672 | } |
| 673 | 673 | } |
| r22764 | r22765 | |
| 706 | 706 | psg->flags &= ~PSG_FLAG_NOISE_NOT_ENABLED; |
| 707 | 707 | |
| 708 | 708 | // 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); |
| 711 | 711 | enable |= (0x01 << channel); // disable tone |
| 712 | 712 | 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); |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | |
| r22764 | r22765 | |
| 744 | 744 | psg->flags &= ~PSG_FLAG_NOISE_NOT_ENABLED; |
| 745 | 745 | |
| 746 | 746 | // 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); |
| 749 | 749 | enable |= (0x01 << channel); // disable tone |
| 750 | 750 | 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); |
| 752 | 752 | break; |
| 753 | 753 | |
| 754 | 754 | case 0xf2: // set volume shape |
| r22764 | r22765 | |
| 793 | 793 | psg->volume_shape = 0; |
| 794 | 794 | |
| 795 | 795 | // 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); |
| 798 | 798 | return; |
| 799 | 799 | } |
| 800 | 800 | } |
| r22764 | r22765 | |
| 834 | 834 | |
| 835 | 835 | period >>= octave; |
| 836 | 836 | |
| 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)); |
| 841 | 841 | |
| 842 | 842 | psg->note_period_hi_bits = (period & 0x0f00) >> 8; |
| 843 | 843 | } |
| r22764 | r22765 | |
| 850 | 850 | psg->flags |= PSG_FLAG_NOISE_NOT_ENABLED; |
| 851 | 851 | |
| 852 | 852 | // 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); |
| 855 | 855 | enable &= ~(0x01 << channel); // enable tone |
| 856 | 856 | 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); |
| 858 | 858 | } |
| 859 | 859 | |
| 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); |
| 862 | 862 | psg->note_period_hi_bits = psg->note; |
| 863 | 863 | } |
| 864 | 864 | } |
| r22764 | r22765 | |
| 883 | 883 | volume = 0; |
| 884 | 884 | |
| 885 | 885 | // 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); |
| 888 | 888 | } |
| 889 | 889 | } |
| 890 | 890 | } |
| r22764 | r22765 | |
| 1004 | 1004 | if (irq) |
| 1005 | 1005 | { |
| 1006 | 1006 | 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); |
| 1008 | 1008 | |
| 1009 | 1009 | if (status & 1) // timer A expired |
| 1010 | 1010 | { |
| r22764 | r22765 | |
| 1013 | 1013 | update_music(); |
| 1014 | 1014 | |
| 1015 | 1015 | // 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); |
| 1018 | 1018 | } |
| 1019 | 1019 | } |
| 1020 | 1020 | } |
| r22764 | r22765 | |
| 1033 | 1033 | memset(&NMK004_state, 0, sizeof(NMK004_state)); |
| 1034 | 1034 | |
| 1035 | 1035 | NMK004_state.set_machine(machine); |
| 1036 | | NMK004_state.ymdevice = machine.device("ymsnd"); |
| 1036 | NMK004_state.ymdevice = machine.device<ym2203_device>("ymsnd"); |
| 1037 | 1037 | NMK004_state.oki1device = machine.device<okim6295_device>("oki1"); |
| 1038 | 1038 | NMK004_state.oki2device = machine.device<okim6295_device>("oki2"); |
| 1039 | 1039 | |
| 1040 | 1040 | NMK004_state.rom = machine.root_device().memregion("audiocpu")->base(); |
| 1041 | 1041 | |
| 1042 | 1042 | 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); |
| 1044 | 1044 | |
| 1045 | 1045 | i = 0; |
| 1046 | 1046 | while (ym2203_init[i] != 0xff) |
| 1047 | 1047 | { |
| 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++]); |
| 1050 | 1050 | } |
| 1051 | 1051 | |
| 1052 | 1052 | NMK004_state.oki_playing = 0; |