Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading config-file with --config option fails.. #1315

Closed
tbone2k-git opened this issue May 9, 2024 · 7 comments
Closed

Loading config-file with --config option fails.. #1315

tbone2k-git opened this issue May 9, 2024 · 7 comments
Assignees
Labels

Comments

@tbone2k-git
Copy link

Describe the bug
Loading a config-file with the --config command line option fails / does not load configuration correctly.
I've been fighting with the config files of WinUAE ever since, now things continue with Amiberry! o))

To Reproduce
Example with "Enable Sound"

  1. Go to sound setting, enable sound, set stereo separation to 0%.
  2. Go to configuration, save as "sound_enabled"
  3. Exit Amiberry
  4. Launch Amiberry with --config "./sound_enabled.uae" or full path to *.uae file (does not make a difference)
  5. Go to sound settings -> sound NOT enabled
  6. Go to configuration and notice that "sound_enabled" is selected (file found / was loaded it seems)
  7. Anyway, load existing "sound_enabled" config by "Load" button this time
  8. Go to sound settings -> sound IS enabled, so..
  9. Loading settings works, kind of, but not with the --conf option?

Expected behavior
I expect configuration to be loaded at startup, same as when clicking "Load".

  • OS: Debian12 on PC/x86
  • Version: Tried with v5.7 and v6.3 preview

Amiberry is a lot of fun (I guess, if I get it running correctly one day! o))
Thank you for your efforts! Have a nice day everyone!
I'm here to answer any question which might help to solve this.

@giantclambake
Copy link

I cannot recreate this here on Debian 12.5/x86-64 ... toggling sound enabled/disabled in GUI results in config.uae being saved with sound_output=normal/sound_output=0 flags set, and the emulation honors those settings, and GUI reflects changes accordingly.

@midwan - I do note however the value% for Stereo separation: is not saved to config.uae and always returns 70% ..ie; the value of sound_stereo_separation=7 is not updated with GUI dropdown selection when file saved...bug?

@midwan midwan self-assigned this May 9, 2024
@midwan
Copy link
Collaborator

midwan commented May 9, 2024

I cannot recreate this either - sound is enabled when I load the config, either from the command line or the GUI. I did notice that the stereo separation option wasn't honored when using the command line (it was through the GUI). The setting is saved correctly in the config file, however.

Keep in mind that sound will be automatically disabled if no audio output device is found during the initial enumeration. It may be something related to that, in your case @tbone2k-git

Do you have examples of other settings that behave differently when using the GUI vs the command line?

@tbone2k-git
Copy link
Author

@giantclambake

value of sound_stereo_separation=7 is not updated with GUI dropdown selection when file saved...bug?

Yes, something is wrong. Loaded by --config, this setting will stick to value 7, even if 0 is used in the config file.
When loading the config by "Click", it seems to load from the config and display the value as expected. I set the 0 manually in the config file though, not with the GUI. Once the value is visible in the GUI, it seems to save back to the config fine, it's just not loading / displaying correctly (probably same problem as with the Z2/fastmem setting)..

@midwan
Yes.. I guess there are more examples! o)

I can't really tell if after starting with --config, the sound options are autom. disabled because of "no output device".
I indeed have no audio output device currently (using RDP for my testing), the thing is, when loading the config by "click", sound options are set to "Enabled" as I expect it to be from the config saved. Could also be the GUI simply ignoring the config in the file and thereby saving wrong value?

If I load config "myconfig-defaults" manually by "Click" and save as "myconfig_click-loaded_and_saved", following lines are different:
scsi=false will switch to scsi=true in the saved config, as well as
gfx_colour_mode=16bit, which will switch to gfx_colour_mode=32bit

If I load config "myconfig-defaults" with --config and save as "myconfig_--config-loaded_and_saved", following lines are different:
sound_output=normal switches to sound_output=none OR
sound_output=interrupts switches to sound_output=none
sound_stereo_separation=0 switches to sound_stereo_separation=7 (PLEASE NOTICE, the SOUND settings are saved as reflected in the GUI, the problem seems to be loading / displaying them - RESTORE settings problem).
fastmem_size_k=512 switches to fastmem_size_k=0 (probably RESTORE settings problem)
amiberry.vkbd_enabled=true -> missing in saved config!
amiberry.vkbd_exit=true -> missing in saved config!
amiberry.vkbd_language=DE -> missing in saved config!
Notice:
As with the sound settings, the "fastmem_size_k" also switches to 0 in the saved config, because after --config loading, this setting is indeed set to 0 instead of 512. Same applies to the virtual keyboard settings I guess, if --config loaded, these settings are completely disabled and when saving they get lost (all the virtual keyboard lines), whereas loading by "Click" restores and saves those settings as expected.

I used "Meld" tool on Linux to compare content of loaded (existing) and newly saved configuration files, it's not possible with the human eye alone, you need technical aid for this. There is "Beyond Compare" on Windows/Linux and "KDiff3" or some other tools which should work as well.

Thank you! o)

@giantclambake
Copy link

giantclambake commented May 10, 2024

I had another look at this ; I think I see it now.....(using config.uae attached with vkbd enabled) ...

./amiberry --config conf/mango.uae [also true for the -f switch]

GUI starts, configuration appears loaded, but it isn't .. click on Virtual Keyboard, to find it unselected (*)
Goto Configuration panel ->the "mango" entry will be highlighted in the list & in the Name: textbox --> click Load
Click back to Virtual Keyboard, and vkbd should be enabled as per config.uae flags.

(*) If at this point I Start the emulation, it boots to insert disk screen, because the config hdd (and other) settings haven't been parsed in....curiously, native StatusLine is enabled in that config, and is displayed.

Interestingly, an invocation of ./amiberry --config conf/mango.uae -G (or use_gui=no is set in the .uae file), actually works as expected, launching the emulation directly using the supplied config.uae file.

HTH

mango.uae.gz

@midwan midwan added bug and removed can't recreate labels May 10, 2024
midwan added a commit that referenced this issue May 10, 2024
@midwan midwan closed this as completed in 13f4c1e May 10, 2024
@midwan
Copy link
Collaborator

midwan commented May 10, 2024

This was a sneaky bug.
If loading a config file from the command line, and the GUI was not hidden, the settings were reset to defaults as soon as Quickstart initialized. There was a safety check there, to only do that if we haven't loaded a config and if we're not already emulating, but the variable used to check if a config was loaded was not set when doing so from the command line.

Fixed now.

@tbone2k-git
Copy link
Author

Awesome! o)) You Amiberry guys are fast!

I still remember my request for lower CLIB target a year ago or so, which would allow Amiberry to run on Debian11/12 e.g..
You just did it, I was amazed and I still am..

It's a nice experience you give, thank you! o)

@midwan
Copy link
Collaborator

midwan commented May 10, 2024

Thank you for the kind words :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants