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"
33 class DisplayListParser;
35 #define F3DEX2_MOVEMEM 0xDC
36 #define F3DEX2_MOVEWORD 0xDB
38 //*****************************************************************************
39 //! UCode5 (aka F3DEX2)
40 //! Microcode used for Zelda and newer games
41 //*****************************************************************************
46 // Constructor / Destructor
50 static void initialize(GBI* gbi, RSP* rsp, RDP* rdp, Memory* memory, DisplayListParser* dlp);
51 static void initializeGBI();
54 static void F3DEX2_Mtx( MicrocodeArgument* ucode );
55 static void F3DEX2_PopMtx( MicrocodeArgument* ucode );
58 static void F3DEX2_Texture( MicrocodeArgument* ucode );
61 static void F3DEX2_Vtx( MicrocodeArgument* ucode );
62 static void F3DEX2_Tri1( MicrocodeArgument* ucode );
63 static void F3DEX2_Quad( MicrocodeArgument* ucode );
64 static void F3DEX2_Line3D( MicrocodeArgument* ucode );
67 static void F3DEX2_MoveMem( MicrocodeArgument* ucode );
68 static void F3DEX2_MoveWord( MicrocodeArgument* ucode );
69 static void F3DEX2_GeometryMode( MicrocodeArgument* ucode );
70 static void F3DEX2_SetOtherMode_H( MicrocodeArgument* ucode );
71 static void F3DEX2_SetOtherMode_L( MicrocodeArgument* ucode );
74 static void F3DEX2_DMAIO( MicrocodeArgument* ucode );
75 static void F3DEX2_Special_1( MicrocodeArgument* ucode );
76 static void F3DEX2_Special_2( MicrocodeArgument* ucode );
77 static void F3DEX2_Special_3( MicrocodeArgument* ucode );
78 static void F3DEX2_Reserved1( MicrocodeArgument* ucode );
82 static GBI* m_gbi; //!< Graphics Binary Interface
83 static RSP* m_rsp; //!< Pointer to Reality Signal Processor
84 static RDP* m_rdp; //!< Pointer to Reality Drawing Processor
85 static Memory* m_memory; //!< Pointer accessing memory like RDRAM and Texture Memory
86 static DisplayListParser* m_displayListParser;