Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GCLoader support, broken due to double-init of GCODE #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kemurphy
Copy link

@kemurphy kemurphy commented Feb 19, 2024

Commit f499333 introduced a call to GCODE_Init() in an effort to accelerate the boot device detection loop. Unfortunately, this function is called a second time inside driver->startup(), which seems to break loading files from GCLoader. In this change, we restructure the boot device detection loop to avoid the double-init of GCODE.

This change also tries to reduce the fragility of the loop by calling sdgecko_setSpeed() based on device type rather than index in the list.

Kevin Murphy added 2 commits February 18, 2024 22:33
Commit f499333 introduced a call to GCODE_Init() in an effort to
accelerate the boot device detection loop.  Unfortunately, this function
is called a second time inside driver->startup(), which seems to break
loading files from GCLoader.  In this change, we restructure the boot
device detection loop to avoid the double-init of GCODE.
@kemurphy
Copy link
Author

I think this might actually fix a bunch of the open issues around GCLoader not being detected when booting from SD card, or the console not recognizing discs when no SD card is inserted, since gcode.c looks like a straight copy of dvd.c from libogc. Things are probably stomping on each other somehow. I'll try to confirm.

@KromerSifter1997
Copy link

KromerSifter1997 commented Feb 28, 2024

Out of curiosity, were to able to confirm Gcloader support was fixed by your changes?

Right now the main issues for me is that as long as gc loader is the only one in there, the console won't recognize any changes and just uses the default configuration for the intro.

@Dracrius
Copy link

Dracrius commented Apr 28, 2024

@kemurphy would you mind posting a build with these fixes? I've tried my darnedest to get cubeboot to build but I'm stuck with

...cubeboot/cubeboot/source/pngu/pngu.c:14:10: fatal error: png.h: No such file or directory
  14 | #include "png.h"
     |          ^~~~~~~
compilation terminated.
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:21: pngu.o] Error 1
make: *** [Makefile:110: build] Error 2

I've tried everything under the sun adding libpng to windows path but it's not having it.

I'm specifically trying to get the .dol so that I can compile it with the most recent picoboot (https://support.webhdx.dev/gc/picoboot/compiling-firmware). I'm hoping this will solve my discs not being recognized without going through swiss but I'd also just like to have it all up to date and stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants