Config file: Difference between revisions

From Zaparoo Wiki

No edit summary
Line 1: Line 1:
The '''config file''' is the main configuration file of the [[Zaparoo Core|Core software]] service.
Where it's located depends on the [[:Category:Platform|platform]] on which the service is running. On [[MiSTer FPGA|MiSTer]], it's located in the <code>/media/fat/zaparoo</code> folder or <code>zaparoo</code> folder in the root of the SD card. The file is always called <code>config.toml</code> on every platform.
The config file is written in [https://toml.io/en/ TOML]. Be aware that although comments are supported in TOML, they will be lost if Core makes updates to this file (e.g. when adjusting settings using the Zaparoo App) and should be avoided for important information.
Any changes made to the config file while the Core service is running require the service to be restarted before changes will take effect.
== Options ==
=== Top-level ===
==== config_schema ====
==== debug_logging ====
=== audio ===
==== scan_feedback ====
=== readers ===
==== auto_detect ====
==== scan ====
===== mode =====
===== exit_delay =====
===== ignore_system =====
==== connect ====
===== driver =====
===== path =====
=== systems ===
==== default ====
===== system =====
===== launcher =====
=== launchers ===
==== index_root ====
==== allow_file ====
=== zapscript ===
==== allow_shell ====
=== service ===
==== api_port ====
==== device_id ====
==== allow_launch ====
== Example file ==
== Example file ==
<syntaxhighlight lang="toml" line="1">
An example config file with all fields filled:<syntaxhighlight lang="toml" line="1">
audio_feedback = true
config_schema = 1
debug_logging = false
debug_logging = true
 
[audio]
scan_feedback = true


[readers]
[readers]
Line 8: Line 75:


[readers.scan]
[readers.scan]
mode = "live" # or "tap" (default)
mode = 'hold'
exit_delay = 3.0
exit_delay = 3.0
ignore_system = [ "PC", "MSX" ]
ignore_system = [ 'PC', 'MSX' ]


[[readers.connect]]
[[readers.connect]]
driver = "pn532_uart"
driver = 'pn532_uart'
path = "/dev/ttyUSB0"
path = '/dev/ttyUSB0'


[[readers.connect]]
[[readers.connect]]
driver = "file"
driver = 'file'
path = "/tmp/some_file"
path = '/tmp/some_file'


[[systems.default]]
[[systems.default]]
system = "SNES"
system = 'SNES'
launcher = "SindenSNES"
launcher = 'SindenSNES'


[launchers]
[launchers]
index_root = [
index_root = [
     "/media/alt_mount/games"
     '/media/alt_mount/games'
]
allow_file = [
    '/media/fat/something.mgl'
]
]
allow_file = []


[zapscript]
[zapscript]
allow_shell = [
allow_shell = [
     "touch /tmp/tap_time",
     'touch /tmp/tap_time',
     "/media/fat/linux/mplayer something.mp4"
     '/media/fat/linux/mplayer something.mp4'
]
]


[api]
[service]
port = 7497
api_port = 7497
allow_launch = []
device_id = '4d01c19f-09ba-4871-a58a-82fb49f5b518'
allow_launch = [
    '*'
]


</syntaxhighlight>
</syntaxhighlight>

Revision as of 06:32, 22 December 2024

The config file is the main configuration file of the Core software service.

Where it's located depends on the platform on which the service is running. On MiSTer, it's located in the /media/fat/zaparoo folder or zaparoo folder in the root of the SD card. The file is always called config.toml on every platform.

The config file is written in TOML. Be aware that although comments are supported in TOML, they will be lost if Core makes updates to this file (e.g. when adjusting settings using the Zaparoo App) and should be avoided for important information.

Any changes made to the config file while the Core service is running require the service to be restarted before changes will take effect.

Options

Top-level

config_schema

debug_logging

audio

scan_feedback

readers

auto_detect

scan

mode
exit_delay
ignore_system

connect

driver
path

systems

default

system
launcher

launchers

index_root

allow_file

zapscript

allow_shell

service

api_port

device_id

allow_launch

Example file

An example config file with all fields filled:

config_schema = 1
debug_logging = true

[audio]
scan_feedback = true

[readers]
auto_detect = true

[readers.scan]
mode = 'hold'
exit_delay = 3.0
ignore_system = [ 'PC', 'MSX' ]

[[readers.connect]]
driver = 'pn532_uart'
path = '/dev/ttyUSB0'

[[readers.connect]]
driver = 'file'
path = '/tmp/some_file'

[[systems.default]]
system = 'SNES'
launcher = 'SindenSNES'

[launchers]
index_root = [
    '/media/alt_mount/games'
]
allow_file = [
    '/media/fat/something.mgl'
]

[zapscript]
allow_shell = [
    'touch /tmp/tap_time',
    '/media/fat/linux/mplayer something.mp4'
]

[service]
api_port = 7497
device_id = '4d01c19f-09ba-4871-a58a-82fb49f5b518'
allow_launch = [
    '*'
]