goldbox.icons

Combat icons: the shared table at $4BE0 in SAVEDGAME0.

Eight entries of 36 bytes, one per character slot, ending exactly at $4D00 where slot 0 begins. Each entry splits cleanly in half:

+0

+18 .. +35 18 colour values – one per character cell, C64 colours 0-15

Established by having Donald change every character’s icon in-game and diffing (the combat-icon edits, docs/50-experiments.md). MAGNUS changed only bytes 18-35, all of them in the range $00-$0F: a colour-only change. ROLAND and LADY KATHERINE changed both halves. Nothing outside $4BE0-$4CFF moved.

The same 36 bytes appear at record offset 0x220 in an exported .chr, which is why an export carries its icon while a save slot does not.

Functions

icon_for_slot(save0_payload, slot)

icon_pixels(icon, charset)

Both poses as a grid of C64 colour indices, [y][x].

load_icon_charset(disk)

The glyph bitmaps the combat icons are drawn from.

Classes

Icon

Icon(raw: 'bytes')

class goldbox.icons.Icon[source]

Bases: object

Icon(raw: ‘bytes’)

__init__(raw)
Parameters:

raw (bytes)

Return type:

None

property colour_names: list[str]
property colours: bytes

The 18 colour values, one per cell.

property palette: list[str]

The distinct colours used, which is what an editor would offer.

raw: bytes
property shape: bytes

The 18 screen codes that draw the icon.

goldbox.icons.icon_for_slot(save0_payload, slot)[source]
Parameters:
Return type:

goldbox.icons.Icon

goldbox.icons.icon_pixels(icon, charset)[source]

Both poses as a grid of C64 colour indices, [y][x].

Pure data – no Qt, no image library – so the renderer can be tested and the same function serves the editor, a PNG dump and a terminal preview.

Parameters:
Return type:

list[list[int]]

goldbox.icons.load_icon_charset(disk)[source]

The glyph bitmaps the combat icons are drawn from.

Parameters:

disk (goldbox.d64.D64 | str)

Return type:

bytes