Need help with file I/O for Gamecube homebrew

Mode8fx

Active Member
OP
Newcomer
Joined
Nov 14, 2019
Messages
33
Trophies
0
XP
331
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
465
Trophies
1
Location
Quebec, Canada
Website
www.extremscorner.org
XP
3,422
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,

Mode8fx

Active Member
OP
Newcomer
Joined
Nov 14, 2019
Messages
33
Trophies
0
XP
331
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: 37

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv3 @ K3Nv3:
    20
  • Skelletonike @ Skelletonike:
    that's not bad, the same price as two big macs here
  • Skelletonike @ Skelletonike:
    But you'll be less disappointed
  • K3Nv3 @ K3Nv3:
    Also 20 on steam
  • Skelletonike @ Skelletonike:
    I prefer physical. Unless it's on sale (which is why I have hundreds of steam games) >.>
  • Skelletonike @ Skelletonike:
    PS5 games don't smell so nice though.
  • Skelletonike @ Skelletonike:
    Opening switch games smells really nostalgic though. Dunno if it's the type of plastic they use.
  • Psionic Roshambo @ Psionic Roshambo:
    Something sour to keep people from eating them?
  • Skelletonike @ Skelletonike:
    nah, not the cartridge but the box
  • Skelletonike @ Skelletonike:
    I have licked more switch games than I care to admit though.
  • Sicklyboy @ Sicklyboy:
    I've never licked a switch game
  • Skelletonike @ Skelletonike:
    Your loss.
  • Skelletonike @ Skelletonike:
    Just don't lick used games.
  • Skelletonike @ Skelletonike:
    (some people may be into that though)
  • K3Nv3 @ K3Nv3:
    Just put purell on your tongue after licking
    +1
  • Sicklyboy @ Sicklyboy:
    big slurp
  • Skelletonike @ Skelletonike:
    People have licked w
    eirder things and enjoyed it. :tpi:
    +1
  • SylverReZ @ SylverReZ:
    I know where this is going with what you're eluding to. :rofl2:
    +1
  • Skelletonike @ Skelletonike:
    Hm? I have no idea what you're referring
    to.
  • SylverReZ @ SylverReZ:
    @Skelletonike, The cartridges don't taste as bad. Least it doesn't contain poison.
  • Skelletonike @ Skelletonike:
    Yeah, what I meant was the smell of the inside of the box itself.
    +1
  • Skelletonike @ Skelletonike:
    could just be because xenoblade 3 had a sort of mini manual inside
  • K3Nv3 @ K3Nv3:
    Aye smooth mcgroove is back
  • Skelletonike @ Skelletonike:
    came with 3 leaflets, one for day one edition, another for nintendo online trial sub and an extra one talking about the online elements of the game.
    Skelletonike @ Skelletonike: came with 3 leaflets, one for day one edition, another for nintendo online trial sub and an...