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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 54 55 56 57 58 ... 321 Next »

Wii Remote and Dolphinbar. How do you exit games?
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Wii Remote and Dolphinbar. How do you exit games?
09-14-2015, 11:17 PM
#1
Magic815 Offline
Junior Member
**
Posts: 18
Threads: 6
Joined: Aug 2015
When you are using an actual Wiimote connected through the Dolphinbar, how do you all exit your Wii games? My first instinct was to hit the 'Home' button, then select 'Wii Menu' then 'Return to Wii Menu: Yes' as a way to exit the game. However, this gives me an error because I haven't done a NAND dump, so I don't have my Wii Menu setup within Dolphin.

I don't really have a need for the Wii Menu. I have each Wii game available within my Kodi Media Center where I use 'Advanced Launcher' to load each individual ISO through Dolphin if I select that game in Kodi. Kodi then launches each ISO with the conditions '/b /e' so that it will send focus back to Kodi when Dolphin is exited. My problem is finding the best way to exit Dolphin when using a Wiimote.

For Gamecube games, I use a PS3 controller where I mapped the escape key on the keyboard to when I hold down the 'select' button for more than 3 seconds. This works perfect.

But for Wii games, where I'm using the Wiimote, I can't figure out how to do anything similar as a means to escape out of Dolphin when I'm done playing. Is there a way in Dolphin to map a Wiimote button to the escape key? My worry is that the Dolphinbar being in the middle of the controller and PC complicates things.

Any help is appreciated!
Find
Reply
09-14-2015, 11:58 PM
#2
MayImilae Offline
Chronically Distracted
**********
Administrators
Posts: 4,616
Threads: 120
Joined: Mar 2011
Um, hit escape on your keyboard? Tongue

But there's no way to map functions unto real wiimote. Every button is being used anyway...
[Image: RPvlSEt.png]
AMD Threadripper Pro 5975WX PBO+200 | Asrock WRX80 Creator | NVIDIA GeForce RTX 4090 FE | 64GB DDR4-3600 Octo-Channel | Windows 11 22H2 | (details)
MacBook Pro 14in | M1 Max (32 GPU Cores) | 64GB LPDDR5 6400 | macOS 12
Find
Reply
09-15-2015, 12:35 AM
#3
Magic815 Offline
Junior Member
**
Posts: 18
Threads: 6
Joined: Aug 2015
(09-14-2015, 11:58 PM)MaJoR Wrote: Um, hit escape on your keyboard? Tongue

But there's no way to map functions unto real wiimote. Every button is being used anyway...

My computer is upstairs. I have it driving my media center which sends the signal down to my living room TV. So I'm trying to exit the game via controller on my living room couch (like you can do with an actual Wii).

I was hoping there would be a better way than to walk upstairs and hit escape on my keyboard, then walk back downstairs.

Are you saying they can't be mapped because all the buttons are already used? Or that it can't be mapped regardless? What about if a combination of buttons or a long press of a button was mapped? If dolphin can't do it, could a third party mapping program work? (like Xpadder with my PS3 controller?).
Find
Reply
09-15-2015, 01:30 AM
#4
AnyOldName3 Offline
First Random post over 9000
*******
Posts: 3,533
Threads: 1
Joined: Feb 2012
While it won't solve the OP's problem immediately, is there any reason why we can't map the power button on a Wiimote to quit emulation at some point in the future? On a real console, holding it in would shut it down, so surely it's sensible for Dolphin to do its closest equivalent action.
OS: Windows 10 64 bit Professional
CPU: AMD Ryzen 5900X
RAM: 16GB
GPU: Radeon Vega 56
Find
Reply
09-15-2015, 02:10 AM
#5
MayImilae Offline
Chronically Distracted
**********
Administrators
Posts: 4,616
Threads: 120
Joined: Mar 2011
The mapping for emulation functions to your PS3 controller would still work, even if you are using your real wiimote! So you could just bring the PS3 controller with you and use it to stop emulation Dolphin?
[Image: RPvlSEt.png]
AMD Threadripper Pro 5975WX PBO+200 | Asrock WRX80 Creator | NVIDIA GeForce RTX 4090 FE | 64GB DDR4-3600 Octo-Channel | Windows 11 22H2 | (details)
MacBook Pro 14in | M1 Max (32 GPU Cores) | 64GB LPDDR5 6400 | macOS 12
Find
Reply
09-15-2015, 02:31 AM (This post was last modified: 09-15-2015, 02:36 AM by Magic815.)
#6
Magic815 Offline
Junior Member
**
Posts: 18
Threads: 6
Joined: Aug 2015
(09-15-2015, 02:10 AM)MaJoR Wrote: The mapping for emulation functions to your PS3 controller would still work, even if you are using your real wiimote! So you could just bring the PS3 controller with you and use it to stop emulation Dolphin?

Yes, I could do that as well. So it sounds like as programmed today, my two options are to either leverage a keyboard in another room, or use a controller that was not used in playing the game to send an escape command.

But I'll echo the idea AnyOldName3 brought up. Is there a reason the devs wouldn't want to just use the Wii power button? It shuts off the real life Wii - don't we want to be emulating that experience? Obviously it's time and energy spent by a dev to add that in, but I wasn't sure if there was another reason it wouldn't want to be coded that way.

Maybe I should make that a feature request?
Find
Reply
03-28-2016, 05:27 AM
#7
jmorriz Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Feb 2016
I found a way to make Dolphin exit with the Wiimote.  It is a little complex, but I am very happy with it.

In Dolphin, Click View->Log Configuration, enable "OSReport" and "Write to File".

This causes Dolphin to write OS events to the log file in:
...\Documents\Dolphin Emulator\Logs\dolphin.log

I wrote a separate program to monitor the log file, and when it sees the exit sequence it sends an "Escape" keystroke to Dolphin.  The exit sequence is:

HW\\EXI_DeviceIPL.cpp:393 N[OSREPORT]: EXI IPL-DEV: write 0 at a1000800

So now, when a user selects "Home"->"Wii Menu" with the Wiimote, it exits Dolphin back into my frontend program.
Find
Reply
10-18-2016, 03:20 AM
#8
jmorriz Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Feb 2016
(03-28-2016, 05:27 AM)jmorriz Wrote: I found a way to make Dolphin exit with the Wiimote.  It is a little complex, but I am very happy with it.

In Dolphin, Click View->Log Configuration, enable "OSReport" and "Write to File".

This causes Dolphin to write OS events to the log file in:
...\Documents\Dolphin Emulator\Logs\dolphin.log

I wrote a separate program to monitor the log file, and when it sees the exit sequence it sends an "Escape" keystroke to Dolphin.  The exit sequence is:

HW\\EXI_DeviceIPL.cpp:393 N[OSREPORT]: EXI IPL-DEV: write 0 at a1000800

So now, when a user selects "Home"->"Wii Menu" with the Wiimote, it exits Dolphin back into my frontend program.


Someone asked me to post the Java code I'm using.  You'll need some Java knowledge to put it into your own executable program.  Here it is:

Code:
               BufferedReader in = null;
               try {
                   File file = new File(Config.DOLPHIN_LOG);
                   String line;
                   boolean sentEscape = false;
                   while (process.isAlive()) {
                       if (in == null && !file.exists()) {
                           Thread.sleep(5000);
                       } else {
                           if (in == null) {
                               in = new BufferedReader(new FileReader(file));
                           }
                           while ((line = in.readLine()) != null) {
                               if (line.endsWith("N[OSREPORT]: EXI IPL-DEV: write 0 at a1000800")) {
                                   // wii menu was selected.  tell dolphin to exit
                                   Robot robot = new Robot();
                                   robot.keyPress(KeyEvent.VK_ESCAPE);
                                   sentEscape = true;
                               }
                           }
                           if (sentEscape) {
                               for (int i = 0; i < 5; i++) {
                                   if (process.isAlive()) {
                                       Thread.sleep(1000);
                                   }
                               }
                               if (process.isAlive()) {
                                   Runtime.getRuntime().exec("taskkill.exe /F /IM Dolphin.exe");
                               }
                           }
                       }
                   }
               } catch (Exception e) {
                   e.printStackTrace();
               }
               try { if (in != null) in.close(); } catch (Exception e) {}
Find
Reply
10-18-2016, 04:18 AM (This post was last modified: 10-18-2016, 04:18 AM by leolam.)
#9
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
That's pretty hacky, since you're relying on the fact that launching the system menu produces a log message, which may not always be the case (and there may be false positives). Though that's probably the only way right now…

The proper way would be using the Wiimote's power button, just like it's done on a real Wii, but that isn't working for some reason currently.

Quote:Is there a reason the devs wouldn't want to just use the Wii power button?
Unfortunately a very, very common misconception. It's not that devs don't want to support it. It's that no one has done it yet. Dolphin is an open-source project; if someone wants that to happen, they have to look into it. It is as simple as that.
Website Find
Reply
10-18-2016, 12:50 PM
#10
jmorriz Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Feb 2016
(10-18-2016, 04:18 AM)leolam Wrote: That's pretty hacky, since you're relying on the fact that launching the system menu produces a log message, which may not always be the case (and there may be false positives). Though that's probably the only way right now…

The proper way would be using the Wiimote's power button, just like it's done on a real Wii, but that isn't working for some reason currently.

Unfortunately a very, very common misconception. It's not that devs don't want to support it. It's that no one has done it yet. Dolphin is an open-source project; if someone wants that to happen, they have to look into it. It is as simple as that.

Yeah, I agree it's very hacky.  I wish I was good enough at C++ to help with the real codebase.  In the meantime, this is just a temporary solution.  I will say, it has worked very reliably for me though.  I've never seen it fire incorrectly or fail to fire, so it seems like a good workaround since I really wanted that functionality in my system.
Find
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