# ca65 configuration for NROM with first $6000 bytes empty

# fill=yes forces area to be padded to specified size in output
MEMORY {
	ZP:     start =   $10, size =   $F0, type = rw;
	HEADER: start =     0, size =    16, type = ro, fill = yes;
	
	# my devcart only has memory from $E000-$FFFF
	ROMX:   start = $8000, size = $6000, type = ro, fill = yes;
	ROM0:   start = $E000, size = $1FF4, type = ro, fill = yes;
	ROMV:   start = $FFF4, size =    $C, type = ro, fill = yes;
	
	ROM2:   start =     0, size = $2000, type = ro, fill = yes;
	
	SRAM:   start = $0200, size = $0600, type = rw;
}

# align=$100 allows use of .align directive with a value up to $100
SEGMENTS {
	HEADER:   load = HEADER, type = ro;
	#STARTUP:  load = ROMX,   type = ro;
	CODE:     load = ROM0,   type = ro, align = $100;
	RODATA:   load = ROM0,   type = ro;
	VECTORS:  load = ROMV,   type = ro;
	CHARS:    load = ROM2,   type = ro;
	BSS:      load = SRAM,   type = bss;
	ZEROPAGE: load = ZP,     type = zp;
}