📄 via_3d_reg.h
字号:
/* * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial portions * of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */#ifndef VIA_3D_REG_H#define VIA_3D_REG_H#define HC_REG_BASE 0x0400#define HC_REG_TRANS_SPACE 0x0040#define HC_ParaN_MASK 0xffffffff#define HC_Para_MASK 0x00ffffff#define HC_SubA_MASK 0xff000000#define HC_SubA_SHIFT 24/* Transmission Setting */#define HC_REG_TRANS_SET 0x003c#define HC_ParaSubType_MASK 0xff000000#define HC_ParaType_MASK 0x00ff0000#define HC_ParaOS_MASK 0x0000ff00#define HC_ParaAdr_MASK 0x000000ff#define HC_ParaSubType_SHIFT 24#define HC_ParaType_SHIFT 16#define HC_ParaOS_SHIFT 8#define HC_ParaAdr_SHIFT 0#define HC_ParaType_CmdVdata 0x0000#define HC_ParaType_NotTex 0x0001#define HC_ParaType_Tex 0x0002#define HC_ParaType_Palette 0x0003#define HC_ParaType_PreCR 0x0010#define HC_ParaType_Auto 0x00fe/* Transmission Space */#define HC_REG_Hpara0 0x0040#define HC_REG_HpataAF 0x02fc/* Read */#define HC_REG_HREngSt 0x0000#define HC_REG_HRFIFOempty 0x0004#define HC_REG_HRFIFOfull 0x0008#define HC_REG_HRErr 0x000c#define HC_REG_FIFOstatus 0x0010/* HC_REG_HREngSt 0x0000 */#define HC_HDASZC_MASK 0x00010000#define HC_HSGEMI_MASK 0x0000f000#define HC_HLGEMISt_MASK 0x00000f00#define HC_HCRSt_MASK 0x00000080#define HC_HSE0St_MASK 0x00000040#define HC_HSE1St_MASK 0x00000020#define HC_HPESt_MASK 0x00000010#define HC_HXESt_MASK 0x00000008#define HC_HBESt_MASK 0x00000004#define HC_HE2St_MASK 0x00000002#define HC_HE3St_MASK 0x00000001/* HC_REG_HRFIFOempty 0x0004 */#define HC_HRZDempty_MASK 0x00000010#define HC_HRTXAempty_MASK 0x00000008#define HC_HRTXDempty_MASK 0x00000004#define HC_HWZDempty_MASK 0x00000002#define HC_HWCDempty_MASK 0x00000001/* HC_REG_HRFIFOfull 0x0008 */#define HC_HRZDfull_MASK 0x00000010#define HC_HRTXAfull_MASK 0x00000008#define HC_HRTXDfull_MASK 0x00000004#define HC_HWZDfull_MASK 0x00000002#define HC_HWCDfull_MASK 0x00000001/* HC_REG_HRErr 0x000c */#define HC_HAGPCMErr_MASK 0x80000000#define HC_HAGPCMErrC_MASK 0x70000000/* HC_REG_FIFOstatus 0x0010 */#define HC_HRFIFOATall_MASK 0x80000000#define HC_HRFIFOATbusy_MASK 0x40000000#define HC_HRATFGMDo_MASK 0x00000100#define HC_HRATFGMDi_MASK 0x00000080#define HC_HRATFRZD_MASK 0x00000040#define HC_HRATFRTXA_MASK 0x00000020#define HC_HRATFRTXD_MASK 0x00000010#define HC_HRATFWZD_MASK 0x00000008#define HC_HRATFWCD_MASK 0x00000004#define HC_HRATTXTAG_MASK 0x00000002#define HC_HRATTXCH_MASK 0x00000001/* AGP Command Setting */#define HC_SubA_HAGPBstL 0x0060#define HC_SubA_HAGPBendL 0x0061#define HC_SubA_HAGPCMNT 0x0062#define HC_SubA_HAGPBpL 0x0063#define HC_SubA_HAGPBpH 0x0064/* HC_SubA_HAGPCMNT 0x0062 */#define HC_HAGPCMNT_MASK 0x00800000#define HC_HCmdErrClr_MASK 0x00400000#define HC_HAGPBendH_MASK 0x0000ff00#define HC_HAGPBstH_MASK 0x000000ff#define HC_HAGPBendH_SHIFT 8#define HC_HAGPBstH_SHIFT 0/* HC_SubA_HAGPBpL 0x0063 */#define HC_HAGPBpL_MASK 0x00fffffc#define HC_HAGPBpID_MASK 0x00000003#define HC_HAGPBpID_PAUSE 0x00000000#define HC_HAGPBpID_JUMP 0x00000001#define HC_HAGPBpID_STOP 0x00000002/* HC_SubA_HAGPBpH 0x0064 */#define HC_HAGPBpH_MASK 0x00ffffff/* Miscellaneous Settings */#define HC_SubA_HClipTB 0x0070#define HC_SubA_HClipLR 0x0071#define HC_SubA_HFPClipTL 0x0072#define HC_SubA_HFPClipBL 0x0073#define HC_SubA_HFPClipLL 0x0074#define HC_SubA_HFPClipRL 0x0075#define HC_SubA_HFPClipTBH 0x0076#define HC_SubA_HFPClipLRH 0x0077#define HC_SubA_HLP 0x0078#define HC_SubA_HLPRF 0x0079#define HC_SubA_HSolidCL 0x007a#define HC_SubA_HPixGC 0x007b#define HC_SubA_HSPXYOS 0x007c#define HC_SubA_HVertexCNT 0x007d#define HC_HClipT_MASK 0x00fff000#define HC_HClipT_SHIFT 12#define HC_HClipB_MASK 0x00000fff#define HC_HClipB_SHIFT 0#define HC_HClipL_MASK 0x00fff000#define HC_HClipL_SHIFT 12#define HC_HClipR_MASK 0x00000fff#define HC_HClipR_SHIFT 0#define HC_HFPClipBH_MASK 0x0000ff00#define HC_HFPClipBH_SHIFT 8#define HC_HFPClipTH_MASK 0x000000ff#define HC_HFPClipTH_SHIFT 0#define HC_HFPClipRH_MASK 0x0000ff00#define HC_HFPClipRH_SHIFT 8#define HC_HFPClipLH_MASK 0x000000ff#define HC_HFPClipLH_SHIFT 0#define HC_HSolidCH_MASK 0x000000ff#define HC_HPixGC_MASK 0x00800000#define HC_HSPXOS_MASK 0x00fff000#define HC_HSPXOS_SHIFT 12#define HC_HSPYOS_MASK 0x00000fff/* Command * Command A */#define HC_HCmdHeader_MASK 0xfe000000 /*0xffe00000 */#define HC_HE3Fire_MASK 0x00100000#define HC_HPMType_MASK 0x000f0000#define HC_HEFlag_MASK 0x0000e000#define HC_HShading_MASK 0x00001c00#define HC_HPMValidN_MASK 0x00000200#define HC_HPLEND_MASK 0x00000100#define HC_HVCycle_MASK 0x000000ff#define HC_HVCycle_Style_MASK 0x000000c0#define HC_HVCycle_ChgA_MASK 0x00000030#define HC_HVCycle_ChgB_MASK 0x0000000c#define HC_HVCycle_ChgC_MASK 0x00000003#define HC_HPMType_Point 0x00000000#define HC_HPMType_Line 0x00010000#define HC_HPMType_Tri 0x00020000#define HC_HPMType_TriWF 0x00040000#define HC_HEFlag_NoAA 0x00000000#define HC_HEFlag_ab 0x00008000#define HC_HEFlag_bc 0x00004000#define HC_HEFlag_ca 0x00002000#define HC_HShading_Solid 0x00000000#define HC_HShading_FlatA 0x00000400#define HC_HShading_FlatB 0x00000800#define HC_HShading_FlatC 0x00000c00#define HC_HShading_Gouraud 0x00001000#define HC_HVCycle_Full 0x00000000#define HC_HVCycle_AFP 0x00000040#define HC_HVCycle_One 0x000000c0#define HC_HVCycle_NewA 0x00000000#define HC_HVCycle_AA 0x00000010#define HC_HVCycle_AB 0x00000020#define HC_HVCycle_AC 0x00000030#define HC_HVCycle_NewB 0x00000000#define HC_HVCycle_BA 0x00000004#define HC_HVCycle_BB 0x00000008#define HC_HVCycle_BC 0x0000000c#define HC_HVCycle_NewC 0x00000000#define HC_HVCycle_CA 0x00000001#define HC_HVCycle_CB 0x00000002#define HC_HVCycle_CC 0x00000003/* Command B */#define HC_HLPrst_MASK 0x00010000#define HC_HLLastP_MASK 0x00008000#define HC_HVPMSK_MASK 0x00007f80#define HC_HBFace_MASK 0x00000040#define HC_H2nd1VT_MASK 0x0000003f#define HC_HVPMSK_X 0x00004000#define HC_HVPMSK_Y 0x00002000#define HC_HVPMSK_Z 0x00001000#define HC_HVPMSK_W 0x00000800#define HC_HVPMSK_Cd 0x00000400#define HC_HVPMSK_Cs 0x00000200#define HC_HVPMSK_S 0x00000100#define HC_HVPMSK_T 0x00000080/* Enable Setting */#define HC_SubA_HEnable 0x0000#define HC_HenTXEnvMap_MASK 0x00200000#define HC_HenVertexCNT_MASK 0x00100000#define HC_HenCPUDAZ_MASK 0x00080000#define HC_HenDASZWC_MASK 0x00040000#define HC_HenFBCull_MASK 0x00020000#define HC_HenCW_MASK 0x00010000#define HC_HenAA_MASK 0x00008000#define HC_HenST_MASK 0x00004000#define HC_HenZT_MASK 0x00002000#define HC_HenZW_MASK 0x00001000#define HC_HenAT_MASK 0x00000800#define HC_HenAW_MASK 0x00000400#define HC_HenSP_MASK 0x00000200#define HC_HenLP_MASK 0x00000100#define HC_HenTXCH_MASK 0x00000080#define HC_HenTXMP_MASK 0x00000040#define HC_HenTXPP_MASK 0x00000020#define HC_HenTXTR_MASK 0x00000010#define HC_HenCS_MASK 0x00000008#define HC_HenFOG_MASK 0x00000004#define HC_HenABL_MASK 0x00000002#define HC_HenDT_MASK 0x00000001/* Z Setting */#define HC_SubA_HZWBBasL 0x0010#define HC_SubA_HZWBBasH 0x0011#define HC_SubA_HZWBType 0x0012#define HC_SubA_HZBiasL 0x0013#define HC_SubA_HZWBend 0x0014#define HC_SubA_HZWTMD 0x0015#define HC_SubA_HZWCDL 0x0016#define HC_SubA_HZWCTAGnum 0x0017#define HC_SubA_HZCYNum 0x0018#define HC_SubA_HZWCFire 0x0019/* HC_SubA_HZWBType */#define HC_HZWBType_MASK 0x00800000#define HC_HZBiasedWB_MASK 0x00400000#define HC_HZONEasFF_MASK 0x00200000#define HC_HZOONEasFF_MASK 0x00100000#define HC_HZWBFM_MASK 0x00030000#define HC_HZWBLoc_MASK 0x0000c000#define HC_HZWBPit_MASK 0x00003fff#define HC_HZWBFM_16 0x00000000#define HC_HZWBFM_32 0x00020000#define HC_HZWBFM_24 0x00030000#define HC_HZWBLoc_Local 0x00000000#define HC_HZWBLoc_SyS 0x00004000/* HC_SubA_HZWBend */#define HC_HZWBend_MASK 0x00ffe000#define HC_HZBiasH_MASK 0x000000ff#define HC_HZWBend_SHIFT 10/* HC_SubA_HZWTMD */#define HC_HZWTMD_MASK 0x00070000#define HC_HEBEBias_MASK 0x00007f00#define HC_HZNF_MASK 0x000000ff#define HC_HZWTMD_NeverPass 0x00000000#define HC_HZWTMD_LT 0x00010000#define HC_HZWTMD_EQ 0x00020000#define HC_HZWTMD_LE 0x00030000#define HC_HZWTMD_GT 0x00040000#define HC_HZWTMD_NE 0x00050000#define HC_HZWTMD_GE 0x00060000#define HC_HZWTMD_AllPass 0x00070000#define HC_HEBEBias_SHIFT 8/* HC_SubA_HZWCDL 0x0016 */#define HC_HZWCDL_MASK 0x00ffffff/* HC_SubA_HZWCTAGnum 0x0017 */#define HC_HZWCTAGnum_MASK 0x00ff0000#define HC_HZWCTAGnum_SHIFT 16#define HC_HZWCDH_MASK 0x000000ff#define HC_HZWCDH_SHIFT 0/* HC_SubA_HZCYNum 0x0018 */#define HC_HZCYNum_MASK 0x00030000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -