MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / write_fifo

Method write_fifo

pcsx2/Gif.cpp:83–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83int GIF_Fifo::write_fifo(u32* pMem, int size)
84{
85 if (fifoSize == 16)
86 {
87 //GIF_LOG("GIF FIFO Full");
88 return 0;
89 }
90
91 const int transferSize = std::min(size, 16 - (int)fifoSize);
92
93 int writePos = fifoSize * 4;
94
95 memcpy(&data[writePos], pMem, transferSize * 16);
96
97 fifoSize += transferSize;
98
99 GIF_LOG("GIF FIFO Adding %d QW to GIF FIFO at offset %d FIFO now contains %d QW", transferSize, writePos, fifoSize);
100
101 gifRegs.stat.FQC = fifoSize;
102 CalculateFIFOCSR();
103
104 return transferSize;
105}
106
107int GIF_Fifo::read_fifo()
108{

Callers 2

WriteFIFO_GIFFunction · 0.80
WRITERING_DMAFunction · 0.80

Calls 2

CalculateFIFOCSRFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected