Previous 199869 Revisions Next

r36958 Sunday 5th April, 2015 at 18:45:14 UTC by Angelo Salese
Added keyin, because yes.
[src/emu/sound]l7a1045_l6028_dsp_a.c l7a1045_l6028_dsp_a.h
[src/mame/audio]hng64.c
[src/mame/includes]hng64.h

trunk/src/emu/sound/l7a1045_l6028_dsp_a.c
r245469r245470
172172
173173   if(offset == 0)
174174      sound_select_w(space, offset, data, mem_mask);
175   else if(offset == 8/2)
176      sound_status_w(space, offset, data, mem_mask);
175177   else
176178      sound_data_w(space,offset - 1,data,mem_mask);
177179}
r245469r245470
225227
226228   m_audiodat[m_audioregister][m_audiochannel].dat[offset] = data;
227229
228   if(offset == 0)
230   switch (m_audioregister)
229231   {
232      case 0x00:
233         l7a1045_voice *vptr = &m_voice[m_audiochannel];
230234
231   switch (m_audioregister)
235         vptr->start = (m_audiodat[0][m_audiochannel].dat[2] & 0x000f) << (16 + 4);
236         vptr->start |= (m_audiodat[0][m_audiochannel].dat[1] & 0xffff) << (4);
237         vptr->start |= (m_audiodat[0][m_audiochannel].dat[0] & 0xf000) >> (12);
238
239         vptr->start &= m_rom_size - 1;
240
241         //printf("%08x: REGISTER 00 write port 0x0002 chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
242         break;
243   }
244}
245
246WRITE16_MEMBER(l7a1045_sound_device::sound_status_w)
247{
248   if(data & 0x100) // keyin
232249   {
233   case 0x00:
234      // hack
235250      l7a1045_voice *vptr = &m_voice[m_audiochannel];
236251
237      m_key |= 1 << m_audiochannel;
238
239252      vptr->frac = 0;
240253      vptr->pos = 0;
241
242      vptr->start = (m_audiodat[0][m_audiochannel].dat[2] & 0x000f) << (16 + 4);
243      vptr->start |= (m_audiodat[0][m_audiochannel].dat[1] & 0xffff) << (4);
244      vptr->start |= (m_audiodat[0][m_audiochannel].dat[0] & 0xf000) >> (12);
245
246      vptr->start &= m_rom_size - 1;
247
248      //printf("%08x: REGISTER 00 write port 0x0002 chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
249      break;
254      m_key |= 1 << m_audiochannel;
250255   }
251256}
252}
253257
254
255258READ16_MEMBER(l7a1045_sound_device::l7a1045_sound_port_0004_r)
256259{
257260   // it writes the channel select before reading this.. so either it works on channels, or the command..
trunk/src/emu/sound/l7a1045_l6028_dsp_a.h
r245469r245470
5757
5858   DECLARE_WRITE16_MEMBER(sound_select_w);
5959   DECLARE_WRITE16_MEMBER(sound_data_w);
60   DECLARE_WRITE16_MEMBER(sound_status_w);
6061
6162   DECLARE_READ16_MEMBER(l7a1045_sound_port_0004_r);
6263   DECLARE_READ16_MEMBER(l7a1045_sound_port_0006_r);
trunk/src/mame/audio/hng64.c
r245469r245470
194194//  logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask);
195195   // seems to one or more of the DMARQ on the V53, writes here when it expects DMA channel 3 to transfer ~0x20 bytes just after startup
196196
197   /* TODO: huh? */
197198   m_audiocpu->dreq3_w(data&1);
199   m_dsp->l7a1045_sound_w(space,8/2,data,mem_mask);
198200//  m_audiocpu->hack_w(1);
199201
200202}
r245469r245470
276278            printf("IRQ ACK %02x?\n",data);
277279         return;
278280   }
279   
281
280282   printf("SOUND W %02x %04x\n",offset*2,data);
281283}
282284
r245469r245470
290292         return main_latch[1];
291293   }
292294   printf("SOUND R %02x\n",offset*2);
293   
295
294296   return 0;
295297}
296298
r245469r245470
356358
357359   if(machine().input().code_pressed_once(KEYCODE_X))
358360      i--;
359     
361
360362   if(i < 0)
361363      i = 0;
362364   if(i > 7)
363365      i = 7;
364366
365367   printf("trigger %02x %d\n",i,state);
366     
368
367369   //if(machine().input().code_pressed_once(KEYCODE_C))
368370   {
369371      m_audiocpu->set_input_line(i, state? ASSERT_LINE :CLEAR_LINE);
trunk/src/mame/includes/hng64.h
r245469r245470
104104      : driver_device(mconfig, type, tag),
105105      m_maincpu(*this, "maincpu"),
106106      m_audiocpu(*this, "audiocpu"),
107      m_dsp(*this, "l7a1045"),
107108      m_comm(*this, "network"),
108109      m_rtc(*this, "rtc"),
109110      m_mainram(*this, "mainram"),
r245469r245470
129130
130131   required_device<mips3_device> m_maincpu;
131132   required_device<v53a_device> m_audiocpu;
133   required_device<l7a1045_sound_device> m_dsp;
132134   required_device<cpu_device> m_comm;
133135   required_device<msm6242_device> m_rtc;
136
134137   required_shared_ptr<UINT32> m_mainram;
135138   required_shared_ptr<UINT32> m_cart;
136139   required_shared_ptr<UINT32> m_sysregs;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team