papermario/ver/jp/asm/os/osSetIntMask.s
AltoXorg bfe9a42b06
some JP decomp (#1149)
* main segment cleanup

* engine1

* engine4

* evt

* entity

* engine2 msg split

* engine2 draft

* identify all gu functions

* font_width + charset

* update msg ids

* os stuff

* msg stuffs

* msg_copy_to_print_buffer

* popup_menu_draw_menu_contents

* appendGfx_message

* cleanup

* building fixed

* Change exceptasm symbols to not be global

---------

Co-authored-by: Ethan <ethteck@gmail.com>
2024-01-16 14:13:54 +09:00

123 lines
4.8 KiB
ArmAsm

.include "macro.inc"
/* assembler directives */
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
.set gp=64 /* allow use of 64-bit general purpose registers */
.section .rodata
glabel D_80099AA0
/* 74E80 80099A80 */ .short 0x0555
/* 74E82 80099A82 */ .short 0x0556
/* 74E84 80099A84 */ .short 0x0559
/* 74E86 80099A86 */ .short 0x055A
/* 74E88 80099A88 */ .short 0x0565
/* 74E8A 80099A8A */ .short 0x0566
/* 74E8C 80099A8C */ .short 0x0569
/* 74E8E 80099A8E */ .short 0x056A
/* 74E90 80099A90 */ .short 0x0595
/* 74E92 80099A92 */ .short 0x0596
/* 74E94 80099A94 */ .short 0x0599
/* 74E96 80099A96 */ .short 0x059A
/* 74E98 80099A98 */ .short 0x05A5
/* 74E9A 80099A9A */ .short 0x05A6
/* 74E9C 80099A9C */ .short 0x05A9
/* 74E9E 80099A9E */ .short 0x05AA
/* 74EA0 80099AA0 */ .short 0x0655
/* 74EA2 80099AA2 */ .short 0x0656
/* 74EA4 80099AA4 */ .short 0x0659
/* 74EA6 80099AA6 */ .short 0x065A
/* 74EA8 80099AA8 */ .short 0x0665
/* 74EAA 80099AAA */ .short 0x0666
/* 74EAC 80099AAC */ .short 0x0669
/* 74EAE 80099AAE */ .short 0x066A
/* 74EB0 80099AB0 */ .short 0x0695
/* 74EB2 80099AB2 */ .short 0x0696
/* 74EB4 80099AB4 */ .short 0x0699
/* 74EB6 80099AB6 */ .short 0x069A
/* 74EB8 80099AB8 */ .short 0x06A5
/* 74EBA 80099ABA */ .short 0x06A6
/* 74EBC 80099ABC */ .short 0x06A9
/* 74EBE 80099ABE */ .short 0x06AA
/* 74EC0 80099AC0 */ .short 0x0955
/* 74EC2 80099AC2 */ .short 0x0956
/* 74EC4 80099AC4 */ .short 0x0959
/* 74EC6 80099AC6 */ .short 0x095A
/* 74EC8 80099AC8 */ .short 0x0965
/* 74ECA 80099ACA */ .short 0x0966
/* 74ECC 80099ACC */ .short 0x0969
/* 74ECE 80099ACE */ .short 0x096A
/* 74ED0 80099AD0 */ .short 0x0995
/* 74ED2 80099AD2 */ .short 0x0996
/* 74ED4 80099AD4 */ .short 0x0999
/* 74ED6 80099AD6 */ .short 0x099A
/* 74ED8 80099AD8 */ .short 0x09A5
/* 74EDA 80099ADA */ .short 0x09A6
/* 74EDC 80099ADC */ .short 0x09A9
/* 74EDE 80099ADE */ .short 0x09AA
/* 74EE0 80099AE0 */ .short 0x0A55
/* 74EE2 80099AE2 */ .short 0x0A56
/* 74EE4 80099AE4 */ .short 0x0A59
/* 74EE6 80099AE6 */ .short 0x0A5A
/* 74EE8 80099AE8 */ .short 0x0A65
/* 74EEA 80099AEA */ .short 0x0A66
/* 74EEC 80099AEC */ .short 0x0A69
/* 74EEE 80099AEE */ .short 0x0A6A
/* 74EF0 80099AF0 */ .short 0x0A95
/* 74EF2 80099AF2 */ .short 0x0A96
/* 74EF4 80099AF4 */ .short 0x0A99
/* 74EF6 80099AF6 */ .short 0x0A9A
/* 74EF8 80099AF8 */ .short 0x0AA5
/* 74EFA 80099AFA */ .short 0x0AA6
/* 74EFC 80099AFC */ .short 0x0AA9
/* 74EFE 80099AFE */ .short 0x0AAA
.section .text, "ax"
/* Generated by spimdisasm 1.11.1 */
# Handwritten function
glabel osSetIntMask
/* 3BD10 80060910 400C6000 */ mfc0 $t4, $12 # handwritten instruction
/* 3BD14 80060914 3182FF01 */ andi $v0, $t4, 0xFF01
/* 3BD18 80060918 3C088009 */ lui $t0, %hi(__OSGlobalIntMask)
/* 3BD1C 8006091C 25085890 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
/* 3BD20 80060920 8D0B0000 */ lw $t3, 0x0($t0)
/* 3BD24 80060924 2401FFFF */ addiu $at, $zero, -0x1
/* 3BD28 80060928 01614026 */ xor $t0, $t3, $at
/* 3BD2C 8006092C 3108FF00 */ andi $t0, $t0, 0xFF00
/* 3BD30 80060930 00481025 */ or $v0, $v0, $t0
/* 3BD34 80060934 3C0AA430 */ lui $t2, %hi(D_A430000C)
/* 3BD38 80060938 8D4A000C */ lw $t2, %lo(D_A430000C)($t2)
/* 3BD3C 8006093C 11400005 */ beqz $t2, .LJP_80060954
/* 3BD40 80060940 000B4C02 */ srl $t1, $t3, 16
/* 3BD44 80060944 2401FFFF */ addiu $at, $zero, -0x1
/* 3BD48 80060948 01214826 */ xor $t1, $t1, $at
/* 3BD4C 8006094C 3129003F */ andi $t1, $t1, 0x3F
/* 3BD50 80060950 01495025 */ or $t2, $t2, $t1
.LJP_80060954:
/* 3BD54 80060954 000A5400 */ sll $t2, $t2, 16
/* 3BD58 80060958 004A1025 */ or $v0, $v0, $t2
/* 3BD5C 8006095C 3C01003F */ lui $at, (0x3F0000 >> 16)
/* 3BD60 80060960 00814024 */ and $t0, $a0, $at
/* 3BD64 80060964 010B4024 */ and $t0, $t0, $t3
/* 3BD68 80060968 000843C2 */ srl $t0, $t0, 15
/* 3BD6C 8006096C 3C0A800A */ lui $t2, %hi(D_80099AA0)
/* 3BD70 80060970 01485021 */ addu $t2, $t2, $t0
/* 3BD74 80060974 954A9A80 */ lhu $t2, %lo(D_80099AA0)($t2)
/* 3BD78 80060978 3C01A430 */ lui $at, %hi(D_A430000C)
/* 3BD7C 8006097C AC2A000C */ sw $t2, %lo(D_A430000C)($at)
/* 3BD80 80060980 3088FF01 */ andi $t0, $a0, 0xFF01
/* 3BD84 80060984 3169FF00 */ andi $t1, $t3, 0xFF00
/* 3BD88 80060988 01094024 */ and $t0, $t0, $t1
/* 3BD8C 8006098C 3C01FFFF */ lui $at, (0xFFFF00FF >> 16)
/* 3BD90 80060990 342100FF */ ori $at, $at, (0xFFFF00FF & 0xFFFF)
/* 3BD94 80060994 01816024 */ and $t4, $t4, $at
/* 3BD98 80060998 01886025 */ or $t4, $t4, $t0
/* 3BD9C 8006099C 408C6000 */ mtc0 $t4, $12 # handwritten instruction
/* 3BDA0 800609A0 00000000 */ nop
/* 3BDA4 800609A4 00000000 */ nop
/* 3BDA8 800609A8 03E00008 */ jr $ra
/* 3BDAC 800609AC 00000000 */ nop