The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Gunnar Horrigmo on August 02, 2003, 10:25:40 am



Title: gamepad problem
Post by: Gunnar Horrigmo on August 02, 2003, 10:25:40 am
to be brief: I can't get any response from the axes on my gamepad (a PS2-controller hooked up through a rockfire (USB) adapter).  buttons work ok.

any help is greatly appreciated.

here's the relevant section from the keys.cfg

# joystick 0 threshold 10  # How far to move before it counts; 0-30000
Menu-Left: joystick 0 axis 0 negative
Player-1-Left: joystick 0 axis 0 negative
Lander-Left: joystick 0 axis 0 negative
Menu-Right: joystick 0 axis 0 positive
Player-1-Right: joystick 0 axis 0 positive
Lander-Right: joystick 0 axis 0 positive
Menu-Up: joystick 0 axis 1 negative
Player-1-Thrust: joystick 0 axis 1 negative
Lander-Thrust: joystick 0 axis 1 negative
Menu-Down: joystick 0 axis 1 positive
Menu-Cancel: joystick 0 button 3
Player-1-Special: joystick 0 button 2
Menu-Select: joystick 0 button 0
Player-1-Weapon: joystick 0 button 0
Lander-Weapon: joystick 0 button 0
Menu-Page-Up: joystick 0 button 4
Menu-Page-Down: joystick 0 button 6
Menu-Zoom-In: joystick 0 button 5
Player-1-Escape: joystick 0 button 8
Lander-Escape: joystick 0 button 8
Menu-Zoom-Out: joystick 0 button 7


Title: Re: gamepad problem
Post by: Defender on August 02, 2003, 11:17:14 am
im using the same same thing (sort of), mines not made by rockfire though. mines made by "kiky x-series", but any ways, try this config:
#
<Joyport0-threshold0>
"Left" <Joy-A0->
"Right" <Joy-A0+>
"Up" <Joy-A1->
"Down" <Joy-A1+>
"Enter" <Joy-B3>
"Rshift" <Joy-B2>
"RCtrl" <Joy-B1>
" " <Joy-B5>
"[" <Joy-B7>"]" <Joy-B8>
#


this is what i use
for referance, ill list what does what:

triangle=no function
square=select,thrust,a button
x button=fire mainweapon,cancel selections,b button
circle=fire secondary weapon,c button
L1=no function
L2=nofuntion
R1=zoom in
R2=zoom out
start=no function
select=no function

well there you have it...
~DEFIANT


Title: Re: gamepad problem
Post by: Sage on August 03, 2003, 12:38:30 pm
In the line with...

Code:
# joystick 0 threshold 10  # How far to move before it counts; 0-30000

...take out the first #


Title: Re: gamepad problem
Post by: mike allegretto on October 05, 2003, 02:16:44 am
how do i use these joystick commands to configure the game?


Title: Re: gamepad problem
Post by: Defender on October 05, 2003, 06:58:18 am
in the keys.cfg file.

default instilation:
C:\Program Files\The Ur-Quan Masters\userdata\uqm

you can then open with note pad or word pad and edit the controls that way.

~DEFIANT


Title: Re: gamepad problem
Post by: Michael Martin on October 05, 2003, 12:43:04 pm
You may find that Notepad tries to put it all on one line; if so, use EDIT.COM instead.  Open it in EDIT.COM, save it, and the problem will go away.


Title: Re: gamepad problem
Post by: Titler on October 21, 2003, 03:29:21 am
Just to follow up on this; I've just downloaded and installed the game for the first time, and I had my pad ignored too. To get it working, remove the "# " from after EVERY line after the one mentioned above. If you want to force Wordpad to save exactly as is, click the cross to close the program and choose "Yes" to save changes... this is useful for other games which need the file to retain it's file tag (usually a .cfg file. Saving via File > Save in wordpad will convert to a .txt file)


Title: Re: gamepad problem
Post by: Michael Martin on October 21, 2003, 03:57:50 am
"#" means "comment".  The gamepad controls there are meant to be representative, not definitive.

But, for the record, they were based on my own setup, which is a PS2 controller hooked up to a Radio Shack PS2->USB adapter.  One thing to watch out for is that if you have the Analog mode set, it seems to read the D-Pad as a POV hat.  That probably varies by adapter, but the configuration can handle that too (the lines look like "Lander-Thrust: joystick 0 hat 0 up").


Title: Re: gamepad problem
Post by: CovertOps52382 on October 24, 2003, 06:58:02 am
I was overjoyed when I found this game... and immediately crushed when my Gravis gamepad didn't work for me.  I'm seeing posts about using a PS2 USB, controller, but I dug out my old Gravis, and have it configured as a plain old 4-button joypad to Windows 2k through the serial port (I don't even want to try configuring all the buttons and whatnot for my Nyko Air Flo, dual analog pad).  And I cannot get it to work, after altering and saving my keys.cfg file, I must've screwed up because then the game couldn't even run.  So what's the proper syntax for something as simple as a 4-button, serial-port, Gravis gamepad, anybody?


Title: Re: gamepad problem
Post by: Michael Martin on October 24, 2003, 11:14:29 am
Remove the references to buttons that aren't between 0 and 3.  If you put in an illegal keyconfig (and trying to map to nonexistent joystick axes or buttons counts) then it will refuse to run.

Once we get keyconfig within the game, that will go away; but it seemed less bad to crash on borked input configurations than to silently make everything impossible to control.


Title: Re: gamepad problem
Post by: CovertOps52382 on October 24, 2003, 09:51:12 pm
Okay, these posts aren't helping much.  I've tried all sorts of stuff, switching the joystick number between 0 and 1, making the axes hit a threshold of 1, rather than 0, nothing is working, I've even removed the # from the first informational line before the joystick threshold between 0-30000.  I guess my programming skills just suck, because no other arguments or alterations to the default keys.cfg file are working.  Hell, I've even tried setting my Nyko 13-button like a Playstation 2 controller, as mentioned earlier, no luck for me.  <sigh> Guess I'll have to wait for that key configuration to be added before I can thouroughly enjoy this game.


Title: Re: gamepad problem
Post by: Michael Martin on October 25, 2003, 04:18:47 am
The input system gives errors if it doesn't understand something.  Look for lines that begin "VControl: " to see what it's being confused by.


Title: Re: gamepad problem
Post by: CovertOps52382 on October 27, 2003, 02:53:03 am
Okay, I'm getting no error messages, either which pop up or in the running command line for the game.  It's like my game pad doesn't even give a signal to the game.  Maybe if I understood a bit more in the keys.cfg, I'd understand why my gamepad is being ignored.

I understand that the keys.cfg file's default imput is basically a template, the lines it has printed need to be changed to accept input.

There's a joystick number on each line with a number of 0, what does the number 0  represent?  Does that need to be changed?  Do the axes need to be changed from the number 1?  Maybe if someone could e-mail me a copy of their keys.cfg which works at SethCDetling@yahoo.com, I could copy and paste.  Thanks


Title: Re: gamepad problem
Post by: Defender on October 27, 2003, 03:17:20 am
Quote
 Maybe if someone could e-mail me a copy of their keys.cfg which works at SethCDetling@yahoo.com, I could copy and paste.  Thanks



its in the mail...
~DEFIANT


Title: Re: gamepad problem
Post by: CovertOps52382 on October 27, 2003, 07:04:36 am
WHOOPIDTY DEE AND TROLLY BAZOO!!!  Oh happy days of jubilation, you are are my hero!!!!


Title: Re: gamepad problem
Post by: Michael Martin on October 28, 2003, 03:00:04 am
Just for future reference (e.g., where do we need explicit instructions), what was the difference between the keys.cfg that didn't work and the one that did?


Title: Re: gamepad problem
Post by: ConjurerDragon on November 13, 2003, 11:45:02 pm
I too would like to play UQM using the Joystick and not the keyboard.

I took a look at the keys.cfg file, but have no clue what to alter to get it working and the line that says something like "Joysticks should work if they are USB and in Windows XP" further discourage me.

Is it possible to use the Joystick in Windows 95 C when it is a non-USB Joystick (an old Quickshot)?
bye
Michael


Title: Re: gamepad problem
Post by: Michael Martin on November 14, 2003, 10:25:15 am
Start UQM and look for a line near the top of the console window that says

"X joystick(s) were found."

If X is not zero, you're home free.


Title: Re: gamepad problem
Post by: ConjurerDragon on November 14, 2003, 05:02:52 pm
Quote
Start UQM and look for a line near the top of the console window that says
"X joystick(s) were found."
If X is not zero, you're home free.


When I start UQM (and I do with the -o -f -q high -c biadapt)
it runs through very fast, and I never have seen a line
"Joysticks were found" - neither 1 nor 0

Only 4 lines with errors:
The Ur-Quan Masters v0.3 (compiled Sep  5 2003 03:55:46)
This software comes with ABSOLUTELY NO WARRANTY;
for details see the included 'COPYING' file.

Warning: %APPDATA% is not set. Falling back to "%USERPROFILE%\Application Data"
Warning: %USERPROFILE% is not set. Falling back to "..\userdata" for %APPDATA%
Warning: %APPDATA% is not set. Falling back to "%USERPROFILE%\Application Data"
Warning: %USERPROFILE% is not set. Falling back to "..\userdata" for %APPDATA%
Warning: %APPDATA% is not set. Falling back to "%USERPROFILE%\Application Data"
Warning: %USERPROFILE% is not set. Falling back to "..\userdata" for %APPDATA%
Saved games are kept in E:/Spiele/STARCON/The Ur-Quan Masters/content/../userdat
a/uqm/save/.
Initializing SDL (OpenGL)."







Title: Re: gamepad problem
Post by: Michael Martin on November 15, 2003, 03:38:40 am
Keep going.  Here's my startup spam:

Initializing base SDL functionality.
Saved games are kept in /home/mcmartin/.uqm/save/.
Initializing Pure-SDL graphics.).
SDL driver used: x11
SDL initialized.
Initializing Screen.
Set the resolution to: 640x480x32
Initializing SDL audio subsystem.
SDL audio subsystem initialized.
Initializing MixSDL mixer.
MixSDL using driver 'SDL_audio'
MixSDL Mixer initialized.
   opened dsp at 44100 Hz 16 bit stereo, 4096 samples audio buffer
Initializing sound decoders.
Sound decoders initialized.
1 joysticks were found.
The names of the joysticks are:
   079d:0202
VControl opened joystick: 079d:0202
7 axes, 12 buttons, 1 hats.


Title: Re: gamepad problem
Post by: ConjurerDragon on November 15, 2003, 01:15:31 pm
After the line with SDL something the remaining lines fly through so fast that I can´t read them, nor that I could press PAUSE and thus be able to read them.

Is there a way to let the lines run through slower on the screen to see what the lines with Joystick say?


Title: Re: gamepad problem
Post by: ConjurerDragon on November 16, 2003, 04:23:16 am
Forget about the last question: When I ran UQM without the fullscreen command I could easyli stop and copy the lines as they ran through, they are:
Initializing SDL (pure).
SDL driver used: directx
SDL initialized.
Initializing Screen.
Set the resolution to: 640x480x16
Initializing SDL audio subsystem.
SDL audio subsystem initialized.
Initializing MixSDL mixer.
MixSDL using driver 'SDL_audio'
MixSDL Mixer initialized.
   opened dsound at 44100 Hz 16 bit stereo, 4096 samples audio buffer
Initializing sound decoders.
Sound decoders initialized.
0 joysticks were found.
       'lbm/scclrtab.ct' -- 8722 bytes"

So 0 Joysticks were found means that I´m out of luck?

That is strange as even the old SC 1 still runs fine on my PC and detects the same Joystick.
bye
Michael


Title: Re: gamepad problem
Post by: Michael Martin on November 16, 2003, 09:19:50 pm
We're using SDL to handle all input; under Windows, that should forward to DirectInput.  If DirectInput can't see your joystick, UQM can't.  If it can, then it should.  If it can't, then there's a bug in SDL somewhere.


Title: Re: gamepad problem
Post by: ConjurerDragon on November 17, 2003, 09:06:30 pm
Quote
We're using SDL to handle all input; under Windows, that should forward to DirectInput.  If DirectInput can't see your joystick, UQM can't.  If it can, then it should.  If it can't, then there's a bug in SDL somewhere.


I tried today with the original SC1 and the original SC2 and in both games I´m able to use the Joystick.

If "theres a bug in SDL somewhere" then can I do something about it on my system or is this something that had to be changed in the game?
bye
Michael


Title: Re: gamepad problem
Post by: Michael Martin on November 18, 2003, 06:41:10 am
Neither of the original games uses DirectX.  Check the "Game Controllers" section of your control panel and make sure Windows knows about it; I suppose if your DirectX version were less than 5 or so this would also cause problems.

If it isn't any of those, then it's an interface issue in a library we didn't write.


Title: Re: gamepad problem
Post by: Captain_Archer on November 27, 2003, 06:18:23 am
I am having this same problem - if someone could email me their keys cfg file that is completed thats for a USB pad on WinXP ( I use a Microsoft Sidewinder 1.1 ) I would be VERY THANKFUL!!

( Fustration builds here due to not able to play with a pad! )



Title: Re: gamepad problem
Post by: Defender on November 28, 2003, 06:24:49 am
its in the mail...

~DEFIANT


Title: Re: gamepad problem
Post by: Captain_Archer on November 29, 2003, 01:22:40 am
Thanks DEFIANT! I tried the file and it works with both my Sidewinder pad and my hacked SNES pad!
     Now I can truly enjoy the game thanks to these 3 people on the forum : ( and of course the people who are making the remake! )  Mark Vera, Nic and Defiant!

Thanks guys!@


Title: Re: gamepad problem
Post by: Defender on November 30, 2003, 11:39:47 am
in a recent turn of events, i am forced to be one asking for help, instead of giving it. its seems after installing "windows xp professional" my controller has stopped working. ive tried messing with the settings in both the keys.cfg and the settings in windows for control pads. nothing seems to be working and i didnt change anything besides the upgrade.

ive also taken note, that in my installed programs, "ur-quan masters(remove only)", is no longer there. my questions is, does UQM need to be registered with windows in order to get the controller to work, and... how would i go about doing that with the folder i already have that works. well with the keyboard anyway.

i knew i should of stuck with win98se, but i couldnt resist the upgrade. oh well...help ???

~DEFIANT


Title: Re: gamepad problem
Post by: Michael Martin on November 30, 2003, 06:17:13 pm
Are you editing the right version of keys.cfg?  Win98se keeps up under the UQM directory, IIRC, while XP keeps it in the currently logged in user's "Documents and Settings" directory.


Title: Re: gamepad problem
Post by: Defender on November 30, 2003, 08:45:47 pm
i feel rather noobish, but i havent become one with XP yet. where do i find "documents and settings?" i feel its right under my nose. i just cant seem to find it...heh.

~DEFIANT


Title: Re: gamepad problem
Post by: Deep-Jiffa on December 01, 2003, 12:51:16 am
c:\
or d:\
whereever you windows is installed.


Title: Re: gamepad problem
Post by: Michael Martin on December 01, 2003, 02:08:42 am
There will then be a hidden directory called something like "Application Data", and then an "uqm" under that.  That's where the keys.cfg should be.


Title: Re: gamepad problem
Post by: Defender on December 01, 2003, 04:23:52 am
ok i found the hidden file and opened it, but there is no "uqm" in there. so i made one and placed the key.cfg in there. ran the game and still nothing. so what do i do now? ill check back from time to time.

~DEFIANT


Title: Re: gamepad problem
Post by: Deep-Jiffa on December 01, 2003, 06:27:33 am
Creating uqm if it doesn't exist is like... damn I can't find something for it, well it just do nothing! Make sure you have entered the "correct" user name folder, then apllication data(for example if your user name that YOU PLAY ( yes, play, nothing else is acceptable)is... lets say "oh mighty deep jiffa" then go to the hidden aplication data in document and setting/oh mighty deep jiffa/ and there you go! Uqm folder, if it isn't there, hmmm don't look at me! I am not a programmer, yet... uqm source looks like javascript, I might learn it uqm code after I finish javascript. There! Finished.


Title: Re: gamepad problem
Post by: Defender on December 01, 2003, 09:37:58 am
man, you have nothing on the mycon, when it comes to comunication... but i take it you mean run uqm, then while its running to go to that folder and ill find it there... oh? ok, why didnt you say so. he he just foolin with you.

hmm, thats funny. i just went to check to see if anything has changed, before i was going to do what i stated above, and low an behold, here is uqm. with all the files, and yes, do my little blood shot eyes deceive me... KEYS.CFG. its a charlie brown christmas.

now can some one please tell me what the heck just happened here. how does this this aplication (ghost) file work? first its not here, then poof it is. man, windows xp is creeeeping me out.

needless to say, its been found, its been edited, its been fun...sweet...thanks guys. you have been most helpful.

Michael Martin: thanks and keep up the great work on the project.

Deep_Jiffa: thanks for your time too, it gave me the motovation to go looking back there, even though i figured i was wasting my time. thanks

happy again...
DEFIANT


Title: Re: gamepad problem
Post by: Michael Martin on December 02, 2003, 04:45:34 am
I've actually never heard of the file going away when the application is done.   :-/  Other than that, it's basically WinXP's version of Unix's "home directories", which are an abstraction we like.


Title: Re: gamepad problem
Post by: We Come In Receptacles on December 25, 2003, 12:44:19 am
Quote
After the line with SDL something the remaining lines fly through so fast that I can´t read them, nor that I could press PAUSE and thus be able to read them.

Is there a way to let the lines run through slower on the screen to see what the lines with Joystick say?


bumping this in the hope someone will reply to that question...joypad config wrong or my joypad isn't recognized, don't know which.  Tried using windowed mode but don't know how to slow down the text that appears.

I'm using an old analog joypad (serial port) with 6 buttons.

Why is the keys.old file included for release .3, am I supposed to use that file??

I tried configuring the current VCONTROL version of keys file, using both current template and the one suggested in the keys.old file, neither worked.

Even tried numbering buttons 1-6 (rather than 0-5), no luck.

I'd appreciate any help with this, and sure someone else will in the future.






Title: Re: gamepad problem
Post by: We Come In Receptacles on December 25, 2003, 04:21:01 am
Quote


bumping this in the hope someone will reply to that question...joypad config wrong or my joypad isn't recognized, don't know which.  Tried using windowed mode but don't know how to slow down the text that appears.

I'm using an old analog joypad (serial port) with 6 buttons.

Why is the keys.old file included for release .3, am I supposed to use that file??

I tried configuring the current VCONTROL version of keys file, using both current template and the one suggested in the keys.old file, neither worked.

Even tried numbering buttons 1-6 (rather than 0-5), no luck.

I'd appreciate any help with this, and sure someone else will in the future.


SOLVED...hope this helps others.

OK did some banging on keyboard, and little ole me (forthwith known as Mr. DOS) discovered that shift + tab stopped the scrolling crap long enough so I could see what the hell was going on.

Adding config to VCONTROL (keys.cfg) in the ".2 style" (as demonstrated in keys.old, under example for 2 axis 2 button joypad) didn't work, the error messages was "expected ':' missing".
Adding config to VCONTROL, using example for "Win XP with USB analog/digital gamepad", wasn't working at first either...I got several error messages about wrong value for HAT (referring to the 0 values given in the "POV hat controls").

So what happened is I had removed the #'s from the "POV hat controls" entries, and these weren't recognized on my gamepad so game refused to run.  SO...don't use those entries unless you need them.

Here is what I eventually added which worked (pasted here directly from keys.cfg, so you can copy and paste yourself):

joystick 0 threshold 10000   # How far to move before it counts; 0-30000
Menu-Left: joystick 0 axis 0 negative
Player-1-Left: joystick 0 axis 0 negative
Lander-Left: joystick 0 axis 0 negative
Menu-Right: joystick 0 axis 0 positive
Player-1-Right: joystick 0 axis 0 positive
Lander-Right: joystick 0 axis 0 positive
Menu-Up: joystick 0 axis 1 negative
Player-1-Thrust: joystick 0 axis 1 negative
Lander-Thrust: joystick 0 axis 1 negative
Menu-Down: joystick 0 axis 1 positive
Menu-Cancel: joystick 0 button 3
Player-1-Special: joystick 0 button 3
Menu-Select: joystick 0 button 5
Player-1-Weapon: joystick 0 button 5
Lander-Weapon: joystick 0 button 5
Menu-Page-Up: joystick 0 button 1
Menu-Page-Down: joystick 0 button 2
Menu-Zoom-In: joystick 0 button 4
Player-1-Escape: joystick 0 button 4
Lander-Escape: joystick 0 button 4
Menu-Zoom-Out: joystick 0 button 0

note I'm not sure if the threshold setting of 10000 is necessary (vs. just 0), but anyway it's working.

Again, I'm using a cheapie analog (serial port) 6-button joypad, a "ProPad" to be exact, but I think it uses standard Micro$oft drivers so hopefully this config will work for other people using old serial-port joypads (and possibly others).




Title: Re: gamepad problem
Post by: Michael Martin on December 25, 2003, 08:47:13 am
The "threshold" value indicates how far from the true center the joystick has to be for a value to count.  If it's actually at 0, any jitter on the joystick will be read as a joystick motion, which is often inconvenient for menus.  If you have a supremely well-engineered gamepad, it won't matter.  (SDL reads joystick axis values as integers between -32767 and 32767.)


Title: Re: gamepad problem
Post by: Terminator on February 10, 2004, 09:58:26 pm
I have an old school gamepad (serial port) and have the same problem its listed as a 2-axis 4 button gamepad DONT LAUGH!  Let put it this way I used to use it for Castle Wolfenstien 3D & DOOM.  


Title: Re: gamepad problem
Post by: Michael Martin on February 11, 2004, 02:04:25 am
How is it being detected as 2-axis, 4-button a problem?


Title: Re: gamepad problem
Post by: Terminator on February 11, 2004, 04:23:42 am
Quote
How is it being detected as 2-axis, 4-button a problem?


Actually I think it more of a compatabilty issue win 98 recognizes it as a 2-axis 4-button gpad I figured its a remake of an old dos game my gpad uses the serial port like all joysticks back in the day used, is it win or do I not know what I'm doing?

Also in dos prompt directories are displayed in Win 98 length but I have to type in the dos namesmaking it very difficult to use any of the parameters.

Note: When I start in dos mode the controls are changed Why?


Title: Re: gamepad problem
Post by: Michael Martin on February 11, 2004, 05:56:56 am
Check where your savegames are between the two; Win98 has no concept of home directories.

UQM is not a DOS game; it's using DirectX under the hood.  If Windows can't see the joystick, it likely won't show up when the SDL libraries do the probe.