aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgpu/drawsynccallback.s
diff options
context:
space:
mode:
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