trunk/src/mame/audio/qix.c
r17625 | r17626 | |
234 | 234 | }; |
235 | 235 | |
236 | 236 | |
| 237 | //------------------------------------------------- |
| 238 | // sn76496_config psg_intf |
| 239 | //------------------------------------------------- |
237 | 240 | |
| 241 | static const sn76496_config psg_intf = |
| 242 | { |
| 243 | DEVCB_NULL |
| 244 | }; |
| 245 | |
| 246 | |
238 | 247 | /************************************* |
239 | 248 | * |
240 | 249 | * Machine drivers |
r17625 | r17626 | |
263 | 272 | |
264 | 273 | MCFG_SPEAKER_STANDARD_MONO("mono") |
265 | 274 | |
266 | | MCFG_SOUND_ADD("sn1", SN76489, SLITHER_CLOCK_OSC/4/4) |
| 275 | MCFG_SOUND_ADD("sn1", SN76489_NEW, SLITHER_CLOCK_OSC/4/4) |
267 | 276 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 277 | MCFG_SOUND_CONFIG(psg_intf) |
268 | 278 | |
269 | | MCFG_SOUND_ADD("sn2", SN76489, SLITHER_CLOCK_OSC/4/4) |
| 279 | MCFG_SOUND_ADD("sn2", SN76489_NEW, SLITHER_CLOCK_OSC/4/4) |
270 | 280 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 281 | MCFG_SOUND_CONFIG(psg_intf) |
271 | 282 | MACHINE_CONFIG_END |
trunk/src/mame/machine/qix.c
r17625 | r17626 | |
10 | 10 | #include "cpu/m6800/m6800.h" |
11 | 11 | #include "cpu/m6805/m6805.h" |
12 | 12 | #include "cpu/m6809/m6809.h" |
13 | | #include "sound/sn76496.h" |
14 | 13 | #include "includes/qix.h" |
15 | 14 | |
16 | 15 | |
17 | 16 | |
| 17 | |
| 18 | |
18 | 19 | /************************************* |
19 | 20 | * |
20 | 21 | * Static function prototypes |
r17625 | r17626 | |
499 | 500 | * |
500 | 501 | *************************************/ |
501 | 502 | |
502 | | static WRITE8_DEVICE_HANDLER( slither_76489_0_w ) |
| 503 | static WRITE8_DEVICE_HANDLER( slither_76489_0_w ) |
503 | 504 | { |
| 505 | qix_state *state = device->machine().driver_data<qix_state>(); |
| 506 | |
504 | 507 | /* write to the sound chip */ |
505 | | sn76496_w(device->machine().device("sn1"), 0, data); |
| 508 | state->m_sn1->write(*device->machine().device<legacy_cpu_device>("maincpu")->space(), 0, data); |
506 | 509 | |
507 | 510 | /* clock the ready line going back into CB1 */ |
508 | 511 | pia6821_device *pia = downcast<pia6821_device *>(device); |
r17625 | r17626 | |
513 | 516 | |
514 | 517 | static WRITE8_DEVICE_HANDLER( slither_76489_1_w ) |
515 | 518 | { |
| 519 | qix_state *state = device->machine().driver_data<qix_state>(); |
| 520 | |
516 | 521 | /* write to the sound chip */ |
517 | | sn76496_w(device->machine().device("sn2"), 0, data); |
| 522 | state->m_sn2->write(*device->machine().device<legacy_cpu_device>("maincpu")->space(), 0, data); |
518 | 523 | |
519 | 524 | /* clock the ready line going back into CB1 */ |
520 | 525 | pia6821_device *pia = downcast<pia6821_device *>(device); |
trunk/src/mame/includes/qix.h
r17625 | r17626 | |
8 | 8 | |
9 | 9 | #include "video/mc6845.h" |
10 | 10 | #include "machine/6821pia.h" |
| 11 | #include "sound/sn76496.h" |
11 | 12 | |
12 | 13 | |
13 | 14 | #define MAIN_CLOCK_OSC 20000000 /* 20 MHz */ |
r17625 | r17626 | |
24 | 25 | public: |
25 | 26 | qix_state(const machine_config &mconfig, device_type type, const char *tag) |
26 | 27 | : driver_device(mconfig, type, tag) , |
| 28 | m_sn1 (*this, "sn1"), |
| 29 | m_sn2 (*this, "sn2"), |
27 | 30 | m_68705_port_out(*this, "68705_port_out"), |
28 | 31 | m_68705_ddr(*this, "68705_ddr"), |
29 | 32 | m_videoram(*this, "videoram"), |
r17625 | r17626 | |
32 | 35 | m_paletteram(*this, "paletteram"), |
33 | 36 | m_scanline_latch(*this, "scanline_latch") { } |
34 | 37 | |
| 38 | /* devices */ |
| 39 | optional_device<sn76489_new_device> m_sn1; |
| 40 | optional_device<sn76489_new_device> m_sn2; |
| 41 | |
35 | 42 | /* machine state */ |
36 | 43 | optional_shared_ptr<UINT8> m_68705_port_out; |
37 | 44 | optional_shared_ptr<UINT8> m_68705_ddr; |
r17625 | r17626 | |
87 | 94 | extern const pia6821_interface slither_pia_1_intf; |
88 | 95 | extern const pia6821_interface slither_pia_2_intf; |
89 | 96 | |
| 97 | |
90 | 98 | MACHINE_START( qixmcu ); |
91 | 99 | MACHINE_RESET( qix ); |
92 | 100 | |