Author Topic: Gamepad missing axis  (Read 3848 times)

Offline Sarkie

  • byte
  • *
  • Posts: 22
    • View Profile
Gamepad missing axis
« on: October 07, 2012, 08:24:01 AM »
Hi,

I have a bog standard usb gamepad (that looks like PS2 controller) I use, problem is some of the controls get mapped twice or don't get mapped at all.

By using this app:
https://play.google.com/store/apps/details?id=org.bostwickenator.joystick

I am able to see what they are.

DPAD:
Up =         AXIS_HAT_Y=-1
Down=     AXIS_HAT_Y=1
Left=        AXIS_HAT_X=-1
Right=    AXIS_HAT_X=1

Left Analog:
Up =         AXIS_Y=-1
Down=     AXIS_Y=1
Left=        AXIS_X=-1
Right=    AXIS_X=1

Right Analog:
Up =         AXIS_Z=-1 (Actually 0.74~)
Down=     AXIS_Z=1
Left=        AXIS_RZ=-1
Right=    AXIS_RZ=1

I don't know if it easy to add the extra stuff or not. Cheers.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Gamepad missing axis
« Reply #1 on: October 07, 2012, 10:38:18 AM »
Are you using an IME to link the joystick with the emulator, or just going raw?  If the latter, the next version will support axes, hopefully it might fix your problem (although I'm not sure about the twice-mapping part - I typically just see axes not being mappable at all)

BTW, if you want to try an IME, go with USB/BT Joystick Center, which is currently supported by the emulator.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Gamepad missing axis
« Reply #2 on: October 07, 2012, 08:14:17 PM »
If you are running Android 3.1 or later, all axes and controller buttons will be readable in the next release of Mupen64PlusAE.  I can confirm this because I helped develop that part of the code, and I have tested on a number of very different controllers.

The current M64PAE release (1.9.2) does not see all of the analog axes, and maps both the D-pad and (typically) the left analog stick to the same key codes (I believe the arrow keys).  So that is why you see some things getting mapped twice.

As Paul said your options are to buy that particular IME, or wait for the next release.  I don't know when the latter will happen.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Gamepad missing axis
« Reply #3 on: October 07, 2012, 10:46:59 PM »
The next release probably won't be for a couple of months yet, because I'm still spending most of my free time doing interviews and networking to try and land a good software development job.  There are some big things that must be fixed before publishing the next update (mainly the broken load-state stuff, which if I am to fix it will require my main development PC which is currently in storage until we purchase a house).  I am sorry for the long delay in development.. hopefully it won't be too much longer before I can get back to programming for fun over the weekends.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Sarkie

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Gamepad missing axis
« Reply #4 on: October 08, 2012, 04:44:48 AM »
Cheers, I didn't see that app when I was looking.

I did get the latest test build down, but I only tested it on my Nexus One to see if the graphics bug had been fixed yet.

If I get the latest Source and do a build, it should include this fix?

No worries on time, this is a free and open source project and money comes first! :)

I was going to look into the code to see if I could help, mainly wanting it to render on my N1 :)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Gamepad missing axis
« Reply #5 on: October 08, 2012, 05:46:31 AM »
Load state is still broken in the latest source.  If I have time today, I'll branch the code from before the core update that broke things and merge in the joystick support.  That way you'll have a more useable app until I can fix the problem.

Also, if you'd like write access to the repository let me know your github username and I'll add you.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Sarkie

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Gamepad missing axis
« Reply #6 on: October 08, 2012, 06:16:34 AM »
I'll just create a fork for it and if I find anything, then I'll sent a pull request.

Anyone else building on Ubuntu or Linux?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Gamepad missing axis
« Reply #7 on: October 08, 2012, 08:52:22 AM »
I am building on Ubuntu.  Do you need any help setting up the development environment?
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Sarkie

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Gamepad missing axis
« Reply #8 on: October 08, 2012, 09:11:35 AM »
I'm free tonight, so I'll get it working, if not I'll post here.

I got it building ok on my Work pc running windows, I just had an issue with ant and paths I think.