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
    28
    28
    Dec 27, 2013
    Italy
    The wii homebrew library (libogc) now supports the Wii U pro controller.

    I have compiled and adapted the FBZX Wii code to the new library.

    Since I don't have a Wii U pro controller, could please someone test if the new code supports it?

    Here the link to the program:

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

    You have to copy the files in the SD card.

    Here the link for the installation and usage of the emulator.

    http://wiibrew.org/wiki/FBZX_Wii

    I included a special configuration file to test the Wii U pro controller button.

    Pressing the button and moving the Joystick and DPAD the emulator should write numbers and letters in ZX Spectrum prompt.

    Thanks.
     
  2. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    Wow, cool! I'll gladly test this.
     
    Last edited by niuus, Jan 7, 2017
  3. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    Well, working great @oibaf! Could not find your configuration file, but i used Castlevania Spectral Interlude to play and test by binding the keys to the buttons, the Wii U Pro Controller responds very fine, both in-game and inside the emulator. If there's anything else you'd like to know, feel free to ask.

    Questions:
    - Could it be possible to invoke the virtual keyboard using a direction on Classic Controller/WU Pro Controller Right Stick?
    - Could it be possible to use Left Stick to move the cursor when using the virtual keyboard and select the key with the Classic Controller/WU Pro Controller buttons?
     
    oibaf likes this.
  4. huma_dawii

    huma_dawii GBAtemp Advanced Maniac

    Member
    1,636
    518
    Apr 3, 2014
    United States
    Florida
    Can someone add Wii U Pro controller support to the HBC??? on vWii please!
     
  5. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    This is not the place/thread to ask.
     
  6. huma_dawii

    huma_dawii GBAtemp Advanced Maniac

    Member
    1,636
    518
    Apr 3, 2014
    United States
    Florida
    Okay :v
     
  7. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
    Thanks.
    Very good news.
    It means that SDL Wii library supports the Wii U Pro controller. As a consequence all the homebrews based on SDL WII lib can have the support.
    I have just committed some changes to https://github.com/dborth/sdl-wii to allow SDL Wii lib to be compiled with the last version of the Devkitpro toolkit.

    This is UAE Wii which should have the Wii U Pro controller support. Can someone check?

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

    It is already possible to invoke the virtual keyboard setting to off the related option in the tool menu (Auto virtual keybord) and using the "+" button.

    Yes, I can add this feature.
     
  8. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
    rogerioronin likes this.
  9. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    I am happy to report that all 3 work with the Wii U Pro Controller, @oibaf =D

    A couple of suggestions to make the emulators more friendly to navigate (FBZX Wii, UAE Wii, C64 Frodo Wii):
    - Go back to the same position/folder in the list when loading another game/rom/file.
    - Quick scrolling of items when using the Left Stick (menu or file browser)
    - Use D-Pad Left/D-Pad Right as page up/page down when browsing the game files.
    [You can test this by firing up FCEUGX or SNES9X GX]

    - Left Stick to move the cursor when using the virtual keyboard and select the key with the Classic Controller/WU Pro Controller buttons (which you agreed, cool!)
    - In the case of FBZX and UAE Wii specifically, maybe an overlay to the Virtual Keyboard to know to which key the button is bind?
    - Bind-able Right Stick.
    - Is Gamecube controller support possible for FBZX Wii and C64?

    Some bugs i think i have found. I'm new to these systems emulation, sorry if it was the intended behavior:
    C64 Frodo: - F1 key does not work when you bind it to the CC, WUPC, Wiimote or Nunchuk (though virtual keyboard does work all the time). Haven't tested with a real USB Keyboard.
    C64 Frodo: - Keyboard presses bind to controllers work in some games, but not all? (though virtual keyboard does work all the time). I compared this behavior with Arkanoid / Donkey Kong / H.E.R.O. Haven't tested with a real USB Keyboard.
    UAE Wii: - When you are in Hardware Options, if you press Y / X button, instead of going back to Main Menu, you go in-game.
    All 3: - Load the emulator with a Nunchuk/CC connected. Unplug it when on the Main Menu. C64 auto moves the selection, UAE and FBZX makes almost every button on the Wiimote Up.
    All 3: - Virtual Keyboard auto pops up in FBZX Wii when you point the Wiimote to the sensor bar, but not on the other emulators.

    This works in C64 Frodo and UAE Wii, but not in FBZX Wii.
     
    Last edited by niuus, Jan 9, 2017
    oibaf likes this.
  10. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
    Happy to read that all 3 work with the Wii U Pro Controller.

    Thanks also for your valuable suggestions to improve the emulators.

    Below my answers.

    1) This should already works in FBZX Wii and UAE Wii if you select the file
    2) I have to check if it is easily implementable. (Question: currently the Wii classical controller Left Stick brows the menu, what about the WII PRO Controller? Is it the left or right one?)
    3) D-Pad Left/D-Pad Right are already used to togle the window preview.You can already use "-" and "+" to page up and down in FBZX Wii and UAE Wii

    1) Already written and tested the code (FBZX Wii).
    2) Interesting idea
    3) Ok for FBZX Wii, maybe for C64 (in the last years I mainly worked for FBZX and UAE Wii)

    1) I have to check.
    2) I have to check but it could be the same issue I found in UAE Wii i.e. the button was emulated as presssed for a too short time.
    3) It was a choice of mine. Maybe there is a resaon that I don't remember. If it is possible, I change this behaviour.
    4) This is a known issue related to the library (libogc or SDL wii). If you replug the Nunchuk/CC, it works again. I have to better investigate.
    5) This feature is currently implemeted only in FBZX Wii. I have to check if it is easily implementable in the other emulators.
     
    niuus likes this.
  11. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    That's correct. The only one that does not do this is C64 Wii.

    Both sticks do that in the WUPC, actually.

    Got it. They are in reverse (Minus for Page Down, Plus for Page Up), but it works!

    Great to know, so i guess UAE Wii would be next in the list.

    Great, another good option =). Will the Right Stick be configurable to keys in the future?

    I don't know if it's related: if both a Wiimote and a WUPC are connected, they take the 1st and 2nd position. But, if one of them is powered off, the other one gets stuck in the 2nd position without defaulting to 1st again.

    I also tested a real USB keyboard in C64 Wii, it suffers from the same F1 bug in some titles (H.E.R.O. is one). The Run key could be suffering the same, since i pressed all the keys available on the keyboard and none of them seemed to do this function.

    By the way, is there a setting somewhere (in all 3 emulators) for video output to conform to 4:3 aspect ratio when using the Wii on a 16:9 TV?

    Thanks for your great work, @oibaf!
     
    Last edited by niuus, Jan 9, 2017
  12. snoofly

    snoofly GBAtemp Regular

    Member
    156
    39
    Aug 18, 2015
    United States
    Ooooh boy HAPPY DAYS! Thanks @oibaf - you're a star. Now I can play all my old Speccy & C64 games without needing the Wiimote at all.
    I use Fix94's HBL2HBC with a list of Wii channel forwarders in the boot menu so I can go straight from WiiU HBC into Frodo for ex. without touching a Wiimote.
    Fantastic!
     
  13. snoofly

    snoofly GBAtemp Regular

    Member
    156
    39
    Aug 18, 2015
    United States
    Regarding usage of the Virtual Keyboard in FBZX:

    If I have only WiiU Pro controller, I can't seem to move a cursor around the Virtual Keyboard to select keys for binds. I have to have the Wiimote plugged in as Port1 to enable that as previous.

    I see this will be addressed via the points above:

    1) Left Stick to move the cursor when using the virtual keyboard and select the key with the Classic Controller/WU Pro Controller buttons (which you agreed, cool!)

    1) Already written and tested the code (FBZX Wii).

    Do you happen to have a test build with that available for feedback?

    Thanks again for the great work on this.
     
  14. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
  15. snoofly

    snoofly GBAtemp Regular

    Member
    156
    39
    Aug 18, 2015
    United States
    That's the build I tested before but even with Auto Virtual Keyboard off, I cannot seem to get any way to select a key with WiiUPro.
    The virtual keyboard comes up on pressing + or trying to do a bind but I cannot see any pointer to use to select the key.
    If I go back to using Wiimote+CC combination, then I can use the Wiimote to move the key select pointer fine as before, but only if Wiimote is configured as the first of the 4 available active controllers.
    If it registers in the second slot, although I can navigate menus, I cannot move a pointer.
    Hope some of these tests are useful for you.

    BTW - I just rechecked your repository at https://github.com/Oibaf66/fbzx-wii and note a new comment regarding the moving with joystick I'm sure I did not see when I took the last build. I'm probably wrong but are you sure that link is to the very latest build?

    Just noticed one more thing. If I mash away at A or B button with the Virtual Keyboard up, I actually see the cursor flash for a split second in the bottom left corner outside the region of the keys, but I cannot move it. So it is there but not properly! Only just noticed it.
     
    Last edited by snoofly, Jan 11, 2017
  16. snoofly

    snoofly GBAtemp Regular

    Member
    156
    39
    Aug 18, 2015
    United States
    Sorry, last thing but hopefully some more useful feedback.. I don't think WiiUPro recognises diagonals on the Left analogue. I tried to play Chuckie Egg and it was really hard unless I switched to D Pad. Not sure if that is an implementation issue in the libogc or not - I'll try to check with Frodo when I have a bit more time. Classic controller analogue sticks seem to function fine.
     
  17. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
    Snoofly thanks very much for testing.

    I checked that the link to the new code is right.

    Do you mean that you can use the CC right stick to move the key select pointer fine as before?
    I check that the right stick of the CC moves the cursor and works properly.

    Try to register the WII U Pro controller as the first one. Indeed the code checks only the first controller. I have to fix that since if you have Wiimote and WII U Pro controller, one of the two must be the second one:)


    Please let me know. It could be an issue of libogc.
     
    Last edited by oibaf, Jan 11, 2017
  18. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    Okay! Some feedback for the latest build you posted:
    - No diagonals on the Wii U Pro Controller, whether on the Left or Right Stick, the cursor won't go the right either (check on the Virtual Keyboard, for example). Wii Classic Controller sticks do seem to work okey, both in-game and with the Virtual Keyboard, respectively.
    - Only the first controller can use the cursor or the Virtual Keyboard.
    - Can't ins/load another tape after the first one is playing.
     
    oibaf likes this.
  19. oibaf
    OP

    oibaf Member

    Newcomer
    28
    28
    Dec 27, 2013
    Italy
    Regarding the issue of the WIii U Pro Controller, I have prepared a test:

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

    You have to rename the file as boot.dol and put it in the dir /Apps/test (but you surely know that).

    The program writes the data taken from the joysticks (nunchuck, CC or Wii U pro Controller) as calculated by the libogc library.

    ccl stands for Classic Controller left stick, ccr stands for Classic Controller right stick. Min and max are the calibration data. Pos is the current position. Mag and ang is the position expressed in polar coordinates.
    I am particularly interrested in the last 4 values of the page (SDL data). They calculate the same values as the SDL library used by FBZX. The SDL library uses the polar coordinates of libogc.
    The values of x and y should be at least 64 or -64 to allow Wii U pro Controller stick to work in FBZX.
    Which are these values on the diagonals with the WIii U Pro Controller? With the classic controller they are about -90, +90.
    What about the values of the horizontal and vertical directions ?

    To exit the program, use the home button.

    Thanks
     
    Last edited by oibaf, Jan 12, 2017
    niuus likes this.
  20. niuus

    niuus GBAtemp Advanced Fan

    Member
    552
    251
    Mar 4, 2016
    Venezuela
    Hope this values help you.

    Wii U Pro Controller:
    LEFT STICK

    Warning: Spoilers inside!
    RIGHT STICK
    Warning: Spoilers inside!

    Wii Classic Controller:
    LEFT STICK

    Warning: Spoilers inside!
    RIGHT STICK
    Warning: Spoilers inside!
    Wii Classic Controller Pro:
    Only Up and Right work in both sticks, Left and Down are dead. Crashes with a DSI error after some minutes.

    Nunchuk:
    Values are almost the same as Wii Classic Controller.
     
    Last edited by niuus, Jan 12, 2017