ccf4eb4996
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>
72 lines
2.4 KiB
Makefile
72 lines
2.4 KiB
Makefile
#---------------------------------------------------------------------------------
|
|
# re-bba-rb on-console test suite — GameCube (.dol), devkitPPC + libogc
|
|
#
|
|
# make build gc_bba_test.dol
|
|
# make clean
|
|
#
|
|
# Needs devkitPro with the `gamecube-dev` group installed (DEVKITPPC set).
|
|
# Run the .dol from Swiss (SD Gecko / SD2SP2 / USB Gecko) on a console with the
|
|
# re-bba-rb adapter in Serial Port 1.
|
|
#---------------------------------------------------------------------------------
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
$(error "DEVKITPPC is not set. Install devkitPro's gamecube-dev group, or rebuild the devcontainer.")
|
|
endif
|
|
|
|
include $(DEVKITPPC)/gamecube_rules
|
|
|
|
TARGET := $(notdir $(CURDIR))
|
|
BUILD := build
|
|
SOURCES := source
|
|
DATA := data
|
|
INCLUDES :=
|
|
|
|
CFLAGS := -g -O2 -Wall -Wextra $(MACHDEP) $(INCLUDE)
|
|
CXXFLAGS:= $(CFLAGS)
|
|
LDFLAGS := -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
|
|
|
LIBS := -logc -lm
|
|
LIBDIRS :=
|
|
|
|
#---------------------------------------------------------------------------------
|
|
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
|
#---------------------------------------------------------------------------------
|
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
|
export DEPSDIR := $(CURDIR)/$(BUILD)
|
|
|
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
|
CXXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
|
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
|
|
|
export LD := $(CC)
|
|
export OFILES := $(CFILES:.c=.o) $(CXXFILES:.cpp=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
|
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
|
-I$(CURDIR)/$(BUILD) -I$(LIBOGC_INC)
|
|
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) -L$(LIBOGC_LIB)
|
|
|
|
.PHONY: $(BUILD) clean
|
|
|
|
$(BUILD):
|
|
@[ -d $@ ] || mkdir -p $@
|
|
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
|
|
|
clean:
|
|
@echo clean ...
|
|
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol $(OUTPUT).dol.map
|
|
|
|
#---------------------------------------------------------------------------------
|
|
else
|
|
|
|
DEPENDS := $(OFILES:.o=.d)
|
|
|
|
$(OUTPUT).dol: $(OUTPUT).elf
|
|
$(OUTPUT).elf: $(OFILES)
|
|
|
|
-include $(DEPENDS)
|
|
|
|
endif
|
|
#---------------------------------------------------------------------------------
|