mupen64, n64 controller connection


You can get Qjoypad from the repo. It is a PND and can go in the same folder as all your other PNDs. If internet works on your unit, simply use PNDstore or PNDManager for an easy install. After installing, run from the menu and it will add an icon to your taskbar. Open the controls editor from this icon. In the editor, pressing a button on the controller should highlight the relevant button name in the editor. Do this to test your controller and make sure it is being recognized. Once we have confirmed this, I can try to walk you through the rest. It seems complicated, but really just requires some perseverance and spending time in a text editor.

I went through the same thing, so I think I can help you make sense of it all.
 
thank you edgex004 for your help! I have now downloaded pndstore as well as qjoypad. But it somehow can't open qjoypad with pndstore (can't open it at all actually). I saved pndstore on the desktop and qjoypad on my ds card. Any suggestions? thanks again for helping me out!
 
PNDStore is simply an automatic download/install tool, you won't need to open any of your PND files with it. If you would like a download/install tool that can also launch your applications, definitely try out PNDManager. B-Zar has put a lot of time into polishing it and making it both powerful and user friendly.

You should perhaps take a second to look over some of the more basic manuals on the wiki (like this one) to understand more about the PND system.

I'll include the basics here, though. PND files (ex the download button here gives you "qjoypad.pnd") can be placed into one of four folders on your SD card:

<SD>/pandora/apps/ - App will appear both on Xfce Desktop & Pandora Menu (this is the 'both' option in PNDManager)

<SD>/pandora/desktop/ - App will appear on Xfce Desktop

<SD>/pandora/menu/ - App will appear in Pandora Menu

<SD>/pandora/mmenu/ - App will appear in MiniMenu ONLY (note: apps will appear in MiniMenu no matter which folder you choose)

PNDStore and PNDManager simply give an easy to use interface on your Pandora that will download and place the the PND files into the proper folder for you. You can easily perform this action for yourself if you have already downloaded the file. Simply put the PND into the folder of your choice and then run it from the location at which the app appears.

For example, since you already downloaded QJoyPad, if you place "qjoypad.pnd" into /pandora/desktop/ on your SD card, then you simply need to double click the icon that will appear on the XFCE desktop to run it. No entering PNDStore or PNDManager is necessary. Those programs just make finding, installing, removing, and updating apps more user friendly. A nice feature about the PND system: if you place files into the folders yourself, programs like PNDManager will be able to recognize this and treat them exactly if they were installed by the program itself.

So, anytime you find a random ".pnd" file you would like to run, just put it into whichever of those four folders you prefer, and it will appear in the appropriate location for you to execute the app.

(With how apps like PNDManager and PNDStore have matured, the usefulness of installing yourself has become somewhat limited: test PNDs that devs will upload on the forum, or an old PND that is maintained outside of the repo. Anything on the repo can be more easily downloaded and installed directly on a pandora with internet access by running PNDStore or PNDManager.)
 
okay. To be honest I had read the wiki once but that has been a long time ago. I will go over the basics again, sorry. Anyways, I have gotten Qjoypad to work now and I can detect all the inputs from my controller (so it is recognized). The following inputs are given by Qjoypad:

A = button 2

B = button 3

Start = button 10

R = button 8

L = button 7

C (left) = Axis 4

C (right) = Axis 4

C (down) = Axis 3

C (up) = Axis 3

Z = button 9

Analog stick (left) = Axis 1

Analog stick (right) = Axis 1

Analog stick (down) = Axis 2

Analog stick (up) = Axis 2

Analog stick (up-right/left) = Axis 2 and Axis 1

Analog stick (down-right/left) = Axis 2 and Axis 1

D pad (left) = Axis 5 and button 16

D pad (right) = Axis 5 and button 14

D pad (down) = Axis 6 and button 15

D pad (up) = Axis 6 and button 13

So all the inputs work perfectly.. Whats the next step? :)
 
Okay, almost there. Next you need to follow ptitsebs steps from before.

1. Pug in the controller, and make sure it is being detected (you can use QJoyPad and then quit or leave it open while you run Mupen).

2. Run the PND "Mupen64plus v2.1"

3. Load a game, preferably one that uses a lot of different buttons on the controller. I use Zelda games, because they are easy to know exactly what each button press should do. You should be able to use either the Pandora buttons or your controller, but the buttons on your controller might not be configured correctly yet.

4. If some of the buttons on the controller seem to have an effect, but are doing the wrong thing, make note of how each button press is responded to in Mupen. If you press the A button, does Mupen think the A button has been pressed, or does it think you hit Z? Write down as many as you can figure out without spending too much effort.

5. Press escape on the Pandora to quit, and again to quit Mupen.  Once you have done this, navigate to /tmp and look for the file "pndrun_mupen64plus2.out". ".out" files are created when a PND runs, and contain system status like CPU clock as well as the stuff that would usually should up in the command line when you run a program. These files are great for debugging!

6. Open your .out file in mousepad, and look for the few lines after Mupen is launched where plugins are initialized. There should be a line about controllers, and the controller profile used should be called out. When I have my Gamecube controllers plugged in, the profile [HuiJa USB GamePad] is loaded.

7. Now back to Mupen: run the app "Mupen64plus v2.1 Config". Click the "Config" button in the "Input plugin" section. Mousepad will open the .ini file "InputAutoCfg.ini" for you. In this file, find the section for the profile that was called out before.  If there is not a section already present that matches what was called out in your .out file, feel free to copy/paste another profile, but then give it the heading that matches your pad from the .out file.

At this point it is all about modifying your profile to fit your controller. you can try trial and error: start a game, hit some buttons, see what happens, write it down, look in your .ini profile, modify, repeat:

Oh, when I hit this button in mupen, A was pressed. Look in .ini file: A button is assigned to button (4) in the .ini. that must mean this button is refered to as button (4) in the .ini. If this button happens to be the Z-Trgger, change the Z-trig line in your .ini to say:

Z Trig = button (4)

Now a shortcut here that may or may not work for you is that Qjoypad has always sensed buttons for me in the same order as mupen, but just shifted by negative 1. For my pad, the button I want to be A shows up as button 6 in QJoyPad, so when I modify my .ini I write:

A Button = button(5)

Since you already have your list from Qjoypad written out, it should be much easier for you to figure out how Mupen is reading your pad.
 
I've gotten it to work now thanks!

Now the only thing left is that there is too much lag to play. how do I get mupen to downscale stuff? Couldn't find anything in the mupen thread.
 
^ Well there are config files for each video plugin in the appdata directory.. don't have my Pandora on me right now so can't give you much details.. However before that, are you using the gles2n64 video plugin? usually that one is the fastest.  sometimes you need change plugins per rom to make them work better.
 
Last edited by a moderator:
Yeah each rom tends to react differently to each plugin, which is why I love being able to save a different plugin for each rom.

Multiple controllers definitely introduces a slight amount of lag. I can usually compensate for this by testing the rom I want to play with each plugin, setting up a framebuffer (which I can look into later, but can't remember exactly how at the moment. Try the main Mupen thread maybe.), launching from Minimenu or Openbox can often be helpful, and going up to 1.2 GHz will usually get me to 100% with maybe just minor stuttering at loading areas.

Glad you got your controller up and running!

EDIT: Ah you already looked through the main Mupen thread... I feel like ptitSeb has given out info regarding the framebuffers before, but cannot remember where... I'll see what I can dig up.
 
Last edited by a moderator:
Back
Top