Author Topic: Xbox 360 wireless pad support, usb wireless reciever  (Read 10470 times)

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #7 on: August 12, 2013, 04:13:08 PM »
Nice to know, I'll try that if I find another emulator where I can't map the quit button and use my xpadder trick ;)

I might even try it even if my trick is working for now, as I like to be curious and try things :(

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #6 on: August 12, 2013, 03:22:54 PM »
If you only need to map the escape key you can use this style of autoit script.

Code: [Select]
Local $joy,$coord,$h,$s,$msg
$joy    = _JoyInit()


If $CmdLine[0] == 1 Then
   Run ( '"snes9x.exe" -fullscreen "' & $CmdLine[1] & '"' )
   
   $coord=_GetJoy($joy,0)
   
   While $coord[7] <> 1
  $coord=_GetJoy($joy,0)
  Sleep(500)
   WEnd
   
   WinClose ( "Snes9X")
   
   $lpJoy=0 ; Joyclose
 
EndIf

exit 0





;======================================
;   _JoyInit()
;======================================
Func _JoyInit()
    Local $joy
    Global $JOYINFOEX_struct    = "dword[13]"
    $joy=DllStructCreate($JOYINFOEX_struct)
    if @error Then Return 0
    DllStructSetData($joy, 1, DllStructGetSize($joy), 1);dwSize = sizeof(struct)
    DllStructSetData($joy, 1, 255, 2)             ;dwFlags = GetAll
    return $joy
EndFunc
;======================================
;   _GetJoy($lpJoy,$iJoy)
;   $lpJoy  Return from _JoyInit()
;   $iJoy   Joystick # 0-15
;   Return  Array containing X-Pos, Y-Pos, Z-Pos, R-Pos, U-Pos, V-Pos,POV
;          Buttons down
;
;          *POV This is a digital game pad, not analog joystick
;          65535   = Not pressed
;          0       = U
;          4500 = UR
;          9000 = R
;          Goes around clockwise increasing 4500 for each position
;======================================
Func _GetJoy($lpJoy,$iJoy)
    Local $coor,$ret
    Dim $coor[8]
    DllCall("Winmm.dll","int","joyGetPosEx", _
            "int",$iJoy, _
            "ptr",DllStructGetPtr($lpJoy))
    if Not @error Then
        $coor[0]    = DllStructGetData($lpJoy,1,3)
        $coor[1]    = DllStructGetData($lpJoy,1,4)
        $coor[2]    = DllStructGetData($lpJoy,1,5)
        $coor[3]    = DllStructGetData($lpJoy,1,6)
        $coor[4]    = DllStructGetData($lpJoy,1,7)
        $coor[5]    = DllStructGetData($lpJoy,1,8)
        $coor[6]    = DllStructGetData($lpJoy,1,11)
        $coor[7]    = DllStructGetData($lpJoy,1,9)
    EndIf
    return $coor
EndFunc

with this code you can exit from snes only with joystick (button 1)

But to simplify our work (I m lazzy) , perhaps the dev can add an option to use a sendkey function with the same button we wil use to quit the front end.

eg button 8 to exit Mgalaxy AND Sendkey(Escape)

With this we can keep all ours olds autoits scripts ^^
« Last Edit: August 12, 2013, 03:32:16 PM by Aeliss »

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #5 on: August 12, 2013, 01:51:35 PM »
Yeah, but I try to do a computer hooked to my TV, and so which don't need the use of a keyboard  ;) (so closing apps is not really couch friendly  ;D)

But yeah, the next version will probably be perfect. Right now, when I boot that PC, Steam auto start in big picture mode (big picture let you control steam with a pad, in full screen mode) and I can start mGalaxy and my others games with my pad from Steam. So with the next version which will support the pad in mGalaxy gui, it should be perfect  :)

About Mame, I finally found you can map the escape key to a button (the label is called "IU_cancel" in the options) so I can quit it with the pad (by pressing the right stick).

For other emulators, like FBA, I put xpadder to be run at the start of windows, and I only mapped the escape button on the combo : LB (hold) + pression on the right stick, as the emulator don't able to map it directly.

I played a lot of games and I never saw a game which used that configuration (Hold LB + pression on right stick) for something, so I don't think it'll ever be a problem and I think I will be able to run xpadder all the time without closing it.

mGalaxy looks really nice anyway :)
« Last Edit: August 12, 2013, 01:55:11 PM by davhuit »

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #4 on: August 12, 2013, 01:35:42 PM »
It s because mame don't support xpadder (rawinput instead of directinput).

But you are right, on others emulators you have 50% of chance to have the button 1 and  50% to have the key "X". ATM you can desactivate xpadder before using the input configuration in the emulator to avoid this.
But you can have somes problems : if you use the button 1 to jump and if this one if associated in xpadder at the key "1" you can for exemple disable some layers in nes emulator at every jump ^^.

The new version will prevent lot of headhache  :)

Xpadder can be loaded automatically at startup and can recognize your pads, but I m agree with you , It s not a solution, I prefer use it in a script for system that don't support pad and unload at emulator close.
« Last Edit: August 12, 2013, 01:52:08 PM by Aeliss »

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #3 on: August 11, 2013, 10:11:43 PM »
Won't it be a problem to use xpadder/joy2key to control the frontend, once you run a game? (buttons conflict between Mame's one and xpadder/joy2key active ones?)

I didn't try it yet (actually setuping everything to try) but I was wondering.

What I mean, in case it's not clear is, let's say I map X, S, D, F to Buttons 1, 2, 3, 4 in xpadder/joy2key. When I'll press those buttons in-game, will mGalaxy also detect as if I pessed X, S, D or F which might be mapped to some menu actions?

Anyway, I'm looking forward for a new version which native pad support, I just discovered mGalaxy a few minutes ago and it seems really nice for what I'm actually doing, building a Gaming PC under my TV which don't require any use of keyboard/mouse (I'm actually using Steam Big Picture to load all my apps/games, even non-steam ones, which is loaded during the boot of my computer, so if I could control every emulator with a controller, that would just be perfect ^^).

Edit : I did some tries and it seems joy2key mapping is ignored in-game, which is a good thing, except that as the mapper seems ignored in-game, you can't use the "escape" key mapped to a button of the pad, which mean you can't seem to exit the game without a keyboard (but even if it was possible, I think the joy2key/xpadder program might be a problem for some others appz/windows, and also require a mouse or keyboard to be started/closed).

Though, nice work, it seems great :) I registered to the newsletter and might give it another go when it'll have native pad support :)

« Last Edit: August 11, 2013, 11:19:08 PM by davhuit »

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1186
    • Email
Re: Xbox 360 wireless pad support, usb wireless reciever
« Reply #2 on: June 16, 2013, 04:46:05 PM »
Hello and welcome!
You'll have to use an application which convert gamepad input to keyboard input.
You'll find a link to 2 of those on the download page, under 'Gamepad utilities'

bin

  • Newbie
  • *
  • Posts: 1
Xbox 360 wireless pad support, usb wireless reciever
« Reply #1 on: June 16, 2013, 02:24:46 PM »
Hi,

I've discovered mGalaxy few days ago and was really impressed. I read it supports joysticks but when I connect my Xbox 360 wireless pad it doesn't respond in any case. I have this pad connected to my PC by wireless receiver and it works with MAME without any problems.

Does mGalaxy supports Xbox pads?