09 May 2018, 01:10 | #1 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Where to store program data if running from a CD?
An upcoming project stores it's program data in the folder where the program is executed (if possible).
But if the program is executed from a CDROM, then obviously this is not possible. Where would the best place be to save this data ? Or should it not save any data if the program has not been installed to a HD ? |
09 May 2018, 01:26 | #2 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
|
If you have a floppy drive you could save the data on a floppy, or if you have a Hard Disk you could save the data directly on HD. Years ago there was also a device that allowed to write or delete data from a CD-Rom but this was only virtual, in fact the data was written on the Hard Disk.
|
09 May 2018, 01:31 | #3 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
I was more talking about what folder on the file system to use.
|
09 May 2018, 08:43 | #4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
You can try ENVARC: (create your dir here if you have several files to write).
Or put a config file there or in ENV: which will tell where the files go. |
11 May 2018, 03:06 | #5 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
I got a requester asking for ENVARC: when I tried to write to it. |
|
11 May 2018, 08:23 | #6 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
11 May 2018, 08:26 | #7 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
|
11 May 2018, 08:29 | #8 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,000
|
ENVARC: is a bad idea.
Firstly it only works if it has been set up during the boot process. Secondly it is copied to RAM during boot, so it eats up memory. Thirdly it only works if you have a Save/Use/Cancel concept similar to that of the preferences. You read the settings from ENV: and write them to either ENV: or both ENV: and ENVARC: depending on whether the user clicked on Use or Save. IMHO S: is a good place for text-based settings files. SYS:Prefs/Presets is another good location, but you have to create these directories if they don't exist. Actually you should ask the user and store the result in an ENV/ENVARC variable. If ENV or ENVARC don't exist, use S: as default. |
11 May 2018, 08:32 | #9 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
You make a good point re wasting ram. |
|
11 May 2018, 08:48 | #10 | ||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
All places are a bad idea, but one has to be found.
Quote:
Fully or just ENVARC:sys ? Does the copy process also duplicates all subdirs in here ? Quote:
This, too, is a bad idea. S: is for storing scripts, not settings. It has been abused too many times already. Quote:
Quote:
Saved game ? Perhaps you could remove the ability to run from CD directly and make a limited install only containing the main exe. This way you always have a dir you can count on. |
||||
11 May 2018, 09:10 | #11 | |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Quote:
This problem might be a bit theoretical. The most common case of an Amiga with a CDROM (CD32) is handled using nonvolatile.library and saving to NVRAM. I wonder how many CD equipped Amigas are actually out there being used for newly released games. I am guessing not many. |
|
21 June 2018, 00:15 | #12 |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
Nonvolatile: ?
|
21 June 2018, 00:56 | #13 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
|
|
21 June 2018, 10:47 | #14 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,007
|
How about a SYS:Prefs/YourGame/ directory? It seems some programs/system components use that kind of solution nowadays...
Or SYS:Storage/YourGame/ even though Storage has traditionally been for disabled Devs: stuff, but anyway I've seen that kind of solution already too. Maybe I'd prefer the Prefs one, because your data is kind of prefs stuff for a game |
21 June 2018, 16:44 | #15 | |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,004
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Workbench program from CLI (at startup.) | Pheonix | support.Other | 47 | 28 January 2022 05:24 |
Running simple C program | Sim085 | Coders. General | 10 | 30 January 2018 13:43 |
Use the Data Disk when running FS-UAE Arcade? | Frodelius | support.FS-UAE | 4 | 10 July 2017 23:19 |
How to load data and keep your main loop running? | alkis | Coders. Asm / Hardware | 12 | 09 September 2013 20:13 |
External windows program communicating with program running inside WinUAE | xxxxx | support.WinUAE | 10 | 19 February 2013 09:27 |
|
|