gbdev / rgbds

Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
https://rgbds.gbdev.io
MIT License
1.35k stars 172 forks source link

Warn when `--sgb-compatible` is passed, but the old licensee code is not 0x33 #1150

Closed ISSOtm closed 1 year ago

ISSOtm commented 1 year ago

Since RGBFIX sees all of the header anyway, we should be able to just check for this?

Rangi42 commented 1 year ago

This was done in https://github.com/gbdev/rgbds/pull/664:

    if (sgb && oldLicensee != UNSPECIFIED && oldLicensee != 0x33)
        fprintf(stderr,
            "warning: SGB compatibility enabled, but old licensee is %#x, not 0x33\n",
            oldLicensee);
ISSOtm commented 1 year ago

Yes, but we only do this when it's being set explicitly via RGBFIX. To clarify, the intent was to also check the pre-existing value in the header if it's not being overridden.