Ready for 1.4:

-Added some characters to the font (for comment displaying)
-Changed background
-Tweaked a little to have some sort of initial screen rather than a black background
-Minor graphical tweaks
This commit is contained in:
sulokutdcmago
2012-10-07 22:19:13 +00:00
parent 071e9d9b60
commit 4d69c9c175
12 changed files with 125 additions and 56 deletions

Binary file not shown.

View File

@@ -2,8 +2,8 @@
<app version="1">
<name>GCMM</name>
<coder>Suloku</coder>
<version>1.3</version>
<release_date>20120914000000</release_date>
<version>1.4</version>
<release_date>20121008000000</release_date>
<short_description>Memory Card Manager</short_description>
<long_description>A memory card manager for Wii/GC.

View File

@@ -1,5 +1,5 @@
ח<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD>-<2D><><EFBFBD>
|0O<30><4F>o<EFBFBD> GCMM 1.3 <20>o<EFBFBD><6F>O0|
|0O<30><4F>o<EFBFBD> GCMM 1.4 by suloku <20>o<EFBFBD><6F>O0|
| http://code.google.com/p/gcmm |
| (Under GPL License) |
`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
@@ -22,7 +22,7 @@ I (suloku) have updated the code to newest libraries to port it to the Wii syste
* 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!
* Shows savegame information, alongside animated Icon and Banner!
* A (somewhat) nice UI
* Open Source!
@@ -30,6 +30,23 @@ I (suloku) have updated the code to newest libraries to port it to the Wii syste
|0O<30><4F>o<EFBFBD> UPDATE HISTORY <20>o<EFBFBD><6F>O0|
`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
[What's New 1.4 - october 08, 2012 - By suloku]
* Animated icon alongside several (minor) graphical improvements
* Ability to select SD Gecko slot in GameCube mode (just like Wii mode SD/USB prompt)
* Moved "Backup All" to Backup Mode (press R/1 when in Backup Mode)
* Added an analog "Restore All" in Restore Mode (overwriting is supported)
* Shows filename when prompted to overwrite (also in "Restore All")
* Savegame permisions are shown in a more explicit and user friendly way
* Shows memory card freeblocks
* Page number display in file selector
* Left and right now scroll 5 file entries at once
* Scrolling of file entries can be done holding the button (up/down/left/right)
* Added security checks to Raw Restore Mode
* Added some special characters to the font (needed for savegame comments)
* Minor code tweaks
Lots of thanks to bm123456 and themanuel for beta testing and support!
[What's New 1.3 - september 14, 2012 - By suloku]
* Shows card/image serial number in Raw Restore Mode
@@ -218,7 +235,7 @@ This document doesn't cover how to do any of that. A good source for information
They are shown at the screen.
Raw mode controls:
Raw mode controls: hold L (gamecube pad) or B (wiimote) then press the corresponding button
* Raw Backup Mode: GC_pad L+Y , Wiimote B+Minus
* Raw Restore Mode: GC_pad L+X , Wiimote B+Plus
* Format Card Mode: GC_pad L+Z , Wiimote B+2
@@ -249,6 +266,7 @@ Currently gcmm uses:
* dronesplitter for banner and icon implementation
* PlabloACZ and Picachu025 for updating the source.
* Nano(Excelsiior), for inspiring me to finally working again on GCMM
* bm123456 and themanuel for beta testing and support
ח<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD>-<2D><><EFBFBD>
|0O<30><4F>o<EFBFBD> <20>o<EFBFBD><6F>O0|

View File

@@ -14,7 +14,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bitmap.h"
#include "bitmap.h"
#include "freetype.h"
#include "gci.h"
extern GCI gci;
@@ -99,6 +100,7 @@ u32 ShowBMP(u8 * bmpfile) {
u8 *bgr;
u32 fboffset;
u32 rows, cols;
static u8 firstcall = 1;
bitmap = (WINBITMAP *) bmpfile;
@@ -146,16 +148,45 @@ u32 ShowBMP(u8 * bmpfile) {
/*** Move to NEXT framebuffer ***/
whichfb ^= 1;
for (rows = 0; rows < height; rows++) {
for (cols = 0; cols < (fbwidth >> 1); cols++) {
xfb[whichfb][fboffset + cols] =CvtRGB (bgr[2], bgr[1], bgr[0],
bgr[5], bgr[4], bgr[3]);
bgr += 6;
}
if (firstcall)
{
DrawBoxFilled(0,0,vmode->fbWidth-1,vmode->xfbHeight-1,0xFF80FF80);
for (rows = 0; rows < height; rows++) {
for (cols = 0; cols < (fbwidth >> 1); cols++) {
if (rows < 64 || rows > 398 || cols < (31>>1) || cols > (341>>1))
{
//xfb[whichfb][fboffset + cols] =CvtRGB (255,255,255,255,255,255);
}
else
{
xfb[whichfb][fboffset-(320*20) + (66)+cols] =CvtRGB (bgr[2], bgr[1], bgr[0],
bgr[5], bgr[4], bgr[3]);
}
fboffset -= 320; /*** Go up one row ***/
bgr += 6;
}
} /*** Outer row loop ***/
fboffset -= 320; /*** Go up one row ***/
} /*** Outer row loop ***/
}
else
{
for (rows = 0; rows < height; rows++) {
for (cols = 0; cols < (fbwidth >> 1); cols++) {
xfb[whichfb][fboffset + cols] =CvtRGB (bgr[2], bgr[1], bgr[0],
bgr[5], bgr[4], bgr[3]);
bgr += 6;
}
fboffset -= 320; /*** Go up one row ***/
} /*** Outer row loop ***/
}
if (firstcall)
{
firstcall = 0;
}
/*** Setup the video to display this picture ***/
/*VIDEO_SetNextFramebuffer (xfb[whichfb]);
@@ -188,7 +219,7 @@ void ShowBanner(u8 *banner) {
fboffset = ((640 - fbwidth) >> 1) >> 1;
fboffset += (((vmode->xfbHeight - height) >> 1) * 320);
fboffset -= (height * 320 * 2);
fboffset -= (height * 90);
fboffset += (height * 10);
fboffset += width/2+3; //at this point the banner is perfectly aligned with right window
fboffset += ((height *320)>>1)+3;
@@ -231,7 +262,7 @@ void ShowIcon(u8 *icon) {
fbwidth = CARD_ICON_W;
fboffset += (((vmode->xfbHeight - height) >> 1) * 320);
fboffset -= (height * 320 * 2);
fboffset -= (height * 90);
fboffset += (height * 10);
fboffset += width/2+3;
fboffset += ((height *320)>>1)+3;

View File

@@ -8,5 +8,5 @@ fontface:
.globl fontsize
fontsize: .long 42604
fontsize: .long 50824

View File

@@ -810,7 +810,7 @@ void showCardInfo(int sel){
void showSaveInfo(int sel)
{
int y = 160, x = 378, j;
int y = 165, x = 378, j;
char gamecode[5], company[3], txt[1024];
//clear right pane, but just the save info
@@ -846,17 +846,17 @@ void showSaveInfo(int sel)
//Draw nice gradient background for banner and icon
if(SDCARD_GetBannerFmt(gci.banner_fmt) == 1 || SDCARD_GetBannerFmt(gci.banner_fmt) == 2){
//Box for icon+banner
DrawHLine (410, 410+160, 162, getcolour (255,255,255));
DrawBox (410, 163, 410+160, 163+39, getcolour (255,255,255));
DrawHLine (410, 410+160, 164+39, getcolour (255,255,255));
DrawBoxFilledGradient(412, 164, (410+158), (164+37), BLUECOL, PURPLECOL, LOCATION);
DrawHLine (410, 410+160, 172, getcolour (255,255,255));
DrawBox (410, 173, 410+160, 173+39, getcolour (255,255,255));
DrawHLine (410, 410+160, 174+39, getcolour (255,255,255));
DrawBoxFilledGradient(412, 174, (410+158), (174+37), BLUECOL, PURPLECOL, LOCATION);
}else
{
//Box for icon
DrawHLine (468, 468+42, 162, getcolour (255,255,255));
DrawBox (468, 163, 468+42, 163+39, getcolour (255,255,255));
DrawHLine (468, 468+42, 164+39, getcolour (255,255,255));
DrawBoxFilledGradient(468+2, 164, (468+40), (164+37), BLUECOL, PURPLECOL, LOCATION);
DrawHLine (468, 468+42, 172, getcolour (255,255,255));
DrawBox (468, 173, 468+42, 173+39, getcolour (255,255,255));
DrawHLine (468, 468+42, 174+39, getcolour (255,255,255));
DrawBoxFilledGradient(468+2, 174, (468+40), (174+37), BLUECOL, PURPLECOL, LOCATION);
}
//Show banner if there is one
@@ -870,7 +870,7 @@ void showSaveInfo(int sel)
/*** Display relevant info for this save ***/
sprintf(txt, "#%d %s/%s", sel, gamecode, company);
DrawText(x, y-4, txt);
y += 65;
y += 70;
//DrawText(x, y, "File Description:");
//y += 20;
@@ -975,7 +975,7 @@ void showSaveInfo(int sel)
DrawText(x, y, txt);
#ifdef DEBUG_VALUES
/*** Uncomment to print some debug info ***/
/*** Print some debug info ***/
y+=20;
sprintf(comment2, "%x %x %x %d", gci.icon_addr, gci.icon_fmt, gci.banner_fmt, numicons);
DrawText(x, y, comment2);
@@ -1410,7 +1410,7 @@ int ShowSelector (int saveinfo)
void writeStatusBar( char *line1, char *line2)
{
int bgcolor = getcolour(0xff,0xff,0xff);
DrawBoxFilled(10, 404, 640, 455, bgcolor);
DrawBoxFilled(0, 404, vmode->fbWidth-1, vmode->xfbHeight-1, bgcolor);
//setfontcolour(84,174,211);
setfontcolour(28,28,28);
DrawText(40, 425, line1);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 KiB

After

Width:  |  Height:  |  Size: 844 KiB

View File

@@ -299,17 +299,19 @@ void SD_BackupMode ()
char buffer[256], text[64];
clearRightPane();
DrawText(380,130,"B a c k u p M o d e");
writeStatusBar("Pick a file using UP or DOWN ", "Press A to backup to SD Card ") ;
setfontsize (14);
#ifdef HW_RVL
DrawText(40, 60, "Press R/1 to backup ALL savegames");
#else
DrawText(40, 60, "Press R to backup ALL savegames");
#endif
DrawText(386,130,"B a c k u p M o d e");
DrawText(386,134,"_____________________");
writeStatusBar("Reading memory card... ", "");
/*** Get the directory listing from the memory card ***/
memitems = CardGetDirectory (MEM_CARD);
writeStatusBar("Pick a file using UP or DOWN ", "Press A to backup to SD Card ") ;
setfontsize (14);
#ifdef HW_RVL
DrawText(40, 60, "Press R/1 to backup ALL savegames");
#else
DrawText(40, 60, "Press R to backup ALL savegames");
#endif
/*** If it's a blank card, get out of here ***/
if (!memitems)
@@ -409,7 +411,8 @@ void SD_BackupModeAllFiles ()
char buffer[128];
clearRightPane();
DrawText(380,130," B a c k u p A l l ");
DrawText(386,130," B a c k u p A l l ");
DrawText(386,134,"_____________________");
writeStatusBar("Backing up all files.", "This may take a while.");
/*** Get the directory listing from the memory card ***/
memitems = CardGetDirectory (MEM_CARD);
@@ -458,16 +461,19 @@ void SD_RestoreMode ()
clearRightPane();
DrawText(380,130,"R e s t o r e M o d e");
DrawText(380,134,"______________________");
writeStatusBar("Pick a file using UP or DOWN", "Press A to restore to Memory Card ") ;
setfontsize (14);
#ifdef HW_RVL
DrawText(40, 60, "Press R/1 to restore ALL savegames");
#else
DrawText(40, 60, "Press R to restore ALL savegames");
#endif
writeStatusBar("Reading files... ", "");
files = SDGetFileList (1);
setfontsize (14);
#ifdef HW_RVL
DrawText(40, 60, "Press R/1 to restore ALL savegames");
#else
DrawText(40, 60, "Press R to restore ALL savegames");
#endif
if (!files)
{
WaitPrompt ("No saved games in SD Card to restore !");
@@ -557,7 +563,11 @@ void SD_RawBackupMode ()
s32 writen = 0;
char msg[64];
clearRightPane();
DrawText(40, 230, "R A W B a c k u p M o d e");
DrawText(394,224,"___________________");
DrawText(394,248,"R A W B a c k u p");
DrawText(454,268,"M o d e");
DrawText(394,272,"___________________");
writeStatusBar("Reading memory card... ", "");
if (BackupRawImage(MEM_CARD, &writen) == 1)
@@ -587,9 +597,14 @@ void SD_RawRestoreMode ()
clearRightPane();
DrawText(380,130,"R A W R e s t o r e");
DrawText(450,150,"M o d e");
DrawText(380,154,"_____________________");
writeStatusBar("Reading files... ", "");
files = SDGetFileList (0);
writeStatusBar("Pick a file using UP or DOWN", "Press A to restore to Memory Card ");
files = SDGetFileList (0);
if (!files)
{
WaitPrompt ("No raw backups in SD Card to restore !");
@@ -640,10 +655,11 @@ int main ()
Initialise (); /*** Start video ***/
FT_Init (); /*** Start FreeType ***/
ClearScreen();
ShowScreen();
#ifdef HW_RVL
initialise_power();
have_sd = initFAT(WaitPromptChoice ("Use internal SD or FAT 32 USB device?", "USB", "SD"));
have_sd = initFAT(WaitPromptChoice ("Use internal SD or FAT32 USB device?", "USB", "SD"));
#else
//Returns 1 (memory card in slot B, sd gecko in slot A) if A button was pressed and 0 if B button was pressed
MEM_CARD = WaitPromptChoice ("Please select the slot where SD Gecko is inserted", "SLOT B", "SLOT A");
@@ -711,7 +727,6 @@ int main ()
case 700 : //Raw backup mode
if (have_sd)
{
DrawText(40, 230, "R A W B a c k u p M o d e");
SD_RawBackupMode();
}else
{
@@ -741,9 +756,11 @@ int main ()
VIDEO_WaitVSync ();
if (CARD_Probe(MEM_CARD) > 0)
{
DrawText(70, 230, "F o r m a t C a r d");
DrawText(150, 250, "M o d e");
clearRightPane();
DrawText(390,224,"____________________");
DrawText(390,248,"F o r m a t C a r d");
DrawText(460,268,"M o d e");
DrawText(390,272,"____________________");
MC_FormatMode(MEM_CARD);
}else if (MEM_CARD)

View File

@@ -796,12 +796,15 @@ void MC_DeleteMode(int slot)
int selected = 0;
int erase;
clearRightPane();
DrawText(390,130,"D e l e t e M o d e");
writeStatusBar("Choose a file with UP button or DOWN button ", "Press A button to delete ") ;
DrawText(386,130,"D e l e t e M o d e");
DrawText(386,134,"_____________________");
char msg[1024];
writeStatusBar("Reading memory card... ", "");
/*** Get the directory listing from the memory card ***/
memitems = CardGetDirectory (slot);
writeStatusBar("Choose a file with UP button or DOWN button ", "Press A button to delete ") ;
/*** If it's a blank card, get out of here ***/
if (!memitems)

View File

@@ -380,7 +380,7 @@ int SDLoadMCImageHeader(char *sdfilename)
u16 l2 =(u16)(FileBuffer[0x38] << 8) | FileBuffer[0x39];
if (length != l2)
{
sprintf(msg, "l1 = %x l2 = %x", length,l2);
sprintf(msg, "File length does not equal file size. Wrong extension? (l1 = %x l2 = %x)", length,l2);
WaitPrompt (msg);//"File Length does not equal filesize");
return 0;
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 KiB

After

Width:  |  Height:  |  Size: 844 KiB