shithub: rgbds

Download patch

ref: d0278d86638bc7b2beb621a6e16be42735779eac
parent: 632bc2aaecc05590502e9bda1e76f8fac38f2c8b
author: ISSOtm <eldredhabert0@gmail.com>
date: Mon Feb 3 17:01:49 EST 2020

Invert logic for section max sizes

Prep for the next commit

--- a/src/link/main.c
+++ b/src/link/main.c
@@ -177,10 +177,10 @@
 	}
 
 	/* Patch the size array depending on command-line options */
-	if (is32kMode)
-		maxsize[SECTTYPE_ROM0] = 0x8000;
-	if (isWRA0Mode)
-		maxsize[SECTTYPE_WRAM0] = 0x2000;
+	if (!is32kMode)
+		maxsize[SECTTYPE_ROM0] = 0x4000;
+	if (!isWRA0Mode)
+		maxsize[SECTTYPE_WRAM0] = 0x1000;
 
 	/* Patch the bank ranges array depending on command-line options */
 	if (isDmgMode)
--- a/src/linkdefs.c
+++ b/src/linkdefs.c
@@ -13,11 +13,11 @@
 };
 
 uint16_t maxsize[] = {
-	[SECTTYPE_ROM0]  = 0x4000,
+	[SECTTYPE_ROM0]  = 0x8000,
 	[SECTTYPE_ROMX]  = 0x4000,
 	[SECTTYPE_VRAM]  = 0x2000,
 	[SECTTYPE_SRAM]  = 0x2000,
-	[SECTTYPE_WRAM0] = 0x1000,
+	[SECTTYPE_WRAM0] = 0x2000,
 	[SECTTYPE_WRAMX] = 0x1000,
 	[SECTTYPE_OAM]   = 0x00A0,
 	[SECTTYPE_HRAM]  = 0x007F