Skip to content

Game Sources ​

All BASIC and assembler sources for the CARD library and the card games are bundled in a single zip you can download here β€” useful when GitHub access is restricted on your network.

πŸ“¦ Download CARD_Games_C64-Dev.zip β€” about 170 KB

The archive mirrors the Dev/ folder of the GitHub repository.

What's inside ​

Dev/
β”œβ”€β”€ build-d64.ps1            Main builder: tokenize .bas, write .D64
β”œβ”€β”€ extract-d64.ps1          Reverse: extract a .D64 back to .bas/.prg
β”œβ”€β”€ BlackJack/               1986 original
β”œβ”€β”€ BlackJack-it/            1986 original (Italian)
β”œβ”€β”€ Briscola/                1987 original
β”œβ”€β”€ Briscola-en/             2026 English remaster (with build.ps1/.cfg)
β”œβ”€β”€ Briscola-it/             2026 Italian remaster
β”œβ”€β”€ Poker4/                  1987 original
β”œβ”€β”€ Poker4-en/               2026 English remaster
β”œβ”€β”€ Poker4-it/               2026 Italian remaster
└── Test/                    CARD Routines 2 clipping test + capture-card tool

Each game folder typically contains:

  • *.bas β€” BASIC source (PETSCII text, listing form)
  • *.prg β€” compiled C64 binaries
  • card-symbols.prg β€” graphic data shared by every game
  • card-routines.prg β€” CARD library binary (or card-routines-clipping.prg for the 2026 update)
  • start-*.bas / start-*.prg β€” boot loader that POKEs memory protection and chains LOAD / RUN
  • build.cfg + build.ps1 (2024+ projects only) β€” declarative build manifest plus a thin wrapper around the top-level builder

Prerequisites ​

You need VICE installed. The scripts use three of its bundled tools:

  • petcat.exe β€” tokenizes BASIC text into a C64 binary
  • c1541.exe β€” creates and writes .D64 disk images
  • x64sc.exe β€” launches the emulator with the freshly-built disk

By default the scripts look for VICE at D:\App\GTK3VICE-win64\bin. Edit the $ViceDir variable at the top of build-d64.ps1 and extract-d64.ps1 to match your install path.

Building a .D64 ​

The 2024-2026 game folders ship with a per-folder build.ps1 shortcut. From inside Dev/:

powershell
# Build the English Briscola
.\Briscola-en\build.ps1

# Same thing via the top-level builder
.\build-d64.ps1 -GameFolder Briscola-en

# Build without launching VICE afterwards
.\build-d64.ps1 -GameFolder Briscola-en -NoRun

The resulting .D64 is written one level up (..\Briscola-en.D64). After a successful build, VICE is launched automatically with -autostart, so you can play immediately.

The build.cfg format ​

Each modern project has a build.cfg like this one (Briscola-en/build.cfg):

DISK_LABEL=briscola en,01
D64_NAME=Briscola-en.D64
FILE=start-briscola-en.bas,start briscola en,basic
COPY=Briscola-it\card-symbols.prg,card symbols,prg
COPY=Briscola-it\card-routines.prg,card routines,prg
FILE=briscola-en.bas,briscola en,basic
  • DISK_LABEL β€” name and disk id of the formatted disk
  • D64_NAME β€” output filename (written one level above Dev/)
  • FILE=local,disk,type β€” file in this folder; type is either basic (tokenized through petcat) or prg (copied raw)
  • COPY=path,disk,type β€” file pulled from another folder (typical use: shared card symbols / card routines)

Extracting an existing .D64 ​

To go in the opposite direction β€” pull a .D64 image apart into editable sources β€” use extract-d64.ps1:

powershell
.\extract-d64.ps1 -D64File ..\Briscola-en.D64
# or with a custom output folder
.\extract-d64.ps1 -D64File ..\Briscola-en.D64 -OutputFolder my-briscola

For each file on the disk the script:

  1. Reads the raw PRG with c1541 -read
  2. Tries to detokenize it with petcat -2 (succeeds for BASIC files, leaves binaries alone)
  3. Generates a fresh build.cfg matching the disk layout
  4. Writes a one-liner build.ps1 that re-invokes the top-level builder

A typical workflow is therefore "extract β†’ edit .bas β†’ rebuild", staying inside the same folder.

Going further ​

The Test/ folder also contains capture-card.ps1 β€” a tool that runs VICE in warp mode to screenshot every card the CARD library can draw. It's the source used to generate the Cards Gallery. The full procedure is documented in Test/capture-card.md inside the archive.

If you build a new game with CARD or fix a bug in one of the existing ones, please open a pull request on the GitHub repository β€” it remains the place to coordinate changes.

Released under the Apache 2.0 License