FifoPlayer: Support recording texture preloads
This commit is contained in:
parent
e7c883d6be
commit
198d60c569
|
@ -90,9 +90,9 @@ void GetTlutLoadData(u32 &tlutAddr, u32 &memAddr, u32 &tlutXferCount, BPMemory &
|
|||
|
||||
// TODO - figure out a cleaner way.
|
||||
if (Core::g_CoreStartupParameter.bWii)
|
||||
memAddr = bpmem.tmem_config.tlut_src << 5;
|
||||
memAddr = bpMem.tmem_config.tlut_src << 5;
|
||||
else
|
||||
memAddr = (bpmem.tmem_config.tlut_src & 0xFFFFF) << 5;
|
||||
memAddr = (bpMem.tmem_config.tlut_src & 0xFFFFF) << 5;
|
||||
}
|
||||
|
||||
void LoadCPReg(u32 subCmd, u32 value, CPMemory &cpMem)
|
||||
|
|
|
@ -33,7 +33,7 @@ struct MemoryUpdate
|
|||
TEXTURE_MAP = 0x01,
|
||||
XF_DATA = 0x02,
|
||||
VERTEX_STREAM = 0x04,
|
||||
TLUT = 0x08
|
||||
TMEM = 0x08,
|
||||
};
|
||||
|
||||
u32 fifoPosition;
|
||||
|
|
|
@ -114,6 +114,8 @@ void FifoRecordAnalyzer::DecodeOpcode(u8 *data)
|
|||
|
||||
if (bp.address == BPMEM_LOADTLUT1)
|
||||
ProcessLoadTlut1();
|
||||
if (bp.address == BPMEM_PRELOAD_MODE)
|
||||
ProcessPreloadTexture();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -143,7 +145,16 @@ void FifoRecordAnalyzer::ProcessLoadTlut1()
|
|||
|
||||
GetTlutLoadData(tlutMemAddr, memAddr, tlutXferCount, *m_BpMem);
|
||||
|
||||
FifoRecorder::GetInstance().WriteMemory(memAddr, tlutXferCount, MemoryUpdate::TLUT);
|
||||
FifoRecorder::GetInstance().WriteMemory(memAddr, tlutXferCount, MemoryUpdate::TMEM);
|
||||
}
|
||||
|
||||
void FifoRecordAnalyzer::ProcessPreloadTexture()
|
||||
{
|
||||
BPS_TmemConfig& tmem_cfg = m_BpMem->tmem_config;
|
||||
u32 tmem_addr = tmem_cfg.preload_tmem_even * TMEM_LINE_SIZE;
|
||||
u32 size = tmem_cfg.preload_tile_info.count * TMEM_LINE_SIZE; // TODO: Should this be half size for RGBA8 preloads?
|
||||
|
||||
FifoRecorder::GetInstance().WriteMemory(tmem_cfg.preload_addr << 5, size, MemoryUpdate::TMEM);
|
||||
}
|
||||
|
||||
void FifoRecordAnalyzer::ProcessLoadIndexedXf(u32 val, int array)
|
||||
|
|
|
@ -40,6 +40,7 @@ private:
|
|||
void DecodeOpcode(u8 *data);
|
||||
|
||||
void ProcessLoadTlut1();
|
||||
void ProcessPreloadTexture();
|
||||
void ProcessLoadIndexedXf(u32 val, int array);
|
||||
void ProcessVertexArrays(u8 *data, u8 vtxAttrGroup);
|
||||
void ProcessTexMaps();
|
||||
|
|
Loading…
Reference in New Issue