mirror of
https://github.com/farisawan-2000/kirby64.git
synced 2025-02-22 22:02:23 +00:00
some crash_screen work, feel free to take a shot at the rest
This commit is contained in:
parent
5fa36c1e9f
commit
d5fa29a959
3
Makefile
3
Makefile
@ -152,9 +152,8 @@ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
||||
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||
$(CPP) $(VERSION_CFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
cp libreultra/build/2.0I/libultra_rom.a $(BUILD_DIR)/libultra_rom.a
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT)
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libultra_rom.a
|
||||
$(LD) -L ultra_rom $(LDFLAGS) -o $@ $(O_FILES) $(LIBS)
|
||||
|
||||
# final z64 updates checksum
|
||||
|
@ -33,6 +33,7 @@ glabel crash_screen_draw_rect
|
||||
/* 0229A8 80021DA8 14A2FFFD */ bne $a1, $v0, .L80021DA0_ovl0
|
||||
/* 0229AC 80021DAC 24630002 */ addiu $v1, $v1, 2
|
||||
/* 0229B0 80021DB0 10460007 */ beq $v0, $a2, .L80021DD0_ovl0
|
||||
# nop
|
||||
.L80021DB4_ovl0:
|
||||
/* 0229B4 80021DB4 24420004 */ addiu $v0, $v0, 4
|
||||
/* 0229B8 80021DB8 A4640002 */ sh $a0, 2($v1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
glabel func_80021E00
|
||||
glabel crash_screen_draw_glyph
|
||||
/* 022A00 80021E00 24010005 */ li $at, 5
|
||||
/* 022A04 80021E04 00C1001A */ div $zero, $a2, $at
|
||||
/* 022A08 80021E08 00007812 */ mflo $t7
|
||||
|
@ -1,4 +1,4 @@
|
||||
glabel func_80021F80
|
||||
glabel write_to_buf
|
||||
/* 022B80 80021F80 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 022B84 80021F84 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 022B88 80021F88 0C00CE90 */ jal memcpy
|
||||
|
@ -35,7 +35,7 @@ glabel crash_screen_print
|
||||
/* 022C24 80022024 93060000 */ lbu $a2, ($t8)
|
||||
/* 022C28 80022028 50D40004 */ beql $a2, $s4, .L8002203C_ovl0
|
||||
/* 022C2C 8002202C 2610FFFF */ addiu $s0, $s0, -1
|
||||
/* 022C30 80022030 0C008780 */ jal func_80021E00
|
||||
/* 022C30 80022030 0C008780 */ jal crash_screen_draw_glyph
|
||||
/* 022C34 80022034 02A02825 */ move $a1, $s5
|
||||
/* 022C38 80022038 2610FFFF */ addiu $s0, $s0, -1
|
||||
.L8002203C_ovl0:
|
||||
|
@ -1,4 +1,4 @@
|
||||
glabel func_8002206C
|
||||
glabel crash_screen_sleep
|
||||
/* 022C6C 8002206C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 022C70 80022070 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 022C74 80022074 AFA40020 */ sw $a0, 0x20($sp)
|
||||
|
@ -18,11 +18,11 @@ glabel crash_screen_print_fpcsr
|
||||
/* 022DF8 800221F8 00E37024 */ and $t6, $a3, $v1
|
||||
/* 022DFC 800221FC 11C0000B */ beqz $t6, .L8002222C_ovl0
|
||||
/* 022E00 80022200 00027880 */ sll $t7, $v0, 2
|
||||
/* 022E04 80022204 3C078004 */ lui $a3, 0x8004
|
||||
/* 022E04 80022204 3C078004 */ lui $a3, %hi(D_8003F854)
|
||||
/* 022E08 80022208 00EF3821 */ addu $a3, $a3, $t7
|
||||
/* 022E0C 8002220C 3C068004 */ lui $a2, %hi(D_80040F38) # $a2, 0x8004
|
||||
/* 022E10 80022210 24C60F38 */ addiu $a2, %lo(D_80040F38) # addiu $a2, $a2, 0xf38
|
||||
/* 022E14 80022214 8CE7F854 */ lw $a3, -0x7ac($a3)
|
||||
/* 022E14 80022214 8CE7F854 */ lw $a3, %lo(D_8003F854)($a3)
|
||||
/* 022E18 80022218 24040084 */ li $a0, 132
|
||||
/* 022E1C 8002221C 0C0087E9 */ jal crash_screen_print
|
||||
/* 022E20 80022220 2405009B */ li $a1, 155
|
||||
|
@ -9,7 +9,7 @@ glabel func_80022248
|
||||
/* 022E64 80022264 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 022E68 80022268 26528F20 */ addiu $s2, %lo(D_80048F20) # addiu $s2, $s2, -0x70e0
|
||||
.L8002226C_ovl0:
|
||||
/* 022E6C 8002226C 0C00881B */ jal func_8002206C
|
||||
/* 022E6C 8002226C 0C00881B */ jal crash_screen_sleep
|
||||
/* 022E70 80022270 24040010 */ li $a0, 16
|
||||
/* 022E74 80022274 0C001193 */ jal func_8000464C
|
||||
/* 022E78 80022278 00000000 */ nop
|
||||
|
@ -1,7 +1,7 @@
|
||||
glabel func_800229CC
|
||||
glabel get_crashed_thread
|
||||
/* 0235CC 800229CC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 0235D0 800229D0 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0235D4 800229D4 0C00D33C */ jal func_80034CF0
|
||||
/* 0235D4 800229D4 0C00D33C */ jal __osGetCurrFaultedThread
|
||||
/* 0235D8 800229D8 00000000 */ nop
|
||||
/* 0235DC 800229DC 8C4E0004 */ lw $t6, 4($v0)
|
||||
/* 0235E0 800229E0 2404FFFF */ li $a0, -1
|
||||
|
@ -45,7 +45,7 @@ glabel func_80022A58
|
||||
/* 0236FC 80022AFC 10DE0005 */ beq $a2, $fp, .L80022B14_ovl0
|
||||
/* 023700 80022B00 8E500000 */ lw $s0, ($s2)
|
||||
/* 023704 80022B04 02002025 */ move $a0, $s0
|
||||
/* 023708 80022B08 0C008780 */ jal func_80021E00
|
||||
/* 023708 80022B08 0C008780 */ jal crash_screen_draw_glyph
|
||||
/* 02370C 80022B0C 8E250000 */ lw $a1, ($s1)
|
||||
/* 023710 80022B10 8E500000 */ lw $s0, ($s2)
|
||||
.L80022B14_ovl0:
|
||||
|
@ -21,7 +21,7 @@ glabel func_80022BC4
|
||||
/* 02380C 80022C0C 02002825 */ move $a1, $s0
|
||||
/* 023810 80022C10 0C00B540 */ jal osRecvMesg
|
||||
/* 023814 80022C14 24060001 */ li $a2, 1
|
||||
/* 023818 80022C18 0C008A73 */ jal func_800229CC
|
||||
/* 023818 80022C18 0C008A73 */ jal get_crashed_thread
|
||||
/* 02381C 80022C1C 00000000 */ nop
|
||||
/* 023820 80022C20 1040FFF9 */ beqz $v0, .L80022C08_ovl0
|
||||
/* 023824 80022C24 00409025 */ move $s2, $v0
|
||||
|
@ -12510,17 +12510,14 @@ u32 D_8003F84C = 0x80040E74;
|
||||
|
||||
u32 D_8003F850 = 0x80040E8C;
|
||||
|
||||
u32 D_8003F854 = 0x80040EA8;
|
||||
|
||||
u32 D_8003F858 = 0x80040EC0;
|
||||
|
||||
u32 D_8003F85C = 0x80040ED4;
|
||||
|
||||
u32 D_8003F860 = 0x80040EE8;
|
||||
|
||||
u32 D_8003F864 = 0x80040EF4;
|
||||
|
||||
u32 D_8003F868 = 0x80040F00;
|
||||
char *D_8003F854[] = {
|
||||
0x80040EA8,
|
||||
0x80040EC0,
|
||||
0x80040ED4,
|
||||
0x80040EE8,
|
||||
0x80040EF4,
|
||||
0x80040F00,
|
||||
};
|
||||
|
||||
u32 D_8003F86C = 0x0000001E;
|
||||
|
||||
|
@ -52,7 +52,7 @@ SECTIONS
|
||||
BUILD_DIR/src/ovl0/ovl0_8.o(.text);
|
||||
BUILD_DIR/asm/ovl0/ovl0_9.o(.text);
|
||||
BUILD_DIR/asm/ovl0/exception.o(.text);
|
||||
/*libreultra/build/2.0I/libultra_rom.a:__osDequeueThread.o(.text);*/
|
||||
BUILD_DIR/libultra_rom.a:bcopy.o(.text);
|
||||
BUILD_DIR/asm/ovl0/ovl0_afterException.o(.text);
|
||||
BUILD_DIR/asm/ovl0/lib/osViGetCurrentFramebuffer.o(.text);
|
||||
BUILD_DIR/asm/ovl0/lib/__osSPSetPc.o(.text);
|
||||
@ -65,6 +65,7 @@ SECTIONS
|
||||
}
|
||||
END_NOLOAD(ovl0)
|
||||
|
||||
|
||||
/* 0x8009B540 043790-066630 [22EA0] */
|
||||
BEGIN_SEG(ovl1, 0x8009B540) {
|
||||
. += 0x10;
|
||||
|
@ -252,15 +252,69 @@ GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021764.s")
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021CB4.s")
|
||||
#endif
|
||||
|
||||
extern struct {
|
||||
OSThread thread;
|
||||
u64 stack[0x800 / sizeof(u64)];
|
||||
OSMesgQueue mesgQueue; // D_80096ED8
|
||||
OSMesg mesg;
|
||||
u16 *framebuffer;
|
||||
u16 width; // D_8004A508
|
||||
u16 height;
|
||||
} gCrashScreen;
|
||||
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void crash_screen_draw_rect(s32 x, s32 y, s32 w, s32 h) {
|
||||
u16 *ptr;
|
||||
s32 i, j;
|
||||
|
||||
ptr = gCrashScreen.framebuffer + gCrashScreen.width * y + x;
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
// 0xe738 = 0b1110011100111000
|
||||
*ptr = ((*ptr & 0xe738) >> 2) | 1;
|
||||
ptr+=4;
|
||||
}
|
||||
ptr += gCrashScreen.width - w;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021D34.s")
|
||||
#endif
|
||||
|
||||
extern u16 *osViGetCurrentFramebuffer(void);
|
||||
|
||||
extern u32 D_8003F70C[];
|
||||
extern u32 D_8004A508;
|
||||
#ifdef MIPS_TO_C
|
||||
void crash_screen_draw_glyph(s32 x, s32 y, s32 glyph) {
|
||||
const u32 *data;
|
||||
u16 *ptr;
|
||||
u32 bit;
|
||||
u32 rowMask;
|
||||
s32 i, j;
|
||||
|
||||
// TODO: output u32 for these textures and remove this ugly cast
|
||||
data = D_8003F70C[glyph / 5 * 7];
|
||||
// ptr = (osViGetCurrentFramebuffer() + ((D_8004A508 * y) * 2)) + (x * 2);
|
||||
ptr = (osViGetCurrentFramebuffer())[D_8004A508 * y + x];
|
||||
// ptr = osViGetCurrentFramebuffer() + gCrashScreen.width * (y) + (x);
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
bit = (0x80000000U) >> ((glyph % 5) * 6) / 2;
|
||||
rowMask = *data++;
|
||||
|
||||
for (j = 0; j < 6; j++) {
|
||||
*ptr++ = (bit & rowMask) ? 0xffff : 1;
|
||||
bit >>= 1;
|
||||
}
|
||||
// ptr += gCrashScreen.width - 6;
|
||||
ptr += D_8004A508 - 6;
|
||||
|
||||
}
|
||||
}
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
u32 func_80021E00(s32 arg0, s32 arg1, s32 arg2) {
|
||||
u32 crash_screen_draw_glyph(s32 arg0, s32 arg1, s32 arg2) {
|
||||
void *sp1C;
|
||||
s32 temp_a0;
|
||||
s32 temp_t0;
|
||||
@ -334,105 +388,98 @@ loop_1:
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021E00.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c
|
||||
s32 func_80021F80(s32 arg2) {
|
||||
return memcpy() + arg2;
|
||||
char *write_to_buf(char *buffer, const char *data, size_t size) {
|
||||
return (char *) memcpy(buffer, data, size) + size;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021F80.s")
|
||||
#endif
|
||||
|
||||
#include "libc/stdarg.h"
|
||||
extern u8 D_8003F68C[128];
|
||||
// something's screwy with this func
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void crash_screen_print(s32 x, s32 y, const char *fmt, ...) {
|
||||
char *ptr;
|
||||
u32 glyph;
|
||||
s32 size;
|
||||
char buf[0x100];
|
||||
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
size = _Printf(write_to_buf, buf, fmt, args);
|
||||
|
||||
if (size > 0) {
|
||||
ptr = buf;
|
||||
|
||||
while (size > 0) {
|
||||
|
||||
glyph = D_8003F68C[*ptr & 0x7f];
|
||||
|
||||
if (glyph != 0xff) {
|
||||
crash_screen_draw_glyph(x, y, glyph);
|
||||
}
|
||||
|
||||
size--;
|
||||
|
||||
ptr++;
|
||||
x += 6;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80021FA4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit yooo
|
||||
void func_8002206C(s32 arg0) {
|
||||
u32 sp1C;
|
||||
u32 sp18;
|
||||
u32 temp_ret_3;
|
||||
u32 temp_ret_4;
|
||||
u32 temp_ret_5;
|
||||
u32 temp_v0;
|
||||
u32 temp_v0_2;
|
||||
u32 temp_v1;
|
||||
u64 temp_ret;
|
||||
u64 temp_ret_2;
|
||||
|
||||
temp_ret = __ll_mul(arg0 >> 0x1F, arg0, 0, 0x3E8);
|
||||
temp_ret_2 = __ll_mul(temp_ret, (u32) temp_ret, 0, 0xBB8);
|
||||
temp_ret_3 = __ull_div(temp_ret_2, (u32) temp_ret_2, 0, 0x40);
|
||||
temp_v1 = (u32) (u64) temp_ret_3;
|
||||
sp18 = temp_ret_3;
|
||||
sp1C = temp_v1;
|
||||
osSetTime(0, 0);
|
||||
temp_ret_4 = osGetTime();
|
||||
temp_v0 = temp_ret_4;
|
||||
if (sp18 >= temp_v0) {
|
||||
if ((((temp_v0 >= sp18) && ((u32) (u64) temp_ret_4 < sp1C)) && (temp_ret_5 = osGetTime(), temp_v0_2 = temp_ret_5, ((temp_v0_2 < sp18) == 0))) && (sp18 >= temp_v0_2)) {
|
||||
block_5:
|
||||
if ((u32) (u64) temp_ret_5 < sp1C) {
|
||||
goto loop_3;
|
||||
}
|
||||
} else {
|
||||
loop_3:
|
||||
temp_ret_5 = osGetTime();
|
||||
temp_v0_2 = temp_ret_5;
|
||||
if (temp_v0_2 < sp18) {
|
||||
goto loop_3;
|
||||
}
|
||||
if (sp18 >= temp_v0_2) {
|
||||
goto block_5;
|
||||
}
|
||||
}
|
||||
void crash_screen_sleep(s32 ms) {
|
||||
u64 cycles = ms * 1000LL * 3000LL / 64ULL;
|
||||
osSetTime(0);
|
||||
while (osGetTime() < cycles) {
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_8002206C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c
|
||||
void crash_screen_print_float_reg(s32 arg2, void *arg3) {
|
||||
u32 temp_v1;
|
||||
extern const char *D_80040F14, *D_80040F20;
|
||||
void crash_screen_print_float_reg(s32 x, s32 y, s32 regNum, void *addr) {
|
||||
u32 bits;
|
||||
s32 exponent;
|
||||
|
||||
temp_v1 = ((u32) (*arg3 & 0x7F800000) >> 0x17) - 0x7F;
|
||||
if ((s32) temp_v1 >= -0x7E) {
|
||||
if ((s32) temp_v1 < 0x80 || *arg3 == 0) {
|
||||
crash_screen_print(&D_80040F14, arg2, (f64) *arg3);
|
||||
bits = *(u32 *) addr;
|
||||
exponent = ((bits & 0x7f800000U) >> 0x17) - 0x7f;
|
||||
if ((exponent >= -0x7e && exponent <= 0x7f) || bits == 0) {
|
||||
crash_screen_print(x, y, &D_80040F14, regNum, *(f32 *) addr);
|
||||
} else {
|
||||
crash_screen_print(x, y, &D_80040F20, regNum, bits);
|
||||
}
|
||||
}
|
||||
|
||||
extern const char *D_80040F38;
|
||||
extern const char *D_80040F2C;
|
||||
extern char *D_8003F854[];
|
||||
void crash_screen_print_fpcsr(u32 fpcsr) {
|
||||
s32 i;
|
||||
u32 bit;
|
||||
|
||||
bit = 1 << 17;
|
||||
crash_screen_print(30, 155, &D_80040F2C, fpcsr);
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (fpcsr & bit) {
|
||||
crash_screen_print(132, 155, &D_80040F38, D_8003F854[i]);
|
||||
return;
|
||||
}
|
||||
bit >>= 1;
|
||||
}
|
||||
crash_screen_print(&D_80040F20, arg2, *arg3);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022134.s")
|
||||
#endif
|
||||
|
||||
extern u16 D_80048F20;
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_800221BC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
? func_80022248(s32 arg0, s32 arg1) {
|
||||
loop_1:
|
||||
func_8002206C(0x10);
|
||||
func_8000464C();
|
||||
if (arg1 != 0) {
|
||||
if (osViGetCurrentFramebuffer() != arg1) {
|
||||
u8 func_80022248(s32 arg0, s32 arg1) {
|
||||
while (arg0 != D_80048F20) {
|
||||
crash_screen_sleep(0x10);
|
||||
func_8000464C();
|
||||
if (arg1 != 0 && osViGetCurrentFramebuffer() != arg1) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (arg0 != D_80048F20) {
|
||||
goto loop_1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
@ -574,45 +621,24 @@ block_25:
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_800222C4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void *func_800229CC(void) {
|
||||
s32 temp_v0_2;
|
||||
void *temp_v0;
|
||||
void *temp_v1;
|
||||
s32 phi_v0;
|
||||
void *phi_v1;
|
||||
OSThread *get_crashed_thread(void) {
|
||||
OSThread *thread;
|
||||
|
||||
temp_v0 = func_80034CF0();
|
||||
if (-1 != temp_v0->unk4) {
|
||||
phi_v0 = temp_v0->unk4;
|
||||
phi_v1 = temp_v0;
|
||||
loop_2:
|
||||
if (phi_v0 > 0) {
|
||||
if (phi_v0 < 0xFF) {
|
||||
if ((phi_v1->unk12 & 3) != 0) {
|
||||
return phi_v1;
|
||||
}
|
||||
}
|
||||
}
|
||||
temp_v1 = phi_v1->unkC;
|
||||
temp_v0_2 = temp_v1->unk4;
|
||||
phi_v0 = temp_v0_2;
|
||||
phi_v1 = temp_v1;
|
||||
if (-1 != temp_v0_2) {
|
||||
goto loop_2;
|
||||
thread = __osGetCurrFaultedThread();
|
||||
while (thread->priority != -1) {
|
||||
if (thread->priority > OS_PRIORITY_IDLE && thread->priority < OS_PRIORITY_MAX
|
||||
&& (thread->flags & 3) != 0) {
|
||||
return thread;
|
||||
}
|
||||
thread = thread->tlnext;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_800229CC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void func_80022A38(s32 arg0) {
|
||||
*0x80096EF8 = arg0;
|
||||
D_80096EF8 = arg0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022A38.s")
|
||||
@ -622,12 +648,14 @@ GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022A38.s")
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void func_80022A44(s32 arg0, ?32 arg1) {
|
||||
D_8003F86C = arg0;
|
||||
*0x8003F870 = arg1;
|
||||
D_8003F870 = arg1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022A44.s")
|
||||
#endif
|
||||
|
||||
|
||||
// another crash_screen_print type func?
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void func_80022A58(s32 arg0, ? arg1) {
|
||||
@ -653,7 +681,7 @@ loop_3:
|
||||
D_8003F870 = D_8003F870 + 0xA;
|
||||
} else {
|
||||
if (temp_a2 != 0xFF) {
|
||||
func_80021E00(D_8003F86C, D_8003F870, temp_a2);
|
||||
crash_screen_draw_glyph(D_8003F86C, D_8003F870, temp_a2);
|
||||
}
|
||||
temp_t0 = D_8003F86C + 6;
|
||||
D_8003F86C = temp_t0;
|
||||
@ -685,23 +713,25 @@ void func_80022B88(s32 arg0, ? arg1, ? arg2, ? arg3) {
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022B88.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
// generated by mips_to_c commit e0e006e8858ba357d1dcb4dc64f038b7df278aa6
|
||||
void func_80022BC4(s32 arg0) {
|
||||
? sp34;
|
||||
OSThread *temp_s0;
|
||||
OSThread *temp_s2;
|
||||
OSThread *temp_v0;
|
||||
|
||||
osSetEventMesg(0xA, &D_80096ED8, 1);
|
||||
osSetEventMesg(0xC, &D_80096ED8, 2);
|
||||
loop_1:
|
||||
osRecvMesg(&D_80096ED8, &sp34, 1);
|
||||
temp_v0 = func_800229CC();
|
||||
temp_s2 = temp_v0;
|
||||
if (temp_v0 == 0) {
|
||||
goto loop_1;
|
||||
}
|
||||
extern OSThread *(*D_80096EF8)(void);
|
||||
extern u8 D_8003F688;
|
||||
extern OSMesgQueue *D_80096ED8;
|
||||
#ifdef MIPS_TO_C
|
||||
void func_80022BC4(s32 arg) {
|
||||
// void thread_crash_screen(UNUSED void *arg) {
|
||||
OSMesg mesg;
|
||||
OSThread *thread;
|
||||
OSThread *temp_s0;
|
||||
|
||||
osSetEventMesg(OS_EVENT_CPU_BREAK, &D_80096ED8, (OSMesg) 1);
|
||||
osSetEventMesg(OS_EVENT_FAULT, &D_80096ED8, (OSMesg) 2);
|
||||
do {
|
||||
osRecvMesg(&D_80096ED8, &mesg, 1);
|
||||
thread = get_crashed_thread();
|
||||
} while (thread == NULL);
|
||||
|
||||
|
||||
D_8003F688 = 1;
|
||||
func_80022248(0, 0);
|
||||
func_80022248(0x2030, 0);
|
||||
@ -713,9 +743,8 @@ loop_1:
|
||||
func_80022248(0x4100, 0);
|
||||
func_80022248(0, 0);
|
||||
func_80022248(0x404, 0);
|
||||
func_800222C4(temp_s2, 1);
|
||||
if (D_80096EF8 != 0) {
|
||||
loop_3:
|
||||
func_800222C4(thread, 1);
|
||||
while (D_80096EF8) {
|
||||
func_80022248(0, 0);
|
||||
func_80022248(0x2030, 0);
|
||||
crash_screen_draw_rect(0x19, 0x14, 0x10E, 0xD2);
|
||||
@ -723,16 +752,15 @@ loop_3:
|
||||
temp_s0 = D_80096EF8();
|
||||
func_80022248(0, 0);
|
||||
func_80022248(0x2030, 0);
|
||||
if (temp_s0 != 0) {
|
||||
if (temp_s0) {
|
||||
func_800222C4(temp_s0, 0);
|
||||
func_80022248(0, 0);
|
||||
func_80022248(0x2030, 0);
|
||||
}
|
||||
func_800222C4(temp_s2, 0);
|
||||
goto loop_3;
|
||||
func_800222C4(thread, 0);
|
||||
}
|
||||
for (;;) {
|
||||
}
|
||||
loop_6:
|
||||
goto loop_6;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/ovl0/ovl0_8/func_80022BC4.s")
|
||||
|
@ -776,21 +776,21 @@ D_80021764 = 0x80021764;
|
||||
memcpy = 0x80033A40;
|
||||
D_80021F80 = 0x80021F80;
|
||||
_Printf = 0x80033270;
|
||||
func_80021E00 = 0x80021E00;
|
||||
crash_screen_draw_glyph = 0x80021E00;
|
||||
__ll_mul = 0x8002DE08;
|
||||
__ull_div = 0x8002DD08;
|
||||
osSetTime = 0x80035980;
|
||||
crash_screen_print = 0x80021FA4;
|
||||
func_8002206C = 0x8002206C;
|
||||
crash_screen_sleep = 0x8002206C;
|
||||
func_8000464C = 0x8000464C;
|
||||
crash_screen_draw_rect = 0x80021D34;
|
||||
func_80022248 = 0x80022248;
|
||||
crash_screen_print_fpcsr = 0x800221BC;
|
||||
crash_screen_print_float_reg = 0x80022134;
|
||||
func_80034CF0 = 0x80034CF0;
|
||||
__osGetCurrFaultedThread = 0x80034CF0;
|
||||
func_80022A58 = 0x80022A58;
|
||||
D_80096ED8 = 0x80096ED8;
|
||||
func_800229CC = 0x800229CC;
|
||||
get_crashed_thread = 0x800229CC;
|
||||
func_800222C4 = 0x800222C4;
|
||||
D_80096EF8 = 0x80096EF8;
|
||||
func_80022A44 = 0x80022A44;
|
||||
@ -919,7 +919,6 @@ __osSpSetPc = 0x800391F0;
|
||||
__osSpRawStartDma = 0x80030450;
|
||||
__osSpDeviceBusy = 0x80033D30;
|
||||
__osDispatchThread = 0x8002E6E4;
|
||||
/*__osException = 0x8002DF70;*/
|
||||
osThreadSave = 0x80098B50;
|
||||
func_8002E4A4 = 0x8002E4A4;
|
||||
D_80097990 = 0x80097990;
|
||||
@ -9835,6 +9834,8 @@ D_80123EDC = 0x80123EDC;
|
||||
D_8012D200 = 0x8012D200;
|
||||
D_80043F50 = 0x80043F50;
|
||||
|
||||
gCrashScreen = 0x800966D8;
|
||||
|
||||
func_80300170 = D_80300170;
|
||||
D_8022FB50 = _ovl19SegNoloadEnd;
|
||||
D_80042BC8_0 = 0x80042BC8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user