Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: motorollin on December 19, 2010, 03:40:43 PM
-
Here's a sample of my startup-sequence:
C:CheckKey 50
IF WARN
skip boot
ENDIF
C:SetPatch QUIET
MakeDir RAM:AGS
Assign AGS: RAM:AGS
Assign Games: Work:Games
Copy Games:AGS/#? AGS: ALL QUIET
Lab loop
ArcadeGameSelector
IF EXISTS RAM:.run
Execute RAM:.run
Delete RAM:.run
EndIF
skip loop back
lab boot
;normal startup sequence stuff to load workbench goes here
Basically, if F1 is being pressed on boot it skips forward to the "boot" label and loads Workbench. Otherwise, it loads ArcardeGameSelector. This works fine. Now, when I quit the game I've been playing, it should skip back to the loop label and re-run ArcadeGameSelector. However, it just gives an error saying "object not found. skip failed returncode 10". Any ideas?
--
moto
-
It shouldn't make any difference, but I've always used "skip back "...
-
Just tried it - same error. The weird thing is that this works:
lab loop
echo "hi"
skip loop back
It prints endless lines of "hi" when executed. I can't see how this is syntactically different to what I did :-?
--
moto
-
Ok I think it's something to do with WHDLoad, as if I comment out "execute ram:.run" then the loop works (but obviously it just goes straight back to the menu without loading the game). Weird!
--
moto
-
Is ArcadeGameSelector in the current search path at this point?
-
It's in C:. But I don't think that's the problem - the problem is that it's not skipping back to the loop label when WHDLoad runs. Here's the solution I have come up with:
;s:startup-sequence
Run Execute S:AGS-startup
Quit
;s:AGS-startup
ArcadeGameSelector
Execute RAM:.run
Delete RAM:.run
Run Execute S:AGS-startup
Quit
Not as elegant as using labels, but it works.
--
moto
-
Here's an example of the PlayGame script I use to run WHDLoad games from my GamesLauncher Util...
CD "RAM:Action Fighter/"
Assign SAV: "SAVES:Action Fighter"
LAB LOOP
WHDLoad Slave=ActionFighter.slave PreLoad NoCache NoFilter NTSC
SKIP BACK LOOP
[/B]
This works fine on all my games without any problems... :)
-
it just gives an error saying "object not found. skip failed returncode 10". Any ideas?
It is a limitation of label + skip in conjucation of executing external scripts.
-
It is a limitation of label + skip in conjucation of executing external scripts.
Ahh ok, so does calling an external script wipe out the labels in the script that called it?
--
moto
-
Here's an example of the PlayGame script I use to run WHDLoad games from my GamesLauncher Util...
CD "RAM:Action Fighter/"
Assign SAV: "SAVES:Action Fighter"
LAB LOOP
WHDLoad Slave=ActionFighter.slave PreLoad NoCache NoFilter NTSC
SKIP BACK LOOP
[/B]
This works fine on all my games without any problems... :)
The problem is that ArcadeGameSelector creates a script which you then have to execute in order to get the game to run. As Piru says, this doesn't work with labels. Is your GamesLauncher on Aminet?
--
moto
-
The problem is that ArcadeGameSelector creates a script which you then have to execute in order to get the game to run. As Piru says, this doesn't work with labels. Is your GamesLauncher on Aminet?
--
moto
Unfortunately no... It's pretty much set up to run on my system and would require the user to edit a script that sets up various assigns and make as much memory available as possible to run multi disk games from ram:... :(
I did try putting a package together a while back when some folk asked for it but couldn't figure out a way that would make it easy for the user to initially set it up, so I'm afraid I gave up... :(
(http://i995.photobucket.com/albums/af79/frankosamiga/Amiga%20Pics/AmigaGamesSelc1.gif)
The Main program and source code is available from my site if anyone wants it...
-
That looks good! I use ArcadeGameSelector (http://www.paradroid.net/ags/) which is very effective.
--
moto
-
That looks good! I use ArcadeGameSelector (http://www.paradroid.net/ags/) which is very effective.
--
moto
Yeah, I've seen that one, its good but I prefer to stick with my own one cos it just sits as an icon on the workbench screen until you want to launch a game... :)
-
Ahh ok. My A1200 boots straight into ArcadeGameSelector unless I hold down F1 during boot, since my Amiga is only really used as a games machine ;)
--
moto
-
Ahh ok, so does calling an external script wipe out the labels in the script that called it?
Execute from a script creates a temporary script file in T: which includes the script executed with rest of the original script appended. Thus you cannot 'skip back' to labels that reside before the execute command.
A
execute B
C
You can't reach A from C after the execute command (because the temporary script created only includes contents of B and C).
-
Amiga shell needs some more work in it :)
The hackish way script execution from within scripts is done has many unwanted and unexpected side effects and should be fixed, and I also miss being able to create functions and various loops.
-
@Piru
Thanks for the explanation. Very interesting :)
Have any of these issues with AmigaDOS been addressed in any of the NG AmigaOS flavours?
--
moto