/* GSnull * Copyright (C) 2004-2009 PCSX2 Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __GIF_TRANSFER_H__ #define __GIF_TRANSFER_H__ #include #include struct GSRegSIGBLID { u32 SIGID; u32 LBLID; }; enum GIF_FLG { GIF_FLG_PACKED = 0, GIF_FLG_REGLIST = 1, GIF_FLG_IMAGE = 2, GIF_FLG_IMAGE2 = 3 }; enum GIF_PATH { GIF_PATH_1 = 0, GIF_PATH_2, GIF_PATH_3, }; enum GIF_REG { GIF_REG_PRIM = 0x00, GIF_REG_RGBA = 0x01, GIF_REG_STQ = 0x02, GIF_REG_UV = 0x03, GIF_REG_XYZF2 = 0x04, GIF_REG_XYZ2 = 0x05, GIF_REG_TEX0_1 = 0x06, GIF_REG_TEX0_2 = 0x07, GIF_REG_CLAMP_1 = 0x08, GIF_REG_CLAMP_2 = 0x09, GIF_REG_FOG = 0x0a, GIF_REG_XYZF3 = 0x0c, GIF_REG_XYZ3 = 0x0d, GIF_REG_A_D = 0x0e, GIF_REG_NOP = 0x0f, }; struct GIFTAG { u32 nloop : 15; u32 eop : 1; u32 dummy0 : 16; u32 dummy1 : 14; u32 pre : 1; u32 prim : 11; u32 flg : 2; u32 nreg : 4; u32 regs[2]; }; struct GIFPath { GIFTAG tag; u32 curreg; u32 _pad[3]; u8 regs[16]; __forceinline void PrepRegs(); void SetTag(const void* mem); u32 GetReg(); __forceinline bool StepReg(); }; extern GIFPath m_path[3]; extern bool Path3transfer; extern void _GSgifTransfer1(u32 *pMem, u32 addr); extern void _GSgifTransfer2(u32 *pMem, u32 size); extern void _GSgifTransfer3(u32 *pMem, u32 size); #endif