← ClaudeAtlas

zx-graphics-assetslisted

Turn ordinary images into ZX Spectrum graphics assets: convert a PNG/JPG into a 6912-byte .scr loading screen, slice artwork into 8x8 UDGs/sprites (for BASIC DATA, Z80 DEFB tables or C arrays), and tame the Spectrum's two-colours-per-cell attribute / colour clash. Use this WHENEVER the user wants to make a Spectrum loading screen, convert or import an image to .scr, generate UDGs or sprite data from a picture, understand the non-linear display-file pixel addressing, encode the attribute byte, or fight colour clash when bringing real images onto a Spectrum. It bundles a working Pillow-based converter (scripts/png2scr.py) and a sprite extractor (scripts/sprite_extract.py). Reach for this skill even if the user only says ".scr", "loading screen", "Spectrum image", "UDG from picture" or "colour clash". Also trigger on Polish phrasings like "przerob obrazek na ekran spectruma (.scr)", "wygeneruj UDG/sprite z obrazka", "zrob loading screen na spectrum", "jak ominac colour clash / atrybuty 8x8".
dtz-labs/zx-skills · ★ 0 · Data & Documents · score 72
Install: claude install-skill dtz-labs/zx-skills
# ZX Spectrum graphics assets (images → .scr, sprites, UDGs) This skill converts images into the formats the ZX Spectrum actually uses, and explains the byte-level rules so the output is correct rather than sliced or mis-coloured. It bundles **runnable converters** — you don't hand-pack bytes. Two jobs: 1. **Full-screen images → `.scr`** (a 6912-byte loading screen). Use `scripts/png2scr.py`. 2. **Artwork → 8×8 cell data** (UDGs for BASIC, sprite tables for asm/C). Use `scripts/sprite_extract.py`. The hard parts are two facts about Spectrum video, both covered in depth in the references: the pixel display file uses a **non-linear address layout**, and colour is stored **per 8×8 cell with only two colours each** (colour clash). This skill stays consistent with the screen/attribute model documented in the `zx-spectrum-basic` skill's `references/graphics.md` — read that for the BASIC side (PLOT/DRAW, UDGs, ATTR). ## The .scr format in one screen A `.scr` is a raw dump of screen memory, **6912 bytes**: - **6144 bytes** pixel display file (loads to `0x4000`) — 1 bit/pixel, 256×192, bit set = ink. **Non-linear** layout (see below). - **768 bytes** attribute file (loads to `0x5800`) — 1 byte per 8×8 cell, 32×24, linear. **Non-linear pixel addressing.** For pixel `(x, y)`, `x` 0–255, `y` 0–191, the byte offset inside the 6144-byte region and the bit within it are: ``` third = y >> 6 # which vertical third: 0, 1, 2 char_row = (y >> 3) & 7 # char