mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user