diff options
Diffstat (limited to 'libpsn00b/psxgpu/drawsync.s')
| -rw-r--r-- | libpsn00b/psxgpu/drawsync.s | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libpsn00b/psxgpu/drawsync.s b/libpsn00b/psxgpu/drawsync.s new file mode 100644 index 0000000..149519d --- /dev/null +++ b/libpsn00b/psxgpu/drawsync.s @@ -0,0 +1,26 @@ +.set noreorder + +.include "hwregs_a.h" + +.section .text + + +.global DrawSync +.type DrawSync, @function +DrawSync: + addiu $sp, -4 + sw $ra, 0($sp) + +.gpu_wait: # Wait for GPU to be ready for commands and DMA + jal ReadGPUstat + nop + srl $v0, 0x1a + andi $v0, 0x5 + li $v1, 5 + bne $v0, $v1, .gpu_wait + nop + + lw $ra, 0($sp) + addiu $sp, 4 + jr $ra + nop |
