X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=source%2Fmupen64plus-rsp-hle%2Fsrc%2Fhle.h;fp=source%2Fmupen64plus-rsp-hle%2Fsrc%2Fhle.h;h=0a3a0bb6c47039e2517544aad0536a58fe81ce67;hb=0a8a0368662b34eac6f2f01d708415e81b81bd88;hp=2aea0a44c03134b8b46a7fe3a634540b89e7c087;hpb=7b232824d043e2cc90e94d40b6b0a7df4b3d5692;p=mupen64plus-pandora.git diff --git a/source/mupen64plus-rsp-hle/src/hle.h b/source/mupen64plus-rsp-hle/src/hle.h old mode 100644 new mode 100755 index 2aea0a4..0a3a0bb --- a/source/mupen64plus-rsp-hle/src/hle.h +++ b/source/mupen64plus-rsp-hle/src/hle.h @@ -24,6 +24,7 @@ #define M64P_PLUGIN_PROTOTYPES 1 #include "m64p_plugin.h" +#include #define RSP_HLE_VERSION 0x020000 #define RSP_PLUGIN_API_VERSION 0x020000 @@ -38,21 +39,17 @@ #define S8 3 #endif -// types -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; -typedef unsigned long long u64; +static inline int16_t clamp_s16(int_fast32_t x) +{ + x = (x < INT16_MIN) ? INT16_MIN: x; + x = (x > INT16_MAX) ? INT16_MAX: x; -typedef signed char s8; -typedef signed short s16; -typedef signed int s32; -typedef signed long long s64; + return x; +} extern RSP_INFO rsp; -typedef struct -{ +typedef struct { unsigned int type; unsigned int flags; @@ -78,12 +75,32 @@ typedef struct unsigned int yield_data_size; } OSTask_t; -static inline const OSTask_t * const get_task() +static inline const OSTask_t *const get_task(void) { - return (OSTask_t*)(rsp.DMEM + 0xfc0); + return (OSTask_t *)(rsp.DMEM + 0xfc0); } void DebugMessage(int level, const char *message, ...); -#endif +extern uint8_t BufferSpace[0x10000]; +extern uint16_t AudioInBuffer; /* 0x0000(T8) */ +extern uint16_t AudioOutBuffer; /* 0x0002(T8) */ +extern uint16_t AudioCount; /* 0x0004(T8) */ +extern uint32_t loopval; /* 0x0010(T8) */ +extern int16_t Env_Dry; +extern int16_t Env_Wet; +extern int16_t Vol_Left; +extern int16_t Vol_Right; +extern int16_t VolTrg_Left; +extern int32_t VolRamp_Left; +extern int16_t VolTrg_Right; +extern int32_t VolRamp_Right; + +extern uint16_t adpcmtable[0x88]; +extern const uint16_t ResampleLUT [0x200]; +extern short hleMixerWorkArea[256]; + +void MP3(uint32_t inst1, uint32_t inst2); + +#endif