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

Method write

pcsx2/IPU/IPU_Fifo.cpp:62–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62int IPU_Fifo_Input::write(const u32* pMem, int size)
63{
64 const int transfer_size = std::min(size, 8 - (int)g_BP.IFC);
65 if (!transfer_size) return 0;
66
67 const int first_words = std::min((32 - writepos), transfer_size << 2);
68 const int second_words = (transfer_size << 2) - first_words;
69
70 memcpy(&data[writepos], pMem, first_words << 2);
71 pMem += first_words;
72
73 if(second_words)
74 memcpy(&data[0], pMem, second_words << 2);
75
76 writepos = (writepos + (transfer_size << 2)) & 31;
77
78 g_BP.IFC += transfer_size;
79
80 if (g_BP.IFC == 8)
81 IPUCoreStatus.DataRequested = false;
82
83 return transfer_size;
84}
85
86int IPU_Fifo_Input::read(void *value)
87{

Callers 11

pgifInitFunction · 0.45
PGIFwFunction · 0.45
psxDma2GpuWFunction · 0.45
CompileShaderMethod · 0.45
CompileShaderMethod · 0.45
WriteFIFO_IPUinFunction · 0.45
IPU1chainFunction · 0.45
mpeg2sliceIDECFunction · 0.45
mpeg2_sliceFunction · 0.45
ipuCSCFunction · 0.45
ipuPACKFunction · 0.45

Calls 1

minFunction · 0.50

Tested by

no test coverage detected