Previous 199869 Revisions Next

r17626 Monday 3rd September, 2012 at 23:18:51 UTC by Tafoid
Continuing new device implementation for SN76496 and clones - qix.c  [Osso]
[src/mame/audio]qix.c
[src/mame/includes]qix.h
[src/mame/machine]qix.c

trunk/src/mame/audio/qix.c
r17625r17626
234234};
235235
236236
237//-------------------------------------------------
238//  sn76496_config psg_intf
239//-------------------------------------------------
237240
241static const sn76496_config psg_intf =
242{
243    DEVCB_NULL
244};
245
246
238247/*************************************
239248 *
240249 *  Machine drivers
r17625r17626
263272
264273   MCFG_SPEAKER_STANDARD_MONO("mono")
265274
266   MCFG_SOUND_ADD("sn1", SN76489, SLITHER_CLOCK_OSC/4/4)
275   MCFG_SOUND_ADD("sn1", SN76489_NEW, SLITHER_CLOCK_OSC/4/4)
267276   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
277   MCFG_SOUND_CONFIG(psg_intf)
268278
269   MCFG_SOUND_ADD("sn2", SN76489, SLITHER_CLOCK_OSC/4/4)
279   MCFG_SOUND_ADD("sn2", SN76489_NEW, SLITHER_CLOCK_OSC/4/4)
270280   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
281   MCFG_SOUND_CONFIG(psg_intf)
271282MACHINE_CONFIG_END
trunk/src/mame/machine/qix.c
r17625r17626
1010#include "cpu/m6800/m6800.h"
1111#include "cpu/m6805/m6805.h"
1212#include "cpu/m6809/m6809.h"
13#include "sound/sn76496.h"
1413#include "includes/qix.h"
1514
1615
1716
17   
18   
1819/*************************************
1920 *
2021 *  Static function prototypes
r17625r17626
499500 *
500501 *************************************/
501502
502static WRITE8_DEVICE_HANDLER( slither_76489_0_w )
503 static WRITE8_DEVICE_HANDLER( slither_76489_0_w )
503504{
505   qix_state *state = device->machine().driver_data<qix_state>();
506   
504507   /* 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);
506509
507510   /* clock the ready line going back into CB1 */
508511   pia6821_device *pia = downcast<pia6821_device *>(device);
r17625r17626
513516
514517static WRITE8_DEVICE_HANDLER( slither_76489_1_w )
515518{
519   qix_state *state = device->machine().driver_data<qix_state>();
520   
516521   /* 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);
518523
519524   /* clock the ready line going back into CB1 */
520525   pia6821_device *pia = downcast<pia6821_device *>(device);
trunk/src/mame/includes/qix.h
r17625r17626
88
99#include "video/mc6845.h"
1010#include "machine/6821pia.h"
11#include "sound/sn76496.h"
1112
1213
1314#define MAIN_CLOCK_OSC         20000000   /* 20 MHz */
r17625r17626
2425public:
2526   qix_state(const machine_config &mconfig, device_type type, const char *tag)
2627      : driver_device(mconfig, type, tag) ,
28      m_sn1 (*this, "sn1"),
29      m_sn2 (*this, "sn2"),
2730      m_68705_port_out(*this, "68705_port_out"),
2831      m_68705_ddr(*this, "68705_ddr"),
2932      m_videoram(*this, "videoram"),
r17625r17626
3235      m_paletteram(*this, "paletteram"),
3336      m_scanline_latch(*this, "scanline_latch") { }
3437
38   /* devices */
39   optional_device<sn76489_new_device> m_sn1;
40   optional_device<sn76489_new_device> m_sn2;
41   
3542   /* machine state */
3643   optional_shared_ptr<UINT8> m_68705_port_out;
3744   optional_shared_ptr<UINT8> m_68705_ddr;
r17625r17626
8794extern const pia6821_interface slither_pia_1_intf;
8895extern const pia6821_interface slither_pia_2_intf;
8996
97
9098MACHINE_START( qixmcu );
9199MACHINE_RESET( qix );
92100

Previous 199869 Revisions Next


© 1997-2024 The MAME Team