Merge pull request #169 from gm-matthew/texture

First 4MB of VROM maps to polygon RAM
This commit is contained in:
dukeeeey 2024-07-28 16:39:18 +01:00 committed by GitHub
commit 27a2336528
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -715,7 +715,13 @@ void CReal3D::WriteTexturePort(unsigned reg, uint32_t data)
{ {
uint32_t addr = m_vromTextureFIFO[0]; uint32_t addr = m_vromTextureFIFO[0];
uint32_t header = m_vromTextureFIFO[1]; uint32_t header = m_vromTextureFIFO[1];
UploadTexture(header, (const uint16_t *) &vrom[addr & 0xFFFFFF]);
// first 4 MB maps to polygon RAM rather than VROM
// Daytona 2 PE uses zeroed data to replace unused Dreamcast logo textures
if (addr < 0x100000)
UploadTexture(header, (const uint16_t*)&polyRAM[addr & 0xFFFFFF]);
else
UploadTexture(header, (const uint16_t*)&vrom[addr & 0xFFFFFF]);
m_vromTextureFIFOIdx = 0; m_vromTextureFIFOIdx = 0;
} }
else else