X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=source%2Fmupen64plus-rsp-hle%2Fsrc%2Falist.c;h=dbb6531865101b7272b15353feee5da068c57e24;hb=327629a4e62171779835fed1f4da9a4b78a4d221;hp=c1418939e25962fc15db60f346fa3d7ce68de6c9;hpb=d9e74a6f3c9f96acfb0d64f4bda43f9b9c14984e;p=mupen64plus-pandora.git diff --git a/source/mupen64plus-rsp-hle/src/alist.c b/source/mupen64plus-rsp-hle/src/alist.c old mode 100644 new mode 100755 index c141893..dbb6531 --- a/source/mupen64plus-rsp-hle/src/alist.c +++ b/source/mupen64plus-rsp-hle/src/alist.c @@ -21,62 +21,50 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include +#include "m64p_plugin.h" +#include "m64p_types.h" + #include "hle.h" #include "alist_internal.h" - -// FIXME: this decomposition into 3 ABI is not accurate, -// there are a least 9 or 10 different ABI, each with one or a few revisions -// for a total of almost 16 differents audio ucode. -// -// ABI2 in fact is a mix of at least 7 differents ABI which are mostly compatible -// but not totally, that's why there is a isZeldaABI/isMKABI workaround. -// -extern const acmd_callback_t ABI1[0x10]; -extern const acmd_callback_t ABI2[0x20]; -extern const acmd_callback_t ABI3[0x10]; +#include "alist.h" /* local functions */ static void alist_process(const acmd_callback_t abi[], unsigned int abi_size) { - u32 inst1, inst2; + uint32_t inst1, inst2; unsigned int acmd; - const OSTask_t * const task = get_task(); + const OSTask_t *const task = get_task(); - const unsigned int *alist = (unsigned int*)(rsp.RDRAM + task->data_ptr); - const unsigned int * const alist_end = alist + (task->data_size >> 2); + const unsigned int *alist = (unsigned int *)(rsp.RDRAM + task->data_ptr); + const unsigned int *const alist_end = alist + (task->data_size >> 2); - while (alist != alist_end) - { + while (alist != alist_end) { inst1 = *(alist++); inst2 = *(alist++); acmd = inst1 >> 24; if (acmd < abi_size) - { (*abi[acmd])(inst1, inst2); - } else - { DebugMessage(M64MSG_WARNING, "Invalid ABI command %u", acmd); - } } } /* global functions */ -void alist_process_ABI1() +void alist_process_ABI1(void) { alist_process(ABI1, 0x10); } -void alist_process_ABI2() +void alist_process_ABI2(void) { alist_process(ABI2, 0x20); } -void alist_process_ABI3() +void alist_process_ABI3(void) { alist_process(ABI3, 0x10); } -