diff --git a/GPU/GeDisasm.cpp b/GPU/GeDisasm.cpp index 2a7f523df..0fb9d850e 100644 --- a/GPU/GeDisasm.cpp +++ b/GPU/GeDisasm.cpp @@ -720,7 +720,45 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) { break; case GE_CMD_BLENDMODE: - sprintf(buffer, "Blend mode: %06x", data); + { + const char *blendModes[] = { + "add", + "subtract", + "reverse subtract", + "min", + "max", + "abs subtract", + "unsupported1", + "unsupported2", + }; + const char *blendFactors[] = { + "a", + "1.0 - a", + "src.a", + "1.0 - src.a", + "dst.a", + "1.0 - dst.a", + "2.0 * src.a", + "1.0 - 2.0 * src.a", + "2.0 * dst.a", + "1.0 - 2.0 * dst.a", + "fixed", + "fixed2", + "fixed3", + "fixed4", + "fixed5", + "fixed6", + }; + + const char *blendFactorA = blendFactors[(data >> 0) & 0xF]; + const char *blendFactorB = blendFactors[(data >> 4) & 0xF]; + const char *blendMode = blendModes[(data >> 8) & 0x7]; + + if (data & ~0xFF0007FF) + sprintf(buffer, "Blend mode: %s %s, %s (extra: %06x)", blendMode, blendFactorA, blendFactorB, data & ~0xFF0007FF); + else + sprintf(buffer, "Blend mode: %s %s, %s", blendMode, blendFactorA, blendFactorB); + } break; case GE_CMD_BLENDFIXEDA: