mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Warn when SGB compatibility is set without old licensee 0x33
This commit is contained in:
@@ -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");
|
||||
|
||||
BIN
test/fix/sgb-old-licensee.bin
Normal file
BIN
test/fix/sgb-old-licensee.bin
Normal file
Binary file not shown.
2
test/fix/sgb-old-licensee.err
Normal file
2
test/fix/sgb-old-licensee.err
Normal 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
|
||||
1
test/fix/sgb-old-licensee.flags
Normal file
1
test/fix/sgb-old-licensee.flags
Normal file
@@ -0,0 +1 @@
|
||||
-s
|
||||
BIN
test/fix/sgb.bin
BIN
test/fix/sgb.bin
Binary file not shown.
BIN
test/fix/sgb.gb
BIN
test/fix/sgb.gb
Binary file not shown.
Reference in New Issue
Block a user