Previous 199869 Revisions Next

r23699 Friday 14th June, 2013 at 09:03:12 UTC by Fabio Priuli
Modernized Konami 056800 sound device. [Osso]
[src/emu/sound]k056800.c k056800.h
[src/mame/drivers]gticlub.c hornet.c nwk-tr.c ultrsprt.c zr107.c

trunk/src/emu/sound/k056800.c
r23698r23699
99#include "emu.h"
1010#include "sound/k056800.h"
1111
12struct k056800_state
12
13const device_type K056800 = &device_creator<k056800_device>;
14
15k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
16            : device_t(mconfig, K056800, "Konami 056800 MIRAC", tag, owner, clock)
1317{
14   UINT8                host_reg[8];
15   UINT8                sound_reg[8];
18}
1619
17   emu_timer            *sound_cpu_timer;
18   UINT8                sound_cpu_irq1_enable;
19   k056800_irq_cb       irq_cb;
20};
20//-------------------------------------------------
21//  device_config_complete - perform any
22//  operations now that the configuration is
23//  complete
24//-------------------------------------------------
2125
22/*****************************************************************************
23    INLINE FUNCTIONS
24*****************************************************************************/
26void k056800_device::device_config_complete()
27{
28   // inherit a copy of the static data
29   const k056800_interface *intf = reinterpret_cast<const k056800_interface *>(static_config());
30   if (intf != NULL)
31      *static_cast<k056800_interface *>(this) = *intf;
2532
26INLINE k056800_state *k056800_get_safe_token( device_t *device )
33   // or initialize to defaults if none provided
34   else
35   {
36      m_irq_cb = NULL;
37   }
38}
39
40//-------------------------------------------------
41//  device_start - device-specific startup
42//-------------------------------------------------
43
44void k056800_device::device_start()
2745{
28   assert(device != NULL);
29   assert(device->type() == K056800);
46   attotime timer_period = attotime::from_hz(clock()) * 14700 * 3;
3047
31   return (k056800_state *)downcast<k056800_device *>(device)->token();
48   m_irq_cb_func = m_irq_cb;
49
50   m_sound_cpu_timer = timer_alloc(TIMER_TICK_SOUND_CPU);
51   m_sound_cpu_timer->adjust(timer_period, 0, timer_period);
52
53   save_item(NAME(m_host_reg));
54   save_item(NAME(m_sound_reg));
55   save_item(NAME(m_sound_cpu_irq1_enable));
3256}
3357
34INLINE const k056800_interface *k056800_get_interface( device_t *device )
58//-------------------------------------------------
59//  device_reset - device-specific reset
60//-------------------------------------------------
61
62void k056800_device::device_reset()
3563{
36   assert(device != NULL);
37   assert((device->type() == K056800));
38   return (const k056800_interface *) device->static_config();
64   memset(m_host_reg, 0, sizeof(m_host_reg));
65   memset(m_sound_reg, 0, sizeof(m_sound_reg));
66
67   m_sound_cpu_irq1_enable = 0;
3968}
4069
70
4171/*****************************************************************************
4272    DEVICE HANDLERS
4373*****************************************************************************/
4474
4575
46static UINT8 k056800_host_reg_r( device_t *device, int reg )
76UINT8 k056800_device::host_reg_r( int reg )
4777{
48   k056800_state *k056800 = k056800_get_safe_token(device);
49   UINT8 value = k056800->host_reg[reg];
78   UINT8 value = m_host_reg[reg];
5079   if (reg == 2)
5180      value &= ~3; // suppress VOLWR busy flags
5281
5382   return value;
5483}
5584
56static void k056800_host_reg_w( device_t *device, int reg, UINT8 data )
85void k056800_device::host_reg_w( int reg, UINT8 data )
5786{
58   k056800_state *k056800 = k056800_get_safe_token(device);
87   m_sound_reg[reg] = data;
5988
60   k056800->sound_reg[reg] = data;
61
6289   if (reg == 7)
63      k056800->irq_cb(device->machine(), 1);
90      m_irq_cb(machine(), 1);
6491}
6592
66static UINT8 k056800_sound_reg_r( device_t *device, int reg )
93UINT8 k056800_device::sound_reg_r( int reg )
6794{
68   k056800_state *k056800 = k056800_get_safe_token(device);
69   return k056800->sound_reg[reg];
95   return m_sound_reg[reg];
7096}
7197
72static void k056800_sound_reg_w( device_t *device, int reg, UINT8 data )
98void k056800_device::sound_reg_w( int reg, UINT8 data )
7399{
74   k056800_state *k056800 = k056800_get_safe_token(device);
75
76100   if (reg == 4)
77      k056800->sound_cpu_irq1_enable = data & 0x01;
101      m_sound_cpu_irq1_enable = data & 0x01;
78102
79   k056800->host_reg[reg] = data;
103   m_host_reg[reg] = data;
80104}
81105
82static TIMER_CALLBACK( k056800_sound_cpu_timer_tick )
106void k056800_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
83107{
84   k056800_state *k056800 = (k056800_state *)ptr;
85
86   if (k056800->sound_cpu_irq1_enable)
87      k056800->irq_cb(machine, 0);
108   switch (id)
109    {
110      case TIMER_TICK_SOUND_CPU:
111         if (m_sound_cpu_irq1_enable)
112            m_irq_cb_func(machine(), 0);
113         break;
114         
115         default:
116         assert_always(FALSE, "Unknown id in k056800_device::device_timer");
117   }
88118}
89119
90READ32_DEVICE_HANDLER( k056800_host_r )
120READ32_MEMBER( k056800_device::host_r )
91121{
92122   UINT32 r = 0;
93123
94124   if (ACCESSING_BITS_24_31)
95      r |= k056800_host_reg_r(device, (offset * 4) + 0) << 24;
125      r |= host_reg_r((offset * 4) + 0) << 24;
96126
97127   if (ACCESSING_BITS_16_23)
98      r |= k056800_host_reg_r(device, (offset * 4) + 1) << 16;
128      r |= host_reg_r((offset * 4) + 1) << 16;
99129
100130   if (ACCESSING_BITS_8_15)
101      r |= k056800_host_reg_r(device, (offset * 4) + 2) << 8;
131      r |= host_reg_r((offset * 4) + 2) << 8;
102132
103133   if (ACCESSING_BITS_0_7)
104      r |= k056800_host_reg_r(device, (offset * 4) + 3) << 0;
134      r |= host_reg_r((offset * 4) + 3) << 0;
105135
106136
107137   return r;
108138}
109139
110WRITE32_DEVICE_HANDLER( k056800_host_w )
140WRITE32_MEMBER( k056800_device::host_w )
111141{
112142   if (ACCESSING_BITS_24_31)
113      k056800_host_reg_w(device, (offset * 4) + 0, (data >> 24) & 0xff);
143      host_reg_w((offset * 4) + 0, (data >> 24) & 0xff);
114144
115145   if (ACCESSING_BITS_16_23)
116      k056800_host_reg_w(device, (offset * 4) + 1, (data >> 16) & 0xff);
146      host_reg_w((offset * 4) + 1, (data >> 16) & 0xff);
117147
118148   if (ACCESSING_BITS_8_15)
119      k056800_host_reg_w(device, (offset * 4) + 2, (data >> 8) & 0xff);
149      host_reg_w((offset * 4) + 2, (data >> 8) & 0xff);
120150
121151   if (ACCESSING_BITS_0_7)
122      k056800_host_reg_w(device, (offset * 4) + 3, (data >> 0) & 0xff);
152      host_reg_w((offset * 4) + 3, (data >> 0) & 0xff);
123153
124154}
125155
126READ16_DEVICE_HANDLER( k056800_sound_r )
156READ16_MEMBER( k056800_device::sound_r )
127157{
128   return k056800_sound_reg_r(device, offset);
158   return sound_reg_r(offset);
129159}
130160
131WRITE16_DEVICE_HANDLER( k056800_sound_w )
161WRITE16_MEMBER( k056800_device::sound_w )
132162{
133   k056800_sound_reg_w(device, offset, data);
163   sound_reg_w(offset, data);
134164}
135
136/*****************************************************************************
137    DEVICE INTERFACE
138*****************************************************************************/
139
140static DEVICE_START( k056800 )
141{
142   k056800_state *k056800 = k056800_get_safe_token(device);
143   const k056800_interface *intf = k056800_get_interface(device);
144   attotime timer_period = attotime::from_hz(device->clock()) * 14700 * 3;
145
146   k056800->irq_cb = intf->irq_cb;
147
148   k056800->sound_cpu_timer = device->machine().scheduler().timer_alloc(FUNC(k056800_sound_cpu_timer_tick), k056800);
149   k056800->sound_cpu_timer->adjust(timer_period, 0, timer_period);
150
151   device->save_item(NAME(k056800->host_reg));
152   device->save_item(NAME(k056800->sound_reg));
153   device->save_item(NAME(k056800->sound_cpu_irq1_enable));
154}
155
156static DEVICE_RESET( k056800 )
157{
158   k056800_state *k056800 = k056800_get_safe_token(device);
159
160   memset(k056800->host_reg, 0, sizeof(k056800->host_reg));
161   memset(k056800->sound_reg, 0, sizeof(k056800->sound_reg));
162
163   k056800->sound_cpu_irq1_enable = 0;
164}
165
166const device_type K056800 = &device_creator<k056800_device>;
167
168k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
169   : device_t(mconfig, K056800, "Konami 056800 MIRAC", tag, owner, clock)
170{
171   m_token = global_alloc_clear(k056800_state);
172}
173
174//-------------------------------------------------
175//  device_config_complete - perform any
176//  operations now that the configuration is
177//  complete
178//-------------------------------------------------
179
180void k056800_device::device_config_complete()
181{
182}
183
184//-------------------------------------------------
185//  device_start - device-specific startup
186//-------------------------------------------------
187
188void k056800_device::device_start()
189{
190   DEVICE_START_NAME( k056800 )(this);
191}
192
193//-------------------------------------------------
194//  device_reset - device-specific reset
195//-------------------------------------------------
196
197void k056800_device::device_reset()
198{
199   DEVICE_RESET_NAME( k056800 )(this);
200}
trunk/src/emu/sound/k056800.h
r23698r23699
77#ifndef __K056800_H__
88#define __K056800_H__
99
10#include "devlegcy.h"
1110
12
1311/***************************************************************************
1412    TYPE DEFINITIONS
1513***************************************************************************/
r23698r23699
1917
2018struct k056800_interface
2119{
22   k056800_irq_cb       irq_cb;
20   k056800_irq_cb       m_irq_cb;
2321};
2422
25class k056800_device : public device_t
23class k056800_device : public device_t,
24                  public k056800_interface
2625{
2726public:
2827   k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
29   ~k056800_device() { global_free(m_token); }
28   ~k056800_device() {}
3029
31   // access to legacy token
32   void *token() const { assert(m_token != NULL); return m_token; }
30   enum
31   {
32      TIMER_TICK_SOUND_CPU
33   };
34   
35   DECLARE_READ32_MEMBER( host_r );
36   DECLARE_WRITE32_MEMBER( host_w );
37   DECLARE_READ16_MEMBER( sound_r );
38   DECLARE_WRITE16_MEMBER( sound_w );
39
3340protected:
3441   // device-level overrides
3542   virtual void device_config_complete();
3643   virtual void device_start();
3744   virtual void device_reset();
45   
46   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
47
3848private:
3949   // internal state
40   void *m_token;
50   UINT8                m_host_reg[8];
51   UINT8                m_sound_reg[8];
52   emu_timer            *m_sound_cpu_timer;
53   UINT8                m_sound_cpu_irq1_enable;
54   k056800_irq_cb       m_irq_cb_func;   
55   
56   UINT8 host_reg_r( int reg );
57   void host_reg_w( int reg, UINT8 data );
58   UINT8 sound_reg_r( int reg );
59   void sound_reg_w( int reg, UINT8 data );
60   
4161};
4262
4363extern const device_type K056800;
r23698r23699
5373   MCFG_DEVICE_CONFIG(_interface)
5474
5575
56/***************************************************************************
57    DEVICE I/O FUNCTIONS
58***************************************************************************/
59
60DECLARE_READ32_DEVICE_HANDLER( k056800_host_r );
61DECLARE_WRITE32_DEVICE_HANDLER( k056800_host_w );
62DECLARE_READ16_DEVICE_HANDLER( k056800_sound_r );
63DECLARE_WRITE16_DEVICE_HANDLER( k056800_sound_w );
64
65
6676#endif /* __K056800_H__ */
trunk/src/mame/drivers/nwk-tr.c
r23698r23699
235235      m_maincpu(*this, "maincpu"),
236236      m_audiocpu(*this, "audiocpu"),
237237      m_dsp(*this, "dsp"),
238      m_k056800(*this, "k056800"),
238239      m_k001604(*this, "k001604"),
239240      m_adc12138(*this, "adc12138") { }
240241
r23698r23699
244245   required_device<cpu_device> m_maincpu;
245246   required_device<cpu_device> m_audiocpu;
246247   required_device<cpu_device> m_dsp;
248   required_device<k056800_device> m_k056800;
247249   required_device<k001604_device> m_k001604;
248250   required_device<adc12138_device> m_adc12138;
249251   emu_timer *m_sound_irq_timer;
r23698r23699
546548   AM_RANGE(0x7d000000, 0x7d00ffff) AM_READ(sysreg_r)
547549   AM_RANGE(0x7d010000, 0x7d01ffff) AM_WRITE(sysreg_w)
548550   AM_RANGE(0x7d020000, 0x7d021fff) AM_DEVREADWRITE8("m48t58", timekeeper_device, read, write, 0xffffffff)  /* M48T58Y RTC/NVRAM */
549   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVREAD_LEGACY("k056800", k056800_host_r)
550   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
551   AM_RANGE(0x7d030008, 0x7d03000f) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
551   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVREAD("k056800", k056800_device, host_r)
552   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVWRITE("k056800", k056800_device, host_w)
553   AM_RANGE(0x7d030008, 0x7d03000f) AM_DEVWRITE("k056800", k056800_device, host_w)
552554   AM_RANGE(0x7d040000, 0x7d04ffff) AM_READWRITE(lanc1_r, lanc1_w)
553555   AM_RANGE(0x7d050000, 0x7d05ffff) AM_READWRITE(lanc2_r, lanc2_w)
554556   AM_RANGE(0x7e000000, 0x7e7fffff) AM_ROM AM_REGION("user2", 0)   /* Data ROM */
r23698r23699
562564   AM_RANGE(0x000000, 0x07ffff) AM_ROM
563565   AM_RANGE(0x100000, 0x10ffff) AM_RAM     /* Work RAM */
564566   AM_RANGE(0x200000, 0x200fff) AM_DEVREADWRITE("rfsnd", rf5c400_device, rf5c400_r, rf5c400_w)      /* Ricoh RF5C400 */
565   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("k056800", k056800_sound_r, k056800_sound_w)
567   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("k056800", k056800_device, sound_r, sound_w)
566568   AM_RANGE(0x600000, 0x600001) AM_NOP
567569ADDRESS_MAP_END
568570
trunk/src/mame/drivers/zr107.c
r23698r23699
192192      m_audiocpu(*this, "audiocpu"),
193193      m_dsp(*this, "dsp"),
194194      m_k001604(*this, "k001604"),
195      m_k056800(*this, "k056800"),
195196      m_k056832(*this, "k056832") { }
196197
197198   UINT8 m_led_reg0;
r23698r23699
223224   required_device<cpu_device> m_audiocpu;
224225   required_device<cpu_device> m_dsp;
225226   optional_device<k001604_device> m_k001604;
227   required_device<k056800_device> m_k056800;
226228   optional_device<k056832_device> m_k056832;
227229
228230protected:
r23698r23699
447449   AM_RANGE(0x7e000000, 0x7e003fff) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff)
448450   AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff)               /* LANC registers */
449451   AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w)      /* LANC Buffer RAM (27E) */
450   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
451   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD_LEGACY("k056800", k056800_host_r)
452   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE("k056800", k056800_device, host_w)
453   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD("k056800", k056800_device, host_r)
452454   AM_RANGE(0x7f800000, 0x7f9fffff) AM_ROM AM_SHARE("share2")
453455   AM_RANGE(0x7fe00000, 0x7fffffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("share2")    /* Program ROM */
454456ADDRESS_MAP_END
r23698r23699
475477   AM_RANGE(0x7e000000, 0x7e003fff) AM_MIRROR(0x80000000) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff)
476478   AM_RANGE(0x7e008000, 0x7e009fff) AM_MIRROR(0x80000000) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff)             /* LANC registers */
477479   AM_RANGE(0x7e00a000, 0x7e00bfff) AM_MIRROR(0x80000000) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w)    /* LANC Buffer RAM (27E) */
478   AM_RANGE(0x7e00c000, 0x7e00c007) AM_MIRROR(0x80000000) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
479   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_MIRROR(0x80000000) AM_DEVREAD_LEGACY("k056800", k056800_host_r)
480   AM_RANGE(0x7e00c000, 0x7e00c007) AM_MIRROR(0x80000000) AM_DEVWRITE("k056800", k056800_device, host_w)
481   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_MIRROR(0x80000000) AM_DEVREAD("k056800", k056800_device, host_r)
480482   AM_RANGE(0x7f000000, 0x7f3fffff) AM_MIRROR(0x80000000) AM_ROM AM_REGION("user2", 0)
481483   AM_RANGE(0x7f800000, 0x7f9fffff) AM_MIRROR(0x80000000) AM_ROM AM_SHARE("share2")
482484   AM_RANGE(0x7fe00000, 0x7fffffff) AM_MIRROR(0x80000000) AM_ROM AM_REGION("user1", 0) AM_SHARE("share2")  /* Program ROM */
r23698r23699
491493   AM_RANGE(0x100000, 0x103fff) AM_RAM     /* Work RAM */
492494   AM_RANGE(0x200000, 0x2004ff) AM_DEVREADWRITE8("k054539_1", k054539_device, read, write, 0xff00)
493495   AM_RANGE(0x200000, 0x2004ff) AM_DEVREADWRITE8("k054539_2", k054539_device, read, write, 0x00ff)
494   AM_RANGE(0x400000, 0x40000f) AM_DEVWRITE_LEGACY("k056800", k056800_sound_w)
495   AM_RANGE(0x400010, 0x40001f) AM_DEVREAD_LEGACY("k056800", k056800_sound_r)
496   AM_RANGE(0x400000, 0x40000f) AM_DEVWRITE("k056800", k056800_device, sound_w)
497   AM_RANGE(0x400010, 0x40001f) AM_DEVREAD("k056800", k056800_device, sound_r)
496498   AM_RANGE(0x580000, 0x580001) AM_WRITENOP
497499ADDRESS_MAP_END
498500
trunk/src/mame/drivers/hornet.c
r23698r23699
334334      m_sharc_dataram1(*this, "sharc_dataram1"),
335335      m_maincpu(*this, "maincpu"),
336336      m_audiocpu(*this, "audiocpu"),
337      m_k056800(*this, "k056800"),
337338      m_gn680(*this, "gn680"),
338339      m_dsp(*this, "dsp"),
339340      m_dsp2(*this, "dsp2"),
r23698r23699
349350   optional_shared_ptr<UINT32> m_sharc_dataram1;
350351   required_device<cpu_device> m_maincpu;
351352   required_device<cpu_device> m_audiocpu;
353   required_device<k056800_device> m_k056800;
352354   optional_device<cpu_device> m_gn680;
353355   required_device<cpu_device> m_dsp;
354356   optional_device<cpu_device> m_dsp2;
r23698r23699
657659   AM_RANGE(0x7d000000, 0x7d00ffff) AM_READ8(sysreg_r, 0xffffffff)
658660   AM_RANGE(0x7d010000, 0x7d01ffff) AM_WRITE8(sysreg_w, 0xffffffff)
659661   AM_RANGE(0x7d020000, 0x7d021fff) AM_DEVREADWRITE8("m48t58", timekeeper_device, read, write, 0xffffffff)  /* M48T58Y RTC/NVRAM */
660   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVREADWRITE_LEGACY("k056800", k056800_host_r, k056800_host_w)
662   AM_RANGE(0x7d030000, 0x7d030007) AM_DEVREADWRITE("k056800", k056800_device, host_r, host_w)
661663   AM_RANGE(0x7d042000, 0x7d043fff) AM_RAM             /* COMM BOARD 0 */
662664   AM_RANGE(0x7d044000, 0x7d044007) AM_READ(comm0_unk_r)
663665   AM_RANGE(0x7d048000, 0x7d048003) AM_WRITE(comm1_w)
r23698r23699
674676   AM_RANGE(0x000000, 0x07ffff) AM_ROM
675677   AM_RANGE(0x100000, 0x10ffff) AM_RAM     /* Work RAM */
676678   AM_RANGE(0x200000, 0x200fff) AM_DEVREADWRITE("rfsnd", rf5c400_device, rf5c400_r, rf5c400_w)      /* Ricoh RF5C400 */
677   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("k056800", k056800_sound_r, k056800_sound_w)
679   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("k056800", k056800_device, sound_r, sound_w)
678680   AM_RANGE(0x480000, 0x480001) AM_WRITENOP
679681   AM_RANGE(0x4c0000, 0x4c0001) AM_WRITENOP
680682   AM_RANGE(0x500000, 0x500001) AM_WRITENOP
trunk/src/mame/drivers/ultrsprt.c
r23698r23699
125125   AM_RANGE(0x70000000, 0x70000003) AM_READWRITE(eeprom_r, eeprom_w)
126126   AM_RANGE(0x70000020, 0x70000023) AM_READ_PORT("P1")
127127   AM_RANGE(0x70000040, 0x70000043) AM_READ_PORT("P2")
128   AM_RANGE(0x70000080, 0x70000087) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
129   AM_RANGE(0x70000088, 0x7000008f) AM_DEVREAD_LEGACY("k056800", k056800_host_r)
128   AM_RANGE(0x70000080, 0x70000087) AM_DEVWRITE("k056800", k056800_device, host_w)
129   AM_RANGE(0x70000088, 0x7000008f) AM_DEVREAD("k056800", k056800_device, host_r)
130130   AM_RANGE(0x700000e0, 0x700000e3) AM_WRITE(int_ack_w)
131131   AM_RANGE(0x7f000000, 0x7f01ffff) AM_RAM AM_SHARE("workram")
132132   AM_RANGE(0x7f700000, 0x7f703fff) AM_RAM_WRITE(palette_w) AM_SHARE("paletteram")
r23698r23699
142142   UINT16 r = 0;
143143
144144   if (ACCESSING_BITS_8_15)
145      r |= k056800_sound_r(m_k056800, space, (offset*2)+0, 0xffff) << 8;
145      r |= m_k056800->sound_r(space, (offset*2)+0, 0xffff) << 8;
146146
147147   if (ACCESSING_BITS_0_7)
148      r |= k056800_sound_r(m_k056800, space, (offset*2)+1, 0xffff) << 0;
148      r |= m_k056800->sound_r(space, (offset*2)+1, 0xffff) << 0;
149149
150150   return r;
151151}
r23698r23699
153153WRITE16_MEMBER(ultrsprt_state::K056800_68k_w)
154154{
155155   if (ACCESSING_BITS_8_15)
156      k056800_sound_w(m_k056800, space, (offset*2)+0, (data >> 8) & 0xff, 0x00ff);
156      m_k056800->sound_w(space, (offset*2)+0, (data >> 8) & 0xff, 0x00ff);
157157
158158   if (ACCESSING_BITS_0_7)
159      k056800_sound_w(m_k056800, space, (offset*2)+1, (data >> 0) & 0xff, 0x00ff);
159      m_k056800->sound_w(space, (offset*2)+1, (data >> 0) & 0xff, 0x00ff);
160160}
161161
162162static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 16, ultrsprt_state )
trunk/src/mame/drivers/gticlub.c
r23698r23699
248248      m_work_ram(*this, "work_ram"),
249249      m_maincpu(*this, "maincpu"),
250250      m_audiocpu(*this, "audiocpu"),
251      m_k056800(*this, "k056800"),
251252      m_dsp(*this, "dsp"),
252253      m_dsp2(*this, "dsp2"),
253254      m_adc1038(*this, "adc1038"),
r23698r23699
256257   required_shared_ptr<UINT32> m_work_ram;
257258   required_device<cpu_device> m_maincpu;
258259   required_device<cpu_device> m_audiocpu;
260   required_device<k056800_device> m_k056800;
259261   required_device<cpu_device> m_dsp;
260262   optional_device<cpu_device> m_dsp2;
261263   required_device<adc1038_device> m_adc1038;
r23698r23699
449451   AM_RANGE(0x7e000000, 0x7e003fff) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff)
450452   AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff)
451453   AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w)
452   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE_LEGACY("k056800", k056800_host_w)
453   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVREAD_LEGACY("k056800", k056800_host_r)       // Hang Pilot
454   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD_LEGACY("k056800", k056800_host_r)
454   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE("k056800", k056800_device, host_w)
455   AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVREAD("k056800", k056800_device, host_r)       // Hang Pilot
456   AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD("k056800", k056800_device, host_r)
455457   AM_RANGE(0x7f000000, 0x7f3fffff) AM_ROM AM_REGION("user2", 0)   /* Data ROM */
456458   AM_RANGE(0x7f800000, 0x7f9fffff) AM_ROM AM_SHARE("share2")
457459   AM_RANGE(0x7fe00000, 0x7fffffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("share2")    /* Program ROM */
r23698r23699
462464static ADDRESS_MAP_START( sound_memmap, AS_PROGRAM, 16, gticlub_state )
463465   AM_RANGE(0x000000, 0x07ffff) AM_ROM
464466   AM_RANGE(0x200000, 0x20ffff) AM_RAM
465   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("k056800", k056800_sound_r, k056800_sound_w)
467   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("k056800", k056800_device, sound_r, sound_w)
466468   AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rfsnd", rf5c400_device, rf5c400_r, rf5c400_w)      /* Ricoh RF5C400 */
467469   AM_RANGE(0x580000, 0x580001) AM_WRITENOP
468470   AM_RANGE(0x600000, 0x600001) AM_WRITENOP

Previous 199869 Revisions Next


© 1997-2024 The MAME Team