diff --git a/Makefile b/Makefile index 5fdde6a..cf5bb5d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ export TARGET := EZP_Recovery_Tool export TOPDIR := $(CURDIR) # export VERSION_MAJOR := 1 -# export VERSION_MINOR := 1 +# export VERSION_MINOR := 2 # export VERSTRING := $(VERSION_MAJOR).$(VERSION_MINOR) # GMAE_ICON is the image used to create the game icon, leave blank to use default rule diff --git a/arm9/source/cardme.cpp b/arm9/source/cardme.cpp index 6f4ab97..ccac84b 100644 --- a/arm9/source/cardme.cpp +++ b/arm9/source/cardme.cpp @@ -111,7 +111,7 @@ int cardmeGetType(void) { u8 c00; u8 c05; u8 c9f; - u8 reg; + // u8 reg; REG_EXMEMCNT &= ~0x0880; // DS Card access ARM9:bit11=0 GBA Cart access ARM9:bit7=0 cardmeCMD(0x03,0); @@ -129,13 +129,6 @@ int cardmeGetType(void) { fclose(testFile); }*/ - // Unlock block 0 (0x0 to 0x8000). Seems to only be possible if WP# is lifted though! // Courtasy of Nat (nathaantfm) - spiTransfer(0, 0, 1, 0x6); // Send write enable - spiTransfer(0, 0, 2, 0x1, 0x0); // Write status register bits 7-0 - do { - spiTransfer(1, ®, 1, 0x5); // Read status register - } while (reg & 0x1); // Write in progress - /*FILE *testFile2 = fopen("/registerData.bin", "wb"); if (testFile2) { u8 securityReg1[1]; diff --git a/arm9/source/cardme.h b/arm9/source/cardme.h index 836b534..c281648 100644 --- a/arm9/source/cardme.h +++ b/arm9/source/cardme.h @@ -17,6 +17,8 @@ extern "C" { #endif +void spiTransfer(int rlen, u8 *dst, int cmdlen, ...); + void cardmeReadEeprom(u32 address, u8 *data, u32 length, u32 addrtype); void cardmeSectorErase(u32 address); // int cardmeChipErase_old(void); diff --git a/arm9/source/command.cpp b/arm9/source/command.cpp index 024d3b9..f1dd629 100644 --- a/arm9/source/command.cpp +++ b/arm9/source/command.cpp @@ -180,12 +180,17 @@ int Save_Rest(char *name) { } int Save_Init() { - u32 add; int per; int len; if(savetype == 3) { + u8 reg; + // Unlock block 0 (0x0 to 0x8000). Seems to only be possible if WP# is lifted though! // Courtasy of Nat (nathaantfm) + spiTransfer(0, 0, 1, 0x6); // Send write enable + spiTransfer(0, 0, 2, 0x1, 0x0); // Write status register bits 7-0 + do { spiTransfer(1, ®, 1, 0x5); } while (reg & 0x1); // Read status register // Write in progress + dsp_bar(3, -1); for(add = 0; add < savesize; add += 0x10000) { per = (add * 100) / savesize; diff --git a/arm9/source/main.c b/arm9/source/main.c index 561c05f..521b288 100644 --- a/arm9/source/main.c +++ b/arm9/source/main.c @@ -58,7 +58,7 @@ extern uint16* SubScreen; #define BG_256_COLOR (BIT(7)) -#define VERSION "v1.1" +#define VERSION "v1.2" #define VERSIONOFFSET (37*6) char GameTitle[13]; @@ -959,9 +959,9 @@ void mainloop(void) { while(cmd != -1) { if(fl != (CMDmode & 2)) { DrawBox(MainScreen, 0, FILEY*12, 255, 191, RGB15(31,31,31), 1); - ShinoPrint(MainScreen, 42, 90, (u8 *)t_msg[2], RGB15(31,31,31), RGB15(31,0,0), 1); - ShinoPrint(MainScreen, 42, 102, (u8 *)t_msg[3], RGB15(31,31,31), RGB15(31,0,0), 1); - ShinoPrint(MainScreen, 42, 114, (u8 *)t_msg[2], RGB15(31,31,31), RGB15(31,0,0), 1); + ShinoPrint(MainScreen, 42, 90, (u8 *)t_msg[2], RGB15(31,31,31), RGB15(8,8,8), 1); + ShinoPrint(MainScreen, 42, 102, (u8 *)t_msg[3], RGB15(31,31,31), RGB15(8,8,8), 1); + ShinoPrint(MainScreen, 42, 114, (u8 *)t_msg[2], RGB15(31,31,31), RGB15(8,8,8), 1); numFiles = SD_FileList(); fl = 0; } diff --git a/banner.bin b/banner.bin index e339540..7012446 100644 Binary files a/banner.bin and b/banner.bin differ