Integrate Color8 with VCC Plus and document verified disk launch

This commit is contained in:
Brian Holman committed 2026-11-09 23:45:38 -07:00
1 parent e8edf6455e
commit e5049f2078
12 files changed
+366 -8

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
*.DSK binary
*.dsk binary
*.png binary
+15
View File
@@ -0,0 +1,15 @@
# Generated build products and local editor metadata.
.DS_Store
*.o
*.a
*.bin
*.BIN
*.dsk
*.DSK
!/Color8.DSK
*.lst
*.map
*.i
*.d
.vccplus/
.vscode/
BIN
View File
Binary file not shown.
+12 -8
View File
@@ -11,17 +11,17 @@ endif
# Required libraries. # Required libraries.
CARDGAME_LIB = cardgame CARDGAME_LIB = cardgame
CARDGAME_LIB_DIR = ../cardgame CARDGAME_LIB_DIR = $(patsubst %/Makefile,%,$(wildcard ../cardgame/Makefile))
# BControl is only used by the OS-9 version. # BControl is only used by the OS-9 version.
BCONTROL_LIB = bcontrol BCONTROL_LIB = bcontrol
BCONTROL_LIB_DIR = ../bcontrol BCONTROL_LIB_DIR = $(patsubst %/Makefile,%,$(wildcard ../bcontrol/Makefile))
# Main program. # Main program.
SRC = $(PACKAGE).c SRC = $(PACKAGE).c
HEADERS = HEADERS =
LIBS = \ LIBS = \
-L $(CARDGAME_LIB_DIR) -l$(CARDGAME_LIB) \ $(addprefix -L,$(CARDGAME_LIB_DIR)) -l$(CARDGAME_LIB) \
-L $(BCONTROL_LIB_DIR) -l$(BCONTROL_LIB) $(addprefix -L,$(BCONTROL_LIB_DIR)) -l$(BCONTROL_LIB)
DSK = $(PACKAGE)-$(VERSION)-$(TARGET).dsk DSK = $(PACKAGE)-$(VERSION)-$(TARGET).dsk
ROM = $(PACKAGE)-$(VERSION).rom ROM = $(PACKAGE)-$(VERSION).rom
@@ -46,8 +46,8 @@ WARNINGS = -Wfor-condition-sizes
WERROR = -Werror WERROR = -Werror
CFLAGS = --$(TARGET) $(WARNINGS) $(WERROR) $(NDEBUG) $(INTERMEDIATE) $(NO_RELOCATE) $(CARTDEF) \ CFLAGS = --$(TARGET) $(WARNINGS) $(WERROR) $(NDEBUG) $(INTERMEDIATE) $(NO_RELOCATE) $(CARTDEF) \
-DVERSION=\"$(VERSION)\" \ -DVERSION=\"$(VERSION)\" \
-I $(CARDGAME_LIB_DIR) \ $(addprefix -I,$(CARDGAME_LIB_DIR)) \
-I $(BCONTROL_LIB_DIR) $(addprefix -I,$(BCONTROL_LIB_DIR))
LDFLAGS = --$(TARGET) $(ORG) $(INTERMEDIATE) $(RAW) LDFLAGS = --$(TARGET) $(ORG) $(INTERMEDIATE) $(RAW)
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
@@ -67,12 +67,12 @@ all: $(BIN)
# The executable only depends on libbcontrol.a if targeting OS-9. # The executable only depends on libbcontrol.a if targeting OS-9.
ifeq "$(TARGET)" "os9" ifeq "$(TARGET)" "os9"
BCONTROL_DEPS = $(BCONTROL_LIB_DIR)/lib$(BCONTROL_LIB).a BCONTROL_DEPS = $(addsuffix /lib$(BCONTROL_LIB).a,$(BCONTROL_LIB_DIR))
else else
BCONTROL_DEPS = BCONTROL_DEPS =
endif endif
$(BIN): $(OBJ) $(CARDGAME_LIB_DIR)/lib$(CARDGAME_LIB).a $(BCONTROL_DEPS) $(BIN): $(OBJ) $(addsuffix /lib$(CARDGAME_LIB).a,$(CARDGAME_LIB_DIR)) $(BCONTROL_DEPS)
$(CMOC) -o $(BIN) $(LDFLAGS) $(OBJ) $(LIBS) $(CMOC) -o $(BIN) $(LDFLAGS) $(OBJ) $(LIBS)
$(DSK): dsk $(DSK): dsk
@@ -130,10 +130,14 @@ dist:
# #
.PHONY: recurse .PHONY: recurse
recurse: recurse:
ifneq ($(strip $(CARDGAME_LIB_DIR)),)
$(MAKE) -C $(CARDGAME_LIB_DIR) TARGET=$(TARGET) $(RECURSION) $(MAKE) -C $(CARDGAME_LIB_DIR) TARGET=$(TARGET) $(RECURSION)
endif
ifeq "$(TARGET)" "os9" ifeq "$(TARGET)" "os9"
ifneq ($(strip $(BCONTROL_LIB_DIR)),)
$(MAKE) -C $(BCONTROL_LIB_DIR) TARGET=$(TARGET) $(RECURSION) $(MAKE) -C $(BCONTROL_LIB_DIR) TARGET=$(TARGET) $(RECURSION)
endif endif
endif
# Automatic prerequisite generation. # Automatic prerequisite generation.
%.d: %.c %.d: %.c
+146
View File
@@ -0,0 +1,146 @@
# Pass CARTRIDGE_ROM=1 to make to position the code and data for a
# ROM cartridge.
PACKAGE = color8
VERSION = 0.1.14
TARGET = coco
ifneq "$(TARGET)" "os9"
EXEEXT = .bin
endif
# Required libraries.
CARDGAME_LIB = cardgame
CARDGAME_LIB_DIR = ../cardgame
# BControl is only used by the OS-9 version.
BCONTROL_LIB = bcontrol
BCONTROL_LIB_DIR = ../bcontrol
# Main program.
SRC = $(PACKAGE).c
HEADERS =
LIBS = \
-L $(CARDGAME_LIB_DIR) -l$(CARDGAME_LIB) \
-L $(BCONTROL_LIB_DIR) -l$(BCONTROL_LIB)
DSK = $(PACKAGE)-$(VERSION)-$(TARGET).dsk
ROM = $(PACKAGE)-$(VERSION).rom
# Compilation and linking flags.
ifdef CARTRIDGE_ROM
BIN = $(ROM)
RAW = --raw # generate raw binary instead of .BIN format
ORG = --org=C000 --data=3800
CARTDEF = -DCARTRIDGE_ROM=1
NO_RELOCATE = --no-relocate
else
BIN = $(PACKAGE)$(EXEEXT)
RAW =
ifneq "$(TARGET)" "os9" # --org not permitted when targetting OS-9
ORG = --org=2800
endif
endif
INTERMEDIATE = #--intermediate
NDEBUG = -DNDEBUG
WARNINGS = -Wfor-condition-sizes
WERROR = -Werror
CFLAGS = --$(TARGET) $(WARNINGS) $(WERROR) $(NDEBUG) $(INTERMEDIATE) $(NO_RELOCATE) $(CARTDEF) \
-DVERSION=\"$(VERSION)\" \
-I $(CARDGAME_LIB_DIR) \
-I $(BCONTROL_LIB_DIR)
LDFLAGS = --$(TARGET) $(ORG) $(INTERMEDIATE) $(RAW)
OBJ = $(SRC:.c=.o)
DISTFILES = README COPYING Makefile $(SRC) $(HEADERS) autostart.c
# Tools.
CMOC = cmoc
PERL = perl
TAR = tar
WRITECOCOFILE = writecocofile
INSTALL_LOADER = install-coco-boot-loader
XROAR = xroar
OS9 = os9 # Toolshed
all: $(BIN)
# The executable only depends on libbcontrol.a if targeting OS-9.
ifeq "$(TARGET)" "os9"
BCONTROL_DEPS = $(BCONTROL_LIB_DIR)/lib$(BCONTROL_LIB).a
else
BCONTROL_DEPS =
endif
$(BIN): $(OBJ) $(CARDGAME_LIB_DIR)/lib$(CARDGAME_LIB).a $(BCONTROL_DEPS)
$(CMOC) -o $(BIN) $(LDFLAGS) $(OBJ) $(LIBS)
$(DSK): dsk
.PHONY: dsk
ifneq "$(TARGET)" "os9"
dsk: $(BIN) autostart.bin
$(PERL) -e 'print chr(255) x (35*18*256)' > $(DSK)
$(INSTALL_LOADER) $(DSK) autostart.bin
$(PERL) -Mstrict -e 'printf qq{\r0 PCLEAR4:LOADM"%s":EXEC\r}, uc("$(PACKAGE)")' > $(PACKAGE).bas
$(WRITECOCOFILE) --ascii $(DSK) $(PACKAGE).bas
rm $(PACKAGE).bas
$(WRITECOCOFILE) $(DSK) $(BIN)
else
dsk: $(BIN)
$(OS9) format $(DSK) -ds -t80 -e -9
$(OS9) copy $(BIN) $(DSK),
$(OS9) attr -q -epe $(DSK),/$(BIN)
endif
# Loader that goes on track 34 to be executed by the CoCo DOS command.
autostart.bin: autostart.c
$(CMOC) --dos -o $@ -D'COMMAND="PCLEAR4:LOADM\"$(PACKAGE)\":EXEC"' autostart.c
# Build a ROM file. This assumes a cleaned directory.
# The -f argument is the name of the current makefile.
#
# After compiling to a raw binary (not in .BIN format), we need to pad
# the binary with null bytes to make its length divisible by 256.
# This is apparently necessary to avoid a crash in XRoar (as of 0.35).
#
.PHONY: rom
rom:
$(MAKE) -f $(firstword $(MAKEFILE_LIST)) CARTRIDGE_ROM=1 clean $(ROM)
$(PERL) -e 'print chr(0) x (256 - (-s "$(ROM)") % 256)' >> $(ROM)
# Have the XRoar CoCo 1/2 emulator run the ROM image.
.PHONY: run
run: rom
$(XROAR) -machine cocous -cart-autorun -cart $(ROM)
%.o: %.c
$(CMOC) -c $(CFLAGS) -o $@ $<
clean:
rm -f $(BIN) autostart.bin $(OBJ) $(ROM)
.PHONY: dist
dist:
$(TAR) -czf $(PACKAGE)-$(VERSION).tar.gz --transform 's,^,$(PACKAGE)-$(VERSION)/,' $(DISTFILES)
# Runs make with arguments $(RECURSION) in the library projects used by this package.
# Supports the -n (dry run) option.
# Example: make recurse RECURSION=clean
#
.PHONY: recurse
recurse:
$(MAKE) -C $(CARDGAME_LIB_DIR) TARGET=$(TARGET) $(RECURSION)
ifeq "$(TARGET)" "os9"
$(MAKE) -C $(BCONTROL_LIB_DIR) TARGET=$(TARGET) $(RECURSION)
endif
# Automatic prerequisite generation.
%.d: %.c
$(CMOC) --deps-only $(CFLAGS) $<
.PHONY: cleandeps
cleandeps:
rm -f $(SRC:.c=.d)
include $(SRC:.c=.d)
+38
View File
@@ -0,0 +1,38 @@
# Color Eights
A Color Computer card game by **Pierre Sarrazin**, based on upstream version **0.1.14**.
![Color Eights running in VCC Plus](docs/screenshots/gameplay.png)
[Download Color8.DSK](Color8.DSK) · [Original documentation](docs/UPSTREAM_README.md)
## Run
Mount `Color8.DSK` in drive 0 of a **512 KB CoCo 3 / 6809 / Disk BASIC**
setup and type `DOS`. Press **Space** at the title screen to start;
**H** opens help and **Q** quits from the card table.
## Build in VCC Plus
Open this repository’s root folder through **Develop → C Development → Open**.
Select **Release** and choose **Build Disk**. The project uses `Makefile` target
`dsk` and produces `color8-0.1.14-coco.dsk`, which launches with `DOS`.
VCC Plus’s bundled CMOC toolchain and CardGame/BControl target libraries are
required. The Makefile also supports sibling library source folders when present.
The disk build, title screen and card-table display were verified through
VCC Plus 3.5.0 build 43’s public MCP interface. A full hand and scoring were
not tested. See [validation details](docs/VALIDATION.md).
## Source and license
- Author: [Pierre Sarrazin](http://sarrazip.com/).
- [Color Eights home page](http://sarrazip.com/dev/color8.html).
- [Original 0.1.14 source archive](http://sarrazip.com/dev/color8-0.1.14.tar.gz).
- Archive SHA-256: `a98828720d91ac2b9c0939102bf5873650cd3df79323c7d6e086db9604546361`.
The source is **GPL-3.0-or-later**; see [COPYING](COPYING) and the original
notices. Target libraries retain their own terms. VCC Plus integration updates
the Makefile’s library discovery and adds project settings, a disk and screenshots.
The original Makefile is preserved as `Makefile.orig`.
See [provenance](docs/PROVENANCE.md).
+45
View File
@@ -0,0 +1,45 @@
# Source provenance
## Upstream snapshot
- Original author: Pierre Sarrazin.
- Package: color8 0.1.14.
- Source archive: <http://sarrazip.com/dev/color8-0.1.14.tar.gz>.
- Author project page: <http://sarrazip.com/dev/color8.html>.
- Archive SHA-256: `a98828720d91ac2b9c0939102bf5873650cd3df79323c7d6e086db9604546361`.
- Git import baseline: `e8edf6455ebed241edb2f5a0933ac77a238c1149`.
The first Git commit is the regular-file contents of the original release archive,
with its single enclosing package directory removed and executable modes retained.
It is an archive snapshot, not a reconstruction of upstream Git history.
The following integration commit records the VCC Plus adaptations separately.
The original README is preserved byte-for-byte in
[UPSTREAM_README.md](UPSTREAM_README.md) and at the root as `README`.
The author’s project index linked the matching archive during provenance review.
No historical HTTP receipt establishes the date of the original download; the
SHA-256 identifies the observed archive bytes, not authenticity or a license grant.
## VCC Plus integration
- The Makefile discovers optional sibling CardGame/BControl folders and otherwise
uses the installed target libraries; this avoids requiring sibling checkouts.
`Makefile.orig` is the byte-identical upstream Makefile.
- `vccplus-project.json` selects the disk build and `DOS` launch recipe.
- The verified build produces `color8-0.1.14-coco.dsk`; `Color8.DSK` is an
identically hashed copy provided under a convenient download name.
- Public documentation, build-output exclusions and actual guest screenshots
accompany the verified disk. Source notices and authored runtime data remain
intact. Generated intermediate build files are excluded from Git.
## License scope
The main application is GPL-3.0-or-later. The archive’s original `COPYING`
and source notices are retained. CardGame/BControl and other target libraries
retain their own applicable notices; this record does not relicense dependencies.
## Verification
The Release disk build and guest execution were verified through the public MCP
interface of installed VCC Plus 3.5.0 build 43. The checked-in disk and screenshots
are identified in [VALIDATION.md](VALIDATION.md), including the limits of that check.
+35
View File
@@ -0,0 +1,35 @@
Color Eights
Copyright (C) 2015-2024 Pierre Sarrazin <http://sarrazip.com/>
License: see the COPYING file.
Home page: http://sarrazip.com/dev/color8.html
Version history:
0.1.0 2015-05-31 First public release.
0.1.1 2015-06-06 Resolved warnings on some function calls.
0.1.2 2015-06-09 Fixed bug in putOrdinaryCardOnTopOfDeck().
0.1.3 2015-06-13 Added support for cartridge ROM format.
0.1.4 2015-07-05 Adapted for CMOC 0.1.8.
0.1.5 2015-07-12 Hide help/quit prompt when not relevant.
Fixed a typo in the help page.
0.1.6 2016-04-03 Restructured to make generic card game code
reusable in other games.
0.1.7 2018-04-03 Emulates PMODE 4 in a CoCo 3 mode to
approximate the artifact colors.
Converted to compile in linker mode.
Compatible with CMOC 0.1.51 (float, long, const).
0.1.8 2018-08-04 Now links with libcardgame.a as a separate project.
0.1.9 2018-09-20 Adapted for CMOC 0.1.53.
0.1.10 2018-10-04 Now using single-argument pcls().
0.1.11 2018-11-25 Now requires cardgame 0.1.8. Now compilable for the Dragon.
0.1.12 2019-06-03 OS-9 port. Requires cardgame 0.1.9.
Also requires bcontrol 0.1.1 if targeting OS-9.
0.1.13 2023-06-27 ROM image now created with CMOC's --raw option (>= 0.1.70).
bin-to-xroar-rom.pl obsolete, not distributed anymore.
Adapted to version 0.1.11 of the cardgame library.
OS-9 support is suspended.
0.1.14 2024-06-08 OS-9 support restored.
The presentation and help screen prompts now wait
for the space key specifically, the "any" key being
a mythological creature.
+46
View File
@@ -0,0 +1,46 @@
# VCC Plus validation
Verified November 9, 2026 (Mountain time; receipts continue into November 10 UTC).
## Environment and scope
- Installed VCC Plus **3.5.0, build 43**, using its public MCP project/build/playtest
interface and bundled toolchain.
- An isolated native copy retained the installed emulator code; its bundle identity
and ad-hoc signature were changed to avoid interfering with another active app.
- **Release**, **512 KB CoCo 3**, emulated **MC6809**, Disk BASIC.
- This verifies the source layout and build recipe in this repository. No host
rebuild, Xcode toolchain or alternate emulator was used for the guest check.
The build succeeded. The existing autostart loader emitted a function-pointer-to-`void *` warning at `autostart.c:73`; the main game compiled without reported warnings.
## Observed result
The disk launched with `DOS`, displayed the title screen, and accepted Space
to enter the card table. The inspected gameplay capture shows the player’s hand,
computer card count, deck and requested suit. The application itself was not
modified to produce the screenshot. No full hand, win/loss, scoring, help or quit
behavior was exercised.
The playtest was stopped cleanly. The receipt reported no disk writes and matching
initial/final disk hashes. The screenshots are actual emulator framebuffer captures,
not mockups.
- Download disk: [`Color8.DSK`](../Color8.DSK), 161280 bytes.
- Disk SHA-256: `8ec05aa84af69e0ba03a8c1501547664e1abf0349a4460311a222a9e4afe5989`.
- Main screenshot: [`screenshots/gameplay.png`](screenshots/gameplay.png).
- Initial screen: [`screenshots/running.png`](screenshots/running.png).
## Evidence identifiers
- Build: `EDE7DA7A-F25E-42F7-BDC4-F44E81135EE9`.
- Artifact: `30850FE5-DBBF-4CB8-9717-2F7380C294C8`.
- Run: `14AE7FB6-F7C3-49E1-B2A1-0A9EFC46B244`.
- Gameplay capture: machine frame `1204`; guest GIME graphics, 128 × 192,
captured as a 640 × 480 framebuffer.
Private build/run/input/capture/stop receipts supplied these identifiers. Raw logs,
access grants and machine-specific paths are intentionally excluded.
No claim is made for full application coverage, audible output, emulated HD6309,
Intel/Rosetta execution, physical Intel hardware or all supported macOS versions.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+26
View File
@@ -0,0 +1,26 @@
{
"entrySource": "color8.c",
"makefile": "Makefile",
"buildTarget": "dsk",
"cleanTarget": "clean",
"binary": "color8.bin",
"diskTarget": "dsk",
"diskImage": "color8-0.1.14-coco.dsk",
"launchMode": "disk",
"launchCommands": [
"DOS"
],
"jobs": 1,
"configurations": [
{
"name": "Debug",
"makeArguments": [
"INTERMEDIATE=--intermediate"
]
},
{
"name": "Release",
"makeArguments": []
}
]
}