GPC: An Introduction

What is GPC?

GPC is a C-based language designed to enhance your gaming experience through personalized MACROs on DEMAND (aka M.O.D.s).

Used to program the Cronus Zen & CronusMAX devices, it works by enabling the use of third-party controllers and input devices on consoles for which they were not originally designed. It also allows to automate actions in games, such as rapid fire or combo moves.

How it Works



GPC scripts are loaded onto the Cronus device using the Zen Studio Compiler, and when the script is running, it interprets gamepad input, then modifies it according to the script's instructions, and then sends the modified output to the console using your favorite controller or mouse. This can include simulating button presses, analog stick movements, and other controller-based actions.

The Zen Studio Compiler
The Zen Studio Compiler


Core Features

  • Intuitive Commands: The command structure is intuitive, allowing those new to programming to understand and use the language with relative ease.
  • C Language Syntax: Borrowing its basic syntax from C, GPC provides a familiar environment for those with experience in C programming, such as operators, variables, and control structures such as if, while, and for.
  • Functions: Core functions such as init{} and main{} are necessary, with init{} running once when the script starts, and main{}, the core of the script, looping continuously as long as the script is running.
  • Event Handlers: These respond to specific events, like event_press{} and event_release{} for button presses and releases.
GPC EXAMPLE - RAPID FIRE


32-bit Support

  • Enhanced Memory and Precision: The introduction of 32-bit support means scripts can handle more memory and perform more precise calculations. This is particularly advantageous for M.O.D.s that require accurate input adjustments like Anti-Recoil or Aim Assist.
  • Value Representation: A 16-bit system allows for 2^16 different values, while a 32-bit system greatly expands this to 2^32 possible values. This capacity allows for a more extensive range of data to be processed and manipulated.
  • Compiler Settings: Zen Studio, the integrated software environment for Cronus Zen, defaults to 32-bit compilation for enhanced capabilities, though it retains the ability to compile 16-bit scripts for compatibility with older scripts.

Bytecode and the Virtual Machine

  • Bytecode Compilation: GPC is compiled into bytecode, which is the low-level code that the Cronus devices execute. This compilation is done by the built-in compiler within the Zen Studio software.
  • Virtual Machine (VM): Cronus devices run a VM that interprets bytecode. This VM is tailored for processing and modifying game controller signals before they reach the console.
  • Optimized Architecture: The VM operates as a stack machine, meaning it works with a data structure called a stack. It is fine-tuned to handle controller inputs and outputs efficiently, ensuring real-time response without lag.
  • CPU Load Management: Keeping the CPU load below 80% is crucial to prevent output delays to the console, which is a significant consideration for script developers.

Optimization and Error Handling

  • Streamlined Error Checking: The error checks performed by the Cronus VM are minimal and limited to essential ones, contributing to its speed and efficiency.
  • Developer Awareness: It's crucial for programmers to understand the GPC's limitations and fundamentals to develop efficient scripts that do not overload the system and cause performance issues.

New to Scripting?

The GPC language is designed with simplicity in mind, borrowing elements from the C programming language to offer you an intuitive and straightforward scripting journey.

With a little practice and exploration, you'll soon be able to craft your own scripts that will redefine your gaming capabilities.

  • Free Downloads: Download free scripts from the GPC Library and modify them to learn how they work. You should also visit The M.O.D. Library for source code examples of the most popular M.O.Ds.
  • Step-by-Step Learning: Begin with simple button remapping to get the hang of scripting basics.
  • Resources at Your Fingertips: Leverage extensive documentation, tutorials, and a library of scripts from to guide your learning process.
  • Community Engagement: Join discussions in the Cronus Community Forums & Discord to exchange ideas, get help, and find inspiration.
  • Gradual Progression: As you grow more comfortable, move on to scripts that involve conditional logic and handle more complex sequences.


We have no control over GPC scripts that are shared by members of the community to the GPC Library, Forums, Discord, and other places. Therefore, we strongly recommend that you read any release notes provided with any script to make sure it is safe to use with the latest online multi-player games. If there are no release notes, use with extreme caution.

For Advanced Developers

Developers with an understanding of stack machines and performance optimization can create sophisticated scripts that can handle complex in-game scenarios, leveraging GPC's advanced features to push the boundaries of what's possible with gaming M.O.D.s.

  • Complex Logic Handling: Craft scripts that react dynamically to various in-game situations, providing a competitive edge.
  • Timing and Precision: Fine-tune the timing of actions, ensuring that your combos and moves execute flawlessly.
  • Detailed Input Manipulation: Control the game at the most granular level, customizing how every press and movement is registered.
  • Memory Management: Utilize the device’s memory for sophisticated state management, keeping track of game progress or player status.
  • Leveraging 32-bit Power: Embrace the vast capabilities of 32-bit scripting for larger, more complex, and more accurate scripts that make gaming more immersive.

Conclusion

GPC scripting by Cronus is a versatile and powerful tool in the realm of game controller customization, offering both broad usability for beginners and robust, detailed control for veteran programmers. With its C-like syntax, advanced 32-bit support, and efficient bytecode execution on a specialized VM, GPC stands as a critical component for anyone looking to enhance their gaming experience through the Cronus devices.