trunk/src/emu/sound/l7a1045_l6028_dsp_a.c
| r245469 | r245470 | |
| 172 | 172 | |
| 173 | 173 | if(offset == 0) |
| 174 | 174 | sound_select_w(space, offset, data, mem_mask); |
| 175 | else if(offset == 8/2) |
| 176 | sound_status_w(space, offset, data, mem_mask); |
| 175 | 177 | else |
| 176 | 178 | sound_data_w(space,offset - 1,data,mem_mask); |
| 177 | 179 | } |
| r245469 | r245470 | |
| 225 | 227 | |
| 226 | 228 | m_audiodat[m_audioregister][m_audiochannel].dat[offset] = data; |
| 227 | 229 | |
| 228 | | if(offset == 0) |
| 230 | switch (m_audioregister) |
| 229 | 231 | { |
| 232 | case 0x00: |
| 233 | l7a1045_voice *vptr = &m_voice[m_audiochannel]; |
| 230 | 234 | |
| 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 | |
| 246 | WRITE16_MEMBER(l7a1045_sound_device::sound_status_w) |
| 247 | { |
| 248 | if(data & 0x100) // keyin |
| 232 | 249 | { |
| 233 | | case 0x00: |
| 234 | | // hack |
| 235 | 250 | l7a1045_voice *vptr = &m_voice[m_audiochannel]; |
| 236 | 251 | |
| 237 | | m_key |= 1 << m_audiochannel; |
| 238 | | |
| 239 | 252 | vptr->frac = 0; |
| 240 | 253 | 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; |
| 250 | 255 | } |
| 251 | 256 | } |
| 252 | | } |
| 253 | 257 | |
| 254 | | |
| 255 | 258 | READ16_MEMBER(l7a1045_sound_device::l7a1045_sound_port_0004_r) |
| 256 | 259 | { |
| 257 | 260 | // it writes the channel select before reading this.. so either it works on channels, or the command.. |
trunk/src/mame/audio/hng64.c
| r245469 | r245470 | |
| 194 | 194 | // logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask); |
| 195 | 195 | // 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 |
| 196 | 196 | |
| 197 | /* TODO: huh? */ |
| 197 | 198 | m_audiocpu->dreq3_w(data&1); |
| 199 | m_dsp->l7a1045_sound_w(space,8/2,data,mem_mask); |
| 198 | 200 | // m_audiocpu->hack_w(1); |
| 199 | 201 | |
| 200 | 202 | } |
| r245469 | r245470 | |
| 276 | 278 | printf("IRQ ACK %02x?\n",data); |
| 277 | 279 | return; |
| 278 | 280 | } |
| 279 | | |
| 281 | |
| 280 | 282 | printf("SOUND W %02x %04x\n",offset*2,data); |
| 281 | 283 | } |
| 282 | 284 | |
| r245469 | r245470 | |
| 290 | 292 | return main_latch[1]; |
| 291 | 293 | } |
| 292 | 294 | printf("SOUND R %02x\n",offset*2); |
| 293 | | |
| 295 | |
| 294 | 296 | return 0; |
| 295 | 297 | } |
| 296 | 298 | |
| r245469 | r245470 | |
| 356 | 358 | |
| 357 | 359 | if(machine().input().code_pressed_once(KEYCODE_X)) |
| 358 | 360 | i--; |
| 359 | | |
| 361 | |
| 360 | 362 | if(i < 0) |
| 361 | 363 | i = 0; |
| 362 | 364 | if(i > 7) |
| 363 | 365 | i = 7; |
| 364 | 366 | |
| 365 | 367 | printf("trigger %02x %d\n",i,state); |
| 366 | | |
| 368 | |
| 367 | 369 | //if(machine().input().code_pressed_once(KEYCODE_C)) |
| 368 | 370 | { |
| 369 | 371 | m_audiocpu->set_input_line(i, state? ASSERT_LINE :CLEAR_LINE); |
trunk/src/mame/includes/hng64.h
| r245469 | r245470 | |
| 104 | 104 | : driver_device(mconfig, type, tag), |
| 105 | 105 | m_maincpu(*this, "maincpu"), |
| 106 | 106 | m_audiocpu(*this, "audiocpu"), |
| 107 | m_dsp(*this, "l7a1045"), |
| 107 | 108 | m_comm(*this, "network"), |
| 108 | 109 | m_rtc(*this, "rtc"), |
| 109 | 110 | m_mainram(*this, "mainram"), |
| r245469 | r245470 | |
| 129 | 130 | |
| 130 | 131 | required_device<mips3_device> m_maincpu; |
| 131 | 132 | required_device<v53a_device> m_audiocpu; |
| 133 | required_device<l7a1045_sound_device> m_dsp; |
| 132 | 134 | required_device<cpu_device> m_comm; |
| 133 | 135 | required_device<msm6242_device> m_rtc; |
| 136 | |
| 134 | 137 | required_shared_ptr<UINT32> m_mainram; |
| 135 | 138 | required_shared_ptr<UINT32> m_cart; |
| 136 | 139 | required_shared_ptr<UINT32> m_sysregs; |