Homebrew Help compiling Wii homebrew apps

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
Hello,

I'm new to compiling anything for the Wii, but I wanted to give it a shot so I could use homebrew emulators on vWii with Ustealth support and learn something new. I have run the installer which installed devkitPro PPC r28, libogc 1.8.15. I also installed the most recently released portlibs from https://sourceforge.net/projects/devkitpro/files/portlibs/ppc/, as well as libwupc.

Please refer to the attached screenshot. I cloned this repository so as to re-compile VBA GX 2.3.2 with Ustealth support (modified libfat.a). In the process of re-compiling, the make process got stuck here at "preferences.o" and I have no idea what I need to do to fix it. It continually throws this mysterious (to me) "Error 1" and stops compiling. Could someone who knows what they are doing with this compiling stuff please give me a nudge in the right direction? (I see the errors above "Error 1" but are they related to compile failure? There were plenty of similar-looking ones before but the .o files compiled alright.)

5MHEBv.jpg



UPDATE: I've read up on C programming and changed the code myself so as to resolve errors (which prevent compilation, apparently :P). The result: a successful compile. However, after loading up the .dol output from compilation on my vWii, the app freezes before fully loading. But downloading a ready-made binary from the same repository works just fine, though it lacks Ustealth support. So the changes libertyernie made do not seem to be the problem.
In other words, I haven't really made any progress in this... But I've learned something!

No one else seems to have this much trouble with compiling Wii homebrew apps :blink: I must be doing something incorrectly. Can someone tell me how they would go about compiling a Wii homebrew app in general? I followed this guide on Wiibrew to setup the devkitPro environment and have had success compiling the examples. It's only when I try cloning a repository and building from a makefile that errors prevent the program from finishing compilation. Are there any special steps or tricks I need to do? Do most people override the errors somehow? Or is there some patch I failed to download that fixes the errors?

Again, thank you for taking the time to read this and in advance for any guidance you might offer me. :)
 
Last edited by DarkDengar,

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
All the compile errors I am getting seem to be related to unsigned int and unsigned long int invalid conversions. But when I fix them, the app freezes when loaded up. Surely someone must have seen these invalid conversion errors before; what's the answer to this? Both preferences.cpp and video.cpp in the source have these errors. How should they be resolved? What do I need to do differently in order to compile working apps?

I thought maybe it would help to see the output of the make. Or at least couldn't hurt?
 

Attachments

  • makefile.wii.txt
    596.5 KB · Views: 308
Last edited by DarkDengar,

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
All the compile errors I am getting seem to be related to unsigned int and unsigned long int invalid conversions. But when I fix them, the app freezes when loaded up. Surely someone must have seen these invalid conversion errors before; what's the answer to this? Both preferences.cpp and video.cpp in the source have these errors. How should they be resolved? What do I need to do differently in order to compile working apps?

I thought maybe it would help to see the output of the make. Or at least couldn't hurt?

You'll either need to go back to devkitPPC r27 or manually fix all of the casting issues.

If you want to update the code look for callback definitions that don't match their implementations and incorrect printf formatting codes. (i.e.: a callback might be defined as returning int* but the implementation is s32*. For printf errors most can be fixed by changing the %* statement. If the compiler warns of a conversion from long unsigned int to %i the %i should be changed to %lu)
 
  • Like
Reactions: DarkDengar

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
You'll either need to go back to devkitPPC r27 or manually fix all of the casting issues.

If you want to update the code look for callback definitions that don't match their implementations and incorrect printf formatting codes. (i.e.: a callback might be defined as returning int* but the implementation is s32*. For printf errors most can be fixed by changing the %* statement. If the compiler warns of a conversion from long unsigned int to %i the %i should be changed to %lu)

Thanks for your advice GreyWolf. I first attempted to fix the casting issues and compile with devkitPPC r28, but after numerous failures I opted to return to devkitPPC r27. I got some .dol's to compile without any errors, and without me modifying any code. However, it seems I'm not finished yet. I'm getting the same crash that I got from the .dol obtained from the VBA GX compiled for Ustealth in @OriginalHamster 's signature. Just to check, I also compiled an identical version with the original libfat.a. All 3 (Hamster's, mine w/ libfatmod, mine w/o libfatmod) of these .dols crashed at the same 1 of 2 points: After loading up okay, 1. when attempting to load a ROM or 2. when entering the Settings screen. I also tried running them in the Dolphin emulator. This is the error that came up when traveling to the settings screen:

FO6bN3.jpg


Interesting to note: the .dol that was downloaded directly from the VBA GX 2.3.2 github does NOT throw this error... Shouldn't the version I compiled with regular libfat and the one downloaded from github be identical? Assuming it was compiled with the same libraries...

Anyone have any ideas of what might be causing this?
I can get a picture of the stack dump screen on the vWii later if that would help illuminate the problem. I could also get a list of warnings from compiling. Whatever helps! I'm very confused as to why this still isn't working for me.
 

OriginalHamster

UStealthy
Member
Joined
Nov 2, 2008
Messages
3,380
Trophies
0
Age
44
XP
1,367
Country
Cote d'Ivoire
@DarkDengar I remember updated my vbagx sig, I used to boot it without problems, now I only use RetroArch, I delete my builds some time ago.
Also make sure you have installed the libraries for PPC no ARM.
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
Thanks for your advice GreyWolf. I first attempted to fix the casting issues and compile with devkitPPC r28, but after numerous failures I opted to return to devkitPPC r27
I would suggest you to use devkitpro r26, there seems to be some performance regressions from 27 and upwards.

I have been trying to compile Snes9x GX with libogc 1.8.11, but it always gives me the same error:
CoPjYvA.jpg


The funny thing is, it compiles successfully with libogc 1.8.12/1.8.14/1.8.15, but then some games get fatal errors that crash the emulator: for example, you cannot enter any battle in Chrono Trigger or Final Fantasy III.
 
  • Like
Reactions: DarkDengar

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
@niuus Your suggestion worked perfectly!! I downgraded to devkitPro r26 and libogc 8.1.12, then added the libfatmod, compiled, and ran it on vWii! Runs just fine and the Ustealth drive is visible to it.
Thanks again @GreyWolf for putting me on the right path with downgrading... I'm sure it could be fixed by updating the code too, but though I wanted to learn from this, I didn't want to re-invent the wheel (unless I had to ;)). I did check, Hyper-V wasn't involved here so I won't say any more on that.
Thanks for the input @OriginalHamster , for some reason the VBA GX build in your sig wasn't working for me... But if I understand what you said, those Ustealth builds you made are obsolete now? Anyways the other ones worked fine for me, just the VBA GX one wasn't. Thanks very much for making the other Ustealth builds :D.
:gba: Now to have some fun!
 
  • Like
Reactions: niuus

OriginalHamster

UStealthy
Member
Joined
Nov 2, 2008
Messages
3,380
Trophies
0
Age
44
XP
1,367
Country
Cote d'Ivoire
@DarkDengar I haven't kept with latest releases, they couldn't be up to date versions. I'm now using RetroArch on Wii U side, it's being actively developed and can run games than weren't possible on Wii/vWii.
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
I can't see exactly what the error is but it looks like it happened during linking and might be an alignment error. Stuff like that should be fixed as it could be causing bugs in the current revision of the software. :)
 

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
@DarkDengar I haven't kept with latest releases, they couldn't be up to date versions. I'm now using RetroArch on Wii U side, it's being actively developed and can run games than weren't possible on Wii/vWii.

Oh! I understand now. RetroArch Wii U seems to be coming along, and other cool stuff on Wii U side too. I'm excited! But for now I prefer the stability/reliability of the vWii side. ^_^
Would you want the 2.3.2 Ustealth VBA GX build I made to update the one in your sig? I understand you don't need it anymore but maybe others would?

@niuus Could you post a link to the place where you got the SNES 9x GX source code from? If I learned anything from this experience, it's that dates are important. I downgraded all of the devkitPro libraries to be the release before the last successful compile date listed on the source code's github (which included r26, as you suggested). That might not be the problem here but it's probably worth checking.
 

OriginalHamster

UStealthy
Member
Joined
Nov 2, 2008
Messages
3,380
Trophies
0
Age
44
XP
1,367
Country
Cote d'Ivoire
Oh! I understand now. RetroArch Wii U seems to be coming along, and other cool stuff on Wii U side too. I'm excited! But for now I prefer the stability/reliability of the vWii side. ^_^
Would you want the 2.3.2 Ustealth VBA GX build I made to update the one in your sig? I understand you don't need it anymore but maybe others would?

@niuus Could you post a link to the place where you got the SNES 9x GX source code from? If I learned anything from this experience, it's that dates are important. I downgraded all of the devkitPro libraries to be the release before the last successful compile date listed on the source code's github (which included r26, as you suggested). That might not be the problem here but it's probably worth checking.
Sure, post the link and will update my sig.
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
@niuus Could you post a link to the place where you got the SNES 9x GX source code from? If I learned anything from this experience, it's that dates are important. I downgraded all of the devkitPro libraries to be the release before the last successful compile date listed on the source code's github (which included r26, as you suggested). That might not be the problem here but it's probably worth checking.
Yeah, the source i use right now is:
https://github.com/dborth/snes9xgx
https://github.com/dborth/fceugx
https://github.com/dborth/vbagx

Did you by any chance compiled VBAGX? Do you get a DSI crash when entering Settings?

EDIT: it turns out you can avoid the DSI crash if you enter a game (say, Tetris) first, and after that, you can go into Settings. If you exit the emulator, you'll have to repeat the cycle. Weird.
 
Last edited by niuus,

DarkDengar

Active Member
OP
Newcomer
Joined
Dec 5, 2015
Messages
35
Trophies
0
XP
1,209
Country
United States
Yeah, the source i use right now is:
https://github.com/dborth/snes9xgx
https://github.com/dborth/fceugx
https://github.com/dborth/vbagx

Did you by any chance compiled VBAGX? Do you get a DSI crash when entering Settings?

EDIT: it turns out you can avoid the DSI crash if you enter a game (say, Tetris) first, and after that, you can go into Settings. If you exit the emulator, you'll have to repeat the cycle. Weird.

That's interesting, VBA GX wouldn't even load games without crashing. I did successfully compile it now, but it is different source from the one you were using.

I took a peek at the source pages and on the wiki found this:
Instructions
  1. Ensure that you have devkitPPC r24 and libogc 1.8.7 or higher installed. If you have an older version, completely uninstall it first.
  2. Download and copy the ported libraries to your PPC portlibs folder (on Windows this is c:\devkitPro\portlibs\ppc)
  3. Download the source.
  4. Run Programmer's Notepad (installed with devkitPro)
  5. Find the Makefile from the source you downloaded. Click Tools > Make.
  6. You're done!

Try this: grab devkitPPC r24, libogc 1.8.7, libfat-ogc 1.1.10, portlibs, and after installing them, try compiling. It seems like the closer to the original version used to compile the app, the more likely it will work. Maybe. It's worth a shot anyways!

@OriginalHamster here's the link: https://www.dropbox.com/s/6bdiwo334c6d959/vbagx_2.3.2_ustealth.zip?dl=0
 

icw35

Well-Known Member
Member
Joined
Sep 22, 2010
Messages
542
Trophies
1
XP
706
Country
Guys, where do I find r26 to download and install or how do i go back to a previous version? The .exe I run always installs latest version and I get all those compile errors that DarkDengar was getting.

Thanks!
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
If you want to compile anything recent with the older devkitPPC you need three things:
devkitPPC r27 (should work as well as r26),
the latest libogc for that version (1.8.12)
and the libfat for that version of libogc (1.0.13)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: https://youtu.be/2byHyqiZVS8?si=Qr7te3eS9u0xQYDh