aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgpu/drawsynccallback.s
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2022-09-26 16:49:56 +0800
committerGitHub <noreply@github.com>2022-09-26 16:49:56 +0800
commitc4a2533d21dfd05cde841ea48c67b05e0e6a853f (patch)
treec7ef61653b157b69fb0956709366996ddbc4ecfa /libpsn00b/psxgpu/drawsynccallback.s
parenta8b404b3400c3ebd8e0b923dcaefcc49ea563e36 (diff)
parent86f0064afb8200e60dd80827535cac30d0eab028 (diff)
downloadpsn00bsdk-c4a2533d21dfd05cde841ea48c67b05e0e6a853f.tar.gz
Merge pull request #55 from spicyjpeg/psxmdec
Full MDEC support, C library refactors, cleanups and bugfixes (v0.20)
Diffstat (limited to 'libpsn00b/psxgpu/drawsynccallback.s')
-rw-r--r--libpsn00b/psxgpu/drawsynccallback.s105
1 files changed, 0 insertions, 105 deletions
diff --git a/libpsn00b/psxgpu/drawsynccallback.s b/libpsn00b/psxgpu/drawsynccallback.s
deleted file mode 100644
index 22cfb7d..0000000
--- a/libpsn00b/psxgpu/drawsynccallback.s
+++ /dev/null
@@ -1,105 +0,0 @@
-.set noreorder
-
-.include "hwregs_a.h"
-
-.text
-
-.global DrawSyncCallback
-.type DrawSyncCallback, @function
-DrawSyncCallback:
-
- addiu $sp, -8
- sw $ra, 0($sp)
- sw $a0, 4($sp)
-
- jal EnterCriticalSection
- nop
-
- beqz $a0, .Luninstall
- nop
-
- la $a1, _drawsync_handler
- lw $a1, 4($sp)
- jal DMACallback
- li $a0, 2
-
- b .Lcontinue
- nop
-
-.Luninstall:
-
- move $a1, $0
- jal DMACallback
- li $a0, 2
-
-.Lcontinue:
-
- lw $a0, 4($sp)
- la $v1, _drawsync_func
- lw $v0, 0($v1)
- sw $a0, 0($v1)
- sw $v0, 4($sp)
-
-.Lexit:
-
- jal ExitCriticalSection
- nop
-
- lw $ra, 0($sp)
- lw $v0, 4($sp)
- jr $ra
- addiu $sp, 8
-
-
-.type _drawsync_handler, @function
-_drawsync_handler:
-
-.Ldma_wait:
- la $v0, _drawsync_func
- lw $v0, 0($v0)
- nop
- beqz $v0, .Lskip
- nop
-
- addiu $sp, -4
- sw $ra, 0($sp)
-
- lw $v0, DMA2_CHCR($a0)
- nop
- srl $v0, 24
- andi $v0, 0x1
-
- bnez $v0, .Ldma_wait
- nop
-
-.Lgpu_wait:
- jal ReadGPUstat
- nop
- srl $v0, 28
- andi $v0, 0x1
- beqz $v0, .Lgpu_wait
- nop
-
- la $v1, _drawsync_func
- lw $v1, 0($v1)
-
- lui $v0, 0x0400 # Set DMA direction to off
- sw $v0, GPU_GP1($a0)
-
- jalr $v1
- nop
-
- lw $ra, 0($sp)
- addiu $sp, 4
-
-.Lskip:
-
- jr $ra
- nop
-
-
-.data
-
-_drawsync_func:
- .word 0
- \ No newline at end of file