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

Function WriteFIFO_VIF1

pcsx2/FiFo.cpp:78–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void WriteFIFO_VIF1(const mem128_t* value)
79{
80 VIF_LOG("WriteFIFO/VIF1 <- 0x%08X.%08X.%08X.%08X", value->_u32[0], value->_u32[1], value->_u32[2], value->_u32[3]);
81
82 if (vif1Regs.stat.FDR)
83 {
84 DevCon.Warning("writing to fifo when fdr is set!");
85 }
86 if (vif1Regs.stat.test(VIF1_STAT_INT | VIF1_STAT_VSS | VIF1_STAT_VIS | VIF1_STAT_VFS))
87 {
88 DevCon.Warning("writing to vif1 fifo when stalled");
89 }
90 if (vif1.irqoffset.value != 0 && vif1.vifstalled.enabled)
91 {
92 DevCon.Warning("Offset on VIF1 FIFO start!");
93 }
94
95 [[maybe_unused]] bool ret = VIF1transfer((u32*)value, 4);
96
97 if (vif1.cmd)
98 {
99 if (vif1.done && !vif1ch.qwc)
100 vif1Regs.stat.VPS = VPS_WAITING;
101 }
102 else
103 vif1Regs.stat.VPS = VPS_IDLE;
104
105 if (gifRegs.stat.APATH == 2 && gifUnit.gifPath[1].isDone())
106 {
107 gifRegs.stat.APATH = 0;
108 gifRegs.stat.OPH = 0;
109 vif1Regs.stat.VGW = false; //Let vif continue if it's stuck on a flush
110
111 if (gifUnit.checkPaths(1, 0, 1))
112 gifUnit.Execute(false, true);
113 }
114
115 pxAssertMsg(ret, "vif stall code not implemented");
116}
117
118void WriteFIFO_GIF(const mem128_t* value)
119{

Callers 1

TAKES_R128 _hwWrite128Function · 0.85

Calls 6

VIF1transferFunction · 0.85
testMethod · 0.80
isDoneMethod · 0.80
checkPathsMethod · 0.80
WarningMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected