trunk/src/mame/audio/hng64.c
| r244904 | r244905 | |
| 158 | 158 | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | WRITE16_MEMBER(hng64_state::hng64_sound_select_w) |
| 162 | { |
| 163 | // seems to write values in the format xxyy where yy is 0x00-0x1f and xx is oten 00/01/0a |
| 164 | // there are said to be 32 audio channels, so maybe the lower byte is the channel? |
| 165 | |
| 166 | // printf("hng64_sound_select_w") |
| 167 | COMBINE_DATA(&m_audiochannel); |
| 168 | } |
| 169 | |
| 170 | WRITE16_MEMBER(hng64_state::hng64_sound_data_02_w) |
| 171 | { |
| 172 | m_audiodat[m_audiochannel].dat[2] = data; |
| 173 | // printf("write port 0x0002 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); |
| 174 | } |
| 175 | |
| 176 | WRITE16_MEMBER(hng64_state::hng64_sound_data_04_w) |
| 177 | { |
| 178 | m_audiodat[m_audiochannel].dat[1] = data; |
| 179 | // printf("write port 0x0004 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); |
| 180 | } |
| 181 | WRITE16_MEMBER(hng64_state::hng64_sound_data_06_w) |
| 182 | { |
| 183 | m_audiodat[m_audiochannel].dat[0] = data; |
| 184 | // printf("write port 0x0006 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); |
| 185 | } |
| 186 | |
| 187 | // but why not just use the V33/V53 XA mode?? |
| 188 | WRITE16_MEMBER(hng64_state::hng64_sound_bank_w) |
| 189 | { |
| 190 | printf("%08x hng64_sound_bank_w? %02x %04x\n", space.device().safe_pc(), offset, data); |
| 191 | // buriki writes 0x3f to 0x200 before jumping to the low addresses.. |
| 192 | // where it expects to find data from 0x1f0000 |
| 193 | |
| 194 | // the 2 early games don't do this.. maybe all banks actuallly default to that region tho? |
| 195 | // the sound code on those games seems buggier anyway. |
| 196 | } |
| 197 | |
| 198 | WRITE16_MEMBER(hng64_state::hng64_sound_port_0102_w) |
| 199 | { |
| 200 | printf("hng64_port 0x0102 %04x\n", data); |
| 201 | } |
| 202 | |
| 203 | WRITE16_MEMBER(hng64_state::hng64_sound_port_0080_w) |
| 204 | { |
| 205 | printf("hng64_port 0x0080 %04x\n", data); |
| 206 | } |
| 207 | |
| 161 | 208 | static ADDRESS_MAP_START( hng_sound_io, AS_IO, 16, hng64_state ) |
| 209 | AM_RANGE(0x0000, 0x0001) AM_WRITE( hng64_sound_select_w ) |
| 210 | AM_RANGE(0x0002, 0x0003) AM_WRITE( hng64_sound_data_02_w ) |
| 211 | AM_RANGE(0x0004, 0x0005) AM_WRITE( hng64_sound_data_04_w ) |
| 212 | AM_RANGE(0x0006, 0x0007) AM_WRITE( hng64_sound_data_06_w ) |
| 162 | 213 | AM_RANGE(0x0008, 0x0009) AM_WRITE( hng64_sound_port_0008_w ) |
| 214 | // a 8 c used too? |
| 215 | |
| 216 | AM_RANGE(0x0080, 0x0081) AM_WRITE( hng64_sound_port_0080_w ) |
| 217 | |
| 218 | AM_RANGE(0x0102, 0x0103) AM_WRITE( hng64_sound_port_0102_w ) |
| 219 | |
| 220 | AM_RANGE(0x0200, 0x021f) AM_WRITE( hng64_sound_bank_w ) // ?? |
| 221 | |
| 163 | 222 | ADDRESS_MAP_END |
| 164 | 223 | |
| 165 | 224 | WRITE_LINE_MEMBER(hng64_state::dma_hreq_cb) |
trunk/src/mame/includes/hng64.h
| r244904 | r244905 | |
| 359 | 359 | DECLARE_WRITE_LINE_MEMBER(dma_hreq_cb); |
| 360 | 360 | DECLARE_READ8_MEMBER(dma_memr_cb); |
| 361 | 361 | DECLARE_WRITE8_MEMBER(dma_iow3_cb); |
| 362 | | WRITE_LINE_MEMBER(tcu_tm0_cb); |
| 363 | | WRITE_LINE_MEMBER(tcu_tm1_cb); |
| 364 | | WRITE_LINE_MEMBER(tcu_tm2_cb); |
| 362 | DECLARE_WRITE_LINE_MEMBER(tcu_tm0_cb); |
| 363 | DECLARE_WRITE_LINE_MEMBER(tcu_tm1_cb); |
| 364 | DECLARE_WRITE_LINE_MEMBER(tcu_tm2_cb); |
| 365 | 365 | |
| 366 | UINT16 m_audiochannel; |
| 367 | |
| 368 | struct hng64_48bit_data { |
| 369 | UINT16 dat[3]; |
| 370 | }; |
| 371 | |
| 372 | hng64_48bit_data m_audiodat[0x10000]; |
| 373 | |
| 374 | DECLARE_WRITE16_MEMBER(hng64_sound_select_w); |
| 375 | DECLARE_WRITE16_MEMBER(hng64_sound_data_02_w); |
| 376 | DECLARE_WRITE16_MEMBER(hng64_sound_data_04_w); |
| 377 | DECLARE_WRITE16_MEMBER(hng64_sound_data_06_w); |
| 378 | DECLARE_WRITE16_MEMBER(hng64_sound_bank_w); |
| 379 | DECLARE_WRITE16_MEMBER(hng64_sound_port_0102_w); |
| 380 | DECLARE_WRITE16_MEMBER(hng64_sound_port_0080_w); |
| 381 | |
| 382 | |
| 366 | 383 | }; |
| 367 | 384 | |