mirror of
https://github.com/ApacheThunder/EZP_Recovery_Tool.git
synced 2025-06-19 03:35:35 -04:00
Move Unlock Command.
* Moved SPI unlock command to save init function. Now this is only called if user uses B button to do save erase in the save restore menu. * File Not found stats box in file browser now matches color scheme. (no longer using red color)
This commit is contained in:
parent
f8a16adcdf
commit
df31126acd
2
Makefile
2
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
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
BIN
banner.bin
BIN
banner.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user