Need help with file I/O for Gamecube homebrew

GateGuy

Active Member
OP
Newcomer
Joined
Nov 14, 2019
Messages
30
Trophies
0
XP
207
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
433
Trophies
1
Location
Quebec, Canada
Website
www.extremscorner.org
XP
3,047
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
207
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
  • BigOnYa @ BigOnYa:
    But he still here, but under dif name, he pm me sometimes still even.
  • K3Nv2 @ K3Nv2:
    It's like they think we'll be in their bed pissing on it the next day
  • BigOnYa @ BigOnYa:
    I feel like gbatemp should make t-shirts or memorabilia to remember the lost ones. I bet the Polly shirts would sell out quick.
  • K3Nv2 @ K3Nv2:
    Nah that could actually bring lawsuits
  • K3Nv2 @ K3Nv2:
    Tempsuits
  • BigOnYa @ BigOnYa:
    PollySuits
  • BigOnYa @ BigOnYa:
    Your correct, Somebody would be guilty and there would be riots, then they storm the gbatemp capitol,
  • K3Nv2 @ K3Nv2:
    Online or not there are still certain rights that judges would have no issue handing out a warrant over
  • K3Nv2 @ K3Nv2:
    Just look at Kim dotcom
  • BigOnYa @ BigOnYa:
    Honestly I'm scared to, from you, but ok, lemme turn on vpn, virtual machine, private browser first
  • K3Nv2 @ K3Nv2:
    Remember that Alexa robot I gifted you
  • K3Nv2 @ K3Nv2:
    And that laptop Webcam you never tapped up
  • BigOnYa @ BigOnYa:
    That robot is here somewhere, I hear it moving around at night, but I haven't seen it for months.
  • BigOnYa @ BigOnYa:
    Oh that laptop I give to ancientboi, so you been watching him for months, and he's been watching you
  • K3Nv2 @ K3Nv2:
    Oh good more than enough material for the fbi
    +2
  • BigOnYa @ BigOnYa:
    Damn its 5 in morn, I gotta Go wake your mum and send her to work. Check ya later.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    He could make so much money!!! His arm would never get tired lol
    +2
  • S @ salazarcosplay:
    How are yall doing
    +2
  • VXNlcm5hbWU @ VXNlcm5hbWU:
    Just had a pure banger of a sandwich there, was very nice
    +1
  • BakerMan @ BakerMan:
    what do you call a dog with no legs?
  • Psionic Roshambo @ Psionic Roshambo:
    A hot dog?
    Psionic Roshambo @ Psionic Roshambo: A hot dog?