Fifo analyzer: Fix various XF mistakes
* 'hangle' was a typo * Light colors include an alpha value, so they should be 8 characters, not 6 * The XF command format adds 1 to the count internally (so 0 is one word), but we need to subtract that back to produce a valid command * XFMEM_POSTMATRICES was calculating the row by subtracting XFMEM_POSMATRICES (POS vs POST), resulting in incorrect row numbering
This commit is contained in:
parent
3fb09e3297
commit
698def66ff
|
@ -224,7 +224,7 @@ public:
|
|||
const auto [name, desc] = GetXFTransferInfo(address, count, data);
|
||||
ASSERT(!name.empty());
|
||||
|
||||
const u32 command = address | (count << 16);
|
||||
const u32 command = address | ((count - 1) << 16);
|
||||
|
||||
text = QStringLiteral("XF %1 ").arg(command, 8, 16, QLatin1Char('0'));
|
||||
|
||||
|
|
|
@ -321,17 +321,17 @@ std::pair<std::string, std::string> GetXFRegInfo(u32 address, u32 value)
|
|||
|
||||
case XFMEM_SETCHAN0_AMBCOLOR:
|
||||
return std::make_pair(RegName(XFMEM_SETCHAN0_AMBCOLOR),
|
||||
fmt::format("Channel 0 Ambient Color: {:06x}", value));
|
||||
fmt::format("Channel 0 Ambient Color: {:08x}", value));
|
||||
case XFMEM_SETCHAN1_AMBCOLOR:
|
||||
return std::make_pair(RegName(XFMEM_SETCHAN1_AMBCOLOR),
|
||||
fmt::format("Channel 1 Ambient Color: {:06x}", value));
|
||||
fmt::format("Channel 1 Ambient Color: {:08x}", value));
|
||||
|
||||
case XFMEM_SETCHAN0_MATCOLOR:
|
||||
return std::make_pair(RegName(XFMEM_SETCHAN0_MATCOLOR),
|
||||
fmt::format("Channel 0 Material Color: {:06x}", value));
|
||||
fmt::format("Channel 0 Material Color: {:08x}", value));
|
||||
case XFMEM_SETCHAN1_MATCOLOR:
|
||||
return std::make_pair(RegName(XFMEM_SETCHAN1_MATCOLOR),
|
||||
fmt::format("Channel 1 Material Color: {:06x}", value));
|
||||
fmt::format("Channel 1 Material Color: {:08x}", value));
|
||||
|
||||
case XFMEM_SETCHAN0_COLOR: // Channel Color
|
||||
return std::make_pair(RegName(XFMEM_SETCHAN0_COLOR),
|
||||
|
@ -474,8 +474,8 @@ std::string GetXFMemName(u32 address)
|
|||
}
|
||||
else if (address >= XFMEM_POSTMATRICES && address < XFMEM_POSTMATRICES_END)
|
||||
{
|
||||
const u32 row = (address - XFMEM_POSMATRICES) / 4;
|
||||
const u32 col = (address - XFMEM_POSMATRICES) % 4;
|
||||
const u32 row = (address - XFMEM_POSTMATRICES) / 4;
|
||||
const u32 col = (address - XFMEM_POSTMATRICES) % 4;
|
||||
return fmt::format("Post matrix row {:2d} col {:2d}", row, col);
|
||||
}
|
||||
else if (address >= XFMEM_LIGHTS && address < XFMEM_LIGHTS_END)
|
||||
|
@ -508,9 +508,9 @@ std::string GetXFMemName(u32 address)
|
|||
case 15:
|
||||
// Yagcd says light dir or "1/2 angle", dolphin has union for ddir or shalfangle.
|
||||
// It would make sense if d stood for direction and s for specular, but it's ddir and
|
||||
// shalfhangle that have the comment "specular lights only", both at the same offset,
|
||||
// shalfangle that have the comment "specular lights only", both at the same offset,
|
||||
// while dpos and sdir have none...
|
||||
return fmt::format("Light {0} {1} direction or half hangle {1}", light, "xyz"[offset - 13]);
|
||||
return fmt::format("Light {0} {1} direction or half angle {1}", light, "xyz"[offset - 13]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue