mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
accurate_sprites performance improvement, PSP is untested
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@478 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
21395e3878
commit
e5fa981777
6 changed files with 292 additions and 230 deletions
|
@ -45,6 +45,43 @@ amips_clut_loop:
|
|||
nop
|
||||
|
||||
|
||||
.global amips_clut_6bit
|
||||
|
||||
amips_clut_6bit:
|
||||
srl $a3, 2
|
||||
li $t4, 0
|
||||
li $t5, 0
|
||||
li $t6, 0
|
||||
li $t7, 0
|
||||
amips_clut_loop6:
|
||||
lbu $t0, 0($a1) # tried lw here, no improvement noticed
|
||||
lbu $t1, 1($a1)
|
||||
lbu $t2, 2($a1)
|
||||
lbu $t3, 3($a1)
|
||||
ins $t4, $t0, 1, 6
|
||||
ins $t5, $t1, 1, 6
|
||||
ins $t6, $t2, 1, 6
|
||||
ins $t7, $t3, 1, 6
|
||||
addu $t0, $t4, $a2
|
||||
addu $t1, $t5, $a2
|
||||
addu $t2, $t6, $a2
|
||||
addu $t3, $t7, $a2
|
||||
lhu $t0, 0($t0)
|
||||
lhu $t1, 0($t1)
|
||||
lhu $t2, 0($t2)
|
||||
lhu $t3, 0($t3)
|
||||
ins $t0, $t1, 16, 16 # ins rt, rs, pos, size - Insert size bits starting
|
||||
ins $t2, $t3, 16, 16 # from the LSB of rs into rt starting at position pos
|
||||
sw $t0, 0($a0)
|
||||
sw $t2, 4($a0)
|
||||
addiu $a0, 8
|
||||
addiu $a3, -1
|
||||
bnez $a3, amips_clut_loop6
|
||||
addiu $a1, 4
|
||||
jr $ra
|
||||
nop
|
||||
|
||||
|
||||
# $a0 - pd, $a1 - tile word, $a2 - pal
|
||||
# ext rt, rs, pos, size // Extract size bits from position pos in rs and store in rt
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue