/reference/index.gpc
Cronus Zen GPC language reference
Syntax, execution, controller I/O, persistent state, combos, device APIs, and debugging — concise pages that cite official Cronus docs.
- Topics
- 19
- Named terms
- 99
- Format
- Static + typed
Language manual
Browse GPC reference topics
Start with script structure and execution, or jump directly to a function family. Editorial walkthroughs remain in the Articles section.
Language
7 topicsGPC script structure and syntax
How a Cronus Zen .gpc file is organized, from compile-time declarations through init, main, combos, and functions.
Open referenceDefinitions and constants in GPC
Use define declarations and built-in identifier constants without confusing textual names with runtime variables.
Open referenceThe GPC data section
Store compact read-only byte data and retrieve it with the official dbyte, dchar, and dword accessors.
Open referenceGPC variables and arrays
Understand signed 16-bit runtime values, global storage, local scope, initialization, and safe array indexing.
Open referenceGPC operators and control flow
Build conditions and loops with comparison, logical, arithmetic, assignment, if, else, while, for, break, and continue.
Open referenceUser functions in GPC
Extract reusable synchronous calculations while respecting parameter, return, recursion, and combo-only timing rules.
Open referenceMath and bit functions
Use the official integer math helpers and verified bit-field functions within GPC numeric limits.
Open referenceExecution
3 topicsinit and main execution model
Know what runs once, what loops, and why blocking or one-time work belongs in the correct execution block.
Open referenceGPC combos, wait, and call
Author timed first-level combo steps with legal wait durations and compose sequences with combo-only call.
Open referenceStarting, stopping, and testing combos
Control named combo instances from main and avoid restarting an active sequence every loop.
Open referenceInput and output
3 topicsRemap and unmap declarations
Declare static controller remaps and disabled outputs before runtime, and distinguish them from per-frame set_val logic.
Open referenceController input and output functions
Read current, physical, and prior values; detect transitions; write outputs; and understand when script changes affect later reads.
Open referenceConsole output and trace channels
Identify the output console, write controller output, block a Zen output cycle, and observe values through TRACE channels.
Open referenceState
1 topicsDevice APIs
4 topicsDevice and runtime functions
Use the verified runtime, slot, control-button, VM timing, polar output, Zen LED, and clamp device APIs.
Open referenceCronus Zen OLED functions
Draw pixels, lines, rectangles, circles, characters, and strings with the official Zen OLED functions.
Open referenceKeyboard and mouse functions
Read supported keyboard and mouse state and write translated output using current Zen identifiers and routing rules.
Open referenceLED and rumble functions
Provide visible or haptic status feedback while respecting controller support and current Zen function details.
Open referenceTooling
1 topicsFunction directory
Find named GPC functions and commands
This catalog is an orientation index, not a substitute for version-specific signatures. Follow a term to its topic, then verify exact parameters in the linked official documentation.
maininitcombofunctiondefineTRUEFALSEPVAR_*SPVAR_*datadbytedchardwordremapunmapintint[]maininitget_rtimeifelseelse ifwhiledo whileforbreakcombowaitcallfunctionreturnget_valget_ivalZenget_lvalset_valevent_pressevent_releaseget_ptimeget_controllerget_batteryget_brtimeZenget_consoleset_valblock_all_inputsZenTRACE_1..TRACE_6ps4_authtimeoutPlusoutput_reconnectionPlusoutput_protocolPlusget_pvarset_pvarPVAR_*SPVAR_*combo_runcombo_runningcombo_stopcombo_restartcombo_suspendcombo_suspendedcombo_current_stepZencombo_step_time_leftZencombo_stop_allZencombo_suspend_allZencombo_resumeZencombo_resume_allZenget_rtimeget_slotload_slotget_ctrlbuttonvm_tctrlset_polarZenset_rgbZenset_hsbZenclampZenabsinvisqrtpowrandomZenset_bitclear_bittest_bitget_bitsset_bitscls_oledZenpixel_oledZenline_oledZenrect_oledZencircle_oledZenputc_oledZenputs_oledZenprintfZenget_keyboardZenget_modifiersZenget_mkZenset_mkZenset_ledget_ledset_ledxget_ledxreset_ledsget_ps4_lbarZenset_ps4_lbarZenget_rumbleset_rumbleblock_rumblereset_rumbleset_rgbZenset_hsbZenmainTRACE_1..TRACE_6set_val