mirror of
https://github.com/holub/mame
synced 2025-06-05 04:16:28 +03:00
macro removal INLINE -> static inline (nw)
This commit is contained in:
parent
afe2bbe648
commit
379581fb36
2
3rdparty/softfloat/mamesf.h
vendored
2
3rdparty/softfloat/mamesf.h
vendored
@ -64,4 +64,4 @@ typedef INT64 sbits64;
|
||||
| a compiler does not support explicit inlining, this macro should be defined
|
||||
| to be `static'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
// MAME defines INLINE
|
||||
#define INLINE static inline
|
||||
|
@ -554,24 +554,6 @@ if (_ACTION == nil) then return false end
|
||||
configuration { "x64" }
|
||||
defines { "PTR64=1" }
|
||||
|
||||
-- map the INLINE to something digestible by GCC
|
||||
configuration { "gmake" }
|
||||
buildoptions_cpp {
|
||||
"-DINLINE=\"static inline\"",
|
||||
}
|
||||
buildoptions_objc {
|
||||
"-DINLINE=\"static inline\"",
|
||||
}
|
||||
configuration { "xcode4*" }
|
||||
buildoptions {
|
||||
"-DINLINE=\"static inline\"",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
defines {
|
||||
"INLINE=static inline",
|
||||
}
|
||||
|
||||
-- define MAME_DEBUG if we are a debugging build
|
||||
configuration { "Debug" }
|
||||
defines {
|
||||
@ -1002,7 +984,6 @@ end
|
||||
"-Wno-tautological-compare",
|
||||
"-Wno-dynamic-class-memaccess",
|
||||
"-Wno-unused-value",
|
||||
-- "-Wno-c++11-narrowing",
|
||||
"-Wno-inline-new-delete",
|
||||
"-Wno-constant-logical-operand",
|
||||
"-Wno-deprecated-register",
|
||||
@ -1026,8 +1007,6 @@ end
|
||||
end
|
||||
buildoptions {
|
||||
"-Wno-unused-result", -- needed for fgets,fread on linux
|
||||
-- "-Wno-narrowing",
|
||||
-- "-Wno-attributes",
|
||||
-- array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds)
|
||||
"-Wno-array-bounds",
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ bool gba_cart_slot_device::call_softlist_load(software_list_device &swlist, cons
|
||||
fullpath
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE std::string gba_chip_string( UINT32 chip )
|
||||
static inline std::string gba_chip_string( UINT32 chip )
|
||||
{
|
||||
std::string str;
|
||||
if (chip == 0) str += "NONE ";
|
||||
@ -273,7 +273,7 @@ INLINE std::string gba_chip_string( UINT32 chip )
|
||||
}
|
||||
|
||||
|
||||
INLINE int gba_chip_has_conflict( UINT32 chip )
|
||||
static inline int gba_chip_has_conflict( UINT32 chip )
|
||||
{
|
||||
int count1 = 0, count2 = 0;
|
||||
if (chip & GBA_CHIP_EEPROM) count1++;
|
||||
|
@ -1191,7 +1191,7 @@ WRITE8_MEMBER( isa8_cga_device::io_write )
|
||||
// proc = cga_pgfx_4bpp;
|
||||
//
|
||||
|
||||
//INLINE void pgfx_plot_unit_4bpp(bitmap_ind16 &bitmap,
|
||||
//static inline void pgfx_plot_unit_4bpp(bitmap_ind16 &bitmap,
|
||||
// int x, int y, int offs)
|
||||
//{
|
||||
// int color, values[2];
|
||||
@ -1259,7 +1259,7 @@ WRITE8_MEMBER( isa8_cga_device::io_write )
|
||||
//
|
||||
//
|
||||
//
|
||||
//INLINE void pgfx_plot_unit_2bpp(bitmap_ind16 &bitmap,
|
||||
//static inline void pgfx_plot_unit_2bpp(bitmap_ind16 &bitmap,
|
||||
// int x, int y, const UINT16 *palette, int offs)
|
||||
//{
|
||||
// int i;
|
||||
|
@ -60,7 +60,7 @@ md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *
|
||||
|
||||
// HELPERS
|
||||
|
||||
INLINE int get_inc(int mode)
|
||||
static inline int get_inc(int mode)
|
||||
{
|
||||
int inc = (mode >> 11) & 7;
|
||||
if (inc != 0) {
|
||||
@ -71,7 +71,7 @@ INLINE int get_inc(int mode)
|
||||
return inc;
|
||||
}
|
||||
|
||||
INLINE void overwrite_write(UINT16 *dst, UINT16 d)
|
||||
static inline void overwrite_write(UINT16 *dst, UINT16 d)
|
||||
{
|
||||
if (d & 0xf000) { *dst &= ~0xf000; *dst |= d & 0xf000; }
|
||||
if (d & 0x0f00) { *dst &= ~0x0f00; *dst |= d & 0x0f00; }
|
||||
|
@ -41,13 +41,13 @@ struct UINT32BE
|
||||
UINT8 bytes[4];
|
||||
};
|
||||
|
||||
INLINE UINT32 get_UINT32BE(UINT32BE word)
|
||||
static inline UINT32 get_UINT32BE(UINT32BE word)
|
||||
{
|
||||
return (word.bytes[0] << 24) | (word.bytes[1] << 16) | (word.bytes[2] << 8) | word.bytes[3];
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
INLINE void set_UINT32BE(UINT32BE *word, UINT32 data)
|
||||
static inline void set_UINT32BE(UINT32BE *word, UINT32 data)
|
||||
{
|
||||
word->bytes[0] = (data >> 24) & 0xff;
|
||||
word->bytes[1] = (data >> 16) & 0xff;
|
||||
|
@ -25,7 +25,7 @@ static const char *reg_names[32] =
|
||||
};
|
||||
|
||||
// determines if right rotate or I/O field length is to be used
|
||||
INLINE bool is_rot(UINT16 opcode)
|
||||
static inline bool is_rot(UINT16 opcode)
|
||||
{
|
||||
if((opcode & 0x1000) || (opcode & 0x0010))
|
||||
return false;
|
||||
@ -33,7 +33,7 @@ INLINE bool is_rot(UINT16 opcode)
|
||||
return true;
|
||||
}
|
||||
|
||||
INLINE bool is_src_rot(UINT16 opcode)
|
||||
static inline bool is_src_rot(UINT16 opcode)
|
||||
{
|
||||
if((opcode & 0x1000))
|
||||
return false;
|
||||
|
@ -68,7 +68,7 @@
|
||||
descriptor
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT32 epc(const opcode_desc *desc)
|
||||
static inline UINT32 epc(const opcode_desc *desc)
|
||||
{
|
||||
return desc->pc;
|
||||
}
|
||||
@ -79,7 +79,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
|
||||
already allocated
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void alloc_handle(drcuml_state *drcuml, uml::code_handle **handleptr, const char *name)
|
||||
static inline void alloc_handle(drcuml_state *drcuml, uml::code_handle **handleptr, const char *name)
|
||||
{
|
||||
if (*handleptr == nullptr)
|
||||
*handleptr = drcuml->handle_alloc(name);
|
||||
|
@ -35,7 +35,7 @@ static const char *const condition[16] =
|
||||
CODE CODE
|
||||
***************************************************************************/
|
||||
|
||||
INLINE char *src2(UINT32 op, int scale)
|
||||
static inline char *src2(UINT32 op, int scale)
|
||||
{
|
||||
static char temp[20];
|
||||
if ((op & 0xffe0) == 0xffe0)
|
||||
|
@ -66,7 +66,7 @@
|
||||
#define ENABLE_VERBOSE_LOG (0)
|
||||
|
||||
#if ENABLE_VERBOSE_LOG
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog(UINT16 pc, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog(UINT16 pc, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ static const char *const regnamee[] =
|
||||
|
||||
static char tempbuf[10][40];
|
||||
|
||||
INLINE char *signed_16bit_unary(INT16 val)
|
||||
static inline char *signed_16bit_unary(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
@ -95,7 +95,7 @@ INLINE char *signed_16bit_unary(INT16 val)
|
||||
return temp;
|
||||
}
|
||||
|
||||
INLINE char *signed_16bit_sep(INT16 val)
|
||||
static inline char *signed_16bit_sep(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
@ -105,7 +105,7 @@ INLINE char *signed_16bit_sep(INT16 val)
|
||||
return temp;
|
||||
}
|
||||
|
||||
INLINE char *signed_16bit_sep_nospace(INT16 val)
|
||||
static inline char *signed_16bit_sep_nospace(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
@ -115,7 +115,7 @@ INLINE char *signed_16bit_sep_nospace(INT16 val)
|
||||
return temp;
|
||||
}
|
||||
|
||||
INLINE char *unsigned_16bit_size(INT16 val, UINT8 size)
|
||||
static inline char *unsigned_16bit_size(INT16 val, UINT8 size)
|
||||
{
|
||||
static char temp[10];
|
||||
if (size)
|
||||
|
@ -34,7 +34,7 @@ static inline INT64 SX64(INT64 x) { return (x & S64(0x0000800000000000)) ? x | S
|
||||
#define VERBOSE_EXEC 0
|
||||
|
||||
#if VERBOSE
|
||||
INLINE void ATTR_PRINTF(1,2) log_to_stderr(const char *format, ...) {
|
||||
static inline void ATTR_PRINTF(1,2) log_to_stderr(const char *format, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vfprintf(stderr, format, ap);
|
||||
|
@ -46,7 +46,7 @@
|
||||
#define MAKE_INT_8(A) (int8)((A)&0xff)
|
||||
#else
|
||||
#define int8 int
|
||||
INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
#endif /* UCHAR_MAX == 0xff */
|
||||
|
||||
#define MAKE_UINT_8(A) ((A)&0xff)
|
||||
|
@ -141,26 +141,26 @@ static const g65816_opcode_struct g_opcodes[256] =
|
||||
static const UINT8 *base_oprom;
|
||||
static UINT32 base_pc;
|
||||
|
||||
INLINE unsigned int read_8(unsigned int address)
|
||||
static inline unsigned int read_8(unsigned int address)
|
||||
{
|
||||
address = ADDRESS_65816(address);
|
||||
return base_oprom[address - base_pc];
|
||||
}
|
||||
|
||||
INLINE unsigned int read_16(unsigned int address)
|
||||
static inline unsigned int read_16(unsigned int address)
|
||||
{
|
||||
unsigned int val = read_8(address);
|
||||
return val | (read_8(address+1)<<8);
|
||||
}
|
||||
|
||||
INLINE unsigned int read_24(unsigned int address)
|
||||
static inline unsigned int read_24(unsigned int address)
|
||||
{
|
||||
unsigned int val = read_8(address);
|
||||
val |= (read_8(address+1)<<8);
|
||||
return val | (read_8(address+2)<<16);
|
||||
}
|
||||
|
||||
INLINE char* int_8_str(unsigned int val)
|
||||
static inline char* int_8_str(unsigned int val)
|
||||
{
|
||||
static char str[20];
|
||||
|
||||
@ -174,7 +174,7 @@ INLINE char* int_8_str(unsigned int val)
|
||||
return str;
|
||||
}
|
||||
|
||||
INLINE char* int_16_str(unsigned int val)
|
||||
static inline char* int_16_str(unsigned int val)
|
||||
{
|
||||
static char str[20];
|
||||
|
||||
|
@ -1993,7 +1993,7 @@ static UINT8 curmode;
|
||||
#define MODRM_REG2 (modrm & 0x7)
|
||||
#define MODRM_MOD ((modrm >> 6) & 0x3)
|
||||
|
||||
INLINE UINT8 FETCH(void)
|
||||
static inline UINT8 FETCH(void)
|
||||
{
|
||||
if ((opcode_ptr - opcode_ptr_base) + 1 > max_length)
|
||||
return 0xff;
|
||||
@ -2002,7 +2002,7 @@ INLINE UINT8 FETCH(void)
|
||||
}
|
||||
|
||||
#if 0
|
||||
INLINE UINT16 FETCH16(void)
|
||||
static inline UINT16 FETCH16(void)
|
||||
{
|
||||
UINT16 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 2 > max_length)
|
||||
@ -2014,7 +2014,7 @@ INLINE UINT16 FETCH16(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
INLINE UINT32 FETCH32(void)
|
||||
static inline UINT32 FETCH32(void)
|
||||
{
|
||||
UINT32 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 4 > max_length)
|
||||
@ -2025,7 +2025,7 @@ INLINE UINT32 FETCH32(void)
|
||||
return d;
|
||||
}
|
||||
|
||||
INLINE UINT8 FETCHD(void)
|
||||
static inline UINT8 FETCHD(void)
|
||||
{
|
||||
if ((opcode_ptr - opcode_ptr_base) + 1 > max_length)
|
||||
return 0xff;
|
||||
@ -2033,7 +2033,7 @@ INLINE UINT8 FETCHD(void)
|
||||
return *opcode_ptr++;
|
||||
}
|
||||
|
||||
INLINE UINT16 FETCHD16(void)
|
||||
static inline UINT16 FETCHD16(void)
|
||||
{
|
||||
UINT16 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 2 > max_length)
|
||||
@ -2044,7 +2044,7 @@ INLINE UINT16 FETCHD16(void)
|
||||
return d;
|
||||
}
|
||||
|
||||
INLINE UINT32 FETCHD32(void)
|
||||
static inline UINT32 FETCHD32(void)
|
||||
{
|
||||
UINT32 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 4 > max_length)
|
||||
|
@ -1200,7 +1200,7 @@ void i386_device::pentium_tzcnt_r32_rm32()
|
||||
// TODO: actually implement TZCNT
|
||||
}
|
||||
|
||||
INLINE INT8 SaturatedSignedWordToSignedByte(INT16 word)
|
||||
static inline INT8 SaturatedSignedWordToSignedByte(INT16 word)
|
||||
{
|
||||
if (word > 127)
|
||||
return 127;
|
||||
@ -1209,7 +1209,7 @@ INLINE INT8 SaturatedSignedWordToSignedByte(INT16 word)
|
||||
return (INT8)word;
|
||||
}
|
||||
|
||||
INLINE UINT8 SaturatedSignedWordToUnsignedByte(INT16 word)
|
||||
static inline UINT8 SaturatedSignedWordToUnsignedByte(INT16 word)
|
||||
{
|
||||
if (word > 255)
|
||||
return 255;
|
||||
@ -1218,7 +1218,7 @@ INLINE UINT8 SaturatedSignedWordToUnsignedByte(INT16 word)
|
||||
return (UINT8)word;
|
||||
}
|
||||
|
||||
INLINE INT16 SaturatedSignedDwordToSignedWord(INT32 dword)
|
||||
static inline INT16 SaturatedSignedDwordToSignedWord(INT32 dword)
|
||||
{
|
||||
if (dword > 32767)
|
||||
return 32767;
|
||||
@ -1227,7 +1227,7 @@ INLINE INT16 SaturatedSignedDwordToSignedWord(INT32 dword)
|
||||
return (INT16)dword;
|
||||
}
|
||||
|
||||
INLINE UINT16 SaturatedSignedDwordToUnsignedWord(INT32 dword)
|
||||
static inline UINT16 SaturatedSignedDwordToUnsignedWord(INT32 dword)
|
||||
{
|
||||
if (dword > 65535)
|
||||
return 65535;
|
||||
@ -3786,7 +3786,7 @@ void i386_device::sse_subps() // Opcode 0f 5c
|
||||
CYCLES(1); // TODO: correct cycle count
|
||||
}
|
||||
|
||||
INLINE float sse_min_single(float src1, float src2)
|
||||
static inline float sse_min_single(float src1, float src2)
|
||||
{
|
||||
/*if ((src1 == 0) && (src2 == 0))
|
||||
return src2;
|
||||
@ -3799,7 +3799,7 @@ INLINE float sse_min_single(float src1, float src2)
|
||||
return src2;
|
||||
}
|
||||
|
||||
INLINE double sse_min_double(double src1, double src2)
|
||||
static inline double sse_min_double(double src1, double src2)
|
||||
{
|
||||
/*if ((src1 == 0) && (src2 == 0))
|
||||
return src2;
|
||||
@ -3852,7 +3852,7 @@ void i386_device::sse_divps() // Opcode 0f 5e
|
||||
CYCLES(1); // TODO: correct cycle count
|
||||
}
|
||||
|
||||
INLINE float sse_max_single(float src1, float src2)
|
||||
static inline float sse_max_single(float src1, float src2)
|
||||
{
|
||||
/*if ((src1 == 0) && (src2 == 0))
|
||||
return src2;
|
||||
@ -3865,7 +3865,7 @@ INLINE float sse_max_single(float src1, float src2)
|
||||
return src2;
|
||||
}
|
||||
|
||||
INLINE double sse_max_double(double src1, double src2)
|
||||
static inline double sse_max_double(double src1, double src2)
|
||||
{
|
||||
/*if ((src1 == 0) && (src2 == 0))
|
||||
return src2;
|
||||
@ -4333,25 +4333,25 @@ void i386_device::sse_unpckhpd_r128_rm128() // Opcode 66 0f 15
|
||||
CYCLES(1); // TODO: correct cycle count
|
||||
}
|
||||
|
||||
INLINE bool sse_issingleordered(float op1, float op2)
|
||||
static inline bool sse_issingleordered(float op1, float op2)
|
||||
{
|
||||
// TODO: true when at least one of the two source operands being compared is a NaN
|
||||
return (op1 != op1) || (op1 != op2);
|
||||
}
|
||||
|
||||
INLINE bool sse_issingleunordered(float op1, float op2)
|
||||
static inline bool sse_issingleunordered(float op1, float op2)
|
||||
{
|
||||
// TODO: true when neither source operand is a NaN
|
||||
return !((op1 != op1) || (op1 != op2));
|
||||
}
|
||||
|
||||
INLINE bool sse_isdoubleordered(double op1, double op2)
|
||||
static inline bool sse_isdoubleordered(double op1, double op2)
|
||||
{
|
||||
// TODO: true when at least one of the two source operands being compared is a NaN
|
||||
return (op1 != op1) || (op1 != op2);
|
||||
}
|
||||
|
||||
INLINE bool sse_isdoubleunordered(double op1, double op2)
|
||||
static inline bool sse_isdoubleunordered(double op1, double op2)
|
||||
{
|
||||
// TODO: true when neither source operand is a NaN
|
||||
return !((op1 != op1) || (op1 != op2));
|
||||
|
@ -117,7 +117,7 @@ extern flag floatx80_is_nan( floatx80 a );
|
||||
|
||||
extern flag floatx80_is_signaling_nan(floatx80 a);
|
||||
|
||||
INLINE flag floatx80_is_quiet_nan(floatx80 a)
|
||||
static inline flag floatx80_is_quiet_nan(floatx80 a)
|
||||
{
|
||||
bits64 aLow;
|
||||
|
||||
@ -128,36 +128,36 @@ INLINE flag floatx80_is_quiet_nan(floatx80 a)
|
||||
&& (a.low != aLow);
|
||||
}
|
||||
|
||||
INLINE int floatx80_is_zero(floatx80 fx)
|
||||
static inline int floatx80_is_zero(floatx80 fx)
|
||||
{
|
||||
return (((fx.high & 0x7fff) == 0) && ((fx.low << 1) == 0));
|
||||
}
|
||||
|
||||
INLINE int floatx80_is_inf(floatx80 fx)
|
||||
static inline int floatx80_is_inf(floatx80 fx)
|
||||
{
|
||||
return (((fx.high & 0x7fff) == 0x7fff) && ((fx.low << 1) == 0));
|
||||
}
|
||||
|
||||
INLINE int floatx80_is_denormal(floatx80 fx)
|
||||
static inline int floatx80_is_denormal(floatx80 fx)
|
||||
{
|
||||
return (((fx.high & 0x7fff) == 0) &&
|
||||
((fx.low & U64(0x8000000000000000)) == 0) &&
|
||||
((fx.low << 1) != 0));
|
||||
}
|
||||
|
||||
INLINE floatx80 floatx80_abs(floatx80 fx)
|
||||
static inline floatx80 floatx80_abs(floatx80 fx)
|
||||
{
|
||||
fx.high &= 0x7fff;
|
||||
return fx;
|
||||
}
|
||||
|
||||
INLINE double fx80_to_double(floatx80 fx)
|
||||
static inline double fx80_to_double(floatx80 fx)
|
||||
{
|
||||
UINT64 d = floatx80_to_float64(fx);
|
||||
return *(double*)&d;
|
||||
}
|
||||
|
||||
INLINE floatx80 double_to_fx80(double in)
|
||||
static inline floatx80 double_to_fx80(double in)
|
||||
{
|
||||
return float64_to_floatx80(*(UINT64*)&in);
|
||||
}
|
||||
|
@ -896,7 +896,7 @@ void i860_cpu_device::dump_state (i860s *cpustate)
|
||||
#endif
|
||||
|
||||
/* Sign extend N-bit number. */
|
||||
INLINE INT32 sign_ext (UINT32 x, int n)
|
||||
static inline INT32 sign_ext (UINT32 x, int n)
|
||||
{
|
||||
INT32 t;
|
||||
t = x >> (n - 1);
|
||||
|
@ -69,7 +69,7 @@ static const char *const condition[32] =
|
||||
CODE CODE
|
||||
***************************************************************************/
|
||||
|
||||
INLINE char *signed_16bit(INT16 val)
|
||||
static inline char *signed_16bit(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define MAKE_INT_8(A) (int8)((A)&0xff)
|
||||
#else
|
||||
#define int8 int
|
||||
INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
#endif /* UCHAR_MAX == 0xff */
|
||||
|
||||
#define MAKE_UINT_8(A) ((A)&0xff)
|
||||
|
@ -321,25 +321,25 @@ static const m7700_opcode_struct g_opcodes_prefix89[256] =
|
||||
{JSR, I, AXI }, {SBC, M, AX }, {INC, M, AX }, {SBC, M, ALX }
|
||||
};
|
||||
|
||||
INLINE unsigned int read_8(const UINT8 *oprom, unsigned int offset)
|
||||
static inline unsigned int read_8(const UINT8 *oprom, unsigned int offset)
|
||||
{
|
||||
return oprom[offset];
|
||||
}
|
||||
|
||||
INLINE unsigned int read_16(const UINT8 *oprom, unsigned int offset)
|
||||
static inline unsigned int read_16(const UINT8 *oprom, unsigned int offset)
|
||||
{
|
||||
unsigned int val = read_8(oprom, offset);
|
||||
return val | (read_8(oprom, offset+1)<<8);
|
||||
}
|
||||
|
||||
INLINE unsigned int read_24(const UINT8 *oprom, unsigned int offset)
|
||||
static inline unsigned int read_24(const UINT8 *oprom, unsigned int offset)
|
||||
{
|
||||
unsigned int val = read_8(oprom, offset);
|
||||
val |= (read_8(oprom, offset+1)<<8);
|
||||
return val | (read_8(oprom, offset+2)<<16);
|
||||
}
|
||||
|
||||
INLINE char* int_8_str(unsigned int val)
|
||||
static inline char* int_8_str(unsigned int val)
|
||||
{
|
||||
static char str[20];
|
||||
|
||||
@ -353,7 +353,7 @@ INLINE char* int_8_str(unsigned int val)
|
||||
return str;
|
||||
}
|
||||
|
||||
INLINE char* int_16_str(unsigned int val)
|
||||
static inline char* int_16_str(unsigned int val)
|
||||
{
|
||||
static char str[20];
|
||||
|
||||
|
@ -496,119 +496,119 @@ extern const UINT8 m68ki_exception_cycle_table[][256];
|
||||
extern const UINT8 m68ki_ea_idx_cycle_table[];
|
||||
|
||||
/* Read data immediately after the program counter */
|
||||
INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k);
|
||||
static inline UINT32 m68ki_read_imm_16(m68000_base_device *m68k);
|
||||
static inline UINT32 m68ki_read_imm_32(m68000_base_device *m68k);
|
||||
|
||||
/* Read data with specific function code */
|
||||
INLINE UINT32 m68ki_read_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
INLINE UINT32 m68ki_read_16_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
INLINE UINT32 m68ki_read_32_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
static inline UINT32 m68ki_read_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
static inline UINT32 m68ki_read_16_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
static inline UINT32 m68ki_read_32_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc);
|
||||
|
||||
/* Write data with specific function code */
|
||||
INLINE void m68ki_write_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
static inline void m68ki_write_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
static inline void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
static inline void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
static inline void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value);
|
||||
|
||||
/* Indexed and PC-relative ea fetching */
|
||||
INLINE UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k);
|
||||
INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k);
|
||||
INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An);
|
||||
static inline UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k);
|
||||
static inline UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k);
|
||||
static inline UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An);
|
||||
|
||||
/* Operand fetching */
|
||||
INLINE UINT32 OPER_AY_AI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_AI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_AI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PD_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PD_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_PD_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_DI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_DI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_DI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_IX_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_IX_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AY_IX_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_AI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_AI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_AI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PD_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PD_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_PD_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_DI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_DI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_DI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_IX_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_IX_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AY_IX_32(m68000_base_device *m68k);
|
||||
|
||||
INLINE UINT32 OPER_AX_AI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_AI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_AI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PD_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PD_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_PD_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_DI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_DI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_DI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_IX_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_IX_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AX_IX_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_AI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_AI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_AI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PD_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PD_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_PD_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_DI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_DI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_DI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_IX_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_IX_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AX_IX_32(m68000_base_device *m68k);
|
||||
|
||||
INLINE UINT32 OPER_A7_PI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_A7_PD_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_A7_PI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_A7_PD_8(m68000_base_device *m68k);
|
||||
|
||||
INLINE UINT32 OPER_AW_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AW_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AW_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AL_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AL_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_AL_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCDI_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCDI_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCDI_32(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCIX_8(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCIX_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 OPER_PCIX_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AW_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AW_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AW_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AL_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AL_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_AL_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCDI_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCDI_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCDI_32(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCIX_8(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCIX_16(m68000_base_device *m68k);
|
||||
static inline UINT32 OPER_PCIX_32(m68000_base_device *m68k);
|
||||
|
||||
/* Stack operations */
|
||||
INLINE void m68ki_push_16(m68000_base_device *m68k, UINT32 value);
|
||||
INLINE void m68ki_push_32(m68000_base_device *m68k, UINT32 value);
|
||||
INLINE UINT32 m68ki_pull_16(m68000_base_device *m68k);
|
||||
INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k);
|
||||
static inline void m68ki_push_16(m68000_base_device *m68k, UINT32 value);
|
||||
static inline void m68ki_push_32(m68000_base_device *m68k, UINT32 value);
|
||||
static inline UINT32 m68ki_pull_16(m68000_base_device *m68k);
|
||||
static inline UINT32 m68ki_pull_32(m68000_base_device *m68k);
|
||||
|
||||
/* Program flow operations */
|
||||
INLINE void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc);
|
||||
INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector);
|
||||
INLINE void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset);
|
||||
INLINE void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset);
|
||||
INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset);
|
||||
static inline void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc);
|
||||
static inline void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector);
|
||||
static inline void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset);
|
||||
static inline void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset);
|
||||
static inline void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset);
|
||||
|
||||
/* Status register operations. */
|
||||
INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value); /* Only bit 2 of value should be set (i.e. 4 or 0) */
|
||||
INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value); /* only bits 1 and 2 of value should be set */
|
||||
INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value); /* set the condition code register */
|
||||
INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value); /* set the status register */
|
||||
INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value); /* set the status register */
|
||||
static inline void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value); /* Only bit 2 of value should be set (i.e. 4 or 0) */
|
||||
static inline void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value); /* only bits 1 and 2 of value should be set */
|
||||
static inline void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value); /* set the condition code register */
|
||||
static inline void m68ki_set_sr(m68000_base_device *m68k, UINT32 value); /* set the status register */
|
||||
static inline void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value); /* set the status register */
|
||||
|
||||
/* Exception processing */
|
||||
INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k); /* Initial exception processing */
|
||||
static inline UINT32 m68ki_init_exception(m68000_base_device *m68k); /* Initial exception processing */
|
||||
|
||||
INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr); /* Stack various frame types */
|
||||
INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr);
|
||||
static inline void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr); /* Stack various frame types */
|
||||
static inline void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr);
|
||||
|
||||
INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector);
|
||||
INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address);
|
||||
INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address);
|
||||
INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu);
|
||||
static inline void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
static inline void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
static inline void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector);
|
||||
static inline void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector);
|
||||
static inline void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address);
|
||||
static inline void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address);
|
||||
static inline void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu);
|
||||
|
||||
INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector);
|
||||
INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector);
|
||||
INLINE void m68ki_exception_trace(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_1010(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_1111(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_illegal(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_format_error(m68000_base_device *m68k);
|
||||
INLINE void m68ki_exception_address_error(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector);
|
||||
static inline void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector);
|
||||
static inline void m68ki_exception_trace(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_privilege_violation(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_1010(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_1111(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_illegal(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_format_error(m68000_base_device *m68k);
|
||||
static inline void m68ki_exception_address_error(m68000_base_device *m68k);
|
||||
|
||||
INLINE void m68ki_check_interrupts(m68000_base_device *m68k); /* ASG: check for interrupts */
|
||||
static inline void m68ki_check_interrupts(m68000_base_device *m68k); /* ASG: check for interrupts */
|
||||
|
||||
/* quick disassembly (used for logging) */
|
||||
char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type);
|
||||
@ -619,12 +619,12 @@ char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type);
|
||||
/* ======================================================================== */
|
||||
|
||||
|
||||
INLINE unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsigned int address)
|
||||
static inline unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsigned int address)
|
||||
{
|
||||
return ((m68k->readimm16(address&~1)>>(8*(1-(address & 1))))&0xff);
|
||||
}
|
||||
|
||||
INLINE unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address)
|
||||
static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address)
|
||||
{
|
||||
if(address & 1)
|
||||
return
|
||||
@ -636,7 +636,7 @@ INLINE unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned i
|
||||
(m68k->readimm16(address ) );
|
||||
}
|
||||
|
||||
INLINE unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address)
|
||||
static inline unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address)
|
||||
{
|
||||
if(address & 1)
|
||||
return
|
||||
@ -656,7 +656,7 @@ INLINE unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned i
|
||||
* A real 68k first writes the high word to [address+2], and then writes the
|
||||
* low word to [address].
|
||||
*/
|
||||
INLINE void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int address, unsigned int value)
|
||||
static inline void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int address, unsigned int value)
|
||||
{
|
||||
m68k->/*memory.*/write16(address+2, value>>16);
|
||||
m68k->/*memory.*/write16(address, value&0xffff);
|
||||
@ -666,7 +666,7 @@ INLINE void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int addr
|
||||
/* ---------------------------- Read Immediate ---------------------------- */
|
||||
|
||||
// clear the instruction cache
|
||||
INLINE void m68ki_ic_clear(m68000_base_device *m68k)
|
||||
static inline void m68ki_ic_clear(m68000_base_device *m68k)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i< M68K_IC_SIZE; i++) {
|
||||
@ -676,7 +676,7 @@ INLINE void m68ki_ic_clear(m68000_base_device *m68k)
|
||||
|
||||
// read immediate word using the instruction cache
|
||||
|
||||
INLINE UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address)
|
||||
static inline UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address)
|
||||
{
|
||||
if (m68k->cacr & M68K_CACR_EI)
|
||||
{
|
||||
@ -725,7 +725,7 @@ INLINE UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address)
|
||||
/* Handles all immediate reads, does address error check, function code setting,
|
||||
* and prefetching if they are enabled in m68kconf.h
|
||||
*/
|
||||
INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_read_imm_16(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 result;
|
||||
|
||||
@ -752,7 +752,7 @@ INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k)
|
||||
return result;
|
||||
}
|
||||
|
||||
INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_read_imm_32(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 temp_val;
|
||||
|
||||
@ -789,13 +789,13 @@ INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k)
|
||||
* These functions will also check for address error and set the function
|
||||
* code if they are enabled in m68kconf.h.
|
||||
*/
|
||||
INLINE UINT32 m68ki_read_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
static inline UINT32 m68ki_read_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
{
|
||||
m68k->mmu_tmp_fc = fc;
|
||||
m68k->mmu_tmp_rw = 1;
|
||||
return m68k->/*memory.*/read8(address);
|
||||
}
|
||||
INLINE UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
static inline UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
{
|
||||
if (CPU_TYPE_IS_010_LESS(m68k->cpu_type))
|
||||
{
|
||||
@ -805,7 +805,7 @@ INLINE UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32
|
||||
m68k->mmu_tmp_rw = 1;
|
||||
return m68k->/*memory.*/read16(address);
|
||||
}
|
||||
INLINE UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
static inline UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc)
|
||||
{
|
||||
if (CPU_TYPE_IS_010_LESS(m68k->cpu_type))
|
||||
{
|
||||
@ -816,13 +816,13 @@ INLINE UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32
|
||||
return m68k->/*memory.*/read32(address);
|
||||
}
|
||||
|
||||
INLINE void m68ki_write_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
static inline void m68ki_write_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
{
|
||||
m68k->mmu_tmp_fc = fc;
|
||||
m68k->mmu_tmp_rw = 0;
|
||||
m68k->/*memory.*/write8(address, value);
|
||||
}
|
||||
INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
static inline void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
{
|
||||
if (CPU_TYPE_IS_010_LESS(m68k->cpu_type))
|
||||
{
|
||||
@ -832,7 +832,7 @@ INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 f
|
||||
m68k->mmu_tmp_rw = 0;
|
||||
m68k->/*memory.*/write16(address, value);
|
||||
}
|
||||
INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
static inline void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
{
|
||||
if (CPU_TYPE_IS_010_LESS(m68k->cpu_type))
|
||||
{
|
||||
@ -848,7 +848,7 @@ INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 f
|
||||
* A real 68k first writes the high word to [address+2], and then writes the
|
||||
* low word to [address].
|
||||
*/
|
||||
INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
static inline void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value)
|
||||
{
|
||||
if (CPU_TYPE_IS_010_LESS(m68k->cpu_type))
|
||||
{
|
||||
@ -866,14 +866,14 @@ INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT3
|
||||
/* The program counter relative addressing modes cause operands to be
|
||||
* retrieved from program space, not data space.
|
||||
*/
|
||||
INLINE UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 old_pc = REG_PC(m68k);
|
||||
return old_pc + MAKE_INT_16(m68ki_read_imm_16(m68k));
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k)
|
||||
{
|
||||
return m68ki_get_ea_ix(m68k, REG_PC(m68k));
|
||||
}
|
||||
@ -920,7 +920,7 @@ INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k)
|
||||
* 1 011 mem indir with long outer
|
||||
* 1 100-111 reserved
|
||||
*/
|
||||
INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An)
|
||||
static inline UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An)
|
||||
{
|
||||
/* An = base register */
|
||||
UINT32 extension = m68ki_read_imm_16(m68k);
|
||||
@ -993,78 +993,78 @@ INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An)
|
||||
|
||||
|
||||
/* Fetch operands */
|
||||
INLINE UINT32 OPER_AY_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AY_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AY_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AY_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AY_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AY_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AY_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AY_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AY_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AY_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AY_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AY_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AY_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
|
||||
INLINE UINT32 OPER_AX_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AX_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AX_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AX_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AX_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AX_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AX_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AX_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AX_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AX_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AX_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AX_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AX_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
|
||||
INLINE UINT32 OPER_A7_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_A7_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_A7_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PI_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_A7_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PD_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
|
||||
INLINE UINT32 OPER_AW_8(m68000_base_device *m68k) {UINT32 ea = EA_AW_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AW_16(m68000_base_device *m68k) {UINT32 ea = EA_AW_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AW_32(m68000_base_device *m68k) {UINT32 ea = EA_AW_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_AL_8(m68000_base_device *m68k) {UINT32 ea = EA_AL_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_AL_16(m68000_base_device *m68k) {UINT32 ea = EA_AL_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_AL_32(m68000_base_device *m68k) {UINT32 ea = EA_AL_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_PCDI_8(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_8(m68k); return m68ki_read_pcrel_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_PCDI_16(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_16(m68k); return m68ki_read_pcrel_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_PCDI_32(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_32(m68k); return m68ki_read_pcrel_32(m68k, ea);}
|
||||
INLINE UINT32 OPER_PCIX_8(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_8(m68k); return m68ki_read_pcrel_8(m68k, ea); }
|
||||
INLINE UINT32 OPER_PCIX_16(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_16(m68k); return m68ki_read_pcrel_16(m68k, ea);}
|
||||
INLINE UINT32 OPER_PCIX_32(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_32(m68k); return m68ki_read_pcrel_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AW_8(m68000_base_device *m68k) {UINT32 ea = EA_AW_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AW_16(m68000_base_device *m68k) {UINT32 ea = EA_AW_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AW_32(m68000_base_device *m68k) {UINT32 ea = EA_AW_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_AL_8(m68000_base_device *m68k) {UINT32 ea = EA_AL_8(m68k); return m68ki_read_8(m68k, ea); }
|
||||
static inline UINT32 OPER_AL_16(m68000_base_device *m68k) {UINT32 ea = EA_AL_16(m68k); return m68ki_read_16(m68k, ea);}
|
||||
static inline UINT32 OPER_AL_32(m68000_base_device *m68k) {UINT32 ea = EA_AL_32(m68k); return m68ki_read_32(m68k, ea);}
|
||||
static inline UINT32 OPER_PCDI_8(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_8(m68k); return m68ki_read_pcrel_8(m68k, ea); }
|
||||
static inline UINT32 OPER_PCDI_16(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_16(m68k); return m68ki_read_pcrel_16(m68k, ea);}
|
||||
static inline UINT32 OPER_PCDI_32(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_32(m68k); return m68ki_read_pcrel_32(m68k, ea);}
|
||||
static inline UINT32 OPER_PCIX_8(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_8(m68k); return m68ki_read_pcrel_8(m68k, ea); }
|
||||
static inline UINT32 OPER_PCIX_16(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_16(m68k); return m68ki_read_pcrel_16(m68k, ea);}
|
||||
static inline UINT32 OPER_PCIX_32(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_32(m68k); return m68ki_read_pcrel_32(m68k, ea);}
|
||||
|
||||
|
||||
|
||||
/* ---------------------------- Stack Functions --------------------------- */
|
||||
|
||||
/* Push/pull data from the stack */
|
||||
INLINE void m68ki_push_16(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_push_16(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 2);
|
||||
m68ki_write_16(m68k, REG_SP(m68k), value);
|
||||
}
|
||||
|
||||
INLINE void m68ki_push_32(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_push_32(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 4);
|
||||
m68ki_write_32(m68k, REG_SP(m68k), value);
|
||||
}
|
||||
|
||||
INLINE UINT32 m68ki_pull_16(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_pull_16(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 2);
|
||||
return m68ki_read_16(m68k, REG_SP(m68k)-2);
|
||||
}
|
||||
|
||||
INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_pull_32(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 4);
|
||||
return m68ki_read_32(m68k, REG_SP(m68k)-4);
|
||||
@ -1074,22 +1074,22 @@ INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k)
|
||||
/* Increment/decrement the stack as if doing a push/pull but
|
||||
* don't do any memory access.
|
||||
*/
|
||||
INLINE void m68ki_fake_push_16(m68000_base_device *m68k)
|
||||
static inline void m68ki_fake_push_16(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 2);
|
||||
}
|
||||
|
||||
INLINE void m68ki_fake_push_32(m68000_base_device *m68k)
|
||||
static inline void m68ki_fake_push_32(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 4);
|
||||
}
|
||||
|
||||
INLINE void m68ki_fake_pull_16(m68000_base_device *m68k)
|
||||
static inline void m68ki_fake_pull_16(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 2);
|
||||
}
|
||||
|
||||
INLINE void m68ki_fake_pull_32(m68000_base_device *m68k)
|
||||
static inline void m68ki_fake_pull_32(m68000_base_device *m68k)
|
||||
{
|
||||
REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 4);
|
||||
}
|
||||
@ -1101,12 +1101,12 @@ INLINE void m68ki_fake_pull_32(m68000_base_device *m68k)
|
||||
* These functions will also call the pc_changed callback if it was enabled
|
||||
* in m68kconf.h.
|
||||
*/
|
||||
INLINE void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc)
|
||||
static inline void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc)
|
||||
{
|
||||
REG_PC(m68k) = new_pc;
|
||||
}
|
||||
|
||||
INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector)
|
||||
static inline void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector)
|
||||
{
|
||||
REG_PC(m68k) = (vector<<2) + m68k->vbr;
|
||||
REG_PC(m68k) = m68ki_read_data_32(m68k, REG_PC(m68k));
|
||||
@ -1118,17 +1118,17 @@ INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector)
|
||||
* So far I've found no problems with not calling pc_changed for 8 or 16
|
||||
* bit branches.
|
||||
*/
|
||||
INLINE void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset)
|
||||
static inline void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset)
|
||||
{
|
||||
REG_PC(m68k) += MAKE_INT_8(offset);
|
||||
}
|
||||
|
||||
INLINE void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset)
|
||||
static inline void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset)
|
||||
{
|
||||
REG_PC(m68k) += MAKE_INT_16(offset);
|
||||
}
|
||||
|
||||
INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset)
|
||||
static inline void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset)
|
||||
{
|
||||
REG_PC(m68k) += offset;
|
||||
}
|
||||
@ -1140,7 +1140,7 @@ INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset)
|
||||
/* Set the S flag and change the active stack pointer.
|
||||
* Note that value MUST be 4 or 0.
|
||||
*/
|
||||
INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
/* Backup the old stack pointer */
|
||||
REG_SP_BASE(m68k)[m68k->s_flag | ((m68k->s_flag>>1) & m68k->m_flag)] = REG_SP(m68k);
|
||||
@ -1153,7 +1153,7 @@ INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value)
|
||||
/* Set the S and M flags and change the active stack pointer.
|
||||
* Note that value MUST be 0, 2, 4, or 6 (bit2 = S, bit1 = M).
|
||||
*/
|
||||
INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
/* Backup the old stack pointer */
|
||||
REG_SP_BASE(m68k)[m68k->s_flag | ((m68k->s_flag>>1) & m68k->m_flag)] = REG_SP(m68k);
|
||||
@ -1165,7 +1165,7 @@ INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value)
|
||||
}
|
||||
|
||||
/* Set the S and M flags. Don't touch the stack pointer. */
|
||||
INLINE void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
/* Set the S and M flags */
|
||||
m68k->s_flag = value & SFLAG_SET;
|
||||
@ -1174,7 +1174,7 @@ INLINE void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
|
||||
|
||||
/* Set the condition code register */
|
||||
INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
m68k->x_flag = BIT_4(value) << 4;
|
||||
m68k->n_flag = BIT_3(value) << 4;
|
||||
@ -1184,7 +1184,7 @@ INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value)
|
||||
}
|
||||
|
||||
/* Set the status register but don't check for interrupts */
|
||||
INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
/* Mask out the "unimplemented" bits */
|
||||
value &= m68k->sr_mask;
|
||||
@ -1200,7 +1200,7 @@ INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value)
|
||||
/* Set the status register but don't check for interrupts nor
|
||||
* change the stack pointer
|
||||
*/
|
||||
INLINE void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
/* Mask out the "unimplemented" bits */
|
||||
value &= m68k->sr_mask;
|
||||
@ -1214,7 +1214,7 @@ INLINE void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value)
|
||||
}
|
||||
|
||||
/* Set the status register and check for interrupts */
|
||||
INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value)
|
||||
static inline void m68ki_set_sr(m68000_base_device *m68k, UINT32 value)
|
||||
{
|
||||
m68ki_set_sr_noint(m68k, value);
|
||||
m68ki_check_interrupts(m68k);
|
||||
@ -1224,7 +1224,7 @@ INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value)
|
||||
/* ------------------------- Exception Processing ------------------------- */
|
||||
|
||||
/* Initiate exception processing */
|
||||
INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k)
|
||||
static inline UINT32 m68ki_init_exception(m68000_base_device *m68k)
|
||||
{
|
||||
/* Save the old status register */
|
||||
UINT32 sr = m68ki_get_sr(m68k);
|
||||
@ -1239,7 +1239,7 @@ INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* 3 word stack frame (68000 only) */
|
||||
INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr)
|
||||
static inline void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr)
|
||||
{
|
||||
m68ki_push_32(m68k, pc);
|
||||
m68ki_push_16(m68k, sr);
|
||||
@ -1248,7 +1248,7 @@ INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32
|
||||
/* Format 0 stack frame.
|
||||
* This is the standard stack frame for 68010+.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
static inline void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
{
|
||||
/* Stack a 3-word frame if we are 68000 */
|
||||
if(m68k->cpu_type == CPU_TYPE_000 || m68k->cpu_type == CPU_TYPE_008)
|
||||
@ -1264,7 +1264,7 @@ INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 s
|
||||
/* Format 1 stack frame (68020).
|
||||
* For 68020, this is the 4 word throwaway frame.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
static inline void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
{
|
||||
m68ki_push_16(m68k, 0x1000 | (vector<<2));
|
||||
m68ki_push_32(m68k, pc);
|
||||
@ -1274,7 +1274,7 @@ INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 s
|
||||
/* Format 2 stack frame.
|
||||
* This is used only by 68020 for trap exceptions.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector)
|
||||
static inline void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector)
|
||||
{
|
||||
m68ki_push_32(m68k, REG_PPC(m68k));
|
||||
m68ki_push_16(m68k, 0x2000 | (vector<<2));
|
||||
@ -1285,7 +1285,7 @@ INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 v
|
||||
|
||||
/* Bus error stack frame (68000 only).
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr)
|
||||
static inline void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr)
|
||||
{
|
||||
m68ki_push_32(m68k, REG_PC(m68k));
|
||||
m68ki_push_16(m68k, sr);
|
||||
@ -1302,7 +1302,7 @@ INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr)
|
||||
/* Format 8 stack frame (68010).
|
||||
* 68010 only. This is the 29 word bus/address error frame.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
static inline void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector)
|
||||
{
|
||||
/* VERSION
|
||||
* NUMBER
|
||||
@ -1356,7 +1356,7 @@ INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 s
|
||||
* if the error happens at an instruction boundary.
|
||||
* PC stacked is address of next instruction.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address)
|
||||
static inline void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address)
|
||||
{
|
||||
int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now
|
||||
int orig_fc = m68k->mmu_tmp_buserror_fc;
|
||||
@ -1408,7 +1408,7 @@ INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 v
|
||||
* if the error happens during instruction execution.
|
||||
* PC stacked is address of instruction in progress.
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address)
|
||||
static inline void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address)
|
||||
{
|
||||
int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now
|
||||
int orig_fc = m68k->mmu_tmp_buserror_fc;
|
||||
@ -1482,7 +1482,7 @@ INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 v
|
||||
* This is used by the 68040 for bus fault and mmu trap
|
||||
* 30 words
|
||||
*/
|
||||
INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu)
|
||||
static inline void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu)
|
||||
{
|
||||
int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now
|
||||
int orig_fc = m68k->mmu_tmp_buserror_fc;
|
||||
@ -1525,7 +1525,7 @@ INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 v
|
||||
/* Used for Group 2 exceptions.
|
||||
* These stack a type 2 frame on the 020.
|
||||
*/
|
||||
INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector)
|
||||
static inline void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
|
||||
@ -1541,7 +1541,7 @@ INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector)
|
||||
}
|
||||
|
||||
/* Trap#n stacks a 0 frame but behaves like group2 otherwise */
|
||||
INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector)
|
||||
static inline void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
m68ki_stack_frame_0000(m68k, REG_PC(m68k), sr, vector);
|
||||
@ -1552,7 +1552,7 @@ INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector)
|
||||
}
|
||||
|
||||
/* Exception for trace mode */
|
||||
INLINE void m68ki_exception_trace(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_trace(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
|
||||
@ -1577,7 +1577,7 @@ INLINE void m68ki_exception_trace(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for privilege violation */
|
||||
INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_privilege_violation(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
|
||||
@ -1594,7 +1594,7 @@ INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for A-Line instructions */
|
||||
INLINE void m68ki_exception_1010(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_1010(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr;
|
||||
|
||||
@ -1607,7 +1607,7 @@ INLINE void m68ki_exception_1010(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for F-Line instructions */
|
||||
INLINE void m68ki_exception_1111(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_1111(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr;
|
||||
|
||||
@ -1620,7 +1620,7 @@ INLINE void m68ki_exception_1111(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for illegal instructions */
|
||||
INLINE void m68ki_exception_illegal(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_illegal(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr;
|
||||
|
||||
@ -1639,7 +1639,7 @@ INLINE void m68ki_exception_illegal(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for format errror in RTE */
|
||||
INLINE void m68ki_exception_format_error(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_format_error(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
m68ki_stack_frame_0000(m68k, REG_PC(m68k), sr, EXCEPTION_FORMAT_ERROR);
|
||||
@ -1650,7 +1650,7 @@ INLINE void m68ki_exception_format_error(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
/* Exception for address error */
|
||||
INLINE void m68ki_exception_address_error(m68000_base_device *m68k)
|
||||
static inline void m68ki_exception_address_error(m68000_base_device *m68k)
|
||||
{
|
||||
UINT32 sr = m68ki_init_exception(m68k);
|
||||
|
||||
@ -1678,7 +1678,7 @@ INLINE void m68ki_exception_address_error(m68000_base_device *m68k)
|
||||
|
||||
|
||||
/* ASG: Check for interrupts */
|
||||
INLINE void m68ki_check_interrupts(m68000_base_device *m68k)
|
||||
static inline void m68ki_check_interrupts(m68000_base_device *m68k)
|
||||
{
|
||||
if(m68k->nmi_pending)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ static const UINT32 pkmask3[18] =
|
||||
0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
|
||||
};
|
||||
|
||||
INLINE double fx80_to_double(floatx80 fx)
|
||||
static inline double fx80_to_double(floatx80 fx)
|
||||
{
|
||||
UINT64 d;
|
||||
double *foo;
|
||||
@ -44,7 +44,7 @@ INLINE double fx80_to_double(floatx80 fx)
|
||||
return *foo;
|
||||
}
|
||||
|
||||
INLINE floatx80 double_to_fx80(double in)
|
||||
static inline floatx80 double_to_fx80(double in)
|
||||
{
|
||||
UINT64 *d;
|
||||
|
||||
@ -53,7 +53,7 @@ INLINE floatx80 double_to_fx80(double in)
|
||||
return float64_to_floatx80(*d);
|
||||
}
|
||||
|
||||
INLINE floatx80 load_extended_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
static inline floatx80 load_extended_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
{
|
||||
UINT32 d1,d2;
|
||||
UINT16 d3;
|
||||
@ -69,7 +69,7 @@ INLINE floatx80 load_extended_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
return fp;
|
||||
}
|
||||
|
||||
INLINE void store_extended_float80(m68000_base_device *m68k, UINT32 ea, floatx80 fpr)
|
||||
static inline void store_extended_float80(m68000_base_device *m68k, UINT32 ea, floatx80 fpr)
|
||||
{
|
||||
m68ki_write_16(m68k, ea+0, fpr.high);
|
||||
m68ki_write_16(m68k, ea+2, 0);
|
||||
@ -77,7 +77,7 @@ INLINE void store_extended_float80(m68000_base_device *m68k, UINT32 ea, floatx80
|
||||
m68ki_write_32(m68k, ea+8, fpr.low&0xffffffff);
|
||||
}
|
||||
|
||||
INLINE floatx80 load_pack_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
static inline floatx80 load_pack_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
{
|
||||
UINT32 dw1, dw2, dw3;
|
||||
floatx80 result;
|
||||
@ -128,7 +128,7 @@ INLINE floatx80 load_pack_float80(m68000_base_device *m68k, UINT32 ea)
|
||||
return result;
|
||||
}
|
||||
|
||||
INLINE void store_pack_float80(m68000_base_device *m68k, UINT32 ea, int k, floatx80 fpr)
|
||||
static inline void store_pack_float80(m68000_base_device *m68k, UINT32 ea, int k, floatx80 fpr)
|
||||
{
|
||||
UINT32 dw1, dw2, dw3;
|
||||
char str[128], *ch;
|
||||
@ -260,7 +260,7 @@ INLINE void store_pack_float80(m68000_base_device *m68k, UINT32 ea, int k, float
|
||||
m68ki_write_32(m68k, ea+8, dw3);
|
||||
}
|
||||
|
||||
INLINE void SET_CONDITION_CODES(m68000_base_device *m68k, floatx80 reg)
|
||||
static inline void SET_CONDITION_CODES(m68000_base_device *m68k, floatx80 reg)
|
||||
{
|
||||
// UINT64 *regi;
|
||||
|
||||
@ -293,7 +293,7 @@ INLINE void SET_CONDITION_CODES(m68000_base_device *m68k, floatx80 reg)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE int TEST_CONDITION(m68000_base_device *m68k, int condition)
|
||||
static inline int TEST_CONDITION(m68000_base_device *m68k, int condition)
|
||||
{
|
||||
int n = (REG_FPSR(m68k) & FPCC_N) != 0;
|
||||
int z = (REG_FPSR(m68k) & FPCC_Z) != 0;
|
||||
|
@ -176,7 +176,7 @@ void pmmu_atc_flush(m68000_base_device *m68k)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 get_dt2_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 ptest)
|
||||
static inline UINT32 get_dt2_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 ptest)
|
||||
{
|
||||
UINT32 tbl_entry = m68k->program->read_dword(tptr);
|
||||
UINT32 dt = tbl_entry & M68K_MMU_DF_DT;
|
||||
@ -198,7 +198,7 @@ INLINE UINT32 get_dt2_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 p
|
||||
return tbl_entry;
|
||||
}
|
||||
|
||||
INLINE UINT32 get_dt3_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 fc, UINT8 ptest)
|
||||
static inline UINT32 get_dt3_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 fc, UINT8 ptest)
|
||||
{
|
||||
UINT32 tbl_entry2 = m68k->program->read_dword(tptr);
|
||||
UINT32 tbl_entry = m68k->program->read_dword(tptr + 4);
|
||||
@ -226,7 +226,7 @@ INLINE UINT32 get_dt3_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 f
|
||||
/*
|
||||
pmmu_translate_addr_with_fc: perform 68851/68030-style PMMU address translation
|
||||
*/
|
||||
/*INLINE*/ static UINT32 pmmu_translate_addr_with_fc(m68000_base_device *m68k, UINT32 addr_in, UINT8 fc, UINT8 ptest)
|
||||
/*static inline*/ static UINT32 pmmu_translate_addr_with_fc(m68000_base_device *m68k, UINT32 addr_in, UINT8 fc, UINT8 ptest)
|
||||
{
|
||||
UINT32 addr_out, tbl_entry = 0, tamode = 0, tbmode = 0, tcmode = 0;
|
||||
UINT32 root_aptr, root_limit, tofs, ps, is, abits, bbits, cbits;
|
||||
@ -525,7 +525,7 @@ INLINE UINT32 get_dt3_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 f
|
||||
|
||||
// FC bits: 2 = supervisor, 1 = program, 0 = data
|
||||
// the 68040 is a subset of the 68851 and 68030 PMMUs - the page table sizes are fixed, there is no early termination, etc, etc.
|
||||
/*INLINE*/ static UINT32 pmmu_translate_addr_with_fc_040(m68000_base_device *m68k, UINT32 addr_in, UINT8 fc, UINT8 ptest)
|
||||
/*static inline*/ static UINT32 pmmu_translate_addr_with_fc_040(m68000_base_device *m68k, UINT32 addr_in, UINT8 fc, UINT8 ptest)
|
||||
{
|
||||
UINT32 addr_out, tt0, tt1;
|
||||
|
||||
@ -809,7 +809,7 @@ INLINE UINT32 get_dt3_table_entry(m68000_base_device *m68k, UINT32 tptr, UINT8 f
|
||||
/*
|
||||
pmmu_translate_addr: perform 68851/68030-style PMMU address translation
|
||||
*/
|
||||
/*INLINE*/ static UINT32 pmmu_translate_addr(m68000_base_device *m68k, UINT32 addr_in)
|
||||
/*static inline*/ static UINT32 pmmu_translate_addr(m68000_base_device *m68k, UINT32 addr_in)
|
||||
{
|
||||
UINT32 addr_out;
|
||||
|
||||
@ -1111,7 +1111,7 @@ void m68881_mmu_ops(m68000_base_device *m68k)
|
||||
|
||||
|
||||
/* Apple HMMU translation is much simpler */
|
||||
INLINE UINT32 hmmu_translate_addr(m68000_base_device *m68k, UINT32 addr_in)
|
||||
static inline UINT32 hmmu_translate_addr(m68000_base_device *m68k, UINT32 addr_in)
|
||||
{
|
||||
UINT32 addr_out;
|
||||
|
||||
|
@ -29,7 +29,7 @@ static void tlb_entry_log_half(mips3_tlb_entry *entry, int tlbindex, int which);
|
||||
TLB entry matches the provided ASID
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int tlb_entry_matches_asid(const mips3_tlb_entry *entry, UINT8 asid)
|
||||
static inline int tlb_entry_matches_asid(const mips3_tlb_entry *entry, UINT8 asid)
|
||||
{
|
||||
return (entry->entry_hi & 0xff) == asid;
|
||||
}
|
||||
@ -40,7 +40,7 @@ INLINE int tlb_entry_matches_asid(const mips3_tlb_entry *entry, UINT8 asid)
|
||||
TLB entry is global
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int tlb_entry_is_global(const mips3_tlb_entry *entry)
|
||||
static inline int tlb_entry_is_global(const mips3_tlb_entry *entry)
|
||||
{
|
||||
return (entry->entry_lo[0] & entry->entry_lo[1] & TLB_GLOBAL);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static const UINT8 fcc_shift[8] = { 23, 25, 26, 27, 28, 29, 30, 31 };
|
||||
descriptor
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT32 epc(const opcode_desc *desc)
|
||||
static inline UINT32 epc(const opcode_desc *desc)
|
||||
{
|
||||
return (desc->flags & OPFLAG_IN_DELAY_SLOT) ? (desc->pc - 3) : desc->pc;
|
||||
}
|
||||
@ -102,7 +102,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
|
||||
already allocated
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
|
||||
static inline void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
|
||||
{
|
||||
if (*handleptr == nullptr)
|
||||
*handleptr = drcuml->handle_alloc(name);
|
||||
|
@ -101,7 +101,7 @@ static const char *const ccreg[4][32] =
|
||||
CODE CODE
|
||||
***************************************************************************/
|
||||
|
||||
INLINE char *signed_16bit(INT16 val)
|
||||
static inline char *signed_16bit(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
|
@ -82,7 +82,7 @@ static const char *const ccreg[4][32] =
|
||||
CODE CODE
|
||||
***************************************************************************/
|
||||
|
||||
INLINE char *signed_16bit(INT16 val)
|
||||
static inline char *signed_16bit(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
|
@ -875,7 +875,7 @@ static char modrm_string[256];
|
||||
|
||||
#define MAX_LENGTH 8
|
||||
|
||||
INLINE UINT8 FETCH(void)
|
||||
static inline UINT8 FETCH(void)
|
||||
{
|
||||
if ((opcode_ptr - opcode_ptr_base) + 1 > MAX_LENGTH)
|
||||
return 0xff;
|
||||
@ -884,7 +884,7 @@ INLINE UINT8 FETCH(void)
|
||||
}
|
||||
|
||||
#if 0
|
||||
INLINE UINT16 FETCH16(void)
|
||||
static inline UINT16 FETCH16(void)
|
||||
{
|
||||
UINT16 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 2 > MAX_LENGTH)
|
||||
@ -896,7 +896,7 @@ INLINE UINT16 FETCH16(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
INLINE UINT8 FETCHD(void)
|
||||
static inline UINT8 FETCHD(void)
|
||||
{
|
||||
if ((opcode_ptr - opcode_ptr_base) + 1 > MAX_LENGTH)
|
||||
return 0xff;
|
||||
@ -904,7 +904,7 @@ INLINE UINT8 FETCHD(void)
|
||||
return *opcode_ptr++;
|
||||
}
|
||||
|
||||
INLINE UINT16 FETCHD16(void)
|
||||
static inline UINT16 FETCHD16(void)
|
||||
{
|
||||
UINT16 d;
|
||||
if ((opcode_ptr - opcode_ptr_base) + 2 > MAX_LENGTH)
|
||||
|
@ -7,7 +7,7 @@
|
||||
static int ib;
|
||||
static int y;
|
||||
|
||||
INLINE void ea (void)
|
||||
static inline void ea (void)
|
||||
{
|
||||
/* while (1)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ ppc405gp_device::ppc405gp_device(const machine_config &mconfig, const char *tag,
|
||||
of access and the protection bits
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int page_access_allowed(int transtype, UINT8 key, UINT8 protbits)
|
||||
static inline int page_access_allowed(int transtype, UINT8 key, UINT8 protbits)
|
||||
{
|
||||
if (key == 0)
|
||||
return (transtype == TRANSLATE_WRITE) ? (protbits != 3) : TRUE;
|
||||
@ -450,7 +450,7 @@ inline void ppc_device::set_decrementer(UINT32 newdec)
|
||||
is_nan_double - is a double value a NaN
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_nan_double(double x)
|
||||
static inline int is_nan_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return( ((xi & DOUBLE_EXP) == DOUBLE_EXP) &&
|
||||
@ -464,7 +464,7 @@ INLINE int is_nan_double(double x)
|
||||
quiet NaN
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_qnan_double(double x)
|
||||
static inline int is_qnan_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return( ((xi & DOUBLE_EXP) == DOUBLE_EXP) &&
|
||||
@ -479,7 +479,7 @@ INLINE int is_qnan_double(double x)
|
||||
signaling NaN
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_snan_double(double x)
|
||||
static inline int is_snan_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return( ((xi & DOUBLE_EXP) == DOUBLE_EXP) &&
|
||||
@ -494,7 +494,7 @@ INLINE int is_snan_double(double x)
|
||||
infinity
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_infinity_double(double x)
|
||||
static inline int is_infinity_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return( ((xi & DOUBLE_EXP) == DOUBLE_EXP) &&
|
||||
@ -507,7 +507,7 @@ INLINE int is_infinity_double(double x)
|
||||
normalized
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_normalized_double(double x)
|
||||
static inline int is_normalized_double(double x)
|
||||
{
|
||||
UINT64 exp;
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
@ -522,7 +522,7 @@ INLINE int is_normalized_double(double x)
|
||||
denormalized
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int is_denormalized_double(double x)
|
||||
static inline int is_denormalized_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return( ((xi & DOUBLE_EXP) == 0) &&
|
||||
@ -534,7 +534,7 @@ INLINE int is_denormalized_double(double x)
|
||||
sign_double - return sign of a double value
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int sign_double(double x)
|
||||
static inline int sign_double(double x)
|
||||
{
|
||||
UINT64 xi = *(UINT64*)&x;
|
||||
return ((xi & DOUBLE_SIGN) != 0);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ void ATTR_PRINTF(2,3) GTELOG( UINT32 pc, const char *a, ...)
|
||||
logerror( "%08x: GTE: %s\n", pc, s_text );
|
||||
}
|
||||
#else
|
||||
INLINE void ATTR_PRINTF(2,3) GTELOG( UINT32 pc, const char *a, ...) {}
|
||||
static inline void ATTR_PRINTF(2,3) GTELOG( UINT32 pc, const char *a, ...) {}
|
||||
#endif
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ void gte::setcp2cr( UINT32 pc, int reg, UINT32 value )
|
||||
m_cp2cr[ reg ].d = value;
|
||||
}
|
||||
|
||||
INLINE INT64 gte_shift( INT64 a, int sf )
|
||||
static inline INT64 gte_shift( INT64 a, int sf )
|
||||
{
|
||||
if( sf > 0 )
|
||||
{
|
||||
@ -307,7 +307,7 @@ INT32 gte::BOUNDS( int44 value, int max_flag, int min_flag )
|
||||
return gte_shift( value.value(), m_sf );
|
||||
}
|
||||
|
||||
INLINE UINT32 gte_divide( UINT16 numerator, UINT16 denominator )
|
||||
static inline UINT32 gte_divide( UINT16 numerator, UINT16 denominator )
|
||||
{
|
||||
if( numerator < ( denominator * 2 ) )
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#define PSX_IRQ_MASK ( 0x7fd )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
@ -83,13 +83,13 @@ void psxmdec_device::device_start()
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
INLINE void psxwriteword( UINT32 *p_n_psxram, UINT32 n_address, UINT16 n_data )
|
||||
static inline void psxwriteword( UINT32 *p_n_psxram, UINT32 n_address, UINT16 n_data )
|
||||
{
|
||||
*( (UINT16 *)( (UINT8 *)p_n_psxram + WORD_XOR_LE( n_address ) ) ) = n_data;
|
||||
}
|
||||
#endif
|
||||
|
||||
INLINE UINT16 psxreadword( UINT32 *p_n_psxram, UINT32 n_address )
|
||||
static inline UINT16 psxreadword( UINT32 *p_n_psxram, UINT32 n_address )
|
||||
{
|
||||
return *( (UINT16 *)( (UINT8 *)p_n_psxram + WORD_XOR_LE( n_address ) ) );
|
||||
}
|
||||
@ -161,12 +161,12 @@ void psxmdec_device::mdec_idct( INT32 *p_n_src, INT32 *p_n_dst )
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT16 mdec_unpack_run( UINT16 n_packed )
|
||||
static inline UINT16 mdec_unpack_run( UINT16 n_packed )
|
||||
{
|
||||
return n_packed >> 10;
|
||||
}
|
||||
|
||||
INLINE INT32 mdec_unpack_val( UINT16 n_packed )
|
||||
static inline INT32 mdec_unpack_val( UINT16 n_packed )
|
||||
{
|
||||
return ( ( (INT32)n_packed ) << 22 ) >> 22;
|
||||
}
|
||||
@ -224,22 +224,22 @@ UINT32 psxmdec_device::mdec_unpack( UINT32 *p_n_psxram, UINT32 n_address )
|
||||
return n_address;
|
||||
}
|
||||
|
||||
INLINE INT32 mdec_cr_to_r( INT32 n_cr )
|
||||
static inline INT32 mdec_cr_to_r( INT32 n_cr )
|
||||
{
|
||||
return ( 1435 * n_cr ) >> 10;
|
||||
}
|
||||
|
||||
INLINE INT32 mdec_cr_to_g( INT32 n_cr )
|
||||
static inline INT32 mdec_cr_to_g( INT32 n_cr )
|
||||
{
|
||||
return ( -731 * n_cr ) >> 10;
|
||||
}
|
||||
|
||||
INLINE INT32 mdec_cb_to_g( INT32 n_cb )
|
||||
static inline INT32 mdec_cb_to_g( INT32 n_cb )
|
||||
{
|
||||
return ( -351 * n_cb ) >> 10;
|
||||
}
|
||||
|
||||
INLINE INT32 mdec_cb_to_b( INT32 n_cb )
|
||||
static inline INT32 mdec_cb_to_b( INT32 n_cb )
|
||||
{
|
||||
return ( 1814 * n_cb ) >> 10;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ static const char *const element2[16] =
|
||||
"00000000", "11111111", "22222222", "33333333", "44444444", "55555555", "66666666", "77777777"
|
||||
};
|
||||
|
||||
INLINE char *signed_imm16(UINT32 op)
|
||||
static inline char *signed_imm16(UINT32 op)
|
||||
{
|
||||
static char temp[10];
|
||||
INT16 value = op & 0xffff;
|
||||
|
@ -64,7 +64,7 @@ extern offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op);
|
||||
descriptor
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT32 epc(const opcode_desc *desc)
|
||||
static inline UINT32 epc(const opcode_desc *desc)
|
||||
{
|
||||
return ((desc->flags & OPFLAG_IN_DELAY_SLOT) ? (desc->pc - 3) : desc->pc) | 0x1000;
|
||||
}
|
||||
@ -75,7 +75,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
|
||||
already allocated
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
|
||||
static inline void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
|
||||
{
|
||||
if (*handleptr == nullptr)
|
||||
*handleptr = drcuml->handle_alloc(name);
|
||||
|
@ -16,7 +16,7 @@ static const int tcnt_div[8] = { 4, 16, 64, 256, 1024, 1, 1, 1 };
|
||||
a (constant+1) where 0 <= constant < 2^32
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE attotime sh4_scale_up_mame_time(const attotime &_time1, UINT32 factor1)
|
||||
static inline attotime sh4_scale_up_mame_time(const attotime &_time1, UINT32 factor1)
|
||||
{
|
||||
return _time1 * factor1 + _time1;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ Address Function Register R/W When Reset Remarks
|
||||
#define MAKE_INT_8(A) (int8)((A)&0xff)
|
||||
#else
|
||||
#define int8 int
|
||||
INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
|
||||
#endif /* UCHAR_MAX == 0xff */
|
||||
|
||||
#define MAKE_UINT_8(A) ((A)&0xff)
|
||||
|
@ -323,13 +323,13 @@ static const spc700_opcode_struct g_opcodes[256] =
|
||||
static unsigned int g_pc;
|
||||
static const UINT8 *rombase;
|
||||
|
||||
INLINE unsigned int read_8_immediate(void)
|
||||
static inline unsigned int read_8_immediate(void)
|
||||
{
|
||||
g_pc++;
|
||||
return *rombase++;
|
||||
}
|
||||
|
||||
INLINE unsigned int read_16_immediate(void)
|
||||
static inline unsigned int read_16_immediate(void)
|
||||
{
|
||||
unsigned int result;
|
||||
g_pc += 2;
|
||||
|
@ -25,7 +25,7 @@ CPU_DISASSEMBLE( ssem );
|
||||
// The de facto snapshot format for other SSEM simulators stores the data physically in that format as well.
|
||||
// Therefore, in MESS, every 32-bit word has its bits reversed, too, and as a result the values must be
|
||||
// un-reversed before being used.
|
||||
INLINE UINT32 reverse(UINT32 v)
|
||||
static inline UINT32 reverse(UINT32 v)
|
||||
{
|
||||
// Taken from http://www-graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
|
||||
// swap odd and even bits
|
||||
|
@ -19,7 +19,7 @@ static void ATTR_PRINTF(1,2) print(const char *fmt, ...)
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
INLINE UINT32 reverse(UINT32 v)
|
||||
static inline UINT32 reverse(UINT32 v)
|
||||
{
|
||||
// Taken from http://www-graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
|
||||
// swap odd and even bits
|
||||
|
@ -31,7 +31,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#if 0
|
||||
INLINE char *signed_16bit(INT16 val)
|
||||
static inline char *signed_16bit(INT16 val)
|
||||
{
|
||||
static char temp[10];
|
||||
if (val < 0)
|
||||
|
@ -314,7 +314,7 @@ static const enum opcodes ops_001c_002f_s0[20]=
|
||||
static int PC;
|
||||
|
||||
|
||||
INLINE UINT16 readop_arg(const UINT8 *opram, unsigned pc)
|
||||
static inline UINT16 readop_arg(const UINT8 *opram, unsigned pc)
|
||||
{
|
||||
UINT16 result = opram[PC++ - pc] << 8;
|
||||
return result | opram[PC++ - pc];
|
||||
|
@ -283,7 +283,7 @@ Other references can be found on spies.com:
|
||||
|
||||
struct tms99xx_state;
|
||||
|
||||
INLINE void execute(tms99xx_state *cpustate, UINT16 opcode);
|
||||
static inline void execute(tms99xx_state *cpustate, UINT16 opcode);
|
||||
|
||||
#if EXTERNAL_INSTRUCTION_DECODING
|
||||
static void external_instruction_notify(tms99xx_state *cpustate, int ext_op_ID);
|
||||
@ -533,7 +533,7 @@ struct tms99xx_state
|
||||
int extra_byte; /* buffer holding the unused byte in a word read */
|
||||
};
|
||||
|
||||
INLINE tms99xx_state *get_safe_token(device_t *device)
|
||||
static inline tms99xx_state *get_safe_token(device_t *device)
|
||||
{
|
||||
assert(device != NULL);
|
||||
// assert(device->type() == TMS99XX_GET_INFO);
|
||||
@ -803,7 +803,7 @@ WRITE8_HANDLER(tms9995_internal2_w)
|
||||
makes memory access slower, I have emulated this feature, because if I did otherwise,
|
||||
there would be some implementation problems in some driver sooner or later.*/
|
||||
|
||||
INLINE int readword(tms99xx_state *cpustate, int addr)
|
||||
static inline int readword(tms99xx_state *cpustate, int addr)
|
||||
{
|
||||
int val;
|
||||
|
||||
@ -1082,7 +1082,7 @@ WRITE8_HANDLER(tms9995_internal2_w)
|
||||
#define READREG(reg) readword(cpustate, (cpustate->WP+(reg)) & 0xffff)
|
||||
#define WRITEREG(reg, data) writeword(cpustate, (cpustate->WP+(reg)) & 0xffff, (data))
|
||||
|
||||
INLINE UINT16 READREG_DEBUG(tms99xx_state *cpustate, int reg)
|
||||
static inline UINT16 READREG_DEBUG(tms99xx_state *cpustate, int reg)
|
||||
{
|
||||
int temp = cpustate->icount;
|
||||
UINT16 result = READREG(reg);
|
||||
@ -1090,7 +1090,7 @@ INLINE UINT16 READREG_DEBUG(tms99xx_state *cpustate, int reg)
|
||||
return result;
|
||||
}
|
||||
|
||||
INLINE void WRITEREG_DEBUG(tms99xx_state *cpustate, int reg, UINT16 data)
|
||||
static inline void WRITEREG_DEBUG(tms99xx_state *cpustate, int reg, UINT16 data)
|
||||
{
|
||||
int temp = cpustate->icount;
|
||||
WRITEREG(reg, data);
|
||||
@ -1173,7 +1173,7 @@ INLINE void WRITEREG_DEBUG(tms99xx_state *cpustate, int reg, UINT16 data)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void handle_error_interrupt(tms99xx_state *cpustate)
|
||||
static inline void handle_error_interrupt(tms99xx_state *cpustate)
|
||||
{
|
||||
if (cpustate->error_interrupt_callback)
|
||||
(*cpustate->error_interrupt_callback)(cpustate->device, cpustate->error_interrupt_register ? 1 : 0);
|
||||
@ -1339,12 +1339,12 @@ static const UINT16 inverted_right_shift_mask_table[17] =
|
||||
0xFFFF
|
||||
};
|
||||
|
||||
INLINE UINT16 logical_right_shift(UINT16 val, int c)
|
||||
static inline UINT16 logical_right_shift(UINT16 val, int c)
|
||||
{
|
||||
return((val>>c) & right_shift_mask_table[c]);
|
||||
}
|
||||
|
||||
INLINE INT16 arithmetic_right_shift(INT16 val, int c)
|
||||
static inline INT16 arithmetic_right_shift(INT16 val, int c)
|
||||
{
|
||||
if (val < 0)
|
||||
return((val>>c) | inverted_right_shift_mask_table[c]);
|
||||
@ -1359,7 +1359,7 @@ INLINE INT16 arithmetic_right_shift(INT16 val, int c)
|
||||
/*
|
||||
Set lae
|
||||
*/
|
||||
INLINE void setst_lae(tms99xx_state *cpustate, INT16 val)
|
||||
static inline void setst_lae(tms99xx_state *cpustate, INT16 val)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ);
|
||||
|
||||
@ -1375,7 +1375,7 @@ INLINE void setst_lae(tms99xx_state *cpustate, INT16 val)
|
||||
/*
|
||||
Set laep (BYTE)
|
||||
*/
|
||||
INLINE void setst_byte_laep(tms99xx_state *cpustate, INT8 val)
|
||||
static inline void setst_byte_laep(tms99xx_state *cpustate, INT8 val)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ);
|
||||
|
||||
@ -1392,7 +1392,7 @@ INLINE void setst_byte_laep(tms99xx_state *cpustate, INT8 val)
|
||||
/*
|
||||
For COC, CZC, and TB
|
||||
*/
|
||||
INLINE void setst_e(tms99xx_state *cpustate, UINT16 val, UINT16 to)
|
||||
static inline void setst_e(tms99xx_state *cpustate, UINT16 val, UINT16 to)
|
||||
{
|
||||
if (val == to)
|
||||
cpustate->STATUS |= ST_EQ;
|
||||
@ -1403,7 +1403,7 @@ INLINE void setst_e(tms99xx_state *cpustate, UINT16 val, UINT16 to)
|
||||
/*
|
||||
For CI, C, CB
|
||||
*/
|
||||
INLINE void setst_c_lae(tms99xx_state *cpustate, UINT16 to, UINT16 val)
|
||||
static inline void setst_c_lae(tms99xx_state *cpustate, UINT16 to, UINT16 val)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ);
|
||||
|
||||
@ -1421,7 +1421,7 @@ INLINE void setst_c_lae(tms99xx_state *cpustate, UINT16 to, UINT16 val)
|
||||
/*
|
||||
Set laeco for add
|
||||
*/
|
||||
INLINE INT16 setst_add_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
static inline INT16 setst_add_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
{
|
||||
UINT32 res;
|
||||
INT16 res2;
|
||||
@ -1457,7 +1457,7 @@ INLINE INT16 setst_add_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
/*
|
||||
Set laeco for subtract
|
||||
*/
|
||||
INLINE INT16 setst_sub_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
static inline INT16 setst_sub_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
{
|
||||
UINT32 res;
|
||||
INT16 res2;
|
||||
@ -1493,7 +1493,7 @@ INLINE INT16 setst_sub_laeco(tms99xx_state *cpustate, int a, int b)
|
||||
/*
|
||||
Set laecop for add (BYTE)
|
||||
*/
|
||||
INLINE INT8 setst_addbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
static inline INT8 setst_addbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
{
|
||||
unsigned int res;
|
||||
INT8 res2;
|
||||
@ -1531,7 +1531,7 @@ INLINE INT8 setst_addbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
/*
|
||||
Set laecop for subtract (BYTE)
|
||||
*/
|
||||
INLINE INT8 setst_subbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
static inline INT8 setst_subbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
{
|
||||
unsigned int res;
|
||||
INT8 res2;
|
||||
@ -1570,7 +1570,7 @@ INLINE INT8 setst_subbyte_laecop(tms99xx_state *cpustate, int a, int b)
|
||||
/*
|
||||
For NEG
|
||||
*/
|
||||
INLINE void setst_laeo(tms99xx_state *cpustate, INT16 val)
|
||||
static inline void setst_laeo(tms99xx_state *cpustate, INT16 val)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ | ST_OV);
|
||||
|
||||
@ -1591,7 +1591,7 @@ INLINE void setst_laeo(tms99xx_state *cpustate, INT16 val)
|
||||
/*
|
||||
Meat of SRA
|
||||
*/
|
||||
INLINE UINT16 setst_sra_laec(tms99xx_state *cpustate, INT16 a, UINT16 c)
|
||||
static inline UINT16 setst_sra_laec(tms99xx_state *cpustate, INT16 a, UINT16 c)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ | ST_C);
|
||||
|
||||
@ -1617,7 +1617,7 @@ INLINE UINT16 setst_sra_laec(tms99xx_state *cpustate, INT16 a, UINT16 c)
|
||||
/*
|
||||
Meat of SRL. Same algorithm as SRA, except that we fills in with 0s.
|
||||
*/
|
||||
INLINE UINT16 setst_srl_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
static inline UINT16 setst_srl_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ | ST_C);
|
||||
|
||||
@ -1643,7 +1643,7 @@ INLINE UINT16 setst_srl_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
//
|
||||
// Meat of SRC
|
||||
//
|
||||
INLINE UINT16 setst_src_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
static inline UINT16 setst_src_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ | ST_C);
|
||||
|
||||
@ -1668,7 +1668,7 @@ INLINE UINT16 setst_src_laec(tms99xx_state *cpustate, UINT16 a,UINT16 c)
|
||||
//
|
||||
// Meat of SLA
|
||||
//
|
||||
INLINE UINT16 setst_sla_laeco(tms99xx_state *cpustate, UINT16 a, UINT16 c)
|
||||
static inline UINT16 setst_sla_laeco(tms99xx_state *cpustate, UINT16 a, UINT16 c)
|
||||
{
|
||||
cpustate->STATUS &= ~ (ST_LGT | ST_AGT | ST_EQ | ST_C | ST_OV);
|
||||
|
||||
@ -1889,7 +1889,7 @@ static CPU_EXIT( tms99xx )
|
||||
}
|
||||
|
||||
/* fetch : read one word at * PC, and increment PC. */
|
||||
INLINE UINT16 fetch(tms99xx_state *cpustate)
|
||||
static inline UINT16 fetch(tms99xx_state *cpustate)
|
||||
{
|
||||
UINT16 value = readword(cpustate, cpustate->PC);
|
||||
cpustate->PC += 2;
|
||||
@ -4971,7 +4971,7 @@ static void h4000b(tms99xx_state *cpustate, UINT16 opcode)
|
||||
}
|
||||
|
||||
|
||||
INLINE void execute(tms99xx_state *cpustate, UINT16 opcode)
|
||||
static inline void execute(tms99xx_state *cpustate, UINT16 opcode)
|
||||
{
|
||||
#if (! HAS_9995_OPCODES)
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, device_t &device, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, device_t &device, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ Up to 4096 bytes can be addressed.
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL (0)
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ void mm58167_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT8 make_bcd(UINT8 data)
|
||||
static inline UINT8 make_bcd(UINT8 data)
|
||||
{
|
||||
return ((data / 10) << 4) | (data % 10);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ void rtc4543_device::device_timer(emu_timer &timer, device_timer_id id, int para
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT8 make_bcd(UINT8 data)
|
||||
static inline UINT8 make_bcd(UINT8 data)
|
||||
{
|
||||
return ((data / 10) << 4) | (data % 10);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -61,12 +61,12 @@ const device_type MK48T08 = &device_creator<mk48t08_device>;
|
||||
INLINE FUNCTIONS
|
||||
***************************************************************************/
|
||||
|
||||
INLINE UINT8 make_bcd(UINT8 data)
|
||||
static inline UINT8 make_bcd(UINT8 data)
|
||||
{
|
||||
return ( ( ( data / 10 ) % 10 ) << 4 ) + ( data % 10 );
|
||||
}
|
||||
|
||||
INLINE UINT8 from_bcd( UINT8 data )
|
||||
static inline UINT8 from_bcd( UINT8 data )
|
||||
{
|
||||
return ( ( ( data >> 4 ) & 15 ) * 10 ) + ( data & 15 );
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ static const ay8910_device::mosfet_param ay8910_mosfet_param =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE void build_3D_table(double rl, const ay8910_device::ay_ym_param *par, const ay8910_device::ay_ym_param *par_env, int normalize, double factor, int zero_is_off, INT32 *tab)
|
||||
static inline void build_3D_table(double rl, const ay8910_device::ay_ym_param *par, const ay8910_device::ay_ym_param *par_env, int normalize, double factor, int zero_is_off, INT32 *tab)
|
||||
{
|
||||
double min = 10.0, max = 0.0;
|
||||
|
||||
@ -490,7 +490,7 @@ INLINE void build_3D_table(double rl, const ay8910_device::ay_ym_param *par, con
|
||||
/* for (e=0;e<16;e++) printf("%d %d\n",e<<10, tab[e<<10]); */
|
||||
}
|
||||
|
||||
INLINE void build_single_table(double rl, const ay8910_device::ay_ym_param *par, int normalize, INT32 *tab, int zero_is_off)
|
||||
static inline void build_single_table(double rl, const ay8910_device::ay_ym_param *par, int normalize, INT32 *tab, int zero_is_off)
|
||||
{
|
||||
int j;
|
||||
double rt;
|
||||
@ -529,7 +529,7 @@ INLINE void build_single_table(double rl, const ay8910_device::ay_ym_param *par,
|
||||
|
||||
}
|
||||
|
||||
INLINE void build_mosfet_resistor_table(const ay8910_device::mosfet_param &par, const double rd, INT32 *tab)
|
||||
static inline void build_mosfet_resistor_table(const ay8910_device::mosfet_param &par, const double rd, INT32 *tab)
|
||||
{
|
||||
int j;
|
||||
|
||||
|
@ -74,7 +74,7 @@ const device_type C140 = &device_creator<c140_device>;
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
INLINE int limit(INT32 in)
|
||||
static inline int limit(INT32 in)
|
||||
{
|
||||
if(in>0x7fff) return 0x7fff;
|
||||
else if(in<-0x8000) return -0x8000;
|
||||
|
@ -218,7 +218,7 @@ DISCRETE_RESET(dss_counter)
|
||||
#define DSS_LFSR_NOISE__FEED DISCRETE_INPUT(4)
|
||||
#define DSS_LFSR_NOISE__BIAS DISCRETE_INPUT(5)
|
||||
|
||||
INLINE int dss_lfsr_function(discrete_device *dev, int myfunc, int in0, int in1, int bitmask)
|
||||
static inline int dss_lfsr_function(discrete_device *dev, int myfunc, int in0, int in1, int bitmask)
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
@ -694,7 +694,7 @@ struct FM_OPN
|
||||
|
||||
|
||||
/* status set and IRQ handling */
|
||||
INLINE void FM_STATUS_SET(FM_ST *ST,int flag)
|
||||
static inline void FM_STATUS_SET(FM_ST *ST,int flag)
|
||||
{
|
||||
/* set status flag */
|
||||
ST->status |= flag;
|
||||
@ -707,7 +707,7 @@ INLINE void FM_STATUS_SET(FM_ST *ST,int flag)
|
||||
}
|
||||
|
||||
/* status reset and IRQ handling */
|
||||
INLINE void FM_STATUS_RESET(FM_ST *ST,int flag)
|
||||
static inline void FM_STATUS_RESET(FM_ST *ST,int flag)
|
||||
{
|
||||
/* reset status flag */
|
||||
ST->status &=~flag;
|
||||
@ -720,7 +720,7 @@ INLINE void FM_STATUS_RESET(FM_ST *ST,int flag)
|
||||
}
|
||||
|
||||
/* IRQ mask set */
|
||||
INLINE void FM_IRQMASK_SET(FM_ST *ST,int flag)
|
||||
static inline void FM_IRQMASK_SET(FM_ST *ST,int flag)
|
||||
{
|
||||
ST->irqmask = flag;
|
||||
/* IRQ handling check */
|
||||
@ -729,7 +729,7 @@ INLINE void FM_IRQMASK_SET(FM_ST *ST,int flag)
|
||||
}
|
||||
|
||||
/* OPN Mode Register Write */
|
||||
INLINE void set_timers( FM_ST *ST, void *n, int v )
|
||||
static inline void set_timers( FM_ST *ST, void *n, int v )
|
||||
{
|
||||
/* b7 = CSM MODE */
|
||||
/* b6 = 3 slot mode */
|
||||
@ -787,7 +787,7 @@ INLINE void set_timers( FM_ST *ST, void *n, int v )
|
||||
|
||||
|
||||
/* Timer A Overflow */
|
||||
INLINE void TimerAOver(FM_ST *ST)
|
||||
static inline void TimerAOver(FM_ST *ST)
|
||||
{
|
||||
/* set status (if enabled) */
|
||||
if(ST->mode & 0x04) FM_STATUS_SET(ST,0x01);
|
||||
@ -796,7 +796,7 @@ INLINE void TimerAOver(FM_ST *ST)
|
||||
if (ST->timer_handler) (ST->timer_handler)(ST->param,0,ST->TAC * ST->timer_prescaler,ST->clock);
|
||||
}
|
||||
/* Timer B Overflow */
|
||||
INLINE void TimerBOver(FM_ST *ST)
|
||||
static inline void TimerBOver(FM_ST *ST)
|
||||
{
|
||||
/* set status (if enabled) */
|
||||
if(ST->mode & 0x08) FM_STATUS_SET(ST,0x02);
|
||||
@ -838,7 +838,7 @@ INLINE void TimerBOver(FM_ST *ST)
|
||||
|
||||
#if FM_BUSY_FLAG_SUPPORT
|
||||
#define FM_BUSY_CLEAR(ST) ((ST)->busy_expiry_time = UNDEFINED_TIME)
|
||||
INLINE UINT8 FM_STATUS_FLAG(FM_ST *ST)
|
||||
static inline UINT8 FM_STATUS_FLAG(FM_ST *ST)
|
||||
{
|
||||
if( COMPARE_TIMES(ST->busy_expiry_time, UNDEFINED_TIME) != 0 )
|
||||
{
|
||||
@ -849,7 +849,7 @@ INLINE UINT8 FM_STATUS_FLAG(FM_ST *ST)
|
||||
}
|
||||
return ST->status;
|
||||
}
|
||||
INLINE void FM_BUSY_SET(FM_ST *ST,int busyclock )
|
||||
static inline void FM_BUSY_SET(FM_ST *ST,int busyclock )
|
||||
{
|
||||
TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(attotime::from_hz(ST->clock), busyclock * ST->timer_prescaler);
|
||||
ST->busy_expiry_time = ADD_TIMES(FM_GET_TIME_NOW(&ST->device->machine()), expiry_period);
|
||||
@ -863,7 +863,7 @@ INLINE void FM_BUSY_SET(FM_ST *ST,int busyclock )
|
||||
|
||||
|
||||
|
||||
INLINE void FM_KEYON(UINT8 type, FM_CH *CH , int s )
|
||||
static inline void FM_KEYON(UINT8 type, FM_CH *CH , int s )
|
||||
{
|
||||
FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
if( !SLOT->key )
|
||||
@ -875,7 +875,7 @@ INLINE void FM_KEYON(UINT8 type, FM_CH *CH , int s )
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void FM_KEYOFF(FM_CH *CH , int s )
|
||||
static inline void FM_KEYOFF(FM_CH *CH , int s )
|
||||
{
|
||||
FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
if( SLOT->key )
|
||||
@ -975,7 +975,7 @@ static void setup_connection( FM_OPN *OPN, FM_CH *CH, int ch )
|
||||
}
|
||||
|
||||
/* set detune & multiple */
|
||||
INLINE void set_det_mul(FM_ST *ST,FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
static inline void set_det_mul(FM_ST *ST,FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->mul = (v&0x0f)? (v&0x0f)*2 : 1;
|
||||
SLOT->DT = ST->dt_tab[(v>>4)&7];
|
||||
@ -983,13 +983,13 @@ INLINE void set_det_mul(FM_ST *ST,FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set total level */
|
||||
INLINE void set_tl(FM_CH *CH,FM_SLOT *SLOT , int v)
|
||||
static inline void set_tl(FM_CH *CH,FM_SLOT *SLOT , int v)
|
||||
{
|
||||
SLOT->tl = (v&0x7f)<<(ENV_BITS-7); /* 7bit TL */
|
||||
}
|
||||
|
||||
/* set attack rate & key scale */
|
||||
INLINE void set_ar_ksr(UINT8 type, FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
static inline void set_ar_ksr(UINT8 type, FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
{
|
||||
UINT8 old_KSR = SLOT->KSR;
|
||||
|
||||
@ -1015,7 +1015,7 @@ INLINE void set_ar_ksr(UINT8 type, FM_CH *CH,FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set decay rate */
|
||||
INLINE void set_dr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
static inline void set_dr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->d1r = (v&0x1f) ? 32 + ((v&0x1f)<<1) : 0;
|
||||
|
||||
@ -1024,7 +1024,7 @@ INLINE void set_dr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set sustain rate */
|
||||
INLINE void set_sr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
static inline void set_sr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->d2r = (v&0x1f) ? 32 + ((v&0x1f)<<1) : 0;
|
||||
|
||||
@ -1033,7 +1033,7 @@ INLINE void set_sr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set release rate */
|
||||
INLINE void set_sl_rr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
static inline void set_sl_rr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->sl = sl_table[ v>>4 ];
|
||||
|
||||
@ -1045,7 +1045,7 @@ INLINE void set_sl_rr(UINT8 type, FM_SLOT *SLOT,int v)
|
||||
|
||||
|
||||
|
||||
INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -1056,7 +1056,7 @@ INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -1068,7 +1068,7 @@ INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
}
|
||||
|
||||
/* advance LFO to next sample */
|
||||
INLINE void advance_lfo(FM_OPN *OPN)
|
||||
static inline void advance_lfo(FM_OPN *OPN)
|
||||
{
|
||||
UINT8 pos;
|
||||
|
||||
@ -1108,7 +1108,7 @@ INLINE void advance_lfo(FM_OPN *OPN)
|
||||
}
|
||||
}
|
||||
|
||||
/* changed from INLINE to static here to work around gcc 4.2.1 codegen bug */
|
||||
/* changed from static inline to static here to work around gcc 4.2.1 codegen bug */
|
||||
static void advance_eg_channel(FM_OPN *OPN, FM_SLOT *SLOT)
|
||||
{
|
||||
unsigned int out;
|
||||
@ -1259,7 +1259,7 @@ static void advance_eg_channel(FM_OPN *OPN, FM_SLOT *SLOT)
|
||||
|
||||
#define volume_calc(OP) ((OP)->vol_out + (AM & (OP)->AMmask))
|
||||
|
||||
INLINE void update_phase_lfo_slot(FM_OPN *OPN, FM_SLOT *SLOT, INT32 pms, UINT32 block_fnum)
|
||||
static inline void update_phase_lfo_slot(FM_OPN *OPN, FM_SLOT *SLOT, INT32 pms, UINT32 block_fnum)
|
||||
{
|
||||
UINT32 fnum_lfo = ((block_fnum & 0x7f0) >> 4) * 32 * 8;
|
||||
INT32 lfo_fn_table_index_offset = lfo_pm_table[ fnum_lfo + pms + OPN->LFO_PM ];
|
||||
@ -1293,7 +1293,7 @@ INLINE void update_phase_lfo_slot(FM_OPN *OPN, FM_SLOT *SLOT, INT32 pms, UINT32
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void update_phase_lfo_channel(FM_OPN *OPN, FM_CH *CH)
|
||||
static inline void update_phase_lfo_channel(FM_OPN *OPN, FM_CH *CH)
|
||||
{
|
||||
UINT32 block_fnum = CH->block_fnum;
|
||||
|
||||
@ -1344,7 +1344,7 @@ INLINE void update_phase_lfo_channel(FM_OPN *OPN, FM_CH *CH)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void chan_calc(FM_OPN *OPN, FM_CH *CH, int chnum)
|
||||
static inline void chan_calc(FM_OPN *OPN, FM_CH *CH, int chnum)
|
||||
{
|
||||
unsigned int eg_out;
|
||||
|
||||
@ -1420,7 +1420,7 @@ INLINE void chan_calc(FM_OPN *OPN, FM_CH *CH, int chnum)
|
||||
}
|
||||
|
||||
/* update phase increment and envelope generator */
|
||||
INLINE void refresh_fc_eg_slot(FM_OPN *OPN, FM_SLOT *SLOT , int fc , int kc )
|
||||
static inline void refresh_fc_eg_slot(FM_OPN *OPN, FM_SLOT *SLOT , int fc , int kc )
|
||||
{
|
||||
int ksr = kc >> SLOT->KSR;
|
||||
|
||||
@ -1459,7 +1459,7 @@ INLINE void refresh_fc_eg_slot(FM_OPN *OPN, FM_SLOT *SLOT , int fc , int kc )
|
||||
}
|
||||
|
||||
/* update phase increment counters */
|
||||
/* Changed from INLINE to static to work around gcc 4.2.1 codegen bug */
|
||||
/* Changed from static inline to static to work around gcc 4.2.1 codegen bug */
|
||||
static void refresh_fc_eg_chan(FM_OPN *OPN, FM_CH *CH )
|
||||
{
|
||||
if( CH->SLOT[SLOT1].Incr==-1)
|
||||
@ -1653,7 +1653,7 @@ static void FMCloseTable( void )
|
||||
|
||||
|
||||
/* CSM Key Controll */
|
||||
INLINE void CSMKeyControll(UINT8 type, FM_CH *CH)
|
||||
static inline void CSMKeyControll(UINT8 type, FM_CH *CH)
|
||||
{
|
||||
/* all key on then off (only for operators which were OFF!) */
|
||||
if (!CH->SLOT[SLOT1].key)
|
||||
@ -2471,7 +2471,7 @@ static void Init_ADPCMATable(void)
|
||||
}
|
||||
|
||||
/* ADPCM A (Non control type) : calculate one channel output */
|
||||
INLINE void ADPCMA_calc_chan( YM2610 *F2610, ADPCM_CH *ch )
|
||||
static inline void ADPCMA_calc_chan( YM2610 *F2610, ADPCM_CH *ch )
|
||||
{
|
||||
UINT32 step;
|
||||
UINT8 data;
|
||||
@ -2691,7 +2691,7 @@ static const unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
|
||||
|
||||
|
||||
/* flag enable control 0x110 */
|
||||
INLINE void YM2608IRQFlagWrite(FM_OPN *OPN, YM2608 *F2608, int v)
|
||||
static inline void YM2608IRQFlagWrite(FM_OPN *OPN, YM2608 *F2608, int v)
|
||||
{
|
||||
if( v & 0x80 )
|
||||
{ /* Reset IRQ flag */
|
||||
@ -2705,7 +2705,7 @@ INLINE void YM2608IRQFlagWrite(FM_OPN *OPN, YM2608 *F2608, int v)
|
||||
}
|
||||
|
||||
/* compatible mode & IRQ enable control 0x29 */
|
||||
INLINE void YM2608IRQMaskWrite(FM_OPN *OPN, YM2608 *F2608, int v)
|
||||
static inline void YM2608IRQMaskWrite(FM_OPN *OPN, YM2608 *F2608, int v)
|
||||
{
|
||||
/* SCH,xx,xxx,EN_ZERO,EN_BRDY,EN_EOS,EN_TB,EN_TA */
|
||||
|
||||
|
@ -714,7 +714,7 @@ struct YM2612
|
||||
|
||||
|
||||
/* status set and IRQ handling */
|
||||
INLINE void FM_STATUS_SET(fm2612_FM_ST *ST,int flag)
|
||||
static inline void FM_STATUS_SET(fm2612_FM_ST *ST,int flag)
|
||||
{
|
||||
/* set status flag */
|
||||
ST->status |= flag;
|
||||
@ -727,7 +727,7 @@ INLINE void FM_STATUS_SET(fm2612_FM_ST *ST,int flag)
|
||||
}
|
||||
|
||||
/* status reset and IRQ handling */
|
||||
INLINE void FM_STATUS_RESET(fm2612_FM_ST *ST,int flag)
|
||||
static inline void FM_STATUS_RESET(fm2612_FM_ST *ST,int flag)
|
||||
{
|
||||
/* reset status flag */
|
||||
ST->status &=~flag;
|
||||
@ -740,7 +740,7 @@ INLINE void FM_STATUS_RESET(fm2612_FM_ST *ST,int flag)
|
||||
}
|
||||
|
||||
/* IRQ mask set */
|
||||
INLINE void FM_IRQMASK_SET(fm2612_FM_ST *ST,int flag)
|
||||
static inline void FM_IRQMASK_SET(fm2612_FM_ST *ST,int flag)
|
||||
{
|
||||
ST->irqmask = flag;
|
||||
/* IRQ handling check */
|
||||
@ -748,7 +748,7 @@ INLINE void FM_IRQMASK_SET(fm2612_FM_ST *ST,int flag)
|
||||
FM_STATUS_RESET(ST,0);
|
||||
}
|
||||
|
||||
INLINE void FM_KEYON(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
static inline void FM_KEYON(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
{
|
||||
fm2612_FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
|
||||
@ -783,7 +783,7 @@ INLINE void FM_KEYON(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
SLOT->key = 1;
|
||||
}
|
||||
|
||||
INLINE void FM_KEYOFF(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
static inline void FM_KEYOFF(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
{
|
||||
fm2612_FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
|
||||
@ -816,7 +816,7 @@ INLINE void FM_KEYOFF(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
SLOT->key = 0;
|
||||
}
|
||||
|
||||
INLINE void FM_KEYON_CSM(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
static inline void FM_KEYON_CSM(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
{
|
||||
fm2612_FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
|
||||
@ -849,7 +849,7 @@ INLINE void FM_KEYON_CSM(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH , int s )
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void FM_KEYOFF_CSM(fm2612_FM_CH *CH , int s )
|
||||
static inline void FM_KEYOFF_CSM(fm2612_FM_CH *CH , int s )
|
||||
{
|
||||
fm2612_FM_SLOT *SLOT = &CH->SLOT[s];
|
||||
if (!SLOT->key)
|
||||
@ -880,7 +880,7 @@ INLINE void FM_KEYOFF_CSM(fm2612_FM_CH *CH , int s )
|
||||
}
|
||||
|
||||
/* OPN Mode Register Write */
|
||||
INLINE void set_timers(fm2612_FM_OPN *OPN, fm2612_FM_ST *ST, void *n, int v)
|
||||
static inline void set_timers(fm2612_FM_OPN *OPN, fm2612_FM_ST *ST, void *n, int v)
|
||||
{
|
||||
/* b7 = CSM MODE */
|
||||
/* b6 = 3 slot mode */
|
||||
@ -954,7 +954,7 @@ INLINE void set_timers(fm2612_FM_OPN *OPN, fm2612_FM_ST *ST, void *n, int v)
|
||||
|
||||
|
||||
/* Timer A Overflow */
|
||||
INLINE void TimerAOver(fm2612_FM_ST *ST)
|
||||
static inline void TimerAOver(fm2612_FM_ST *ST)
|
||||
{
|
||||
/* set status (if enabled) */
|
||||
if(ST->mode & 0x04) FM_STATUS_SET(ST,0x01);
|
||||
@ -963,7 +963,7 @@ INLINE void TimerAOver(fm2612_FM_ST *ST)
|
||||
if (ST->timer_handler) (ST->timer_handler)(ST->param,0,ST->TAC * ST->timer_prescaler,ST->clock);
|
||||
}
|
||||
/* Timer B Overflow */
|
||||
INLINE void TimerBOver(fm2612_FM_ST *ST)
|
||||
static inline void TimerBOver(fm2612_FM_ST *ST)
|
||||
{
|
||||
/* set status (if enabled) */
|
||||
if(ST->mode & 0x08) FM_STATUS_SET(ST,0x02);
|
||||
@ -1005,7 +1005,7 @@ INLINE void TimerBOver(fm2612_FM_ST *ST)
|
||||
|
||||
#if FM_BUSY_FLAG_SUPPORT
|
||||
#define FM_BUSY_CLEAR(ST) ((ST)->busy_expiry_time = UNDEFINED_TIME)
|
||||
INLINE UINT8 FM_STATUS_FLAG(fm2612_FM_ST *ST)
|
||||
static inline UINT8 FM_STATUS_FLAG(fm2612_FM_ST *ST)
|
||||
{
|
||||
if( COMPARE_TIMES(ST->busy_expiry_time, UNDEFINED_TIME) != 0 )
|
||||
{
|
||||
@ -1017,7 +1017,7 @@ INLINE UINT8 FM_STATUS_FLAG(fm2612_FM_ST *ST)
|
||||
return ST->status;
|
||||
}
|
||||
#if 0
|
||||
INLINE void FM_BUSY_SET(fm2612_FM_ST *ST,int busyclock )
|
||||
static inline void FM_BUSY_SET(fm2612_FM_ST *ST,int busyclock )
|
||||
{
|
||||
TIME_TYPE expiry_period = MULTIPLY_TIME_BY_INT(attotime::from_hz(ST->clock), busyclock * ST->timer_prescaler);
|
||||
ST->busy_expiry_time = ADD_TIMES(FM_GET_TIME_NOW(&ST->device->machine()), expiry_period);
|
||||
@ -1119,7 +1119,7 @@ static void setup_connection(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH, int ch)
|
||||
}
|
||||
|
||||
/* set detune & multiple */
|
||||
INLINE void set_det_mul(fm2612_FM_ST *ST,fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,int v)
|
||||
static inline void set_det_mul(fm2612_FM_ST *ST,fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->mul = (v&0x0f)? (v&0x0f)*2 : 1;
|
||||
SLOT->DT = ST->dt_tab[(v>>4)&7];
|
||||
@ -1127,7 +1127,7 @@ INLINE void set_det_mul(fm2612_FM_ST *ST,fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,i
|
||||
}
|
||||
|
||||
/* set total level */
|
||||
INLINE void set_tl(fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT , int v)
|
||||
static inline void set_tl(fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT , int v)
|
||||
{
|
||||
SLOT->tl = (v&0x7f)<<(ENV_BITS-7); /* 7bit TL */
|
||||
|
||||
@ -1139,7 +1139,7 @@ INLINE void set_tl(fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT , int v)
|
||||
}
|
||||
|
||||
/* set attack rate & key scale */
|
||||
INLINE void set_ar_ksr(UINT8 type, fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,int v)
|
||||
static inline void set_ar_ksr(UINT8 type, fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,int v)
|
||||
{
|
||||
UINT8 old_KSR = SLOT->KSR;
|
||||
|
||||
@ -1168,7 +1168,7 @@ INLINE void set_ar_ksr(UINT8 type, fm2612_FM_CH *CH,fm2612_FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set decay rate */
|
||||
INLINE void set_dr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
static inline void set_dr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->d1r = (v&0x1f) ? 32 + ((v&0x1f)<<1) : 0;
|
||||
|
||||
@ -1177,7 +1177,7 @@ INLINE void set_dr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set sustain rate */
|
||||
INLINE void set_sr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
static inline void set_sr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->d2r = (v&0x1f) ? 32 + ((v&0x1f)<<1) : 0;
|
||||
|
||||
@ -1186,7 +1186,7 @@ INLINE void set_sr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* set release rate */
|
||||
INLINE void set_sl_rr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
static inline void set_sl_rr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
{
|
||||
SLOT->sl = sl_table[ v>>4 ];
|
||||
|
||||
@ -1201,7 +1201,7 @@ INLINE void set_sl_rr(UINT8 type, fm2612_FM_SLOT *SLOT,int v)
|
||||
}
|
||||
|
||||
/* advance LFO to next sample */
|
||||
INLINE void advance_lfo(fm2612_FM_OPN *OPN)
|
||||
static inline void advance_lfo(fm2612_FM_OPN *OPN)
|
||||
{
|
||||
if (OPN->lfo_timer_overflow) /* LFO enabled ? */
|
||||
{
|
||||
@ -1229,7 +1229,7 @@ INLINE void advance_lfo(fm2612_FM_OPN *OPN)
|
||||
}
|
||||
}
|
||||
|
||||
/* changed from INLINE to static here to work around gcc 4.2.1 codegen bug */
|
||||
/* changed from static inline to static here to work around gcc 4.2.1 codegen bug */
|
||||
static void advance_eg_channel(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT)
|
||||
{
|
||||
unsigned int out;
|
||||
@ -1442,7 +1442,7 @@ static void update_ssg_eg_channel(fm2612_FM_SLOT *SLOT)
|
||||
}
|
||||
|
||||
|
||||
INLINE void update_phase_lfo_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT, INT32 pms, UINT32 block_fnum)
|
||||
static inline void update_phase_lfo_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT, INT32 pms, UINT32 block_fnum)
|
||||
{
|
||||
UINT32 fnum_lfo = ((block_fnum & 0x7f0) >> 4) * 32 * 8;
|
||||
INT32 lfo_fn_table_index_offset = lfo_pm_table[ fnum_lfo + pms + OPN->LFO_PM ];
|
||||
@ -1472,7 +1472,7 @@ INLINE void update_phase_lfo_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT, INT3
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void update_phase_lfo_channel(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
static inline void update_phase_lfo_channel(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
{
|
||||
UINT32 block_fnum = CH->block_fnum;
|
||||
|
||||
@ -1519,7 +1519,7 @@ INLINE void update_phase_lfo_channel(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
}
|
||||
|
||||
/* update phase increment and envelope generator */
|
||||
INLINE void refresh_fc_eg_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT , int fc , int kc )
|
||||
static inline void refresh_fc_eg_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT , int fc , int kc )
|
||||
{
|
||||
int ksr = kc >> SLOT->KSR;
|
||||
|
||||
@ -1558,7 +1558,7 @@ INLINE void refresh_fc_eg_slot(fm2612_FM_OPN *OPN, fm2612_FM_SLOT *SLOT , int fc
|
||||
}
|
||||
|
||||
/* update phase increment counters */
|
||||
/* Changed from INLINE to static to work around gcc 4.2.1 codegen bug */
|
||||
/* Changed from static inline to static to work around gcc 4.2.1 codegen bug */
|
||||
static void refresh_fc_eg_chan(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH )
|
||||
{
|
||||
if( CH->SLOT[SLOT1].Incr==-1)
|
||||
@ -1574,7 +1574,7 @@ static void refresh_fc_eg_chan(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH )
|
||||
|
||||
#define volume_calc(OP) ((OP)->vol_out + (AM & (OP)->AMmask))
|
||||
|
||||
INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -1585,7 +1585,7 @@ INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm)
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -1596,7 +1596,7 @@ INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm)
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE void chan_calc(YM2612 *F2612, fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
static inline void chan_calc(YM2612 *F2612, fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
{
|
||||
UINT32 AM = OPN->LFO_AM >> CH->ams;
|
||||
unsigned int eg_out = volume_calc(&CH->SLOT[SLOT1]);
|
||||
@ -1679,7 +1679,7 @@ static void FMCloseTable( void )
|
||||
|
||||
|
||||
/* CSM Key Controll */
|
||||
INLINE void CSMKeyControll(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
static inline void CSMKeyControll(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH)
|
||||
{
|
||||
/* all key ON (verified by Nemesis on real hardware) */
|
||||
FM_KEYON_CSM(OPN,CH,SLOT1);
|
||||
|
@ -129,7 +129,7 @@ Revision History:
|
||||
/*#define SAVE_SAMPLE*/
|
||||
|
||||
#ifdef SAVE_SAMPLE
|
||||
INLINE signed int acc_calc(signed int value)
|
||||
static inline signed int acc_calc(signed int value)
|
||||
{
|
||||
if (value>=0)
|
||||
{
|
||||
@ -651,7 +651,7 @@ static int num_lock = 0;
|
||||
|
||||
|
||||
|
||||
INLINE int limit( int val, int max, int min ) {
|
||||
static inline int limit( int val, int max, int min ) {
|
||||
if ( val > max )
|
||||
val = max;
|
||||
else if ( val < min )
|
||||
@ -662,7 +662,7 @@ INLINE int limit( int val, int max, int min ) {
|
||||
|
||||
|
||||
/* status set and IRQ handling */
|
||||
INLINE void OPL_STATUS_SET(FM_OPL *OPL,int flag)
|
||||
static inline void OPL_STATUS_SET(FM_OPL *OPL,int flag)
|
||||
{
|
||||
/* set status flag */
|
||||
OPL->status |= flag;
|
||||
@ -678,7 +678,7 @@ INLINE void OPL_STATUS_SET(FM_OPL *OPL,int flag)
|
||||
}
|
||||
|
||||
/* status reset and IRQ handling */
|
||||
INLINE void OPL_STATUS_RESET(FM_OPL *OPL,int flag)
|
||||
static inline void OPL_STATUS_RESET(FM_OPL *OPL,int flag)
|
||||
{
|
||||
/* reset status flag */
|
||||
OPL->status &=~flag;
|
||||
@ -694,7 +694,7 @@ INLINE void OPL_STATUS_RESET(FM_OPL *OPL,int flag)
|
||||
}
|
||||
|
||||
/* IRQ mask set */
|
||||
INLINE void OPL_STATUSMASK_SET(FM_OPL *OPL,int flag)
|
||||
static inline void OPL_STATUSMASK_SET(FM_OPL *OPL,int flag)
|
||||
{
|
||||
OPL->statusmask = flag;
|
||||
/* IRQ handling check */
|
||||
@ -704,7 +704,7 @@ INLINE void OPL_STATUSMASK_SET(FM_OPL *OPL,int flag)
|
||||
|
||||
|
||||
/* advance LFO to next sample */
|
||||
INLINE void advance_lfo(FM_OPL *OPL)
|
||||
static inline void advance_lfo(FM_OPL *OPL)
|
||||
{
|
||||
UINT8 tmp;
|
||||
|
||||
@ -725,7 +725,7 @@ INLINE void advance_lfo(FM_OPL *OPL)
|
||||
}
|
||||
|
||||
/* advance to next sample */
|
||||
INLINE void advance(FM_OPL *OPL)
|
||||
static inline void advance(FM_OPL *OPL)
|
||||
{
|
||||
OPL_CH *CH;
|
||||
OPL_SLOT *op;
|
||||
@ -888,7 +888,7 @@ INLINE void advance(FM_OPL *OPL)
|
||||
}
|
||||
|
||||
|
||||
INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -899,7 +899,7 @@ INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigne
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -914,7 +914,7 @@ INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsign
|
||||
#define volume_calc(OP) ((OP)->TLL + ((UINT32)(OP)->volume) + (OPL->LFO_AM & (OP)->AMmask))
|
||||
|
||||
/* calculate output */
|
||||
INLINE void OPL_CALC_CH( FM_OPL *OPL, OPL_CH *CH )
|
||||
static inline void OPL_CALC_CH( FM_OPL *OPL, OPL_CH *CH )
|
||||
{
|
||||
OPL_SLOT *SLOT;
|
||||
unsigned int env;
|
||||
@ -980,7 +980,7 @@ number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal
|
||||
|
||||
/* calculate rhythm */
|
||||
|
||||
INLINE void OPL_CALC_RH( FM_OPL *OPL, OPL_CH *CH, unsigned int noise )
|
||||
static inline void OPL_CALC_RH( FM_OPL *OPL, OPL_CH *CH, unsigned int noise )
|
||||
{
|
||||
OPL_SLOT *SLOT;
|
||||
signed int out;
|
||||
@ -1324,7 +1324,7 @@ static void OPL_initalize(FM_OPL *OPL)
|
||||
|
||||
}
|
||||
|
||||
INLINE void FM_KEYON(OPL_SLOT *SLOT, UINT32 key_set)
|
||||
static inline void FM_KEYON(OPL_SLOT *SLOT, UINT32 key_set)
|
||||
{
|
||||
if( !SLOT->key )
|
||||
{
|
||||
@ -1336,7 +1336,7 @@ INLINE void FM_KEYON(OPL_SLOT *SLOT, UINT32 key_set)
|
||||
SLOT->key |= key_set;
|
||||
}
|
||||
|
||||
INLINE void FM_KEYOFF(OPL_SLOT *SLOT, UINT32 key_clr)
|
||||
static inline void FM_KEYOFF(OPL_SLOT *SLOT, UINT32 key_clr)
|
||||
{
|
||||
if( SLOT->key )
|
||||
{
|
||||
@ -1352,7 +1352,7 @@ INLINE void FM_KEYOFF(OPL_SLOT *SLOT, UINT32 key_clr)
|
||||
}
|
||||
|
||||
/* update phase increment counter of operator (also update the EG rates if necessary) */
|
||||
INLINE void CALC_FCSLOT(OPL_CH *CH,OPL_SLOT *SLOT)
|
||||
static inline void CALC_FCSLOT(OPL_CH *CH,OPL_SLOT *SLOT)
|
||||
{
|
||||
int ksr;
|
||||
|
||||
@ -1383,7 +1383,7 @@ INLINE void CALC_FCSLOT(OPL_CH *CH,OPL_SLOT *SLOT)
|
||||
}
|
||||
|
||||
/* set multi,am,vib,EG-TYP,KSR,mul */
|
||||
INLINE void set_mul(FM_OPL *OPL,int slot,int v)
|
||||
static inline void set_mul(FM_OPL *OPL,int slot,int v)
|
||||
{
|
||||
OPL_CH *CH = &OPL->P_CH[slot/2];
|
||||
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1397,7 +1397,7 @@ INLINE void set_mul(FM_OPL *OPL,int slot,int v)
|
||||
}
|
||||
|
||||
/* set ksl & tl */
|
||||
INLINE void set_ksl_tl(FM_OPL *OPL,int slot,int v)
|
||||
static inline void set_ksl_tl(FM_OPL *OPL,int slot,int v)
|
||||
{
|
||||
OPL_CH *CH = &OPL->P_CH[slot/2];
|
||||
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1409,7 +1409,7 @@ INLINE void set_ksl_tl(FM_OPL *OPL,int slot,int v)
|
||||
}
|
||||
|
||||
/* set attack rate & decay rate */
|
||||
INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
|
||||
static inline void set_ar_dr(FM_OPL *OPL,int slot,int v)
|
||||
{
|
||||
OPL_CH *CH = &OPL->P_CH[slot/2];
|
||||
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1433,7 +1433,7 @@ INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
|
||||
}
|
||||
|
||||
/* set sustain level & release rate */
|
||||
INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v)
|
||||
static inline void set_sl_rr(FM_OPL *OPL,int slot,int v)
|
||||
{
|
||||
OPL_CH *CH = &OPL->P_CH[slot/2];
|
||||
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -2112,7 +2112,7 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
|
||||
}
|
||||
|
||||
/* CSM Key Controll */
|
||||
INLINE void CSMKeyControll(OPL_CH *CH)
|
||||
static inline void CSMKeyControll(OPL_CH *CH)
|
||||
{
|
||||
FM_KEYON (&CH->SLOT[SLOT1], 4);
|
||||
FM_KEYON (&CH->SLOT[SLOT2], 4);
|
||||
|
@ -247,7 +247,7 @@ WRITE8_MEMBER( k053260_device::write )
|
||||
}
|
||||
|
||||
|
||||
INLINE int limit( int val, int max, int min )
|
||||
static inline int limit( int val, int max, int min )
|
||||
{
|
||||
if ( val > max )
|
||||
val = max;
|
||||
|
@ -427,7 +427,7 @@ int8 nesapu_device::apu_noise(noise_t *chan)
|
||||
}
|
||||
|
||||
/* RESET DPCM PARAMETERS */
|
||||
INLINE void apu_dpcmreset(dpcm_t *chan)
|
||||
static inline void apu_dpcmreset(dpcm_t *chan)
|
||||
{
|
||||
chan->address = 0xC000 + (uint16) (chan->regs[2] << 6);
|
||||
chan->length = (uint16) (chan->regs[3] << 4) + 1;
|
||||
|
@ -55,7 +55,7 @@ static void MixerInit(int threeVoiceAmplify)
|
||||
}
|
||||
|
||||
|
||||
INLINE void syncEm(SID6581_t *This)
|
||||
static inline void syncEm(SID6581_t *This)
|
||||
{
|
||||
int sync1 = (This->optr1.modulator->cycleLenCount <= 0);
|
||||
int sync2 = (This->optr2.modulator->cycleLenCount <= 0);
|
||||
|
@ -195,24 +195,24 @@ void enveEmuResetOperator(sidOperator* pVoice)
|
||||
pVoice->enveShortAttackCount = 0;
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuStartAttack(sidOperator*);
|
||||
INLINE UINT16 enveEmuStartDecay(sidOperator*);
|
||||
INLINE UINT16 enveEmuStartRelease(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterAttack(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterDecay(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterSustain(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterSustainDecay(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterRelease(sidOperator*);
|
||||
INLINE UINT16 enveEmuAttack(sidOperator*);
|
||||
INLINE UINT16 enveEmuDecay(sidOperator*);
|
||||
INLINE UINT16 enveEmuSustain(sidOperator*);
|
||||
INLINE UINT16 enveEmuSustainDecay(sidOperator*);
|
||||
INLINE UINT16 enveEmuRelease(sidOperator*);
|
||||
INLINE UINT16 enveEmuMute(sidOperator*);
|
||||
static inline UINT16 enveEmuStartAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuStartDecay(sidOperator*);
|
||||
static inline UINT16 enveEmuStartRelease(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterDecay(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterSustain(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterSustainDecay(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterRelease(sidOperator*);
|
||||
static inline UINT16 enveEmuAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuDecay(sidOperator*);
|
||||
static inline UINT16 enveEmuSustain(sidOperator*);
|
||||
static inline UINT16 enveEmuSustainDecay(sidOperator*);
|
||||
static inline UINT16 enveEmuRelease(sidOperator*);
|
||||
static inline UINT16 enveEmuMute(sidOperator*);
|
||||
|
||||
INLINE UINT16 enveEmuStartShortAttack(sidOperator*);
|
||||
INLINE UINT16 enveEmuAlterShortAttack(sidOperator*);
|
||||
INLINE UINT16 enveEmuShortAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuStartShortAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuAlterShortAttack(sidOperator*);
|
||||
static inline UINT16 enveEmuShortAttack(sidOperator*);
|
||||
|
||||
|
||||
const ptr2sidUwordFunc enveModeTable[] =
|
||||
@ -240,7 +240,7 @@ const ptr2sidUwordFunc enveModeTable[] =
|
||||
/* */
|
||||
/* ADSRctrl is (index*2) to enveModeTable[], because of KEY-bit. */
|
||||
|
||||
INLINE void enveEmuEnveAdvance(sidOperator* pVoice)
|
||||
static inline void enveEmuEnveAdvance(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->fenveStep += pVoice->fenveStepAdd;
|
||||
@ -258,7 +258,7 @@ INLINE void enveEmuEnveAdvance(sidOperator* pVoice)
|
||||
/* */
|
||||
|
||||
/* Only used in the beginning. */
|
||||
INLINE UINT16 enveEmuMute(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuMute(sidOperator* pVoice)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -267,7 +267,7 @@ INLINE UINT16 enveEmuMute(sidOperator* pVoice)
|
||||
/* Release */
|
||||
/* */
|
||||
|
||||
INLINE UINT16 enveEmuRelease(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuRelease(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->enveStep = (UINT16)pVoice->fenveStep;
|
||||
@ -293,7 +293,7 @@ INLINE UINT16 enveEmuRelease(sidOperator* pVoice)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuAlterRelease(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterRelease(sidOperator* pVoice)
|
||||
{
|
||||
UINT8 release = pVoice->SIDSR & 0x0F;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -308,7 +308,7 @@ INLINE UINT16 enveEmuAlterRelease(sidOperator* pVoice)
|
||||
return enveEmuRelease(pVoice);
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuStartRelease(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuStartRelease(sidOperator* pVoice)
|
||||
{
|
||||
pVoice->ADSRctrl = ENVE_RELEASE;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -327,12 +327,12 @@ INLINE UINT16 enveEmuStartRelease(sidOperator* pVoice)
|
||||
/* Sustain */
|
||||
/* */
|
||||
|
||||
INLINE UINT16 enveEmuSustain(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuSustain(sidOperator* pVoice)
|
||||
{
|
||||
return masterAmplModTable[pVoice->sid->masterVolumeAmplIndex+pVoice->enveVol];
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuSustainDecay(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuSustainDecay(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->enveStep = (UINT16)pVoice->fenveStep;
|
||||
@ -368,7 +368,7 @@ INLINE UINT16 enveEmuSustainDecay(sidOperator* pVoice)
|
||||
}
|
||||
|
||||
/* This is the same as enveEmuStartSustainDecay(). */
|
||||
INLINE UINT16 enveEmuAlterSustainDecay(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterSustainDecay(sidOperator* pVoice)
|
||||
{
|
||||
UINT8 decay = pVoice->SIDAD & 0x0F ;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -384,7 +384,7 @@ INLINE UINT16 enveEmuAlterSustainDecay(sidOperator* pVoice)
|
||||
}
|
||||
|
||||
/* This is the same as enveEmuStartSustain(). */
|
||||
INLINE UINT16 enveEmuAlterSustain(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterSustain(sidOperator* pVoice)
|
||||
{
|
||||
if ( pVoice->enveVol > pVoice->enveSusVol )
|
||||
{
|
||||
@ -404,7 +404,7 @@ INLINE UINT16 enveEmuAlterSustain(sidOperator* pVoice)
|
||||
/* Decay */
|
||||
/* */
|
||||
|
||||
INLINE UINT16 enveEmuDecay(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuDecay(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->enveStep = (UINT16)pVoice->fenveStep;
|
||||
@ -439,7 +439,7 @@ INLINE UINT16 enveEmuDecay(sidOperator* pVoice)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuAlterDecay(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterDecay(sidOperator* pVoice)
|
||||
{
|
||||
UINT8 decay = pVoice->SIDAD & 0x0F ;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -454,7 +454,7 @@ INLINE UINT16 enveEmuAlterDecay(sidOperator* pVoice)
|
||||
return enveEmuDecay(pVoice);
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuStartDecay(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuStartDecay(sidOperator* pVoice)
|
||||
{
|
||||
pVoice->ADSRctrl = ENVE_DECAY;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -471,7 +471,7 @@ INLINE UINT16 enveEmuStartDecay(sidOperator* pVoice)
|
||||
/* Attack */
|
||||
/* */
|
||||
|
||||
INLINE UINT16 enveEmuAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAttack(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->enveStep = (UINT16)pVoice->fenveStep;
|
||||
@ -494,7 +494,7 @@ INLINE UINT16 enveEmuAttack(sidOperator* pVoice)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuAlterAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterAttack(sidOperator* pVoice)
|
||||
{
|
||||
UINT8 attack = pVoice->SIDAD >> 4;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -509,7 +509,7 @@ INLINE UINT16 enveEmuAlterAttack(sidOperator* pVoice)
|
||||
return enveEmuAttack(pVoice);
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuStartAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuStartAttack(sidOperator* pVoice)
|
||||
{
|
||||
pVoice->ADSRctrl = ENVE_ATTACK;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -531,7 +531,7 @@ INLINE UINT16 enveEmuStartAttack(sidOperator* pVoice)
|
||||
/*#include <iostream.h> */
|
||||
/*#include <iomanip.h> */
|
||||
|
||||
INLINE UINT16 enveEmuShortAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuShortAttack(sidOperator* pVoice)
|
||||
{
|
||||
#ifdef SID_FPUENVE
|
||||
pVoice->enveStep = (UINT16)pVoice->fenveStep;
|
||||
@ -556,7 +556,7 @@ INLINE UINT16 enveEmuShortAttack(sidOperator* pVoice)
|
||||
return masterAmplModTable[ pVoice->sid->masterVolumeAmplIndex + pVoice->enveVol ];
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuAlterShortAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuAlterShortAttack(sidOperator* pVoice)
|
||||
{
|
||||
UINT8 attack = pVoice->SIDAD >> 4;
|
||||
#ifdef SID_FPUENVE
|
||||
@ -571,7 +571,7 @@ INLINE UINT16 enveEmuAlterShortAttack(sidOperator* pVoice)
|
||||
return enveEmuShortAttack(pVoice);
|
||||
}
|
||||
|
||||
INLINE UINT16 enveEmuStartShortAttack(sidOperator* pVoice)
|
||||
static inline UINT16 enveEmuStartShortAttack(sidOperator* pVoice)
|
||||
{
|
||||
pVoice->ADSRctrl = ENVE_SHORTATTACK;
|
||||
#ifdef SID_FPUENVE
|
||||
|
@ -48,7 +48,7 @@ void sidInitMixerEngine(running_machine &machine)
|
||||
|
||||
}
|
||||
|
||||
INLINE void waveAdvance(sidOperator* pVoice)
|
||||
static inline void waveAdvance(sidOperator* pVoice)
|
||||
{
|
||||
#if defined(DIRECT_FIXPOINT)
|
||||
pVoice->waveStep.l += pVoice->waveStepAdd.l;
|
||||
@ -62,7 +62,7 @@ INLINE void waveAdvance(sidOperator* pVoice)
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE void noiseAdvance(sidOperator* pVoice)
|
||||
static inline void noiseAdvance(sidOperator* pVoice)
|
||||
{
|
||||
pVoice->noiseStep += pVoice->noiseStepAdd;
|
||||
if (pVoice->noiseStep >= (1L<<20))
|
||||
@ -90,7 +90,7 @@ INLINE void noiseAdvance(sidOperator* pVoice)
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void noiseAdvanceHp(sidOperator* pVoice)
|
||||
static inline void noiseAdvanceHp(sidOperator* pVoice)
|
||||
{
|
||||
UINT32 tmp = pVoice->noiseStepAdd;
|
||||
while (tmp >= (1L<<20))
|
||||
@ -274,7 +274,7 @@ static void sidMode74(sidOperator* pVoice) {
|
||||
/* */
|
||||
/* */
|
||||
|
||||
INLINE void waveCalcCycleLen(sidOperator* pVoice)
|
||||
static inline void waveCalcCycleLen(sidOperator* pVoice)
|
||||
{
|
||||
#if defined(DIRECT_FIXPOINT)
|
||||
pVoice->cycleAddLen.w[HI] = 0;
|
||||
@ -326,7 +326,7 @@ INLINE void waveCalcCycleLen(sidOperator* pVoice)
|
||||
} /* see above (opening bracket) */
|
||||
}
|
||||
|
||||
INLINE void waveCalcFilter(sidOperator* pVoice)
|
||||
static inline void waveCalcFilter(sidOperator* pVoice)
|
||||
{
|
||||
if ( pVoice->filtEnabled )
|
||||
{
|
||||
|
@ -265,13 +265,13 @@ void sn76477_device::device_stop()
|
||||
#undef max
|
||||
#undef min
|
||||
|
||||
INLINE double max(double a, double b)
|
||||
static inline double max(double a, double b)
|
||||
{
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
|
||||
|
||||
INLINE double min(double a, double b)
|
||||
static inline double min(double a, double b)
|
||||
{
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ void sp0256_device::device_reset()
|
||||
/* ======================================================================== */
|
||||
/* LIMIT -- Limiter function for digital sample output. */
|
||||
/* ======================================================================== */
|
||||
INLINE INT16 limit(INT16 s)
|
||||
static inline INT16 limit(INT16 s)
|
||||
{
|
||||
#ifdef HIGH_QUALITY /* Higher quality than the original, but who cares? */
|
||||
if (s > 8191) return 8191;
|
||||
@ -230,7 +230,7 @@ INLINE INT16 limit(INT16 s)
|
||||
/* ======================================================================== */
|
||||
/* LPC12_UPDATE -- Update the 12-pole filter, outputting samples. */
|
||||
/* ======================================================================== */
|
||||
INLINE int lpc12_update(struct lpc12_t *f, int num_samp, INT16 *out, UINT32 *optr)
|
||||
static inline int lpc12_update(struct lpc12_t *f, int num_samp, INT16 *out, UINT32 *optr)
|
||||
{
|
||||
int i, j;
|
||||
INT16 samp;
|
||||
@ -360,7 +360,7 @@ static const int stage_map[6] = { 0, 1, 2, 3, 4, 5 };
|
||||
/* ======================================================================== */
|
||||
/* LPC12_REGDEC -- Decode the register set in the filter bank. */
|
||||
/* ======================================================================== */
|
||||
INLINE void lpc12_regdec(struct lpc12_t *f)
|
||||
static inline void lpc12_regdec(struct lpc12_t *f)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -722,7 +722,7 @@ static const INT16 sp0256_df_idx[16 * 8] =
|
||||
/* ======================================================================== */
|
||||
/* BITREV32 -- Bit-reverse a 32-bit number. */
|
||||
/* ======================================================================== */
|
||||
INLINE UINT32 bitrev32(UINT32 val)
|
||||
static inline UINT32 bitrev32(UINT32 val)
|
||||
{
|
||||
val = ((val & 0xFFFF0000) >> 16) | ((val & 0x0000FFFF) << 16);
|
||||
val = ((val & 0xFF00FF00) >> 8) | ((val & 0x00FF00FF) << 8);
|
||||
@ -736,7 +736,7 @@ INLINE UINT32 bitrev32(UINT32 val)
|
||||
/* ======================================================================== */
|
||||
/* BITREV8 -- Bit-reverse a 8-bit number. */
|
||||
/* ======================================================================== */
|
||||
INLINE UINT8 bitrev8(UINT8 val)
|
||||
static inline UINT8 bitrev8(UINT8 val)
|
||||
{
|
||||
val = ((val & 0xF0) >> 4) | ((val & 0x0F) << 4);
|
||||
val = ((val & 0xCC) >> 2) | ((val & 0x33) << 2);
|
||||
|
@ -39,22 +39,22 @@ const device_type SPU = &device_creator<spu_device>;
|
||||
//
|
||||
//
|
||||
//
|
||||
INLINE unsigned int min(unsigned int a, unsigned int b)
|
||||
static inline unsigned int min(unsigned int a, unsigned int b)
|
||||
{
|
||||
return (a > b) ? b : a;
|
||||
}
|
||||
|
||||
INLINE unsigned int max(unsigned int a, unsigned int b)
|
||||
static inline unsigned int max(unsigned int a, unsigned int b)
|
||||
{
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
|
||||
INLINE double mindb(double a, double b)
|
||||
static inline double mindb(double a, double b)
|
||||
{
|
||||
return (a > b) ? b : a;
|
||||
}
|
||||
|
||||
INLINE double maxdb(double a, double b)
|
||||
static inline double maxdb(double a, double b)
|
||||
{
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ static void init_chip_tables(YM2151 *chip)
|
||||
} \
|
||||
}
|
||||
|
||||
INLINE void envelope_KONKOFF(YM2151 *PSG, YM2151Operator * op, int v)
|
||||
static inline void envelope_KONKOFF(YM2151 *PSG, YM2151Operator * op, int v)
|
||||
{
|
||||
if (v&0x08) /* M1 */
|
||||
KEY_ON (op+0, 1)
|
||||
@ -857,7 +857,7 @@ static TIMER_CALLBACK( timer_callback_chip_busy )
|
||||
|
||||
|
||||
|
||||
INLINE void set_connect(YM2151 *PSG, YM2151Operator *om1, int cha, int v)
|
||||
static inline void set_connect(YM2151 *PSG, YM2151Operator *om1, int cha, int v)
|
||||
{
|
||||
YM2151Operator *om2 = om1+1;
|
||||
YM2151Operator *oc1 = om1+2;
|
||||
@ -949,7 +949,7 @@ INLINE void set_connect(YM2151 *PSG, YM2151Operator *om1, int cha, int v)
|
||||
}
|
||||
|
||||
|
||||
INLINE void refresh_EG(YM2151Operator * op)
|
||||
static inline void refresh_EG(YM2151Operator * op)
|
||||
{
|
||||
UINT32 kc;
|
||||
UINT32 v;
|
||||
@ -1650,7 +1650,7 @@ void ym2151_reset_chip(void *_chip)
|
||||
|
||||
|
||||
|
||||
INLINE signed int op_calc(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -1663,7 +1663,7 @@ INLINE signed int op_calc(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
static inline signed int op_calc1(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
{
|
||||
UINT32 p;
|
||||
INT32 i;
|
||||
@ -1687,7 +1687,7 @@ INLINE signed int op_calc1(YM2151Operator * OP, unsigned int env, signed int pm)
|
||||
|
||||
#define volume_calc(OP) ((OP)->tl + ((UINT32)(OP)->volume) + (AM & (OP)->AMmask))
|
||||
|
||||
INLINE void chan_calc(YM2151 *PSG, unsigned int chan)
|
||||
static inline void chan_calc(YM2151 *PSG, unsigned int chan)
|
||||
{
|
||||
YM2151Operator *op;
|
||||
unsigned int env;
|
||||
@ -1737,7 +1737,7 @@ INLINE void chan_calc(YM2151 *PSG, unsigned int chan)
|
||||
op->mem_value = PSG->mem;
|
||||
}
|
||||
|
||||
INLINE void chan7_calc(YM2151 *PSG)
|
||||
static inline void chan7_calc(YM2151 *PSG)
|
||||
{
|
||||
YM2151Operator *op;
|
||||
unsigned int env;
|
||||
@ -2007,7 +2007,7 @@ rate 11 1 |
|
||||
--
|
||||
*/
|
||||
|
||||
INLINE void advance_eg(YM2151 *PSG)
|
||||
static inline void advance_eg(YM2151 *PSG)
|
||||
{
|
||||
YM2151Operator *op;
|
||||
unsigned int i;
|
||||
@ -2091,7 +2091,7 @@ INLINE void advance_eg(YM2151 *PSG)
|
||||
}
|
||||
|
||||
|
||||
INLINE void advance(YM2151 *PSG)
|
||||
static inline void advance(YM2151 *PSG)
|
||||
{
|
||||
YM2151Operator *op;
|
||||
unsigned int i;
|
||||
@ -2275,7 +2275,7 @@ INLINE void advance(YM2151 *PSG)
|
||||
}
|
||||
|
||||
#if 0
|
||||
INLINE signed int acc_calc(signed int value)
|
||||
static inline signed int acc_calc(signed int value)
|
||||
{
|
||||
if (value>=0)
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ to do:
|
||||
//#define SAVE_SAMPLE
|
||||
|
||||
#ifdef SAVE_SAMPLE
|
||||
INLINE signed int acc_calc(signed int value)
|
||||
static inline signed int acc_calc(signed int value)
|
||||
{
|
||||
if (value>=0)
|
||||
{
|
||||
@ -628,7 +628,7 @@ static int num_lock = 0;
|
||||
#define SLOT8_2 (&chip->P_CH[8].SLOT[SLOT2])
|
||||
|
||||
|
||||
INLINE int limit( int val, int max, int min )
|
||||
static inline int limit( int val, int max, int min )
|
||||
{
|
||||
if ( val > max )
|
||||
val = max;
|
||||
@ -640,7 +640,7 @@ INLINE int limit( int val, int max, int min )
|
||||
|
||||
|
||||
/* advance LFO to next sample */
|
||||
INLINE void advance_lfo(YM2413 *chip)
|
||||
static inline void advance_lfo(YM2413 *chip)
|
||||
{
|
||||
/* LFO */
|
||||
chip->lfo_am_cnt += chip->lfo_am_inc;
|
||||
@ -654,7 +654,7 @@ INLINE void advance_lfo(YM2413 *chip)
|
||||
}
|
||||
|
||||
/* advance to next sample */
|
||||
INLINE void advance(YM2413 *chip)
|
||||
static inline void advance(YM2413 *chip)
|
||||
{
|
||||
OPLL_CH *CH;
|
||||
OPLL_SLOT *op;
|
||||
@ -883,7 +883,7 @@ INLINE void advance(YM2413 *chip)
|
||||
}
|
||||
|
||||
|
||||
INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -894,7 +894,7 @@ INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigne
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
INT32 i;
|
||||
@ -916,7 +916,7 @@ INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsign
|
||||
#define volume_calc(OP) ((OP)->TLL + ((UINT32)(OP)->volume) + (chip->LFO_AM & (OP)->AMmask))
|
||||
|
||||
/* calculate output */
|
||||
INLINE void chan_calc( YM2413 *chip, OPLL_CH *CH )
|
||||
static inline void chan_calc( YM2413 *chip, OPLL_CH *CH )
|
||||
{
|
||||
OPLL_SLOT *SLOT;
|
||||
unsigned int env;
|
||||
@ -993,7 +993,7 @@ number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal
|
||||
|
||||
/* calculate rhythm */
|
||||
|
||||
INLINE void rhythm_calc( YM2413 *chip, OPLL_CH *CH, unsigned int noise )
|
||||
static inline void rhythm_calc( YM2413 *chip, OPLL_CH *CH, unsigned int noise )
|
||||
{
|
||||
OPLL_SLOT *SLOT;
|
||||
signed int out;
|
||||
@ -1392,7 +1392,7 @@ static void OPLL_initalize(YM2413 *chip, device_t *device)
|
||||
/*logerror("YM2413init eg_timer_add=%8x eg_timer_overflow=%8x\n", chip->eg_timer_add, chip->eg_timer_overflow);*/
|
||||
}
|
||||
|
||||
INLINE void KEY_ON(OPLL_SLOT *SLOT, UINT32 key_set)
|
||||
static inline void KEY_ON(OPLL_SLOT *SLOT, UINT32 key_set)
|
||||
{
|
||||
if( !SLOT->key )
|
||||
{
|
||||
@ -1403,7 +1403,7 @@ INLINE void KEY_ON(OPLL_SLOT *SLOT, UINT32 key_set)
|
||||
SLOT->key |= key_set;
|
||||
}
|
||||
|
||||
INLINE void KEY_OFF(OPLL_SLOT *SLOT, UINT32 key_clr)
|
||||
static inline void KEY_OFF(OPLL_SLOT *SLOT, UINT32 key_clr)
|
||||
{
|
||||
if( SLOT->key )
|
||||
{
|
||||
@ -1419,7 +1419,7 @@ INLINE void KEY_OFF(OPLL_SLOT *SLOT, UINT32 key_clr)
|
||||
}
|
||||
|
||||
/* update phase increment counter of operator (also update the EG rates if necessary) */
|
||||
INLINE void CALC_FCSLOT(OPLL_CH *CH,OPLL_SLOT *SLOT)
|
||||
static inline void CALC_FCSLOT(OPLL_CH *CH,OPLL_SLOT *SLOT)
|
||||
{
|
||||
int ksr;
|
||||
UINT32 SLOT_rs;
|
||||
@ -1465,7 +1465,7 @@ INLINE void CALC_FCSLOT(OPLL_CH *CH,OPLL_SLOT *SLOT)
|
||||
}
|
||||
|
||||
/* set multi,am,vib,EG-TYP,KSR,mul */
|
||||
INLINE void set_mul(YM2413 *chip,int slot,int v)
|
||||
static inline void set_mul(YM2413 *chip,int slot,int v)
|
||||
{
|
||||
OPLL_CH *CH = &chip->P_CH[slot/2];
|
||||
OPLL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1479,7 +1479,7 @@ INLINE void set_mul(YM2413 *chip,int slot,int v)
|
||||
}
|
||||
|
||||
/* set ksl, tl */
|
||||
INLINE void set_ksl_tl(YM2413 *chip,int chan,int v)
|
||||
static inline void set_ksl_tl(YM2413 *chip,int chan,int v)
|
||||
{
|
||||
OPLL_CH *CH = &chip->P_CH[chan];
|
||||
/* modulator */
|
||||
@ -1491,7 +1491,7 @@ INLINE void set_ksl_tl(YM2413 *chip,int chan,int v)
|
||||
}
|
||||
|
||||
/* set ksl , waveforms, feedback */
|
||||
INLINE void set_ksl_wave_fb(YM2413 *chip,int chan,int v)
|
||||
static inline void set_ksl_wave_fb(YM2413 *chip,int chan,int v)
|
||||
{
|
||||
OPLL_CH *CH = &chip->P_CH[chan];
|
||||
/* modulator */
|
||||
@ -1509,7 +1509,7 @@ INLINE void set_ksl_wave_fb(YM2413 *chip,int chan,int v)
|
||||
}
|
||||
|
||||
/* set attack rate & decay rate */
|
||||
INLINE void set_ar_dr(YM2413 *chip,int slot,int v)
|
||||
static inline void set_ar_dr(YM2413 *chip,int slot,int v)
|
||||
{
|
||||
OPLL_CH *CH = &chip->P_CH[slot/2];
|
||||
OPLL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1533,7 +1533,7 @@ INLINE void set_ar_dr(YM2413 *chip,int slot,int v)
|
||||
}
|
||||
|
||||
/* set sustain level & release rate */
|
||||
INLINE void set_sl_rr(YM2413 *chip,int slot,int v)
|
||||
static inline void set_sl_rr(YM2413 *chip,int slot,int v)
|
||||
{
|
||||
OPLL_CH *CH = &chip->P_CH[slot/2];
|
||||
OPLL_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
|
@ -476,7 +476,7 @@ void YM_DELTAT_savestate(device_t *device,YM_DELTAT *DELTAT)
|
||||
else if ( val < min ) val = min; \
|
||||
}
|
||||
|
||||
INLINE void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT)
|
||||
static inline void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT)
|
||||
{
|
||||
UINT32 step;
|
||||
int data;
|
||||
@ -557,7 +557,7 @@ INLINE void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT)
|
||||
|
||||
|
||||
|
||||
INLINE void YM_DELTAT_synthesis_from_CPU_memory(YM_DELTAT *DELTAT)
|
||||
static inline void YM_DELTAT_synthesis_from_CPU_memory(YM_DELTAT *DELTAT)
|
||||
{
|
||||
UINT32 step;
|
||||
int data;
|
||||
|
@ -609,7 +609,7 @@ static int num_lock = 0;
|
||||
|
||||
|
||||
|
||||
INLINE int limit( int val, int max, int min ) {
|
||||
static inline int limit( int val, int max, int min ) {
|
||||
if ( val > max )
|
||||
val = max;
|
||||
else if ( val < min )
|
||||
@ -620,7 +620,7 @@ INLINE int limit( int val, int max, int min ) {
|
||||
|
||||
|
||||
/* status set and IRQ handling */
|
||||
INLINE void OPL3_STATUS_SET(OPL3 *chip,int flag)
|
||||
static inline void OPL3_STATUS_SET(OPL3 *chip,int flag)
|
||||
{
|
||||
/* set status flag masking out disabled IRQs */
|
||||
chip->status |= (flag & chip->statusmask);
|
||||
@ -636,7 +636,7 @@ INLINE void OPL3_STATUS_SET(OPL3 *chip,int flag)
|
||||
}
|
||||
|
||||
/* status reset and IRQ handling */
|
||||
INLINE void OPL3_STATUS_RESET(OPL3 *chip,int flag)
|
||||
static inline void OPL3_STATUS_RESET(OPL3 *chip,int flag)
|
||||
{
|
||||
/* reset status flag */
|
||||
chip->status &= ~flag;
|
||||
@ -652,7 +652,7 @@ INLINE void OPL3_STATUS_RESET(OPL3 *chip,int flag)
|
||||
}
|
||||
|
||||
/* IRQ mask set */
|
||||
INLINE void OPL3_STATUSMASK_SET(OPL3 *chip,int flag)
|
||||
static inline void OPL3_STATUSMASK_SET(OPL3 *chip,int flag)
|
||||
{
|
||||
chip->statusmask = flag;
|
||||
/* IRQ handling check */
|
||||
@ -662,7 +662,7 @@ INLINE void OPL3_STATUSMASK_SET(OPL3 *chip,int flag)
|
||||
|
||||
|
||||
/* advance LFO to next sample */
|
||||
INLINE void advance_lfo(OPL3 *chip)
|
||||
static inline void advance_lfo(OPL3 *chip)
|
||||
{
|
||||
UINT8 tmp;
|
||||
|
||||
@ -683,7 +683,7 @@ INLINE void advance_lfo(OPL3 *chip)
|
||||
}
|
||||
|
||||
/* advance to next sample */
|
||||
INLINE void advance(OPL3 *chip)
|
||||
static inline void advance(OPL3 *chip)
|
||||
{
|
||||
OPL3_CH *CH;
|
||||
OPL3_SLOT *op;
|
||||
@ -851,7 +851,7 @@ INLINE void advance(OPL3 *chip)
|
||||
}
|
||||
|
||||
|
||||
INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -862,7 +862,7 @@ INLINE signed int op_calc(UINT32 phase, unsigned int env, signed int pm, unsigne
|
||||
return tl_tab[p];
|
||||
}
|
||||
|
||||
INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
static inline signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsigned int wave_tab)
|
||||
{
|
||||
UINT32 p;
|
||||
|
||||
@ -878,7 +878,7 @@ INLINE signed int op_calc1(UINT32 phase, unsigned int env, signed int pm, unsign
|
||||
|
||||
/* calculate output of a standard 2 operator channel
|
||||
(or 1st part of a 4-op channel) */
|
||||
INLINE void chan_calc( OPL3 *chip, OPL3_CH *CH )
|
||||
static inline void chan_calc( OPL3 *chip, OPL3_CH *CH )
|
||||
{
|
||||
OPL3_SLOT *SLOT;
|
||||
unsigned int env;
|
||||
@ -913,7 +913,7 @@ INLINE void chan_calc( OPL3 *chip, OPL3_CH *CH )
|
||||
}
|
||||
|
||||
/* calculate output of a 2nd part of 4-op channel */
|
||||
INLINE void chan_calc_ext( OPL3 *chip, OPL3_CH *CH )
|
||||
static inline void chan_calc_ext( OPL3 *chip, OPL3_CH *CH )
|
||||
{
|
||||
OPL3_SLOT *SLOT;
|
||||
unsigned int env;
|
||||
@ -971,7 +971,7 @@ number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal
|
||||
|
||||
/* calculate rhythm */
|
||||
|
||||
INLINE void chan_calc_rhythm( OPL3 *chip, OPL3_CH *CH, unsigned int noise )
|
||||
static inline void chan_calc_rhythm( OPL3 *chip, OPL3_CH *CH, unsigned int noise )
|
||||
{
|
||||
OPL3_SLOT *SLOT;
|
||||
signed int *chanout = chip->chanout;
|
||||
@ -1370,7 +1370,7 @@ static void OPL3_initalize(OPL3 *chip)
|
||||
|
||||
}
|
||||
|
||||
INLINE void FM_KEYON(OPL3_SLOT *SLOT, UINT32 key_set)
|
||||
static inline void FM_KEYON(OPL3_SLOT *SLOT, UINT32 key_set)
|
||||
{
|
||||
if( !SLOT->key )
|
||||
{
|
||||
@ -1382,7 +1382,7 @@ INLINE void FM_KEYON(OPL3_SLOT *SLOT, UINT32 key_set)
|
||||
SLOT->key |= key_set;
|
||||
}
|
||||
|
||||
INLINE void FM_KEYOFF(OPL3_SLOT *SLOT, UINT32 key_clr)
|
||||
static inline void FM_KEYOFF(OPL3_SLOT *SLOT, UINT32 key_clr)
|
||||
{
|
||||
if( SLOT->key )
|
||||
{
|
||||
@ -1398,7 +1398,7 @@ INLINE void FM_KEYOFF(OPL3_SLOT *SLOT, UINT32 key_clr)
|
||||
}
|
||||
|
||||
/* update phase increment counter of operator (also update the EG rates if necessary) */
|
||||
INLINE void CALC_FCSLOT(OPL3_CH *CH,OPL3_SLOT *SLOT)
|
||||
static inline void CALC_FCSLOT(OPL3_CH *CH,OPL3_SLOT *SLOT)
|
||||
{
|
||||
int ksr;
|
||||
|
||||
@ -1433,7 +1433,7 @@ INLINE void CALC_FCSLOT(OPL3_CH *CH,OPL3_SLOT *SLOT)
|
||||
}
|
||||
|
||||
/* set multi,am,vib,EG-TYP,KSR,mul */
|
||||
INLINE void set_mul(OPL3 *chip,int slot,int v)
|
||||
static inline void set_mul(OPL3 *chip,int slot,int v)
|
||||
{
|
||||
OPL3_CH *CH = &chip->P_CH[slot/2];
|
||||
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1499,7 +1499,7 @@ INLINE void set_mul(OPL3 *chip,int slot,int v)
|
||||
}
|
||||
|
||||
/* set ksl & tl */
|
||||
INLINE void set_ksl_tl(OPL3 *chip,int slot,int v)
|
||||
static inline void set_ksl_tl(OPL3 *chip,int slot,int v)
|
||||
{
|
||||
OPL3_CH *CH = &chip->P_CH[slot/2];
|
||||
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1563,7 +1563,7 @@ INLINE void set_ksl_tl(OPL3 *chip,int slot,int v)
|
||||
}
|
||||
|
||||
/* set attack rate & decay rate */
|
||||
INLINE void set_ar_dr(OPL3 *chip,int slot,int v)
|
||||
static inline void set_ar_dr(OPL3 *chip,int slot,int v)
|
||||
{
|
||||
OPL3_CH *CH = &chip->P_CH[slot/2];
|
||||
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
@ -1590,7 +1590,7 @@ INLINE void set_ar_dr(OPL3 *chip,int slot,int v)
|
||||
}
|
||||
|
||||
/* set sustain level & release rate */
|
||||
INLINE void set_sl_rr(OPL3 *chip,int slot,int v)
|
||||
static inline void set_sl_rr(OPL3 *chip,int slot,int v)
|
||||
{
|
||||
OPL3_CH *CH = &chip->P_CH[slot/2];
|
||||
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...)
|
||||
{
|
||||
if (VERBOSE_LEVEL >= n_level)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ static void poly_state_presave(legacy_poly_manager *poly);
|
||||
down
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE INT32 round_coordinate(float value)
|
||||
static inline INT32 round_coordinate(float value)
|
||||
{
|
||||
INT32 result = floor(value);
|
||||
return result + (value - (float)result > 0.5f);
|
||||
@ -222,7 +222,7 @@ INLINE INT32 round_coordinate(float value)
|
||||
a simple tri_extent to a full poly_extent
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void convert_tri_extent_to_poly_extent(poly_extent *dstextent, const tri_extent *srcextent, const polygon_info *polygon, INT32 y)
|
||||
static inline void convert_tri_extent_to_poly_extent(poly_extent *dstextent, const tri_extent *srcextent, const polygon_info *polygon, INT32 y)
|
||||
{
|
||||
/* copy start/stop always */
|
||||
dstextent->startx = srcextent->startx;
|
||||
@ -242,7 +242,7 @@ INLINE void convert_tri_extent_to_poly_extent(poly_extent *dstextent, const tri_
|
||||
a vertex based on p[0] crossing the clipval
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void interpolate_vertex(poly_vertex *outv, const poly_vertex *v1, const poly_vertex *v2, int paramcount, float clipval)
|
||||
static inline void interpolate_vertex(poly_vertex *outv, const poly_vertex *v1, const poly_vertex *v2, int paramcount, float clipval)
|
||||
{
|
||||
float frac = (clipval - v1->p[0]) / (v2->p[0] - v1->p[0]);
|
||||
int paramnum;
|
||||
@ -260,7 +260,7 @@ INLINE void interpolate_vertex(poly_vertex *outv, const poly_vertex *v1, const p
|
||||
another
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void copy_vertex(poly_vertex *outv, const poly_vertex *v, int paramcount)
|
||||
static inline void copy_vertex(poly_vertex *outv, const poly_vertex *v, int paramcount)
|
||||
{
|
||||
int paramnum;
|
||||
|
||||
@ -276,7 +276,7 @@ INLINE void copy_vertex(poly_vertex *outv, const poly_vertex *v, int paramcount)
|
||||
object, blocking if we run out
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE polygon_info *allocate_polygon(legacy_poly_manager *poly, int miny, int maxy)
|
||||
static inline polygon_info *allocate_polygon(legacy_poly_manager *poly, int miny, int maxy)
|
||||
{
|
||||
/* wait for a work item if we have to */
|
||||
if (poly->polygon_next + 1 > poly->polygon_count)
|
||||
|
@ -101,7 +101,7 @@ static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
|
||||
#define TEXTURE_V( a ) ( a.b.h )
|
||||
#define TEXTURE_U( a ) ( a.b.l )
|
||||
|
||||
INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... )
|
||||
{
|
||||
if( VERBOSE_LEVEL >= n_level )
|
||||
{
|
||||
@ -1282,7 +1282,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage )
|
||||
a.sw.l = SINT11( COORD_X( a ) ); \
|
||||
a.sw.h = SINT11( COORD_Y( a ) );
|
||||
|
||||
INLINE int CullVertex( int a, int b )
|
||||
static inline int CullVertex( int a, int b )
|
||||
{
|
||||
int d = a - b;
|
||||
if( d < -1023 || d > 1023 )
|
||||
|
@ -533,7 +533,7 @@ UINT8 saturn_state::stv_read_gouraud_table( void )
|
||||
}
|
||||
}
|
||||
|
||||
INLINE INT32 _shading( INT32 color, INT32 correction )
|
||||
static inline INT32 _shading( INT32 color, INT32 correction )
|
||||
{
|
||||
correction = (correction >> 16) & 0x1f;
|
||||
color += (correction - 16);
|
||||
|
@ -2318,7 +2318,7 @@ UINT8 saturn_state::stv_vdp2_check_vram_cycle_pattern_registers( UINT8 access_co
|
||||
return access_command_ok == 3 ? 1 : 0;
|
||||
}
|
||||
|
||||
INLINE UINT32 stv_add_blend(UINT32 a, UINT32 b)
|
||||
static inline UINT32 stv_add_blend(UINT32 a, UINT32 b)
|
||||
{
|
||||
rgb_t rb = (a & 0xff00ff) + (b & 0xff00ff);
|
||||
rgb_t g = (a & 0x00ff00) + (b & 0x00ff00);
|
||||
|
@ -1745,13 +1745,13 @@ struct voodoo_state
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE void fifo_reset(fifo_state *f)
|
||||
static inline void fifo_reset(fifo_state *f)
|
||||
{
|
||||
f->in = f->out = 0;
|
||||
}
|
||||
|
||||
|
||||
INLINE void fifo_add(fifo_state *f, UINT32 data)
|
||||
static inline void fifo_add(fifo_state *f, UINT32 data)
|
||||
{
|
||||
INT32 next_in;
|
||||
|
||||
@ -1769,7 +1769,7 @@ INLINE void fifo_add(fifo_state *f, UINT32 data)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 fifo_remove(fifo_state *f)
|
||||
static inline UINT32 fifo_remove(fifo_state *f)
|
||||
{
|
||||
UINT32 data = 0xffffffff;
|
||||
|
||||
@ -1791,25 +1791,25 @@ INLINE UINT32 fifo_remove(fifo_state *f)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 fifo_peek(fifo_state *f)
|
||||
static inline UINT32 fifo_peek(fifo_state *f)
|
||||
{
|
||||
return f->base[f->out];
|
||||
}
|
||||
|
||||
|
||||
INLINE int fifo_empty(fifo_state *f)
|
||||
static inline int fifo_empty(fifo_state *f)
|
||||
{
|
||||
return (f->in == f->out);
|
||||
}
|
||||
|
||||
|
||||
INLINE int fifo_full(fifo_state *f)
|
||||
static inline int fifo_full(fifo_state *f)
|
||||
{
|
||||
return (f->in + 1 == f->out || (f->in == f->size - 1 && f->out == 0));
|
||||
}
|
||||
|
||||
|
||||
INLINE INT32 fifo_items(fifo_state *f)
|
||||
static inline INT32 fifo_items(fifo_state *f)
|
||||
{
|
||||
INT32 items = f->in - f->out;
|
||||
if (items < 0)
|
||||
@ -1818,7 +1818,7 @@ INLINE INT32 fifo_items(fifo_state *f)
|
||||
}
|
||||
|
||||
|
||||
INLINE INT32 fifo_space(fifo_state *f)
|
||||
static inline INT32 fifo_space(fifo_state *f)
|
||||
{
|
||||
INT32 items = f->in - f->out;
|
||||
if (items < 0)
|
||||
@ -1847,7 +1847,7 @@ INLINE INT32 fifo_space(fifo_state *f)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE INT32 fast_reciplog(INT64 value, INT32 *log2)
|
||||
static inline INT32 fast_reciplog(INT64 value, INT32 *log2)
|
||||
{
|
||||
extern UINT32 voodoo_reciplog[];
|
||||
UINT32 temp, recip, rlog;
|
||||
@ -1925,7 +1925,7 @@ INLINE INT32 fast_reciplog(INT64 value, INT32 *log2)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE INT32 float_to_int32(UINT32 data, int fixedbits)
|
||||
static inline INT32 float_to_int32(UINT32 data, int fixedbits)
|
||||
{
|
||||
int exponent = ((data >> 23) & 0xff) - 127 - 23 + fixedbits;
|
||||
INT32 result = (data & 0x7fffff) | 0x800000;
|
||||
@ -1949,7 +1949,7 @@ INLINE INT32 float_to_int32(UINT32 data, int fixedbits)
|
||||
}
|
||||
|
||||
|
||||
INLINE INT64 float_to_int64(UINT32 data, int fixedbits)
|
||||
static inline INT64 float_to_int64(UINT32 data, int fixedbits)
|
||||
{
|
||||
int exponent = ((data >> 23) & 0xff) - 127 - 23 + fixedbits;
|
||||
INT64 result = (data & 0x7fffff) | 0x800000;
|
||||
@ -1980,7 +1980,7 @@ INLINE INT64 float_to_int64(UINT32 data, int fixedbits)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE UINT32 normalize_color_path(UINT32 eff_color_path)
|
||||
static inline UINT32 normalize_color_path(UINT32 eff_color_path)
|
||||
{
|
||||
/* ignore the subpixel adjust and texture enable flags */
|
||||
eff_color_path &= ~((1 << 26) | (1 << 27));
|
||||
@ -1989,7 +1989,7 @@ INLINE UINT32 normalize_color_path(UINT32 eff_color_path)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 normalize_alpha_mode(UINT32 eff_alpha_mode)
|
||||
static inline UINT32 normalize_alpha_mode(UINT32 eff_alpha_mode)
|
||||
{
|
||||
/* always ignore alpha ref value */
|
||||
eff_alpha_mode &= ~(0xff << 24);
|
||||
@ -2006,7 +2006,7 @@ INLINE UINT32 normalize_alpha_mode(UINT32 eff_alpha_mode)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 normalize_fog_mode(UINT32 eff_fog_mode)
|
||||
static inline UINT32 normalize_fog_mode(UINT32 eff_fog_mode)
|
||||
{
|
||||
/* if not doing fogging, ignore all the other fog bits */
|
||||
if (!FOGMODE_ENABLE_FOG(eff_fog_mode))
|
||||
@ -2016,7 +2016,7 @@ INLINE UINT32 normalize_fog_mode(UINT32 eff_fog_mode)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 normalize_fbz_mode(UINT32 eff_fbz_mode)
|
||||
static inline UINT32 normalize_fbz_mode(UINT32 eff_fbz_mode)
|
||||
{
|
||||
/* ignore the draw buffer */
|
||||
eff_fbz_mode &= ~(3 << 14);
|
||||
@ -2025,7 +2025,7 @@ INLINE UINT32 normalize_fbz_mode(UINT32 eff_fbz_mode)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 normalize_tex_mode(UINT32 eff_tex_mode)
|
||||
static inline UINT32 normalize_tex_mode(UINT32 eff_tex_mode)
|
||||
{
|
||||
/* ignore the NCC table and seq_8_downld flags */
|
||||
eff_tex_mode &= ~((1 << 5) | (1 << 31));
|
||||
@ -2042,7 +2042,7 @@ INLINE UINT32 normalize_tex_mode(UINT32 eff_tex_mode)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT32 compute_raster_hash(const raster_info *info)
|
||||
static inline UINT32 compute_raster_hash(const raster_info *info)
|
||||
{
|
||||
UINT32 hash;
|
||||
|
||||
@ -2199,7 +2199,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE rgbaint_t ATTR_FORCE_INLINE clampARGB(const rgbaint_t &iterargb, UINT32 FBZCP)
|
||||
static inline rgbaint_t ATTR_FORCE_INLINE clampARGB(const rgbaint_t &iterargb, UINT32 FBZCP)
|
||||
{
|
||||
rgbaint_t result(iterargb);
|
||||
//rgbaint_t colorint((INT32) (itera>>12), (INT32) (iterr>>12), (INT32) (iterg>>12), (INT32) (iterb>>12));
|
||||
@ -2346,7 +2346,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_state *v, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor)
|
||||
static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_state *v, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor)
|
||||
{
|
||||
if (FBZMODE_ENABLE_CHROMAKEY(fbzModeReg))
|
||||
{
|
||||
@ -2435,7 +2435,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE bool alphaMaskTest(stats_block *stats, UINT32 fbzModeReg, UINT8 alpha)
|
||||
static inline bool alphaMaskTest(stats_block *stats, UINT32 fbzModeReg, UINT8 alpha)
|
||||
{
|
||||
if (FBZMODE_ENABLE_ALPHA_MASK(fbzModeReg))
|
||||
{
|
||||
@ -2521,7 +2521,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE bool ATTR_FORCE_INLINE alphaTest(voodoo_state *v, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha)
|
||||
static inline bool ATTR_FORCE_INLINE alphaTest(voodoo_state *v, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha)
|
||||
{
|
||||
if (ALPHAMODE_ALPHATEST(alphaModeReg))
|
||||
{
|
||||
@ -2750,7 +2750,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE void ATTR_FORCE_INLINE alphaBlend(UINT32 FBZMODE, UINT32 ALPHAMODE, INT32 x, const UINT8 *dither, int dpix, UINT16 *depth, rgbaint_t &preFog, rgbaint_t &srcColor)
|
||||
static inline void ATTR_FORCE_INLINE alphaBlend(UINT32 FBZMODE, UINT32 ALPHAMODE, INT32 x, const UINT8 *dither, int dpix, UINT16 *depth, rgbaint_t &preFog, rgbaint_t &srcColor)
|
||||
{
|
||||
if (ALPHAMODE_ALPHABLEND(ALPHAMODE))
|
||||
{
|
||||
@ -3068,7 +3068,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth,
|
||||
static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth,
|
||||
rgbaint_t &color, INT32 iterz, INT64 iterw, UINT8 itera)
|
||||
{
|
||||
if (FOGMODE_ENABLE_FOG(fogModeReg))
|
||||
@ -3711,7 +3711,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE bool ATTR_FORCE_INLINE depthTest(UINT16 zaColorReg, stats_block *stats, INT32 destDepth, UINT32 fbzModeReg, INT32 biasdepth)
|
||||
static inline bool ATTR_FORCE_INLINE depthTest(UINT16 zaColorReg, stats_block *stats, INT32 destDepth, UINT32 fbzModeReg, INT32 biasdepth)
|
||||
{
|
||||
/* handle depth buffer testing */
|
||||
if (FBZMODE_ENABLE_DEPTHBUF(fbzModeReg))
|
||||
@ -4163,7 +4163,7 @@ do
|
||||
} \
|
||||
while (0)
|
||||
|
||||
INLINE bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE,
|
||||
static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE,
|
||||
rgbaint_t TEXELARGB, INT32 ITERZ, INT64 ITERW, rgbaint_t &srcColor)
|
||||
{
|
||||
rgbaint_t c_other;
|
||||
@ -4722,7 +4722,7 @@ static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, co
|
||||
// The return value is coded as a 24.8 value.
|
||||
// The maximum error using a 4 bit lookup from the mantissa is 0.0875, which is less than 1/2 lsb (0.125) for 2 bits of fraction.
|
||||
// ******************************************************************************************************************************
|
||||
INLINE INT32 ATTR_FORCE_INLINE new_log2(double &value)
|
||||
static inline INT32 ATTR_FORCE_INLINE new_log2(double &value)
|
||||
{
|
||||
static const INT32 new_log2_table[16] = {0, 22, 44, 63, 82, 100, 118, 134, 150, 165, 179, 193, 207, 220, 232, 244};
|
||||
UINT64 ival = *((UINT64 *)&value);
|
||||
@ -4738,7 +4738,7 @@ INLINE INT32 ATTR_FORCE_INLINE new_log2(double &value)
|
||||
|
||||
// Computes A/C and B/C and returns log2 of 1/C
|
||||
// A, B and C are 16.32 values. The results are 24.8.
|
||||
INLINE void ATTR_FORCE_INLINE multi_reciplog(INT64 valueA, INT64 valueB, INT64 valueC, INT32 &log, INT32 &resA, INT32 &resB)
|
||||
static inline void ATTR_FORCE_INLINE multi_reciplog(INT64 valueA, INT64 valueB, INT64 valueC, INT32 &log, INT32 &resA, INT32 &resB)
|
||||
{
|
||||
double recip = double(1ULL<<(47-39))/valueC;
|
||||
double resAD = valueA * recip;
|
||||
@ -4750,7 +4750,7 @@ INLINE void ATTR_FORCE_INLINE multi_reciplog(INT64 valueA, INT64 valueB, INT64 v
|
||||
}
|
||||
|
||||
|
||||
INLINE rgbaint_t ATTR_FORCE_INLINE genTexture(tmu_state *TT, INT32 x, const UINT8 *dither4, const UINT32 TEXMODE, rgb_t *LOOKUP, INT32 LODBASE, INT64 ITERS, INT64 ITERT, INT64 ITERW, INT32 &lod)
|
||||
static inline rgbaint_t ATTR_FORCE_INLINE genTexture(tmu_state *TT, INT32 x, const UINT8 *dither4, const UINT32 TEXMODE, rgb_t *LOOKUP, INT32 LODBASE, INT64 ITERS, INT64 ITERT, INT64 ITERW, INT32 &lod)
|
||||
{
|
||||
rgbaint_t result;
|
||||
INT32 s, t, ilod;
|
||||
@ -4941,7 +4941,7 @@ INLINE rgbaint_t ATTR_FORCE_INLINE genTexture(tmu_state *TT, INT32 x, const UINT
|
||||
return result;
|
||||
}
|
||||
|
||||
INLINE rgbaint_t ATTR_FORCE_INLINE combineTexture(tmu_state *TT, const UINT32 TEXMODE, rgbaint_t c_local, rgbaint_t c_other, INT32 lod)
|
||||
static inline rgbaint_t ATTR_FORCE_INLINE combineTexture(tmu_state *TT, const UINT32 TEXMODE, rgbaint_t c_local, rgbaint_t c_other, INT32 lod)
|
||||
{
|
||||
INT32 a_other = c_other.get_a();
|
||||
INT32 a_local = c_local.get_a();
|
||||
|
@ -285,7 +285,7 @@ static const raster_info predef_raster_table[] =
|
||||
in device is, in fact, a voodoo device
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE voodoo_state *get_safe_token(device_t *device)
|
||||
static inline voodoo_state *get_safe_token(device_t *device)
|
||||
{
|
||||
assert(device != nullptr);
|
||||
assert((device->type() == VOODOO_1) || (device->type() == VOODOO_2) || (device->type() == VOODOO_BANSHEE) || (device->type() == VOODOO_3));
|
||||
@ -1426,7 +1426,7 @@ static void recompute_texture_params(tmu_state *t)
|
||||
}
|
||||
|
||||
|
||||
INLINE INT32 prepare_tmu(tmu_state *t)
|
||||
static inline INT32 prepare_tmu(tmu_state *t)
|
||||
{
|
||||
INT64 texdx, texdy;
|
||||
INT32 lodbase;
|
||||
|
@ -168,7 +168,7 @@ static void execute_dumpkbd(running_machine &machine, int ref, int params, const
|
||||
given address is valid for cheating
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int cheat_address_is_valid(address_space &space, offs_t address)
|
||||
static inline int cheat_address_is_valid(address_space &space, offs_t address)
|
||||
{
|
||||
return debug_cpu_translate(space, TRANSLATE_READ, &address) && (space.get_write_ptr(address) != nullptr);
|
||||
}
|
||||
@ -179,7 +179,7 @@ INLINE int cheat_address_is_valid(address_space &space, offs_t address)
|
||||
the current cheat width, if signed
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT64 cheat_sign_extend(const cheat_system *cheatsys, UINT64 value)
|
||||
static inline UINT64 cheat_sign_extend(const cheat_system *cheatsys, UINT64 value)
|
||||
{
|
||||
if (cheatsys->signed_cheat)
|
||||
{
|
||||
@ -196,7 +196,7 @@ INLINE UINT64 cheat_sign_extend(const cheat_system *cheatsys, UINT64 value)
|
||||
cheat_byte_swap - swap a value
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT64 cheat_byte_swap(const cheat_system *cheatsys, UINT64 value)
|
||||
static inline UINT64 cheat_byte_swap(const cheat_system *cheatsys, UINT64 value)
|
||||
{
|
||||
if (cheatsys->swapped_cheat)
|
||||
{
|
||||
@ -217,7 +217,7 @@ INLINE UINT64 cheat_byte_swap(const cheat_system *cheatsys, UINT64 value)
|
||||
and swapping if necessary
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT64 cheat_read_extended(const cheat_system *cheatsys, address_space &space, offs_t address)
|
||||
static inline UINT64 cheat_read_extended(const cheat_system *cheatsys, address_space &space, offs_t address)
|
||||
{
|
||||
return cheat_sign_extend(cheatsys, cheat_byte_swap(cheatsys, debug_read_memory(space, address, cheatsys->width, TRUE)));
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ void debug_view_memory::view_notify(debug_view_notification type)
|
||||
// whose 32 bit representation is value
|
||||
//-------------------------------------------------
|
||||
|
||||
INLINE float uint32_to_float(UINT32 value)
|
||||
static inline float uint32_to_float(UINT32 value)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
@ -227,7 +227,7 @@ INLINE float uint32_to_float(UINT32 value)
|
||||
// whose 64 bit representation is value
|
||||
//-------------------------------------------------
|
||||
|
||||
INLINE float uint64_to_double(UINT64 value)
|
||||
static inline float uint64_to_double(UINT64 value)
|
||||
{
|
||||
union {
|
||||
double f;
|
||||
|
@ -50,7 +50,7 @@ struct text_buffer
|
||||
currently held in the buffer
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE INT32 buffer_used(text_buffer *text)
|
||||
static inline INT32 buffer_used(text_buffer *text)
|
||||
{
|
||||
INT32 used = text->bufend - text->bufstart;
|
||||
if (used < 0)
|
||||
@ -64,7 +64,7 @@ INLINE INT32 buffer_used(text_buffer *text)
|
||||
available in the buffer
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE INT32 buffer_space(text_buffer *text)
|
||||
static inline INT32 buffer_space(text_buffer *text)
|
||||
{
|
||||
return text->bufsize - buffer_used(text);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ void debugger_flush_all_traces_on_abnormal_exit(void);
|
||||
this once per instruction from CPU cores
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_instruction_hook(device_t *device, offs_t curpc)
|
||||
static inline void debugger_instruction_hook(device_t *device, offs_t curpc)
|
||||
{
|
||||
#ifndef MAME_DEBUG_FAST
|
||||
if ((device->machine().debug_flags & DEBUG_FLAG_CALL_HOOK) != 0)
|
||||
@ -55,7 +55,7 @@ INLINE void debugger_instruction_hook(device_t *device, offs_t curpc)
|
||||
anytime an exception is generated
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_exception_hook(device_t *device, int exception)
|
||||
static inline void debugger_exception_hook(device_t *device, int exception)
|
||||
{
|
||||
if ((device->machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
device->debug()->exception_hook(exception);
|
||||
@ -73,7 +73,7 @@ INLINE void debugger_exception_hook(device_t *device, int exception)
|
||||
execution for the given CPU
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_start_cpu_hook(device_t *device, const attotime &endtime)
|
||||
static inline void debugger_start_cpu_hook(device_t *device, const attotime &endtime)
|
||||
{
|
||||
if ((device->machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
device->debug()->start_hook(endtime);
|
||||
@ -86,7 +86,7 @@ INLINE void debugger_start_cpu_hook(device_t *device, const attotime &endtime)
|
||||
for the given CPU
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_stop_cpu_hook(device_t *device)
|
||||
static inline void debugger_stop_cpu_hook(device_t *device)
|
||||
{
|
||||
if ((device->machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
device->debug()->stop_hook();
|
||||
@ -99,7 +99,7 @@ INLINE void debugger_stop_cpu_hook(device_t *device)
|
||||
acknowledged
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_interrupt_hook(device_t *device, int irqline)
|
||||
static inline void debugger_interrupt_hook(device_t *device, int irqline)
|
||||
{
|
||||
if ((device->machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
device->debug()->interrupt_hook(irqline);
|
||||
@ -116,7 +116,7 @@ INLINE void debugger_interrupt_hook(device_t *device, int irqline)
|
||||
next opportunity
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void debugger_break(running_machine &machine)
|
||||
static inline void debugger_break(running_machine &machine)
|
||||
{
|
||||
if ((machine.debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
debug_cpu_get_visible_cpu(machine)->debug()->halt_on_next_instruction("Internal breakpoint\n");
|
||||
@ -129,7 +129,7 @@ INLINE void debugger_break(running_machine &machine)
|
||||
halted within the instruction hook
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int debugger_within_instruction_hook(running_machine &machine)
|
||||
static inline int debugger_within_instruction_hook(running_machine &machine)
|
||||
{
|
||||
if ((machine.debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
return debug_cpu_within_instruction_hook(machine);
|
||||
|
@ -78,7 +78,7 @@ static void output_exit(running_machine &machine);
|
||||
get_hash - return the hash of an output value
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT32 get_hash(const char *string)
|
||||
static inline UINT32 get_hash(const char *string)
|
||||
{
|
||||
return core_crc32(0, (UINT8 *)string, (UINT32)strlen(string));
|
||||
}
|
||||
@ -88,7 +88,7 @@ INLINE UINT32 get_hash(const char *string)
|
||||
find_item - find an item based on a string
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE output_item *find_item(const char *string)
|
||||
static inline output_item *find_item(const char *string)
|
||||
{
|
||||
UINT32 hash = get_hash(string);
|
||||
output_item *item;
|
||||
@ -106,7 +106,7 @@ INLINE output_item *find_item(const char *string)
|
||||
create_new_item - create a new item
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE output_item *create_new_item(const char *outname, INT32 value)
|
||||
static inline output_item *create_new_item(const char *outname, INT32 value)
|
||||
{
|
||||
auto item = global_alloc(output_item);
|
||||
UINT32 hash = get_hash(outname);
|
||||
|
@ -62,33 +62,33 @@ const char *output_id_to_name(UINT32 id);
|
||||
INLINES
|
||||
***************************************************************************/
|
||||
|
||||
INLINE void output_set_led_value(int index, int value)
|
||||
static inline void output_set_led_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("led", index, value ? 1 : 0);
|
||||
}
|
||||
|
||||
INLINE void output_set_lamp_value(int index, int value)
|
||||
static inline void output_set_lamp_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("lamp", index, value);
|
||||
}
|
||||
|
||||
INLINE void output_set_digit_value(int index, int value)
|
||||
static inline void output_set_digit_value(int index, int value)
|
||||
{
|
||||
output_set_indexed_value("digit", index, value);
|
||||
}
|
||||
|
||||
|
||||
INLINE INT32 output_get_led_value(int index)
|
||||
static inline INT32 output_get_led_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("led", index);
|
||||
}
|
||||
|
||||
INLINE INT32 output_get_lamp_value(int index)
|
||||
static inline INT32 output_get_lamp_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("lamp", index);
|
||||
}
|
||||
|
||||
INLINE INT32 output_get_digit_value(int index)
|
||||
static inline INT32 output_get_digit_value(int index)
|
||||
{
|
||||
return output_get_indexed_value("digit", index);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname,
|
||||
round-to-nearest
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE float render_round_nearest(float f)
|
||||
static inline float render_round_nearest(float f)
|
||||
{
|
||||
return floor(f + 0.5f);
|
||||
}
|
||||
@ -49,7 +49,7 @@ INLINE float render_round_nearest(float f)
|
||||
bounds
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void set_render_bounds_xy(render_bounds *bounds, float x0, float y0, float x1, float y1)
|
||||
static inline void set_render_bounds_xy(render_bounds *bounds, float x0, float y0, float x1, float y1)
|
||||
{
|
||||
bounds->x0 = x0;
|
||||
bounds->y0 = y0;
|
||||
@ -63,7 +63,7 @@ INLINE void set_render_bounds_xy(render_bounds *bounds, float x0, float y0, floa
|
||||
bounds
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void set_render_bounds_wh(render_bounds *bounds, float x0, float y0, float width, float height)
|
||||
static inline void set_render_bounds_wh(render_bounds *bounds, float x0, float y0, float width, float height)
|
||||
{
|
||||
bounds->x0 = x0;
|
||||
bounds->y0 = y0;
|
||||
@ -77,7 +77,7 @@ INLINE void set_render_bounds_wh(render_bounds *bounds, float x0, float y0, floa
|
||||
of two render_bounds
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void sect_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
static inline void sect_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
{
|
||||
dest->x0 = (dest->x0 > src->x0) ? dest->x0 : src->x0;
|
||||
dest->x1 = (dest->x1 < src->x1) ? dest->x1 : src->x1;
|
||||
@ -91,7 +91,7 @@ INLINE void sect_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
render_bounds
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void union_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
static inline void union_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
{
|
||||
dest->x0 = (dest->x0 < src->x0) ? dest->x0 : src->x0;
|
||||
dest->x1 = (dest->x1 > src->x1) ? dest->x1 : src->x1;
|
||||
@ -104,7 +104,7 @@ INLINE void union_render_bounds(render_bounds *dest, const render_bounds *src)
|
||||
set_render_color - cleaner way to set a color
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void set_render_color(render_color *color, float a, float r, float g, float b)
|
||||
static inline void set_render_color(render_color *color, float a, float r, float g, float b)
|
||||
{
|
||||
color->a = a;
|
||||
color->r = r;
|
||||
@ -118,7 +118,7 @@ INLINE void set_render_color(render_color *color, float a, float r, float g, flo
|
||||
flip flags
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int orientation_swap_flips(int orientation)
|
||||
static inline int orientation_swap_flips(int orientation)
|
||||
{
|
||||
return (orientation & ORIENTATION_SWAP_XY) |
|
||||
((orientation & ORIENTATION_FLIP_X) ? ORIENTATION_FLIP_Y : 0) |
|
||||
@ -131,7 +131,7 @@ INLINE int orientation_swap_flips(int orientation)
|
||||
that will undo another orientation
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int orientation_reverse(int orientation)
|
||||
static inline int orientation_reverse(int orientation)
|
||||
{
|
||||
/* if not swapping X/Y, then just apply the same transform to reverse */
|
||||
if (!(orientation & ORIENTATION_SWAP_XY))
|
||||
@ -148,7 +148,7 @@ INLINE int orientation_reverse(int orientation)
|
||||
after applying two subsequent orientations
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE int orientation_add(int orientation1, int orientation2)
|
||||
static inline int orientation_add(int orientation1, int orientation2)
|
||||
{
|
||||
/* if the 2nd transform doesn't swap, just XOR together */
|
||||
if (!(orientation2 & ORIENTATION_SWAP_XY))
|
||||
@ -166,7 +166,7 @@ INLINE int orientation_add(int orientation1, int orientation2)
|
||||
a single RGB component
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE float apply_brightness_contrast_gamma_fp(float srcval, float brightness, float contrast, float gamma)
|
||||
static inline float apply_brightness_contrast_gamma_fp(float srcval, float brightness, float contrast, float gamma)
|
||||
{
|
||||
/* first apply gamma */
|
||||
srcval = pow(srcval, 1.0f / gamma);
|
||||
@ -189,7 +189,7 @@ INLINE float apply_brightness_contrast_gamma_fp(float srcval, float brightness,
|
||||
a single RGB component
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE UINT8 apply_brightness_contrast_gamma(UINT8 src, float brightness, float contrast, float gamma)
|
||||
static inline UINT8 apply_brightness_contrast_gamma(UINT8 src, float brightness, float contrast, float gamma)
|
||||
{
|
||||
float srcval = (float)src * (1.0f / 255.0f);
|
||||
float result = apply_brightness_contrast_gamma_fp(srcval, brightness, contrast, gamma);
|
||||
|
@ -44,7 +44,7 @@ void filter_state_free(filter_state* s);
|
||||
void filter_state_reset(filter* f, filter_state* s);
|
||||
|
||||
/* Insert a value in the filter state */
|
||||
INLINE void filter_insert(filter* f, filter_state* s, filter_real x) {
|
||||
static inline void filter_insert(filter* f, filter_state* s, filter_real x) {
|
||||
/* next state */
|
||||
++s->prev_mac;
|
||||
if (s->prev_mac >= f->order)
|
||||
|
@ -143,7 +143,7 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string
|
||||
// character a possible line break?
|
||||
//-------------------------------------------------
|
||||
|
||||
INLINE int is_breakable_char(unicode_char ch)
|
||||
static inline int is_breakable_char(unicode_char ch)
|
||||
{
|
||||
// regular spaces and hyphens are breakable
|
||||
if (ch == ' ' || ch == '-')
|
||||
|
@ -93,7 +93,7 @@ bool ui_input_pressed_repeat(running_machine &machine, int code, int speed);
|
||||
move event to the specified render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_mouse_move_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
static inline void ui_input_push_mouse_move_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_MOUSE_MOVE;
|
||||
@ -109,7 +109,7 @@ INLINE void ui_input_push_mouse_move_event(running_machine &machine, render_targ
|
||||
mouse leave event to the specified render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_mouse_leave_event(running_machine &machine, render_target *target)
|
||||
static inline void ui_input_push_mouse_leave_event(running_machine &machine, render_target *target)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_MOUSE_LEAVE;
|
||||
@ -123,7 +123,7 @@ INLINE void ui_input_push_mouse_leave_event(running_machine &machine, render_tar
|
||||
down event to the specified render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_mouse_down_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
static inline void ui_input_push_mouse_down_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_MOUSE_DOWN;
|
||||
@ -139,7 +139,7 @@ INLINE void ui_input_push_mouse_down_event(running_machine &machine, render_targ
|
||||
down event to the specified render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_mouse_up_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
static inline void ui_input_push_mouse_up_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_MOUSE_UP;
|
||||
@ -156,7 +156,7 @@ INLINE void ui_input_push_mouse_up_event(running_machine &machine, render_target
|
||||
render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_mouse_double_click_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
static inline void ui_input_push_mouse_double_click_event(running_machine &machine, render_target *target, INT32 x, INT32 y)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_MOUSE_DOUBLE_CLICK;
|
||||
@ -172,7 +172,7 @@ INLINE void ui_input_push_mouse_double_click_event(running_machine &machine, ren
|
||||
to the specified render_target
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void ui_input_push_char_event(running_machine &machine, render_target *target, unicode_char ch)
|
||||
static inline void ui_input_push_char_event(running_machine &machine, render_target *target, unicode_char ch)
|
||||
{
|
||||
ui_event event = { UI_EVENT_NONE };
|
||||
event.event_type = UI_EVENT_CHAR;
|
||||
|
@ -26,7 +26,7 @@ static int cas_size;
|
||||
/*******************************************************************
|
||||
Generate one high-low cycle of sample data
|
||||
********************************************************************/
|
||||
INLINE int ace_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
static inline int ace_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -48,7 +48,7 @@ INLINE int ace_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
}
|
||||
|
||||
|
||||
INLINE int ace_tap_silence(INT16 *buffer, int sample_pos, int samples)
|
||||
static inline int ace_tap_silence(INT16 *buffer, int sample_pos, int samples)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -64,7 +64,7 @@ INLINE int ace_tap_silence(INT16 *buffer, int sample_pos, int samples)
|
||||
}
|
||||
|
||||
|
||||
INLINE int ace_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
static inline int ace_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
{
|
||||
int i, samples;
|
||||
|
||||
|
@ -135,7 +135,7 @@ static int len;
|
||||
|
||||
|
||||
/* This in fact gives the number of samples for half of the pulse */
|
||||
INLINE int tap_data_to_samplecount(int data, int frequency)
|
||||
static inline int tap_data_to_samplecount(int data, int frequency)
|
||||
{
|
||||
// return (int) (0.5 * (0.5 + (((double)CBM_WAV_FREQUENCY / frequency) * (double)data))); // MESS TZX formula
|
||||
return (int) (0.5 * (((double)CBM_WAV_FREQUENCY / frequency) * (double)((data) + 0.5))); // tap2wav formula
|
||||
|
@ -131,7 +131,7 @@ struct fdi_pulse_track_header
|
||||
INLINE FUNCTIONS
|
||||
***************************************************************************/
|
||||
|
||||
INLINE struct fdidsk_tag *get_tag(floppy_image_legacy *floppy)
|
||||
static inline struct fdidsk_tag *get_tag(floppy_image_legacy *floppy)
|
||||
{
|
||||
return (fdidsk_tag *)floppy_tag(floppy);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ enum
|
||||
/*******************************************************************
|
||||
Generate one high-low cycle of sample data
|
||||
********************************************************************/
|
||||
INLINE int hector_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
static inline int hector_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -62,7 +62,7 @@ INLINE int hector_tap_cycle(INT16 *buffer, int sample_pos, int high, int low)
|
||||
}
|
||||
|
||||
|
||||
INLINE int hector_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
static inline int hector_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
{
|
||||
/* Writing an entire byte */
|
||||
int i, samples;
|
||||
@ -81,7 +81,7 @@ INLINE int hector_tap_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
}
|
||||
|
||||
|
||||
INLINE int hector_tap_synchro(INT16 *buffer, int sample_pos, int nb_synchro)
|
||||
static inline int hector_tap_synchro(INT16 *buffer, int sample_pos, int nb_synchro)
|
||||
{
|
||||
/* Writing an entire byte */
|
||||
int i, samples;
|
||||
|
@ -25,7 +25,7 @@ unsigned short ccitt_crc16_one( unsigned short crc, const unsigned char data );
|
||||
* Alignment-friendly integer placement
|
||||
* ----------------------------------------------------------------------- */
|
||||
|
||||
INLINE void place_integer_be(void *ptr, size_t offset, size_t size, UINT64 value)
|
||||
static inline void place_integer_be(void *ptr, size_t offset, size_t size, UINT64 value)
|
||||
{
|
||||
UINT8 *byte_ptr = ((UINT8 *) ptr) + offset;
|
||||
UINT16 val16;
|
||||
@ -56,7 +56,7 @@ INLINE void place_integer_be(void *ptr, size_t offset, size_t size, UINT64 value
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT64 pick_integer_be(const void *ptr, size_t offset, size_t size)
|
||||
static inline UINT64 pick_integer_be(const void *ptr, size_t offset, size_t size)
|
||||
{
|
||||
UINT64 result = 0;
|
||||
const UINT8 *byte_ptr = ((const UINT8 *) ptr) + offset;
|
||||
@ -93,7 +93,7 @@ INLINE UINT64 pick_integer_be(const void *ptr, size_t offset, size_t size)
|
||||
return result;
|
||||
}
|
||||
|
||||
INLINE void place_integer_le(void *ptr, size_t offset, size_t size, UINT64 value)
|
||||
static inline void place_integer_le(void *ptr, size_t offset, size_t size, UINT64 value)
|
||||
{
|
||||
UINT8 *byte_ptr = ((UINT8 *) ptr) + offset;
|
||||
UINT16 val16;
|
||||
@ -124,7 +124,7 @@ INLINE void place_integer_le(void *ptr, size_t offset, size_t size, UINT64 value
|
||||
}
|
||||
}
|
||||
|
||||
INLINE UINT64 pick_integer_le(const void *ptr, size_t offset, size_t size)
|
||||
static inline UINT64 pick_integer_le(const void *ptr, size_t offset, size_t size)
|
||||
{
|
||||
UINT64 result = 0;
|
||||
const UINT8 *byte_ptr = ((const UINT8 *) ptr) + offset;
|
||||
|
@ -43,7 +43,7 @@ static int kc_image_size;
|
||||
/*******************************************************************
|
||||
Generate one high-low cycle of sample data
|
||||
********************************************************************/
|
||||
INLINE int kc_cas_cycle(INT16 *buffer, int sample_pos, int len)
|
||||
static inline int kc_cas_cycle(INT16 *buffer, int sample_pos, int len)
|
||||
{
|
||||
int num_samples = KC_WAV_FREQUENCY / (len * 2);
|
||||
|
||||
@ -63,7 +63,7 @@ INLINE int kc_cas_cycle(INT16 *buffer, int sample_pos, int len)
|
||||
/*******************************************************************
|
||||
Generate n samples of silence
|
||||
********************************************************************/
|
||||
INLINE int kc_cas_silence(INT16 *buffer, int sample_pos, int len)
|
||||
static inline int kc_cas_silence(INT16 *buffer, int sample_pos, int len)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -78,7 +78,7 @@ INLINE int kc_cas_silence(INT16 *buffer, int sample_pos, int len)
|
||||
/*******************************************************************
|
||||
Generate samples for 1 byte
|
||||
********************************************************************/
|
||||
INLINE int kc_cas_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
static inline int kc_cas_byte(INT16 *buffer, int sample_pos, UINT8 data)
|
||||
{
|
||||
int samples = 0;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
static int cas_size;
|
||||
|
||||
|
||||
INLINE int kim1_output_signal( INT16 *buffer, int sample_pos, int high )
|
||||
static inline int kim1_output_signal( INT16 *buffer, int sample_pos, int high )
|
||||
{
|
||||
int sample_count, i, j;
|
||||
|
||||
@ -62,7 +62,7 @@ INLINE int kim1_output_signal( INT16 *buffer, int sample_pos, int high )
|
||||
}
|
||||
|
||||
|
||||
INLINE int kim1_output_byte( INT16 *buffer, int sample_pos, UINT8 byte )
|
||||
static inline int kim1_output_byte( INT16 *buffer, int sample_pos, UINT8 byte )
|
||||
{
|
||||
int i;
|
||||
int sample_count = 0;
|
||||
|
@ -21,7 +21,7 @@ static int cas_size;
|
||||
/*******************************************************************
|
||||
Generate one high-low cycle of sample data
|
||||
********************************************************************/
|
||||
INLINE int trs80l2_cas_cycle(INT16 *buffer, int sample_pos, int silence, int high, int low)
|
||||
static inline int trs80l2_cas_cycle(INT16 *buffer, int sample_pos, int silence, int high, int low)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user