1 /******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
5 * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *****************************************************************************/
26 #include "UCodeDefs.h"
28 #define F3DDKR_VTX_APPEND 0x00010000
29 #define F3DDKR_DMA_MTX 0x01
30 #define F3DDKR_DMA_VTX 0x04
31 #define F3DDKR_DMA_TRI 0x05
32 #define F3DDKR_DMA_DL 0x07
33 #define F3DDKR_DMA_OFFSETS 0xBF
40 class DisplayListParser;
42 //*****************************************************************************
44 //! Microcode used for Diddy Kong Racing
45 //*****************************************************************************
53 static void initialize(GBI* gbi, RSP* rsp, RDP* rdp, Memory* mem, DisplayListParser* dlp);
54 static void initializeGBI();
56 static void F3DDKR_MoveWord(MicrocodeArgument* ucode);
57 static void F3DDKR_DMA_Offsets(MicrocodeArgument* ucode);
58 static void F3DDKR_DMA_DList(MicrocodeArgument* ucode);
59 static void F3DDKR_DMA_Tri(MicrocodeArgument* ucode);
60 static void F3DDKR_DMA_Vtx(MicrocodeArgument* ucode);
61 static void F3DDKR_DMA_Mtx(MicrocodeArgument* ucode);
65 static GBI* m_gbi; //!< Pointer to Graphics Binary Interface
66 static RSP* m_rsp; //!< Pointer to Reality Signal Processor
67 static RDP* m_rdp; //!< Pointer to Reality Drawing Processor
68 static Memory* m_memory; //!< Pointer to Memory Manager
69 static DisplayListParser* m_displayListParser; //!< Pointer to Display list parser
71 static unsigned int m_vertexIndex;