Homebrew noob question

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom
This may seem like a silly question but how do I get windows versions of the devkitPPC and libOGC I used devkitProUpdater-3.0.3 but there was no option to select what version to download. I just want to update libfat so it can read from a usb correctly.

Is there any way to check from the current devkitpro folder what revision it is using ?

The project I want to update can be found on github under "DCurrent" "openbor"
 

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,130
Country
France
This is not a silly question at all. The devkit is now using pacman : https://devkitpro.org/wiki/devkitPro_pacman
The devkitPPC binaries are not on sourceforge anymore. On github, only the latest ones are available. This is very annoying... I don't know if you can chose the version with pacman. Anyway, here are some links :
https://github.com/devkitPro/libfat/releases
https://github.com/devkitPro/buildscripts/releases
https://github.com/devkitPro/libogc/releases
The latest libogc has a nasty bug. There's a fix in the pull request.

To check DevkitPPC version, open cmd, go to /devkitPRO/devkitPPC/bin and type powerpc-eabi-gcc.exe -v.
For libogc : /devkitPRO/libogc/include/ogc/libversion.h

And I just saw this answer from Wintermute : https://github.com/devkitPro/buildscripts/issues/29
Mirrors of previous devkit/liboc would be very useful. Sometimes, you can't spent hours debugging errors introduced by the libs. The errors could also be too low level for homebrew developpers. The new libs don't add huge improvements or new hardware support anyway. Well, there are many reasons but it seems it's a lost cause.
 
Last edited by Wiimpathy,

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom
libOGC Release 1.8.12 and devkitPPC release 27

Are these good stable releases ?

When the source code tries to access the "usb:/" using libfat it crashes the wii how to I fix this it can access "sd:/" without any problems.
 

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,130
Country
France
I don't know, I've used r26 for a long time then r28. R29+ supports WiiU pro controller... but you'll have to adapt the code.

About the usb crash, you could try adding IOS_ReloadIOS(58) before fatInitDefault(). You could also add usleep to be sure the drive is mounted.
 

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom
I tried to add both the the ios_reload and usleep but I still got a black screen with "exception (DSI) occurred!" with a screen full of numbers attached the file if you can see what I am doing wrong please help.
 

Attachments

  • wiiport.c.txt
    3 KB · Views: 144

nulln

New Member
Newbie
Joined
Jul 28, 2018
Messages
4
Trophies
0
Age
24
XP
62
Country
Australia
I tried to add both the the ios_reload and usleep but I still got a black screen with "exception (DSI) occurred!" with a screen full of numbers attached the file if you can see what I am doing wrong please help.
if you're getting an error with usleep, try adding this to the file that gives you the error:
Code:
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
 

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,130
Country
France
Are you sure you're building the dol with libfat? Because in the Makefile, Wii section there's BUILD_ELM = 1. But even if you change it to BUILD_ELM = 0 it will still try to compile with libelm. Here's why :
You're testing with ifdef BUILD_ELM. The problem is that it will always be true since ifdef only test the existence of the variable. You should use ifeq ($(BUILD_ELM), 1) to test the value instead.
Here's a good example here : https://stackoverflow.com/questions...-preprocessor-directives-if-and-ifdef#3803108

I've tried with devkitPPC 27 like you (but with linux), libogc 1.8.15, libfat 1.0.14 and your libvorbisidec. Usb seems to work without changing anything related to libfat. By the way, you don't need to unmount usb at startup. Only a delay and the reload should be enough, look at how it's done in Genesis Plus Gx : https://github.com/ekeeke/Genesis-Plus-GX/blob/master/gx/main.c

I've started with devkitppc 29 so I've changed stricmp to strcasecmp etc. Anyway, here's test dol + source code:

Openbor-wii_usb-test

source

Look for my pseudo wiimpathy in the source to see my initial changes. You still have to add the delay etc.
I almost forgot but years ago, I've made a wiiflow plugin for openbor (quick hack) and had this usb issue. Maybe you're also interested in adding proper plugin support?
 

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom
@Wiimpathy
Thanks you are very helpful i managed to get it working on the current build by removing any reference to libelm in both the wiiport.c and the makefile it loaded from usb without any issues made me so happy I wanted to cry lol.

Now my main issue is adding dynamic directories what I mean is when the engine is loaded have a script to check what path is was loaded from is sdl they say basepath if I could check that path then export it to the directories then you could run multiple copies of obenbor. The main benefit from this would be having one game in each folder then you could make a forwarder and load individual games from the wii menu.

This test you uploaded are you saying you updated the devkit from 27 to 29 if so are there any real benefits from using the newer devkit since I see a lot of posts where people want to downgrade due to bugs and problems
 

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,130
Country
France
Do you know WiiFlow plugin's system? You can launch individual file for emulators/apps with covers : https://sites.google.com/site/wiiflowiki4/plugins-setup
What you ask is how to handle arguments (argv) and how to test folders. I can give you some hints but I won't do all the job for you.
My openbor plugin : https://gbatemp.net/threads/wiiflow-an-open-source-gui-usb-loader.204106/page-667#post-4719266
It's a quick and nasty hack but you'll get the idea. Look for plugin in the source.

More recently SuperrSonic's Wiimc : https://github.com/SuperrSonic/WiiMC-SSLC/commit/3a93d256779c8cf1d979de274ac9750e4a094af4
https://github.com/Wiimpathy/FunnyMu-Wii/blob/master/source/funnymu.c#L103

Test folders :
https://github.com/Wiimpathy/Bermuda-Wii/blob/master/source/main.cpp#L77

Genesis plus, surely better code than mine :
https://github.com/ekeeke/Genesis-Plus-GX/blob/master/gx/main.c#L331

The test dol is compiled with r27 but I've started the changes to be r29+ compatible. As I said wii-u pro controller support is integrated in r29, you need an external lib before that. You can read the changelogs and commits to help you decide.
 
Last edited by Wiimpathy,

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom

msmalik681

Member
OP
Newcomer
Joined
Jun 14, 2018
Messages
14
Trophies
0
Age
43
XP
84
Country
United Kingdom
I have managed to get the base path using this code:

char root[MAX_FILENAME_LEN];
memset(root, '\0', sizeof(root));
strncpy(root, argv[0], strrchr(argv[0], '/') - argv[0]);

sprintf(rootDir, "%s/OpenBOR/", root);
sprintf(savesDir, "%s/Saves", root);
sprintf(paksDir,"%s/Paks", root);
sprintf(logsDir, "%s/Logs", root);
sprintf(screenShotsDir, "%s/ScreenShots", root);

Does anyone know how to check what video mode the wii is running (PAL - NTSC) I need this so I can scale the screen correctly.
 
Last edited by msmalik681,

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
Use the DSI data to determine where it's crashing. You'll need the ELF file for the version you're testing and gdb from devkitPPC. "gdb info line *X" where X is the hex address from the DSI dump. (ex: "gdb info line *0x800084ac")

I don't know of any issues with newlib and double values.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    I kept thinking jaws was gonna come up and attack
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
    K3Nv2 @ K3Nv2: Tell Kanye I need power