1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus-rsp-hle - alist.c *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2012 Bobby Smiles *
5 * Copyright (C) 2009 Richard Goedeken *
6 * Copyright (C) 2002 Hacktarux *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 #include "m64p_plugin.h"
26 #include "m64p_types.h"
29 #include "alist_internal.h"
33 static void alist_process(const acmd_callback_t abi[], unsigned int abi_size)
35 uint32_t inst1, inst2;
37 const OSTask_t *const task = get_task();
39 const unsigned int *alist = (unsigned int *)(rsp.RDRAM + task->data_ptr);
40 const unsigned int *const alist_end = alist + (task->data_size >> 2);
42 while (alist != alist_end) {
49 (*abi[acmd])(inst1, inst2);
51 DebugMessage(M64MSG_WARNING, "Invalid ABI command %u", acmd);
55 /* global functions */
56 void alist_process_ABI1(void)
58 alist_process(ABI1, 0x10);
61 void alist_process_ABI2(void)
63 alist_process(ABI2, 0x20);
66 void alist_process_ABI3(void)
68 alist_process(ABI3, 0x10);