Restore behaviour of option -w and add option -d

rgblink option -w has been restored to its previous behaviour: make WRAM
a continous section instead of spliting it into WRAM0 and WRAMX.

To enable DMG mode, option -d has to be used instead. This option
automatically enables -w.

Update tests.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2017-04-10 20:03:52 +01:00
parent 4395ed893a
commit 5679c7066b
14 changed files with 50 additions and 29 deletions

View File

@@ -33,7 +33,7 @@ static void
usage(void)
{
printf(
"usage: rgblink [-tw] [-l linkerscript] [-m mapfile] [-n symfile] [-O overlay]\n"
"usage: rgblink [-twd] [-l linkerscript] [-m mapfile] [-n symfile] [-O overlay]\n"
" [-o outfile] [-p pad_value] [-s symbol] file [...]\n");
exit(1);
}
@@ -52,7 +52,7 @@ main(int argc, char *argv[])
if (argc == 1)
usage();
while ((ch = getopt(argc, argv, "l:m:n:o:O:p:s:tw")) != -1) {
while ((ch = getopt(argc, argv, "l:m:n:o:O:p:s:twd")) != -1) {
switch (ch) {
case 'l':
SetLinkerscriptName(optarg);
@@ -87,15 +87,24 @@ main(int argc, char *argv[])
case 't':
options |= OPT_TINY;
break;
case 'w':
case 'd':
/*
* Set to set WRAM as a single continuous block as on
* DMG. All WRAM sections must be WRAM0 as bankable WRAM
* sections do not exist in this mode. A WRAMX section
* will raise an error. VRAM bank 1 can't be used if
* this option is enabled either.
*
* This option implies OPT_CONTWRAM.
*/
options |= OPT_DMG_MODE;
/* fallthrough */
case 'w':
/* Set to set WRAM as a single continuous block as on
* DMG. All WRAM sections must be WRAM0 as bankable WRAM
* sections do not exist in this mode. A WRAMX section
* will raise an error. */
options |= OPT_CONTWRAM;
break;
default:
usage();