|
|
1.1 ! root 1: /*###################################################################### ! 2: Type Declaration Section ! 3: ########################################################################*/ ! 4: ! 5: /* VIP I/O Bus Register offsets */ ! 6: #define VIP_AIR 0x0 ! 7: #define VIP_CSR 0x1 ! 8: #define VIP_DFIN 0x2 ! 9: #define VIP_DFOUT 0x4 ! 10: ! 11: /* VIP Internal registers */ ! 12: #define VIP_SCR 0 ! 13: #define VIP_SSR 1 ! 14: #define VIP_ICR 2 ! 15: #define VIP_ISR 3 ! 16: #define VIP_PSR 4 ! 17: #define VIP_VRR 5 ! 18: #define VIP_PCR 6 ! 19: #define VIP_PPMR 7 ! 20: #define VIP_PRAR 8 ! 21: #define VIP_PWAR 9 ! 22: #define VIP_PCRR 10 ! 23: ! 24: // T.S.R. related type defs. ! 25: #define SENSE_VECTOR 0x33 ! 26: ! 27: #define RESET_DEVICE 0x00 ! 28: #define GET_DATA_SIZES 0x01 ! 29: #define SET_DATA_SIZE 0x02 ! 30: #define GET_CONFIGURATION 0x03 ! 31: #define SET_CONFIGURATION 0x04 ! 32: #define REPORT 0x05 ! 33: #define CONTINUE 0x06 ! 34: #define RESET_ZERO 0x07 ! 35: #define SET_ZERO 0x08 ! 36: #define TEST_DEVICES 0x09 ! 37: #define GET_DEVICE_DATA 0x70; ! 38: #define SET_DEVICE_DATA 0x71; ! 39: #define SENSE_DRIVER_STATUS 0x7F ! 40: #define SET_VIDEO_PAGE 0x80 ! 41: ! 42: #define MIN_SENSE_FUNCTION 0x60 ! 43: #define MAX_SENSE_FUNCTION 0x70 ! 44: ! 45: #define DCHMS 2 ! 46: #define DCHTD 3 ! 47: #define DCHPD 4 ! 48: #define DCALL 0xFF ! 49: ! 50: #define PRDM "Forte Technologies, Inc.\0" ! 51: #define PRDN "VFX1 CyberPuck\0" ! 52: ! 53: //Address index values for registers. ! 54: enum air_enum { SCR, SSR, ICR, ISR, PSR, VRR, PCR, PPRR, PRAR, PWAR, PCRA, ! 55: NOREG }; ! 56: typedef enum air_enum AIRVAL; ! 57: ! 58: //Software Command Register codes. ! 59: #define CPND 128 //Determines command pending bit mask. ! 60: #define CCHK 64 //Determines command check bit mask. ! 61: enum cmdcode_enum { NOP, CSTRT, CCONT, RSTRT, RTERM, GSTAT, RSTAT, NOCMD }; ! 62: typedef enum cmdcode_enum CMDCODE; ! 63: ! 64: //Software Status Register codes. ! 65: enum statcode_enum { SDOK, SDCNC, SDCFL, SDDNR, SDDNE, SDDFL, SDNOR, SDCNV, ! 66: SDSERR }; ! 67: typedef enum statcode_enum STATCODE; ! 68: ! 69: //Data fifo selection values (IN = data into the VIP, OUT = data out from VIP) ! 70: enum fifodir_enum {IN, OUT, NODIR}; ! 71: typedef enum fifodir_enum FIFODIR; ! 72: ! 73: //Packet type values. ! 74: enum packtyp_enum {NULLP, SYSI, VNDI, SYSC, HMS, SVM, HTD, HPD}; ! 75: typedef enum packtyp_enum PACKTYP; ! 76: ! 77: //Null packet type. ! 78: struct cfpack0_struct ! 79: { ! 80: unsigned char psiz; ! 81: unsigned char ptyp; ! 82: }; ! 83: typedef struct cfpack0_struct NULL_CPKT; ! 84: ! 85: //System info configuration packet type. ! 86: struct cfpack1_struct ! 87: { ! 88: unsigned char psiz; ! 89: unsigned char ptyp; ! 90: unsigned char dcls; ! 91: unsigned char dnum; ! 92: unsigned char sstat; ! 93: unsigned char vmin; ! 94: unsigned char vmaj; ! 95: char vipid[4]; ! 96: unsigned short dfsz; ! 97: unsigned short dummy; ! 98: }; ! 99: typedef struct cfpack1_struct SYSTEM_CPKT; ! 100: ! 101: // Vendor sizes ! 102: #define MN_SIZE 32 ! 103: #define SNRL_SIZE 16 ! 104: //Vendor info configuration packet type. ! 105: struct cfpack2_struct ! 106: { ! 107: unsigned char psiz; ! 108: unsigned char ptyp; ! 109: unsigned char prdm[ MN_SIZE ]; ! 110: unsigned char prdn[ MN_SIZE ]; ! 111: unsigned char prdsn[ SNRL_SIZE ]; ! 112: unsigned char prdrl[ SNRL_SIZE ]; ! 113: }; ! 114: typedef struct cfpack2_struct VENDOR_CPKT; ! 115: ! 116: //Head Mounted System Capabilities structure. ! 117: struct hmsc_struct ! 118: { ! 119: unsigned char aoc : 1; //Audio out capable if set. ! 120: unsigned char aic : 1; //Audio in capable if set. ! 121: unsigned char sac : 1; //Stereo audio capable if set. ! 122: unsigned char cic : 1; //Color image capable if set. ! 123: unsigned char sic : 1; //Stereo image capable if set. ! 124: unsigned char hti : 1; //Head Tracker installed. ! 125: unsigned char dum : 2; //Not used. ! 126: }; ! 127: typedef struct hmsc_struct HMSC; ! 128: ! 129: //Head Mounted System flags structure. ! 130: struct hmsf_struct ! 131: { ! 132: unsigned char dps : 1; //Disable palette snooping. ! 133: unsigned char aic : 1; //Delayed flip. ! 134: unsigned char dum : 5; //Not used ! 135: unsigned char ddsbl: 1; //Disable device. ! 136: }; ! 137: typedef struct hmsf_struct HMSF; ! 138: ! 139: //Head Mounted System configuration packet type. ! 140: #define VMODSIZE 10 ! 141: struct cfpack3_struct ! 142: { ! 143: unsigned char psiz; //Number of bytes in packet. ! 144: unsigned char ptyp; //Packet type. ! 145: unsigned char dcls; // Device class ! 146: unsigned char dnum; // Device number ! 147: HMSF hmsf; //Head mounted system flags. ! 148: unsigned char hmss; //Head mounted system status. ! 149: unsigned char vmin; //Minor version for device. ! 150: unsigned char vmaj; //Major version for device. ! 151: HMSC hmsc; //Head mounted system capabilities. ! 152: unsigned char dtyp; //Display type. ! 153: unsigned short vmag; //Visual magnification in units of 0.001. ! 154: unsigned short hfov; //Horizontal full FOV in units of 0.25 deg. ! 155: unsigned short vfov; //Vertical full FOV in units of 0.25 deg. ! 156: unsigned char ipd; //Interpupillary distance in units of 0.5 mm. ! 157: signed char hoao; //Horizontal optical axis offset in units of .1 mm. ! 158: signed char voao; //Vertical optical axis offset in units of .1 mm. ! 159: signed char oar; //Optical axis rotation in units of 0.25 deg. ! 160: unsigned char mrr; //Max refresh rate in Hz. ! 161: unsigned char cvm; //Current video mode. ! 162: unsigned char reserved; ! 163: unsigned char vmsp; //Number of Vesa modes supported. ! 164: unsigned short vmod[VMODSIZE]; //Supported VESA modes. Field currently ! 165: //allows up to 10 supported modes. Packet in fifo ! 166: //may have any number of supported modes present. ! 167: }; ! 168: typedef struct cfpack3_struct HMS_CPKT; ! 169: ! 170: //Rotational Coordinate Flags structure. ! 171: struct rtcf_struct ! 172: { ! 173: unsigned char rtc : 1; //Return to center device (1=yes). ! 174: unsigned char wrp : 1; //Coordiante values wrap (1=yes). ! 175: unsigned char zpsr : 1; //Zero position resetable (1=yes). ! 176: unsigned char rdg : 1; //Rotational data generated (1=yes). ! 177: unsigned char dum : 3; //Not used. ! 178: unsigned char den : 1; //Data reporting enabled (1=yes). ! 179: }; ! 180: typedef struct rtcf_struct RTCF; ! 181: ! 182: //Rotation Coordinate Descriptor structure. ! 183: struct rtcd_struct ! 184: { ! 185: signed short maxv; ! 186: signed short minv; ! 187: unsigned short steps; ! 188: RTCF rcf; ! 189: unsigned char dum; ! 190: }; ! 191: typedef struct rtcd_struct RTCD; ! 192: ! 193: //Head tracker flags structure. ! 194: struct htf_struct ! 195: { ! 196: unsigned char dum : 7; //Not used. ! 197: unsigned char ddsbl: 1; //Data reporting enabled (1=yes). ! 198: }; ! 199: typedef struct htf_struct HTF; ! 200: ! 201: //Head Tracker Device configuration packet. ! 202: struct cfpack4_struct ! 203: { ! 204: unsigned char psiz; ! 205: unsigned char ptyp; ! 206: unsigned char dcls; ! 207: unsigned char dnum; ! 208: HTF htf; //Head tracker flag (disable device if set). ! 209: unsigned char hts; //Head tracker status. ! 210: unsigned char vmin; //Minor version for tracker. ! 211: unsigned char vmaj; //Major version for tracker. ! 212: RTCD ywcd; ! 213: RTCD ptcd; ! 214: RTCD rlcd; ! 215: }; ! 216: typedef struct cfpack4_struct HTD_CPKT; ! 217: ! 218: //Button Descriptor structure. ! 219: struct btds_struct ! 220: { ! 221: unsigned char nbtn; //Number of buttons/switches on device. ! 222: unsigned char cnck : 1; //Counts clicks (1=yes). ! 223: unsigned char dum : 6; //Not used. ! 224: unsigned char den : 1; //Data reporting enabled (1=yes). ! 225: }; ! 226: typedef struct btds_struct BTDS; ! 227: ! 228: //Hand held device Flags structure. ! 229: struct hhpf_struct ! 230: { ! 231: unsigned char hhpp : 2; //Hand held pointer prority (0=highest). ! 232: unsigned char dum : 4; //Not used. ! 233: unsigned char ddsbl: 1; //Data reporting enabled (1=yes). ! 234: }; ! 235: typedef struct hhpf_struct HHPF; ! 236: ! 237: //Hand-held Pointing Device configuration packet. ! 238: struct cfpack5_struct ! 239: { ! 240: unsigned char psiz; ! 241: unsigned char ptyp; ! 242: unsigned char dcls; ! 243: unsigned char dnum; ! 244: HHPF hhpf; //Hand held flag (disable device if set). ! 245: unsigned char hhps; //Head tracker status. ! 246: unsigned char vmin; //Minor version for tracker. ! 247: unsigned char vmaj; //Major version for tracker. ! 248: RTCD ywcd; ! 249: RTCD ptcd; ! 250: RTCD rlcd; ! 251: BTDS btcd; ! 252: }; ! 253: typedef struct cfpack5_struct HPD_CPKT; ! 254: ! 255: struct cfpack6_struct ! 256: { ! 257: unsigned char psiz; //Number of bytes in packet. ! 258: unsigned char ptyp; //Packet type. ! 259: unsigned char dcls; // Device class ! 260: unsigned char dnum; // Device number ! 261: HMSF hmsf; //Head mounted system flags. ! 262: unsigned char vmod; //Head mounted video mode. ! 263: }; ! 264: typedef struct cfpack6_struct SVM_CPKT; ! 265:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.