Add on-console GameCube test suite + devkitPPC in the devcontainer

gc_bba_test/ builds a .dol that drives the adapter over raw EXI from the
console and reports pass/fail per test on the TV, navigable with the pad.

Uses libogc's EXI API against EXI0:2 (Serial Port 1) rather than its bba
network driver: driving the register file directly gives each check its own
verdict, so a failure points at a specific register instead of at
'networking'.  Six suites - identity, registers, reset/control, EXI link
integrity (including an EXI clock-index sweep), ethernet TX/RX, SPRAM/DMA
streaming.

Encodes the hardware lessons from bring-up so the app cannot mislead:
  * the device ID is a one-shot cleared by the first NCRA reset, so it is
    reported SKIP on a re-run rather than FAIL
  * TI means the frame reached the W5100, NOT the wire - the TX test says so
  * register reads clock exactly the requested length (over-clocking
    desynchronises the next transaction)
  * TXDATA is written one byte per transaction (eff_addr auto-increments)

.devcontainer/Dockerfile gains the devkitPro gamecube-dev group.  devkitPro
publishes no .deb on GitHub, so this uses their installer script against
apt.devkitpro.org -- which is 403 from inside the running container's egress
but reachable from a host-side docker build.  Rebuild the container to get it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 10:59:37 +02:00
parent f2a721cb1f
commit ccf4eb4996
8 changed files with 934 additions and 0 deletions
+29
View File
@@ -2,6 +2,7 @@ FROM debian:sid-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
git-lfs \
sudo \
@@ -49,6 +50,34 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt
# FT2232H channel-B UART directly over libusb for bring-up diagnostics.
RUN pip install --no-cache-dir pyftdi pyserial
# ── GameCube homebrew toolchain (devkitPPC + libogc) ────────────────────────
# Needed to build the on-console BBA test app in `gc_bba_test/` into a .dol.
# devkitPro does NOT publish a .deb on GitHub -- the Debian package only exists
# in their own apt repo -- so this uses their maintained installer script, which
# adds the repo, imports the key and installs dkp-pacman. `gamecube-dev` is a
# package GROUP (devkitPPC, libogc, libfat, tools incl. elf2dol).
#
# NOTE this pulls from apt.devkitpro.org / pkg.devkitpro.org. Those hosts are
# blocked (HTTP 403) from inside the running container's network egress, but a
# host-side `docker build` reaches them fine -- which is why this lives in the
# Dockerfile rather than being installed at runtime. Adds roughly 1.5-2 GB.
RUN curl -fsSL https://apt.devkitpro.org/install-devkitpro-pacman -o /tmp/install-devkitpro-pacman \
&& chmod +x /tmp/install-devkitpro-pacman \
&& yes | /tmp/install-devkitpro-pacman \
&& dkp-pacman -S --noconfirm gamecube-dev \
&& dkp-pacman -Scc --noconfirm \
&& rm -f /tmp/install-devkitpro-pacman
ENV DEVKITPRO=/opt/devkitpro
ENV DEVKITPPC=/opt/devkitpro/devkitPPC
ENV PATH="$DEVKITPPC/bin:$DEVKITPRO/tools/bin:$PATH"
# Same /etc/profile PATH-reset problem as the venv above: login shells drop the
# ENV PATH, and devkitPro's Makefiles resolve $(DEVKITPPC)/bin from the
# environment, so export all three for login shells too.
RUN printf 'export DEVKITPRO=/opt/devkitpro\nexport DEVKITPPC=/opt/devkitpro/devkitPPC\nPATH="$DEVKITPPC/bin:$DEVKITPRO/tools/bin:$PATH"\nexport PATH\n' \
> /etc/profile.d/20-devkitpro.sh
RUN useradd -m -u 1000 -s /bin/bash vscode \
&& echo 'vscode ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/vscode \
&& chmod 0440 /etc/sudoers.d/vscode