summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraliaspider2015-11-13 01:10:59 +0100
committeraliaspider2015-11-13 01:14:10 +0100
commitfeb7ddabab930359c045128134d942894ff5f4f8 (patch)
treea44a9115c7ae6a819f490b174af41f08ea96855f /src
parent9adfbb8d43e68e6ae828a534eeadbcbe3d46ca46 (diff)
downloadsnes9x2002-feb7ddabab930359c045128134d942894ff5f4f8.tar.gz
snes9x2002-feb7ddabab930359c045128134d942894ff5f4f8.tar.bz2
snes9x2002-feb7ddabab930359c045128134d942894ff5f4f8.zip
build bix for non ARM platforms.
(still not functional)
Diffstat (limited to 'src')
-rw-r--r--src/apu.h5
-rw-r--r--src/asmmemfuncs.h8
-rw-r--r--src/cpuexec.c10
-rw-r--r--src/cpuexec.h20
-rw-r--r--src/snes9x.h3
-rw-r--r--src/tile_c.c (renamed from src/tile_c.cpp)0
6 files changed, 35 insertions, 11 deletions
diff --git a/src/apu.h b/src/apu.h
index 2beef0d..ccf68dc 100644
--- a/src/apu.h
+++ b/src/apu.h
@@ -107,8 +107,9 @@ STATIC inline void S9xAPUUnpackStatus()
{
IAPU._Zero = ((IAPU.P & Zero) == 0) | (IAPU.P & Negative);
-
+#ifdef ASMCPU
if (!Settings.asmspc700)
+#endif
{
IAPU._Carry = (IAPU.P & Carry);
IAPU._Overflow = (IAPU.P & Overflow);
@@ -117,6 +118,7 @@ STATIC inline void S9xAPUUnpackStatus()
STATIC inline void S9xAPUPackStatus()
{
+#ifdef ASMCPU
if (Settings.asmspc700)
{
IAPU.P &= ~(Zero | Negative);
@@ -125,6 +127,7 @@ STATIC inline void S9xAPUPackStatus()
}
else
+#endif
{
IAPU.P &= ~(Zero | Negative | Carry | Overflow);
if (IAPU._Carry) IAPU.P |= Carry;
diff --git a/src/asmmemfuncs.h b/src/asmmemfuncs.h
index 6380ad0..538ce76 100644
--- a/src/asmmemfuncs.h
+++ b/src/asmmemfuncs.h
@@ -204,10 +204,10 @@
); _dst; \
})
#else
-#define memset32(_dst, _c, _count) memset(_dst, _c, _count)
-#define memset16(_dst, _c, _count) memset(_dst, _c, _count)
-#define memcpy32(_dst, _src, _count) memcpy(_dst, _src, _count)
-#define memcpy16(_dst, _src, _count) memcpy(_dst, _src, _count)
+#define memset32(_dst, _c, _count) memset(_dst, _c, (_count)<<2)
+#define memset16(_dst, _c, _count) memset(_dst, _c, (_count)<<1)
+#define memcpy32(_dst, _src, _count) memcpy(_dst, _src, (_count)<<2)
+#define memcpy16(_dst, _src, _count) memcpy(_dst, _src, (_count)<<1)
#endif
#endif
diff --git a/src/cpuexec.c b/src/cpuexec.c
index 9306390..faed0fa 100644
--- a/src/cpuexec.c
+++ b/src/cpuexec.c
@@ -332,7 +332,8 @@ S9xMainLoop(void)
if (Settings.APUEnabled == 1)
{
#ifdef USE_SA1
- if (Settings.SA1) S9xMainLoop_SA1_APU();
+ if (Settings.SA1)
+ S9xMainLoop_SA1_APU();
else
#endif
S9xMainLoop_NoSA1_APU();
@@ -340,10 +341,11 @@ S9xMainLoop(void)
else
{
#ifdef USE_SA1
- if (Settings.SA1) S9xMainLoop_SA1_NoAPU();
- else S9xMainLoop_NoSA1_NoAPU();
+ if (Settings.SA1)
+ S9xMainLoop_SA1_NoAPU();
+ else
#endif
-
+ S9xMainLoop_NoSA1_NoAPU();
}
#else
if (Settings.asmspc700) asmMainLoop_spcAsm(&CPU);
diff --git a/src/cpuexec.h b/src/cpuexec.h
index 9ccfa71..40ea4d6 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
#define asm_APU_EXECUTE(MODE)\
{\
if (CPU.APU_APUExecuting == MODE) {\
@@ -231,6 +231,24 @@ void asm_APU_EXECUTE2(void);
}\
}\
}
+#else
+
+#define asm_APU_EXECUTE(MODE)\
+ do { if (CPU.APU_APUExecuting == MODE) \
+ while (CPU.APU_Cycles <= CPU.Cycles)\
+ {\
+ CPU.APU_Cycles += S9xAPUCycles [*IAPU.PC];\
+ (*S9xApuOpcodes[*IAPU.PC]) ();\
+ }}while(0)
+#define asm_APU_EXECUTE2() \
+ if (CPU.APU_APUExecuting == 1) do\
+ {\
+ CPU.APU_Cycles += S9xAPUCycles [*IAPU.PC];\
+ (*S9xApuOpcodes[*IAPU.PC]) ();\
+ } while (CPU.APU_Cycles < CPU.NextEvent)
+
+#endif
+
#endif
diff --git a/src/snes9x.h b/src/snes9x.h
index e3f8f1d..e72b758 100644
--- a/src/snes9x.h
+++ b/src/snes9x.h
@@ -395,8 +395,9 @@ typedef struct
bool8 DaffyDuck;
uint8 APURAMInitialValue;
bool8 SDD1Pack;
-
+#ifdef ASMCPU
bool8 asmspc700;
+#endif
bool8 SpeedHacks;
#ifdef __WIN32__
int SoundDriver;
diff --git a/src/tile_c.cpp b/src/tile_c.c
index 9bdc05f..9bdc05f 100644
--- a/src/tile_c.cpp
+++ b/src/tile_c.c