| 76 | } |
| 77 | |
| 78 | void 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 | |
| 118 | void WriteFIFO_GIF(const mem128_t* value) |
| 119 | { |
no test coverage detected