What is GPC?

GPC is the scripting language used by both the Cronus Zen and CronusMAX game controller protocol converters and is widely recognized as the definitive scripting language for gaming mods and macros.

Commands are designed to be self-explanatory so anyone from a novice to the expert programmer is able to quickly pick it up. The basic syntax of GPC has been borrowed from the C language and the basic structure and keywords will be familiar to those who have programmed in C before.

GPC is simply a human-readable version of the code used by the Cronus, which actually uses a bytecode system. Whenever you program or compile a GPC script, the compiler built into the Cronus software converts the script into bytecode prior to being sent to the Cronus device.

GPC scripting is now available in both 16bit and 32bit flavors. These are each individual bits, they can be 1 or 0.

16bit: 0000 0000 0000 0000

32bit: 0000 0000 0000 0000 0000 0000 0000 0000

16bit has a maximum of 2^16 possible values and 32bit has a maximum of 2^32 possible values. 

The default compiler mode of Zen Studio is now 32bit. If you wish to compile an older 16bit script (every script ever released before Cronus Zen v1.2.0), you must use the 16bit compiler.

Bytecode is an instruction set for the virtual machine (VM or software interpreter) that the Cronus runs. Inputs for controllers are sent to the VM which then modifies the signals according to the instructions set in the bytecode. This modified output is then sent to the console. The Virtual Machine is a hypothetical computer and its functions and architecture have been optimized specifically for the task of modifying and outputting game controller commands to a video game console.

The Cronus VM is a stack machine and has been optimized so it is able to send data to a console without delay. Providing the CPU load is kept below 80%, the Cronus CPU is able to carry out all the tasks assigned to it without delaying the output to the console. Part of the optimization process means error checks by the VM are kept to a minimum and to only what is necessary.

It is important the programmer has a good understanding of the limitations and fundamentals of GPC when developing scripts.