diff --git a/zsnes/src/chips/dsp4emu.c b/zsnes/src/chips/dsp4emu.c index 01fa9b80..320aa988 100644 --- a/zsnes/src/chips/dsp4emu.c +++ b/zsnes/src/chips/dsp4emu.c @@ -178,15 +178,15 @@ static int32 DSP4_READ_DWORD() #define DSP4_WRITE_WORD( d ) \ { WRITE_WORD( DSP4.output + DSP4.out_count, ( d ) ); DSP4.out_count += 2; } -#ifndef BIG_ENDIAN +#ifndef MSB_FIRST #define DSP4_WRITE_16_WORD( d ) \ { memcpy(DSP4.output + DSP4.out_count, ( d ), 32); DSP4.out_count += 32; } #else #define DSP4_WRITE_16_WORD( d ) \ -{ int16 i = 16; \ - while (i--) \ +{ int16 *p = ( d ); \ + for (; p != ( d )+16; p++) \ { \ - WRITE_WORD( DSP4.output + DSP4.out_count, ( d ) ); \ + WRITE_WORD( DSP4.output + DSP4.out_count, *p ); \ } \ DSP4.out_count += 32; \ }