- Xevious (U): Promoted from _wip/NROM/Xevious (U)/ to NROM/Xevious (U)/
- Pass 3 complete: 34.5% code coverage, 143 semantic entry points,
4 named data tables, ~20 semantic ZP aliases
- NROM mapper 0, 32 KB PRG, 8 KB CHR, horizontal mirroring
- Zanac (U): Promoted from _wip/UNROM/Zanac (U)/ to NROM/Zanac (U)/
- Pass 3 complete: 34.5% code coverage (bank 7 only), 133 semantic
entry points, 26 named data tables, 14 semantic ZP aliases
- UNROM mapper 2, 128 KB PRG (8 banks), no CHR
- Bank 7 fixed at CPU -; banks 0-6 switchable at 000-
- Bank 7 assembled separately as prg.07.s with .org
Both projects build byte-identical. Updated root README.md inventory,
per-project details, and WIP.md accordingly.
Move Zanac (U) to UNROM/ mapper directory
Zanac (U) is a UNROM (mapper 2) game, not NROM (mapper 0). Move it to
the correct mapper directory and update README.md and WIP.md references
accordingly. Update project counts in WIP.md (857->856 total, UNROM
98->97 projects).
Promote Mermaids of Atlantis (U) from _wip/ to MAPPER8/
Additional cleanup of Mermaids of Atlantis
117 lines
3.2 KiB
Makefile
117 lines
3.2 KiB
Makefile
# Top-level build Makefile for NES disassembly projects
|
|
# Builds every project under the mapper directories at once.
|
|
|
|
MAPPERS := NROM AOROM CNROM MMC1 MMC3 MMC5 UNROM MAPPER8
|
|
|
|
.PHONY: all clean $(MAPPERS) help
|
|
|
|
all:
|
|
@status=0; \
|
|
GREEN='\033[32m'; RED='\033[31m'; BOLD='\033[1m'; RESET='\033[0m'; \
|
|
passed=""; failed=""; count=0; fcount=0; \
|
|
for m in $(MAPPERS); do \
|
|
for d in "$$m"/*/; do \
|
|
[ -d "$$d" ] || continue; \
|
|
project="$${d%/}"; \
|
|
if [ -f "$$project/Makefile" ]; then \
|
|
echo "=== Building $$project ==="; \
|
|
count=$$((count + 1)); \
|
|
if $(MAKE) -C "$$project"; then \
|
|
printf '%b' "$$GREEN"; \
|
|
echo ">>> $$project: Passed"; \
|
|
printf '%b' "$$RESET"; \
|
|
passed="$$passed|$$project"; \
|
|
else \
|
|
printf '%b' "$$RED"; \
|
|
echo ">>> $$project: Failed"; \
|
|
printf '%b' "$$RESET"; \
|
|
failed="$$failed|$$project"; \
|
|
fcount=$$((fcount + 1)); \
|
|
status=1; \
|
|
fi; \
|
|
else \
|
|
echo "=== Skipping $$project (no Makefile) ==="; \
|
|
fi; \
|
|
done; \
|
|
done; \
|
|
echo ""; \
|
|
echo "=== Build Summary ==="; \
|
|
echo "Total projects built: $$count"; \
|
|
printf '%b' "$$GREEN"; \
|
|
pcount=$$(echo "$$passed" | tr '|' '\n' | grep -c .); \
|
|
echo "Passed ($$pcount):"; \
|
|
echo "$$passed" | tr '|' '\n' | grep -v '^$$' | sed 's/^/ - /'; \
|
|
printf '%b' "$$RESET"; \
|
|
if [ -n "$$failed" ]; then \
|
|
printf '%b' "$$RED$$BOLD"; \
|
|
fcount=$$(echo "$$failed" | tr '|' '\n' | grep -c .); \
|
|
echo "Failed ($$fcount):"; \
|
|
echo "$$failed" | tr '|' '\n' | grep -v '^$$' | sed 's/^/ - /'; \
|
|
printf '%b' "$$RESET"; \
|
|
fi; \
|
|
if [ $$status -eq 0 ]; then \
|
|
printf '%b' "$$GREEN$$BOLD"; \
|
|
echo ">>> All projects Passed"; \
|
|
printf '%b' "$$RESET"; \
|
|
else \
|
|
printf '%b' "$$RED$$BOLD"; \
|
|
echo ">>> Some projects Failed"; \
|
|
printf '%b' "$$RESET"; \
|
|
fi; \
|
|
exit $$status
|
|
|
|
clean:
|
|
@status=0; \
|
|
for m in $(MAPPERS); do \
|
|
for d in "$$m"/*/; do \
|
|
[ -d "$$d" ] || continue; \
|
|
project="$${d%/}"; \
|
|
if [ -f "$$project/Makefile" ]; then \
|
|
echo "=== Cleaning $$project ==="; \
|
|
$(MAKE) -C "$$project" clean || status=1; \
|
|
fi; \
|
|
done; \
|
|
done; \
|
|
exit $$status
|
|
|
|
# Per-mapper targets, e.g. "make MMC3"
|
|
$(MAPPERS):
|
|
@status=0; \
|
|
GREEN='\033[32m'; RED='\033[31m'; BOLD='\033[1m'; RESET='\033[0m'; \
|
|
for d in "$@"/*/; do \
|
|
[ -d "$$d" ] || continue; \
|
|
project="$${d%/}"; \
|
|
if [ -f "$$project/Makefile" ]; then \
|
|
echo "=== Building $$project ==="; \
|
|
if $(MAKE) -C "$$project"; then \
|
|
printf '%b' "$$GREEN"; \
|
|
echo ">>> $$project: Passed"; \
|
|
printf '%b' "$$RESET"; \
|
|
else \
|
|
printf '%b' "$$RED"; \
|
|
echo ">>> $$project: Failed"; \
|
|
printf '%b' "$$RESET"; \
|
|
status=1; \
|
|
fi; \
|
|
fi; \
|
|
done; \
|
|
if [ $$status -eq 0 ]; then \
|
|
printf '%b' "$$GREEN$$BOLD"; \
|
|
echo ">>> All $$@ projects Passed"; \
|
|
printf '%b' "$$RESET"; \
|
|
else \
|
|
printf '%b' "$$RED$$BOLD"; \
|
|
echo ">>> Some $$@ projects Failed"; \
|
|
printf '%b' "$$RESET"; \
|
|
fi; \
|
|
exit $$status
|
|
|
|
help:
|
|
@echo "Usage: make [target]"
|
|
@echo ""
|
|
@echo "Targets:"
|
|
@echo " all - Build and verify every project (all mappers)"
|
|
@echo " clean - Clean build artifacts in every project"
|
|
@echo " <MAPPER> - Build only one mapper: $(MAPPERS)"
|
|
@echo " help - Show this help"
|