Hacking Retroarch Wii U, devkitpro r38 and WUT

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,687
Country
Mexico
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
When installing the Latest Devkitpro there's no longer an option to install WiiU Component (it was taken out a few devkit revisions ago) so finding the right WiiU specific files is difficult.. for me anyway.
There is pacman support in the latest Devkitpro, which you can install wut-tools package, these are the steps I've been following.. from the first post:

* install devkitpro per devkitpro's platform-specific instructions (I used mac os package)

* install PPC and toolchain per instructions
sudo dkp-pacman -Syu devkitPPC wut-tools - (on win it's pacman -Syu devkitPPC wut-tools)
export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=/opt/devkitpro/devkitPPC
# my mac version
/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc --version
powerpc-eabi-gcc (devkitPPC release 38) 10.2.0

* install extra stuff some of the WiiU cores will need.
% sudo dkp-pacman -Syu ppc-libpng libogc - (on win it's pacman -Syu ppc-libpng libogc)

Make sure cores build first. Checkout per retroarch wiki.
git clone.../libretro-super.git (sorry, Noobs not allowed to post urls) - Git clone didn't work for me until I installed git through pacman - pacman -Syu git
$ cd libretro-super
$ ./libretro-fetch.sh
 
Last edited by ploggy,
  • Like
Reactions: ShadowOne333

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,687
Country
Mexico
When installing the Latest Devkitpro there's no longer an option to install WiiU Component (it was taken out a few devkit revisions ago) so finding the right WiiU specific files is difficult.. for me anyway.
There is pacman support in the latest Devkitpro, which you can install wut-tools package, these are the steps I've been following.. from the first post:

* install devkitpro per devkitpro's platform-specific instructions (I used mac os package)

* install PPC and toolchain per instructions
sudo dkp-pacman -Syu devkitPPC wut-tools - (on win it's pacman -Syu devkitPPC wut-tools)
export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=/opt/devkitpro/devkitPPC
# my mac version
/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc --version
powerpc-eabi-gcc (devkitPPC release 38) 10.2.0

* install extra stuff some of the WiiU cores will need.
% sudo dkp-pacman -Syu ppc-libpng libogc - (on win it's pacman -Syu ppc-libpng libogc)

Make sure cores build first. Checkout per retroarch wiki.
git clone.../libretro-super.git (sorry, Noobs not allowed to post urls) - Git clone didn't work for me until I installed git through pacman - pacman -Syu git
$ cd libretro-super
$ ./libretro-fetch.sh
And with all those steps you managed to compile RA and the cores successfully?
Or is it still missing something else?
 

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
And with all those steps you managed to compile RA and the cores successfully?
Or is it still missing something else?
No thats just it I followed the steps and it still didn't compile :P I still think there are steps needed (or more likely, more packages to install)
 

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
What error does it give you when trying to install?
This is the error I get
upload_2021-4-22_2-30-36.png
 
  • Like
Reactions: ShadowOne333

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,687
Country
Mexico
This is the error I get
View attachment 259545
What the hell
It's complaining about g++ not being found, dafuq lol
Try simply writing in the command prompt "g++", see if that gives any output.
If it says "command not found", then you know what to look for.
From what I know, GCC should be the one that includes g++, they're compilers and they should be somewhat interchangeable.

The only other thing I can think of that might be failing is that the PowerPPC GCC compiler is not set, or doesn't have its path set. Either that or the machine's default GCC is missing its path too, but that's highly unlikely, since most UNIX based machines already come with some form of GCC installed by default, so that leans me towards the PPC GCC idea a bit more.

I could still be wrong though and it might end up being actual GCC for your machine missing for some reason.
 
Last edited by ShadowOne333,
  • Like
Reactions: ploggy

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
you need a "regular" cpp compiler for you machine not the powerpc one, as elf2rpl is a binary for your host machine
so like ShadowOne said check if g++ command works (probably not). if you get command not found or something similar you need a c++ compiler (you should be able to install with pacman) for your architecture (x64)

edit:
try to check for installed g++ with
Code:
pacman -Ql | grep $(which g++)
 
Last edited by mive,

jacobsson

Well-Known Member
Member
Joined
Oct 30, 2019
Messages
165
Trophies
0
Age
38
XP
769
Country
Sweden
@ploggy
I had that similar problems like that in the past, let me quote myself from an old post I made;
The makefile of elf2prl wants c++14 but my GCC++ 4.8.2 is too old for that.
Updated my old GCC++ 4.8.2 to 8.1.0 (download here and replace your C:\devkitPro\msys2\mingw64
and check that you've added the environmental path correctly, e.g: C:\devkitPro\msys2\mingw64\bin).

No sure if this would help you.
 

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
What the hell
It's complaining about g++ not being found, dafuq lol
Try simply writing in the command prompt "g++", see if that gives any output.
If it says "command not found", then you know what to look for.
From what I know, GCC should be the one that includes g++, they're compilers and they should be somewhat interchangeable.

The only other thing I can think of that might be failing is that the PowerPPC GCC compiler is not set, or doesn't have its path set. Either that or the machine's default GCC is missing its path too, but that's highly unlikely, since most UNIX based machines already come with some form of GCC installed by default, so that leans me towards the PPC GCC idea a bit more.
I typed GCC into Msys2 and it does say command not found so I guess thats the issue :) at least I'm narrowing it down :)

you need a "regular" cpp compiler for you machine not the powerpc one, as elf2rpl is a binary for your host machine
so like ShadowOne said check if g++ command works (probably not). if you get command not found or something similar you need a c++ compiler (you should be able to install with pacman) for your architecture (x64)

edit:
try to check for installed g++ with
Code:
pacman -Ql | grep $(which g++)
I typed what you suggested, this is what it says:
$ pacman -Ql | grep $(which g++)
which: no g++ in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
@ploggy
I had that similar problems like that in the past, let me quote myself from an old post I made;


No sure if this would help you.
I downloaded that file, and updated MinGW64 like you suggested, but it still says Command not found when I type GCC?
Do I need to add a path manually?


EDIT: OK ,so, tried pacman -S gcc, in hopes it would help,it installed but now when I type GCC I get:
$ gcc
gcc: fatal error: no input files
compilation terminated.
 
Last edited by ploggy,

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,687
Country
Mexico
EDIT: OK ,so, tried pacman -S gcc, in hopes it would help,it installed but now when I type GCC I get:
$ gcc
gcc: fatal error: no input files
compilation terminated.

Oh great!
GCC is now installed according to that output, now try running the RetroArch stuff that gave you the error before, see what it does.
 
Last edited by ShadowOne333,
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
Oh great!
GCC is now installed according to that output, now try running the RetroArch stuff that gave you the error before, see what it does.
OK it gets a bit further, now it moans about zlib.h :P

AS wiiu/system/stubs_rpl.S
MAKE wiiu/wut/elf2rpl/elf2rpl.exe
make[1]: Entering directory '/c/git/retroarch/wiiu/wut/elf2rpl'
CC wiiu/system/dynamic.c
g++ -c -o main.o main.cpp -O3 -Wall -std=c++14 -DNDEBUG -I.
AS wiiu/system/stubs_elf.S
LD objs/wiiu-salamander/retroarch_wiiu_salamander.rpx.elf
LD objs/wiiu-salamander/retroarch_wiiu_salamander.elf
cp objs/wiiu-salamander/retroarch_wiiu_salamander.elf retroarch_wiiu_salamander.elf
main.cpp:10:10: fatal error: zlib.h: No such file or directory
10 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:24: main.o] Error 1
make[1]: Leaving directory '/c/git/retroarch/wiiu/wut/elf2rpl'
make: *** [Makefile.wiiu:319: wiiu/wut/elf2rpl/elf2rpl.exe] Error 2
make: Leaving directory '/c/git/retroarch'

--------------------- MERGED ---------------------------

OK hold the phone... I switched from using Msys2.exe to MingW64.exe and now it compiles elf2rpl :)
I'm trying a core now... wish me luck :P
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,687
Country
Mexico
OK it gets a bit further, now it moans about zlib.h :P

AS wiiu/system/stubs_rpl.S
MAKE wiiu/wut/elf2rpl/elf2rpl.exe
make[1]: Entering directory '/c/git/retroarch/wiiu/wut/elf2rpl'
CC wiiu/system/dynamic.c
g++ -c -o main.o main.cpp -O3 -Wall -std=c++14 -DNDEBUG -I.
AS wiiu/system/stubs_elf.S
LD objs/wiiu-salamander/retroarch_wiiu_salamander.rpx.elf
LD objs/wiiu-salamander/retroarch_wiiu_salamander.elf
cp objs/wiiu-salamander/retroarch_wiiu_salamander.elf retroarch_wiiu_salamander.elf
main.cpp:10:10: fatal error: zlib.h: No such file or directory
10 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:24: main.o] Error 1
make[1]: Leaving directory '/c/git/retroarch/wiiu/wut/elf2rpl'
make: *** [Makefile.wiiu:319: wiiu/wut/elf2rpl/elf2rpl.exe] Error 2
make: Leaving directory '/c/git/retroarch'

--------------------- MERGED ---------------------------

OK hold the phone... I switched from using Msys2.exe to MingW64.exe and now it compiles elf2rpl :)
I'm trying a core now... wish me luck :P
Oooh sounds promising!
Best of luck!
 
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
Oooh sounds promising!
Best of luck!
WTF.. the Cores are now compiling YAY... but they crash the WiiU when I try to load them in Retroarch :wtf::cry:
This is fucking stupid.. Sooo many hoops to jump through, so many random packages to install and even then, it decides to fuk you :/ give me hardware any day.. I'm just not cut out for this Software lark :P

@mive you have this setup right? could you send me your elf2rpl exe?
(if you have it compiled)

I uploaded a couple cores I compiled, can someone check and see if the crash your WiiU as well?

EDIT: Deleted Cores.. they didnt work (working upload further down) vvvv
 
Last edited by ploggy,

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
there's a elf2rpl in wut-tools package
Code:
Repository      : dkp-linux
Name            : wut-tools
Version         : 1.2.0-1
Description     : Tools for Nintendo WiiU homebrew development)
Architecture    : x86_64
URL             : https://github.com/devkitpro/wut-tools
Licenses        : GPLv2
Groups          : wiiu-dev
Provides        : None
Depends On      : None
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 177.03 KiB
Installed Size  : 796.00 KiB
Packager        : Dave Murphy <[email protected]>
Build Date      : Thu Jul 23 18:16:33 2020
Validated By    : MD5 Sum  SHA-256 Sum  Signature

but first off installing gcc via pacman was the correct thing to do (to get a g++ compiler for your machine). avoid to manually copy/remove/replace files if you can use the package manger (pacman) for this.

to your zlib problem, do you have zlib installed? (pacman -Sy zlib)
maybe try with msys2 and installed zlib again (if not installed)

also probably a good idea (if not already done), update with pacman -Syu

I'm using a linux disto which also uses pacman as package manager so its quite similar.
I try to free space on my windows partition and try to setup a build environment, as I'm a little confused about mingw64.exe and msys2.exe
 

Attachments

  • elf2rpl.zip
    742.3 KB · Views: 146
  • Like
Reactions: ploggy

ploggy

WAKA! WAKA!
Member
Joined
Aug 29, 2007
Messages
4,818
Trophies
2
XP
7,846
Country
United Kingdom
there's a elf2rpl in wut-tools package
Code:
Repository      : dkp-linux
Name            : wut-tools
Version         : 1.2.0-1
Description     : Tools for Nintendo WiiU homebrew development)
Architecture    : x86_64
URL             : https://github.com/devkitpro/wut-tools
Licenses        : GPLv2
Groups          : wiiu-dev
Provides        : None
Depends On      : None
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 177.03 KiB
Installed Size  : 796.00 KiB
Packager        : Dave Murphy <[email protected]>
Build Date      : Thu Jul 23 18:16:33 2020
Validated By    : MD5 Sum  SHA-256 Sum  Signature

but first off installing gcc via pacman was the correct thing to do (to get a g++ compiler for your machine). avoid to manually copy/remove/replace files if you can use the package manger (pacman) for this.

to your zlib problem, do you have zlib installed? (pacman -Sy zlib)
maybe try with msys2 and installed zlib again (if not installed)

also probably a good idea (if not already done), update with pacman -Syu

I'm using a linux disto which also uses pacman as package manager so its quite similar.
I try to free space on my windows partition and try to setup a build environment, as I'm a little confused about mingw64.exe and msys2.exe

I know its bad practice to copy/paste files here and there but at this point I'm just throwing stuff at the wall and hoping something sticks :P

I ran that zlib command, but it says its already installed :P

Thanks for the file it's not an exe tho? do i rename it to .exe? i doubt that'll work

I'm trying the docker route see if that helps :)


EDIT: RA doesnt like the Wut-Tools' elf2rpl.exe.. complains about a relocations error
 
Last edited by ploggy,
  • Like
Reactions: jacobsson

jacobsson

Well-Known Member
Member
Joined
Oct 30, 2019
Messages
165
Trophies
0
Age
38
XP
769
Country
Sweden
I know its bad practice to copy/paste files here and there but at this point I'm just throwing stuff at the wall and hoping something sticks :P

I ran that zlib command, but it says its already installed :P

Thanks for the file it's not an exe tho? do i rename it to .exe? i doubt that'll work

I'm trying the docker route see if that helps :)


EDIT: RA doesnt like the Wut-Tools' elf2rpl.exe.. complains about a relocations error
Here is the elf2rpl.exe from my old setup:
https://easyupload.io/d6i365

Maybe worth a shot?
 
  • Like
Reactions: ploggy

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn