Previous 199869 Revisions Next

r31706 Tuesday 19th August, 2014 at 15:21:31 UTC by Osso
Fixed razmataz save state sound problem (nw)
[src/mame/audio]segasnd.c segasnd.h

trunk/src/mame/audio/segasnd.c
r31705r31706
250250      m_in_latch(0),
251251      m_out_latch(0),
252252      m_last_p2_value(0),
253      m_program_ram(NULL),
254      m_work_ram(NULL),
253      m_program_ram(*this, "pgmram"),
254      m_work_ram(*this, "workram"),
255255      m_work_ram_bank(0),
256256      m_t1_clock(0),
257257      m_t1_clock_mask(0),
r31705r31706
264264usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
265265   : device_t(mconfig, SEGAUSB, "Sega Universal Sound Board", tag, owner, clock, "segausb", __FILE__),
266266      device_sound_interface(mconfig, *this),
267      m_ourcpu(*this, "ourcpu")
267      m_ourcpu(*this, "ourcpu"),
268      m_program_ram(*this, "pgmram"),
269      m_work_ram(*this, "workram")
268270{
269271}
270272
271273//-------------------------------------------------
272//  device_config_complete - perform any
273//  operations now that the configuration is
274//  complete
275//-------------------------------------------------
276
277void usb_sound_device::device_config_complete()
278{
279}
280
281//-------------------------------------------------
282274//  device_start - device-specific startup
283275//-------------------------------------------------
284276
r31705r31706
291283   m_maincpu = machine().device("maincpu");
292284   assert(m_maincpu != NULL);
293285
294   /* allocate RAM */
295   m_program_ram = (UINT8 *)memshare("pgmram")->ptr();
296   m_work_ram = auto_alloc_array(machine(), UINT8, 0x400);
297
298286   /* create a sound stream */
299287   m_stream = machine().sound().stream_alloc(*this, 0, 1, SAMPLE_RATE);
300288
r31705r31706
866854ADDRESS_MAP_END
867855
868856static ADDRESS_MAP_START( usb_portmap, AS_IO, 8, usb_sound_device )
869   AM_RANGE(0x00, 0xff) AM_READWRITE(workram_r, workram_w)
857   AM_RANGE(0x00, 0xff) AM_READWRITE(workram_r, workram_w) AM_SHARE("workram")
870858   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w)
871859   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w)
872860   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r)
trunk/src/mame/audio/segasnd.h
r31705r31706
138138protected:
139139   // device-level overrides
140140   virtual machine_config_constructor device_mconfig_additions() const;
141   virtual void device_config_complete();
142141   virtual void device_start();
143142   virtual void device_reset();
144143
r31705r31706
152151   UINT8               m_in_latch;             /* input latch */
153152   UINT8               m_out_latch;            /* output latch */
154153   UINT8               m_last_p2_value;        /* current P2 output value */
155   UINT8 *             m_program_ram;          /* pointer to program RAM */
156   UINT8 *             m_work_ram;             /* pointer to work RAM */
154   optional_shared_ptr<UINT8> m_program_ram;          /* pointer to program RAM */
155   required_shared_ptr<UINT8> m_work_ram;             /* pointer to work RAM */
157156   UINT8               m_work_ram_bank;        /* currently selected work RAM bank */
158157   UINT8               m_t1_clock;             /* T1 clock value */
159158   UINT8               m_t1_clock_mask;        /* T1 clock mask (configured via jumpers) */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team