cubeboot icon indicating copy to clipboard operation
cubeboot copied to clipboard

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

Open kemurphy opened this issue 1 year ago • 3 comments

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.

kemurphy avatar Feb 19 '24 06:02 kemurphy

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.

kemurphy avatar Feb 19 '24 06:02 kemurphy

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.

KromerSifter1997 avatar Feb 28 '24 04:02 KromerSifter1997

@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.

Dracrius avatar Apr 28 '24 05:04 Dracrius