mdeguzis / RetroRig

(discontinued) Repository for XBMC Retro gaming on x86_64 Linux systems
Other
74 stars 12 forks source link

Use two different config directories for Wii and GameCube games #140

Closed Two-Tone closed 10 years ago

Two-Tone commented 10 years ago

Due to the huge difference in hardware requirements for emulation Wii games vs GameCube games RR should use two different config directories in order to maximize performance when emulating either system. This will also allow users the option to "unplug" the emulated Gamecube controller when doing Wii games. The reason for this is that if both a Wiimote and gamecube controller are emulated at the same time on a single controller, some games will have severe control issues (eg Mario Kart Wii or Brawl).

The command to choose a custom settings directory is

/path/to/dolphin/build/dolphin-emu -U /path/to/user/directory

As grabbed from here: https://dolphin-emu.org/docs/guides/controlling-global-user-directory/

Two-Tone commented 10 years ago

An advanced version of this feature would be the ability to set up different configs for different directories. But That may be outside of the project's scope.

beaumanvienna commented 10 years ago

That sounds like a great idea! We always have had performance issues with dolphin.

Do you want us to do this or would you like to make a pull request?

Do you know the right settings for DKCR for Wii? I've got a Nidia GTX780 at home, but it's still laggy sometimes and sound sucks. What hardware do you have?

Furthermore, we had to revert dolphin from version 4.0.2 to 4.0.0, because the first one was noticeably slower. Most likely a configuration issue as well. I could package the latest version of dolphin again and put it to our test repository at https://launchpad.net/~beauman/+archive/ubuntu/retrorig-testing. Would you then be able to optimize it to work equally or even faster then 4.0.0.?

Two-Tone commented 10 years ago

Sadly my linux partition is MIA due to a kernel panic I have been unable to resolve. I'm stuck on Windows for the moment.

Two-Tone commented 10 years ago

Swore I had mentioned this, but it's a good idea to update Dolphin to a recent git commit. The emulator has seen some serious performance improvements over the last few months and it's more accurate to boot.

And I mean serious. We're talking 200-400% increase in performance across all titles.

beaumanvienna commented 10 years ago

@Two-Tone : Excellent! I guess when we tried to use v 4.0.2 we still used the old configuration files. Back then I didn't package the current master branch, but tag "4.0.2". Give me one or two weeks, then I'll be back from my holidays. I'll then package the latest version (upstream/master), and push it to our test repository. You can fix your computer in the mean time. OK for you to make a pull request? If not you can just send us the various pre-configured folders for Gamecube/Wii/RR. Whatever you prefer.

mdeguzis commented 10 years ago

@Two-Tone, you can either supply us with the two different config files (placed in an archive, a folder for gamecube, one for Wii), or let me know what options to alter from what we have by default, and I'll make them. By the looks of it, then all I need to do is set the launcher command correctly in Rom Collection Browser after copying down the configs in the setup script.

If all you wish me to do is disable the other controller (Wii/GC) when one is "in service," I should be able to do that, and you can pull the latest beta on a test install once I commit that.

mdeguzis commented 10 years ago

@beaumanvienna , JC, got this when I went to launch dolphin-emu from the project:

mikeyd@retrorig:~/RetroRig$ dolphin-emu 
dolphin-emu: error while loading shared libraries: libavcodec.so.54: cannot open shared object file: No such file or directory

Were there any recent changes in the beta? Do you get this? @Two-Tone ? If not, maybe I just have a screwy install.

mdeguzis commented 10 years ago

JC, about halfway done making changes for distributed config files. I noticed there is no WiimoteNew.ini in the PS3 USB emu-cfgs folder. This intentional? Since I didn't set this part up, I wasn't sure. Didn't get to checking the other directories yet. Also, under that file, I noticed only player 1 Wiimote had configuration data. Should P1's setup be copied to the rest of the "ports" ?

beaumanvienna commented 10 years ago

Professor, you can check the library archive I copied to the Box box some weeks ago. If I remember right, libavcodec.so.54 was part of the missing libraries under Utopic Unicorn. Are you running Ubuntu 14.10?

Concerning your Wii motion questions, yes, we don't need WiimoteNew.ini, and yes, there is currently only one Wii motion controller supported. Support for more then one player would be great! I forgot about it, sorry. Do you have a Wii motion controller available for testing?

mdeguzis commented 10 years ago

Naw, I was using 14.04, I'll see if I can do another install, maybe I just had a goofy scratch install. I do not have Wiimotes anymore, but I once did. My grandmother actually has a Wii, but I would need the third party adapters, wouldn't I? If the controls are the same, wouldn' it be a matter of copying the P1 controller code in the Wiimotenew.ini file to each subsequent player slot? I have done this before, and was able to test 2 players with that method in other emulators and with the GC controller file (me and my family played Mario Kart: Double Dash). Idk, we'd have to have a tester to validate that will work.

As far as this wiimote thing goes here's what I did, but have not yet committed:

  1. Seperate .dolphin-emu into GC and Wii directories (since @Two-Tone mentioned at the least, being able to alter graphics for Wii / GC seperately).
  2. During install, the separate directories are created, and each set is copied into $config_home/.dolphin-emu/GC and $config_home/.dolphin-emu/Wii
  3. During gamepad setup, instead of "Do you want to use a real wiimote for wii games" there is now a list of 3 options: real Wiimote, emulated wiimote, or none. The first two options disable the GC controller for Wii games only (due to separate folders), and the third (none), disables the Wiimote state, and enables the GC controller for Wii games. The GC directory is not acted upon for now.
  4. During launch of either GC or Wii games, the relevant directory is loaded (you can specicy the home directory, not specific files, as far as I know).

Does this make sense? Thoughts? The biggest thing that needs a higher priority, is making a native XBMC menu for all these toggles and settings. I want to move away from the settings menu in the script, since most users only will use that for the install. Once a menu is developed, toggles can be setup in submenus to turn off/on options, change resolution etc. This will be the biggest challenge as of late, since neither of us have prior experience. I will try to locate some example code. But I digress!

If the Wii changes sound ok, I will commit and test that code later today and notify @Two-Tone to try via the beta branch. If the changes are not sucessful, we can amend them or roll back.

beaumanvienna commented 10 years ago

but I would need the third party adapters, wouldn't I?

Nope. Just a BT adapter.

beaumanvienna commented 10 years ago

Do you plan to keep the state save folder the same? Or split that one as well?

mdeguzis commented 10 years ago

Do you plan to keep the state save folder the same? Or split that one as well?

I totally forgot about that since there is a save states folder. I think we'll need to adjust that . When the emulator is run, it is running out of a separate folder, and will use the StateSaves inside the directory. Would the only be these changes to setup.shinc?

Code: http://slexy.org/view/s23XQinsO9

I think using two different directories, we can have things split correctly if that seems feasible.

beaumanvienna commented 10 years ago

Yes, this looks good to me on a first glance. Nice!

@Two-Tone

Thanks for posting the reddit promotion link! Good work!

mdeguzis commented 10 years ago

@beaumanvienna @Two-Tone , see commit 7fd91e8. JC, if you have time, could you spot check this? Tomorrow I will do a scratch install on my pkg testing VM (since I fixed my Oracle extensions pack haha). Let me know if any changes are needed. Again, this is untested yet, so I'd wait to try out this commit @Two-Tone, but your more than welcome to.

beaumanvienna commented 10 years ago

I've checked it. Just from reviewing it I can't see anything obviously faulty.

About the new selection menu, the choices are "Real" "Emulated" and "None". What's "none" good for?

mdeguzis commented 10 years ago

None denotes you do not want to use a Wiimote controller for Wii games, and thus disables the Wiimote in the settings and enables the GC remote (obviously for all games that support it). This is in response to @Two-Tone noting control conflicts when both are enabled at the same time. This action only* applies to the Wii config directory, and has no bearing on the GC games/control.

beaumanvienna commented 10 years ago

OK, understood. Maybe we can change the text a bit? "None" sounds like "no controller" :-DD The text mentioning that you have to use the button in the battery compartment should also be restored.

mdeguzis commented 10 years ago

Ok will do!

On November 5, 2014 10:11:01 AM EST, Jens-Christian notifications@github.com wrote:

OK, understood. Maybe we can change the text a bit? "None" sounds like "no controller" :-DD The text mentioning that you have to use the button in the battery compartment should also be restored.


Reply to this email directly or view it on GitHub: https://github.com/ProfessorKaos64/RetroRig/issues/140#issuecomment-61821237

Sent from my Android device with K-9 Mail. Please excuse my brevity.

mdeguzis commented 10 years ago

I do have that battery compartment text still there

The question now asks if you want to use a Wii controller for Wii games. If none is selected, the GC controller is enabled, wii disabled. I need to test this yet, maybe tonight I will, but I lack a real Wiimote for a full practical test. @Two-Tone, could you please test as well if you have a wiimote?

beaumanvienna commented 10 years ago

I've uploaded a test version for dolphin to https://launchpad.net/~beauman/+archive/ubuntu/retrorig-testing/+build/6554380, based on the latest github sources. The performance is indeed much better then our current version 4.0.0.

This is a un-patched version, it will run smoothly under Ubuntu, but might not get on top of xbmc under Cinnamon.

I checked the new installation for the Wii motion controller yesterday. It runs in an endless loop until you choose "Cancel".

About the third choice ("No"), I still don't get what it's good for. I understand the first choice (native Wii controller) and the second (emulated by a PS3 or XBox 360 controller).

@ProfessorKaos64 Can't you borrow a Wii motion controller in your family? You are missing the biggest fun! DKCR is finally playing fluently, and that's the best game ever. Just the music alone is amazing. :-D

Thanks @Two-Tone for mentioning the performance boost of dolphin!

mdeguzis commented 10 years ago

I checked the new installation for the Wii motion controller yesterday. It runs in an endless loop until you choose "Cancel".

Ok, i'll check that, I must have missed something, been trying to relax this weekend and take a break from several things. The reason for the "No" answers to "Do you wish to use a wiimote controller for Wii Games," is the controls confusion @Two-Tone reported when the GC and Wiimote controllers are both enabled for Wii games. That third option let's us know you only wish to have a GC controller for Wii games (at least initially) so that both controllers are not enabled at the same time.

@ProfessorKaos64 Can't you borrow a Wii motion controller in your family? You are missing the biggest fun! DKCR is finally playing fluently, and that's the best game ever. Just the music alone is amazing. :-D

I could maybe swing by my grandmothers later this week and borrow the Wii stuff. So, as long as I have a bluetooth receiver and the Wiimote hardware, i'm fine? I thought the Wiimote sensor bar was a USB connetion to the Wii?

beaumanvienna commented 10 years ago

Do you mean you want to enable this kind of controller for Wii games?

https://www.google.at/search?q=gamecube+controller&safe=off&es_sm=122&source=lnms&tbm=isch&sa=X&ei=RbtgVM7lMIfhavm3gfAN&ved=0CAgQ_AUoAQ&biw=1600&bih=787

Can we re-name the third option then to "Gamecube Controller for Wii games"? How do you plan to test this? Will we need to get such a controller for the project?

I could maybe swing by my grandmothers later this week and borrow the Wii stuff. So, as long as I have a bluetooth receiver and the Wiimote hardware, i'm fine?

Yep! Cool family! :-DD About the sensor bar. Good question. No idea what's it's good for. Next to DKCR I play Rayman Origins and How to Train your Dragon, never needed the sensor bar.

Ahh, now I know what's the sensor bar good for. I think if you want to use the Wiimote as pointer device. In our project that would translate to controlling XBMC via the Wiimote...

2014-11-10 13:49 GMT+01:00 mikeyd notifications@github.com:

I checked the new installation for the Wii motion controller yesterday. It runs in an endless loop until you choose "Cancel".

Ok, i'll check that, I must have missed something, been trying to relax this weekend and take a break from several things. The reason for the "No" answers to "Do you wish to use a wiimote controller for Wii Games," is the controls confusion @Two-Tone https://github.com/Two-Tone reported when the GC and Wiimote controllers are both enabled for Wii games. That third option let's us know you only wish to have a GC controller for Wii games (at least initially) so that both controllers are not enabled at the same time.

@ProfessorKaos64 https://github.com/ProfessorKaos64 Can't you borrow a Wii motion controller in your family? You are missing the biggest fun! DKCR is finally playing fluently, and that's the best game ever. Just the music alone is amazing. :-D

I could maybe swing by my grandmothers later this week and borrow the Wii stuff. So, as long as I have a bluetooth receiver and the Wiimote hardware, i'm fine? I thought the Wiimote sensor bar was a USB connetion to the Wii?

— Reply to this email directly or view it on GitHub https://github.com/ProfessorKaos64/RetroRig/issues/140#issuecomment-62379758 .

mdeguzis commented 10 years ago

Sure, I can rename the option to note "Use Gamecube Controller". The wii mote pointer should be needed in many games. Can you try some that may need it, like Mario Galaxy, or a shooting game? I'll fix that loop tonight as well. And to answer the other question of a Gamecube controller, I mean using a GC controller as we do for the Gamecube games, emulated as we do with other emulators: virtual, not to be confused with the actual GC controller. @Two-Tone reported having the GC plugged in (as Dolphin sees it), and Wii at the same time caused control issues, so this was the quick solution.

beaumanvienna commented 10 years ago

The wii mote pointer should be needed in many games. Can you try some that may need it, like Mario Galaxy, or a shooting game?

Good point. OK, I can try to find a game that requires it. We should probably mention that somewhere in the wiki, and/or make it work one day.

Actually, I've got like twenty or thirty Wii games at home, but I don't remember to have used the sensor bar for any of them.

About the third option I'm now totally puzzled. XD Currently I understand that you want to call the option "Use Gamecube Controller", which does not refer to an actual Gamecube Cube controller, and is actually meant for Wii games, and which differs from emulated Wiimotion with a PS3 sixaxis or XBox 360 controller... But never mind, I'll try to figure out the code behind it!!!

2014-11-10 14:33 GMT+01:00 mikeyd notifications@github.com:

Sure, I can rename the option to note "Use Gamecube Controller". The wii mote pointer should be needed in many games. Can you try some that may need it, like Mario Galaxy, or a shooting game? I'll fix that loop tonight as well. And to answer the other question of a Gamecube controller, I mean using a GC controller as we do for the Gamecube games, emulated as we do with other emulators: virtual, not to be confused with the actual GC controller. @Two-Tone https://github.com/Two-Tone reported having the GC plugged in (as Dolphin sees it), and Wii at the same time caused control issues, so this was the quick solution.

— Reply to this email directly or view it on GitHub https://github.com/ProfessorKaos64/RetroRig/issues/140#issuecomment-62384228 .

mdeguzis commented 10 years ago

How bout I name the options:

"How do you wish to play your wii games?"

  1. With an emulated wiimote
  2. with a real wiimote
  3. emulated gamecube controller

Haha this is the most I've ever though about semantics

beaumanvienna commented 10 years ago

That looks very nice!

Just make sure the real Wiimote is default.

Thanks for all the effort!

Two-Tone commented 10 years ago

I disagree, the emulated wiimote should be default. It's pretty much granted that anyone using this project will have a normal controller, but only some will have a normal controller, a Bluetooth adapter, sensor bar, and Wiimote.

beaumanvienna commented 10 years ago

Alright! It's just for some games, the emulation is pretty hard to use. Best example is How to train your dragon. In this game you hold the Wiimote horizontal and like controlling a kite tilting it to one side means turning in that direction. Twisting the controller by its horizontal axis is used for climbing or descending. I didn't make it to play it with an emulated controller. OK, but in the end, that's up to the user.

How about testing the new dolphin version? Any new insights?

Two-Tone commented 10 years ago

Yeah, in some games emulation is indeed impossible to use so you need the real thing. Another example would be Wii Sports.

I am having the worst luck with Ubuntu derivatives. Linux Mint refuses to install due to it can't read from the disk it thinks it is on, when in fact it is not on a disk but a flash drive.

beaumanvienna commented 10 years ago

I am having the worst luck with Ubuntu derivatives. Linux Mint refuses to install due to it can't read from the disk it thinks it is on, when in fact it is not on a disk but a flash drive.

That sounds funny :-D Are you fixing your PC? Maybe get fstab right?

The new dolphin version 3:4.0.2.20141109.0 is now available in our official retrorig repository as well. State saves do not function, after the folder splitting we did some days ago (State saves do work with the new version when called outside RetroRig). I've looked into this a bit, w/o any clue so far. In the former dolphin version we had to add an XRaiseWindow() to get dolphin on top of xbmc. The current version 3:4.0.2.20141109.0 is still unpatched, any feedback appreciated!

beaumanvienna commented 10 years ago

Under Mint / Cinnamon dolphin does in fact get on top of xbmc. But its graphics canvas won't always get the focus. It worked for me on my external display, this way inputs from antimicro were OK. On my primary display it didn't get the focus (even though it got on top of XBMC), so state saves and quitting dolphin via the PS3 button didn't work. Using ALT-TAB to focus the canvas helps.

Also, the new version of dolphin-emu is segfaulting upon exit. This can only be noticed when starting RetroRig from a terminal, meaning this has low impact on the end user.

The performance boost of dolphin is really impressive, especially on my laptop. :-D

beaumanvienna commented 10 years ago

@ProfessorKaos64

The wii mote pointer should be needed in many games. Can you try some that may need it, like Mario Galaxy, or a shooting game?

The sensor bar has a non-standardized connector, see here. I don't think we can use it in RetroRig. Do we have a work-around for this? Can we play Mario Galaxy at all then?

mdeguzis commented 10 years ago

I believe the pointer is required for collection stars and the colored mini stars that amount to "money". Don't worry. Good things take time.

On November 11, 2014 5:09:48 PM EST, Jens-Christian notifications@github.com wrote:

@ProfessorKaos64

The wii mote pointer should be needed in many games. Can you try some that may need it, like Mario Galaxy, or a shooting game?

The sensor bar has a non-standardized connector, see here. I don't think we can use it in RetroRig. Do we have a work-around for this? Can we play Mario Galaxy at all then?


Reply to this email directly or view it on GitHub: https://github.com/ProfessorKaos64/RetroRig/issues/140#issuecomment-62631135

Sent from my Android device with K-9 Mail. Please excuse my brevity.

beaumanvienna commented 10 years ago

I've opened a ticket for dolphin's segmentation fault here.

The sensor bar has a non-standardized connector, see here. I don't think we can use it in RetroRig. Do we have a work-around for this? Can we play Mario Galaxy at all then?

About the sensor bar, there is actually a work-around. In SMG I made it past the initial file selection dialog that requires the sensor bar. I switched from the Wiimote controller to an emulated controller. For the pointer device I had to setup up controls manually in the dolphin gui. For the game itself I switched back to Wiimote control.

There is one more option we haven't considered yet. It's called "hybrid". We should look into this as well, maybe it's a valid option to allow for Wii games that require a sensor bar, and should otherwise be played with a native controller.

Two-Tone commented 10 years ago

Actually the sensor bar is nothing more than two sets of 3 IR LEDs. The only thing the connector uses is used for is to provide power to the LEDs.

It's quite possible to buy a USB version.

beaumanvienna commented 10 years ago

@Two-Tone http://slexy.org/view/s28TqqVXrj

Two-Tone commented 10 years ago

@beaumanvienna I'm afraid I won't be able to for at least another week as the motherboard I was using for this is being returned for a replacement. Multiple ports are dead, PCI-E will cause the board to not POST if in use.

beaumanvienna commented 10 years ago

I'm afraid I won't be able to for at least another week as the motherboard I was using for this is being returned for a replacement. Multiple ports are dead, PCI-E will cause the board to not POST if in use.

OK, good luck with that!

I recompiled dolphin-emu yesterday again, with gcc option "-g" to enable core dumps. Eventually, I managed to generated a stack trace from the the segmentation fault. The stupid thing is only that dolphin's exception handler intercepts signal SIGSEGV, and then throws it again. So, all I recorded in the back trace was the exception handler... This is just a minor bug, it has no influence on the end user.

Much more important is, that dolphin's graphics window is not always getting the focus after being launched. That means the commands from antimicro don't come through. And state saves don't function, that's due the new folder structure we just introduced. I'll try to squash these bugs now first.

beaumanvienna commented 10 years ago

I've patched dolphin (see https://github.com/beaumanvienna/dolphin/commit/ea0ee30ac5f55c6608e2bccf0185d33e6bf4d2ae) and uploaded it to the PPA. The focus issue should be fine now for Ubuntu and Mint, while Gnome does not work.

And something totally weird. The state saves don't work if RR runs on the primary monitor. It's fine on the external display. Sounds crazy, I know, but I got this behavior both under Ubuntu and Mint.

@ProfessorKaos64 Did you run RR under Debian "Testing"? Or do you plan to? Could you add this to #126?

beaumanvienna commented 10 years ago

After PR #144 was pulled in, the configuration folder splitting for the Wii and GameCube should be finished. This issue can be closed after some time of observation.

@Two-Tone It would be nice, if you could retest this, based on the latest beta code or retrorig-setup_0.9.7.1.2_amd64.deb. Thanks!

mdeguzis commented 10 years ago

No issues seen after splitting the directories since the change was made. Closing unless other wise objected to.