mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Also require ROM0 sections to be fixed when using overlay
This commit is contained in:
@@ -259,8 +259,9 @@ AssignFloatingBankSections(enum eSectionType type)
|
|||||||
SLONG org;
|
SLONG org;
|
||||||
|
|
||||||
if ((org = area_AllocAnyBank(pSection->nByteSize, pSection->nAlign, type)) != -1) {
|
if ((org = area_AllocAnyBank(pSection->nByteSize, pSection->nAlign, type)) != -1) {
|
||||||
if (pSection->Type == SECT_ROMX && options & OPT_OVERLAY) {
|
if (options & OPT_OVERLAY &&
|
||||||
errx(1, "All ROMX sections must be fixed when using overlay");
|
(pSection->Type == SECT_ROMX || pSection->Type == SECT_ROM0)) {
|
||||||
|
errx(1, "All ROM sections must be fixed when using overlay");
|
||||||
}
|
}
|
||||||
pSection->nOrg = org & 0xFFFF;
|
pSection->nOrg = org & 0xFFFF;
|
||||||
pSection->nBank = org >> 16;
|
pSection->nBank = org >> 16;
|
||||||
@@ -405,8 +406,9 @@ AssignSections(void)
|
|||||||
while (pSection) {
|
while (pSection) {
|
||||||
if (pSection->oAssigned == 0
|
if (pSection->oAssigned == 0
|
||||||
&& pSection->nOrg != -1 && pSection->nBank == -1) {
|
&& pSection->nOrg != -1 && pSection->nBank == -1) {
|
||||||
if (pSection->Type == SECT_ROMX && options & OPT_OVERLAY) {
|
if (options & OPT_OVERLAY &&
|
||||||
errx(1, "All ROMX sections must be fixed when using overlay");
|
(pSection->Type == SECT_ROMX || pSection->Type == SECT_ROM0)) {
|
||||||
|
errx(1, "All ROM sections must be fixed when using overlay");
|
||||||
}
|
}
|
||||||
switch (pSection->Type) {
|
switch (pSection->Type) {
|
||||||
case SECT_ROMX:
|
case SECT_ROMX:
|
||||||
|
|||||||
Reference in New Issue
Block a user