Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- src/abgx360.c 1.0.6
- +++ src/abgx360.c patched
- @@ -302,8 +302,8 @@
- long connectiontimeout = 20, dvdtimeout = 20, userlang = 0;
- float speed = 0.0;
- unsigned long curlprogressstartmsecs, userregion = 0L;
- -char *green = "\033[1;32;40m", *yellow = "\033[1;33;40m", *red = "\033[1;31;40m", *cyan = "\033[1;36;40m", *blue = "\033[1;34;40m";
- -char *darkblue = "\033[0;34;40m", *white = "\033[1;37;40m", *arrow = "\033[1;34;40m", *box = "\033[1;34;40m", *normal = "\033[0;37;40m";
- +char *green = "\033[32m", *yellow = "\033[33m", *red = "\033[1;31m", *cyan = "\033[1;36m", *blue = "\033[1;34m";
- +char *darkblue = "\033[0;34;40m", *white = "\033[1m", *arrow = "\033[1;34;40m", *box = "\033[1;34;40m", *boxblue = "\033[1;34;40m", *normal = "\033[0m";
- char *wtfhexcolor = "\033[1;31;40m", *wtfcharcolor = "\033[1;37;41m", *reset = "\033[0m", *brown = "\033[0;33;40m", *filename = "\033[0;37;44m";
- char *blackonyellow = "\033[0;30;43m", *blackonred = "\033[0;30;41m";
- #ifdef __APPLE__
- @@ -5503,9 +5503,10 @@
- color(normal); printf(" %06lXh %06lXh ", endpsnL0, startpsnL1); color(arrow);
- if (terminal) printf("ÄÄÄÄÄÄÄ PSN ÄÄÄÄÄÄ%s", greaterthan);
- else printf("------- PSN ------%s", greaterthan);
- - color(normal); printf(" %06lXh%s", endpsnL1, newline); color(box);
- - if (terminal) printf("%sÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿%s%s", sp5, newline, sp5);
- - else printf("%s+----------------------------------+----------------------------------+%s%s", sp5, newline, sp5);
- + color(normal); printf(" %06lXh%s%s", endpsnL1, newline, sp5); color(box);
- + if (terminal) printf("ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿");
- + else printf("+----------------------------------+----------------------------------+");
- + color(normal); printf("%s%s", newline, sp5); color(box);
- if (terminal && !html) printf("³");
- else printf("|");
- color(normal); printf("%sL0 Data Area = %07lu sectors%s", sp2, sectorsL0, sp2); color(box);
- @@ -5514,21 +5515,24 @@
- color(normal); printf("%sL1 Data Area = %07lu sectors%s", sp2, sectorsL1, sp2); color(box);
- if (terminal && !html) printf("³");
- else printf("|");
- - if (terminal) printf("%s%sÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ%s", newline, sp5, newline);
- - else printf("%s%s+----------------------------------+----------------------------------+%s", newline, sp5, newline);
- + color(normal); printf("%s%s", newline, sp5); color(box);
- + if (terminal) printf("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ");
- + else printf("+----------------------------------+----------------------------------+");
- + color(normal); printf("%s", newline);
- color(normal); printf("%s0x%010"LL"X ", sp5, offsetL0); color(arrow);
- if (terminal) printf("ÄÄÄÄÄÄÄÄ%s", greaterthan);
- else printf("--------%s", greaterthan);
- color(normal); printf(" 0x%010"LL"X 0x%010"LL"X ", offsetL0end, offsetL1); color(arrow);
- if (terminal) printf("ÄÄÄÄÄÄÄÄ%s", greaterthan);
- else printf("--------%s", greaterthan);
- - color(normal); printf(" 0x%010"LL"X%s", offsetend, newline); color(arrow);
- - if (terminal) printf("%s%sÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ", sp5, lessthan);
- - else printf("%s%s-----------------", sp5, lessthan);
- + color(normal); printf(" 0x%010"LL"X", offsetend);
- + color(normal); printf("%s%s", newline, sp5); color(arrow);
- + if (terminal) printf("%sÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ", lessthan);
- + else printf("%s-----------------", lessthan);
- color(normal); printf(" %07lu sectors (%010"LL"u bytes) ", sectorstotal, (unsigned long long) sectorstotal * 2048); color(arrow);
- - if (terminal) printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ%s%s%s", greaterthan, newline, newline);
- - else printf("----------------%s%s%s", greaterthan, newline, newline);
- - color(normal);
- + if (terminal) printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ%s", greaterthan);
- + else printf("----------------%s", greaterthan);
- + color(normal); printf("%s%s", newline, newline);
- return;
- }
- @@ -7505,7 +7509,7 @@
- if (padzeros(rebuiltisofile, rebuiltisofilename, 0, gamestartoffset) != 0) return 1;
- fprintf(stderr, "Done\n");
- - void *unusedptr;
- + void *reallocatedptr;
- if (!keeporiginaliso) {
- // close original iso file and delete it
- if (fp != NULL) fclose(fp);
- @@ -7514,13 +7518,14 @@
- printf("ERROR: Removing %s%s%s failed! (%s) However, your ISO has been successfully rebuilt to %s%s%s%s",
- quotation, filename, quotation, strerror(errno), quotation, rebuiltisofilename, quotation, newline);
- color(normal);
- - unusedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- - if (isofilename == NULL) {
- + reallocatedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- + if (reallocatedptr == NULL) {
- color(red);
- printf("ERROR: Failed to reallocate memory for isofilename! Game over man... Game over!%s", newline);
- color(normal);
- exit(1);
- }
- + isofilename = reallocatedptr;
- strcpy(isofilename, rebuiltisofilename);
- if (rebuiltisofile != NULL) fclose(rebuiltisofile);
- fp = fopen(rebuiltisofilename, "rb+");
- @@ -7550,13 +7555,14 @@
- quotation, rebuiltisofilename, quotation, quotation, filename, quotation, strerror(errno),
- quotation, rebuiltisofilename, quotation, newline);
- color(normal);
- - unusedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- - if (isofilename == NULL) {
- + reallocatedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- + if (reallocatedptr == NULL) {
- color(red);
- printf("ERROR: Failed to reallocate memory for isofilename! Game over man... Game over!%s", newline);
- color(normal);
- exit(1);
- }
- + isofilename = reallocatedptr;
- strcpy(isofilename, rebuiltisofilename);
- fp = fopen(rebuiltisofilename, "rb+");
- if (fp == NULL) {
- @@ -7601,13 +7607,14 @@
- // keep original iso, just change isofilename and fp to the rebuilt iso
- if (fp != NULL) fclose(fp);
- if (rebuiltisofile != NULL) fclose(rebuiltisofile);
- - unusedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- - if (isofilename == NULL) {
- + reallocatedptr = realloc(isofilename, (strlen(rebuiltisofilename) + 1) * sizeof(char));
- + if (reallocatedptr == NULL) {
- color(red);
- printf("ERROR: Failed to reallocate memory for isofilename! Game over man... Game over!%s", newline);
- color(normal);
- exit(1);
- }
- + isofilename = reallocatedptr;
- strcpy(isofilename, rebuiltisofilename);
- fp = fopen(rebuiltisofilename, "rb+");
- if (fp == NULL) {
- @@ -10355,16 +10362,20 @@
- void printheader() {
- int i;
- if (!noheader) {
- - color(blue);
- - if (terminal) printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ%s", newline);
- - else printf("-------------------------------------------------------------------------------%s", newline);
- + color(boxblue);
- + if (terminal) printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ");
- + else printf("-------------------------------------------------------------------------------");
- + color(normal);
- + printf("%s", newline);
- color(darkblue); printf("\\\\//\\\\//\\\\//\\\\//");
- if (terminal) { printf("\\\\/"); color(normal); printf("Û"); color(darkblue); printf("\\\\//\\ "); }
- else { color(white); printf("%s_ |_%s_ ", sp2, sp2); }
- color(green); printf("\\ \\/ /"); color(white);
- if (terminal) printf("ÚÄ¿ÚÄ¿ÚÄ¿");
- else printf("_%s_%s_%s", sp2, sp2, sp2);
- - color(darkblue); printf("\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\%s//\\\\//\\\\//\\\\//\\", newline);
- + color(darkblue); printf("\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\");
- + color(normal); printf("%s", newline);
- + color(darkblue); printf("//\\\\//\\\\//\\\\//\\");
- if (!terminal) printf("\\");
- if (terminal) { color(normal); printf("ÛßÛ"); color(darkblue); printf("\\"); color(normal); printf("ÛßÛ");
- color(darkblue); printf("\\"); color(normal); printf("ÛßÛ"); }
- @@ -10373,28 +10384,30 @@
- if (terminal && html) printf(" Ä´ÃÄ¿| |");
- else if (terminal) printf(" Ä´ÃÄ¿³ ³");
- else printf("_||_ | | ");
- - color(darkblue); printf("//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//%s", newline); color(blue);
- - if (terminal) { printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"); color(normal); printf("ßßß"); color(blue); printf("Ä");
- - color(normal); printf("ßßß"); color(blue); printf("Ä"); color(normal); printf("ßßÛ"); }
- + color(darkblue); printf("//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//");
- + color(normal); printf("%s", newline);
- + color(boxblue);
- + if (terminal) { printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"); color(normal); printf("ßßß"); color(boxblue); printf("Ä");
- + color(normal); printf("ßßß"); color(boxblue); printf("Ä"); color(normal); printf("ßßÛ"); }
- else { printf("------------------------"); color(white); printf("_|"); }
- - color(blue);
- + color(boxblue);
- if (terminal) printf("ÄÄÄÄÄÄ");
- else printf("------");
- color(white);
- if (terminal) printf("ÀÄÙÀÄÙÀÄÙ");
- - else printf("_||_||_|"); color(blue);
- + else printf("_||_||_|"); color(boxblue);
- if (terminal) printf("Ä");
- else printf("--");
- - color(normal); printf("%s", headerversion); color(blue);
- + color(normal); printf("%s", headerversion); color(boxblue);
- for (i=0;i<13 - (int) strlen(headerversion);i++) {
- if (terminal) printf("Ä");
- else printf("-");
- }
- - color(normal); printf("[http://abgx360.net]"); color(blue);
- + color(normal); printf("[http://abgx360.net]"); color(boxblue);
- if (terminal) printf("ÄÄÄÄ");
- else printf("----");
- - printf("%s", newline);
- color(normal);
- + printf("%s", newline);
- if (terminal) printf("%s%s%s ßßß", sp10, sp10, sp2);
- printf("%s", newline);
- }
- @@ -10440,6 +10453,7 @@
- else if (strcmp(color, white) == 0) SetConsoleTextAttribute(hConsoleOutput, 15);
- else if (strcmp(color, green) == 0) SetConsoleTextAttribute(hConsoleOutput, 10);
- else if (strcmp(color, blue) == 0) SetConsoleTextAttribute(hConsoleOutput, 9);
- + else if (strcmp(color, boxblue) == 0) SetConsoleTextAttribute(hConsoleOutput, 9);
- else if (strcmp(color, darkblue) == 0) SetConsoleTextAttribute(hConsoleOutput, 1);
- else if (strcmp(color, yellow) == 0) SetConsoleTextAttribute(hConsoleOutput, 14);
- else if (strcmp(color, red) == 0) SetConsoleTextAttribute(hConsoleOutput, 12);
- @@ -15773,6 +15787,7 @@
- else printf("Unencrypted%s", newline);
- }
- else {
- + (void)xex_is_compressed_unknown; /* xex_is_compressed_unknown should be positive here */
- printf("Unrecognized Compression Method ");
- if (xex_is_encrypted) printf("(Encrypted)%s", newline);
- else printf("(Unencrypted)%s", newline);
- @@ -16363,7 +16378,7 @@
- color(normal);
- return 1;
- }
- - printstderr = true; color(white);
- + printstderr = true; color(normal); color(white);
- if (verbose) fprintf(stderr, "\n");
- fprintf(stderr, "Checking Game CRC...");
- color(normal);
- @@ -17759,11 +17774,9 @@
- if (badcpr_mai.count) color(normal);
- printf("%s", newline);
- }
- - bool triedtofix = false;
- if (ssv2) {
- if (foundangle359_count && fixangle359) {
- // the only thing we are willing to 'fix' in ss v2
- - triedtofix = true;
- if (verbose) printf("%s", newline);
- if (!writefile) {
- printf("Unable to fix the following item(s) because writing is disabled:%s", newline);
- @@ -17793,7 +17806,6 @@
- else if ( ( fixDRT && (badCD.count || badResponse.count || badcpr_mai.count || baddriveangle.count) ) ||
- ( fixdeviation && (highangledev.count || mediumangledev.count || userangledev.count) ) ||
- ( foundangle359_count && fixangle359 ) ) {
- - triedtofix = true;
- if (verbose) printf("%s", newline);
- printf("Fixing SS Challenge / Response Data...%s", newline);
- if (!writefile) {
- @@ -20558,14 +20570,13 @@
- donecheckread("L0 Video padding");
- if (videoL0zeropadding) {
- color(green);
- - printf("L0 Video is zero padded%s", newline);
- - color(normal);
- + printf("L0 Video is zero padded");
- + color(normal); printf("%s", newline);
- goto skipL0videopadding;
- }
- if (!xgd3 && !padL0) {
- - fprintf(stderr, "\n");
- color(yellow);
- - printf("-------------------------------------------------------------------------------%s"
- + printf("%s-------------------------------------------------------------------------------%s"
- "L0 Video padding contains data but this is normal for XGD2 (The old way of\n"
- "putting L1 video on L0). Add command line option --pL0 if you want to blank it\n"
- "out (the data hasn't actually been checked that it matches L1 video... it could\n"
- @@ -20578,8 +20589,8 @@
- "disable \"Check/Fix Video padding\", as it still makes no difference in terms\n"
- "of stealth... this option only exists as a way to make sure ISOs are \"clean\",\n"
- "with no extra data in areas that aren't CRC checked.%s"
- - "-------------------------------------------------------------------------------%s", newline, newline, newline);
- - color(normal);
- + "-------------------------------------------------------------------------------", newline, newline, newline);
- + color(normal); printf("%s", newline);
- goto skipL0videopadding;
- }
- if (!writefile) {
- @@ -20664,8 +20675,8 @@
- donecheckwrite("L0 Video Padding");
- color(green);
- if (verbose) printf("%s", sp5);
- - printf("L0 Video padding zeroed successfully%s", newline);
- - color(normal);
- + printf("L0 Video padding zeroed successfully");
- + color(normal); printf("%s", newline);
- skipL0videopadding:
- // check L1 video padding
- @@ -20759,8 +20770,8 @@
- donecheckread("L1 Video padding");
- if (videoL1zeropadding) {
- color(green);
- - printf("L1 Video is zero padded%s", newline);
- - color(normal);
- + printf("L1 Video is zero padded");
- + color(normal); printf("%s", newline);
- goto skipvideopadding;
- }
- if (!writefile) {
- @@ -20903,8 +20914,8 @@
- donecheckread("XGD3 Stealth padding");
- if (xgd3stealthzeropadding) {
- color(green);
- - printf("XGD3 Stealth is zero padded%s", newline);
- - color(normal);
- + printf("XGD3 Stealth is zero padded");
- + color(normal); printf("%s", newline);
- goto skippadding;
- }
- if (!writefile) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement