Tested, seems it works, but not sure if it ok for amigaos4 and diablo in general. I mean, it will put the saves and the .ini (config) file to the "env:diasurgical/devilution" , which mean it all will die after reboot.
So, it should be at least in the prefs/env-archive if go that way, because SDL_getprefpath is "This is meant to be where the application can write personal files (Preferences and save games, etc.) that are specific to the application.", so something which survive reboot.
But again, is it worth for exactly Diablo to remove workaround ? Imho it better to have .ini file in the root of game somewhere ? It also somehow strange that with removed workaround it start to save to the env "single_0.sv.tmp" file on exit, instead of pure "single_0.sv", like, it didn't do something with removed workaround. As well as it stop to find some font file from unpacked data file. Recompiled with workaround back , and all works.
Application Library's PrefsObjects system uses ENV(ARC): by default, so it's pretty common to store configs there.
Quote:
«ENVARC:» is bad becouse some times you might need to reinstall AmigaOS, then config is lost.
That is a rather weak argument. Sensible people will make a backup before reinstalling the system or reformatting/repartitioning their disk. And surely it is easier to backup the entire ENVARC: than scuttle through all sorts of arcane places looking for stored configurations?
@liveforit facepalm! ENVARC it's good idea, because:
@trixie Quote:
Application Library's PrefsObjects system uses ENV(ARC): by default, so it's pretty common to store configs there
Of course! AmigaOS always use ENVs for store configs. Just lately it somehow wasn't considered, but ENVs in the first place were mean like "home directory" to store configs and stuff since beginning, just some prefer to use "S:" back in past for keys (for some reasons, dunno why). Even in our wiki we have:
Quote:
ENVARC: ENVARC: is the name assigned to the directory SYS:Prefs/Env-Archive. ENVARC: always contains a Sys directory, in which each of the Preferences editors stores the .prefs file created when you save a setting with its Save gadget. Custom default icons created in IconEdit are also saved here. (Named settings saved with the Save As menu item in an Editor are stored by default in the Prefs/Presets drawer.)
Other Workbench programs that allow you to save configuration settings, such as MultiView, also place their files in ENVARC:
The contents of ENVARC: are copied to ENV: at boot time.
ENV: ENV: is a cache that holds the working copy of ENVARC:. Since ENV:'s contents are memory-resident, accesses to its contents do not have to read the system disk. ENV: is an Assign, into which the contents of ENVARC: are copied when booting. Preferences settings activated with Save or Use gadgets are stored in ENV:. Global environment variables are also stored here, as small files.
In OS3.x and earlier, ENV: was assigned to a directory RAM:Env/, but in OS4, ENV: is a handler with its own storage, only accessible to the user through the ENV: assign.
Quote:
That is a rather weak argument.
Not only weak, but facepalm too, because it's like saying "hey, I have on my HDD some data somewhere, but it shouldn't be there, because I will reinstall the os" :) Like I do not know what and where will be when I do not know what and when will do :)
There is also other advantages of using progdir: as you can have many installed version of the same program, etch has its own config file, so config is not mixed with etch program, you don't need to worry about wrong config file being loaded. for beta testers this can be useful. Imagine you have a incompatible .prefs maybe with new options need by one program but they do not exists in older version of the same program.
ENVARC: ENV: I consider system, its where the environment is, a tool or program is not the environment, it does not need to be there,
The part about ENVARC: being copied to ENV: if that done by handler or by a copy command in startup-sequence it make no difference, it takes RAM it does not need, after program exist not in use, there is no expunge system to remove .prefs from env: when they are not in use. so it basically a memory leak
another messed up issue is all the .info files in env:sys/ depending on size of your .info icons it take lot memory, I think this partly way AmigaOS4.1 classic has problems running on classic Amiga systems. Yes I know ELF files are large but they are tiny compared to all the space graphics needs.
Also backing up a program is easy, just copy drawer, don't need to worry what is in env: or envarc:, don't need to worry if there something in s: its in drawer, if its progdir:, admit it progdir: is cool, envarc: is not
Edited by LiveForIt on 2020/1/13 18:05:32
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
@mufa Is those changes about load/save on github ? I didn't see it there. Maybe that just some test 68k binary without putting source code online ? Or i just blind ? :)
EDIT: found, its in fix-save branch. Will build os4 binary then
@328gts The same as for DJBase then. Interesting how different there X1000 vs X5000. Usually its x1000 most of time faster when it come to some simple operations where graphics.library involved (because of DMA usage), but seems bottleneck there is not graphics operations but cpu/memory and stuff.
@All Tried to build that "save/load" branch, and it seriusly fucked.
It stop parse correctly diablo.ini : settings just like didn't taken in account. It also on running freezes most of time after intro stop, or may not freezes if i run in background snoopy for example. That mean some real memory trashing somewhere happens seems so.
Also sound most of time missing from intro too.
I may try to apply to previous working build the fixes Arhtur do for save/load, maybe that will fits well. Will check now.
EDIT: applied "save/load" changes on top of working previously version, and it is the same buggy now as with whole last build. Maybe it works on os3 because os3 more tolerant to bugs, but there surely something broken for now in save/load branch.
EDIT: applied "save/load" changes on top of working previously version, and it is the same buggy now as with whole last build. Maybe it works on os3 because os3 more tolerant to bugs, but there surely something broken for now in save/load branch.
I mean that mufa says in few posts above: "In the 68k version, load / save already works. Maybe it's time for a new build for AOS 4?". That mean that 68k version (not os3 ppc one) have working save/load. While 68k and ppc both big-endian, all should works the same everywhere. In practice as i say building save-load branch is unstable and crashy like omiga1200. I have a guess that if mufa says that 68k version work from the same code, then it only mean 68k more tolerate to bugs. Or, not all fixes about save/load in the repo at moment.