xboxscene.org forums

OG Xbox Forums => Software Forums => Development => Topic started by: d0wnlab on December 24, 2004, 01:59:00 PM

Title: Openxdk Pad Input Values
Post by: d0wnlab on December 24, 2004, 01:59:00 PM
a complete guess would be that those buttons are analog, so it's not just an on/off scenario, but if the pressure on the button is above a certain amount we consider it 'pressed'.  Otherwise what you think is going on is pretty much correct.

I might be wrong, but I suspect it's right.
Title: Openxdk Pad Input Values
Post by: d0wnlab on December 25, 2004, 02:47:00 PM
In the API documentation it mentions only one controller is supported.. I'm unsure what this entails.. maybe it means..

- you can only have 1 controller plugged in?
- it has to be in a specific port?

this might have been fixed and the documentation outdated but thats what it says on the site.
Title: Openxdk Pad Input Values
Post by: d0wnlab on December 26, 2004, 12:53:00 PM
I had messed around with some of the input handling while writing an app I still haven't released, and hadn't gotten it working either.  I'll look at it ~Jan 3rd-4th when I'm back at home and have some time.  Until then all I can provide is conjecture smile.gif
Title: Openxdk Pad Input Values
Post by: edwardaux on January 02, 2005, 02:26:00 PM
Sorry for the delay in replying... I am overseas at the moment.  Currently only one pad is supported and it has to be the leftmost pad (the first one).  What about the other values in the structure?  ie. pad.trig_left, etc

The value of 0xD0 was one i just plucked out of the air (as someone said, the values are analog)  Does the sdlJoystick code work?

--
Edwardaux
Title: Openxdk Pad Input Values
Post by: nangsyde on January 03, 2005, 02:08:00 AM
Sorry, I've not fiddled with the SDL Joystick yet, I'll compile up a copy now and have a play with it.  I've gotta get downlabs SDL_Image working now so I'll have a play with both at the same time.   I'll also sort out something nice and simple to check inputs from all the keys so I can see if I'm getting anything.  Aaand UIX has come out today, so I think I'll have a nice Xboxy morning.  Cheers for the ideas Edward, I'll report back what I've got working and or not smile.gif
Title: Openxdk Pad Input Values
Post by: nangsyde on January 03, 2005, 07:53:00 AM
It'll be a day or so before I have some results for these, because I errm managed to format my C drive  sad.gif   Very embarrasing, and errrm yeah, but I should be back up and running by tomorrow.  *Sigh*
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 04, 2005, 12:53:00 PM
I just attempted using sdlJoystick.

Running using Evox M7 (iirc) BFM via PBL, and with a TSOP flashed Xecutor bios.

I have 3 joysticks plugged in, but as expected it reports I have 1 joystick.

With OpenXDK 0.6 binary release:

Prints to the screen:
"Names of the Joysticks are: Pad 0"

hitting buttons and moving analogs are not creating any events (not seeing the #'s being printed).

Trying with unplugging the other 2 joysticks, rebooting, and..

no events generated still sad.gif

I'll try a HAL example.. lets see what happens.

EDIT: Just tried a modified padTest.c (HAL example)

I modded it to only print values if they aren't 0x00, and to check all the buttons and analogs, etc.  nothing is getting updated! sad.gif

I'm gonna go look at the source but I doubt my abilities to find this bug.  Hopefully someone can figure it out, or verify a working environment for the joystick?
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 04, 2005, 01:46:00 PM
Further discovery:

I recompiled libhal.a with USB_DEBUG defined and checked the output during initialization.

in the code:
CODE

        int Ports = FindOHC( my_ohci, (void*)0xfed00000 );

#ifdef USB_DEBUG
        if( Ports==0 ) debugPrint("Error no ports found\n");
#endif //USB_DEBUG

        //for( int i=0; i        int i=0;
//      {
                int DEV = FindDev(my_ohci, i);
#ifdef USB_DEBUG
                switch (DEV)
                {
                        case 0: { sprintf(buf,"\n    *NO* device found at Port %d\n", i); }
                        case 1: { sprintf(buf,"\n    lowspeed-device found at Port %d\n", i); }
                        case 2: { sprintf(buf,"\n    fullspeed-device found at Port %d\n", i); }

                        .. prints buf to screen here (cut for brevity)..
        };
#endif //USB_DEBUG



the output to the screen is:
*NO* DEVICE FOUND AT PORT 0.
...

So I guess it's detecting the USB controller (I mean, like, UHCI.. not xbox controller..) but no xbox controllers?  I'll see, maybe it's detecting multiple ports and the 1st one isn't a controller port anymore?  I know that between the v1.0 and 1.2+ xboxes the usb configuration changed a bit..
so.. yeah.  I'm gonna keep looking into FindDev usage and whatnot and keep y'all posted on my findings.
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 04, 2005, 02:09:00 PM
(can't edit my above post.. not sure why..)

Well.. I tried testing to see if any devices are found on ANY of the ports (from 0 to 3).. and it returned
none on 0
none on 1
fullspeed on 2
none on 3

So.. I tried to force it to initialize device 2, but haven't had success yet.. but I'll keep this thread going if I figure out more.
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 12, 2005, 10:01:00 AM
I'm now reading the USB specs, OHCI specs, and HID specs with hope to be able to comprehend it all.
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 16, 2005, 12:01:00 PM
Hrm.. OpenXDK now seems to work at least to some extent with the X2 bios (that is what I use a lot of the time), but I don't know about the X3.  The reason that it has problems with a lot of bios is that hard-coded into the code in some places are memory pointers that are based on retail-based BIOSes, but iirc the Xecutor bioses are debug-bios based and so the memory pointers are wrong.

The pad input errors your getting aren't a bios issue anyways, I think someone accidentally introduced a bug into the code awhile ago.  Hopefully we get it sorted soon.
Title: Openxdk Pad Input Values
Post by: talos_ on January 20, 2005, 11:36:00 AM
Just for the record, I'm also experiencing the problems mentioned in previous posts, with the HAL X*Input() functions.
No input in the datastructure.

I have tried both the padTest program and my own test program.

My specs are: XBOX v1.4/1.5, Xecuter 2.3b Lite, Xecuter BIOS build 4982.
As you may notice I'm not even supposed to be able to execute OpenXDK xbe's (according to the BIOS feature diagram)

Has this been investigated properly, btw?
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 20, 2005, 01:25:00 PM
recently (as of OpenXDK 0.6 or CVS sometime after 0.5 release) there was a patch for supporting a wider array of bioses.  the X-S bios list hasn't been updated yet and shouldn't really because whether or not it's _fully_ supported is not really certain yet.

however these errors also happen on my other xbox running an evox bios so it's not just an xecutor bios issue.
Title: Openxdk Pad Input Values
Post by: d0wnlab on January 31, 2005, 09:30:00 AM
I'd suggest you start.  I'm beginning to work on it too but by no means have a lot of time to focus on this.
Title: Openxdk Pad Input Values
Post by: d0wnlab on February 01, 2005, 09:17:00 AM
I dunno.

Anyone try it with a large controller (like the original Xbox controller not the S-controller)?

they do have different model strings attached to them, maybe the openXDK doesn't realize this..  I haven't found that literal string yet but it's an idea I haven't fully tested yet
Title: Openxdk Pad Input Values
Post by: kennelbound on March 09, 2005, 12:38:00 AM
Is there anyone out there who has gotten this to work?  What is your system.  I am running a 1.0 w/X2 and I've tried it with Evox M7, M8, X2 4983 and iND 5003 all with no results.

Using SDL the joystick is recognized, but it can't read any values.

I have tried using an S-Controller and an X-Arcade, just to check if that would work.  Neither reads any values.

Just not sure what the heck is going on.
Title: Openxdk Pad Input Values
Post by: PedrosPad on March 09, 2005, 02:08:00 AM
QUOTE(kennelbound @ Mar 9 2005, 07:44 AM)
Is there anyone out there who has gotten this to work?  What is your system.  I am running a 1.0 w/X2 and I've tried it with Evox M7, M8, X2 4983 and iND 5003 all with no results.