1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus-rsp-hle - hle.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2002 Hacktarux *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 #define M64P_PLUGIN_PROTOTYPES 1
26 #include "m64p_plugin.h"
29 #define RSP_HLE_VERSION 0x020000
30 #define RSP_PLUGIN_API_VERSION 0x020000
32 #ifdef M64P_BIG_ENDIAN
42 static inline int16_t clamp_s16(int_fast32_t x)
44 x = (x < INT16_MIN) ? INT16_MIN: x;
45 x = (x > INT16_MAX) ? INT16_MAX: x;
56 unsigned int ucode_boot;
57 unsigned int ucode_boot_size;
60 unsigned int ucode_size;
62 unsigned int ucode_data;
63 unsigned int ucode_data_size;
65 unsigned int dram_stack;
66 unsigned int dram_stack_size;
68 unsigned int output_buff;
69 unsigned int output_buff_size;
71 unsigned int data_ptr;
72 unsigned int data_size;
74 unsigned int yield_data_ptr;
75 unsigned int yield_data_size;
78 static inline const OSTask_t *const get_task(void)
80 return (OSTask_t *)(rsp.DMEM + 0xfc0);
83 void DebugMessage(int level, const char *message, ...);
85 extern uint8_t BufferSpace[0x10000];
87 extern uint16_t AudioInBuffer; /* 0x0000(T8) */
88 extern uint16_t AudioOutBuffer; /* 0x0002(T8) */
89 extern uint16_t AudioCount; /* 0x0004(T8) */
90 extern uint32_t loopval; /* 0x0010(T8) */
91 extern int16_t Env_Dry;
92 extern int16_t Env_Wet;
93 extern int16_t Vol_Left;
94 extern int16_t Vol_Right;
95 extern int16_t VolTrg_Left;
96 extern int32_t VolRamp_Left;
97 extern int16_t VolTrg_Right;
98 extern int32_t VolRamp_Right;
100 extern uint16_t adpcmtable[0x88];
101 extern const uint16_t ResampleLUT [0x200];
102 extern short hleMixerWorkArea[256];
104 void MP3(uint32_t inst1, uint32_t inst2);