English Amiga Board


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

 
 
Thread Tools
Old 09 February 2016, 01:18   #21
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
AdSense AdSense  
Old 09 February 2016, 02:18   #22
Neil79
Senior Member
Neil79's Avatar
 
Join Date: Jul 2012
Location: Kent
Age: 38
Posts: 2,518
Neil79 is offline  
Old 10 February 2016, 20:06   #23
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 10 February 2016, 20:15   #24
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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
Akira is offline  
Old 10 February 2016, 20:39   #25
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 10 February 2016, 20:43   #26
Arnie
R.I.P Smudge 18-08-16

Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 59
Posts: 3,861
Try skip back main_loop
Arnie is offline  
Old 10 February 2016, 20:54   #27
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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.
Akira is offline  
Old 10 February 2016, 21:37   #28
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 10 February 2016, 21:42   #29
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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 Akira; 10 February 2016 at 21:51.
Akira is offline  
Old 10 February 2016, 22:20   #30
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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)
Akira is offline  
Old 10 February 2016, 22:51   #31
Arnie
R.I.P Smudge 18-08-16

Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 59
Posts: 3,861
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, 23:06   #32
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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.
Akira is offline  
Old 11 February 2016, 01:08   #33
Arnie
R.I.P Smudge 18-08-16

Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 59
Posts: 3,861
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, 01:13   #34
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
At least now it's better than it used to be, it all works as intended
Akira is offline  
Old 11 February 2016, 20:32   #35
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 11 February 2016, 20:42   #36
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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, 31 views)
Akira is offline  
Old 11 February 2016, 20:50   #37
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 11 February 2016, 21:00   #38
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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"??
Akira is offline  
Old 11 February 2016, 21:03   #39
Amigajay
醉拳
Amigajay's Avatar
 
Join Date: Jan 2010
Location: UK
Posts: 1,531
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 offline  
Old 11 February 2016, 21:05   #40
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,301
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.
Akira is offline  
AdSense AdSense  
 


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 20:15
Bubble Bobble 4 CPC :) Vollldo Retrogaming General Discussion 98 12 March 2012 22:09
Bubble Bobble + Arkanoid PAL Vollldo request.Old Rare Games 2 27 March 2011 20:14
Req. Bubble Bobble for Amiga on floppy Fogg MarketPlace 12 25 July 2010 22:24
FIXED: Bubble Bobble (resload_LoadFile) Codetapper project.Killergorilla's WHD packs 3 17 July 2007 16: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 11:22.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.33074 seconds with 13 queries