From 0a2c1e6f5025c20e7c476e305ddda1c1a6bd9eec Mon Sep 17 00:00:00 2001 From: aliaspider Date: Tue, 24 Nov 2015 13:47:28 +0100 Subject: add ASM_CPU and ASM_SPC700 build options. --- src/apu.h | 4 ++-- src/cpuexec.c | 8 ++++++-- src/cpuexec.h | 2 +- src/port.h | 4 ++-- src/snes9x.h | 2 +- src/soundux.c | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/apu.h b/src/apu.h index ccf68dc..201c68c 100644 --- a/src/apu.h +++ b/src/apu.h @@ -107,7 +107,7 @@ STATIC inline void S9xAPUUnpackStatus() { IAPU._Zero = ((IAPU.P & Zero) == 0) | (IAPU.P & Negative); -#ifdef ASMCPU +#ifdef ASM_SPC700 if (!Settings.asmspc700) #endif { @@ -118,7 +118,7 @@ STATIC inline void S9xAPUUnpackStatus() STATIC inline void S9xAPUPackStatus() { -#ifdef ASMCPU +#ifdef ASM_SPC700 if (Settings.asmspc700) { IAPU.P &= ~(Zero | Negative); diff --git a/src/cpuexec.c b/src/cpuexec.c index faed0fa..d7d6fa2 100644 --- a/src/cpuexec.c +++ b/src/cpuexec.c @@ -348,8 +348,12 @@ S9xMainLoop(void) S9xMainLoop_NoSA1_NoAPU(); } #else - if (Settings.asmspc700) asmMainLoop_spcAsm(&CPU); - else asmMainLoop_spcC(&CPU); +#ifdef ASM_SPC700 + if (Settings.asmspc700) + asmMainLoop_spcAsm(&CPU); + else +#endif + asmMainLoop_spcC(&CPU); #endif Registers.PC = CPU.PC - CPU.PCBase; diff --git a/src/cpuexec.h b/src/cpuexec.h index 40ea4d6..407c7e5 100644 --- a/src/cpuexec.h +++ b/src/cpuexec.h @@ -190,7 +190,7 @@ extern "C" { void asm_APU_EXECUTE(int Mode); void asm_APU_EXECUTE2(void); }*/ -#ifdef ASMCPU +#ifdef ASM_SPC700 #define asm_APU_EXECUTE(MODE)\ {\ if (CPU.APU_APUExecuting == MODE) {\ diff --git a/src/port.h b/src/port.h index b203d8d..9a18644 100644 --- a/src/port.h +++ b/src/port.h @@ -134,8 +134,8 @@ typedef short int16_32; #define ALIGN_BY_ONE __attribute__ ((aligned (1), packed)) #undef FAST_LSB_WORD_ACCESS #define SUPER_FX -#ifdef ASMCPU -#define ASM_SPC700 +#if defined(ASM_SPC700) && defined(SPC700_SHUTDOWN) +#undef SPC700_SHUTDOWN #endif EXTERN_C void S9xGenerateSound(); diff --git a/src/snes9x.h b/src/snes9x.h index 8e8cac1..5ccfeb0 100644 --- a/src/snes9x.h +++ b/src/snes9x.h @@ -359,7 +359,7 @@ typedef struct bool8 DaffyDuck; uint8 APURAMInitialValue; bool8 SDD1Pack; -#ifdef ASMCPU +#ifdef ASM_SPC700 bool8 asmspc700; #endif bool8 SpeedHacks; diff --git a/src/soundux.c b/src/soundux.c index 67f7127..4649d91 100644 --- a/src/soundux.c +++ b/src/soundux.c @@ -256,7 +256,7 @@ static void DecodeBlock(Channel* ch) int16* raw = ch->block = ch->decoded; -#ifdef ARM +#ifdef ASM_SPC700 DecodeBlockAsm(compressed, raw, &ch->previous [0], &ch->previous [1]); #else int32 out; -- cgit v1.2.3