Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    EmuTalk Member
    Join Date
    Mar 2008
    Posts
    3

    Mupen64Plus - blight-input patch

    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.


    Code:
    --- 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)




    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Mupen64Plus Dev.
    Join Date
    Feb 2008
    Location
    USA
    Posts
    144
    Thanks for the contribution! I added your patch to the mupen64plus issue tracker:

    http://code.google.com/p/mupen64plus...s/detail?id=25
    "The humble learn the fastest because they don't waste time on defending a false image."

  3. #3
    Mupen64Plus Dev.
    Join Date
    Jul 2006
    Location
    Middletown, CT
    Posts
    130
    Is this the device? http://www.chinagameware.com/display...onverter.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?

  4. #4
    EmuTalk Member
    Join Date
    Mar 2008
    Posts
    3
    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.
    Last edited by devilsclaw; April 7th, 2008 at 09:07.

  5. #5
    EmuTalk Member
    Join Date
    Jun 2008
    Posts
    2
    I hate to zombify this thread, but how do you intall or run this patch?

  6. #6
    Master of the Emulation Flame MasterPhW's Avatar
    Join Date
    May 2004
    Location
    come-to-hell
    Posts
    1,978
    Quote Originally Posted by gszx1337 View Post
    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.
    The Future of Emulation: Emulate a High End Computer on a Low End System
    Main: Intel Core i7 (Lynnfiled) 860 (@3.802Ghz) | 8 GB DDR3-1333 | ATI XFX HD 5750 PCI-E | ATI High Definition Audio Device | 256 GB SSD + 3 TB Internal SATA2 + 4 TB external | Windows 7 Professional X64 SP1 MSDNAA
    Netbook: Asus EeePC 1015PEM | Intel Atom Dual Core N550 (1,5GHz) | 2GB DDR3-1066 | Intel GMA 3150 | 250GB HDD | Win 7 Starter
    Old One: AMD Athlon 64 X2 4200+ (2x2.5Ghz; S939) | MSI KbT Neo2-F V2.0 | 2x1GB Corsair Value VS1GBKIT400 | Radeon HD 3850 512 MB/AGP8x | Creative SB Audigy LS | 2TB (4x500GB SATA2 HDDs Raid0) | Windows 7 Business X64 SP1 MSDNAA



  7. #7
    EmuTalk Member
    Join Date
    Jun 2008
    Posts
    2
    Quote Originally Posted by MasterPhW View Post
    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.

  8. #8
    Mupen64Plus Dev.
    Join Date
    Jun 2007
    Posts
    127
    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.

  9. #9
    Mupen64Plus Dev.
    Join Date
    Feb 2008
    Location
    USA
    Posts
    144
    We have an issue open to track applying this patch to the code:

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

    It's assigned to me, but I haven't gotten a chance to look at it yet.
    "The humble learn the fastest because they don't waste time on defending a false image."

  10. #10
    EmuTalk Member
    Join Date
    Mar 2008
    Posts
    3
    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.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •