mirror of
https://github.com/n64decomp/sm64
synced 2026-08-19 05:22:24 -04:00
refresh 6
This commit is contained in:
@@ -9,14 +9,38 @@
|
||||
.section .text, "ax"
|
||||
|
||||
glabel osSetIntMask
|
||||
.ifndef VERSION_EU
|
||||
mfc0 $t1, $12
|
||||
andi $v0, $t1, 0xff01
|
||||
.else
|
||||
mfc0 $t4, $12
|
||||
andi $v0, $t4, 0xff01
|
||||
lui $t0, %hi(D_8030208C) # $t0, 0x8030
|
||||
addiu $t0, %lo(D_8030208C) # addiu $t0, $t0, 0x208c
|
||||
lw $t3, ($t0)
|
||||
li $at, -1
|
||||
xor $t0, $t3, $at
|
||||
andi $t0, $t0, 0xff00
|
||||
or $v0, $v0, $t0
|
||||
.endif
|
||||
lui $t2, %hi(MI_INTR_MASK_REG) # $t2, 0xa430
|
||||
lw $t2, %lo(MI_INTR_MASK_REG)($t2)
|
||||
.ifdef VERSION_EU
|
||||
beqz $t2, .L80200074
|
||||
srl $t1, $t3, 0x10
|
||||
li $at, -1
|
||||
xor $t1, $t1, $at
|
||||
andi $t1, $t1, 0x3f
|
||||
or $t2, $t2, $t1
|
||||
.L80200074:
|
||||
.endif
|
||||
sll $t2, $t2, 0x10
|
||||
or $v0, $v0, $t2
|
||||
lui $at, 0x3f
|
||||
and $t0, $a0, $at
|
||||
.ifdef VERSION_EU
|
||||
and $t0, $t0, $t3
|
||||
.endif
|
||||
srl $t0, $t0, 0xf
|
||||
lui $t2, %hi(D_803386D0)
|
||||
addu $t2, $t2, $t0
|
||||
@@ -24,11 +48,21 @@ glabel osSetIntMask
|
||||
lui $at, %hi(MI_INTR_MASK_REG) # $at, 0xa430
|
||||
sw $t2, %lo(MI_INTR_MASK_REG)($at)
|
||||
andi $t0, $a0, 0xff01
|
||||
.ifdef VERSION_EU
|
||||
andi $t1, $t3, 0xff00
|
||||
and $t0, $t0, $t1
|
||||
.endif
|
||||
lui $at, (0xFFFF00FF >> 16) # lui $at, 0xffff
|
||||
ori $at, (0xFFFF00FF & 0xFFFF) # ori $at, $at, 0xff
|
||||
.ifndef VERSION_EU
|
||||
and $t1, $t1, $at
|
||||
or $t1, $t1, $t0
|
||||
mtc0 $t1, $12
|
||||
.else
|
||||
and $t4, $t4, $at
|
||||
or $t4, $t4, $t0
|
||||
mtc0 $t4, $12
|
||||
.endif
|
||||
nop
|
||||
nop
|
||||
jr $ra
|
||||
|
||||
Reference in New Issue
Block a user