Decompile ll.c functions
This commit is contained in:
parent
c43f87d766
commit
18364b4e90
13
Makefile
13
Makefile
|
@ -56,7 +56,11 @@ else
|
||||||
TOOLCHAIN := mips-elf
|
TOOLCHAIN := mips-elf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS := -DVERSION=$(VERSION) \
|
MIPSISET := -mips2 -32
|
||||||
|
|
||||||
|
$(B_DIR)/lib/libc/ll.o: MIPSISET := -mips3 -o32
|
||||||
|
|
||||||
|
CFLAGS = -DVERSION=$(VERSION) \
|
||||||
-DNTSC=$(NTSC) \
|
-DNTSC=$(NTSC) \
|
||||||
-DPAL=$(PAL) \
|
-DPAL=$(PAL) \
|
||||||
-DJPN=$(JPN) \
|
-DJPN=$(JPN) \
|
||||||
|
@ -69,7 +73,7 @@ CFLAGS := -DVERSION=$(VERSION) \
|
||||||
-woff 581,649,819,820,821,838,852 \
|
-woff 581,649,819,820,821,838,852 \
|
||||||
-w2 \
|
-w2 \
|
||||||
-I src/include \
|
-I src/include \
|
||||||
-mips2
|
$(MIPSISET)
|
||||||
|
|
||||||
C_FILES := $(shell find src/gvars src/boot src/lib src/game src/inflate src/mpconfigs src/mpstrings/$(ROMID) src/firingrange src/filenames src/textureconfig -name '*.c')
|
C_FILES := $(shell find src/gvars src/boot src/lib src/game src/inflate src/mpconfigs src/mpstrings/$(ROMID) src/firingrange src/filenames src/textureconfig -name '*.c')
|
||||||
O_FILES := $(patsubst src/%.c, $(B_DIR)/%.o, $(C_FILES))
|
O_FILES := $(patsubst src/%.c, $(B_DIR)/%.o, $(C_FILES))
|
||||||
|
@ -347,6 +351,11 @@ $(B_DIR)/boot/%.o: src/boot/%.c
|
||||||
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< | $(IDOCC) -c $(CFLAGS) tools/asmpreproc/include-stdin.c -o $@ -O2
|
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< | $(IDOCC) -c $(CFLAGS) tools/asmpreproc/include-stdin.c -o $@ -O2
|
||||||
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< --post-process $@ --assembler "$(TOOLCHAIN)-as -march=vr4300 -mabi=32" --asm-prelude tools/asmpreproc/prelude.s
|
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< --post-process $@ --assembler "$(TOOLCHAIN)-as -march=vr4300 -mabi=32" --asm-prelude tools/asmpreproc/prelude.s
|
||||||
|
|
||||||
|
$(B_DIR)/lib/libc/ll.o: src/lib/libc/ll.c
|
||||||
|
@mkdir -p $(dir $@)
|
||||||
|
$(IDOCC) -c $(CFLAGS) $< -o $@ -O1
|
||||||
|
tools/patchmips3 $@ || rm $@
|
||||||
|
|
||||||
$(B_DIR)/lib/%.o: src/lib/%.c
|
$(B_DIR)/lib/%.o: src/lib/%.c
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< | $(IDOCC) -c $(CFLAGS) tools/asmpreproc/include-stdin.c -o $@ -O2
|
/usr/bin/env python3 tools/asmpreproc/asm-processor.py -O2 $< | $(IDOCC) -c $(CFLAGS) tools/asmpreproc/include-stdin.c -o $@ -O2
|
||||||
|
|
|
@ -124,7 +124,8 @@
|
||||||
build/ROMID/lib/ultra/io/sirawread.o (section); \
|
build/ROMID/lib/ultra/io/sirawread.o (section); \
|
||||||
build/ROMID/lib/ultra/io/sirawwrite.o (section); \
|
build/ROMID/lib/ultra/io/sirawwrite.o (section); \
|
||||||
build/ROMID/lib/ultra/os/writebackdcache.o (section); \
|
build/ROMID/lib/ultra/os/writebackdcache.o (section); \
|
||||||
build/ROMID/lib/lib_4ae00.o (section); \
|
build/ROMID/lib/libc/ll.o (section); \
|
||||||
|
build/ROMID/lib/bzero.o (section); \
|
||||||
build/ROMID/lib/ultra/os/getcause.o (section); \
|
build/ROMID/lib/ultra/os/getcause.o (section); \
|
||||||
build/ROMID/lib/lib_4b170.o (section); \
|
build/ROMID/lib/lib_4b170.o (section); \
|
||||||
build/ROMID/lib/ultra/os/virtualtophysical.o (section); \
|
build/ROMID/lib/ultra/os/virtualtophysical.o (section); \
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "lib/lib_1a500.h"
|
#include "lib/lib_1a500.h"
|
||||||
#include "lib/lib_4a360.h"
|
#include "lib/lib_4a360.h"
|
||||||
#include "lib/lib_4a5e0.h"
|
#include "lib/lib_4a5e0.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
const char var7f1b6050[] = "Init";
|
const char var7f1b6050[] = "Init";
|
||||||
|
@ -6000,7 +6000,7 @@ glabel func0f14e884
|
||||||
/* f14ea84: 8fa40038 */ lw $a0,0x38($sp)
|
/* f14ea84: 8fa40038 */ lw $a0,0x38($sp)
|
||||||
/* f14ea88: 8fa5003c */ lw $a1,0x3c($sp)
|
/* f14ea88: 8fa5003c */ lw $a1,0x3c($sp)
|
||||||
/* f14ea8c: 8fa60040 */ lw $a2,0x40($sp)
|
/* f14ea8c: 8fa60040 */ lw $a2,0x40($sp)
|
||||||
/* f14ea90: 0c012ba9 */ jal func0004aea4
|
/* f14ea90: 0c012ba9 */ jal __ll_lshift
|
||||||
/* f14ea94: 8fa70044 */ lw $a3,0x44($sp)
|
/* f14ea94: 8fa70044 */ lw $a3,0x44($sp)
|
||||||
/* f14ea98: 8fb00034 */ lw $s0,0x34($sp)
|
/* f14ea98: 8fb00034 */ lw $s0,0x34($sp)
|
||||||
/* f14ea9c: afa20028 */ sw $v0,0x28($sp)
|
/* f14ea9c: afa20028 */ sw $v0,0x28($sp)
|
||||||
|
@ -6008,7 +6008,7 @@ glabel func0f14e884
|
||||||
/* f14eaa4: 8fa40070 */ lw $a0,0x70($sp)
|
/* f14eaa4: 8fa40070 */ lw $a0,0x70($sp)
|
||||||
/* f14eaa8: 8fa50074 */ lw $a1,0x74($sp)
|
/* f14eaa8: 8fa50074 */ lw $a1,0x74($sp)
|
||||||
/* f14eaac: 8fa60040 */ lw $a2,0x40($sp)
|
/* f14eaac: 8fa60040 */ lw $a2,0x40($sp)
|
||||||
/* f14eab0: 0c012ba9 */ jal func0004aea4
|
/* f14eab0: 0c012ba9 */ jal __ll_lshift
|
||||||
/* f14eab4: 8fa70044 */ lw $a3,0x44($sp)
|
/* f14eab4: 8fa70044 */ lw $a3,0x44($sp)
|
||||||
/* f14eab8: 8fad002c */ lw $t5,0x2c($sp)
|
/* f14eab8: 8fad002c */ lw $t5,0x2c($sp)
|
||||||
/* f14eabc: 8e0b0004 */ lw $t3,0x4($s0)
|
/* f14eabc: 8e0b0004 */ lw $t3,0x4($s0)
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include "lib/lib_233c0.h"
|
#include "lib/lib_233c0.h"
|
||||||
#include "lib/lib_317f0.h"
|
#include "lib/lib_317f0.h"
|
||||||
#include "lib/lib_48830.h"
|
#include "lib/lib_48830.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10905,9 +10905,8 @@ bool aiRemoveWeaponFromInventory(void)
|
||||||
*/
|
*/
|
||||||
bool ai01dd(void)
|
bool ai01dd(void)
|
||||||
{
|
{
|
||||||
u64 value = func0004af68(osGetCount(), 64);
|
u64 value = (u64)osGetCount() * 64;
|
||||||
value = func0004ae68(value, 3000);
|
func00005b30(value / 3000);
|
||||||
func00005b30(value);
|
|
||||||
|
|
||||||
if (var800840c4) {
|
if (var800840c4) {
|
||||||
g_Vars.aioffset += 4;
|
g_Vars.aioffset += 4;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "lib/lib_12dc0.h"
|
#include "lib/lib_12dc0.h"
|
||||||
#include "lib/lib_233c0.h"
|
#include "lib/lib_233c0.h"
|
||||||
#include "lib/lib_4a360.h"
|
#include "lib/lib_4a360.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
const char var7f1b3a80[] = "padhalllv.c";
|
const char var7f1b3a80[] = "padhalllv.c";
|
||||||
|
@ -451,7 +451,7 @@ struct waygroup *func0f114810(s32 *groupnums, s32 value, u32 mask)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
u64 sp50 = func0004aea4(g_WaypointHashes[0], 0x20) | g_WaypointHashes[1];
|
u64 sp50 = ((u64)g_WaypointHashes[0] << 32) | g_WaypointHashes[1];
|
||||||
|
|
||||||
if (func00012e1c(&sp50) % 2 == 0) {
|
if (func00012e1c(&sp50) % 2 == 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -572,7 +572,7 @@ struct waypoint *func0f114b7c(s32 *pointnums, s32 arg1, s32 groupnum, u32 mask)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
u64 sp50 = func0004aea4(g_WaypointHashes[0], 0x20) | g_WaypointHashes[1];
|
u64 sp50 = ((u64)g_WaypointHashes[0] << 32) | g_WaypointHashes[1];
|
||||||
|
|
||||||
if (func00012e1c(&sp50) % 2 == 0) {
|
if (func00012e1c(&sp50) % 2 == 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -732,7 +732,7 @@ void func0f11505c(struct waygroup *groupa, struct waygroup *groupb, struct waypo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
u64 sp50 = func0004aea4(g_WaypointHashes[0], 0x20) | g_WaypointHashes[1];
|
u64 sp50 = ((u64)g_WaypointHashes[0] << 32) | g_WaypointHashes[1];
|
||||||
|
|
||||||
if ((func00012e1c(&sp50) % 2) == 0) {
|
if ((func00012e1c(&sp50) % 2) == 0) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#ifndef _IN_LIB_LIB_4AE00_H
|
|
||||||
#define _IN_LIB_LIB_4AE00_H
|
|
||||||
#include <ultra64.h>
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
u32 func0004ae00(void);
|
|
||||||
u32 func0004ae2c(void);
|
|
||||||
u64 func0004ae68(u64 arg0, u64 arg1);
|
|
||||||
u64 func0004aea4(u64 arg0, u64 arg1);
|
|
||||||
u32 func0004af0c(void);
|
|
||||||
u64 func0004af68(u64 arg0, u64 arg2);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#ifndef _IN_LIB_LIBC_LL_H
|
||||||
|
#define _IN_LIB_LIBC_LL_H
|
||||||
|
#include <ultra64.h>
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
unsigned long long __ull_rshift(unsigned long long a0, unsigned long long a1);
|
||||||
|
unsigned long long __ull_rem(unsigned long long a0, unsigned long long a1);
|
||||||
|
unsigned long long __ull_div(unsigned long long a0, unsigned long long a1);
|
||||||
|
unsigned long long __ll_lshift(unsigned long long a0, unsigned long long a1);
|
||||||
|
long long __ll_rem(unsigned long long a0, long long a1);
|
||||||
|
long long __ll_div(long long a0, long long a1);
|
||||||
|
unsigned long long __ll_mul(unsigned long long a0, unsigned long long a1);
|
||||||
|
void __ull_divremi(unsigned long long *div, unsigned long long *rem, unsigned long long a2, unsigned short a3);
|
||||||
|
long long __ll_mod(long long a0, long long a1);
|
||||||
|
long long __ll_rshift(long long a0, long long a1);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,62 @@
|
||||||
|
#include <ultra64.h>
|
||||||
|
#include "constants.h"
|
||||||
|
#include "game/data/data_000000.h"
|
||||||
|
#include "game/data/data_0083d0.h"
|
||||||
|
#include "game/data/data_00e460.h"
|
||||||
|
#include "game/data/data_0160b0.h"
|
||||||
|
#include "game/data/data_01a3a0.h"
|
||||||
|
#include "game/data/data_020df0.h"
|
||||||
|
#include "game/data/data_02da90.h"
|
||||||
|
#include "gvars/gvars.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
GLOBAL_ASM(
|
||||||
|
glabel bzero
|
||||||
|
/* 4b0c0: 28a1000c */ slti $at,$a1,0xc
|
||||||
|
/* 4b0c4: 1420001d */ bnez $at,.L0004b13c
|
||||||
|
/* 4b0c8: 00041823 */ negu $v1,$a0
|
||||||
|
/* 4b0cc: 30630003 */ andi $v1,$v1,0x3
|
||||||
|
/* 4b0d0: 10600003 */ beqz $v1,.L0004b0e0
|
||||||
|
/* 4b0d4: 00a32823 */ subu $a1,$a1,$v1
|
||||||
|
/* 4b0d8: a8800000 */ swl $zero,0x0($a0)
|
||||||
|
/* 4b0dc: 00832021 */ addu $a0,$a0,$v1
|
||||||
|
.L0004b0e0:
|
||||||
|
/* 4b0e0: 2401ffe0 */ addiu $at,$zero,-32
|
||||||
|
/* 4b0e4: 00a13824 */ and $a3,$a1,$at
|
||||||
|
/* 4b0e8: 10e0000c */ beqz $a3,.L0004b11c
|
||||||
|
/* 4b0ec: 00a72823 */ subu $a1,$a1,$a3
|
||||||
|
/* 4b0f0: 00e43821 */ addu $a3,$a3,$a0
|
||||||
|
.L0004b0f4:
|
||||||
|
/* 4b0f4: 24840020 */ addiu $a0,$a0,0x20
|
||||||
|
/* 4b0f8: ac80ffe0 */ sw $zero,-0x20($a0)
|
||||||
|
/* 4b0fc: ac80ffe4 */ sw $zero,-0x1c($a0)
|
||||||
|
/* 4b100: ac80ffe8 */ sw $zero,-0x18($a0)
|
||||||
|
/* 4b104: ac80ffec */ sw $zero,-0x14($a0)
|
||||||
|
/* 4b108: ac80fff0 */ sw $zero,-0x10($a0)
|
||||||
|
/* 4b10c: ac80fff4 */ sw $zero,-0xc($a0)
|
||||||
|
/* 4b110: ac80fff8 */ sw $zero,-0x8($a0)
|
||||||
|
/* 4b114: 1487fff7 */ bne $a0,$a3,.L0004b0f4
|
||||||
|
/* 4b118: ac80fffc */ sw $zero,-0x4($a0)
|
||||||
|
.L0004b11c:
|
||||||
|
/* 4b11c: 2401fffc */ addiu $at,$zero,-4
|
||||||
|
/* 4b120: 00a13824 */ and $a3,$a1,$at
|
||||||
|
/* 4b124: 10e00005 */ beqz $a3,.L0004b13c
|
||||||
|
/* 4b128: 00a72823 */ subu $a1,$a1,$a3
|
||||||
|
/* 4b12c: 00e43821 */ addu $a3,$a3,$a0
|
||||||
|
.L0004b130:
|
||||||
|
/* 4b130: 24840004 */ addiu $a0,$a0,0x4
|
||||||
|
/* 4b134: 1487fffe */ bne $a0,$a3,.L0004b130
|
||||||
|
/* 4b138: ac80fffc */ sw $zero,-0x4($a0)
|
||||||
|
.L0004b13c:
|
||||||
|
/* 4b13c: 18a00005 */ blez $a1,.L0004b154
|
||||||
|
/* 4b140: 00000000 */ nop
|
||||||
|
/* 4b144: 00a42821 */ addu $a1,$a1,$a0
|
||||||
|
.L0004b148:
|
||||||
|
/* 4b148: 24840001 */ addiu $a0,$a0,0x1
|
||||||
|
/* 4b14c: 1485fffe */ bne $a0,$a1,.L0004b148
|
||||||
|
/* 4b150: a080ffff */ sb $zero,-0x1($a0)
|
||||||
|
.L0004b154:
|
||||||
|
/* 4b154: 03e00008 */ jr $ra
|
||||||
|
/* 4b158: 00000000 */ nop
|
||||||
|
/* 4b15c: 00000000 */ nop
|
||||||
|
);
|
|
@ -16,7 +16,7 @@
|
||||||
#include "lib/lib_4a360.h"
|
#include "lib/lib_4a360.h"
|
||||||
#include "lib/lib_4a5e0.h"
|
#include "lib/lib_4a5e0.h"
|
||||||
#include "lib/lib_4a680.h"
|
#include "lib/lib_4a680.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
const u32 var700524c0[] = {0x3c8efa35};
|
const u32 var700524c0[] = {0x3c8efa35};
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "lib/lib_4a360.h"
|
#include "lib/lib_4a360.h"
|
||||||
#include "lib/lib_4a5e0.h"
|
#include "lib/lib_4a5e0.h"
|
||||||
#include "lib/lib_4a680.h"
|
#include "lib/lib_4a680.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
GLOBAL_ASM(
|
GLOBAL_ASM(
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "lib/lib_2fc60.h"
|
#include "lib/lib_2fc60.h"
|
||||||
#include "lib/lib_30ce0.h"
|
#include "lib/lib_30ce0.h"
|
||||||
#include "lib/lib_490b0.h"
|
#include "lib/lib_490b0.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4e270.h"
|
#include "lib/lib_4e270.h"
|
||||||
#include "lib/lib_4e3c0.h"
|
#include "lib/lib_4e3c0.h"
|
||||||
#include "lib/lib_4e470.h"
|
#include "lib/lib_4e470.h"
|
||||||
|
@ -614,7 +614,7 @@ glabel func00009154
|
||||||
/* 92e0: 8e040000 */ lw $a0,0x0($s0)
|
/* 92e0: 8e040000 */ lw $a0,0x0($s0)
|
||||||
/* 92e4: 8e050004 */ lw $a1,0x4($s0)
|
/* 92e4: 8e050004 */ lw $a1,0x4($s0)
|
||||||
/* 92e8: 24060000 */ addiu $a2,$zero,0x0
|
/* 92e8: 24060000 */ addiu $a2,$zero,0x0
|
||||||
/* 92ec: 0c012b9a */ jal func0004ae68
|
/* 92ec: 0c012b9a */ jal __ull_div
|
||||||
/* 92f0: 240700f0 */ addiu $a3,$zero,0xf0
|
/* 92f0: 240700f0 */ addiu $a3,$zero,0xf0
|
||||||
/* 92f4: 3c018009 */ lui $at,%hi(var80091578)
|
/* 92f4: 3c018009 */ lui $at,%hi(var80091578)
|
||||||
/* 92f8: ac221578 */ sw $v0,%lo(var80091578)($at)
|
/* 92f8: ac221578 */ sw $v0,%lo(var80091578)($at)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "game/data/data_020df0.h"
|
#include "game/data/data_020df0.h"
|
||||||
#include "game/data/data_02da90.h"
|
#include "game/data/data_02da90.h"
|
||||||
#include "gvars/gvars.h"
|
#include "gvars/gvars.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
const char var70054030[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
const char var70054030[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||||
|
@ -47,7 +47,7 @@ glabel func00013820
|
||||||
/* 1387c: 8fa40038 */ lw $a0,0x38($sp)
|
/* 1387c: 8fa40038 */ lw $a0,0x38($sp)
|
||||||
/* 13880: 8fa5003c */ lw $a1,0x3c($sp)
|
/* 13880: 8fa5003c */ lw $a1,0x3c($sp)
|
||||||
/* 13884: 8fa60020 */ lw $a2,0x20($sp)
|
/* 13884: 8fa60020 */ lw $a2,0x20($sp)
|
||||||
/* 13888: 0c012b8b */ jal func0004ae2c
|
/* 13888: 0c012b8b */ jal __ull_rem
|
||||||
/* 1388c: 8fa70024 */ lw $a3,0x24($sp)
|
/* 1388c: 8fa70024 */ lw $a3,0x24($sp)
|
||||||
/* 13890: 00715021 */ addu $t2,$v1,$s1
|
/* 13890: 00715021 */ addu $t2,$v1,$s1
|
||||||
/* 13894: 914b0000 */ lbu $t3,0x0($t2)
|
/* 13894: 914b0000 */ lbu $t3,0x0($t2)
|
||||||
|
@ -55,7 +55,7 @@ glabel func00013820
|
||||||
/* 1389c: 8fa70024 */ lw $a3,0x24($sp)
|
/* 1389c: 8fa70024 */ lw $a3,0x24($sp)
|
||||||
/* 138a0: 8fa60020 */ lw $a2,0x20($sp)
|
/* 138a0: 8fa60020 */ lw $a2,0x20($sp)
|
||||||
/* 138a4: 8fa5003c */ lw $a1,0x3c($sp)
|
/* 138a4: 8fa5003c */ lw $a1,0x3c($sp)
|
||||||
/* 138a8: 0c012b9a */ jal func0004ae68
|
/* 138a8: 0c012b9a */ jal __ull_div
|
||||||
/* 138ac: 8fa40038 */ lw $a0,0x38($sp)
|
/* 138ac: 8fa40038 */ lw $a0,0x38($sp)
|
||||||
/* 138b0: afa20038 */ sw $v0,0x38($sp)
|
/* 138b0: afa20038 */ sw $v0,0x38($sp)
|
||||||
/* 138b4: afa3003c */ sw $v1,0x3c($sp)
|
/* 138b4: afa3003c */ sw $v1,0x3c($sp)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "lib/lib_233c0.h"
|
#include "lib/lib_233c0.h"
|
||||||
#include "lib/lib_2f490.h"
|
#include "lib/lib_2f490.h"
|
||||||
#include "lib/lib_4a360.h"
|
#include "lib/lib_4a360.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b170.h"
|
#include "lib/lib_4b170.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
@ -3022,21 +3022,21 @@ glabel func00025c74
|
||||||
/* 25e00: 86070010 */ lh $a3,0x10($s0)
|
/* 25e00: 86070010 */ lh $a3,0x10($s0)
|
||||||
/* 25e04: 8fa40060 */ lw $a0,0x60($sp)
|
/* 25e04: 8fa40060 */ lw $a0,0x60($sp)
|
||||||
/* 25e08: 8fa50064 */ lw $a1,0x64($sp)
|
/* 25e08: 8fa50064 */ lw $a1,0x64($sp)
|
||||||
/* 25e0c: 0c012bda */ jal func0004af68
|
/* 25e0c: 0c012bda */ jal __ll_mul
|
||||||
/* 25e10: 000737c3 */ sra $a2,$a3,0x1f
|
/* 25e10: 000737c3 */ sra $a2,$a3,0x1f
|
||||||
/* 25e14: afa20038 */ sw $v0,0x38($sp)
|
/* 25e14: afa20038 */ sw $v0,0x38($sp)
|
||||||
/* 25e18: afa3003c */ sw $v1,0x3c($sp)
|
/* 25e18: afa3003c */ sw $v1,0x3c($sp)
|
||||||
/* 25e1c: 8607000e */ lh $a3,0xe($s0)
|
/* 25e1c: 8607000e */ lh $a3,0xe($s0)
|
||||||
/* 25e20: 8fa40058 */ lw $a0,0x58($sp)
|
/* 25e20: 8fa40058 */ lw $a0,0x58($sp)
|
||||||
/* 25e24: 8fa5005c */ lw $a1,0x5c($sp)
|
/* 25e24: 8fa5005c */ lw $a1,0x5c($sp)
|
||||||
/* 25e28: 0c012bda */ jal func0004af68
|
/* 25e28: 0c012bda */ jal __ll_mul
|
||||||
/* 25e2c: 000737c3 */ sra $a2,$a3,0x1f
|
/* 25e2c: 000737c3 */ sra $a2,$a3,0x1f
|
||||||
/* 25e30: afa20040 */ sw $v0,0x40($sp)
|
/* 25e30: afa20040 */ sw $v0,0x40($sp)
|
||||||
/* 25e34: afa30044 */ sw $v1,0x44($sp)
|
/* 25e34: afa30044 */ sw $v1,0x44($sp)
|
||||||
/* 25e38: 86070012 */ lh $a3,0x12($s0)
|
/* 25e38: 86070012 */ lh $a3,0x12($s0)
|
||||||
/* 25e3c: 8fa40068 */ lw $a0,0x68($sp)
|
/* 25e3c: 8fa40068 */ lw $a0,0x68($sp)
|
||||||
/* 25e40: 8fa5006c */ lw $a1,0x6c($sp)
|
/* 25e40: 8fa5006c */ lw $a1,0x6c($sp)
|
||||||
/* 25e44: 0c012bda */ jal func0004af68
|
/* 25e44: 0c012bda */ jal __ll_mul
|
||||||
/* 25e48: 000737c3 */ sra $a2,$a3,0x1f
|
/* 25e48: 000737c3 */ sra $a2,$a3,0x1f
|
||||||
/* 25e4c: 8fab0044 */ lw $t3,0x44($sp)
|
/* 25e4c: 8fab0044 */ lw $t3,0x44($sp)
|
||||||
/* 25e50: 8faf003c */ lw $t7,0x3c($sp)
|
/* 25e50: 8faf003c */ lw $t7,0x3c($sp)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "lib/lib_37b00.h"
|
#include "lib/lib_37b00.h"
|
||||||
#include "lib/lib_3e730.h"
|
#include "lib/lib_3e730.h"
|
||||||
#include "lib/lib_43dd0.h"
|
#include "lib/lib_43dd0.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b170.h"
|
#include "lib/lib_4b170.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "lib/lib_461c0.h"
|
#include "lib/lib_461c0.h"
|
||||||
#include "lib/lib_46650.h"
|
#include "lib/lib_46650.h"
|
||||||
#include "lib/lib_47550.h"
|
#include "lib/lib_47550.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b170.h"
|
#include "lib/lib_4b170.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "lib/lib_3e730.h"
|
#include "lib/lib_3e730.h"
|
||||||
#include "lib/lib_43dd0.h"
|
#include "lib/lib_43dd0.h"
|
||||||
#include "lib/lib_461c0.h"
|
#include "lib/lib_461c0.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b170.h"
|
#include "lib/lib_4b170.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "game/data/data_020df0.h"
|
#include "game/data/data_020df0.h"
|
||||||
#include "game/data/data_02da90.h"
|
#include "game/data/data_02da90.h"
|
||||||
#include "gvars/gvars.h"
|
#include "gvars/gvars.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
GLOBAL_ASM(
|
GLOBAL_ASM(
|
||||||
|
@ -21,14 +21,14 @@ glabel func0004a680
|
||||||
/* 4a694: 00c02025 */ or $a0,$a2,$zero
|
/* 4a694: 00c02025 */ or $a0,$a2,$zero
|
||||||
/* 4a698: 00e02825 */ or $a1,$a3,$zero
|
/* 4a698: 00e02825 */ or $a1,$a3,$zero
|
||||||
/* 4a69c: 8fa70044 */ lw $a3,0x44($sp)
|
/* 4a69c: 8fa70044 */ lw $a3,0x44($sp)
|
||||||
/* 4a6a0: 0c012bc3 */ jal func0004af0c
|
/* 4a6a0: 0c012bc3 */ jal __ll_div
|
||||||
/* 4a6a4: 8fa60040 */ lw $a2,0x40($sp)
|
/* 4a6a4: 8fa60040 */ lw $a2,0x40($sp)
|
||||||
/* 4a6a8: afa20020 */ sw $v0,0x20($sp)
|
/* 4a6a8: afa20020 */ sw $v0,0x20($sp)
|
||||||
/* 4a6ac: afa30024 */ sw $v1,0x24($sp)
|
/* 4a6ac: afa30024 */ sw $v1,0x24($sp)
|
||||||
/* 4a6b0: 8fa40040 */ lw $a0,0x40($sp)
|
/* 4a6b0: 8fa40040 */ lw $a0,0x40($sp)
|
||||||
/* 4a6b4: 8fa50044 */ lw $a1,0x44($sp)
|
/* 4a6b4: 8fa50044 */ lw $a1,0x44($sp)
|
||||||
/* 4a6b8: 00403025 */ or $a2,$v0,$zero
|
/* 4a6b8: 00403025 */ or $a2,$v0,$zero
|
||||||
/* 4a6bc: 0c012bda */ jal func0004af68
|
/* 4a6bc: 0c012bda */ jal __ll_mul
|
||||||
/* 4a6c0: 00603825 */ or $a3,$v1,$zero
|
/* 4a6c0: 00603825 */ or $a3,$v1,$zero
|
||||||
/* 4a6c4: 8fae0038 */ lw $t6,0x38($sp)
|
/* 4a6c4: 8fae0038 */ lw $t6,0x38($sp)
|
||||||
/* 4a6c8: 8faf003c */ lw $t7,0x3c($sp)
|
/* 4a6c8: 8faf003c */ lw $t7,0x3c($sp)
|
||||||
|
|
|
@ -1,274 +0,0 @@
|
||||||
#include <ultra64.h>
|
|
||||||
#include "constants.h"
|
|
||||||
#include "game/data/data_000000.h"
|
|
||||||
#include "game/data/data_0083d0.h"
|
|
||||||
#include "game/data/data_00e460.h"
|
|
||||||
#include "game/data/data_0160b0.h"
|
|
||||||
#include "game/data/data_01a3a0.h"
|
|
||||||
#include "game/data/data_020df0.h"
|
|
||||||
#include "game/data/data_02da90.h"
|
|
||||||
#include "gvars/gvars.h"
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004ae00
|
|
||||||
/* 4ae00: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4ae04: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4ae08: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4ae0c: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4ae10: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4ae14: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4ae18: 01ee1016 */ dsrlv $v0,$t6,$t7
|
|
||||||
/* 4ae1c: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4ae20: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4ae24: 03e00008 */ jr $ra
|
|
||||||
/* 4ae28: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004ae2c
|
|
||||||
/* 4ae2c: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4ae30: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4ae34: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4ae38: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4ae3c: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4ae40: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4ae44: 01cf001f */ ddivu $zero,$t6,$t7
|
|
||||||
/* 4ae48: 15e00002 */ bnez $t7,.L0004ae54
|
|
||||||
/* 4ae4c: 00000000 */ nop
|
|
||||||
/* 4ae50: 0007000d */ break 0x7
|
|
||||||
.L0004ae54:
|
|
||||||
/* 4ae54: 00001010 */ mfhi $v0
|
|
||||||
/* 4ae58: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4ae5c: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4ae60: 03e00008 */ jr $ra
|
|
||||||
/* 4ae64: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004ae68
|
|
||||||
/* 4ae68: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4ae6c: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4ae70: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4ae74: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4ae78: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4ae7c: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4ae80: 01cf001f */ ddivu $zero,$t6,$t7
|
|
||||||
/* 4ae84: 15e00002 */ bnez $t7,.L0004ae90
|
|
||||||
/* 4ae88: 00000000 */ nop
|
|
||||||
/* 4ae8c: 0007000d */ break 0x7
|
|
||||||
.L0004ae90:
|
|
||||||
/* 4ae90: 00001012 */ mflo $v0
|
|
||||||
/* 4ae94: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4ae98: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4ae9c: 03e00008 */ jr $ra
|
|
||||||
/* 4aea0: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004aea4
|
|
||||||
/* 4aea4: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4aea8: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4aeac: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4aeb0: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4aeb4: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4aeb8: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4aebc: 01ee1014 */ dsllv $v0,$t6,$t7
|
|
||||||
/* 4aec0: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4aec4: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4aec8: 03e00008 */ jr $ra
|
|
||||||
/* 4aecc: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
/* 4aed0: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4aed4: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4aed8: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4aedc: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4aee0: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4aee4: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4aee8: 01cf001f */ ddivu $zero,$t6,$t7
|
|
||||||
/* 4aeec: 15e00002 */ bnez $t7,.L0004aef8
|
|
||||||
/* 4aef0: 00000000 */ nop
|
|
||||||
/* 4aef4: 0007000d */ break 0x7
|
|
||||||
.L0004aef8:
|
|
||||||
/* 4aef8: 00001010 */ mfhi $v0
|
|
||||||
/* 4aefc: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4af00: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4af04: 03e00008 */ jr $ra
|
|
||||||
/* 4af08: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004af0c
|
|
||||||
/* 4af0c: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4af10: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4af14: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4af18: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4af1c: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4af20: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4af24: 01cf001e */ ddiv $zero,$t6,$t7
|
|
||||||
/* 4af28: 00000000 */ nop
|
|
||||||
/* 4af2c: 15e00002 */ bnez $t7,.L0004af38
|
|
||||||
/* 4af30: 00000000 */ nop
|
|
||||||
/* 4af34: 0007000d */ break 0x7
|
|
||||||
.L0004af38:
|
|
||||||
/* 4af38: 6401ffff */ daddiu $at,$zero,-1
|
|
||||||
/* 4af3c: 15e10005 */ bne $t7,$at,.L0004af54
|
|
||||||
/* 4af40: 64010001 */ daddiu $at,$zero,0x1
|
|
||||||
/* 4af44: 00010ffc */ dsll32 $at,$at,0x1f
|
|
||||||
/* 4af48: 15c10002 */ bne $t6,$at,.L0004af54
|
|
||||||
/* 4af4c: 00000000 */ nop
|
|
||||||
/* 4af50: 0006000d */ break 0x6
|
|
||||||
.L0004af54:
|
|
||||||
/* 4af54: 00001012 */ mflo $v0
|
|
||||||
/* 4af58: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4af5c: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4af60: 03e00008 */ jr $ra
|
|
||||||
/* 4af64: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel func0004af68
|
|
||||||
/* 4af68: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4af6c: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4af70: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4af74: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4af78: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4af7c: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4af80: 01cf001d */ dmultu $t6,$t7
|
|
||||||
/* 4af84: 00001012 */ mflo $v0
|
|
||||||
/* 4af88: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4af8c: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4af90: 03e00008 */ jr $ra
|
|
||||||
/* 4af94: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
/* 4af98: 87af0012 */ lh $t7,0x12($sp)
|
|
||||||
/* 4af9c: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4afa0: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4afa4: dfae0008 */ ld $t6,0x8($sp)
|
|
||||||
/* 4afa8: 01e0c025 */ or $t8,$t7,$zero
|
|
||||||
/* 4afac: 0300c825 */ or $t9,$t8,$zero
|
|
||||||
/* 4afb0: 01d9001f */ ddivu $zero,$t6,$t9
|
|
||||||
/* 4afb4: 17200002 */ bnez $t9,.L0004afc0
|
|
||||||
/* 4afb8: 00000000 */ nop
|
|
||||||
/* 4afbc: 0007000d */ break 0x7
|
|
||||||
.L0004afc0:
|
|
||||||
/* 4afc0: 00004012 */ mflo $t0
|
|
||||||
/* 4afc4: fc880000 */ sd $t0,0x0($a0)
|
|
||||||
/* 4afc8: 87aa0012 */ lh $t2,0x12($sp)
|
|
||||||
/* 4afcc: dfa90008 */ ld $t1,0x8($sp)
|
|
||||||
/* 4afd0: 01405825 */ or $t3,$t2,$zero
|
|
||||||
/* 4afd4: 01606025 */ or $t4,$t3,$zero
|
|
||||||
/* 4afd8: 012c001f */ ddivu $zero,$t1,$t4
|
|
||||||
/* 4afdc: 15800002 */ bnez $t4,.L0004afe8
|
|
||||||
/* 4afe0: 00000000 */ nop
|
|
||||||
/* 4afe4: 0007000d */ break 0x7
|
|
||||||
.L0004afe8:
|
|
||||||
/* 4afe8: 00006810 */ mfhi $t5
|
|
||||||
/* 4afec: fcad0000 */ sd $t5,0x0($a1)
|
|
||||||
/* 4aff0: 03e00008 */ jr $ra
|
|
||||||
/* 4aff4: 00000000 */ nop
|
|
||||||
/* 4aff8: 27bdfff8 */ addiu $sp,$sp,-8
|
|
||||||
/* 4affc: afa40008 */ sw $a0,0x8($sp)
|
|
||||||
/* 4b000: afa5000c */ sw $a1,0xc($sp)
|
|
||||||
/* 4b004: afa60010 */ sw $a2,0x10($sp)
|
|
||||||
/* 4b008: afa70014 */ sw $a3,0x14($sp)
|
|
||||||
/* 4b00c: dfaf0010 */ ld $t7,0x10($sp)
|
|
||||||
/* 4b010: dfae0008 */ ld $t6,0x8($sp)
|
|
||||||
/* 4b014: 01cf001e */ ddiv $zero,$t6,$t7
|
|
||||||
/* 4b018: 00000000 */ nop
|
|
||||||
/* 4b01c: 15e00002 */ bnez $t7,.L0004b028
|
|
||||||
/* 4b020: 00000000 */ nop
|
|
||||||
/* 4b024: 0007000d */ break 0x7
|
|
||||||
.L0004b028:
|
|
||||||
/* 4b028: 6401ffff */ daddiu $at,$zero,-1
|
|
||||||
/* 4b02c: 15e10005 */ bne $t7,$at,.L0004b044
|
|
||||||
/* 4b030: 64010001 */ daddiu $at,$zero,0x1
|
|
||||||
/* 4b034: 00010ffc */ dsll32 $at,$at,0x1f
|
|
||||||
/* 4b038: 15c10002 */ bne $t6,$at,.L0004b044
|
|
||||||
/* 4b03c: 00000000 */ nop
|
|
||||||
/* 4b040: 0006000d */ break 0x6
|
|
||||||
.L0004b044:
|
|
||||||
/* 4b044: 0000c010 */ mfhi $t8
|
|
||||||
/* 4b048: ffb80000 */ sd $t8,0x0($sp)
|
|
||||||
/* 4b04c: 07010003 */ bgez $t8,.L0004b05c
|
|
||||||
/* 4b050: 00000000 */ nop
|
|
||||||
/* 4b054: 1de00007 */ bgtz $t7,.L0004b074
|
|
||||||
/* 4b058: 00000000 */ nop
|
|
||||||
.L0004b05c:
|
|
||||||
/* 4b05c: dfb90000 */ ld $t9,0x0($sp)
|
|
||||||
/* 4b060: 1b200008 */ blez $t9,.L0004b084
|
|
||||||
/* 4b064: 00000000 */ nop
|
|
||||||
/* 4b068: dfa80010 */ ld $t0,0x10($sp)
|
|
||||||
/* 4b06c: 05010005 */ bgez $t0,.L0004b084
|
|
||||||
/* 4b070: 00000000 */ nop
|
|
||||||
.L0004b074:
|
|
||||||
/* 4b074: dfa90000 */ ld $t1,0x0($sp)
|
|
||||||
/* 4b078: dfaa0010 */ ld $t2,0x10($sp)
|
|
||||||
/* 4b07c: 012a582d */ daddu $t3,$t1,$t2
|
|
||||||
/* 4b080: ffab0000 */ sd $t3,0x0($sp)
|
|
||||||
.L0004b084:
|
|
||||||
/* 4b084: 8fa20000 */ lw $v0,0x0($sp)
|
|
||||||
/* 4b088: 8fa30004 */ lw $v1,0x4($sp)
|
|
||||||
/* 4b08c: 03e00008 */ jr $ra
|
|
||||||
/* 4b090: 27bd0008 */ addiu $sp,$sp,0x8
|
|
||||||
/* 4b094: afa40000 */ sw $a0,0x0($sp)
|
|
||||||
/* 4b098: afa50004 */ sw $a1,0x4($sp)
|
|
||||||
/* 4b09c: afa60008 */ sw $a2,0x8($sp)
|
|
||||||
/* 4b0a0: afa7000c */ sw $a3,0xc($sp)
|
|
||||||
/* 4b0a4: dfaf0008 */ ld $t7,0x8($sp)
|
|
||||||
/* 4b0a8: dfae0000 */ ld $t6,0x0($sp)
|
|
||||||
/* 4b0ac: 01ee1017 */ dsrav $v0,$t6,$t7
|
|
||||||
/* 4b0b0: 0002183c */ dsll32 $v1,$v0,0x0
|
|
||||||
/* 4b0b4: 0003183f */ dsra32 $v1,$v1,0x0
|
|
||||||
/* 4b0b8: 03e00008 */ jr $ra
|
|
||||||
/* 4b0bc: 0002103f */ dsra32 $v0,$v0,0x0
|
|
||||||
);
|
|
||||||
|
|
||||||
GLOBAL_ASM(
|
|
||||||
glabel bzero
|
|
||||||
/* 4b0c0: 28a1000c */ slti $at,$a1,0xc
|
|
||||||
/* 4b0c4: 1420001d */ bnez $at,.L0004b13c
|
|
||||||
/* 4b0c8: 00041823 */ negu $v1,$a0
|
|
||||||
/* 4b0cc: 30630003 */ andi $v1,$v1,0x3
|
|
||||||
/* 4b0d0: 10600003 */ beqz $v1,.L0004b0e0
|
|
||||||
/* 4b0d4: 00a32823 */ subu $a1,$a1,$v1
|
|
||||||
/* 4b0d8: a8800000 */ swl $zero,0x0($a0)
|
|
||||||
/* 4b0dc: 00832021 */ addu $a0,$a0,$v1
|
|
||||||
.L0004b0e0:
|
|
||||||
/* 4b0e0: 2401ffe0 */ addiu $at,$zero,-32
|
|
||||||
/* 4b0e4: 00a13824 */ and $a3,$a1,$at
|
|
||||||
/* 4b0e8: 10e0000c */ beqz $a3,.L0004b11c
|
|
||||||
/* 4b0ec: 00a72823 */ subu $a1,$a1,$a3
|
|
||||||
/* 4b0f0: 00e43821 */ addu $a3,$a3,$a0
|
|
||||||
.L0004b0f4:
|
|
||||||
/* 4b0f4: 24840020 */ addiu $a0,$a0,0x20
|
|
||||||
/* 4b0f8: ac80ffe0 */ sw $zero,-0x20($a0)
|
|
||||||
/* 4b0fc: ac80ffe4 */ sw $zero,-0x1c($a0)
|
|
||||||
/* 4b100: ac80ffe8 */ sw $zero,-0x18($a0)
|
|
||||||
/* 4b104: ac80ffec */ sw $zero,-0x14($a0)
|
|
||||||
/* 4b108: ac80fff0 */ sw $zero,-0x10($a0)
|
|
||||||
/* 4b10c: ac80fff4 */ sw $zero,-0xc($a0)
|
|
||||||
/* 4b110: ac80fff8 */ sw $zero,-0x8($a0)
|
|
||||||
/* 4b114: 1487fff7 */ bne $a0,$a3,.L0004b0f4
|
|
||||||
/* 4b118: ac80fffc */ sw $zero,-0x4($a0)
|
|
||||||
.L0004b11c:
|
|
||||||
/* 4b11c: 2401fffc */ addiu $at,$zero,-4
|
|
||||||
/* 4b120: 00a13824 */ and $a3,$a1,$at
|
|
||||||
/* 4b124: 10e00005 */ beqz $a3,.L0004b13c
|
|
||||||
/* 4b128: 00a72823 */ subu $a1,$a1,$a3
|
|
||||||
/* 4b12c: 00e43821 */ addu $a3,$a3,$a0
|
|
||||||
.L0004b130:
|
|
||||||
/* 4b130: 24840004 */ addiu $a0,$a0,0x4
|
|
||||||
/* 4b134: 1487fffe */ bne $a0,$a3,.L0004b130
|
|
||||||
/* 4b138: ac80fffc */ sw $zero,-0x4($a0)
|
|
||||||
.L0004b13c:
|
|
||||||
/* 4b13c: 18a00005 */ blez $a1,.L0004b154
|
|
||||||
/* 4b140: 00000000 */ nop
|
|
||||||
/* 4b144: 00a42821 */ addu $a1,$a1,$a0
|
|
||||||
.L0004b148:
|
|
||||||
/* 4b148: 24840001 */ addiu $a0,$a0,0x1
|
|
||||||
/* 4b14c: 1485fffe */ bne $a0,$a1,.L0004b148
|
|
||||||
/* 4b150: a080ffff */ sb $zero,-0x1($a0)
|
|
||||||
.L0004b154:
|
|
||||||
/* 4b154: 03e00008 */ jr $ra
|
|
||||||
/* 4b158: 00000000 */ nop
|
|
||||||
/* 4b15c: 00000000 */ nop
|
|
||||||
);
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "game/data/data_020df0.h"
|
#include "game/data/data_020df0.h"
|
||||||
#include "game/data/data_02da90.h"
|
#include "game/data/data_02da90.h"
|
||||||
#include "gvars/gvars.h"
|
#include "gvars/gvars.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b5e0.h"
|
#include "lib/lib_4b5e0.h"
|
||||||
#include "lib/lib_4c090.h"
|
#include "lib/lib_4c090.h"
|
||||||
#include "lib/lib_4cc10.h"
|
#include "lib/lib_4cc10.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "game/data/data_020df0.h"
|
#include "game/data/data_020df0.h"
|
||||||
#include "game/data/data_02da90.h"
|
#include "game/data/data_02da90.h"
|
||||||
#include "gvars/gvars.h"
|
#include "gvars/gvars.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4b5e0.h"
|
#include "lib/lib_4b5e0.h"
|
||||||
#include "lib/lib_4c090.h"
|
#include "lib/lib_4c090.h"
|
||||||
#include "lib/lib_4cde0.h"
|
#include "lib/lib_4cde0.h"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "game/data/data_02da90.h"
|
#include "game/data/data_02da90.h"
|
||||||
#include "gvars/gvars.h"
|
#include "gvars/gvars.h"
|
||||||
#include "lib/lib_06330.h"
|
#include "lib/lib_06330.h"
|
||||||
#include "lib/lib_4ae00.h"
|
#include "lib/libc/ll.h"
|
||||||
#include "lib/lib_4d6f0.h"
|
#include "lib/lib_4d6f0.h"
|
||||||
#include "lib/lib_50a00.h"
|
#include "lib/lib_50a00.h"
|
||||||
#include "lib/lib_513b0.h"
|
#include "lib/lib_513b0.h"
|
||||||
|
|
|
@ -81,7 +81,7 @@ glabel func000520c0
|
||||||
/* 521c8: 01203825 */ or $a3,$t1,$zero
|
/* 521c8: 01203825 */ or $a3,$t1,$zero
|
||||||
/* 521cc: 000937c3 */ sra $a2,$t1,0x1f
|
/* 521cc: 000937c3 */ sra $a2,$t1,0x1f
|
||||||
/* 521d0: afa8004c */ sw $t0,0x4c($sp)
|
/* 521d0: afa8004c */ sw $t0,0x4c($sp)
|
||||||
/* 521d4: 0c012b8b */ jal func0004ae2c
|
/* 521d4: 0c012b8b */ jal __ull_rem
|
||||||
/* 521d8: afa90070 */ sw $t1,0x70($sp)
|
/* 521d8: afa90070 */ sw $t1,0x70($sp)
|
||||||
/* 521dc: 8fa8004c */ lw $t0,0x4c($sp)
|
/* 521dc: 8fa8004c */ lw $t0,0x4c($sp)
|
||||||
/* 521e0: 00737021 */ addu $t6,$v1,$s3
|
/* 521e0: 00737021 */ addu $t6,$v1,$s3
|
||||||
|
@ -96,7 +96,7 @@ glabel func000520c0
|
||||||
/* 52200: 8fa50064 */ lw $a1,0x64($sp)
|
/* 52200: 8fa50064 */ lw $a1,0x64($sp)
|
||||||
/* 52204: 01203825 */ or $a3,$t1,$zero
|
/* 52204: 01203825 */ or $a3,$t1,$zero
|
||||||
/* 52208: 000937c3 */ sra $a2,$t1,0x1f
|
/* 52208: 000937c3 */ sra $a2,$t1,0x1f
|
||||||
/* 5220c: 0c012b9a */ jal func0004ae68
|
/* 5220c: 0c012b9a */ jal __ull_div
|
||||||
/* 52210: afa90070 */ sw $t1,0x70($sp)
|
/* 52210: afa90070 */ sw $t1,0x70($sp)
|
||||||
/* 52214: 8fa90070 */ lw $t1,0x70($sp)
|
/* 52214: 8fa90070 */ lw $t1,0x70($sp)
|
||||||
/* 52218: ae230004 */ sw $v1,0x4($s1)
|
/* 52218: ae230004 */ sw $v1,0x4($s1)
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
unsigned long long __ull_rshift(unsigned long long a0, unsigned long long a1)
|
||||||
|
{
|
||||||
|
return a0 >> a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long __ull_rem(unsigned long long a0, unsigned long long a1)
|
||||||
|
{
|
||||||
|
return a0 % a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long __ull_div(unsigned long long a0, unsigned long long a1)
|
||||||
|
{
|
||||||
|
return a0 / a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long __ll_lshift(unsigned long long a0, unsigned long long a1)
|
||||||
|
{
|
||||||
|
return a0 << a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
long long __ll_rem(unsigned long long a0, long long a1)
|
||||||
|
{
|
||||||
|
return a0 % a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
long long __ll_div(long long a0, long long a1)
|
||||||
|
{
|
||||||
|
return a0 / a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long __ll_mul(unsigned long long a0, unsigned long long a1)
|
||||||
|
{
|
||||||
|
return a0 * a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void __ull_divremi(unsigned long long *div, unsigned long long *rem, unsigned long long a2, unsigned short a3)
|
||||||
|
{
|
||||||
|
*div = a2 / a3;
|
||||||
|
*rem = a2 % a3;
|
||||||
|
}
|
||||||
|
|
||||||
|
long long __ll_mod(long long a0, long long a1)
|
||||||
|
{
|
||||||
|
long long tmp = a0 % a1;
|
||||||
|
|
||||||
|
if ((tmp < 0 && a1 > 0) || (tmp > 0 && a1 < 0)) {
|
||||||
|
tmp += a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
long long __ll_rshift(long long a0, long long a1)
|
||||||
|
{
|
||||||
|
return a0 >> a1;
|
||||||
|
}
|
|
@ -102,12 +102,12 @@ glabel osInitialize
|
||||||
/* 5cd4: 8e040000 */ lw $a0,0x0($s0)
|
/* 5cd4: 8e040000 */ lw $a0,0x0($s0)
|
||||||
/* 5cd8: 8e050004 */ lw $a1,0x4($s0)
|
/* 5cd8: 8e050004 */ lw $a1,0x4($s0)
|
||||||
/* 5cdc: 24060000 */ addiu $a2,$zero,0x0
|
/* 5cdc: 24060000 */ addiu $a2,$zero,0x0
|
||||||
/* 5ce0: 0c012bda */ jal func0004af68
|
/* 5ce0: 0c012bda */ jal __ll_mul
|
||||||
/* 5ce4: 24070003 */ addiu $a3,$zero,0x3
|
/* 5ce4: 24070003 */ addiu $a3,$zero,0x3
|
||||||
/* 5ce8: 00402025 */ or $a0,$v0,$zero
|
/* 5ce8: 00402025 */ or $a0,$v0,$zero
|
||||||
/* 5cec: 00602825 */ or $a1,$v1,$zero
|
/* 5cec: 00602825 */ or $a1,$v1,$zero
|
||||||
/* 5cf0: 24060000 */ addiu $a2,$zero,0x0
|
/* 5cf0: 24060000 */ addiu $a2,$zero,0x0
|
||||||
/* 5cf4: 0c012b9a */ jal func0004ae68
|
/* 5cf4: 0c012b9a */ jal __ull_div
|
||||||
/* 5cf8: 24070004 */ addiu $a3,$zero,0x4
|
/* 5cf8: 24070004 */ addiu $a3,$zero,0x4
|
||||||
/* 5cfc: ae020000 */ sw $v0,0x0($s0)
|
/* 5cfc: ae020000 */ sw $v0,0x0($s0)
|
||||||
/* 5d00: ae030004 */ sw $v1,0x4($s0)
|
/* 5d00: ae030004 */ sw $v1,0x4($s0)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
"""
|
||||||
|
patchmips3 - overwrites a byte in an -mips3 object file which makes it identify
|
||||||
|
as a -mips2 object file, which allows it to be linked with the rest of the
|
||||||
|
project.
|
||||||
|
|
||||||
|
This is required become some libultra files must be compiled with -mips3.
|
||||||
|
"""
|
||||||
|
|
||||||
|
fd = open(sys.argv[1], 'rb+')
|
||||||
|
fd.seek(0x24)
|
||||||
|
fd.write(bytes([0x10]))
|
||||||
|
fd.close()
|
Loading…
Reference in New Issue