Previous 199869 Revisions Next

r26379 Saturday 23rd November, 2013 at 14:48:39 UTC by Osso
Updated taito_en to use the n68681 device. (nw)
[src/mame/audio]taito_en.c taito_en.h

trunk/src/mame/audio/taito_en.c
r26378r26379
99****************************************************************************/
1010
1111#include "emu.h"
12#include "machine/68681.h"
1312#include "machine/mb87078.h"
14#include "sound/es5506.h"
1513#include "taito_en.h"
1614
1715
r26378r26379
5250   save_item(NAME(m_es5510_dadr_latch));
5351   save_item(NAME(m_es5510_gpr_latch));
5452   save_item(NAME(m_es5510_ram_sel));
53   
54   m_duart68681 = machine().device<duartn68681_device>("duart68681");
5555}
5656
5757//-------------------------------------------------
r26378r26379
252252   AM_RANGE(0x140000, 0x140fff) AM_DEVREADWRITE("taito_en", taito_en_device, en_68000_share_r, en_68000_share_w)
253253   AM_RANGE(0x200000, 0x20001f) AM_DEVREADWRITE("ensoniq", es5505_device, read, write)
254254   AM_RANGE(0x260000, 0x2601ff) AM_DEVREADWRITE("taito_en", taito_en_device, es5510_dsp_r, es5510_dsp_w) //todo: hook up cpu/es5510
255   AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8_LEGACY("duart68681", duart68681_r, duart68681_w, 0x00ff)
255   AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8("duart68681", duartn68681_device, read, write, 0x00ff)
256256   AM_RANGE(0x300000, 0x30003f) AM_DEVWRITE("taito_en", taito_en_device, en_es5505_bank_w)
257257   AM_RANGE(0x340000, 0x340003) AM_DEVWRITE("taito_en", taito_en_device, en_volume_w)
258258   AM_RANGE(0xc00000, 0xc1ffff) AM_ROMBANK("bank1")
r26378r26379
285285 *************************************/
286286
287287
288static void taito_en_duart_irq_handler(device_t *device, int state, UINT8 vector)
288WRITE_LINE_MEMBER(taito_en_device::duart_irq_handler)
289289{
290290   if (state == ASSERT_LINE)
291291   {
292      device->machine().device("audiocpu")->execute().set_input_line_vector(M68K_IRQ_6, vector);
293      device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, ASSERT_LINE);
292      machine().device("audiocpu")->execute().set_input_line_vector(M68K_IRQ_6, m_duart68681->get_irq_vector());
293      machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, ASSERT_LINE);
294294   }
295295   else
296296   {
297      device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
297      machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
298298   }
299299}
300300
r26378r26379
316316    IP4: 0.5MHz
317317    IP5: 1MHz
318318*/
319static const duart68681_config taito_en_duart68681_config =
319static const duartn68681_config taito_en_duart68681_config =
320320{
321   taito_en_duart_irq_handler,
322   NULL,               /* tx callback */
323   NULL,               /* input port read */
324   NULL,               /* output port write */
321   DEVCB_DEVICE_LINE_MEMBER("taito_en", taito_en_device, duart_irq_handler),
322   DEVCB_NULL,               /* tx_a callback */
323   DEVCB_NULL,               /* tx_b callback */
324   DEVCB_NULL,               /* input port read */
325   DEVCB_NULL,               /* output port write */
325326   XTAL_16MHz/2/8,     /* IP2/RxCB clock */
326327   XTAL_16MHz/2/16,    /* IP3/TxCA clock */
327328   XTAL_16MHz/2/16,    /* IP4/RxCA clock */
r26378r26379
353354   MCFG_CPU_ADD("audiocpu", M68000, XTAL_30_4761MHz / 2)
354355   MCFG_CPU_PROGRAM_MAP(en_sound_map)
355356
356   MCFG_DUART68681_ADD("duart68681", XTAL_16MHz / 4, taito_en_duart68681_config)
357   MCFG_DUARTN68681_ADD("duart68681", XTAL_16MHz / 4, taito_en_duart68681_config)
357358   MCFG_MB87078_ADD("mb87078", taito_en_mb87078_intf)
358359
359360   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
trunk/src/mame/audio/taito_en.h
r26378r26379
11#include "cpu/m68000/m68000.h"
22#include "sound/es5506.h"
3#include "machine/n68681.h"
34
45class taito_en_device : public device_t
56
r26378r26379
1617   //todo: hook up cpu/es5510
1718   DECLARE_READ16_MEMBER( es5510_dsp_r );
1819   DECLARE_WRITE16_MEMBER( es5510_dsp_w );
20   
21   DECLARE_WRITE_LINE_MEMBER(duart_irq_handler);
1922
2023protected:
2124   // device-level overrides
r26378r26379
3740   UINT8    m_es5510_ram_sel;
3841
3942   UINT32   *m_snd_shared_ram;
43   
44   duartn68681_device *m_duart68681;
4045
4146};
4247

Previous 199869 Revisions Next


© 1997-2024 The MAME Team