Page 1 of 1

Feature Request: Settings common to all INI files

Posted: Tue Nov 30, 2021 3:22 am
by keith.f.kelly
Context:
I use my MiSTer as a portable game console that I often connect to different TVs in my home, or take over to friend's houses to play on their TVs. So I connect it to a lot of different TVs (all using HDMI). I like to get the best possible picture from whichever TV I connect it to, so I use the Alt1, Alt2, and Alt3 INI files as overrides containing atrac17's custom modelines for 4x, 5x, and 6x, respectively. The problem is that the only differences I ever want between these different INI files are the video modes and scaling options. I want all other settings to always be the same across all four INI files.

Problems:
  • I must duplicate all common settings across all four INI files and manually keep them in sync.
  • I'm limited to only 3 alternate INI files.
  • I can't give the alternate INI files helpful names.
  • I can't use handy menu-driven Scripts to make changes to any of the alternate INI files.
Proposal:
Let's eliminate the current system of alternate INI files, and replace it with something better. We can extend the single INI file to support named groups of override settings, like this:

Code: Select all

[MiSTer] ; global defaults
global_one=1
global_two=2
global_three=3

[Minimig] ; core defaults
minimig_one=1
minimig_two=2
minimig_three=3

[MiSTer.Alt1] ; global overrides for group named 'Alt1'
global_three=42

[Minimig.Alt1] ; core overrides for group named 'Alt1'
minimig_three=69
The existing single line in the OSD that shows hard-coded names (`Main`, `Alt1`, `Alt2`, `Alt3`) would be replaced by a single line that displays the currently-chosen settings group. The user can press the OK button on that line to be shown a list of all available settings groups to choose from. The default (unnamed) group can be automatically shown as `<Default>`, which always appears first in the list.

In the example above, if the user had the `<Default>` group selected and launched Minimig, the following settings would be applied:

Code: Select all

global_one=1
global_two=2
global_three=3
minimig_one=1
minimig_two=2
minimig_three=3
But if the user instead had the `Alt1` group selected when they launched Minimig, the following settings would be applied:

Code: Select all

global_one=1
global_two=2
global_three=42
minimig_one=1
minimig_two=2
minimig_three=69
Advantages:
  • No limit on the number of alternate settings groups.
  • No need to duplicate settings or manually keep them in sync across groups.
  • I can give the groups my own names that have clearer meaning to me.
  • The existing menu-driven Scripts for changing the main INI file don't need to be changed immediately.
  • But later, they can be improved easily enough by just asking which settings group to change.