Commit Graph
3 Commits
Author SHA1 Message Date
magdevandClaude Fable 5 4737a5bae8 Add boxsim CLI: pure Python codec, netlist extraction, KiCad project generation
Replaces the bpj2ini.py prototype with a packaged tool. The A2F codec is now
reimplemented in Python, so neither Boxsim.exe nor a CPU emulator is needed to
decode a container; the emulator survives as a development-only oracle that the
codec is differentially tested against.

Verified:
- 134 containers decode byte-identically to Boxsim's own decoder, 270 pre-2.0
  files rejected by both implementations (tools/difftest.py --self-test)
- Default.BPJ: 22 components, 14 nets, no dangling terminal
- 22 of 22 parts resolve to library symbols; one series inferred from a
  sibling, two DC resistance deviations reported
- ERC clean and the netlist KiCad extracts from the generated sheet is an
  identical partition to the one derived from the Boxsim grid
- container build byte-identical to the host build
- 32 tests passing, ruff clean

Decode time went 69 s -> 14.5 s (binding emulator hooks to trap addresses)
-> 1.6 s (pure Python).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-29 11:10:43 +02:00
magdev eb81ca61cb Drop Eloquence sample, ignore decoded .ini artifacts
Work continues with Default.BPJ from the Boxsim distribution.
2026-09-29 09:37:53 +02:00
magdevandClaude Fable 5 adb318f57c Reverse engineer Boxsim MyIni2CK container, add bpj2ini decoder
Format: 8-byte magic, XOR layer (table-shuffled 3-LCG PRNG, seeds 123/456),
custom LZ+Huffman codec (A2F). Decompression runs the original ExpandA2F
code from Boxsim.exe under Unicorn. Decodes .bpj and .bch files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-28 19:55:19 +02:00