mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 18:01:16 +00:00
Rename and move handwritten asm files (#1254)
* Rename handwritten asm files and move them to src * Fix progress.py * Remove handling for asm dir from Makefile
This commit is contained in:
parent
e989cb7ace
commit
4775fd4a7e
39 changed files with 47 additions and 59 deletions
40
src/libultra/mgu/mtxf2l.s
Normal file
40
src/libultra/mgu/mtxf2l.s
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
#define MTX_INTPART 0
|
||||
#define MTX_FRACPART 0x20
|
||||
|
||||
LEAF(guMtxF2L)
|
||||
li $at, 0x47800000 // 65536.0f
|
||||
mtc1 $at, $f0
|
||||
li $t9, 0xFFFF0000
|
||||
addiu $t8, $a1, MTX_FRACPART
|
||||
1:
|
||||
lwc1 $f4, ($a0)
|
||||
lwc1 $f10, 4($a0)
|
||||
addiu $a1, $a1, 4
|
||||
mul.s $f6, $f4, $f0
|
||||
addiu $a0, $a0, 8
|
||||
mul.s $f16, $f10, $f0
|
||||
trunc.w.s $f8, $f6
|
||||
trunc.w.s $f18, $f16
|
||||
mfc1 $t0, $f8
|
||||
mfc1 $t1, $f18
|
||||
and $t2, $t0, $t9
|
||||
sll $t5, $t0, 0x10
|
||||
srl $t3, $t1, 0x10
|
||||
andi $t6, $t1, 0xFFFF
|
||||
or $t4, $t2, $t3
|
||||
or $t7, $t5, $t6
|
||||
sw $t4, (MTX_INTPART-4)($a1)
|
||||
bne $a1, $t8, 1b
|
||||
sw $t7, (MTX_FRACPART-4)($a1)
|
||||
jr $ra
|
||||
nop
|
||||
END(guMtxF2L)
|
29
src/libultra/mgu/mtxident.s
Normal file
29
src/libultra/mgu/mtxident.s
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
LEAF(guMtxIdent)
|
||||
addi $t0, $zero, 1
|
||||
sll $t1, $t0, 0x10
|
||||
sw $t1, ($a0)
|
||||
sw $zero, 4($a0)
|
||||
sw $t0, 8($a0)
|
||||
sw $zero, 0xc($a0)
|
||||
sw $zero, 0x10($a0)
|
||||
sw $t1, 0x14($a0)
|
||||
sw $zero, 0x18($a0)
|
||||
sw $t0, 0x1C($a0)
|
||||
sw $zero, 0x20($a0)
|
||||
sw $zero, 0x24($a0)
|
||||
sw $zero, 0x28($a0)
|
||||
sw $zero, 0x2c($a0)
|
||||
sw $zero, 0x30($a0)
|
||||
sw $zero, 0x34($a0)
|
||||
sw $zero, 0x38($a0)
|
||||
jr $ra
|
||||
sw $zero, 0x3C($a0)
|
||||
END(guMtxIdent)
|
28
src/libultra/mgu/mtxidentf.s
Normal file
28
src/libultra/mgu/mtxidentf.s
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
LEAF(guMtxIdentF)
|
||||
li $t0, 0x3F800000 // 1.0f
|
||||
sw $t0, ($a0)
|
||||
sw $zero, 4($a0)
|
||||
sw $zero, 8($a0)
|
||||
sw $zero, 0xC($a0)
|
||||
sw $zero, 0x10($a0)
|
||||
sw $t0, 0x14($a0)
|
||||
sw $zero, 0x18($a0)
|
||||
sw $zero, 0x1C($a0)
|
||||
sw $zero, 0x20($a0)
|
||||
sw $zero, 0x24($a0)
|
||||
sw $t0, 0x28($a0)
|
||||
sw $zero, 0x2C($a0)
|
||||
sw $zero, 0x30($a0)
|
||||
sw $zero, 0x34($a0)
|
||||
sw $zero, 0x38($a0)
|
||||
jr $ra
|
||||
sw $t0, 0x3C($a0)
|
||||
END(guMtxIdentF)
|
41
src/libultra/mgu/mtxl2f.s
Normal file
41
src/libultra/mgu/mtxl2f.s
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
#define MTX_INTPART 0
|
||||
#define MTX_FRACPART 0x20
|
||||
|
||||
LEAF(guMtxL2F)
|
||||
li $at, 0x37800000 // 1.0f / 65536.0f
|
||||
mtc1 $at, $f0
|
||||
li $t9, 0xFFFF0000
|
||||
addiu $t8, $a1, MTX_FRACPART
|
||||
1:
|
||||
lw $t0, MTX_INTPART($a1)
|
||||
lw $t1, MTX_FRACPART($a1)
|
||||
addiu $a1, $a1, 4
|
||||
and $t2, $t0, $t9
|
||||
srl $t3, $t1, 0x10
|
||||
or $t4, $t2, $t3
|
||||
mtc1 $t4, $f4
|
||||
sll $t5, $t0, 0x10
|
||||
andi $t6, $t1, 0xFFFF
|
||||
or $t7, $t5, $t6
|
||||
cvt.s.w $f6, $f4
|
||||
mtc1 $t7, $f10
|
||||
addiu $a0, $a0, 8
|
||||
cvt.s.w $f16, $f10
|
||||
mul.s $f8, $f6, $f0
|
||||
nop
|
||||
mul.s $f18, $f16, $f0
|
||||
swc1 $f8, -8($a0)
|
||||
bne $a1, $t8, 1b
|
||||
swc1 $f18, -4($a0)
|
||||
jr $ra
|
||||
nop
|
||||
END(guMtxL2F)
|
31
src/libultra/mgu/normalize.s
Normal file
31
src/libultra/mgu/normalize.s
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
LEAF(guNormalize)
|
||||
lwc1 $f4, ($a0)
|
||||
lwc1 $f6, ($a1)
|
||||
lwc1 $f8, ($a2)
|
||||
mul.s $f10, $f4, $f4
|
||||
li $t0, 0x3F800000 // 1.0f
|
||||
mul.s $f16, $f6, $f6
|
||||
add.s $f18, $f10, $f16
|
||||
mul.s $f16, $f8, $f8
|
||||
add.s $f10, $f16, $f18
|
||||
mtc1 $t0, $f18
|
||||
sqrt.s $f16, $f10
|
||||
div.s $f10, $f18, $f16
|
||||
mul.s $f16, $f4, $f10
|
||||
nop
|
||||
mul.s $f18, $f6, $f10
|
||||
nop
|
||||
mul.s $f4, $f8, $f10
|
||||
swc1 $f16, ($a0)
|
||||
swc1 $f18, ($a1)
|
||||
jr $ra
|
||||
swc1 $f4, ($a2)
|
||||
END(guNormalize)
|
52
src/libultra/mgu/scale.s
Normal file
52
src/libultra/mgu/scale.s
Normal file
|
@ -0,0 +1,52 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
LEAF(guScale)
|
||||
li $at, 0x47800000 // 65536.0f
|
||||
mtc1 $at, $f4
|
||||
mtc1 $a1, $f6
|
||||
sw $zero, 4($a0)
|
||||
sw $zero, 0xC($a0)
|
||||
mul.s $f8, $f6, $f4
|
||||
mtc1 $a2, $f6
|
||||
sw $zero, 0x10($a0)
|
||||
sw $zero, 0x18($a0)
|
||||
sw $zero, 0x24($a0)
|
||||
sw $zero, 0x2C($a0)
|
||||
sw $zero, 0x30($a0)
|
||||
trunc.w.s $f10, $f8
|
||||
mul.s $f8, $f6, $f4
|
||||
mtc1 $a3, $f6
|
||||
sw $zero, 0x38($a0)
|
||||
mfc1 $t1, $f10
|
||||
sw $zero, 0x3C($a0)
|
||||
srl $t2, $t1, 0x10
|
||||
trunc.w.s $f10, $f8
|
||||
mul.s $f8, $f6, $f4
|
||||
sll $t0, $t2, 0x10
|
||||
sll $t2, $t1, 0x10
|
||||
mfc1 $t1, $f10
|
||||
sw $t0, ($a0)
|
||||
sw $t2, 0x20($a0)
|
||||
srl $t0, $t1, 0x10
|
||||
trunc.w.s $f10, $f8
|
||||
andi $t2, $t1, 0xFFFF
|
||||
sw $t2, 0x28($a0)
|
||||
sw $t0, 8($a0)
|
||||
mfc1 $t1, $f10
|
||||
nop
|
||||
srl $t2, $t1, 0x10
|
||||
sll $t0, $t2, 0x10
|
||||
sw $t0, 0x14($a0)
|
||||
li $t0, 1
|
||||
sll $t2, $t1, 0x10
|
||||
sw $t2, 0x34($a0)
|
||||
jr $ra
|
||||
sw $t0, 0x1C($a0)
|
||||
END(guScale)
|
61
src/libultra/mgu/translate.s
Normal file
61
src/libultra/mgu/translate.s
Normal file
|
@ -0,0 +1,61 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 32
|
||||
|
||||
LEAF(guTranslate)
|
||||
li $at, 0x47800000 // 65536.0f
|
||||
mtc1 $at, $f4
|
||||
mtc1 $a1, $f6
|
||||
sw $zero, ($a0)
|
||||
sw $zero, 0x14($a0)
|
||||
mul.s $f8, $f6, $f4
|
||||
mtc1 $a2, $f6
|
||||
sw $zero, 8($a0)
|
||||
sw $zero, 4($a0)
|
||||
sw $zero, 0xC($a0)
|
||||
sw $zero, 0x10($a0)
|
||||
sw $zero, 0x20($a0)
|
||||
trunc.w.s $f10, $f8
|
||||
mul.s $f8, $f6, $f4
|
||||
mtc1 $a3, $f6
|
||||
sw $zero, 0x24($a0)
|
||||
mfc1 $t1, $f10
|
||||
sw $zero, 0x28($a0)
|
||||
sw $zero, 0x2C($a0)
|
||||
srl $t2, $t1, 0x10
|
||||
trunc.w.s $f10, $f8
|
||||
mul.s $f8, $f6, $f4
|
||||
sll $t0, $t2, 0x10
|
||||
sw $zero, 0x30($a0)
|
||||
mfc1 $t3, $f10
|
||||
sw $zero, 0x34($a0)
|
||||
srl $t2, $t3, 0x10
|
||||
trunc.w.s $f10, $f8
|
||||
or $t0, $t0, $t2
|
||||
sw $t0, 0x18($a0)
|
||||
sll $t0, $t1, 0x10
|
||||
sll $t2, $t3, 0x10
|
||||
mfc1 $t1, $f10
|
||||
srl $t2, $t2, 0x10
|
||||
or $t0, $t0, $t2
|
||||
sw $t0, 0x38($a0)
|
||||
srl $t2, $t1, 0x10
|
||||
sll $t0, $t2, 0x10
|
||||
addiu $t0, $t0, 1
|
||||
sw $t0, 0x1C($a0)
|
||||
lui $t0, 1
|
||||
ori $t0, $t0, 0
|
||||
sw $t0, ($a0)
|
||||
sw $t0, 0x14($a0)
|
||||
lui $t0, (0x00000001 >> 16)
|
||||
ori $t0, (0x00000001 & 0xFFFF)
|
||||
sll $t2, $t1, 0x10
|
||||
sw $t2, 0x3C($a0)
|
||||
jr $ra
|
||||
sw $t0, 8($a0)
|
||||
END(guTranslate)
|
Loading…
Add table
Add a link
Reference in a new issue