Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

PGRAPH

mupuf edited this page · 14 revisions

PGRAPH

The PGRAPH is the engine of the GPU that actually performs graphics operations like blitting and drawing triangles. It can be programmed by directly writing to its registers in MMIO space or by feeding commands through the PFIFO engine.

Registers

You'll find the register map here:

Pause/Unpause

NV04

TODO

NV50 & NVC0

Pause

To pause the PGRAPH, you need to play with the PULL(bit 0) bit of the CONTROL(0x400500) register.

Setting it will prevent PGRAPH from pulling commands from the PFIFO which will then starve of commands --> paused!

We also need to set the bit UNK16(bit 16) because otherwise, PGRAPH could be stuck in a ctxprog context switch or an m2mf memory transfer. Anyway, this bit should already been set.

Wait for the pause

We now need to wait for PGRAPH to actually pause.

The blob first checks on these registers (wait for them to come to 0):

  • UNK380(0x400380)
  • UNK384(0x400384)
  • UNK388(0x400388)

Then, you'll need to wait for the STATUS(0x400700) register's bit ALL(bit 0) to go down to 0.

Un-pause

Un-pausing is done by setting the PULL(bit 0) bit of the CONTROL(0x400500) register. Remember to also set the bit UNK16(bit 16).

Something went wrong with that request. Please try again.