From d31162a9d33fec5225f74e5573087ae6a766705a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 20 Feb 2007 10:27:39 +0000 Subject: SPC codec: enable echo on ColdFire CPU. Do a couple general small optimizations. Preswap some data when running DSP for big endian. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12410 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/spc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/codecs/spc.c') diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 86b9c0caf1..87b5972087 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c @@ -51,8 +51,13 @@ CODEC_HEADER /* Disable gaussian interpolation */ #define SPC_NOINTERP 1 +#ifndef CPU_COLDFIRE /* Disable echo processing */ #define SPC_NOECHO 1 +#else + /* Enable echo processing */ + #define SPC_NOECHO 0 +#endif #else /* Don't cache BRR waves */ #define SPC_BRRCACHE 0 @@ -100,6 +105,8 @@ static inline void set_le16( void* p, unsigned n ) #define GET_LE16( addr ) get_le16( addr ) #define SET_LE16( addr, data ) set_le16( addr, data ) +#define INT16A( addr ) (*(uint16_t*) (addr)) +#define INT16SA( addr ) (*(int16_t*) (addr)) #ifdef ROCKBOX_LITTLE_ENDIAN #define GET_LE16A( addr ) (*(uint16_t*) (addr)) @@ -794,6 +801,10 @@ enum codec_status codec_main(void) { memcpy( spc_emu.cycle_table, cycle_table, sizeof cycle_table ); +#ifdef CPU_COLDFIRE + coldfire_set_macsr(EMAC_SATURATE); +#endif + do { DEBUGF("SPC: next_track\n"); -- cgit v1.2.3