-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial WiiU support #3167
Initial WiiU support #3167
Conversation
message(FATAL_ERROR "Invalid target platform") | ||
endif() | ||
|
||
# Shared by homebrew platforms | ||
if(${PLAYER_TARGET_PLATFORM} MATCHES "^(3ds|psvita|switch|wii)$") | ||
if(${PLAYER_TARGET_PLATFORM} MATCHES "^(3ds|psvita|switch|wii)$" OR NINTENDO_WIIU) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering first why you didn't add "wiiu" here but I get it now:
The target platform is SDL2 with a few WIIU adjustments.
This looks still a bit WIP but: Can I merge this or are more commits planned?
One thing i wanted to add is some config scene stuff. Need to check SDL2 source to get controller mapping |
Fix default Wiimote mapping A/B
Something is fishy in big endian land: The debug build asserts in We get LSB, but the WiiU SDL2 sets explicitly MSB. Here is a patch that makes Player start, but is a bit ugly: diff --git a/src/platform/sdl/sdl_audio.cpp b/src/platform/sdl/sdl_audio.cpp
index adf56dfb4..5e184c7fa 100644
--- a/src/platform/sdl/sdl_audio.cpp
+++ b/src/platform/sdl/sdl_audio.cpp
@@ -53,9 +53,11 @@ AudioDecoder::Format sdl_format_to_format(Uint16 format) {
return AudioDecoder::Format::U8;
case AUDIO_S8:
return AudioDecoder::Format::S8;
- case AUDIO_U16SYS:
+ case AUDIO_U16LSB:
+ case AUDIO_U16MSB:
return AudioDecoder::Format::U16;
- case AUDIO_S16SYS:
+ case AUDIO_S16LSB:
+ case AUDIO_S16MSB:
return AudioDecoder::Format::S16;
#if SDL_MAJOR_VERSION > 1
case AUDIO_S32:
@@ -64,6 +66,7 @@ AudioDecoder::Format sdl_format_to_format(Uint16 format) {
return AudioDecoder::Format::F32;
#endif
default:
+ Output::Warning("Couldn't convert SDL Audio Format! Got: {x}", format);
assert(false);
} I had this problem with the buildscripts before and added big endian defines manually. Not sure if this is a packaging error or some HLE in cemu maybe. |
okay lets try to figure this one out (worth checking Cannot do an hardware test before xmas. Is something for after merge. Will take the WiiU from my parents attic when I visit them and take it to my flat. Will make testing easier xD. |
@carstene1ns after lots of tracing about the preprocessor values: They are all correct. The issue is much simpler. We do And the code in SDL2 says: So changing this to Which means this also never worked on Big Endian Debian but who uses this 😅 |
This seems to be a difference in SDL1.2 vs 2, otherwise we would have noticed this on Wii and Amiga. Just checked, it is the same there, so no idea why this worked so long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm merging this for now to make the PR builder green. Will amend this when I have the WiiU around, will set mine up in January :)
Yay |
Seems to error about the folder sdmc:/data/easyrpg-player/ , has to be created beforehand manually. |
@AlbertoDiazC Thank you for the feedback, did you try if it does run games? I could not test it, because I do not own a Wii U. |
Yes it does run games quite well. |
Hmm the setting folder is automatically created when missing. Must be a WiiU exclusive bug 🤔. Thanks for testing! |
Found another small issue, this time is about the rtp path. [2024-01-21 18:35:29] Debug: EXEReader: VERSIONINFO resource found (DE 0xea180; 0x10e770; len 0x2ec) I keep good copies of the rtp at I figure this bug could be fixable with one of these workarounds: |
Simple and straightforward.