English Amiga Board


Go Back   English Amiga Board > Other Projects > project.CD32 Conversion

 
 
Thread Tools
Old 09 February 2016, 00:18   #21
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Ok thanks guys will try the new code tomorrow as its getting late.
Re cd32load, none of these games worked hence why i used whdload, in the future if they work then an update will be done with pad support of course.
Amigajay is online now  
Old 09 February 2016, 01:18   #22
Neil79
Autistic 'n IRN!
 
Join Date: Jul 2012
Location: -
Posts: 2,980
Neil79 is offline  
Old 10 February 2016, 19:06   #23
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Quote:
Originally Posted by Akira View Post
Yeah I have no idea what that was, I kept it as Amigajay made it, so I guess it's some dragged error from the copypasting.
Thanks for clearing that up earok!

Like this, then, I guess?
Code:
assign env: ram:
assign t: ram:
doublespeed
setpatch quiet

hip hide sys:music/bb.mod
 
picboot sys:bbtmenu.gif vo on DETACH


loop main_loop
waitjoy >env:choice

if $choice eq red
   hip quit
   stoppicboot
   avail flush >nil: 
   cd games
   C:WHDLoad bubblebobblentsc.slave data=bubblebobblentsc PRELOAD
   skip exiting
   else if  $choice eq blue
             hip quit
             stoppicboot
             avail flush >nil: 
             cd games
             C:WHDLoad rainbowislands.slave data=rainbowislands PRELOAD
             skip exiting
             else if $choice eq yellow
                  hip quit
                  stoppicboot
                  avail flush >nil: 
                  cd games
                  C:WHDLoad parasolstars.slave data=parasolstars PRELOAD
                  skip exiting
                  else skip main_loop back
endif

lab exiting
endcli >NIL:
I don't know what "vo" on that picboot line is, never used picboot, so that would have to be fixed by you Amigajay.
its coming up with 'can't find ram' even though the first part is exactly the same as it was and it worked before, something not right somewhere.
Amigajay is online now  
Old 10 February 2016, 19:15   #24
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Which command says "can't find ram"? If it's something to do with your first part, I am afraid I cannot do anything, just put exactly the same first part you did before if it was working.
I only changed the IF statements that were all wrong.

By the way is "hip" hippoplayer? That's kind of a big footprint music player, you could use something smaller like http://aminet.net/package/mus/play/EasyMOD
Amiga1992 is offline  
Old 10 February 2016, 19:39   #25
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Quote:
Originally Posted by Akira View Post
Which command says "can't find ram"? If it's something to do with your first part, I am afraid I cannot do anything, just put exactly the same first part you did before if it was working.
I only changed the IF statements that were all wrong.

By the way is "hip" hippoplayer? That's kind of a big footprint music player, you could use something smaller like http://aminet.net/package/mus/play/EasyMOD
Yeah its because it went from wordpad to notepad, got it working but still didnt work with your code im afraid said something like 'cant find loop main_loop' or something, I'm new to all this, basically cutting and pasting for me so if it doesn't work ill try something else.
Amigajay is online now  
Old 10 February 2016, 19:43   #26
Arnie
R.I.P Smudge 18-08-16
 
Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
Try skip back main_loop
Arnie is offline  
Old 10 February 2016, 19:54   #27
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
OH MAN I am an idiot. Sorry, I made a big mistake :P
Here's the corrected code:
Code:
assign env: ram:
assign t: ram:
doublespeed
setpatch quiet

hip hide sys:music/bb.mod
 
picboot sys:bbtmenu.gif vo on DETACH


lab main_loop
waitjoy >env:choice

if $choice eq red
   hip quit
   stoppicboot
   avail flush >nil: 
   cd games
   C:WHDLoad bubblebobblentsc.slave data=bubblebobblentsc PRELOAD
   skip exiting
   else if  $choice eq blue
             hip quit
             stoppicboot
             avail flush >nil: 
             cd games
             C:WHDLoad rainbowislands.slave data=rainbowislands PRELOAD
             skip exiting
             else if $choice eq yellow
                  hip quit
                  stoppicboot
                  avail flush >nil: 
                  cd games
                  C:WHDLoad parasolstars.slave data=parasolstars PRELOAD
                  skip exiting
                  else skip main_loop back
endif

lab exiting
endcli >NIL:
I wrote "loop " instead of "lab" :P Sorry! You should be able to catch those errors though, part of the learning.
Also DO NOT use Wordpad. It inserts invisible characters the Amiga won't like. notepad plain text always.


Arnie: "skip back " won't work, the label goes first, according to AmigaDOS reference:
Quote:
SKIP
Skips to a label when executing script files.

Format
SKIP [<label>] [BACK]

SKIP is used in scripts to allow you to skip ahead in the script to a <label> defined by a LAB statement. If no <label> is specified, SKIP jumps to the next LAB statement.

SKIP always searches forward from the current line of the file. However, when the BACK option is used, SKIP starts searching for the label from the beginning of the file. This allows SKIPs to points prior to the SKIP command.

You can only SKIP as far back as the last EXECUTE statement. If there are no EXECUTE statements in a script, you SKIP back to the beginning of the file.

If SKIP does not find the label specified, the command sequence terminates and the message Label <label> not found by Skip is displayed.
Amiga1992 is offline  
Old 10 February 2016, 20:37   #28
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
had another go, gets to the menu ok, but none of the buttons do anything now lol sorted it in one way i suppose!
Amigajay is online now  
Old 10 February 2016, 20:42   #29
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Just to diagnose this, disable the line that opens the pic and see what the SHELL says when you press buttons. You can add an "echo" statement to each IF statement to see if the buttons are being recognized or not, or if the skip back sequence isn't being recognized and it's going straight out to the endcli bit.


EDIT: did a quick test and it works for me, at least RED and BLUE, but anything else I press that isn't those two enters the same option as BLUE for some reason. My IF statements look fine so I have no idea what is going on here. Will debug some more.

Last edited by Amiga1992; 10 February 2016 at 20:51.
Amiga1992 is offline  
Old 10 February 2016, 21:20   #30
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
OK I am guessing here that I forgot about AmigaDOS and there's actually no way to do "else if" nested statements.
So I changed the scrip to just go through single IF statements like before, and it worked.
Can any AmigaDOS script wizards tell me how to use "else if"? Does it only work for one iteration?

Here's your new code:

Code:
assign env: ram:
assign t: ram:

doublespeed
setpatch quiet

hip hide sys:music/bb.mod
picboot sys:bbtmenu.gif vo on DETACH


lab main_loop
waitjoy >env:choice

if $choice eq red
	hip quit
	stoppicboot
	avail flush >nil: 
	cd games
	C:WHDLoad bubblebobblentsc.slave data=bubblebobblentsc PRELOAD
	skip exiting
endif

if $choice eq yellow
	hip quit
	stoppicboot
	avail flush >nil: 
	cd games
	C:WHDLoad parasolstars.slave data=parasolstars PRELOAD
	skip exiting
endif 

if $choice eq blue
	hip quit
	stoppicboot
	avail flush >nil: 
	cd games
	C:WHDLoad rainbowislands.slave data=rainbowislands PRELOAD
	skip exiting
endif

skip main_loop back         

	
lab exiting
Pressing the red, blue or yellow buttons will go to a game. Pressing ANYTHING else will do nothing (previously it would hang even if you pressed a direction, start button or a fwd/skip button)
Amiga1992 is offline  
Old 10 February 2016, 21:51   #31
Arnie
R.I.P Smudge 18-08-16
 
Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
I'm not 100% sure here but I think for every 'if' you need an 'endif' even if you use 'else if'.

I only use 'else' like this:

If something
do this
else
do this
endif

You could try:

If something
do this
else if
do this
else if
do this
endif
endif
endif
Arnie is offline  
Old 10 February 2016, 22:06   #32
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
I tried that. Didn't work. Maybe I did it wrong. It would be good to see a script that has a bunch of elseifs.
In any case I am just being tidy with the code, the proposed solution works and it's not a complete eyesore And I even thought of a way to optimize it a bit more, but what gives? It's a script file after all.
Amiga1992 is offline  
Old 11 February 2016, 00:08   #33
Arnie
R.I.P Smudge 18-08-16
 
Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
Yes, I agree. You can spend a lot of time trying to make it neat and tidy, but at the end of the day, it's what works that counts
Arnie is offline  
Old 11 February 2016, 00:13   #34
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
At least now it's better than it used to be, it all works as intended
Amiga1992 is offline  
Old 11 February 2016, 19:32   #35
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Sorry to be a pain, its still not working my end for some bloody reason, can you upload the startup sequence as a file to the zone for me please, thanks for the help btw
Amigajay is online now  
Old 11 February 2016, 19:42   #36
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
If you're using shitty Wordpad it's probably ruining the file.

It's attached here:
Attached Files
File Type: zip startup-sequence.zip (468 Bytes, 119 views)
Amiga1992 is offline  
Old 11 February 2016, 19:50   #37
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Quote:
Originally Posted by Akira View Post
If you're using shitty Wordpad it's probably ruining the file.

It's attached here:
No I've been using Notepad, just tried that file without even opening it, comes up with "can't find ram"
Amigajay is online now  
Old 11 February 2016, 20:00   #38
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
I give up, I have no idea what you're doing. The file runs.
What do you mean you tried it "without even opening it"??
Amiga1992 is offline  
Old 11 February 2016, 20:03   #39
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 2,895
Obviously I'm not doing anything to the file, as in i havent opened and saved it in wordpad to tell you im using it as is and its not working...
Just leave it then, if people press the wrong button ill just duplicate the games for the other buttons to save having nothing nothing load.
Amigajay is online now  
Old 11 February 2016, 20:05   #40
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Oh you meant you didn't edit it.
I don't know what is going on. I just tried it and it worked.

Just type in exactly what I wrote instead of copypasting. See what happens.
Amiga1992 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
Some new floppy scan from Bubble Bobble :) Foul HOL contributions 6 13 November 2012 19:15
Bubble Bobble 4 CPC :) Vollldo Retrogaming General Discussion 98 12 March 2012 21:09
Bubble Bobble + Arkanoid PAL Vollldo request.Old Rare Games 2 27 March 2011 19:14
Req. Bubble Bobble for Amiga on floppy Fogg MarketPlace 12 25 July 2010 21:24
FIXED: Bubble Bobble (resload_LoadFile) Codetapper project.Killergorilla's WHD packs 3 17 July 2007 15:21

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 23:11.

Top

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