Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CPF — Console preferences

REDGUARD.CPF stores the console settings written by console save.

Overall Structure

[Signature — three ASCII bytes]
[Console options — eight 32-bit fields]
[Background palette index — one byte]
[Screen limit — one 32-bit field]

The file is 40 bytes. All multi-byte fields are little-endian.

OffsetSizeTypeNameDescription
0x003[u8; 3]signatureASCII 2.0, without a terminator
0x034u32fontFont selector; console font cycles zero and one
0x074u32shadowWritten as zero for disabled or one for enabled
0x0B4u32edit_colorGUI color index for editable text
0x0F4u32report_colorGUI color index for report text
0x134u32screen_colorGUI color index for screen reports
0x174u32paper_colorGUI color index for the solid background
0x1B4i32hex_linesNumber of lines in a hexadecimal dump
0x1F4u32paper_disabledZero selects paper artwork; one selects a solid background
0x231u8backgroundPalette index for the solid background
0x244i32screen_limitScreen limit with eight fractional bits

Loading and commands

The loader requires the signature and reads the fields in file order. It raises hex_lines to one when the stored value is below one. A zero shadow value disables shadows; a nonzero value retains the existing shadow state.

The color commands cycle their GUI color indices modulo 16. Changing the paper color also updates the stored background palette index, and is allowed only when paper artwork is disabled. console limit accepts values from zero through 300 and stores the value multiplied by 256.

Initial settings select font zero, disabled shadows, color indices zero, 13, nine and zero, 16 hexadecimal lines, enabled paper artwork, background palette index zero and screen limit zero.

See Developer console for command syntax and presentation.

External References