For the complete documentation index, see llms.txt. This page is also available as Markdown.

Strings, images, and ADT records

One string and a string array

const string STATUS = "READY";
const string MODE_LABELS[] = { "OFF", "STANDARD", "ALTERNATE" };

Image record

const image ICON = {
    8, 8,
    0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF
};

For width w and height h, supply exactly ceil(w*h/8) pixel bytes after the two dimensions.


Adaptive-trigger record

The 11 positions are MODE, START, FORCE1, FORCE2, STRENGTH_LOW, STRENGTH_MID, STRENGTH_HIGH, UNK1, UNK2, FREQ, and UNK3, in that order.

adt-record.gpc
const ps5adt ADT_PROFILE = {
    PS5_ADT_CR, // 0: mode
    0,          // 1: start
    128,        // 2: force 1
    128,        // 3: force 2
    64,         // 4: low strength
    128,        // 5: mid strength
    192,        // 6: high strength
    0,          // 7: unknown/reserved 1
    0,          // 8: unknown/reserved 2
    100,        // 9: frequency
    0           // 10: unknown/reserved 3
};

main {
    adt_setx(PS5_R2, addr(ADT_PROFILE));
}

A ps5adt record is exactly 11 bytes. Preserve the unknown/reserved fields from a known-good record. addr is a compiler address form, not a general pointer.

Last updated