Warn when SGB compatibility is set without old licensee 0x33

This commit is contained in:
Rangi42
2023-10-31 23:37:55 -04:00
committed by Eldred Habert
parent e7d0428a2e
commit b4dbb5093a
6 changed files with 7 additions and 0 deletions

View File

@@ -967,6 +967,10 @@ static void processFile(int input, int output, char const *name, off_t fileSize)
if (oldLicensee != UNSPECIFIED)
overwriteByte(rom0, 0x14B, oldLicensee, "old licensee code");
else if (sgb && rom0[0x14B] != 0x33)
fprintf(stderr,
"warning: SGB compatibility enabled, but old licensee was %#x, not 0x33\n",
rom0[0x14B]);
if (romVersion != UNSPECIFIED)
overwriteByte(rom0, 0x14C, romVersion, "mask ROM version number");

Binary file not shown.

View File

@@ -0,0 +1,2 @@
warning: Overwrote a non-zero byte in the SGB flag
warning: SGB compatibility enabled, but old licensee was 0xc5, not 0x33

View File

@@ -0,0 +1 @@
-s

Binary file not shown.

Binary file not shown.