papermario/ver/us/asm/nonmatchings/os/47c60_len_f0/osContAddressCrc.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

37 lines
1.7 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel osContAddressCrc
/* 47C60 8006C860 00001821 */ addu $v1, $zero, $zero
/* 47C64 8006C864 24050400 */ addiu $a1, $zero, 0x400
/* 47C68 8006C868 3084FFFF */ andi $a0, $a0, 0xffff
/* 47C6C 8006C86C 00851024 */ and $v0, $a0, $a1
.L8006C870:
/* 47C70 8006C870 10400006 */ beqz $v0, .L8006C88C
/* 47C74 8006C874 00031840 */ sll $v1, $v1, 1
/* 47C78 8006C878 30620020 */ andi $v0, $v1, 0x20
/* 47C7C 8006C87C 50400006 */ beql $v0, $zero, .L8006C898
/* 47C80 8006C880 24630001 */ addiu $v1, $v1, 1
/* 47C84 8006C884 0801B226 */ j .L8006C898
/* 47C88 8006C888 38630014 */ xori $v1, $v1, 0x14
.L8006C88C:
/* 47C8C 8006C88C 30620020 */ andi $v0, $v1, 0x20
/* 47C90 8006C890 54400001 */ bnel $v0, $zero, .L8006C898
/* 47C94 8006C894 38630015 */ xori $v1, $v1, 0x15
.L8006C898:
/* 47C98 8006C898 00052842 */ srl $a1, $a1, 1
/* 47C9C 8006C89C 14A0FFF4 */ bnez $a1, .L8006C870
/* 47CA0 8006C8A0 00851024 */ and $v0, $a0, $a1
/* 47CA4 8006C8A4 24050005 */ addiu $a1, $zero, 5
/* 47CA8 8006C8A8 00031840 */ sll $v1, $v1, 1
.L8006C8AC:
/* 47CAC 8006C8AC 30620020 */ andi $v0, $v1, 0x20
/* 47CB0 8006C8B0 54400001 */ bnel $v0, $zero, .L8006C8B8
/* 47CB4 8006C8B4 38630015 */ xori $v1, $v1, 0x15
.L8006C8B8:
/* 47CB8 8006C8B8 24A5FFFF */ addiu $a1, $a1, -1
/* 47CBC 8006C8BC 54A0FFFB */ bnel $a1, $zero, .L8006C8AC
/* 47CC0 8006C8C0 00031840 */ sll $v1, $v1, 1
/* 47CC4 8006C8C4 03E00008 */ jr $ra
/* 47CC8 8006C8C8 3062001F */ andi $v0, $v1, 0x1f