Need help with file I/O for Gamecube homebrew

GateGuy

Active Member
OP
Newcomer
Joined
Nov 14, 2019
Messages
30
Trophies
0
XP
197
Country
United States
I have a Wii homebrew game that I also ported to Gamecube. It runs fine in Dolphin, except external files (in this case, sound effects and music) are not loading. On Wii, these files would be loaded through, say, sd:/apps/my_game/my_sound.wav, but I don't know the equivalent path for Gamecube, and there's surprisingly little information I could find about Gamecube homebrew. Specifically, I want to load these assets from a Gamecube SD to memory card adapter in slot B. According to some repos of old homebrew apps, the root might be sd:/ or cardb:/, but I don't have any way of testing this. I don't have a Gamecube, I haven't been able to successfully run Gamecube homebrew on my Wii, and I have no Gamecube SD access in Dolphin, so the game runs without the loaded audio.

Basically, what is the best way to save/load external assets in a Gamecube homebrew app; what path should I use? Here's the game in question, which currently attempts to load assets from sd:/Trogdor-RB:
https://github.com/Mode8fx/Trogdor-Reburninated/releases/tag/v2.1
 

Extrems

GameCube Wizard
Member
Joined
Jan 17, 2013
Messages
431
Trophies
1
Location
Quebec, Canada
Website
www.extremscorner.org
XP
3,022
Country
Canada
Dolphin doesn't emulate SD cards in SPI mode, so it's impossible to test with it.

The following paths can exist with libogc:
  • carda:/ - for an SD Card Adapter in Memory Slot A
  • cardb:/ - for an SD Card Adapter in Memory Slot B
  • sd:/ - for an SD Card Adapter in Serial Port 2 (SD2SP2)
Additionally with libogc2:
  • dvd:/ - for the GC Loader
Since you're using fatInitDefault(), I suggest using just plain /.
That function will chdir to the first device available (order varies between libogc and libogc2), or the path given in argv[0] if available (it is with the current version of Swiss).
 
Last edited by Extrems,

GateGuy

Active Member
OP
Newcomer
Joined
Nov 14, 2019
Messages
30
Trophies
0
XP
197
Country
United States
Dolphin doesn't emulate SD cards in SPI mode, so it's impossible to test with it.

The following paths can exist with libogc:
  • carda:/ - for an SD Card Adapter in Memory Slot A
  • cardb:/ - for an SD Card Adapter in Memory Slot B
  • sd:/ - for an SD Card Adapter in Serial Port 2 (SD2SP2)
Additionally with libogc2:
  • dvd:/ - for the GC Loader
Since you're using fatInitDefault(), I suggest using just plain /.
That function will chdir to the first device available (order varies between libogc and libogc2), or the path given in argv[0] if available (it is with the current version of Swiss).
So just using / would be ideal, and the user's method of running homebrew will take care of pulling from the correct device?

In that case, I recompiled it to set /Trogdor-RB/ as root; do you have a few minutes to run this version with the audio from the release version and see if there's audio? I'd really appreciate it. There should be a "Trogador" voice clip after the instructions menu appears, and music in the Options menu.
 

Attachments

  • boot.zip
    2.5 MB · Views: 9

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • ZeroT21 @ ZeroT21:
    i got xp but running it off usb only, no way ima keep that
  • ZeroT21 @ ZeroT21:
    it gets hacked/corrupted if i just leave it online for an hour
  • SylverReZ @ SylverReZ:
    @ZeroT21, The Russians are after you lol.
  • K3Nv2 @ K3Nv2:
    Send me your ip I'll remotely fix it
  • ZeroT21 @ ZeroT21:
    @K3Nv2 my head needs fixing if I believe you
  • ZeroT21 @ ZeroT21:
    it's kinda fun watching it happen tho
  • K3Nv2 @ K3Nv2:
    It needs fixing for other things but your pc I can fix
  • ZeroT21 @ ZeroT21:
    over 300+ virus/trojians/worms after scanning, what did I do to deserve this attention lol
  • ZeroT21 @ ZeroT21:
    tho I find it funny when i receive other people's pc/laptops in this state
  • ZeroT21 @ ZeroT21:
    i wont be upgrading unless I cant run the games i want anymore
  • K3Nv2 @ K3Nv2:
    Spill water on it good excuse
  • ZeroT21 @ ZeroT21:
    @K3Nv2 that's like a valid option if someone else is paying for ya
  • K3Nv2 @ K3Nv2:
    Daddy's wallet
  • K3Nv2 @ K3Nv2:
    Ngl hogwarts legacy has good pooping music
  • OctoAori20 @ OctoAori20:
    That's uh-
  • OctoAori20 @ OctoAori20:
    That's certainly a Dairy Queen sign lmao
  • K3Nv2 @ K3Nv2:
    You should see his help wanted signs
  • OctoAori20 @ OctoAori20:
    Ugh, so many sweat-dipwads in Sploon 3 Anarchy mode tonight
  • OctoAori20 @ OctoAori20:
    I didn't know this was "Make Octo never finish Fresh Season 2024 Catalog in Splatoon 3" month, good god
  • Veho @ Veho:
    What's the point of "confirming" games you know will get released. Like Nintendo "confirming" a Zelda sequel. "We can't be sure Nintendo is working on a new Zelda game, or if a new Zelda game will ever be released, until they officially confirm it."
  • Veho @ Veho:
    "There is literally no way to know if they will ever release a new Zelda game, it's wild speculation until they officially confirm it."
  • K3Nv2 @ K3Nv2:
    Black ops was the lesser shitter line in cock a poopoo tbf just a way to let people know it hasn't died or going a different route I guess
    K3Nv2 @ K3Nv2: Black ops was the lesser shitter line in cock a poopoo tbf just a way to let people know it...