Environment Variables - cressie176/Load64 GitHub Wiki

1. Overview

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                   │
│                                                EnvironmentVariable                                                │
│                                                                                                                   │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                                                   │
│ id: integer [pk]                                                                                                  │
│ profile_id: integer [fk, required(1)]                                                                             │
│ launch_configuration_id: integer [fk, required(1)]                                                                │
│ controller_family_id: integer [fk, required(1)]                                                                   │
│ controller_id: integer [fk, required(1)]                                                                          │
│ name: text [unique(Profile), unique(LaunchConfiguration), unique(ControllerFamily), unique(Controller), required] │
│ value: text                                                                                                       │
│                                                                                                                   │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
            ╲│╱                           ╲│╱                             ╲│╱                          ╲│╱
             ○                             ○                               ○                            ○
             │                             │                               │                            │
             │                             │                               │                            │
             ○                             ○                               ○                            ○
             ┼                             ┼                               ┼                            ┼
┌────────────────────────┐    ┌────────────────────────┐      ┌────────────────────────┐   ┌────────────────────────┐
│                        │    │                        │      │                        │   │                        │
│    ControllerFamily    │    │       Controller       │      │  LaunchConfiguration   │   │        Profile         │
│                        │    │                        │      │                        │   │                        │
└────────────────────────┘    └────────────────────────┘      └────────────────────────┘   └────────────────────────┘

An EnvironmentVariable sets an OS-level environment variable when launching VICE. Variables can be defined on a Controller Family, a Controller, a Profile, or a Launch Configuration. Exactly one of the four FK fields must be set (check constraint).

Environment variables can be used to work around issues that affect specific hardware. For example, some controllers (such as the Logitech F310 in D-mode) are not detected by VICE on macOS because the underlying SDL's MFi Game Controller API fails to enumerate them. Setting SDL_JOYSTICK_MFI=0 disables MFi support and allows the controller to be detected. See VICE bug #2201 for details. You can find a list of SDL Environment Variables here.

2. Tables

EnvironmentVariable

Exactly one of controller_family_id, controller_id, profile_id, or launch_configuration_id must be set (check constraint).

Field Type PK FK Nullable Unique Description
id integer yes Surrogate primary key.
controller_family_id integer ControllerFamily.id yes The controller family this variable belongs to.
controller_id integer Controller.id yes The controller this variable belongs to.
profile_id integer Profile.id yes The profile this variable belongs to.
launch_configuration_id integer LaunchConfiguration.id yes The launch configuration this variable belongs to.
name text unique(controller_family_id), unique(controller_id), unique(profile_id), unique(launch_configuration_id) Variable name. Unique within its owner.
value text yes Variable value (e.g. "0").

3. Example

environment_variable

id controller_family_id controller_id profile_id launch_configuration_id name value
1 1 null null null SDL_JOYSTICK_MFI 0
2 null null null 1 SDL_JOYSTICK_BLACKLIST_DEVICES 0xAAAA/0xBBBB,0xCCCC/0xDDDD
⚠️ **GitHub.com Fallback** ⚠️