mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Support BANK() correctly when given WRAMX/SRAM/VRAM labels.
(Mostly) from Antonio Niño Díaz.
This commit is contained in:
@@ -1073,7 +1073,7 @@ section:
|
||||
}
|
||||
} else if ($4 == SECT_WRAMX) {
|
||||
if ($8 >= 1 && $8 <= 7) {
|
||||
out_NewAbsSection($2, $4, -1, $8);
|
||||
out_NewAbsSection($2, $4, -1, $8 - 1);
|
||||
} else {
|
||||
yyerror("WRAMX bank value $%x out of range (1 to 7)", $8);
|
||||
}
|
||||
@@ -1110,7 +1110,7 @@ section:
|
||||
} else if ($4 == SECT_WRAMX) {
|
||||
if ($6 >= 0 && $6 < 0x10000) {
|
||||
if ($11 >= 1 && $11 <= 7) {
|
||||
out_NewAbsSection($2, $4, $6, $11);
|
||||
out_NewAbsSection($2, $4, $6, $11 - 1);
|
||||
} else {
|
||||
yyerror("WRAMX bank value $%x out of range (1 to 7)", $11);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user