Documentation

Quick wiring reference for Studio Pro exports. This section covers the 16x16 standard mode and the experimental 32x32, 16x32, and 32x16 modes.

Output Word Layout (Per Pixel)

Each pixel is exported as a 16-bit line. The bit layout is:

3 blank bits, (3x RGB1), (3x RGB2), (1 shift bit), (6 character bits)

The prefix is shown as 000 here, followed by 6 bits of RGB2 color, then 1 shift bit, then 6 character bits. Studio Pro uses 111 in 16-bit mode and 000 in legacy/8-bit mode.

For example, the character 'A' with the RGB2 color RED would be as followed:

000 100 100 1 000001
(blank, 000) (1R, 0G, 0B), (1R, 0G, 0B), (shift, 1), (character 000001)

The shift bit is used for characters that require shifting (e.g. 'a' vs 'A'). The RGB1 bits are the base color, and RGB2 is the secondary rgb color.

For more information on the character map, check the Char Map tab on the designer page.

16x16 Addressing (Standard)

Address is row-major with 4 bits per axis. The file index selects the EEPROM page, then the local address is Y[3:0] + X[3:0].

A15..A8  A7..A4  A3..A0
00000000 YYYY    XXXX

Formula: addr = (fileIndex << 8) | (y << 4) | x

32x32 Addressing (Experimental)

32x32 uses 5-bit X and 5-bit Y. The export is split into 4 banks (4 files). The top 2 bits of Y select the bank.

A15..A10 A9..A8 A7..A5 A4..A0
000000   YY     YYY    XXXXX

Bank mapping: rows 0–7 = bank 0, 8–15 = bank 1, 16–23 = bank 2, 24–31 = bank 3.

Formulas:

bank = (y >> 3)
localAddr = ((y & 0x7) << 5) | x
addr = (bank << 8) | localAddr

16x32 Addressing (Experimental)

16x32 uses 4-bit X and 5-bit Y. The export is split into 2 banks (2 files). The top bit of Y selects the bank.

A15..A8  A7..A4  A3..A0
0000000B YYYY    XXXX

Bank mapping: rows 0–15 = bank 0, rows 16–31 = bank 1.

Formulas:

bank = (y >> 4)
localAddr = ((y & 0xF) << 4) | x
addr = (bank << 8) | localAddr

32x16 Addressing (Experimental)

32x16 uses 5-bit X and 4-bit Y. The export is split into 2 banks (2 files). The top bit of X selects the bank.

A15..A8  A7..A4  A3..A0
0000000B YYYY    XXXX

Bank mapping: columns 0–15 = bank 0, columns 16–31 = bank 1.

Formulas:

bank = (x >> 4)
localAddr = (y << 4) | (x & 0xF)
addr = (bank << 8) | localAddr

PanelCode is the scripting language used in Code Designer. It draws directly into the same panel buffer used by the normal designer and export pipeline.

Syntax Basics

PanelCode uses one function call per line. Comments use Luau-style --.

-- comments
declareSize(32x32)
clear("#000000")
pixel(0, 0, red)

Canvas

declareSize(16x16|16x32|32x16|32x32) or declareSize(32, 32) resets size and clears the buffer.

clear(color) fills the panel.

Pixels & Shapes

pixel(x, y, color)

rect(x, y, w, h, color)

fillRect(x, y, w, h, color)

line(x1, y1, x2, y2, color)

Text Commands

text(content) or text(content, background?) writes real per-cell characters from (0,0), matching the normal Text tool behavior.

text(content, x, y) or text(content, background, x, y) writes at a specific position.

label(x, y, content, bg?, fg?) draws tiny bitmap text.

largeLabel(x, y, content, bg?, fg?, scale?) draws scaled bitmap text.

Custom Glyphs

defineGlyph(char, bitmap) sets a custom glyph for largeLabel.

defineGlyph("A", ["0110","1001","1111","1001","1001"])

Colors

Use #RRGGBB or named colors: black, white, red, green, blue, yellow, cyan, magenta, orange, grey, darkGrey.

Optional trailing colors default safely: text(...) background defaults to black, label/largeLabel background defaults to black and foreground defaults to white.

Errors & Bounds

Unknown functions, invalid args, and out-of-bounds draws report line/column errors. Drawing is strict: coordinates outside the active size throw errors.

Example

declareSize(32x32)
clear("#000000")
fillRect(0, 0, 32, 7, "#202020")
text("BOOT", "#101010", 0, 0)
label(2, 1, "STATUS", "#202020", "#00FF90")
rect(0, 8, 32, 24, "#404040")
largeLabel(2, 12, "OK", "#000000", "#00FF90", 2)
line(0, 31, 31, 31, "#00FF90")