Migrate GameCube port to libogc2
This adds support for the following:
- exFAT filesystem and GPT partitioning
- CUBEODE and GC Loader
- MMCE (FlipperMCE and GCMCE)
- Semi-passive SD card adapters (GC2SD Gen2, SD2SP2 2.0, etc.)
- Combo SD card adapters (future products)
- SD2SP1
- Expanded MRAM in Dolphin, Orca boards and TDEV
- Return to loader (Swiss)
- ENC28J60 (ETH2GC Lite, ETH2GC Sidecar, GCNET, SP1ETH, etc.)
- W5500, W6100 and W6300 (future products)
- Possibly more, I forget
This also fixes:
- RTC time being overwritten by logging data
- Progressive scan mode being forcibly enabled when using component video
- ~Garbled sounds due to wrong byte order~
- Controller hotplug
- Possibly more, I forget
Thanks for this, great work!
I'll need a bit of time to go through all the changes.
One thing I have noticed though: You shouldn't need to be swapping endian for sounds, as Audio.c is meant to swap little endian samples to native endian when loading wav sounds - but mistakenly (along with Resources.c) checks for CC_BUILD_BIG_ENDIAN, whereas Core.h defines CC_BIG_ENDIAN when it detects a big endian system. I'll fix this in master.
On Wed., 3 Dec. 2025, 8:26 am Extrems, @.***> wrote:
This adds support for the following:
- exFAT filesystem and GPT partitioning
- CUBEODE and GC Loader
- MMCE (FlipperMCE and GCMCE)
- Semi-passive SD card adapters (GC2SD Gen2, SD2SP2 2.0, etc.)
- Combo SD card adapters (future products)
- SD2SP1
- Expanded MRAM in Dolphin, Orca boards and TDEV
- Return to loader (Swiss)
- ENC28J60 (ETH2GC Lite, ETH2GC Sidecar, GCNET, SP1ETH, etc.)
- W5500, W6100 and W6300 (future products)
- Possibly more, I forget
This also fixes:
- RTC time being overwritten by logging data
- Progressive scan mode being forcibly enabled when using component video
- Garbled sounds due to wrong byte order
- Controller hotplug
- Possibly more, I forget
You can view, comment on, or merge this pull request online at:
https://github.com/ClassiCube/ClassiCube/pull/1471 Commit Summary
- b80f1fe https://github.com/ClassiCube/ClassiCube/pull/1471/commits/b80f1fed0b3642050f28c14627860b1c418d1863 GameCube: Migrate to libogc2
- 4b6f652 https://github.com/ClassiCube/ClassiCube/pull/1471/commits/4b6f65235ee6f773f1131b32852f9bdb71810f63 GameCube/Wii: Use correct voice format for sounds
- 916e720 https://github.com/ClassiCube/ClassiCube/pull/1471/commits/916e720c203ee06d0dccc1aedca06c3947c5e19d GameCube/Wii: Fix GameCube Controller hotplug
File Changes
(9 files https://github.com/ClassiCube/ClassiCube/pull/1471/files)
- A .github/workflows/build_gc.yml https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-d58093b8c1246293d48ca3062f925a918a8a347d3b6945f6d3413eff0933e165 (52)
- R .github/workflows/build_wii.yml https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-1189304ce5f361516337cf6a50dadc2e74b350d1f9f24e7a2cd633d70b958ba2 (23)
- M misc/gc/Makefile https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-b09c13f842ad6f89ca0eb02908c939ca923c3fb932aeef5d9bfb36937a3c27b6 (6)
- M readme.md https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-5a831ea67cf5cf8703b0de46901ab25bd191f56b320053be9332d9a3b0d01d15 (9)
- M src/gcwii/Audio_GCWii.c https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-46321d748146c48df740de752d00270cf913c1ff01c93b0d2ffad98338337223 (12)
- M src/gcwii/Platform_GCWii.h https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-4b1510004b7cbd389a0f6495d2195d0bc1a01acca0335a0510674c43c3e5975e (106)
- M src/gcwii/Platform_Gamecube.c https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-757394c751f5074577262907078d60d0c782d7adddf04cd030eda74007669396 (10)
- M src/gcwii/Platform_Wii.c https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-ebd1621920883b45d8d0df5e2275d11b9264532e620b0fd820aae85f7e19f0f7 (2)
- M src/gcwii/Window_GCWii.c https://github.com/ClassiCube/ClassiCube/pull/1471/files#diff-6f160ef7d8be4cd64778f5d13d83e438fadc04de4c73ef4a3059a0d8a33fd92f (3)
Patch Links:
- https://github.com/ClassiCube/ClassiCube/pull/1471.patch
- https://github.com/ClassiCube/ClassiCube/pull/1471.diff
— Reply to this email directly, view it on GitHub https://github.com/ClassiCube/ClassiCube/pull/1471, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRVGJCIIFOLP5HHTBY36TT37X7YTAVCNFSM6AAAAACN26TFG2VHI2DSMVQWIX3LMV43ASLTON2WKOZTGY4DONRQGM2TEMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
In regards to not using SYS_Report, I did intentionally bypass that with the base libogc as the implementation of SYS_Report there relies on realloc and free. That can be a problem for Platform_Log, as it is not really meant to allocate memory (E.g. it can be called when the game is just about to be terminated due to being unable to satisfy a required memory allocation).
If it's messing with RTC time though, that is unintentional.
Will libogc2 diverge further from libogc in the future? Platform_GCWii.h is meant to only contain code that is common to both wii and gamecube ports, but that may just become an extra burden if the GameCube and Wii backends grow further and further apart.
In regards to not using SYS_Report, I did intentionally bypass that with the base libogc as the implementation of SYS_Report there relies on realloc and free. That can be a problem for
Platform_Log, as it is not really meant to allocate memory (E.g. it can be called when the game is just about to be terminated due to being unable to satisfy a required memory allocation). If it's messing with RTC time though, that is unintentional.
I see. Well, since libogc's implementation has the same problem, that can be reverted for it.
Will libogc2 diverge further from libogc in the future? Platform_GCWii.h is meant to only contain code that is common to both wii and gamecube ports, but that may just become an extra burden if the GameCube and Wii backends grow further and further apart.
That is the trajectory.