mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-29 15:18:24 -04:00
6e99157bcf
Found while reading the seeds for T1: cookbook §45 names
.run/giants/func_80133CD4.fable.c as its worked example and .run/giants/fable_cd4/
as the flagship's gdb oracle — BOTH were untracked. The docs cite artifacts that
were not in the repo.
- .gitignore: widen by FILE TYPE, not directory — .run/giants/*.{c,md,sh} +
fable_cd4/*.{c,md,sh,gdb,txt}. +49 files / 460K.
- Now preserved: the flagship func_80133CD4 crack + its gdb oracle (§45's cited
worked example); the byte-verified pf*.c regression ladder (the seeds' own
Method/reproducibility section cites it: pf2 78, pf_c2 30, pf_d1 35, pf_h1 280);
the dump.sh/mon*.sh RTL harnesses; the banked giants' drafts (80135480, 80163EC8,
80166994).
- Still ignored (regenerable via dump.sh, R33): d_pf*.i.*, *.s, dumps_m*/, and the
ILS/permuter .log files. Negative control re-verified: all 5 probes IGNORED, no
db.*.gbf staged (R23).
Lesson (R31 candidate): a doc that cites a path is an untested claim about the repo.
The §45 citation and its file were 4 days out of sync; only reading the seed for an
unrelated reason caught it. Candidate lint: cookbook path citations must resolve to
tracked files.
15 lines
818 B
Bash
15 lines
818 B
Bash
#!/bin/bash
|
|
# Produce sched1/sched2/dbr RTL dumps for a draft .c of func_801670E4
|
|
set -e
|
|
R=/home/musashi/bfm-decomp
|
|
N="$1" # path to .c
|
|
OUT="$2" # output prefix
|
|
CPPFLAGS="-lang-c -I$R/include -undef -Wall -fno-builtin -Dmips -D__GNUC__=2 -D__OPTIMIZE__ -Dpsx -D_PSYQ -D_MIPSEL -D_LANGUAGE_C"
|
|
CC1FLAGS="-quiet -O2 -G0 -mips1 -mcpu=3000 -mgas -msoft-float -fgnu-linker"
|
|
# prepend common.h if absent
|
|
if ! grep -q 'common.h' "$N"; then printf '#include "common.h"\n' > "$OUT.pre.c"; cat "$N" >> "$OUT.pre.c"; else cp "$N" "$OUT.pre.c"; fi
|
|
mipsel-linux-gnu-cpp $CPPFLAGS "$OUT.pre.c" > "$OUT.i" 2>/dev/null
|
|
$R/tools/bin/gcc-2.7.2-psx/cc1 $CC1FLAGS -dS -dR -dj -dc -dg -dl -dd "$OUT.i" -o "$OUT.s" 2>&1 | head -5 || true
|
|
echo "dumps: $OUT.i.* ; asm: $OUT.s"
|
|
ls -la "$OUT".i.* 2>/dev/null | awk '{print $NF}'
|