Skip to content

CARD Routines 2 — Off-screen clipping — 2026 ​

In 2026 a new version of the CARD ROUTINES was developed: CARD ROUTINES 2, which extends the CARD command to support off-screen coordinates with automatic clipping.

With the original CARD ROUTINES, X must be between 0 and 33 and Y between 0 and 16, so the card is always fully visible. With CARD ROUTINES 2, X can range from -6 to 39 and Y from -8 to 24, allowing cards to be drawn partially off-screen. The visible portion is automatically clipped.

CARD ROUTINES 2 is fully backward-compatible: existing programs work without any change.

Test clipping

100 random cards drawn with the new extended coordinates, some partially clipped at the screen edges.

Sources and test project ​

The annotated 6502 assembly source and a ready-to-run test project are bundled with all the other sources — see the Game Sources page for the downloadable zip and build instructions.

  • card-routines-clipping.asm — annotated 6502 assembly source (inside Dev/ in the archive)
  • Dev/Test/ — test project with 100 random cards in extended range
  • Test-clipping.D64 — ready-to-run test disk image

Released under the Apache 2.0 License