mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
many of the flags did not respect -d (debug) flag. this fixes them.
This commit is contained in:
@@ -474,11 +474,12 @@ main(int argc, char *argv[])
|
|||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("Setting RAM size\n");
|
printf("Setting RAM size\n");
|
||||||
}
|
}
|
||||||
|
if (!(ulOptions & OPTF_DEBUG)) {
|
||||||
fflush(f);
|
fflush(f);
|
||||||
fseek(f, 0x149L, SEEK_SET);
|
fseek(f, 0x149L, SEEK_SET);
|
||||||
fputc(ram_size, f);
|
fputc(ram_size, f);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
}
|
||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("\tRAM size set to %#02X\n", ram_size);
|
printf("\tRAM size set to %#02X\n", ram_size);
|
||||||
}
|
}
|
||||||
@@ -487,11 +488,12 @@ main(int argc, char *argv[])
|
|||||||
* -j (Set region flag) option code
|
* -j (Set region flag) option code
|
||||||
*/
|
*/
|
||||||
if (ulOptions & OPTF_JAPAN) {
|
if (ulOptions & OPTF_JAPAN) {
|
||||||
|
if (!(ulOptions & OPTF_DEBUG)) {
|
||||||
fflush(f);
|
fflush(f);
|
||||||
fseek(f, 0x14A, SEEK_SET);
|
fseek(f, 0x14A, SEEK_SET);
|
||||||
fputc(1, f);
|
fputc(1, f);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
}
|
||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("\tRegion code set to non-Japan\n");
|
printf("\tRegion code set to non-Japan\n");
|
||||||
}
|
}
|
||||||
@@ -504,11 +506,12 @@ main(int argc, char *argv[])
|
|||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("Setting MBC type\n");
|
printf("Setting MBC type\n");
|
||||||
}
|
}
|
||||||
|
if (!(ulOptions & OPTF_DEBUG)) {
|
||||||
fflush(f);
|
fflush(f);
|
||||||
fseek(f, 0x147L, SEEK_SET);
|
fseek(f, 0x147L, SEEK_SET);
|
||||||
fputc(mbc_type, f);
|
fputc(mbc_type, f);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
}
|
||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("\tMBC type set to %#02X (%s)\n", mbc_type, MBC_String(mbc_type));
|
printf("\tMBC type set to %#02X (%s)\n", mbc_type, MBC_String(mbc_type));
|
||||||
}
|
}
|
||||||
@@ -523,11 +526,12 @@ main(int argc, char *argv[])
|
|||||||
if (!(ulOptions & OPTF_QUIET) && gbc_mode == 0xC0) {
|
if (!(ulOptions & OPTF_QUIET) && gbc_mode == 0xC0) {
|
||||||
printf("Setting Game Boy Color only mode\n");
|
printf("Setting Game Boy Color only mode\n");
|
||||||
}
|
}
|
||||||
|
if (!(ulOptions & OPTF_DEBUG)) {
|
||||||
fflush(f);
|
fflush(f);
|
||||||
fseek(f, 0x143L, SEEK_SET);
|
fseek(f, 0x143L, SEEK_SET);
|
||||||
fputc(gbc_mode, f);
|
fputc(gbc_mode, f);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
}
|
||||||
if (!(ulOptions & OPTF_QUIET) && gbc_mode == 0x80) {
|
if (!(ulOptions & OPTF_QUIET) && gbc_mode == 0x80) {
|
||||||
printf("\tGame Boy Color compatible mode set\n");
|
printf("\tGame Boy Color compatible mode set\n");
|
||||||
}
|
}
|
||||||
@@ -545,6 +549,7 @@ main(int argc, char *argv[])
|
|||||||
* -s (Set SGB mode) option code
|
* -s (Set SGB mode) option code
|
||||||
*/
|
*/
|
||||||
if (ulOptions & OPTF_SGBMODE) {
|
if (ulOptions & OPTF_SGBMODE) {
|
||||||
|
if (!(ulOptions & OPTF_DEBUG)) {
|
||||||
fflush(f);
|
fflush(f);
|
||||||
// set old licensee code to 0x33
|
// set old licensee code to 0x33
|
||||||
fseek(f, 0x14B, SEEK_SET);
|
fseek(f, 0x14B, SEEK_SET);
|
||||||
@@ -553,7 +558,7 @@ main(int argc, char *argv[])
|
|||||||
fseek(f, 0x146, SEEK_SET);
|
fseek(f, 0x146, SEEK_SET);
|
||||||
fputc(3, f);
|
fputc(3, f);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
}
|
||||||
if (!(ulOptions & OPTF_QUIET)) {
|
if (!(ulOptions & OPTF_QUIET)) {
|
||||||
printf("Setting SGB mode flag\n");
|
printf("Setting SGB mode flag\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user