diff options
Diffstat (limited to 'apps/codecs/spc')
| -rw-r--r-- | apps/codecs/spc/spc_codec.h | 1 | ||||
| -rw-r--r-- | apps/codecs/spc/spc_dsp.c | 3 | ||||
| -rw-r--r-- | apps/codecs/spc/spc_emu.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/apps/codecs/spc/spc_codec.h b/apps/codecs/spc/spc_codec.h index 013f536..a18aece 100644 --- a/apps/codecs/spc/spc_codec.h +++ b/apps/codecs/spc/spc_codec.h @@ -7,6 +7,7 @@ * \/ \/ \/ \/ \/ * $Id$ * + * Copyright (C) 2007-2008 Michael Sevakis (jhMikeS) * Copyright (C) 2006-2007 Adam Gashlin (hcs) * Copyright (C) 2004-2007 Shay Green (blargg) * Copyright (C) 2002 Brad Martin diff --git a/apps/codecs/spc/spc_dsp.c b/apps/codecs/spc/spc_dsp.c index 19986fd..dda80e9 100644 --- a/apps/codecs/spc/spc_dsp.c +++ b/apps/codecs/spc/spc_dsp.c @@ -7,6 +7,7 @@ * \/ \/ \/ \/ \/ * $Id$ * + * Copyright (C) 2007-2008 Michael Sevakis (jhMikeS) * Copyright (C) 2006-2007 Adam Gashlin (hcs) * Copyright (C) 2004-2007 Shay Green (blargg) * Copyright (C) 2002 Brad Martin @@ -31,7 +32,7 @@ int32_t fir_buf[FIR_BUF_CNT] #endif #if SPC_BRRCACHE /* a little extra for samples that go past end */ -int16_t BRRcache [BRR_CACHE_SIZE]; +int16_t BRRcache [BRR_CACHE_SIZE] CACHEALIGN_ATTR; #endif void DSP_write( struct Spc_Dsp* this, int i, int data ) diff --git a/apps/codecs/spc/spc_emu.c b/apps/codecs/spc/spc_emu.c index 30aaf5d..bd9c005 100644 --- a/apps/codecs/spc/spc_emu.c +++ b/apps/codecs/spc/spc_emu.c @@ -27,7 +27,7 @@ /* DSP Based on Brad Martin's OpenSPC DSP emulator */ /* tag reading from sexyspc by John Brawn (John_Brawn@yahoo.com) and others */ -struct cpu_ram_t ram; +struct cpu_ram_t ram CACHEALIGN_ATTR; /**************** Timers ****************/ @@ -76,6 +76,10 @@ void SPC_Init( THIS ) this->boot_rom [sizeof this->boot_rom - 2] = 0xC0; this->boot_rom [sizeof this->boot_rom - 1] = 0xFF; ci->memset( this->boot_rom, 0, sizeof this->boot_rom - 2 ); + + /* Have DSP in a defined state in case EMU is run and hasn't loaded + * a program yet */ + DSP_reset(&this->dsp); } static void SPC_load_state( THIS, struct cpu_regs_t const* cpu_state, |