A card kept in a host folder now lists its files in the order they were
created (the host's creation time where it keeps one, else the write time;
then the name), and a file made again keeps its place. JC2's save list
reads each slot at a fixed position after icon.sys and the three icons, so
an alphabetical listing showed every slot empty. BOZO_TRACE_MC also logs
each read's size and buffer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceMcGetDir("FOLDER/*") with no FOLDER answered 0, which a game reads as a save
folder with nothing in it: SCTPT2 then reports its system data as corrupt
instead of missing. A continued listing past its end still returns 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceMcInit, GetInfo, GetDir and Sync answered as the reference did (results via sceMcSync, -1 for a new card after
init, '.' and '..' at the deterministic date, -4 for a missing file); Mkdir, Open, Read, Write, Close for the save
path, unit-tested (tests/libs) but not checked against the reference: the save run has no call log yet (docs section
7 says what recording it would settle). bozo-run --card-dir backs the cards with host folders.
boot and match1p with every batch A library native: 293,586 and 11,119,646 calls, 0 divergences, every frame and
record matching. docs/specs/libraries.md sections 7-9, PLAN.md and tools/run/README.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
runtime/libs (bozo/libs): native functions bound by the game's symbol names, on a Guest that journals every write.
bozo-run --native checks each native call against its record (result registers, every byte written, cycles,
operations) and keeps native state in step with the calls the log still answers.
libc: memcpy, memset, strlen, strchr, strcpy, strcmp, strncat, sprintf, printf, malloc/free (the reference's heap:
16-byte first fit from SetupHeap's result, no headers; the reference's libmpeg takes 0x600 per sceMpegCreate),
rand/srand (the reference's 64-bit LCG, not the ELF's newlib rand). libm: sqrt, __ieee754_rem_pio2f (the reference's
single-step reduction), __kernel_sinf/cosf (the Universal CRT's sinf/cosf of x + y; open point L1 elsewhere).
boot: 242,588 calls native, match1p: 10,840,985, 0 divergences; both still match every frame and record.
docs/specs/libraries.md sections 1-3.
Co-Authored-By: Claude Opus 5.5 <[email protected]>