• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 432 433 434 435 436 ... 1189 Next »

GC Controller Inputs via named pipes
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
GC Controller Inputs via named pipes
12-05-2015, 09:30 AM
#1
IR_ Offline
Junior Member
**
Posts: 10
Threads: 2
Joined: Dec 2015
I recently saw that as of dolphin revision 4.0-8065, dolphin supports receiving gamecube controller inputs via named pipes. I looked around but could not find any documentation for how one would achieve this.

I then browsed through the code which was helpful and tried this
1) created a dir in /usr/share/dolphin-emu/sys/ with the name "Pipes"
2) created a named pipe called "pipe' in this directory.

then, to test whether the pipe had worked, I started up dolphin, set the controller settings to "Standard Controller" for both port 1 and 2 (the others were at "none") and plugged my controller into the adapter in slot 1. I started up the game (In this case super smash brothers melee for the nintendo gamecube) and did:
Code:
sudo su
echo 'a' > pipe

nothing happened. the a button was not pressed.


If anyone has any knowlodge on named pipes for controlling dolphin, that would be helpful.

tl:dr How do I send GC controller inputs to Dolphin via named pipes?
Find
Reply
12-05-2015, 09:31 AM
#2
IR_ Offline
Junior Member
**
Posts: 10
Threads: 2
Joined: Dec 2015
also, if anyone could contact spxtr, the creator of this feature, that would be great. i don't know if he has an account on the forums. thanks all.
Find
Reply
12-08-2015, 06:34 AM (This post was last modified: 12-08-2015, 06:38 AM by leolam. Edit Reason: Added a link )
#3
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
Not a developer here, but…

You don't have to (and imo, you simply shouldn't) create the Pipes directory in the global system directory; you could just create it in your local, user-specific .dolphin-emu (located at ~/.dolphin-emu normally).

So to create the pipe:
Code:
mkdir ~/.dolphin-emu/Pipes
cd ~/.dolphin-emu/Pipes
mkfifo pipe

According to comments left in the code by spxtr, valid commands are as follows:

Code:
// To create a piped controller input, create a named pipe in the
// Pipes directory and write commands out to it. Commands are separated
// by a newline character, with spaces separating command tokens.
// Command syntax is as follows, where curly brackets are one-of and square
// brackets are inclusive numeric ranges. Cases are sensitive. Numeric inputs
// are clamped to [0, 1] and otherwise invalid commands are discarded.
// {PRESS, RELEASE} {A, B, X, Y, Z, START, L, R, D_UP, D_DOWN, D_LEFT, D_RIGHT}
// SET {L, R} [0, 1]
// SET {MAIN, C} [0, 1] [0, 1]

So for example, you would do echo "PRESS X" > pipe to press the X button, "RELEASE X" to release it. Your syntax was incorrect, which is why Dolphin ignored your commands.

Also, merely creating the pipe is not enough: you have to go in the Controllers settings, and configure them to use the Pipe device as the controller device. Make sure to check Background Input or Dolphin won't take input from the pipe unless it is focused.
Website Find
Reply
12-08-2015, 06:36 AM (This post was last modified: 12-08-2015, 06:36 AM by leolam.)
#4
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
By the way, the pipe can be named anything you like, not just pipe.
Website Find
Reply
12-08-2015, 11:10 AM
#5
IR_ Offline
Junior Member
**
Posts: 10
Threads: 2
Joined: Dec 2015
thanks for all your help. this looks promising.
Find
Reply
12-08-2015, 12:00 PM (This post was last modified: 12-08-2015, 12:01 PM by IR_. Edit Reason: using [font=monospace] instead of [i] )
#6
IR_ Offline
Junior Member
**
Posts: 10
Threads: 2
Joined: Dec 2015
alright, it's almost working. I found the pipe, selected it, and tried to send commands to it. Unfortunantly dolphin does not recieve inputs. Background input is true, and I have tried various deviations from echo "PRESS START" > pipe but to no avail. I tried cat pipe then entered my command in a different terminal and cat displayed it properly, so it should be working??
Find
Reply
12-08-2015, 06:41 PM
#7
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
That's weird. Did you also configure the button mappings?
Website Find
Reply
12-08-2015, 09:19 PM
#8
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,827
Threads: 10
Joined: May 2012
(12-05-2015, 09:31 AM)IR_ Wrote: also, if anyone could contact spxtr, the creator of this feature, that would be great. i don't know if he has an account on the forums. thanks all.

He is on IRC very often: #dolphin-dev @freenode
Find
Reply
12-09-2015, 08:37 AM
#9
IR_ Offline
Junior Member
**
Posts: 10
Threads: 2
Joined: Dec 2015
(12-08-2015, 06:41 PM)leolam Wrote: That's weird. Did you also configure the button mappings?

no, i didn't configure them. I pressed 'clear' before setting device to Pipe/0/pipe
Find
Reply
12-09-2015, 12:30 PM
#10
spxtr
Unregistered
 
You need to configure them like a regular controller, by sending "PRESS A" after pressing the A button button, and so on. It's a pain, I know, but you only have to do it once. Might be worth making a default config for these.
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode