MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / gteGPF

Function gteGPF

pcsx2/IopGte.cpp:2145–2245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2143}
2144
2145void gteGPF() {
2146 // double ipx, ipy, ipz;
2147 // s32 ipx, ipy, ipz;
2148
2149#ifdef GTE_DUMP
2150 static int sample = 0; sample++;
2151#endif
2152#ifdef GTE_LOG
2153 GTE_LOG("GTE_GPF %lx\n", psxRegs.code & 0x1ffffff);
2154#endif
2155#ifdef GTE_DUMP
2156 if (sample < 100)
2157 {
2158 G_OP("GPF", 5);
2159 G_SD(6);
2160 G_SD(8);
2161 G_SD(9);
2162 G_SD(10);
2163 G_SD(11);
2164 }
2165#endif
2166 /* gteFLAG = 0;
2167
2168 ipx = (double)((short)gteIR0) * ((short)gteIR1);
2169 ipy = (double)((short)gteIR0) * ((short)gteIR2);
2170 ipz = (double)((short)gteIR0) * ((short)gteIR3);
2171
2172 // same as mvmva
2173 if (psxRegs.code & 0x80000) {
2174 ipx /= 4096.0; ipy /= 4096.0; ipz /= 4096.0;
2175 }
2176
2177 gteMAC1 = (long)ipx;
2178 gteMAC2 = (long)ipy;
2179 gteMAC3 = (long)ipz;
2180
2181 gteIR1 = (long)LimitAS(ipx,24);
2182 gteIR2 = (long)LimitAS(ipy,23);
2183 gteIR3 = (long)LimitAS(ipz,22);
2184
2185 gteRGB0 = gteRGB1;
2186 gteRGB1 = gteRGB2;
2187 gteC2 = gteCODE;
2188 gteR2 = (unsigned char)LimitB(ipx,21);
2189 gteG2 = (unsigned char)LimitB(ipy,20);
2190 gteB2 = (unsigned char)LimitB(ipz,19);*/
2191
2192 gteFLAG = 0;
2193
2194 /* if (psxRegs.code & 0x80000) {
2195 gteMAC1 = NC_OVERFLOW1((gteIR0 * gteIR1) / 4096.0f);
2196 gteMAC2 = NC_OVERFLOW2((gteIR0 * gteIR2) / 4096.0f);
2197 gteMAC3 = NC_OVERFLOW3((gteIR0 * gteIR3) / 4096.0f);
2198 } else {
2199 gteMAC1 = NC_OVERFLOW1(gteIR0 * gteIR1);
2200 gteMAC2 = NC_OVERFLOW2(gteIR0 * gteIR2);
2201 gteMAC3 = NC_OVERFLOW3(gteIR0 * gteIR3);
2202 }*/

Callers

nothing calls this directly

Calls 6

FNC_OVERFLOW1Function · 0.85
FNC_OVERFLOW2Function · 0.85
FNC_OVERFLOW3Function · 0.85
FlimB1Function · 0.85
FlimB2Function · 0.85
FlimB3Function · 0.85

Tested by

no test coverage detected