Author Topic: Custom Gamepad (and Touchpad) Layouts!  (Read 241124 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #60 on: January 14, 2013, 10:26:10 AM »
Sorry, the instructions no longer apply in the new front-end.  I'll update them.  You should be able to just unzip a layout somewhere, then point to that folder from the Settings->Input->Touchscreen->Custom layout folder (need to choose "Custom" for the Touchscreen layout option to enable it)
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 jonjon

  • byte
  • *
  • Posts: 31
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #61 on: January 15, 2013, 09:38:29 AM »
Thanks for the reply. Just pointing the custom controller option to the right folder was the first thing I tried but on what ever build I was on at the time this wouldn't work.

... Works great now on rc6 though so thanks for the clarification

Offline wtdanceisthrough

  • bit
  • Posts: 5
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #62 on: January 26, 2013, 04:07:35 PM »
Hi there,

On my handset (Samsung Galaxy S3) I tend to find the "A" and "B" buttons are too close together - it is all too easy to press the wrong one or press nothing at all when you intended to press "B". Is it possible to get a layout where the controls are a bit more spaced out or does one already exist?

Also, I thought it would be useful to have a layout which perhaps only has the control stick and no other buttons but it is a lot bigger. It is currently quite difficult to make the precision moves required for walking across very thin platforms such as in 3D platformers like "Banjo Kazooie" - mostly because the control stick is small in the corner. If we had a layout we could perhaps switch to while in the middle of such a maneuver and switch back afterwards, we would be able to make these tiny adjustments required.

Thanks,
Adam.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #63 on: January 26, 2013, 04:33:40 PM »
I probably should make an XHDPI version of the virtual gamepad, since the small controls has been brought up before.  The difficulty is the "corner cases", where the app has to make a decision based on the screen resolution and dimensions, whether to use the tiny, small, medium, or large button images, and whether to use a tablet layout or a phone layout.  It still gets this wrong on some devices, and adding another choice to the mix increases the likelyhood of wrong choices being made.

That said, I can throw together a couple custom layouts that you can add manually.
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 Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #64 on: January 26, 2013, 04:39:13 PM »
A long-term solution for this problem will be to rework the code so that a single set of images (in xhdpi) are scaled down based on the screen density.  Then the only decision the app will have to make is whether to use the layout for tablets or for phones.  I'll probably do it by adding a new flag to the layout syntax, so that existing custom layouts won't stop working, but future ones can be designed for xhdpi and work on any device.
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 wtdanceisthrough

  • bit
  • Posts: 5
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #65 on: January 26, 2013, 05:16:11 PM »
I probably should make an XHDPI version of the virtual gamepad, since the small controls has been brought up before.  The difficulty is the "corner cases", where the app has to make a decision based on the screen resolution and dimensions, whether to use the tiny, small, medium, or large button images, and whether to use a tablet layout or a phone layout.  It still gets this wrong on some devices, and adding another choice to the mix increases the likelyhood of wrong choices being made.

That said, I can throw together a couple custom layouts that you can add manually.

Hi Paul,

Any help you could provide would be much appreciated.

I am guessing any layouts you produce would also be backwards-compatible with earlier versions of the app? (see my other thread on button auto hold)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #66 on: January 26, 2013, 05:23:36 PM »
Yes, the syntax for the virtual gamepad layouts hasn't changed since Alpha testing, so currently all layouts will work on any version of the app.  Once I do add some new flags to the syntax at some point, then the new layouts that use it will not be backward compatible (but in your case, you won't need them to be -- since you are after button auto-hold behavior)
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 DShiznit

  • bit
  • Posts: 1
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #67 on: February 20, 2013, 10:37:57 AM »
I just bought Mupen64+AE (after using the free one for half a year before then) and one of the things that attracted me most to it was the customizable controls. I've done scripted GUIs before in TGE, so this should be a cakewalk, but I'm wondering if there are any tools or guides that could help? I'm planning to make a tablet layout for Turok and other FPS games, with the C-buttons on the left and the analog on the right (I didn't see any like this skimming the topic but if there is one and I missed it feel free to let me know).

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #68 on: February 20, 2013, 10:51:18 AM »
See here.

The short answer is
 1. Copy one of the folders in <sdcard>/Android/data/paulscode.android.mupen64plus/skins/gamepads to some other folder on your sd card.
 2. In Mupen, go to Settings->Input->Touchscreen->Touchscreen layout and select 'Custom'.
 3. In the 'Custom layout folder' option below it, choose the new folder you created (the one containing pad.ini).
 4. In a text editor, open pad.ini and tweak the x= and y= values to reposition the button sets (values are in percent of screenwidth/height)
 5. Open Mupen and launch a game to see what the skin looks like.
 6. Repeat steps 4-5 until you have something that you like.
« Last Edit: February 20, 2013, 10:53:50 AM by littleguy »
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline williansti

  • bit
  • Posts: 2
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #69 on: March 17, 2013, 12:31:23 PM »
First hello to all, I would like to share with you, my contribution to the question of controls, hope you like it, I thought the style of ppsspp. I use a galaxy note 1





Download newbielink:http://www.mediafire.com/?x41bk7be8atzaxa [nonactive]

I could not believe mupen64ae I now see that the emulator is very good, I am your fan pauls, continue this excellent work, forgive me for mistakes I'm using translator...

greetings to all of Brazil!

Offline ThisIsNotMyName

  • bit
  • Posts: 3
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #70 on: April 12, 2013, 04:13:28 PM »
Can this be used to implement dead zones, or does that have to be coded in separately first?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #71 on: April 12, 2013, 04:53:52 PM »
Deadzones can be specified in a custom layout, yes.  Here is the relevant section from the documentation:

The first parameter "min" is the radius percentage that is is the "dead zone".  Touching within this zone will not move the control.  The next parameter "max" is the radius percentage where the control becomes "full throttle".  The final parameter "buff" is the radius percentage beyond "max" that is still part of the control.  Touching within this zone will be considered full throttle.  Touching outside this zone will not register as touching the control.  The values for "max" and "buff" should add up to at least 100, and can be higher than 100 if desired (be careful not to overlap with other buttons in the layout).
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 ThisIsNotMyName

  • bit
  • Posts: 3
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #72 on: April 13, 2013, 10:20:21 PM »
Thank you. Not quite sure how I missed it the first time I read it.   :-[

Offline Mikhail

  • long
  • ***
  • Posts: 127
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #73 on: June 08, 2013, 02:54:27 AM »
http://www.mediafire.com/file/u55pifc7w3aew5x/Shupad.zip

tidied up and packaged not to conflict with original




Any chance of a d-pad version?

Offline Zaion47

  • bit
  • Posts: 1
    • View Profile
Re: Custom Gamepad (and Touchpad) Layouts!
« Reply #74 on: June 09, 2013, 01:35:18 AM »
Is it possible to get a clone of the N64oid on screen controls? I'm on the Galaxy S3