papermario/ver/jp/asm/nonmatchings/41C30/func_80066830.s
Ethan Roseman 3315d6010f
Splat refactor (#257)
* all non-world rodata migrated

* data disasm

* kinda working

* updated yaml

* bloop

* linker header

* configure 2.0

* bin

* mass rename to remove code_

* pause rename

* battle partner stuff

* whew

* more renames

* more renames

* more renaming

* it builds!

* updates

* remove main prefix

* one more thing

* crc, yay0

* .data, .rodata, .bss

* img

* dead_atan2

* it buildsgit add -A

* split battle/partner/6FAD10

* rm &s on sleepy_sheep syms

* sha1sum ninja rule description

* OK but commented out PaperMarioMapFS and PaperMarioNpcSprites

* uncomment

* fix mapfs

* match func_8003CFB4

* .

* clean up and name npc_iter_no_op

* npc.c

* enable cc warnings

* name npc_find_near

* use singular options.asset_path

* smores

* cc_dsl only when needed

* kinda fix configure for splat refactor2

* ok!

* new msg format

* remove old msg format docs

* slight bug fixes, splat adjustment

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cfc140bb76"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cfc140bb76"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "85349befcd"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "85349befcd"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Update symbol addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "a44631e194"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "a44631e194"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

Co-authored-by: Alex Bates <hi@imalex.xyz>
2021-04-13 16:47:52 +09:00

57 lines
2.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80066830
/* 41C30 80066830 40085000 */ mfc0 $t0, $10
/* 41C34 80066834 310900FF */ andi $t1, $t0, 0xff
/* 41C38 80066838 2401E000 */ addiu $at, $zero, -0x2000
/* 41C3C 8006683C 00815024 */ and $t2, $a0, $at
/* 41C40 80066840 012A4825 */ or $t1, $t1, $t2
/* 41C44 80066844 40895000 */ mtc0 $t1, $10
/* 41C48 80066848 00000000 */ nop
/* 41C4C 8006684C 00000000 */ nop
/* 41C50 80066850 00000000 */ nop
/* 41C54 80066854 42000008 */ tlbp
/* 41C58 80066858 00000000 */ nop
/* 41C5C 8006685C 00000000 */ nop
/* 41C60 80066860 400B0000 */ mfc0 $t3, $0
/* 41C64 80066864 3C018000 */ lui $at, 0x8000
/* 41C68 80066868 01615824 */ and $t3, $t3, $at
/* 41C6C 8006686C 1560001A */ bnez $t3, .L800668D8
/* 41C70 80066870 00000000 */ nop
/* 41C74 80066874 42000001 */ tlbr
/* 41C78 80066878 00000000 */ nop
/* 41C7C 8006687C 00000000 */ nop
/* 41C80 80066880 00000000 */ nop
/* 41C84 80066884 400B2800 */ mfc0 $t3, $5
/* 41C88 80066888 216B2000 */ addi $t3, $t3, 0x2000
/* 41C8C 8006688C 000B5842 */ srl $t3, $t3, 1
/* 41C90 80066890 01646024 */ and $t4, $t3, $a0
/* 41C94 80066894 15800004 */ bnez $t4, .L800668A8
/* 41C98 80066898 216BFFFF */ addi $t3, $t3, -1
/* 41C9C 8006689C 40021000 */ mfc0 $v0, $2
/* 41CA0 800668A0 10000002 */ b .L800668AC
/* 41CA4 800668A4 00000000 */ nop
.L800668A8:
/* 41CA8 800668A8 40021800 */ mfc0 $v0, $3
.L800668AC:
/* 41CAC 800668AC 304D0002 */ andi $t5, $v0, 2
/* 41CB0 800668B0 11A00009 */ beqz $t5, .L800668D8
/* 41CB4 800668B4 00000000 */ nop
/* 41CB8 800668B8 3C013FFF */ lui $at, 0x3fff
/* 41CBC 800668BC 3421FFC0 */ ori $at, $at, 0xffc0
/* 41CC0 800668C0 00411024 */ and $v0, $v0, $at
/* 41CC4 800668C4 00021180 */ sll $v0, $v0, 6
/* 41CC8 800668C8 008B6824 */ and $t5, $a0, $t3
/* 41CCC 800668CC 004D1020 */ add $v0, $v0, $t5
/* 41CD0 800668D0 10000002 */ b .L800668DC
/* 41CD4 800668D4 00000000 */ nop
.L800668D8:
/* 41CD8 800668D8 2402FFFF */ addiu $v0, $zero, -1
.L800668DC:
/* 41CDC 800668DC 40885000 */ mtc0 $t0, $10
/* 41CE0 800668E0 03E00008 */ jr $ra
/* 41CE4 800668E4 00000000 */ nop
/* 41CE8 800668E8 00000000 */ nop
/* 41CEC 800668EC 00000000 */ nop