Human68k CUI emulator with sound.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mamedef.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __MAMEDEF_H__
  2. #define __MAMEDEF_H__
  3. // typedefs to use MAME's (U)INTxx types (copied from MAME\src\ods\odscomm.h)
  4. /* 8-bit values */
  5. typedef unsigned char UINT8;
  6. typedef signed char INT8;
  7. /* 16-bit values */
  8. typedef unsigned short UINT16;
  9. typedef signed short INT16;
  10. /* 32-bit values */
  11. #ifndef _WINDOWS_H
  12. typedef unsigned int UINT32;
  13. typedef signed int INT32;
  14. #endif
  15. /* 64-bit values */
  16. #ifndef _WINDOWS_H
  17. #ifdef _MSC_VER
  18. typedef signed __int64 INT64;
  19. typedef unsigned __int64 UINT64;
  20. #else
  21. __extension__ typedef unsigned long long UINT64;
  22. __extension__ typedef signed long long INT64;
  23. #endif
  24. #endif
  25. /* offsets and addresses are 32-bit (for now...) */
  26. typedef UINT32 offs_t;
  27. /* stream_sample_t is used to represent a single sample in a sound stream */
  28. typedef INT32 stream_sample_t;
  29. #if defined(VGM_BIG_ENDIAN)
  30. #define BYTE_XOR_BE(x) (x)
  31. #elif defined(VGM_LITTLE_ENDIAN)
  32. #define BYTE_XOR_BE(x) ((x) ^ 0x01)
  33. #else
  34. // don't define BYTE_XOR_BE so that it throws an error when compiling
  35. #endif
  36. #if defined(_MSC_VER)
  37. //#define INLINE static __forceinline
  38. #define INLINE static __inline
  39. #elif defined(__GNUC__)
  40. #define INLINE static __inline__
  41. #else
  42. #define INLINE static inline
  43. #endif
  44. #define M_PI 3.14159265358979323846
  45. #ifdef _DEBUG
  46. #define logerror printf
  47. #else
  48. #define logerror
  49. #endif
  50. extern stream_sample_t* DUMMYBUF[];
  51. typedef void (*SRATE_CALLBACK)(void*, UINT32);
  52. #endif // __MAMEDEF_H__