mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
9dbae2681e
- splat: libc2 C stdlib in 2 blocks — main 16-obj run libc2_1 (BZERO/MEMCPY/STRCMP/ PRINTF/PRNT[jtbl ok]/.../SETJMP) split from 800c, + STRCAT.o libc2_2 split from 800c2; new game-code fragments 800c3 + regenerated 800c2 - region byte-verified 17/17; PRNT.o printf-format jtbl resolves via NOLOAD .rodata - BOUNDARY GOTCHA found + fixed: SETJMP.o .text is 0x80 B (8-align pad), not the 0x78 psyq_identify reports (30 ins) -> the libc2_1/800c3 boundary was 8 B too low, overlapping SETJMP's padded tail; the relink inserted +8 padding and shifted the whole downstream image (56k diff bytes, +8 file len). Fix: boundary = last obj's readelf .text size (0x5CE18), not ins-count. Lesson recorded in docs/psyq-worklist.md - when a library block sits at a subseg start, rm the old .c so splat regenerates it - dual byte-gate PASS: 143dbb89 with and without the libc2 objects - LINKED 528 -> 590; REAL still 43; byte-identical 32.25%
140 lines
3.5 KiB
C
140 lines
3.5 KiB
C
#include "common.h"
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C2C8);
|
|
|
|
void BZERO_OBJ_28(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", getchar);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C324);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C358);
|
|
|
|
void MEMSET_OBJ_28(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C388);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PUTCHAR_OBJ_3C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PUTCHAR_OBJ_98);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", toupper);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", tolower);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", rand);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C4CC);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C4DC);
|
|
|
|
void STRCMP_OBJ_5C(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", strcpy);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C584);
|
|
|
|
void STRNCMP_OBJ_78(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C604);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005C640);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_50);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_60);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_88);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_B8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_C8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_D0);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_EC);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_F4);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_FC);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_178);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_188);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_190);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_1E8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_1F0);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_1F8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_200);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_21C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_220);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_24C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_264);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_2A0);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_2A4);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_2D8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_2E8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_340);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_348);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_34C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_380);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_38C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_3BC);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_3D0);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_3D4);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_470);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_590);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_634);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_64C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PRNT_OBJ_654);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005CCC8);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", MEMCHR_OBJ_20);
|
|
|
|
void MEMCHR_OBJ_48(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005CD18);
|
|
|
|
void STRLEN_OBJ_28(void) {
|
|
}
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005CD48);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", PUTS_OBJ_2C);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", func_8005CD98);
|
|
|
|
INCLUDE_ASM("asm/nonmatchings/libc2_1", longjmp);
|