diff --git a/test/link/romx-tiny-no-t.out b/test/link/romx-tiny-no-t.out new file mode 100644 index 00000000..6537114f --- /dev/null +++ b/test/link/romx-tiny-no-t.out @@ -0,0 +1 @@ +rgblink:error:Unable to place 'r0b' (ROM0 section) anywhere diff --git a/test/link/romx-tiny-t.out b/test/link/romx-tiny-t.out new file mode 100644 index 00000000..5d02cc75 --- /dev/null +++ b/test/link/romx-tiny-t.out @@ -0,0 +1 @@ +rgblink:error:ROMX sections can't be used with option -t. diff --git a/test/link/romx-tiny.asm b/test/link/romx-tiny.asm new file mode 100644 index 00000000..1cd858ea --- /dev/null +++ b/test/link/romx-tiny.asm @@ -0,0 +1,8 @@ +SECTION "r0a", ROM0 +DS $4000 + +SECTION "rx", ROMX +DS $4000 + +SECTION "r0b", ROM0 +DS $4000 diff --git a/test/link/test.sh b/test/link/test.sh index 8cd0aeda..80cfe0a9 100644 --- a/test/link/test.sh +++ b/test/link/test.sh @@ -10,3 +10,17 @@ $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 diff bank-numbers.out $outtemp head -c 20 $gbtemp > $otemp 2>&1 diff bank-numbers.out.bin $otemp + +$RGBASM -o $otemp wramx-contwram.asm +$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 +diff wramx-contwram-no-w.out $outtemp +$RGBLINK -w -o $gbtemp $otemp > $outtemp 2>&1 +diff wramx-contwram-w.out $outtemp + +$RGBASM -o $otemp romx-tiny.asm +$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 +diff romx-tiny-no-t.out $outtemp +$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1 +diff romx-tiny-t.out $outtemp + +exit 0 diff --git a/test/link/update-refs.sh b/test/link/update-refs.sh index 2bd0652c..1c7235d6 100644 --- a/test/link/update-refs.sh +++ b/test/link/update-refs.sh @@ -7,3 +7,13 @@ RGBLINK=../../rgblink $RGBASM -o $otemp bank-numbers.asm $RGBLINK -o $gbtemp $otemp > bank-numbers.out 2>&1 head -c 20 $gbtemp > bank-numbers.out.bin 2>&1 + +$RGBASM -o $otemp wramx-contwram.asm +$RGBLINK -o $gbtemp $otemp > wramx-contwram-no-w.out 2>&1 +$RGBLINK -w -o $gbtemp $otemp > wramx-contwram-w.out 2>&1 + +$RGBASM -o $otemp romx-tiny.asm +$RGBLINK -o $gbtemp $otemp > romx-tiny-no-t.out 2>&1 +$RGBLINK -t -o $gbtemp $otemp > romx-tiny-t.out 2>&1 + +exit 0 diff --git a/test/link/wramx-contwram-no-w.out b/test/link/wramx-contwram-no-w.out new file mode 100644 index 00000000..219db0e4 --- /dev/null +++ b/test/link/wramx-contwram-no-w.out @@ -0,0 +1 @@ +rgblink:error:Unable to place 'w0b' (WRAM0 section) anywhere diff --git a/test/link/wramx-contwram-w.out b/test/link/wramx-contwram-w.out new file mode 100644 index 00000000..51cc3c8e --- /dev/null +++ b/test/link/wramx-contwram-w.out @@ -0,0 +1 @@ +rgblink:error:WRAMX sections can't be used with option -w. diff --git a/test/link/wramx-contwram.asm b/test/link/wramx-contwram.asm new file mode 100644 index 00000000..9851de27 --- /dev/null +++ b/test/link/wramx-contwram.asm @@ -0,0 +1,8 @@ +SECTION "w0a", WRAM0 +DS $1000 + +SECTION "wx", WRAMX +DS $1000 + +SECTION "w0b", WRAM0 +DS $1000