__fi u32 dmacRead32( u32 mem ) { // Fixme: OPH hack. Toggle the flag on each GIF_STAT access. (rama) if (IsPageFor(mem) && (mem == GIF_STAT) && CHECK_OPHFLAGHACK) { gifRegs.stat.OPH = !gifRegs.stat.OPH; } return psHu32(mem); }
__fi u32 dmacRead32( u32 mem ) { // Fixme: OPH hack. Toggle the flag on GIF_STAT access. (rama) if (IsPageFor(mem) && (mem == GIF_STAT) && CHECK_OPHFLAGHACK) { static unsigned counter = 1; if (++counter == 8) counter = 2; // Set OPH and APATH from counter, cycling paths and alternating OPH return gifRegs.stat._u32 & ~(7 << 9) | (counter & 1 ? counter << 9 : 0); } return psHu32(mem); }