English Amiga Board


Go Back   English Amiga Board > Support > support.AmigaOS

 
 
Thread Tools
Old 10 January 2022, 19:42   #1
Condor-2-4-2
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 89
user-startup failed returncode 10 problem

Hello,

I'm trying to run a program with the user-startup script on workbench boot (I'm using a hdf DH0 install of AmigaOS3.2.1 with WinUAE 4.9.0; for game installation I use a separate drive DH2). As an example I want to start the game AMIner. I copied the game files dircetly on DH2. The executable is "aminer". I also created a script file "START" on DH2. It contains the following code:

Code:
aminer
In s:user-startup I added the following code to execute "START" on boot:

Code:
if exists DH2:START
  execute DH2:START
endif
Now if I reboot the system, the "START" script tries to run "aminer" but failes with the messages:

Code:
aminer: unknown command
aminer failed returncode 10
If I run "aminer" manually from it's icon, the game starts without problem. Then I executed the "START" script in the shell with execute command, which also worked. So the script seems to be O.K. I also checked the protection bits of "aminer" which are already set to rwed.

Now my question is why the system doesn't recognize "aminer" as an executable on autostart but otherwise it's manually executable? Are there any additional commands needed in my "START" script that instruct the system to load the program? And another strange thing - with my ClassicWB4.3 Kickstart 3.1 hdf the "START" script executes the program!

This autostart problem I also have for many other programs and it would be great if someone could help me to understand why this happens and how to create a working solution.

I attached my startup-sequence and user-startup files bellow.

Regards,

Condor-2-4-2
Attached Files
File Type: txt Startup-Sequence.txt (1.8 KB, 70 views)
File Type: txt User-Startup.txt (1.3 KB, 58 views)
Condor-2-4-2 is offline  
Old 10 January 2022, 21:55   #2
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
Why people are trying to start games from U-S?

Move you START script to WBStartup and see if that works.
daxb is offline  
Old 10 January 2022, 22:01   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by Condor-2-4-2 View Post
Code:
if exists DH2:START
  execute DH2:START
endif
Change that to

Code:
if exists DH2:START
  cd DH2:
  execute START
endif
thomas is offline  
Old 11 January 2022, 18:29   #4
Condor-2-4-2
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 89
Hello Thomas,

the change of the code in user-startup finally did it for me. But what exactly is the difference between the old and the changed code? Why is there a difference in the execute behavior?

I will also try the WBStartup solution daxb did suggest. Why should I prefer this instead of user-startup method?
Condor-2-4-2 is offline  
Old 11 January 2022, 18:38   #5
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
As far as I understand your description, daxb's suggestion will not work. I suppose you want to exchange the DH2 drive, each with another game and each with its own START script. Putting one of the START scripts into WBStartup will run that game but not work for other games.

So what's the difference.

If you enter a command without path, like

aminer

it will search a file with this name in the current directory and the DOS path. The current directory of User-Startup is DH0, the DOS path does not contain DH2, so the aminer file cannot be found.

If you change the current directory to DH2, then aminer will be found because now it is in the current directory.

In addition, if aminer tries to load other files from its directory, now it will find them because they are in the current directory. If you leave the current directory on DH0, aminer will probably fail to load its data files.

If you run the START script by double click from Workbench, it's Workbench or IconX who changes the current directory to the drawer where the script is. That's why it works from WB, but not from User-Startup.

Execute does not change the current directory. It just loads the script from the patch you specified and executes it under the same context as Execute was started from.
thomas is offline  
Old 11 January 2022, 20:30   #6
Condor-2-4-2
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 89
This is correct, I want to exchange the DH2 drive each with another game and it's own START script.

So if I have understood your explanation right, the old line

Code:
execute DH2:START
although executes the script which is located in DH2, but in the context of DH0. So aminer tries to load other game files, but in the wrong directory and therefore the game does not start.

The new lines

Code:
cd DH2:
execute START
instructs the execute command to operate within DH2 and not in DH0 like in the previous code.
Condor-2-4-2 is offline  
Old 11 January 2022, 20:36   #7
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Yes, with the same procedure you could also start the game directly without starting the Workbench, to do this from "Early Startup" you only have to deactivate DH0 and DF0 and start Amiga from DH2 (START script should be renamed to startup-sequence and copied to DH2:S).

This procedure would greatly increase the compatibility of old ECS games.
AMIGASYSTEM is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Genetic Species - problem with game auto start (User-Startup) Condor-2-4-2 support.Games 4 22 December 2021 20:19
sys:/system/rexxmast failed returncode 20 davethemackem New to Emulation or Amiga scene 3 19 July 2021 22:40
A600, kipper2k's 4mb board, "Whdload failed returncode 10" portarinos support.Apps 8 10 April 2015 16:56
HD won't boot now..wait failed returncode? Amigan25 project.ClassicWB 2 08 June 2007 18:21
Failed returncode 20 HymnsomniaK New to Emulation or Amiga scene 7 17 January 2007 13:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:19.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12555 seconds with 16 queries