DirectOutputR1
DirectOutput framework R1 for virtual pinball cabinets.
|
Go to: Overview |
The DirectOutput framework supports the use of the legacy LedControl.ini files as well as the extended DirectOutputConfig.ini files as generated by the Ledwiz config tool to control the cabinet outputs. Since this framework supports the use of more than one output controller/LedWiz, the use of more than one such file can be used.
To facilitate the use of the framework, the auto config function will automatically load ini files and select a table config from the data based on the RomName, if no xml table config can be found. But even if a xml table config file is available is is possible to use the directoutputconfig.ini/ledcontrol.ini configs together with xml table configs by setting the right option in the xml table config.
If you dont have a directoutputconfig.ini file for your cabinet, it is best if you go to the LedWiz ConfigTool Website and create a file matching your cabinet.
LedControl.ini files which worked for the legacy ledcontrol.vbs solution are working in DOF too and will generally create the same effects as the ledcontrol.vbs, but you might notice some small differences since the timeing behaviour of DOF is completely different from the old solution (DOF is much, much faster).
section inifiles_howitworks How it works
Since both types of supported ini files, do only specify the effects which are to be applied on certain outputs, but contain no information on the toys to be used, the DirectOutput framework uses a special type of toy to map the output definitions in the ini files to outputs resp. to the connected toys. This special type of toy is called LedWizEquivalent. It is basically a list of 32 outputs, which typically all belong to the same output controller, and a number specifying a the number of the virtual output controller. If necessary it is also possible to mix outputs of several output controllers in one LedwizEquivalent toy.
When configurations from ini files are to be used, the framework is matching the ini files against the LedWizEquivalentToys by their numbers and uses the output definitions of the toy, to determine which outputs are to be used for which column in the ini file. For these outputs the frameworks checks next if a matching toy has already been configured for those outputs. If a matching toy does already exist, it will be used, if no toy is found DOF will automatically create a toy of a matching type (RGBAToy or AnalogaAlphaToy). These toys are then used as targets for the effects specified in the columns of the ini files.
Once the toy to be used have been determined the DirectOutput framework will setup the effects for those toys based on the settings found in the columns of the ini file. Deppending on the settings one or several effects are used to create the desired results. Please read the paragraph on Setting parameters and the page on Effects for more information.
Depending on the settings in the global config file, the framework will either load the ini files specified in the global configuration or it will try to detect the ini files automatically.
If entries for ledcontrol files exist in the global config (see global config documentation), the framework will use those files for configuration and check only these files for table settings.
If the global config doesn't specify any ini files, the system will go into automatic configuration mode, in which it tries to detect and load global config files automatically.
In auto config mode the DirectOutput framework tries to locate the files in the following locations:
DOF will check each of these directories for ini files containing configurations. These files can have the following names:
Based on the loaded files, the system will configure the DirectOutput framework.
If auto configuration is used (typical if no table config file is available), the framework requires the ini files to match as specific naming and numbering system so they can be detected and used automatically. If more than one ini file is used, the files have to be numbered. Valid names are DirectOutputConfig.ini resp. DirectOutputConfig{Number}.ini or LedControl.ini resp. LedControl{Number}.ini. Using DirectOutputConfig.ini is the recommanded naming schema.
The numbers in the filenames (1 is assumed if no number exists) are used to match the files with the LedWizEquivalentToys, which are in turn used to determine the outputs resp. toys to be configured by the ini files.
Files having a number, which does not match any LedWizEquivalent toy are ignored in the configuration process.
Instead of using the automatic detection of ini files, it is also possible to specify the ini files to be used in the global configuration of the framework. Each entry for a ini file consists of the path and name of the file and a number specifying which LedWizEquivalent toy should be configured by the ini file.
If at least one ini file is specifiy in the global config, the framework will no do any automatic ini file detection.
For ini files specified in the global config any filename can be used. The restriction on filesnames which exists for automatic config does not exist here.
The DirectOutput framework is not capable of doing anything without a cabinet config. For detailed information on this topic please read the page on Cabinet Configuration, since the following paragraphs only contain a few details which are relevant when it come to config through ini files.
A cabinet config file can contain any number of LedWizEquivalent toys to control any number of output controllers. If cabinet auto configuration is used, the framework will automatically generate LedWizEquivalent toys for the output controllers which are automatically detected.
If active (typically if no cabinet config file exists), automatic cabinet configuration numbers the detected and created output controllers resp. their related LedWizEquivalent toys as follows:
Instead of relying on the automatic cabinet configuration, you can also specifiy your own cabinet config for the use with ini files.
To be usable for the ini file configration system of the framework, the list of toys in the cabinet must contain one or several LedWizEquivalent toy objects. Normaly the outputs of a LedWizEquivalent toys will point to the outputs of a single output controller, but you are free to point them to any other output of any output controller configured in your system (e.g. you could use outputs of 2 different LedWiz controllers in one LedWizEquivalent toy).
When ini file data is used for the Table configuration, the number of the LedWizEquivalent toy is used to match to the correct ini file.
If a cabinet config file exists, the framework normally no do any automatic detection of output controllers and will no create any LedWizEquivalent toys automatically.
The content opf the ini files is a bit hard to read and understand. The following paragraphs try to explain the most importants points.
The ini files are also quite hard to edit manually. Therefore the best option to get your own settings, is to use the LedWiz ConfigTool Website. If you create your own settings, it is highly recommended that you use the LedControlFileTester.exe to check if your files can be parsed.
The first section in a directoutputconfig.ini file is the Colors section. It starts with the header [Colors_DOF] and a empty line following the header. After the header one or several colors are specified by a name and the brighness of 3 color components (red, green, blue) or 4 color components (red, green, blue, alpha). The values of the components have a range of 0 (off resp. fully transparent for alpha) to 48 (max brightness resp. fully opaque for alpha). For color specifications without a alpha component, alpha will be set to 0 (transparent) if all components are set to 0 (resulting in black). All other definitions will have a alpha value of 255 (fully opaque).
A colors section might looks as follows:
The most important section in a directoutputconfig.ini file is the [Config DOF] section. It contains the effect definitions for the various tables.
Each line in this section contains the definition for a single table. The lines start with a short version of the romname of the table or a fake romname for EM tables. After the romname, there can be up to 32 columns (separated by commas) containing the settings for every output of a ledwiz resp. the internal representation of a ledwiz (Column 1 is output 1, column 2 is output 2 and so on).
Every column can contain any number of definitions how the framework should control the output. If more than one definition exists for a column, these definitions have to be separated by forward dashes (/).
The following definitions can be used to specifiy the output behaviour of the physical outputs. Definitions can consist of up to three parts each containing one setting separated by a space.
The config section of a ini file might looks like this:
The first part of a setting for a column must always be one of the following:
The second and following parts can contain the following:
The package of the DirectOutput framework does also contain a small tool named LedControlFileTester.exe which can be used to test wether the contents of a directouput.ini resp. ledcontrol.ini file can be read and understood be the DirectOutput framework.
The tool can by started directly with a double click like any other program, but it can also be used from the command line.
For command line usem you have to specify a single parameter with the name and path to your config file:
If the file is OK, the tool will output a small notification message in the command window. If there are problems in the ledcontrol file, the tool will open a window where you can see the messages returned by the ledcontrol file parser.