• GPC Guide

GPC Guide

GPC is the scripting language used by the CronusMAX PLUS.  Its commands have been designed to be self explanatory so anyone from a novice to expert programmer is able to pick it up quickly.  The basic syntax of GPC has been borrowed from C language and the basic structure and keywords will be familiar to those whom have programmed in C before.  There are of course a number of unique GPC functions that you will not find in C, however, these have also been designed in a way were they can be read and understood with ease.
GPC however is simply a human readable version of the code used by the CronusMAX PLUS.  The CronusMAX actually uses a bytecode system.  Whenever you program, build or compile a GPC script, the Compiler built in to Cronus PRO coverts the script in to bytecode prior to being sent to the device. 
Bytecode is an instruction set for the virtual machine (VM or software interpreter) which the CronusMAX PLUS runs.  Inputs for controllers are sent to the VM which then modifies them according the instruction 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 has been optimized specifically for the task of modifying and outputting controller commands to a console.
The CronusMAX 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 CronusMAX PLUS's 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.  This means it is important the programmer has a good understanding of the limitations and fundamentals of GPC when developing scripts.
CronusMAX PLUS Specifications
Real CPU: Atmel Microcontroller @ 16MHz
Real Memory: 8184 bytes
Real Flash: 130944 bytes
VM Type: Stack Machine
VM Max Bytecode: 4096 bytes
VM Stack Memory: 128 words (256 bytes)