mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 15:45:41 +00:00
Figured out Step 1.0 VROM texture uploads. Fixes missing textures in VF3 and VF3TB.
This commit is contained in:
parent
ef87093824
commit
94c66eea7b
|
@ -832,6 +832,20 @@ void CReal3D::WriteTextureFIFO(uint32_t data)
|
|||
|
||||
void CReal3D::WriteTexturePort(unsigned reg, uint32_t data)
|
||||
{
|
||||
if (step == 0x10)
|
||||
{
|
||||
uint32_t addr = data & 0xFFFFFF;
|
||||
uint32_t num_words = (2+vrom[addr+0]/2) / 4;
|
||||
if (!num_words)
|
||||
{
|
||||
DebugLog("Real3D: 0-length VROM texture upload @ PC=%08X (%08X)\n", ppc_get_pc(), data);
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < num_words; i++)
|
||||
WriteTextureFIFO(vrom[(addr + i) & 0xFFFFFF]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_vromTextureFIFOIdx == 2)
|
||||
{
|
||||
uint32_t addr = m_vromTextureFIFO[0];
|
||||
|
@ -841,6 +855,7 @@ void CReal3D::WriteTexturePort(unsigned reg, uint32_t data)
|
|||
}
|
||||
else
|
||||
m_vromTextureFIFO[m_vromTextureFIFOIdx++] = data;
|
||||
}
|
||||
}
|
||||
|
||||
void CReal3D::WriteLowCullingRAM(uint32_t addr, uint32_t data)
|
||||
|
|
Loading…
Reference in a new issue