mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
diag(D172): rule out cycle-type too; ship GE_D172 probes
Real particle records (assets/oddtextures.c globalDL_0x078..) DO set gsDPSetCycleType(G_CYC_2CYCLE); GE_D172=1 probe confirms fast3d applies it (particle combine fc26a004 logged at cycletype=2CYC). Both the 0xB9-abort and the cycle-type hypotheses are now dead. Bug is the G_CC_INTERFERENCE two-tile combine / TEXEL1 path (IA8 smoke x RGBA16 fire @ tmem 0x188). Probes (#ifdef PORT, GE_D172=1, inert otherwise): - gfx_pc.cpp G_SETCOMBINE: distinct combine + active cycletype - gfx_pc.cpp gfx_sp_tri1: tris with cyc2 combine drawn at cycletype!=2CYC Needs a display capture to go further (headless can't see particle colour).
This commit is contained in:
1 parent
809560ca1e
commit
9215fde4fb
3 files changed
+95
-34
No files matched your search
@@ -1529,6 +1529,25 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo
|
||||
use_alpha = true;
|
||||
}
|
||||
|
||||
#ifdef PORT
|
||||
/* D172 probe (env-gated, inert): flag triangles whose combine carries
|
||||
* non-trivial cycle-2 terms while fast3d is NOT in 2-cycle mode - the
|
||||
* suspected particle-colour bug (records set a 2-cyc combine but never
|
||||
* set cycletype). rgb_cyc2 sits at bits 28..43 of combine_mode. */
|
||||
if (getenv("GE_D172")) {
|
||||
uint32_t rgb_cyc2 = (uint32_t)((rdp.combine_mode >> 28) & 0xffff);
|
||||
if (!use_2cyc && rgb_cyc2 != 0) {
|
||||
static int d172t = 0;
|
||||
if (d172t < 12) {
|
||||
d172t++;
|
||||
sysLogPrintf(LOG_NOTE,
|
||||
"D172: tri with 2cyc combine but cycletype=1CYC combine_mode=%llx",
|
||||
(unsigned long long)rdp.combine_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (use_alpha) {
|
||||
cc_options |= (uint64_t)SHADER_OPT_ALPHA;
|
||||
}
|
||||
@@ -2784,6 +2803,28 @@ static void gfx_run_dl(Gfx* cmd) {
|
||||
gfx_dp_set_grayscale_color(C1(24, 8), C1(16, 8), C1(8, 8), C1(0, 8));
|
||||
break;
|
||||
case G_SETCOMBINE:
|
||||
#ifdef PORT
|
||||
/* D172 probe (env-gated, inert): log every SETCOMBINE with the
|
||||
* cycle-type active at that moment. Particle records
|
||||
* (explosion.c g_ExplosionDisplayLists[]) set a 2-cycle
|
||||
* combine but never set cycletype - this tells us what
|
||||
* cycletype fast3d has when they replay. */
|
||||
if (getenv("GE_D172")) {
|
||||
static uint64_t d172seen[64];
|
||||
static int d172cnt = 0;
|
||||
uint64_t key = ((uint64_t)(uint32_t)cmd->words.w0 << 32) | (uint32_t)cmd->words.w1;
|
||||
bool dup = false;
|
||||
for (int k = 0; k < d172cnt; k++) if (d172seen[k] == key) { dup = true; break; }
|
||||
if (!dup && d172cnt < 64) {
|
||||
d172seen[d172cnt++] = key;
|
||||
uint32_t ct = (rdp.other_mode_h >> G_MDSFT_CYCLETYPE) & 3;
|
||||
sysLogPrintf(LOG_NOTE,
|
||||
"D172: SETCOMBINE w0=%08x w1=%08x cycletype=%u (%s)",
|
||||
(uint32_t)cmd->words.w0, (uint32_t)cmd->words.w1,
|
||||
ct, ct == 0 ? "1CYC" : ct == 1 ? "2CYC" : ct == 2 ? "COPY" : "FILL");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
gfx_dp_set_combine_mode(color_comb(C0(20, 4), C1(28, 4), C0(15, 5), C1(15, 3)),
|
||||
alpha_comb(C0(12, 3), C1(12, 3), C0(9, 3), C1(9, 3)),
|
||||
color_comb(C0(5, 4), C1(24, 4), C0(0, 5), C1(6, 3)),
|
||||
|
||||
Reference in new issue
Block a user