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,15 +832,30 @@ void CReal3D::WriteTextureFIFO(uint32_t data)
|
||||||
|
|
||||||
void CReal3D::WriteTexturePort(unsigned reg, uint32_t data)
|
void CReal3D::WriteTexturePort(unsigned reg, uint32_t data)
|
||||||
{
|
{
|
||||||
if (m_vromTextureFIFOIdx == 2)
|
if (step == 0x10)
|
||||||
{
|
{
|
||||||
uint32_t addr = m_vromTextureFIFO[0];
|
uint32_t addr = data & 0xFFFFFF;
|
||||||
uint32_t header = m_vromTextureFIFO[1];
|
uint32_t num_words = (2+vrom[addr+0]/2) / 4;
|
||||||
UploadTexture(header, (const uint16_t *) &vrom[addr & 0xFFFFFF]);
|
if (!num_words)
|
||||||
m_vromTextureFIFOIdx = 0;
|
{
|
||||||
|
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
|
else
|
||||||
m_vromTextureFIFO[m_vromTextureFIFOIdx++] = data;
|
{
|
||||||
|
if (m_vromTextureFIFOIdx == 2)
|
||||||
|
{
|
||||||
|
uint32_t addr = m_vromTextureFIFO[0];
|
||||||
|
uint32_t header = m_vromTextureFIFO[1];
|
||||||
|
UploadTexture(header, (const uint16_t *) &vrom[addr & 0xFFFFFF]);
|
||||||
|
m_vromTextureFIFOIdx = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_vromTextureFIFO[m_vromTextureFIFOIdx++] = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CReal3D::WriteLowCullingRAM(uint32_t addr, uint32_t data)
|
void CReal3D::WriteLowCullingRAM(uint32_t addr, uint32_t data)
|
||||||
|
|
Loading…
Reference in a new issue