Skip to content

Commit

Permalink
1.40
Browse files Browse the repository at this point in the history
  • Loading branch information
Zarh committed Jun 12, 2021
1 parent 93b4ddb commit f87bb3a
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 23 deletions.
2 changes: 2 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
TO DO :
Add : MultiContent PKGDIR/PS3_GMXX/PK3_EXTRA/INSDIR
Add : Decrypt EDAT/SDAT

v1.40
Fix : Dock buttons when the window is docked to the left.
Fix : IRD build of backups with PKGDIR.
Fix : Shortcut pkg.
Add : Scans sub-folders to find backups.
Expand Down
4 changes: 4 additions & 0 deletions MGZ/source/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ extern void Delete(char* path);
extern void print_head(char *format2, ...);
extern void print_load(char *format, ...);
extern u8 DEBUG;
extern void task_Init(const u64 max);
extern void task_Update(u64 val);
extern void task_Update2(u64 val);
extern void task_End();
3 changes: 3 additions & 0 deletions MGZ/source/fw_unk.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ extern u64 lv1peek(u64 addr);
extern int64_t prog_bar1_value;
extern char ManaGunZ_id[10];
extern u8 SetFilePerms(char *path);
extern void Delete(char* path);

u8 compare(u8 ignore, char *mem, char *flag, u32 size)
{
Expand Down Expand Up @@ -244,6 +245,8 @@ u8 read_fw_unk()
return SUCCESS;
}

Delete(fw_unk_path);

init_values();
return FAILED;
}
Expand Down
32 changes: 22 additions & 10 deletions MGZ/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9955,6 +9955,16 @@ void task_Update(u64 val)
task_ProgressBar2_val+= val;
}

void task_Update2(u64 val)
{
if( task_ProgressBar2_max != 0 ) {
task_ProgressBar1_val += val - task_ProgressBar2_val;
task_ProgressBar2_val = val;
} else {
task_ProgressBar1_val = val;
}
}

void task_End()
{
if(task_ProgressBar2_max != 0) {
Expand Down Expand Up @@ -27525,21 +27535,21 @@ void Option(char *item)
} else
if(strcmp(item, "Test") == 0) {
start_loading();
char *edat = "/dev_hdd0/game/NPEB02082/USRDIR/data/data000.edat";
char *dat = "/dev_hdd0/game/NPEB02082/USRDIR/data/data000.dat";
char *eboot_elf = "/dev_hdd0/game/NPEB02082/USRDIR/EBOOT.ELF";
char *eboot_bin = "/dev_hdd0/game/NPEB02082/USRDIR/EBOOT.BIN";
char *rap = "/dev_hdd0/home/00000001/exdata/EP0002-NPEB02082_00-LEGENDOFKORRAPS3.rap";
char *edat = "/dev_hdd0/data000.edat";
char *dat = "/dev_hdd0/data000.dat";
char *eboot_elf = "/dev_hdd0/EBOOT.elf";
char *eboot_bin = "/dev_hdd0/EBOOT.BIN";
char *rap = "/dev_hdd0/EP0002-NPEB02082_00-LEGENDOFKORRAPS3.rap";
char *dev_klics_txt = "/dev_hdd0/game/MANAGUNZ0/USRDIR/sys/dev_klics.txt";

u8 dev_klicensee[0x10]={0};

print_load("Search dev_klicensee inside local db");
if( npdata_bruteforce(edat, dev_klics_txt, NPDATA_BF_MODE_LINES_STREAM, dev_klicensee) == SUCCESS) {
print_load("Found !");
hex_print_load((char *)dev_klicensee, 0x10);
} else
if( npdata_bruteforce(edat, eboot_elf, NPDATA_BF_MODE_BINARY | NPDATA_BF_MODE_TEXT | NPDATA_BF_MODE_UNICODE, dev_klicensee) == SUCCESS) {
if( npdata_bruteforce(edat, eboot_elf, NPDATA_BF_MODE_BINARY, dev_klicensee) == SUCCESS) {
print_load("Found !");
hex_print_load((char *)dev_klicensee, 0x10);
} else {
Expand Down Expand Up @@ -28334,7 +28344,7 @@ void Open_option()
add_option_item(STR_DUMP_FLASH);
*/

add_option_item("Test");
//add_option_item("Test");
//add_option_item("Test2");

if( !cobra && !mamba && PEEKnPOKE) {
Expand Down Expand Up @@ -28825,14 +28835,13 @@ u8 window_input()
return CONTINUE;
}


//DOCK_LEFT
CONTROLBOX_X -= CONTROLBOX_GAP + CONTROLBOX_W;
mouse_over = NO;
if( CONTROLBOX_X < curs_x && curs_x < CONTROLBOX_X + CONTROLBOX_W
&& CONTROLBOX_Y < curs_y && curs_y < CONTROLBOX_Y + CONTROLBOX_H )
{
if(GetWindowLocation() != WINDOW_LOC_MAX) {
if(GetWindowLocation() != WINDOW_LOC_LEFT) {
SetWindowLocation(WINDOW_LOC_LEFT);
} else {
SetWindowLocation(WINDOW_LOC_DEFAULT);
Expand Down Expand Up @@ -41702,6 +41711,9 @@ int main(void)

if(PEEKnPOKE) {
if(init_fw() == FAILED) {
if( HEN ) {
PEEKnPOKE=NO;
} else
if( init_fw_unk() == FAILED ) {
PEEKnPOKE = NO;
}
Expand Down
Loading

0 comments on commit f87bb3a

Please sign in to comment.