In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "GameCube Memory Manager"

From WiiBrew
Jump to navigation Jump to search
(Undo revision 88030 by Cease and Desist (Talk))
Line 5: Line 5:
 
| type        = system tool
 
| type        = system tool
 
| author      = suloku
 
| author      = suloku
| version    = 1.0
+
| version    = 1.1
 
| download    = http://code.google.com/p/gcmm
 
| download    = http://code.google.com/p/gcmm
 
| source      = http://code.google.com/p/gcmm
 
| source      = http://code.google.com/p/gcmm
Line 23: Line 23:
  
 
* Backups and restores savegames into GCI format
 
* Backups and restores savegames into GCI format
* Deletes savegames from slot B memory card
+
* Restores savegames in GCS/SAV format
 +
* Deletes savegames from memory card
 
* Wiimote and GameCube controller support
 
* Wiimote and GameCube controller support
 
* Power button support
 
* Power button support
* Front SD (wii) and SDGecko (gc) support
+
* Front SD and FAT32 USB device (wii) and SDGecko (gamecube) support
* A nice UI
+
* Shows savegame information, alongside Icon and Banner!
 +
* A (somewhat) nice UI
 
* Open Source!
 
* Open Source!
  
 
== UPDATE HISTORY ==
 
== UPDATE HISTORY ==
 +
 +
[What's New 1.1 - august 29, 2012 - By suloku]
 +
 +
* Icon and banner by dronesplitter!
 +
* Added USB-SD selection in wiimode (only at boot)
 +
* Added card slot selection (wii mode only)
 +
* Propper GCI backup and restore. Now GCMM uses __card_getstatusex and __card_setstatuex, which provide a more 1:1 backup/restore
 +
* Correctly displaying savegame Date information
 +
* Savegame information rearranged.
 +
 +
Accepted PlabloACZ and Picachu025 modifications, with the following changes:
 +
* Tweaked mount function
 +
* Filenames are no longer prefixed with a number for current sesion. Instead, savegames are suffixed with a number. When backing up a savegame if the same file exists on SD it will be prefixed with a growing number (if savegame_00.gci exists, then it will try savegame_01.gci, savegame_02.gci... and so on)
 +
* Infinite loop can't happen when backupping a savegame as in r11 MOD 2.
 +
 +
[What's New r11 MOD 2 - September 11, 2011 - By Pikachu025]
 +
* R (GC-Pad) / 1 (Wiimote) now launches a "backup all" mode, where all saves on the memory card are written to the SD card without any user prompts in the meantime.
 +
* I came across a couple saves that had ridiculous filenames that refused to write to SD, so if the program comes across one of those, it'll now write them out as "illegal_name" instead of the actual filename.
 +
* Filenames written to SD are now prefixed with a number, counting up from 1 for every file written during the current session. I added this since I had multiple files that resulted in the same filename.
 +
* I also added a small check if the file was written correctly. If not, it'll retry. This probably results in an infinite loop when your SD card doesn't have enough free space, so ensure that I guess.
 +
* I also (quite shoddily) edited the image listing all the options to add the new option, it's ugly but does its job. Feel free to fix, I don't have Photoshop or anything here.
 +
 +
[What's New r11 MOD - September 09, 2011 - By PabloACZ]
 +
* SDGetFileList() function in sdsupp.c updated to reflect the changes in DevKitPPC/libogc from the last three years (diropen, dirnext and dirclose commands were replaced with opendir, readdir and closedir, respectively).
 +
* Modified the MountCard() function in mcard.c to perform a probe on the GC Memory Card slot, to make sure it was mounted properly.
 +
* Improved the compatibility with GCS/SAV files with the patch posted by jcwitzel in December 2009 (http://code.google.com/p/gcmm/issues/detail?id=1#c25).
 +
* The Makefiles were modified to include the zlib in the libraries section. It seems that the latest libFreeType PPC port needs it to work.
 +
* **Hopefully** Added compatibility with Official GameCube Memory Cards (see this: http://devkitpro.svn.sourceforge.net/viewvc/devkitpro?view=revision&revision=4049). According to a friend of mine, it works with a 256 blocks Memory Card.
 +
* Compiled with DevKitPPC r24, libogc 1.8.8, libfat 1.0.10 and libFreetype 2.4.2.
  
 
[What's New 1.0 - December 31, 2008]
 
[What's New 1.0 - December 31, 2008]
Line 44: Line 75:
 
== TO DO ==
 
== TO DO ==
  
* Add icon and banner display for the savegames
 
 
* Add raw image read and write support
 
* Add raw image read and write support
 
* Add hotswapping
 
* Add hotswapping
  
 
== LIMITATIONS ==
 
== LIMITATIONS ==
 
=== Wii ===
 
Currently only third party memory cards work due to some changes in wii mode still not handled by libogc.
 
  
 
=== Protected Savegames ===
 
=== Protected Savegames ===
Line 61: Line 88:
 
Restoring a raw image to a different card has still to be tested to see if that will permit using a protected gamesave on another memory card.
 
Restoring a raw image to a different card has still to be tested to see if that will permit using a protected gamesave on another memory card.
  
*Known protected savegames: Medal of Honor: Frontline, F-Zero GX, Pokemon Coloseum, Fire Emblem.
+
*Known protected savegames: Medal of Honor: Frontline, F-Zero GX, Pokemon Coloseum, Fire Emblem, Phantasy Star Online (all)
 +
note: some of these, as Pokemon Coloseum aren't really protected, they just have the permisions set to not be able to move/copy the savefile. GCMM backups and restores these savegames without problems.
  
When restoring a savegame with GCMM, its permissions will be set to xxP (move, copy, public), meaning the file can be moved or copied by the WII/GC native memory card utility. Being able to move or copy the file doesn't mean it will work for the reasons explained above.
+
As of 1.1 restored savegames mantains the savegame's original permisions (they are reseted when game is saved again anyways)
  
 
=== Other savegame formats ===
 
=== Other savegame formats ===
  
There are computer programs that can transform other savegame formats (GCS and SAV) into GCI
+
There are computer programs that can transform other savegame formats into GCI (currently GCMM supports SAV and GCS restoring).
 +
 
 +
GCP/RAW format is a raw savegame image of the memory card. At the moment creating a raw image is possible thanks to Masken, but there are still problems when restoring.
 +
 
 +
MCI format (createad by softdev's sdmc) is a raw image of the card (as GCP/RAW), preceded by a 64 byte header.
 +
 
 +
== CONSIDERATIONS ==
 +
 
 +
Users:
 +
* If you extract a device (USB, internal SD, USB gecko), it won't work againt. If you did so, reboot the GCMM. On the contrary
 +
* Memory cards can be extracted/inserted at will at the main menu screen. It is not recommended to change the card in any other screen.
 +
* Dolphin (wii/gc computer emulator) has a nice memory card manager, check it out!
 +
 
 +
Developers:
  
GCP format is a raw image of the memory card. At the moment creating a raw image is possible thanks to Masken, but there are still problems when restoring.
+
* LibOGC card functions works with time functions that use Epoch (seconds since jan 1, 1970) as reference, while GameCube works with seconds since jan 1, 2000). The difference is 946684800 seconds
 +
* GCMM now uses libogc 1.8.11 git (2012-07-25) card.c, card.h and system.h with tueidj's patches for proper memory card unlocking. It would be wise to update those files in GCMM if changes are made to libogc concerning other functions. Note that even if libogc asumes the changes, as GCMM now uses some static functions from libogc, it needs card.c and card.h, but if libogc updates the sramex structure (system.h) and fixes the checksums in card.c, system.h will no longer be needed.
 +
* Very good sources of documentation are libogc and dolphin's source code.
  
 
== SETUP & INSTALLATION ==
 
== SETUP & INSTALLATION ==
Line 82: Line 125:
 
=== Wii ===
 
=== Wii ===
  
On the Wii, the savegames will be read from and written to the front SD slot.
+
On the Wii, the savegames will be read from and written to the front SD slot or FAT32 USB device.
Memory card should be in slot B.
+
The user will be prompted at startup for which device to use.
 +
If the selected device isn't available, GCMM will try to use the other device (i.e: user selects usb device but there's none connected, so GCMM will try to use the internal SD).
 +
Memory card can be in either slot.
  
 
=== Gamecube ===
 
=== Gamecube ===
Line 99: Line 144:
  
 
You can load gcmm via sdload and an SD card in slot A, or by streaming it to your Gamecube, or by booting a bootable DVD with gcmm on it.  
 
You can load gcmm via sdload and an SD card in slot A, or by streaming it to your Gamecube, or by booting a bootable DVD with gcmm on it.  
This document doesn't cover how to do any of that.
+
A good source for information on these topics is at http://www.gc-forever.com/wiki/index.php?title=Booting_Homebrew
  
 
== CONTROLS ==
 
== CONTROLS ==
Line 109: Line 154:
 
Currently gcmm uses:
 
Currently gcmm uses:
  
*DevkitPPC r15: http://sourceforge.net/project/showf...ease_id=306949
+
*DevkitPPC r26: http://sourceforge.net/projects/devkitpro/files/devkitPPC/
*libOGC with Hermes patches: http://gcmm.googlecode.com/files/dev..._by_Hermes.rar
+
*libOGC 1.8.11 git (2012-07-25): http://sourceforge.net/projects/devkitpro/files/libogc
*libfreetype 2.3.7 port by Tantric
+
note: it compiles and runs fine with 1.8.11 release
 +
*libfat 1.0.11: http://sourceforge.net/projects/devkitpro/files/libfat/
 +
*libFreeType 2.4.2 port: http://sourceforge.net/projects/devkitpro/files/portlibs/ppc/
  
 
== CREDITS ==
 
== CREDITS ==
Line 121: Line 168:
 
*CowTRobo & Samsom for very useful old sources
 
*CowTRobo & Samsom for very useful old sources
 
*Tantric for pointing out that official memory cards won't work on wii mode, which encouraged me to continue gcmm as all my previous efforts where in vane due to using an official card for the testing.
 
*Tantric for pointing out that official memory cards won't work on wii mode, which encouraged me to continue gcmm as all my previous efforts where in vane due to using an official card for the testing.
 +
*tueidj, for his patches and very useful information and support.
 +
*dronesplitter for banner and icon implementation
 +
*PlabloACZ and Picachu025 for updating the source.
 +
*Nano, for inspiring me to finally working again on GCMM

Revision as of 12:07, 29 August 2012

GCMM
Gcmm-logo1.png
General
Author(s)suloku
TypeSystem tool
Version1.1
Links
Download
Source
Downloadable via the Homebrew Browser
Peripherals
Wiimote1.svg GameCube Controller Loads files from SDHC cards in the Front SD slot SD Gecko GameCube Memory Card

A GameCube Memory Card manager.

GameCube/Wii Memory Manager is an application to backup Nintendo GameCube savegames.

Gcmm is a project started by dsbomb and justb, which is based on Askot's modification to add SD support to the mcbackup libogc example.

I (suloku) have updated the code to newest libraries to port it to the Wii system, and what I find more important: restoring savegames now works properly.

FEATURES

  • Backups and restores savegames into GCI format
  • Restores savegames in GCS/SAV format
  • Deletes savegames from memory card
  • Wiimote and GameCube controller support
  • Power button support
  • Front SD and FAT32 USB device (wii) and SDGecko (gamecube) support
  • Shows savegame information, alongside Icon and Banner!
  • A (somewhat) nice UI
  • Open Source!

UPDATE HISTORY

[What's New 1.1 - august 29, 2012 - By suloku]

  • Icon and banner by dronesplitter!
  • Added USB-SD selection in wiimode (only at boot)
  • Added card slot selection (wii mode only)
  • Propper GCI backup and restore. Now GCMM uses __card_getstatusex and __card_setstatuex, which provide a more 1:1 backup/restore
  • Correctly displaying savegame Date information
  • Savegame information rearranged.

Accepted PlabloACZ and Picachu025 modifications, with the following changes:

  • Tweaked mount function
  • Filenames are no longer prefixed with a number for current sesion. Instead, savegames are suffixed with a number. When backing up a savegame if the same file exists on SD it will be prefixed with a growing number (if savegame_00.gci exists, then it will try savegame_01.gci, savegame_02.gci... and so on)
  • Infinite loop can't happen when backupping a savegame as in r11 MOD 2.

[What's New r11 MOD 2 - September 11, 2011 - By Pikachu025]

  • R (GC-Pad) / 1 (Wiimote) now launches a "backup all" mode, where all saves on the memory card are written to the SD card without any user prompts in the meantime.
  • I came across a couple saves that had ridiculous filenames that refused to write to SD, so if the program comes across one of those, it'll now write them out as "illegal_name" instead of the actual filename.
  • Filenames written to SD are now prefixed with a number, counting up from 1 for every file written during the current session. I added this since I had multiple files that resulted in the same filename.
  • I also added a small check if the file was written correctly. If not, it'll retry. This probably results in an infinite loop when your SD card doesn't have enough free space, so ensure that I guess.
  • I also (quite shoddily) edited the image listing all the options to add the new option, it's ugly but does its job. Feel free to fix, I don't have Photoshop or anything here.

[What's New r11 MOD - September 09, 2011 - By PabloACZ]

  • SDGetFileList() function in sdsupp.c updated to reflect the changes in DevKitPPC/libogc from the last three years (diropen, dirnext and dirclose commands were replaced with opendir, readdir and closedir, respectively).
  • Modified the MountCard() function in mcard.c to perform a probe on the GC Memory Card slot, to make sure it was mounted properly.
  • Improved the compatibility with GCS/SAV files with the patch posted by jcwitzel in December 2009 (http://code.google.com/p/gcmm/issues/detail?id=1#c25).
  • The Makefiles were modified to include the zlib in the libraries section. It seems that the latest libFreeType PPC port needs it to work.
  • **Hopefully** Added compatibility with Official GameCube Memory Cards (see this: http://devkitpro.svn.sourceforge.net/viewvc/devkitpro?view=revision&revision=4049). According to a friend of mine, it works with a 256 blocks Memory Card.
  • Compiled with DevKitPPC r24, libogc 1.8.8, libfat 1.0.10 and libFreetype 2.4.2.

[What's New 1.0 - December 31, 2008]

  • Updated to libfat
  • Added Wii support
  • Fixed restore bug (yes, savegames will restore properly)
  • New background
  • Support for interlaced and widescreen in all regions
  • Delete mode (dsbomb&justb)
  • Shows the savegame information (mostly by dsbomb&justb)
  • Many other fixes/modifications for the user

TO DO

  • Add raw image read and write support
  • Add hotswapping

LIMITATIONS

Protected Savegames

Protected savegames are encrypted with the "unique" random serial number that is given to a memory card each time it is formatted. Due to this fact the savegame will only work on the original memory card it was backuped from if that card hasn't been formatted.

To be confirmed if some protected savegames also rely on the block number the savefile starts (or how many blocks where occupied before the savegame was created).

Restoring a raw image to a different card has still to be tested to see if that will permit using a protected gamesave on another memory card.

  • Known protected savegames: Medal of Honor: Frontline, F-Zero GX, Pokemon Coloseum, Fire Emblem, Phantasy Star Online (all)

note: some of these, as Pokemon Coloseum aren't really protected, they just have the permisions set to not be able to move/copy the savefile. GCMM backups and restores these savegames without problems.

As of 1.1 restored savegames mantains the savegame's original permisions (they are reseted when game is saved again anyways)

Other savegame formats

There are computer programs that can transform other savegame formats into GCI (currently GCMM supports SAV and GCS restoring).

GCP/RAW format is a raw savegame image of the memory card. At the moment creating a raw image is possible thanks to Masken, but there are still problems when restoring.

MCI format (createad by softdev's sdmc) is a raw image of the card (as GCP/RAW), preceded by a 64 byte header.

CONSIDERATIONS

Users:

  • If you extract a device (USB, internal SD, USB gecko), it won't work againt. If you did so, reboot the GCMM. On the contrary
  • Memory cards can be extracted/inserted at will at the main menu screen. It is not recommended to change the card in any other screen.
  • Dolphin (wii/gc computer emulator) has a nice memory card manager, check it out!

Developers:

  • LibOGC card functions works with time functions that use Epoch (seconds since jan 1, 1970) as reference, while GameCube works with seconds since jan 1, 2000). The difference is 946684800 seconds
  • GCMM now uses libogc 1.8.11 git (2012-07-25) card.c, card.h and system.h with tueidj's patches for proper memory card unlocking. It would be wise to update those files in GCMM if changes are made to libogc concerning other functions. Note that even if libogc asumes the changes, as GCMM now uses some static functions from libogc, it needs card.c and card.h, but if libogc updates the sramex structure (system.h) and fixes the checksums in card.c, system.h will no longer be needed.
  • Very good sources of documentation are libogc and dolphin's source code.

SETUP & INSTALLATION

Unzip the archive. You will find the following folders inside:

apps Contains HBC ready files (see HBC instructions below)

gamecube Contains GameCube DOL file (not required for Wii)

The savegames are read and stored to the following dir: sd:/MCBACKUP/

Wii

On the Wii, the savegames will be read from and written to the front SD slot or FAT32 USB device. The user will be prompted at startup for which device to use. If the selected device isn't available, GCMM will try to use the other device (i.e: user selects usb device but there's none connected, so GCMM will try to use the internal SD). Memory card can be in either slot.

Gamecube

On the GameCube you will need a Gecko SD adapter in the slot A and place the memory card on slot B.

Loading/Running the app

Wii - Via HBC

The most popular method of running homebrew on the Wii is through the HBC. If you already have the channel installed, just copy over the apps folder included in the archive into the root of your SD card.

If you haven't installed the Homebrew Channel yet, read about how to here.

Gamecube

You can load gcmm via sdload and an SD card in slot A, or by streaming it to your Gamecube, or by booting a bootable DVD with gcmm on it. A good source for information on these topics is at http://www.gc-forever.com/wiki/index.php?title=Booting_Homebrew

CONTROLS

They are shown at the screen.

COMPILING

Currently gcmm uses:

note: it compiles and runs fine with 1.8.11 release

CREDITS

  • SoftDev for his contributions to the GC/WII scene
  • Costis for helping with some doubts, he's allways there
  • Masken for his code on raw data reading/writing
  • Justb & dsbomb for originally creating gcmm
  • CowTRobo & Samsom for very useful old sources
  • Tantric for pointing out that official memory cards won't work on wii mode, which encouraged me to continue gcmm as all my previous efforts where in vane due to using an official card for the testing.
  • tueidj, for his patches and very useful information and support.
  • dronesplitter for banner and icon implementation
  • PlabloACZ and Picachu025 for updating the source.
  • Nano, for inspiring me to finally working again on GCMM