Hacking Retroarch Wii U, devkitpro r38 and WUT

hito16

Member
OP
Newcomer
Joined
Jan 15, 2021
Messages
19
Trophies
0
Age
54
XP
90
Country
United States
The system error also occurs if you use libretro nightly (at least it did ~10 days ago. pretty sure its still the case. https://buildbot.libretro.com/nightly/nintendo/wiiu/).
It seems retroarch sources are currently "broken" for wiiu

You can try going back in git history to 1.9.0 and see if the error occurs there also

edit:
see me complaining/ (or whining) about the current state in the retroarch thread
(https://gbatemp.net/threads/retroarch-wiiu-wip.447670/page-610) (there I also encountered the same system memory error)
I literally just tested nightly and repro'd this. If only I'd been a little more lazy. Good news I guess? :) I'll follow your advice and build the older release.
 

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Iirc the Retroarch.rpx has been broken for quite a while, your better off using one of the cores to boot from hbl


EDIT: Looks like Retroarch.RPX stopped working some time after 1.9.0 stable was released (August 8th)
 
Last edited by ploggy,

hito16

Member
OP
Newcomer
Joined
Jan 15, 2021
Messages
19
Trophies
0
Age
54
XP
90
Country
United States
@mive / @ploggy - gotcha. Confirmed the nightly and my local build are teh same - individual core rpx's seem to work well, just not the main frontend rpx. Thanks for all the help thus far.

Quick status: The builds using devkitpro r38 from pacman with portlibs appear to have feature parity with the nightly build. (eg same things work and same things are broken).

Changes needed to use latest Devkitpro on public builds
* update all Core Makefiles to remove -mwup
* update all Core Makefiles to reconcile other flags per @QuarkTheAwesome - " __wiiu__ probably gets used in a few places, and -ffunction-section is a good optimisation to reduce binary size"
* update github repo to use modern supported devkitpro libraries. eg. nightly builds switch to offiical dkp-pacman versions of the build chain.

Additional changes for long term stability:
* WUT migration - migrate from 2017 rpx build tools/libraries shipped with retroarch sources to the supported rpx tools/libraries shipped with WUT. I still haven't looked into this.

Next steps:
I'll reach out to 4TU discord server @dojafoja recommended. As long as the main frontend is broken, I suppose it doesn't make sense to do these changes in master? The -mwup change is a breaking change without modifying all core makefiles to be DEVKITPRO version aware.

FWIW, the environment is pretty clean, low friction and apparently compatible. I was able compile ffmpeg libraries for WiiU using latest ffmpeg source with little effort. (thanks to rw-r-r-0644 's "fmpeg-wiiu" configure script + 2 changes)
 

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Awesome! I'm looking forward to the new WUT changes being implemented not only for the potential speed increase but I'm hoping it will reduce the crashing that happens in RA WiiU :P
Aliaspider did add the ability to auto reset the WiiU on crashing with his ppsspp homebrew port. Perhaps when you join the 4TU discord you could see if its possible to implement into RA? (would save the poor WiiU being hard reset every 5mins when testing RA) :P

There is a ffmpeg Core for RA too, if you could get that working we would be able to boot media from within RA?
 

hito16

Member
OP
Newcomer
Joined
Jan 15, 2021
Messages
19
Trophies
0
Age
54
XP
90
Country
United States
Awesome! I'm looking forward to the new WUT changes being implemented not only for the potential speed increase but I'm hoping it will reduce the crashing that happens in RA WiiU :P
Aliaspider did add the ability to auto reset the WiiU on crashing with his ppsspp homebrew port. Perhaps when you join the 4TU discord you could see if its possible to implement into RA? (would save the poor WiiU being hard reset every 5mins when testing RA) :P

There is a ffmpeg Core for RA too, if you could get that working we would be able to boot media from within RA?
Per WUT - I'll take a look later this week. I didn't know upgrading to r38 could actually address issues, so that's good news.

Per ffmpeg - yes. I fact, compiling the ffmpeg core was my original motivation for using the latest, stable DevkitproPPC release. I'll take a look tonight to see how hard compilation & linking are. Getting the ffmpeg RA core integrated into the nightly builds is another discussion. The DevkitproPPC r38 portlibs set only provides a switch version ffmpeg, not WiiU... but I guess one bridge at a time.
 
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Per WUT - I'll take a look later this week. I didn't know upgrading to r38 could actually address issues, so that's good news.

Per ffmpeg - yes. I fact, compiling the ffmpeg core was my original motivation for using the latest, stable DevkitproPPC release. I'll take a look tonight to see how hard compilation & linking are. Getting the ffmpeg RA core integrated into the nightly builds is another discussion. The DevkitproPPC r38 portlibs set only provides a switch version ffmpeg, not WiiU... but I guess one bridge at a time.

Honestly I don't know if it will help with crashing issue, more wishful thinking on my part :P

The ability to play back media on WiiU is a sorely missed feature. but yeah, one step at a time :)
 
  • Like
Reactions: depaul

hito16

Member
OP
Newcomer
Joined
Jan 15, 2021
Messages
19
Trophies
0
Age
54
XP
90
Country
United States
Another quick update on options needed to build retroarch with WUT, devkitpro r38 and portlibs.

When it comes time to integrate, these WUT options will be required wherever we run the linker.
-L/opt/devkitpro/wut/lib -lwut

libwut deprecates a bunch of older libraries like libcoreinit, so we'll have to remove all these too. more in Wut 1.0.0-beta10 release notes.

= ffmpeg with SDL =
I confirmed these flags by compilng and linking the ffplay_g executable with SDL enabled.

tl;dr The libretro-ffmpeg core simply doesn't work out of the box for Wii U (more below).
To move forward though, I downloaded the latest ffmpeg separately and enable an ffmpeg output device (eg. SDL) that the WiiU should support. This part confirms we can satisfy link options necessary to build a WiiU ffmepg binary and theoretically satisfy libretro-core dependencies.

= libretro-ffmpeg core =
The current core makefile comes with 2 assumptions that don't hold true for WiiU. All platforms must
* implement opengl wrappers for the underlying graphics libraries. Googling for WiiU opengl makes me think Wii U does not support opengl. Fortunately, both WiiU devkitpro and ffmpeg support SDL, so we have some path forward.
* implement posix-like network libraries. (ex. socket.h). WiiU's network libraries are different enough to require some porting.

There's a deeper issue though. The ffmpeg build scripts and Makefile shipped with retroarch effectively reinvent the ffmpeg "configure" script through conditional statements, flags and hard coded lists of .o files to build. That means we have to figure out the right object files to build and all the right compiler -D flags to set for each library. I worked a few hours into a rathole until I decided on another path.

Rather than fixing the old ffmpeg build scripts with retroarch, I think it will probably easier to simply build all the ffmpeg static libraries using the latest release, using make files generated from a sane ffmpeg "configure" run. [DONE] We can then link libretro-ffmpeg core against these static ffmpeg libraries. TBD - trial and error out how much of libretro-ffmepg needs to be modified to support no opengl and no network (eg. by linking against pre-build external ffmpeg libraries)

If anyone wants me to post the configure script and devkitpro dependencies I used to build ffmpeg with SDL let me know.
 
Last edited by hito16,
  • Like
Reactions: ArgonUK and ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Would someone put up a guide of how to compile Retroarch WiiU from beginning to end (for Windows)
From installing Devkitpro, setting up the WiiU environment to Compiling Cores?
The Retroarch official compile guide for WiiU says:
"You need the DevkitPPC(r29) toolchain installed and the DEVKITPRO and DEVKITPPC environment variables set to the respective folders." but doesnt really say how to get there :P

Thanks.
 

hito16

Member
OP
Newcomer
Joined
Jan 15, 2021
Messages
19
Trophies
0
Age
54
XP
90
Country
United States
is this still happening? :) @hito16
Yes, but I probably cannot revisit this until after July.

Come to think of it, I do have one question. How do you launch a WiiU executable with command line args?

I'm asking because I recall building a stock ffmpeg ffplay executable for WiiU with SDL support, but I had no way to test it. (adding configure script I modified based on work from rw-r-r-0644 / ffmpeg-wiiu)
 

Attachments

  • configure-wiiu.txt
    1.8 KB · Views: 148
Last edited by hito16,
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Yes, but I probably cannot revisit this until after July.

Come to think of it, I do have one question. How do you launch a WiiU executable with command line args?

I'm asking because I recall building a stock ffmpeg ffplay executable for WiiU with SDL support, but I had no way to test it. (adding configure script I modified based on work from rw-r-r-0644 / ffmpeg-wiiu)
Sorry I have no clue :P but i'd say go to the source and ask on the fortheusers discord server. rw-r-r-0644 frequents there iirc.
 

jacobsson

Well-Known Member
Member
Joined
Oct 30, 2019
Messages
165
Trophies
0
Age
38
XP
769
Country
Sweden
Would someone put up a guide of how to compile Retroarch WiiU from beginning to end (for Windows)
From installing Devkitpro, setting up the WiiU environment to Compiling Cores?
The Retroarch official compile guide for WiiU says:
"You need the DevkitPPC(r29) toolchain installed and the DEVKITPRO and DEVKITPPC environment variables set to the respective folders." but doesnt really say how to get there :P

Thanks.

Hi guys. I was hoping to get back into some RA stuff again, but I'm so lost in how I set up the environment since last time.
I see that devkitPro r29 is recommended, reading this thread I couldn't really make out what was else was needed besides this and the paths to DEVKITPRO and DEVKITPPC?

@ShadowOne333
I remember you had environment running too, any chance you remember what you used?

image.png
 
Last edited by jacobsson,

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Hi guys. I was hoping to get back into some RA stuff again, but I'm so lost in how I set up the environment since last time.
I see that devkitPro r29 is recommended, reading this thread I couldn't really make out what was else was needed besides this and the paths to DEVKITPRO and DEVKITPPC?

@ShadowOne333
I remember you had environment running too, any chance you remember what you used?

image.png
Thanks, if you managed to get it up and running please can you put up a quick how to? :)
I can do the Retroarch part fine its the WiiU Environment setup part that's difficult.

@ShadowOne333 TUT!!! :P
 
  • Like
Reactions: ShadowOne333

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
you'll probably dont need much other stuff, but these are the package I've installed:
Code:
dkp-libs devkitarm-crtls 1.1.0-1 [installed]
dkp-libs devkitarm-rules 1.2.1-2 [installed]
dkp-libs devkitppc-rules 1.1.0-1 [installed]
dkp-libs devkitpro-pkgbuild-helpers 2.2.3-1 [installed: 2.2.0-1]
dkp-libs libfat-ogc 1.1.5-2 [installed]
dkp-libs libogc 2.1.0-1 [installed]
dkp-libs ppc-bzip2 1.0.6-2 [installed]
dkp-libs ppc-freetype 2.9.1-2 [installed]
dkp-libs ppc-glm 0.9.9.2-2 [installed]
dkp-libs ppc-libgd 2.2.5-2 [installed]
dkp-libs ppc-libjpeg-turbo 1.5.3-4 [installed]
dkp-libs ppc-libmad 0.15.1b-2 [installed]
dkp-libs ppc-libmodplug 0.8.9.0-2 [installed: 0.8.8.5-1]
dkp-libs ppc-libogg 1.3.4-1 [installed: 1.3.3-3]
dkp-libs ppc-libpng 1.6.37-1 [installed]
dkp-libs ppc-libvorbis 1.3.7-1 [installed: 1.3.6-1]
dkp-libs ppc-libvorbisidec 1.2.1-2 [installed]
dkp-libs ppc-mpg123 1.25.10-3 [installed]
dkp-libs ppc-mxml 2.11-2 [installed]
dkp-libs ppc-pkg-config 0.28-5 [installed]
dkp-libs ppc-zlib 1.2.11-2 [installed]
dkp-libs wiiu-pkg-config 0.28-4 [installed]
dkp-libs wiiu-sdl2 2.0.9-3 [installed]
dkp-libs wiiu-sdl2_gfx 1.0.4-1 [installed]
dkp-libs wiiu-sdl2_image 2.0.4-2 [installed]
dkp-libs wiiu-sdl2_mixer 2.0.4-5 [installed]
dkp-libs wiiu-sdl2_ttf 2.0.15-2 [installed]
dkp-libs wut 1.0.0_beta11-1 [installed]
dkp-linux devkit-env 1.0.1-2 [installed]
dkp-linux devkitARM r55-1 [installed]
dkp-linux devkitPPC r38-1 [installed]
dkp-linux devkitpro-keyring 20180316-1 [installed]
dkp-linux gamecube-tools 1.0.2-1 [installed]
dkp-linux general-tools 1.2.0-2 [installed]
dkp-linux wut-tools 1.2.0-1 [installed

you can try to compile without all of these and if you encounter an error install needed package(s) (usually its obvious what you're missing)
 
Last edited by mive,

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,542
Country
Mexico
Hi guys. I was hoping to get back into some RA stuff again, but I'm so lost in how I set up the environment since last time.
I see that devkitPro r29 is recommended, reading this thread I couldn't really make out what was else was needed besides this and the paths to DEVKITPRO and DEVKITPPC?

@ShadowOne333
I remember you had environment running too, any chance you remember what you used?

image.png
Thanks, if you managed to get it up and running please can you put up a quick how to? :)
I can do the Retroarch part fine its the WiiU Environment setup part that's difficult.

@ShadowOne333 TUT!!! :P
Ooof, it's been ages since I compiled anything Wii or WiiU related.
I eventually lost any kind of option to compile with recent devkit releases, since they transitioned everything to 64bits, and I did all my compiles and hack stuff on a 32bit Linux/Gentoo machine, and that happened like more than 2+ years ago, so I'm really iffy on all of it by now.

My best suggestion would be to read carefully the posts at devkitPro pages.
Usually for WiiU you only need Pro and PPC from what I know, as well as setting the proper paths for them. Outside of that,O'm not sure if anything changed or something else got added into the mix. Read the devkit documentation with detail and some time, it shouldn't be complicated to setup properly.

I'll update this post if I find anything noteworthy.
 
  • Like
Reactions: jacobsson

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Ooof, it's been ages since I compiled anything Wii or WiiU related.
I eventually lost any kind of option to compile with recent devkit releases, since they transitioned everything to 64bits, and I did all my compiles and hack stuff on a 32bit Linux/Gentoo machine, and that happened like more than 2+ years ago, so I'm really iffy on all of it by now.

My best suggestion would be to read carefully the posts at devkitPro pages.
Usually for WiiU you only need Pro and PPC from what I know, as well as setting the proper paths for them. Outside of that,O'm not sure if anything changed or something else got added into the mix. Read the devkit documentation with detail and some time, it shouldn't be complicated to setup properly.

I'll update this post if I find anything noteworthy.

I was under the impression that Retroarch needed a specific version of DevkitPro (r29) and files that arent packaged with DevkitPPC which makes it difficult to know what files are needed and where to get them :P
 
  • Like
Reactions: jacobsson

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,542
Country
Mexico
I was under the impression that Retroarch needed a specific version of DevkitPro (r29) and files that arent packaged with DevkitPPC which makes it difficult to know what files are needed and where to get them :P
Is that so?
I wasn't aware of that tbh, I have never compiled RetroArch for any system at all, so I'm at a loss here.
Maybe @LibretroRetroArc could know what is needed specifically for compiling the WiiU build, or maybe he might know of someone who does.
 
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,842
Country
United Kingdom
Is that so?
I wasn't aware of that tbh, I have never compiled RetroArch for any system at all, so I'm at a loss here.
Maybe @LibretroRetroArc could know what is needed specifically for compiling the WiiU build, or maybe he might know of someone who does.
TBH I'm not sure if that's true. I'm just as lost :P unless there's a step by step guide i'm useless when it comes to compiling software :)
 
  • Like
Reactions: ShadowOne333

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night