website logo
Buy CronusGPC LibraryGamePacks (16bit)YouTubeForumsDiscord
📘Cronus Zen Guide
📗GamePacks (32bit)
📗GPC Script Guide
Navigate through spaces
📘Cronus Zen Guide
📗GamePacks (32bit)
📗GPC Script Guide
⌘K
📑GPC SCRIPTING
What's New in 32bit?
Introduction
Variables
Basic GPC Structure
Definitions
Data Section
Remapping
Const Arrays
Init Section
Main Section
Combo Section
User Created Functions
Identifiers
Flow Control
Constants
Functions
Device Functions
Remapping
Advanced Samples
API Samples
Docs powered by archbee 

GPC SCRIPTING

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.

[32bit]

GPC scripting is now available in both 16bit and 32bit flavors. Coding in 32bit allows for a much larger address space, which means more memory can be accessed and used by the GamePack. This can be hugely beneficial for programs that require large amounts of memory. Additionally, 32-bit systems also support more advanced features, enabling an infinitely higher accuracy in calculations - directly benefiting MODs such as Anti-Recoil and Aim Assist.



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



16bit: 0000 0000 0000 0000

32bit: 0000 0000 0000 0000 0000 0000 0000 0000



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.



UP NEXT
What's New in 32bit?
Docs powered by archbee 
TABLE OF CONTENTS
What is GPC?
[32bit]