PDA
$threadinfo[title]
-


devilsclaw
March 20th, 2008, 12:05
I bought a Univeral USB Convertor from Walmart (yeah I know Walmart is evil).
This convertor takes GameCube, PS2, XBox and USB as input types, It can take them all at once even. In windows 4 Devices show up even if only one controler is plugged in.

I Linux blight detects two controllers, first one does nothing, no button pressed detection. The second one works on the button detection, but it will not work in game unless I assign the first controler to one of the other 3 controllers in blight.

Since I would like to be able to use all 4 controllers but would not be able to because of how the convertor is handled, I made a patch tha makes it work with this convertor.

What the patch does is, It maps the controller handle to the correct controller slots if there assigned. If there not assigned it just opens all other joysticks just so I can use up to 4 controllers with these convertor boxs.

I know that in some case people would not want all controllers connected to be opened so im not suggesting this as a fix that needs to be put into release.



--- plugin.c 2008-03-17 18:16:04.000000000 -0700
+++ Mupen64Plus-1-3-RC1-src/blight_input/plugin.c 2008-03-20 03:43:34.000000000 -0700
@@ -1019,7 +1021,8 @@
void
RomOpen( void )
{
- int i;
+ int i, j, num_joys;
+ int joy_open = 0;

// init SDL joystick subsystem
if( !SDL_WasInit( SDL_INIT_JOYSTICK ) )
@@ -1030,15 +1033,25 @@
}

// open joysticks
+ num_joys = SDL_NumJoysticks();
+ for(j = 0; j < num_joys;++j)
+ {
+ joy_open = 0;
for( i = 0; i < 4; i++ )
- if( controller[i].device >= 0 )
+ {
+ if(!controller[i].joystick)
+ if( controller[i].device == j)
{
controller[i].joystick = SDL_JoystickOpen( controller[i].device );
if( controller[i].joystick == NULL )
fprintf( stderr, "["PLUGIN_NAME"]: Couldn't open joystick for controller #%d: %s\n", i, SDL_GetError() );
+ else joy_open = 1;
}
else
controller[i].joystick = NULL;
+ }
+ if(!joy_open) SDL_JoystickOpen( j );
+ }

// grab mouse
if (controller[0].mouse || controller[1].mouse || controller[2].mouse || controller[3].mouse)

ebenblues
March 28th, 2008, 16:06
Thanks for the contribution! I added your patch to the mupen64plus issue tracker:

http://code.google.com/p/mupen64plus/issues/detail?id=25

Tillin9
April 3rd, 2008, 13:43
Is this the device? http://www.chinagameware.com/display/ft8d91_ps2_xbox_gc_to_pc-usb_converter.shtml

If so its a Gamemon FT8D91. A number of reports online suggest that it works out of box with linux, some older ones suggest there are remapping problems.

That begs the questions a) What kernel are you using? b) Are there issues in other linux games?

devilsclaw
April 7th, 2008, 10:04
yes thats the device.

Im running the kernel version 2.6.24.3

im using the GameCube controller slot.

im sure depending on the slot you use. ie xbox or maybe ps2. it might work with out any problems. since one of them will be device one when it shows up.

gszx1337
June 2nd, 2008, 04:36
I hate to zombify this thread, but how do you intall or run this patch?

MasterPhW
June 2nd, 2008, 11:23
I hate to zombify this thread, but how do you intall or run this patch?
You didn't zombify the thread it's only 2 months old.
Like I know the M+ devs the patch was probably already added to the trunk, so if you will get the newest svn code you probably already got the patch applied, but I would wait till a M+ dev reply.

gszx1337
June 2nd, 2008, 18:58
You didn't zombify the thread it's only 2 months old.
Like I know the M+ devs the patch was probably already added to the trunk, so if you will get the newest svn code you probably already got the patch applied, but I would wait till a M+ dev reply.
I DLed the latest version of Mupen64+ and my Universal adapter still wouldn't work.

okaygo
June 2nd, 2008, 22:42
By latest version do you mean you built from the following:
16:42 < okaygo`work> .latest
16:42 <@Mupen64PlusAgent> Mupen64Plus is currently at r495

There have been quite a few changes to blight input since 1.3, please try rebuilding from source or trying to find a newer build posted in the sub-forum...

I am moving this post to Mupen64Plus.

ebenblues
June 3rd, 2008, 20:25
We have an issue open to track applying this patch to the code:

http://code.google.com/p/mupen64plus/issues/detail?id=25

It's assigned to me, but I haven't gotten a chance to look at it yet.

devilsclaw
July 3rd, 2008, 06:41
If you want I and update the patch to the newest version of the blight input.

I keep ending up coming back to this site since its the only open source n64 emulator that is worth looking at lol. I was side tracked by WII64 which uses this engine.

okaygo
July 3rd, 2008, 16:14
Feel free to.

nmn
July 3rd, 2008, 22:44
If you want I and update the patch to the newest version of the blight input.

I keep ending up coming back to this site since its the only open source n64 emulator that is worth looking at lol. I was side tracked by WII64 which uses this engine.

Wii64 is based off of vanilla Mupen64.