mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
150 lines
6.5 KiB
ArmAsm
150 lines
6.5 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel osEPiRawStartDma
|
|
/* 03BF70 80060B70 27BDFFD8 */ addiu $sp, $sp, -0x28
|
|
/* 03BF74 80060B74 AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 03BF78 80060B78 00808021 */ addu $s0, $a0, $zero
|
|
/* 03BF7C 80060B7C AFB10014 */ sw $s1, 0x14($sp)
|
|
/* 03BF80 80060B80 00A08821 */ addu $s1, $a1, $zero
|
|
/* 03BF84 80060B84 AFB20018 */ sw $s2, 0x18($sp)
|
|
/* 03BF88 80060B88 00C09021 */ addu $s2, $a2, $zero
|
|
/* 03BF8C 80060B8C 3C02A460 */ lui $v0, 0xa460
|
|
/* 03BF90 80060B90 34420010 */ ori $v0, $v0, 0x10
|
|
/* 03BF94 80060B94 AFBF0020 */ sw $ra, 0x20($sp)
|
|
/* 03BF98 80060B98 AFB3001C */ sw $s3, 0x1c($sp)
|
|
/* 03BF9C 80060B9C 8C420000 */ lw $v0, ($v0)
|
|
/* 03BFA0 80060BA0 8FB30038 */ lw $s3, 0x38($sp)
|
|
/* 03BFA4 80060BA4 30420003 */ andi $v0, $v0, 3
|
|
/* 03BFA8 80060BA8 10400007 */ beqz $v0, .L80060BC8
|
|
/* 03BFAC 80060BAC 00E02021 */ addu $a0, $a3, $zero
|
|
/* 03BFB0 80060BB0 3C03A460 */ lui $v1, 0xa460
|
|
/* 03BFB4 80060BB4 34630010 */ ori $v1, $v1, 0x10
|
|
.L80060BB8:
|
|
/* 03BFB8 80060BB8 8C620000 */ lw $v0, ($v1)
|
|
/* 03BFBC 80060BBC 30420003 */ andi $v0, $v0, 3
|
|
/* 03BFC0 80060BC0 1440FFFD */ bnez $v0, .L80060BB8
|
|
/* 03BFC4 80060BC4 00000000 */ nop
|
|
.L80060BC8:
|
|
/* 03BFC8 80060BC8 92060009 */ lbu $a2, 9($s0)
|
|
/* 03BFCC 80060BCC 00061080 */ sll $v0, $a2, 2
|
|
/* 03BFD0 80060BD0 3C058009 */ lui $a1, 0x8009
|
|
/* 03BFD4 80060BD4 00A22821 */ addu $a1, $a1, $v0
|
|
/* 03BFD8 80060BD8 8CA53D70 */ lw $a1, 0x3d70($a1)
|
|
/* 03BFDC 80060BDC 92020004 */ lbu $v0, 4($s0)
|
|
/* 03BFE0 80060BE0 90A30004 */ lbu $v1, 4($a1)
|
|
/* 03BFE4 80060BE4 1062003D */ beq $v1, $v0, .L80060CDC
|
|
/* 03BFE8 80060BE8 00000000 */ nop
|
|
/* 03BFEC 80060BEC 14C00019 */ bnez $a2, .L80060C54
|
|
/* 03BFF0 80060BF0 00A01821 */ addu $v1, $a1, $zero
|
|
/* 03BFF4 80060BF4 90620005 */ lbu $v0, 5($v1)
|
|
/* 03BFF8 80060BF8 92050005 */ lbu $a1, 5($s0)
|
|
/* 03BFFC 80060BFC 10450003 */ beq $v0, $a1, .L80060C0C
|
|
/* 03C000 80060C00 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C004 80060C04 34420014 */ ori $v0, $v0, 0x14
|
|
/* 03C008 80060C08 AC450000 */ sw $a1, ($v0)
|
|
.L80060C0C:
|
|
/* 03C00C 80060C0C 90620006 */ lbu $v0, 6($v1)
|
|
/* 03C010 80060C10 92050006 */ lbu $a1, 6($s0)
|
|
/* 03C014 80060C14 10450003 */ beq $v0, $a1, .L80060C24
|
|
/* 03C018 80060C18 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C01C 80060C1C 3442001C */ ori $v0, $v0, 0x1c
|
|
/* 03C020 80060C20 AC450000 */ sw $a1, ($v0)
|
|
.L80060C24:
|
|
/* 03C024 80060C24 90620007 */ lbu $v0, 7($v1)
|
|
/* 03C028 80060C28 92050007 */ lbu $a1, 7($s0)
|
|
/* 03C02C 80060C2C 10450003 */ beq $v0, $a1, .L80060C3C
|
|
/* 03C030 80060C30 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C034 80060C34 34420020 */ ori $v0, $v0, 0x20
|
|
/* 03C038 80060C38 AC450000 */ sw $a1, ($v0)
|
|
.L80060C3C:
|
|
/* 03C03C 80060C3C 90620008 */ lbu $v0, 8($v1)
|
|
/* 03C040 80060C40 92050008 */ lbu $a1, 8($s0)
|
|
/* 03C044 80060C44 1045001B */ beq $v0, $a1, .L80060CB4
|
|
/* 03C048 80060C48 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C04C 80060C4C 0801832C */ j .L80060CB0
|
|
/* 03C050 80060C50 34420018 */ ori $v0, $v0, 0x18
|
|
|
|
.L80060C54:
|
|
/* 03C054 80060C54 90620005 */ lbu $v0, 5($v1)
|
|
/* 03C058 80060C58 92050005 */ lbu $a1, 5($s0)
|
|
/* 03C05C 80060C5C 10450003 */ beq $v0, $a1, .L80060C6C
|
|
/* 03C060 80060C60 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C064 80060C64 34420024 */ ori $v0, $v0, 0x24
|
|
/* 03C068 80060C68 AC450000 */ sw $a1, ($v0)
|
|
.L80060C6C:
|
|
/* 03C06C 80060C6C 90620006 */ lbu $v0, 6($v1)
|
|
/* 03C070 80060C70 92050006 */ lbu $a1, 6($s0)
|
|
/* 03C074 80060C74 10450003 */ beq $v0, $a1, .L80060C84
|
|
/* 03C078 80060C78 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C07C 80060C7C 3442002C */ ori $v0, $v0, 0x2c
|
|
/* 03C080 80060C80 AC450000 */ sw $a1, ($v0)
|
|
.L80060C84:
|
|
/* 03C084 80060C84 90620007 */ lbu $v0, 7($v1)
|
|
/* 03C088 80060C88 92050007 */ lbu $a1, 7($s0)
|
|
/* 03C08C 80060C8C 10450003 */ beq $v0, $a1, .L80060C9C
|
|
/* 03C090 80060C90 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C094 80060C94 34420030 */ ori $v0, $v0, 0x30
|
|
/* 03C098 80060C98 AC450000 */ sw $a1, ($v0)
|
|
.L80060C9C:
|
|
/* 03C09C 80060C9C 90620008 */ lbu $v0, 8($v1)
|
|
/* 03C0A0 80060CA0 92050008 */ lbu $a1, 8($s0)
|
|
/* 03C0A4 80060CA4 10450003 */ beq $v0, $a1, .L80060CB4
|
|
/* 03C0A8 80060CA8 3C02A460 */ lui $v0, 0xa460
|
|
/* 03C0AC 80060CAC 34420028 */ ori $v0, $v0, 0x28
|
|
.L80060CB0:
|
|
/* 03C0B0 80060CB0 AC450000 */ sw $a1, ($v0)
|
|
.L80060CB4:
|
|
/* 03C0B4 80060CB4 92020004 */ lbu $v0, 4($s0)
|
|
/* 03C0B8 80060CB8 A0620004 */ sb $v0, 4($v1)
|
|
/* 03C0BC 80060CBC 92020005 */ lbu $v0, 5($s0)
|
|
/* 03C0C0 80060CC0 A0620005 */ sb $v0, 5($v1)
|
|
/* 03C0C4 80060CC4 92020006 */ lbu $v0, 6($s0)
|
|
/* 03C0C8 80060CC8 A0620006 */ sb $v0, 6($v1)
|
|
/* 03C0CC 80060CCC 92020007 */ lbu $v0, 7($s0)
|
|
/* 03C0D0 80060CD0 A0620007 */ sb $v0, 7($v1)
|
|
/* 03C0D4 80060CD4 92020008 */ lbu $v0, 8($s0)
|
|
/* 03C0D8 80060CD8 A0620008 */ sb $v0, 8($v1)
|
|
.L80060CDC:
|
|
/* 03C0DC 80060CDC 0C0187A4 */ jal osVirtualToPhysical
|
|
/* 03C0E0 80060CE0 00000000 */ nop
|
|
/* 03C0E4 80060CE4 3C04A460 */ lui $a0, 0xa460
|
|
/* 03C0E8 80060CE8 34840004 */ ori $a0, $a0, 4
|
|
/* 03C0EC 80060CEC 3C03A460 */ lui $v1, 0xa460
|
|
/* 03C0F0 80060CF0 AC620000 */ sw $v0, ($v1)
|
|
/* 03C0F4 80060CF4 8E02000C */ lw $v0, 0xc($s0)
|
|
/* 03C0F8 80060CF8 3C031FFF */ lui $v1, 0x1fff
|
|
/* 03C0FC 80060CFC 3463FFFF */ ori $v1, $v1, 0xffff
|
|
/* 03C100 80060D00 00521025 */ or $v0, $v0, $s2
|
|
/* 03C104 80060D04 00431024 */ and $v0, $v0, $v1
|
|
/* 03C108 80060D08 AC820000 */ sw $v0, ($a0)
|
|
/* 03C10C 80060D0C 12200005 */ beqz $s1, .L80060D24
|
|
/* 03C110 80060D10 24020001 */ addiu $v0, $zero, 1
|
|
/* 03C114 80060D14 12220006 */ beq $s1, $v0, .L80060D30
|
|
/* 03C118 80060D18 3C03A460 */ lui $v1, 0xa460
|
|
/* 03C11C 80060D1C 08018350 */ j .L80060D40
|
|
/* 03C120 80060D20 2402FFFF */ addiu $v0, $zero, -1
|
|
|
|
.L80060D24:
|
|
/* 03C124 80060D24 3C03A460 */ lui $v1, 0xa460
|
|
/* 03C128 80060D28 0801834D */ j .L80060D34
|
|
/* 03C12C 80060D2C 3463000C */ ori $v1, $v1, 0xc
|
|
|
|
.L80060D30:
|
|
/* 03C130 80060D30 34630008 */ ori $v1, $v1, 8
|
|
.L80060D34:
|
|
/* 03C134 80060D34 2662FFFF */ addiu $v0, $s3, -1
|
|
/* 03C138 80060D38 AC620000 */ sw $v0, ($v1)
|
|
/* 03C13C 80060D3C 00001021 */ addu $v0, $zero, $zero
|
|
.L80060D40:
|
|
/* 03C140 80060D40 8FBF0020 */ lw $ra, 0x20($sp)
|
|
/* 03C144 80060D44 8FB3001C */ lw $s3, 0x1c($sp)
|
|
/* 03C148 80060D48 8FB20018 */ lw $s2, 0x18($sp)
|
|
/* 03C14C 80060D4C 8FB10014 */ lw $s1, 0x14($sp)
|
|
/* 03C150 80060D50 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 03C154 80060D54 03E00008 */ jr $ra
|
|
/* 03C158 80060D58 27BD0028 */ addiu $sp, $sp, 0x28
|
|
|
|
/* 03C15C 80060D5C 00000000 */ nop
|