-
Notifications
You must be signed in to change notification settings - Fork 0
03 02 Config global_variables
This page explains global_variables, which are shared values you define once and reuse across your config.
Global variables are most useful for common folder paths.
Instead of repeating long paths many times, you define them once in one place, then reference them everywhere.
That means if a folder path changes later, you update one line instead of many.
[global_variables]
assets_path = "{usb_mount}/boosted/.boost_assets"
assets_images = "{assets_path}/images"
assets_fonts = "{assets_path}/fonts"
log_dir = "{usb_mount}/boosted/.logs"Each line is a reusable value with a name you choose.
To use a global variable in another config section, reference it like this:
{gv.<name>}
Example:
[logging]
enabled = true
path = "{gv.log_dir}/{game_file}.log"
[display]
font_path = "{gv.assets_fonts}/immortal.ttf"Sprint Boost also provides built-in values that feel like default globals.
Common built-ins include:
{usb_mount}{game_folder}{game_file}
What they mean:
-
{usb_mount}: the root mount path of your USB drive on Sprint. -
{game_folder}: the folder path where the currently loaded game ROM is located. -
{game_file}: the currently loaded game ROM filename without the extension.
Example:
- If the ROM is
/media/usb0/boosted/BurgerTime.int-
{usb_mount}=/media/usb0 -
{game_folder}=/media/usb0/boosted -
{game_file}=BurgerTime
-
You can use these directly without defining them in [global_variables], and without the gv. prefix.
Example:
[logging]
path = "{usb_mount}/boosted/.logs/{game_file}.log"Think of it this way:
- Built-ins are always provided by Sprint Boost
-
global_variablesare your own custom names that you create
global_variables is optional.
If you do not include it:
- Sprint Boost still works
- There are simply no custom global variable names to reference
- Any
{gv.<name>}reference to a name you did not define will not resolve as expected
So there is no fixed "default variable list"—you create the keys you need.
Global variables are available in config processing for:
boost_mode = "basic"boost_mode = "enhanced"
They are not relevant in pure passthrough behavior (boost_mode = "off").
[global_variables] follows normal config precedence:
- More specific config files can replace an existing key value
- New keys can be added at more specific levels
Example idea:
- Folder-level:
assets_path = "{usb_mount}/boosted/.boost_assets" - Game-level:
assets_path = "{game_folder}/custom_assets"
Result:
- That game uses the game-level
assets_path - Other games continue using the folder-level
assets_path
A clean pattern is:
- Define shared path variables at folder level
- Build logging/display/menu/play-stats paths from those variables
- Override only when one game truly needs a different path
- You can build one variable from another variable (as shown with
assets_imagesfromassets_path). - Keep variable names simple and descriptive (for example
assets_images,log_dir,stats_dir). - If a referenced variable name is misspelled, the path will not resolve the way you expect.
Continue to: