The configuration file¶
Preferences are stored as plain text in:
~/.jnext/jnext.conf
It is an INI file, so you can read and edit it with any text editor while
JNEXT is closed. It lives next to the other things JNEXT keeps per-user, such
as the downloaded SD-card image in ~/.jnext/sdcard/. It is the only settings
file: the debugger window's layout is stored in its [debugger] section (size
as W, H, position as X, Y while the window is detached, and attached).
A ~/.jnext/Debugger.conf left by an older version is merged into that section
the first time the new version starts, and removed. Section names are
lowercase, and a value is plain text: no @Invalid() or @ByteArray(...).
Every setting in the file can be set for a single run, without touching the file,
with --set section.key=value (for example --set startup.window_scale=2); the
Recent Files history ([recent] files), the joystick controller names
(joy1_device_name, joy2_device_name), [config] version and the debugger
window's size and position are not settings and are refused;
see what wins.
Deleting the file resets everything to defaults — that is the supported way to start over. A missing or corrupt entry falls back to its default rather than stopping JNEXT from starting.
The emulated ESP-01 is stored in the [esp] section: enabled (true/false)
and allowed_hosts (a comma-separated list, empty when no host is allowed). They are the same two settings as
the Preferences Network tab, and the persistent form of --esp and
--esp-allow. Whenever enabled is true the status bar carries an ESP cell, so
editing this file cannot put a program on the network without saying so, and
--no-esp turns it off again for one run.
The too-slow degradation policy is stored in the [startup] section as
when_slow_prefer, either audio or video. It is the persistent form of
--when-slow-prefer and of the Preferences Startup setting of the same
name; anything else in that key keeps the default rather than changing how
JNEXT degrades. audio keeps the sound card fed and lets the picture lose
frames; video shows every frame and lets the machine run slower than real
time. Both are inert on a host with headroom.
Host audio gains are stored in the [audio] section: gain_db is the master,
with gain_beeper_db, gain_ay0_db, gain_ay1_db, gain_ay2_db, and
gain_dac_db for the individual sources. Each accepts -24 through +24; an
invalid value falls back to 0 dB. An explicit matching --audio-gain-...-db
value overrides the saved setting for that run.
The Source tab's colour scheme is stored in the [source] section as colour_scheme: auto, light,
dark or borland. Anything else in that key keeps auto. It is the persistent form of the
Preferences Debugger setting and of --set source.colour_scheme.
Redefined debugger keys are stored in the [debugger_keys] section, one line
per action, for example step_over=F10. Only the keys you have changed
appear — a configuration file in which you have never touched a debugger key
has no [debugger_keys] section at all, which is what lets a future JNEXT
change a default and have the change reach you. An entry JNEXT cannot
understand is reported on the console at startup and listed at the top of the
Preferences Debugger Keys tab; the action keeps its default. The spelling
of the action names and of the key combinations is in
6.3.9.
The joystick connectors are stored in the [input] section: joy1_source and
joy2_source (sdl, keys or none), joy1_device and joy2_device (the
chosen controller's id, 32 hex digits optionally followed by #N; empty means
Automatic) and joy1_device_name and joy2_device_name (the name the menu
shows while that controller is not connected). They are the same settings as the
Input menu and the Preferences Input tab, and --joy1-device /
--joy2-device override the ids for one run. An id that is not valid is ignored
together with its name, and the connector falls back to Automatic. The same section
holds mouse_release (ctrl-alt, middle-click or esc): which gesture releases a
captured mouse, the Release captured mouse with setting of the Preferences Input tab;
--mouse-release overrides it for one run, and an unknown word falls back to ctrl-alt.
The quick screenshot is stored in the [screenshot] section: quick_dir (an
empty value means ~/.jnext/screenshots) and quick_format, either png or
scr. They are the same two settings as the Preferences Paths tab;
anything else in quick_format keeps png rather than changing what a capture
produces. Both keys are simply absent from a configuration file written by an
older JNEXT, which loads unchanged.