diff options
Diffstat (limited to 'src/mame/audio/snes_snd.cpp')
-rw-r--r-- | src/mame/audio/snes_snd.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mame/audio/snes_snd.cpp b/src/mame/audio/snes_snd.cpp index 127fec049ce..b47edce55c9 100644 --- a/src/mame/audio/snes_snd.cpp +++ b/src/mame/audio/snes_snd.cpp @@ -155,7 +155,7 @@ static const int ENVCNT[0x20] const device_type SNES = &device_creator<snes_sound_device>; -snes_sound_device::snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +snes_sound_device::snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SNES, "SNES Custom DSP (SPC700)", tag, owner, clock, "snes_sound", __FILE__), device_sound_interface(mconfig, *this) { @@ -179,7 +179,7 @@ void snes_sound_device::device_start() { m_channel = machine().sound().stream_alloc(*this, 0, 2, 32000); - m_ram = make_unique_clear<UINT8[]>(SNES_SPCRAM_SIZE); + m_ram = make_unique_clear<uint8_t[]>(SNES_SPCRAM_SIZE); /* put IPL image at the top of RAM */ memcpy(m_ipl_region, machine().root_device().memregion("sound_ipl")->base(), 64); @@ -338,7 +338,7 @@ void snes_sound_device::dsp_update( short *sound_ptr ) m_keys |= m; m_keyed_on |= m; vl = m_dsp_regs[(v << 4) + 4]; - vp->samp_id = *( UINT32 * )&sd[vl]; + vp->samp_id = *( uint32_t * )&sd[vl]; vp->mem_ptr = LEtoME16(sd[vl].vptr); #ifdef DBG_KEY @@ -391,7 +391,7 @@ void snes_sound_device::dsp_update( short *sound_ptr ) continue; } - vp->pitch = LEtoME16(*((UINT16 *)&m_dsp_regs[V + 2])) & 0x3fff; + vp->pitch = LEtoME16(*((uint16_t *)&m_dsp_regs[V + 2])) & 0x3fff; #ifndef NO_PMOD /* Pitch mod uses OUTX from last voice for this one. Luckily we haven't @@ -454,7 +454,7 @@ void snes_sound_device::dsp_update( short *sound_ptr ) } vp->header_cnt = 8; - vl = (UINT8)m_ram[vp->mem_ptr++]; + vl = (uint8_t)m_ram[vp->mem_ptr++]; vp->range = vl >> 4; vp->end = vl & 3; vp->filter = (vl & 12) >> 2; @@ -501,7 +501,7 @@ void snes_sound_device::dsp_update( short *sound_ptr ) } #ifdef DBG_BRR - logerror("V%d: shifted delta=%04X\n", v, (UINT16)outx); + logerror("V%d: shifted delta=%04X\n", v, (uint16_t)outx); #endif switch (vp->filter) @@ -533,7 +533,7 @@ void snes_sound_device::dsp_update( short *sound_ptr ) } #ifdef DBG_BRR - logerror("V%d: filter + delta=%04X\n", v, (UINT16)outx); + logerror("V%d: filter + delta=%04X\n", v, (uint16_t)outx); #endif vp->smp2 = (signed short)vp->smp1; @@ -626,8 +626,8 @@ void snes_sound_device::dsp_update( short *sound_ptr ) #endif echo_base = ((m_dsp_regs[0x6d] << 8) + m_echo_ptr) & 0xffff; - m_fir_lbuf[m_fir_ptr] = (signed short)LEtoME16(*(UINT16 *)&m_ram[echo_base]); - m_fir_rbuf[m_fir_ptr] = (signed short)LEtoME16(*(UINT16 *)&m_ram[echo_base + sizeof(short)]); + m_fir_lbuf[m_fir_ptr] = (signed short)LEtoME16(*(uint16_t *)&m_ram[echo_base]); + m_fir_rbuf[m_fir_ptr] = (signed short)LEtoME16(*(uint16_t *)&m_ram[echo_base + sizeof(short)]); /* Now, evaluate the FIR filter, and add the results into the final output. */ vl = m_fir_lbuf[m_fir_ptr] * (signed char)m_dsp_regs[0x7f]; @@ -688,11 +688,11 @@ void snes_sound_device::dsp_update( short *sound_ptr ) echor = -32768; #ifdef DBG_ECHO - logerror("Echo: Writing %04X,%04X at location %04X\n", (UINT16)echol, (UINT16)echor, echo_base); + logerror("Echo: Writing %04X,%04X at location %04X\n", (uint16_t)echol, (uint16_t)echor, echo_base); #endif - *(UINT16 *)&m_ram[echo_base] = MEtoLE16((UINT16)echol); - *(UINT16 *)&m_ram[echo_base + sizeof(short)] = MEtoLE16((UINT16)echor); + *(uint16_t *)&m_ram[echo_base] = MEtoLE16((uint16_t)echol); + *(uint16_t *)&m_ram[echo_base + sizeof(short)] = MEtoLE16((uint16_t)echor); } m_echo_ptr += 2 * sizeof(short); @@ -1086,7 +1086,7 @@ READ8_MEMBER( snes_sound_device::spc_io_r ) case 0xe: /* Counter 1 */ case 0xf: /* Counter 2 */ { - UINT8 value = m_ram[0xf0 + offset] & 0x0f; + uint8_t value = m_ram[0xf0 + offset] & 0x0f; m_ram[0xf0 + offset] = 0; return value; } |