Giter VIP home page Giter VIP logo

Comments (7)

vaguerant avatar vaguerant commented on July 30, 2024 1

Excellent, very glad to hear that. As for Wii U support, the Pro Controller should work just by building with newer libraries--internally, the Pro Controller is just another Wiimote+Extension controller like the Nunchuk, Classic Controller or even the Balance Board, and it was added to the Wii homebrew library (libogc I think?) years ago.

For the Wii U GamePad, you do need the libwiidrc library. I'm not a real programmer, but I actually did add Wii U GamePad support to another homebrew a while back and it was surprisingly simple: JeffRuLz/OpenHCL@ad295de

If you want to give it a shot, you can skip the #include <string.h> from that commit, which I left behind in error from some testing. Otherwise, that commit should have everything you need to add GamePad support.

The only other Wii U-specific feature that would be handy is switching the video to 4:3, which requires a register poke on Wii U, as otherwise the game will display stretched to 16:9 on both TV and GamePad. It's my understanding that the Wii port is 4:3-only, if I'm wrong about that do ignore me.

Here's some code snippets from OpenHCL again where I handled switching to 4:3. This would all go in your video code somewhere.

First off is the include which I think is what gives you access to those low-level read32, write32 and mask32 instructions:

#include <ogc/machine/processor.h>

Then just determining whether you're running on a Wii U.

isWiiVC = read32(0x12FFFFC0);
isWiiU  = ((*(vu16*)0xCD8005A0 == 0xCAFE) || isWiiVC);

Again, not a programmer, but if I'm not mistaken, I think you might also be able to simplify that down to just:

isWiiU  = ((*(vu16*)0xCD8005A0 == 0xCAFE) || read32(0x12FFFFC0));

This next part is poking the register to switch the scaling to 4:3. You can just poke this register on startup every time without causing any issues--if the system is already running in 4:3, it won't do anything, but if it's running at 16:9, this will switch it to 4:3.

if (isWiiU)
    {
        write32(0xd8006a0, 0x30000002);
        mask32(0xd8006a8, 0, 2);
    }

And then upon exit of your graphics, you again check if this is a Wii U, and whether the Wii U is configured to 16:9. If yes to both, the register is poked back to its normal 16:9 stretching behavior. It's necessary to check for 16:9 here because it's possible (if unlikely) that somebody is running their Wii U in 4:3, so you can't just assume you should switch back to 16:9 on exit.

if (isWiiU && CONF_GetAspectRatio() == CONF_ASPECT_16_9)
    {
        write32(0xd8006a0, 0x30000004);
        mask32(0xd8006a8, 0, 2);
    }

I won't be able to give it a shot until after the weekend, but I'll see if I can get OpenJazz building for Wii on my end, and if so I'll make an attempt to add all this Wii U stuff. However, the last time I attempted the same (after OpenHCL) I failed miserably, so I can't promise I'll be able to contribute anything useful.

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

Wii port works quite good, tested on Hardware.

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

For the psvita port there is a branch now: psvita.
The others are probably too old, source seems lost.

from openjazz.

vaguerant avatar vaguerant commented on July 30, 2024

Does the Wii version currently build, or is that one of the too old ports? There are binaries around from ~10 years ago, but a more recent build would be nice, especially if it added more modern features like Wii U GamePad and Pro Controller support which would make it almost as good as a native Wii U port.

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

The Wii port works quite well and has been tested by myself. It will be part of next release (together with 3DS and PSP).
However, for proper WiiU support we would need libwupc or something.

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

The controller support is unfortunately not doable without patching the SDL library, otherwise this is a big hack.
The widescreen support is way easier and actually on my list for wii as well, so code can be shared.

from openjazz.

vaguerant avatar vaguerant commented on July 30, 2024

Ah, I hadn't realized this was a feature missing from SDL Wii rather than OpenJazz. It would definitely be nice to see support over there.

from openjazz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.