Files
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

21 lines
1.7 KiB
Markdown

# Changelog
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- `boxsim` command line tool with `decode`, `extract`, `netlist` and `build` subcommands.
- Pure Python implementation of the A2F codec, so decoding no longer needs `Boxsim.exe` or a CPU emulator. Verified byte-identical to Boxsim's own decoder across all 134 containers in the distribution.
- Project model covering `#General`, `#Weiche<n>`, `#Chassis<n>`, `#Einbau<n>` and `#Schallwand<n>`, with the crossover grid decoded to an electrical netlist.
- Symbol resolver driven by Visaton's `Visatonteile.txt` catalogue, matching values numerically against the KiCad library. Infers an omitted series from a sibling part, reports DC resistance deviations, and refuses to substitute an unstocked value.
- KiCad 10 schematic generation that preserves the Boxsim grid layout, including wires, junctions, flattened derived symbols and deterministic UUIDs.
- Verification gate comparing the netlist KiCad extracts from the generated sheet against the netlist derived from the Boxsim grid, plus ERC.
- Docker image bundling the tool, the Visaton library and the parts catalogue, with a build-time check that the bundled catalogue is complete.
- Development-only oracle that runs Boxsim's own `ExpandA2F` under Unicorn, and `tools/difftest.py` to differentially test the codec against it.
### Changed
- Emulator hooks are bound to their trap addresses instead of every instruction, cutting a decode from 69 s to 14.5 s with identical output. The pure Python codec then brought it to about 1.6 s.