diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
| commit | f3e040230772f978540a71aea43dfde200992922 (patch) | |
| tree | bd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/psxgpu/drawsync.s | |
| download | psn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz | |
First commit
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 |
