aboutsummaryrefslogtreecommitdiff
path: root/source/cpuexec.h
diff options
context:
space:
mode:
authortwinaphex2017-08-11 17:43:00 +0200
committertwinaphex2017-08-11 17:43:00 +0200
commitb9c74ceb1352c8f433cf6bf2c446ae07457c5267 (patch)
treeafd398fed3d08c81957373be55a12284cb932ab6 /source/cpuexec.h
parent1aecedc999445e9a27e04f665fd562b576775d08 (diff)
downloadsnes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.gz
snes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.bz2
snes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.zip
Start making this suitable for MSVC and C89
Diffstat (limited to 'source/cpuexec.h')
-rw-r--r--source/cpuexec.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/cpuexec.h b/source/cpuexec.h
index 7d4008c..9654d86 100644
--- a/source/cpuexec.h
+++ b/source/cpuexec.h
@@ -6,15 +6,16 @@
typedef struct
{
#ifdef __WIN32__
- void (__cdecl* S9xOpcode)();
+ void (__cdecl* S9xOpcode)(void);
#else
- void (*S9xOpcode)();
+ void (*S9xOpcode)(void);
#endif
} SOpcodes;
#include "ppu.h"
#include "memmap.h"
#include "65c816.h"
+#include <retro_inline.h>
#define DO_HBLANK_CHECK_SFX() \
if (CPU.Cycles >= CPU.NextEvent) \
@@ -57,7 +58,7 @@ extern SOpcodes S9xOpcodesM0X0 [256];
extern SICPU ICPU;
-static inline void S9xUnpackStatus()
+static INLINE void S9xUnpackStatus(void)
{
ICPU._Zero = (ICPU.Registers.PL & Zero) == 0;
ICPU._Negative = (ICPU.Registers.PL & Negative);
@@ -65,20 +66,20 @@ static inline void S9xUnpackStatus()
ICPU._Overflow = (ICPU.Registers.PL & Overflow) >> 6;
}
-static inline void S9xPackStatus()
+static INLINE void S9xPackStatus(void)
{
ICPU.Registers.PL &= ~(Zero | Negative | Carry | Overflow);
ICPU.Registers.PL |= ICPU._Carry | ((ICPU._Zero == 0) << 1) | (ICPU._Negative & 0x80) | (ICPU._Overflow << 6);
}
-static inline void CLEAR_IRQ_SOURCE(uint32_t M)
+static INLINE void CLEAR_IRQ_SOURCE(uint32_t M)
{
CPU.IRQActive &= ~M;
if (!CPU.IRQActive)
CPU.Flags &= ~IRQ_PENDING_FLAG;
}
-static inline void S9xFixCycles()
+static INLINE void S9xFixCycles(void)
{
if (CheckEmulation())
ICPU.S9xOpcodes = S9xOpcodesE1;
@@ -98,7 +99,7 @@ static inline void S9xFixCycles()
}
}
-static inline void S9xReschedule()
+static INLINE void S9xReschedule(void)
{
uint8_t which;
int32_t max;