FBZX Wii - Wii U pro controller support

Discussion in 'Wii - Emulation and Homebrew' started by oibaf, Jan 5, 2017.

  1. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Very good job, Niuus
    It is clear that there is a problem with the libogc. The values registred by the WII PRO controller are too low.
    I think that there is a problem in the calibration data (min and max in my test program). Those should be the min and max values when you move the stick.

    I would like to report the issue in the Devkitpro forum.

    Can you please report, as an example, the values of:

    ccl pos x
    ccl min x
    ccl max x

    ccl mag
    ccl ang

    when you move the left stick of the WII PRO controller, rigth and left?

    Thanks.
     
    niuus likes this.
  2. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Glad to know it's helpful. The other values:

    Pressing Left:
    ccl pos x = 55
    ccl min x = 0
    ccl max x = 255

    ccl mag = 0.578125
    ccl ang = -90.000000

    Pressing Right:

    ccl pos x = 197
    ccl min x = 0
    ccl max x = 255

    ccl mag = 0.543363
    ccl ang = 90.823822
     
  3. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    As I supposed, the calibration data (min and max) which are written in the code are wrong.
    Min is 0, while the real mimimum is 55, and max is 255 while the real maximum is 197 (at least for x coordinates). This leads to wrong mag values which should be 1 while they are 0.57 and 0.54 respectively.
     
    niuus likes this.
  4. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    This build implements the virtual keyboard for the second controller too and should fix the joystick issue with WUPC.

    https://drive.google.com/open?id=0BzmiDeFEjxKaY2Q4RG1DU2lqZWM

    You have to rename the file as boot.dol

    Feedbacks are welcome.

    Please test the program also with the Classic controller Pro (I fear that the new libogc broke the Classic controller Pro support).

    I have tested it with Wimote, nunchuck and classic controller.
     
    niuus likes this.
  5. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Last edited by oibaf, Jan 16, 2017
    niuus likes this.
  6. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Hi @oibaf, i finally got the time to test them. My results:

    * Jan 15 build specific:
    - Can't point with the Wiimote on the Virtual Keyboard, whether it is on the 1st or 2nd slot.

    * Jan 16 build:
    - You can point with the Wiimote on the Virtual Keyboard, but only in the 1st player slot (Auto Virtual Keyboard On or Off)
    - You can invoke and move the cursor with the Right Stick on the Virtual Keyboard, on the 1st or 2nd player slot (Auto Virtual Keyboard Off)
    - Wii Classic Controller works perfect, in-game, menu, and Right Stick fast scrolling / Virtual Keyboard cursor.
    - Wii U Pro Controller works perfect, in-game, menu, and Right Stick fast scrolling / Virtual Keyboard cursor.
    - Wii Classic Controller Pro works, though sometimes it register a single pad/button press like multiple presses.
    - Left and Right sticks won't work properly, but only on the Wii Classic Controller Pro:
    -- Left Stick = Up works as pressing Left, Right as pressing Down, Left and Down are dead.
    -- Right Stick = Does not work, Virtual Keyboard or Menu.

    Some bugs i stumbled:
    - Can't load any more tapes after the first one.
    - Minus and Plus are reversed for Page Up/Down.
    - Whatever key you bind to the D-Pad Right on the Classic Controller mapping, is not being saved to the config file (this might happen on Wiimote and Nunchuk too). For example: bind D-pad Right to D Key, save the general config, exit the emulator. Next time you'll have to rebind the key for it to work again.
    - Wiimote pointing for Virtual Keyboard seems to break if it turns off and reconnect.

    I would suggest, maybe, to invoke Virtual Keyboard with a combo (like - and +), so you won't lose the ability to bind the + button to any key when Auto Virtual Keyboard is turned off. Let me know what you think.

    Thanks for the updates and fixing!
     
    Last edited by niuus, Jan 17, 2017
  7. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Hi Niuus,
    thanks a lot for the usefull feedbacks.

    This is a problem. It is means that the new libogc has broken the support for Wii Classic Controller Pro and I do not have a Wii Classic Controller PRO to test possible patches. I will report this in the Devkitpro forum.

    What do you exactly mean? If you insert and load a tape, and then you want load a new tape you have to reset the emulator. This emulates the behaviour of a real zx spectrum.

    It appears to be correct. Plus is page up, minus is page down. If you hold the wimote in the horizontal position and if you are righth-handed, this is the logical assignment.

    It is a bug. Thanks for finding it. Indeed only one button out of 4 of D-PAD is not saved. The emulator saves 22 instead of 23 buttons.

    I can not reproduce this issue. It seems all working correctly for me.

    When the virtual keyboard is off you can already bind the "+" button. The minus button is already used to pause the emulator. I think that there are a lot of buttons to bind and an additional combo is not necessary.
     
    Last edited by oibaf, Jan 17, 2017
    niuus likes this.
  8. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Hope it is easily fixable, for those stuck with only a WCCPro. It could help some other 3rd party controllers, maybe.

    Oh! I didn't knew. I have never used the machine before, since it is from way before my existence. The 1st time that i played ZX Spectrum was in the early 2015, to enjoy Castlevania with your emulator! =D. I found a really nice nostalgic feel to it, so now i have been playing and reading about other games.

    Ok, i understand, though given that maybe most of the users will use a Classic Pad anyway (and now a WUPC, thanks to your updates), i didn't thought about Wiimote-only users, hence my original suggestion of using Left / Right like other emulators (and moving the Preview Window hotkey to Plus, which will only work in the file selection, anyway).

    Bug squashed, nice!

    It happens like this: start the emulator, load a game, check that the Wiimote points correctly when using the Virtual Keyboard, let the game running normally or go back to the menu. Now take the batteries out of the Wiimote, put them in, turn on the controller. Now the Virtual Keyboard pointing functionality gets broken.

    It's okey, it's kind of like a compromise between Auto Virtual Keyboard On/Off, you lose one button.

    Did you have any chance to check on the C64 Frodo / UAE Wii bugs, Virtual Keyboard overlay, and possible Gamecube pad support? If you don't have the time it's cool, just wanted to confirm.

    Technical curiosity, in your opinion, are these 3 emulators portable to GCN hardware? Would they suffer from the lack of power, or are the emulated machines not even using the full speed of the Wii CPU?

    I am glad i can be of help, i love the Wii capabilities as a homebrew machine for retro gaming. If you post any more builds for the emus, i'll surely test them.
     
    Last edited by niuus, Jan 17, 2017
  9. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Following the steps you described, it works for me, weird...

    First, I want to add Gamecube pad support to FBZX and then fix the bugs of / improve C64 Frodo / UAE Wii

    FBZX Wii: I have already ported FBZX Wii to GCN, but I released it until v13 since there was no much interest in it. Anyway I will release version 15 also for GCN and Windows.

    https://github.com/Oibaf66/fbzx-wii/tree/master/download

    UAE Wii: Even Wii is not powerful enough for UAE. The default configuration of UAE Wii runs the emulator at 50% of framerate. To run at full speed you have to select 320X200 resolution.

    C64 Frodo: I think that GCN could be enough powerfull, but it would be a waste of time considering the lack of interest.
     
    niuus likes this.
  10. pedro702

    pedro702 GBAtemp Guru

    Member
    12
    Mar 3, 2014
    Portugal
    you should move on to the wiiu atleast it should be powerful enough xD
     
  11. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Weird =). Anyway, just for informative purposes, its a white Wiimote, one of the early ones with no Motion Plus integrated.

    Pretty cool! Take your time.

    That's pretty nice news, i'll definitely use them on all those platforms. I have a homebrew-ready GCN that i use in my studio, a homebrew-ready Wii at my dormitory, and of course a Windows laptop for homebrew on the go, for long trips far home, etc.

    Great, i'll keep that in mind for 'heavy' games =)

    That's a shame. I hope it happens someday, though! I have more GCNs to use for homebrew than Wii consoles, which are getting quite expensive back in my country.

    As always, thanks for your great work, @oibaf.
     
  12. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Can you release a zip with the libraries ready to use? I'd like to test this by recompiling with Wii Mednafen. Thanks in advance!
     
    Last edited by niuus, Jan 22, 2017
    sabandellos and rogerioronin like this.
  13. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    1) First you have to update to devkitPPC release 29.

    2) Then you have to install the libogc patched with the new WUCP calibration data:

    https://drive.google.com/open?id=0BzmiDeFEjxKaUjlxNUI5U2hmc00

    3) Then you to install the SDL library:

    https://drive.google.com/open?id=0BzmiDeFEjxKaTV9oejE3emFva1E

    There two zipped files inside.

    The files of Header_SDL.zip goes into: /devkipro/libogc/include/SDL

    The files if lib_SDL.zip goes into: /devkipro/libogc/lib/wii

    4) Then you have to dowload the portlibs from Devkitpro (they should be compiled with the new devkitPPC)
     
    niuus likes this.
  14. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Hi @oibaf! Did the tests results went well with the emulator? Will there be new final builds in the future? (Gamecube pad support in FBZX and GCN build, etc.)
     
  15. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Hi Niuus,
    This is the final build for FBZX Wii (ver. 15):

    https://drive.google.com/open?id=0BzmiDeFEjxKabjRobVZsNDFmVWM

    These are the changes:

    * Added WIIU PRO controller support
    * Added Gamecube controller support
    * Fast up and down menu scrolling with the second joystick
    * Fixed bug in D-Right conf

    I have not published this release yet since I wanted to make some additional test.

    If have time, please let me know if you find any issue.

    Also GCN buid is ready but I have to test it.
     
    rogerioronin and niuus like this.
  16. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Wii Build tested @oibaf! =)

    My findings:

    - Controllers working without issues: GCN Pad, Wiimote, Wiimote w/WiiMotion Plus attachment, Wii Remote Plus, Wii Classic Controller, Wii U Pro Controller.

    Quick suggestion: given that the GCN pad has less buttons, remapping L/R buttons and maybe C-stick would be very useful.

    Bugs found:
    - C-stick can't move diagonally (tested inside the Virtual Keyboard).
     
  17. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    Thanks for testing.

    I do not want to make any additional change for now since I should start the testing again.
    Moreover L and R button are already used for pausing the emulator and calling the virtual keyboard.


    Please let me know if you find any more bug.

    Thanks
     
  18. oibaf
    OP

    oibaf Member

    Newcomer
    2
    Dec 27, 2013
    Italy
    That's weird. It works properly with my gamecube controller.

    Anyhow I have officially released the version 15 of FBZX Wii:

    http://wiibrew.org/wiki/FBZX_Wii
     
    niuus, rogerioronin and sabandellos like this.
  19. sabandellos

    sabandellos Advanced Member

    Newcomer
    2
    May 28, 2010
    Last edited by sabandellos, May 21, 2017
    rogerioronin and oibaf like this.
  20. niuus

    niuus GBAtemp Advanced Fan

    Member
    3
    Mar 4, 2016
    Venezuela
    Yep, i am using an official Gamecube controller. I will try inside other games to see what happens.

    Thanks for the new release! BTW, is the GCN build coming along nicely?
     
Loading...