suloku / gcmm

A gamecube/wii memory card manager
GNU General Public License v3.0
255 stars 24 forks source link

Support for Gamecube SD2SP2 #36

Closed tjanas closed 3 years ago

tjanas commented 4 years ago

Currently unable to run GCMM effectively via Swiss using SD card connected to serial port 2 (with SD2SP2 adapter). This is a feature request to support SD2SP2 just like Swiss and GBI.

suloku commented 4 years ago

I've checked and seems I only need to update libfat and little extra tweaks to add support. Should be easy enough, but I won't be able to test it since I don't have the hardware

tjanas commented 4 years ago

I would be happy to test it.

suloku commented 4 years ago

Hi, here's 1.4g, I'd be happy if you could test the gamecube version for SD2SP2 support. Do you own a SD gecko? I ordered a SD2SP2 myself, but don't know when it'll arrive.

Changes: (no changes in wii version besides compiling with latest libraries) GCMM will test for a SD2SP2 device. If it finds it, it will attempt to use it as a fat device, then will ask which Memory Card you want to use (as in wii mode, where you can select which memory card to use). If sd2sp2 device is not present GCMM will work as always and ask in which slot the SD gecko is inserted.

Also, now pressing START in gamecube mode should properly reboot the console when no payload (i.e. PS0 exploit) is present. Could you test this too?

Also, it'd be great if you could test importing a Fzero or PSO savegame (copy protected saves) from a different memory card and see if it still works the same (it should, but I'd like to test it anyways since I had to rename a function for compiling compatibility). EDIT: removed link, see further messages

If everything is fine I'll commit changes and put it on releases page

tjanas commented 4 years ago

I do not have an SD Gecko. I will test copying an F-Zero GX save from a different memory card in addition to pressing start to reboot the console.

tjanas commented 4 years ago

Pressing start to reboot / exit on GameCube did not work. I quickly saw “Exiting” flash where the “Choose your mode” text is, and then the interface froze (no longer responding to buttons, reset button on console doesn’t work).

tjanas commented 4 years ago

I tested backing up an F-Zero GX save from one memory card, and then restoring to another memory card, and that worked fine.

suloku commented 4 years ago

Just checked the code, I actually forgot to change the argument for gamecube reset even though I added the code to handle it differently...I'll reconpile in a few hours. Glad sd2sp2 support works fine.

suloku commented 4 years ago

OK, may you be able to test reboot in gamecube? If this works as intended I'll make the release and push changes to source, thank you for your collaboration! gcmm_1.4gbeta2.zip

tjanas commented 4 years ago

I tried this latest beta and it still has the same issue with reboot.

suloku commented 4 years ago

I'll check how swiss handles rebooting, seems libogc functions don't work for whatever reason

echan42 commented 4 years ago

Just finished restoring some data using 14g on sd2sp2, works a charm! I don't know how rebooting works but I have the hardware so if you need any aditional testing done HMU

vxbinaca commented 4 years ago

Needs EXFAT support for SD cards

carstene1ns commented 4 years ago

@vxbinaca not likely to happen. Also not much reason to support it.

vxbinaca commented 4 years ago

@carstene1ns This isn't 2010 where we're using 4 gig SD cards in Gecko adapters, today card capacity in hundreds of gigs exFAT support is wise

tjanas commented 4 years ago

@vxbinaca I believe exFat is supported by Swiss itself and GBI so it is possible but not within the scope of this particular issue (perhaps open a separate issue for this request).

carstene1ns commented 4 years ago

@vxbinaca, @tjanas: Swiss uses fatfs, almost all other homebrew uses libfat. To support exfat, gcmm would need to be ported to fatfs library. I am not saying it is not possible, just unlikely to happen (soon).

simpeltron commented 4 years ago

Is there a solution for resetting back to swiss? I load swiss through save game exploit and a memory card in SLOT A into sp2sd2 where i have an Igr.dol for swiss for resetting with DOWN+R+Z+B since i always switch the memory card for games. When i press start in GCMM it just freezes. What am i doing wrong? On 1.4g beta.

tjanas commented 4 years ago

I believe exiting is still a bug in GCMM on GameCube

Papy-G commented 4 years ago

I don't personally remember having seen exitting working on GameCube anyways.

Maybe a SWISS boot (boot.dol or autoexec.dol) as in GBI could be smarter?

tjanas commented 4 years ago

I believe exit functionality works fine with the 240p Test Suite and GBI

flo0306 commented 4 years ago

I used the 14g with sd2sp2, works perfectly on my GameCube 👍

tjanas commented 4 years ago

I used the 14g with sd2sp2, works perfectly on my GameCube 👍 @flo0306 Did you try exiting the app?

flo0306 commented 4 years ago

@tjanas No I haven’t been able to exit the app, I made the test today, the app freezes. The first time I tried it, I directly switched off the gamecube.

skx7 commented 4 years ago

I have also an SD gecko and sp2sd. If you want me to test something, just let me now which dol?

Papy-G commented 4 years ago

@tjanas I don't remember seeing exit work on Gamecube's GCMM version, while it works in the Wii version as well as in GBI and 240p Test Suite

SubElement commented 4 years ago

I'll check how swiss handles rebooting, seems libogc functions don't work for whatever reason

Did you ever figure this out?

RazorLeafAttack commented 3 years ago

@suloku Do you have any idea why 1.4g seems to have a lower resolution signal than 1.4f on the Wii (using component)

suloku commented 3 years ago

No idea about that. I've recompiled with latest devkitpro libraries, maybe this fixes the resolution, or maybe it's the other way around: code is old and latest libogc produces different output. I don't have my gamecube set up yet (even though I adquired an sd2sp2...), not I can test component on wii. If you are willing to test I can provide some builds.

Also, here's a gamecube dol which uses extrem's emGBA exit function, let's see if this fixes the GC reboot freeze... (https://github.com/extremscorner/emgba/blob/6070ebbcbb39e114813fd3e6a980e74d71698a7a/source/main.c#L2080)

I don't personally remember having seen exitting working on GameCube anyways.

Maybe a SWISS boot (boot.dol or autoexec.dol) as in GBI could be smarter?

This can be a good option also. This build has the following behavior when pressig start: 1- Check for loader stub (psoload, costis sdloader...) 2- If there's no stub and there's a sdgecko or sd2sp2 try to load fat:/autoexec.dol 3- If there's no sd device or autoexec.dol file, try SYS_ResetSystem(SYS_HOTRESET, 0, 0); (the one emGBA uses, maybe this finally resets the gamecube...) gcmm_GC_14gbeta3.zip gcmm_1.4gbeta3_src.zip

emukidid commented 3 years ago

SD2SP2 portion of this works fine. I had a SD Gecko in Slot A and a SD2SP2 and it prioritised the latter which is as expected. Pressing Start to exit in my setup did nothing but I don't really care (didn't have a stub, didn't have autoexec.dol)

suloku commented 3 years ago

Thank you for testing. Finally got my wii set up so I could test some things in gamecube mode. If something unexpected happens I should be able to get my GC running (and the sp2sp I adquired last year and is still unused...) sometime next week. I fixed GC rebooting, also made you able to use SD gecko even if you have an SD2SP2 (still defaults to SD2SP2, then SD Gecko) https://github.com/suloku/gcmm/releases/tag/1.5