Page 1 of 1
Joystick Gamepad Help
Posted: Sat Jul 23, 2011 5:11 pm
by Redlion
Hi,
I am trying to get the gamepad/joystick working with my Sam460 and Hollywood 4.8, but I can not get it to work.
I can see that it works via the prefs but when I try and use any of the Joystick commands I get, " can not acquire joy stick"
"in function: JoyDir)"
how do I find which port the USB Joystick is on.
Thanks
Redlion
Re: Joystick Gamepad Help
Posted: Sun Jul 24, 2011 10:49 am
by airsoftsoftwair
Hmm, just try some ports... it should somewhere between port 0 and 3. Not sure how it's done on OS4, but on MorphOS you can configure what lowlevel port the device should be mapped to.
Re: Joystick Gamepad Help
Posted: Mon Jul 25, 2011 12:46 pm
by Redlion
Hi,
I still can not get the joystick or gamepad to work.
If I use the
CountJoysticks() command I get 0 ( no joysticks )
and the JoyDir(0) command throws up an error.
Do I have to do any thing special to setup the Joystick first ( in Hollywood or in Amiga OS )
Or if someone has some simple code that they know work could they post it for me please.
Regards
Redlion
Re: Joystick Gamepad Help
Posted: Tue Jul 26, 2011 12:38 am
by airsoftsoftwair
You need to go to Prefs->AmigaInput, then choose the "Lowlevel" tab and then assign your game pad to lowlevel port 1. Then you can use the joystick functions in Hollywood. But keep in mind that lowlevel port 1 corresponds to Hollywood port 0! So you need to query the joystick on port 0 in Hollywood even though you configured it as port 1 in the AmigaInput prefs. This is a bit confusing but it has to be done this way because on the classic Amiga the game port was always port 1. In Hollywood, however, port 0 is the default game port. Thus, when you query port 0 in Hollywood it will in reality query port 1 because this is the default Amiga game port. It's difficult to explain but I hope you get the idea

Re: Joystick Gamepad Help
Posted: Wed Jul 27, 2011 12:54 pm
by Redlion
Hi,
I must be doing something stupid because nothing works.
I have tried everything that I can think of but I can not get the joystick or gamepad to work. I have tried all the combinations of Lowlevel drivers and unit numbers, sometimes
the Countjoysticks() command with give a result of 1 or 2 but I can not get the joystick or gamepad movement to register in Hollywood.
Does anyone have some simple code that they know works so I can have a look at it, I am still a little worried that I am doing something wrong code wise.
this is my code;
Code: Select all
gameover = 0
Joycount = CountJoySticks()
Print("\n')
Print(Joycount)
Print("\n")
Repeat
while(state <> #JOYRIGHT)
state = JoyDir(0)
wait(2)
wend
until GameOver
Any help would be greatfully apreciated.
Redlion
Re: Joystick Gamepad Help
Posted: Wed Jul 27, 2011 7:49 pm
by airsoftsoftwair
Did you try the configuration I described in my previous post?
AmigaInput prefs: configure joystick/game pad as lowlevel device port 1
Hollywood: use port 0
It really should work then. Forget about what CountJoysticks() tells you. Just use port 0 in Hollywood and port 1 in the AmigaInput prefs. You can debug joystick output then by starting Hollywood from the shell and using something like:
Code: Select all
Repeat
DebugPrint("FIRE STATE:", JoyFire(0))
DebugPrint("STICK STATE:", JoyDir(0))
VWait
Forever
Re: Joystick Gamepad Help
Posted: Fri Jul 29, 2011 2:38 pm
by Redlion
I still can not get the joystick to work.
It works with some other programs on the SAM 460ex but not with Hollywood 4.8.
I am at a lose as to what to try next.
If anyone has a working example I would be greatful.
Regards
Redlion
Re: Joystick Gamepad Help
Posted: Wed Aug 03, 2011 11:05 pm
by airsoftsoftwair
Could you make a screenshot of your Lowlevel settings in the AmigaInput prefs and post it here? Maybe I can tell you what's wrong there then.