mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Merge pull request #472 from ISSOtm/romx-tiny
Allow ROMX and WRAMX sections in restricted modes
This commit is contained in:
@@ -118,12 +118,20 @@ static void doSanityChecks(struct Section *section, void *ptr)
|
|||||||
|
|
||||||
if (section->type < 0 || section->type >= SECTTYPE_INVALID)
|
if (section->type < 0 || section->type >= SECTTYPE_INVALID)
|
||||||
fail("Section \"%s\" has an invalid type.", section->name);
|
fail("Section \"%s\" has an invalid type.", section->name);
|
||||||
if (is32kMode && section->type == SECTTYPE_ROMX)
|
if (is32kMode && section->type == SECTTYPE_ROMX) {
|
||||||
fail("%s: ROMX sections cannot be used with option -t.",
|
if (section->isBankFixed && section->bank != 1)
|
||||||
section->name);
|
fail("%s: ROMX sections must be in bank 1 with option -t.",
|
||||||
if (isWRA0Mode && section->type == SECTTYPE_WRAMX)
|
section->name);
|
||||||
fail("%s: WRAMX sections cannot be used with options -w or -d.",
|
else
|
||||||
section->name);
|
section->type = SECTTYPE_ROM0;
|
||||||
|
}
|
||||||
|
if (isWRA0Mode && section->type == SECTTYPE_WRAMX) {
|
||||||
|
if (section->isBankFixed && section->bank != 1)
|
||||||
|
fail("%s: WRAMX sections must be in bank 1 with options -w or -d.",
|
||||||
|
section->name);
|
||||||
|
else
|
||||||
|
section->type = SECTTYPE_WRAMX;
|
||||||
|
}
|
||||||
if (isDmgMode && section->type == SECTTYPE_VRAM && section->bank == 1)
|
if (isDmgMode && section->type == SECTTYPE_VRAM && section->bank == 1)
|
||||||
fail("%s: VRAM bank 1 can't be used with option -d.",
|
fail("%s: VRAM bank 1 can't be used with option -d.",
|
||||||
section->name);
|
section->name);
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
warning: rx: ROMX sections cannot be used with option -t.
|
error: Unable to place "r0a" (ROM0 section) anywhere
|
||||||
error: Sanity checks failed
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
warning: wx: WRAMX sections cannot be used with options -w or -d.
|
|
||||||
error: Sanity checks failed
|
|
||||||
|
|||||||
Reference in New Issue
Block a user