Moved the target configurations into separate files
git-svn-id: svn://svn.cc65.org/cc65/trunk@416 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
11
src/ld65/cfg/apple2.cfg
Normal file
11
src/ld65/cfg/apple2.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $00, size = $1A, type = rw;
|
||||
RAM: start = $800, size = $8E00, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
14
src/ld65/cfg/atari.cfg
Normal file
14
src/ld65/cfg/atari.cfg
Normal file
@@ -0,0 +1,14 @@
|
||||
MEMORY {
|
||||
ZP: start = $82, size = $7E, type = rw;
|
||||
HEADER: start = $0000, size = $6, file = %O;
|
||||
RAM: start = $1F00, size = $9D1F, file = %O; # $9D1F: matches upper bound $BC1F
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = wprot;
|
||||
CODE: load = RAM, type = wprot, define = yes;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
AUTOSTRT: load = RAM, type = wprot;
|
||||
}
|
||||
11
src/ld65/cfg/c128.cfg
Normal file
11
src/ld65/cfg/c128.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $1bff, size = $a401, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
11
src/ld65/cfg/c64.cfg
Normal file
11
src/ld65/cfg/c64.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $7FF, size = $c801, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
11
src/ld65/cfg/cbm610.cfg
Normal file
11
src/ld65/cfg/cbm610.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $0001, size = $FFF0, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
67
src/ld65/cfg/cvt-cfg.pl
Executable file
67
src/ld65/cfg/cvt-cfg.pl
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Check number of params
|
||||
die "Usage: cvt-cfg.pl input output varname\n" unless ($#ARGV == 2);
|
||||
|
||||
# Get the parameters
|
||||
$InputName = shift (@ARGV);
|
||||
$OutputName = shift (@ARGV);
|
||||
$VarName = shift (@ARGV);
|
||||
|
||||
# Open both files
|
||||
open (IN, "<$InputName") or die "Cannot open $InputName\n";
|
||||
open (OUT, ">$OutputName") or die "Cannot open $OutputName\n";
|
||||
|
||||
# Print the header to the output file
|
||||
print OUT "static const char $VarName [] = \n";
|
||||
|
||||
# Read from input, print to output
|
||||
while ($Line = <IN>) {
|
||||
|
||||
# Remove the newline
|
||||
chomp $Line;
|
||||
|
||||
# Separate an existing comment. No need to be overly clever, just ignore
|
||||
# hash marks in strings.
|
||||
if ($Line =~ /(.*?)(\s*)(\#\s*)(.*?)\s*$/) {
|
||||
$Line = $1;
|
||||
$CommentSpace = $2;
|
||||
$Comment = $4;
|
||||
} else {
|
||||
$CommentSpace = "";
|
||||
$Comment = "";
|
||||
}
|
||||
|
||||
# Remove leading and trailing spaces
|
||||
$Line =~ s/^\s*|\s*$//g;
|
||||
|
||||
# Replace control chars
|
||||
$Line =~ s/\\/\\\\/g;
|
||||
$Line =~ s/\"/\\\"/g;
|
||||
$Line =~ s/\'/\\\'/g;
|
||||
|
||||
# Print to output
|
||||
print OUT "\"$Line\"";
|
||||
|
||||
# Add a comment if we have one
|
||||
if ($Comment ne "") {
|
||||
print OUT "$CommentSpace/* $Comment */";
|
||||
}
|
||||
|
||||
# Terminate the line
|
||||
print OUT "\n";
|
||||
}
|
||||
|
||||
# Terminate the variable declaration
|
||||
print OUT ";\n";
|
||||
|
||||
# Close the files
|
||||
close IN;
|
||||
close OUT;
|
||||
|
||||
# Done
|
||||
exit 0;
|
||||
|
||||
|
||||
|
||||
|
||||
11
src/ld65/cfg/geos.cfg
Normal file
11
src/ld65/cfg/geos.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
HEADER: start = $204, size = 508, file = %O;
|
||||
RAM: start = $400, size = $7C00, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
HEADER: load = HEADER, type = ro;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
17
src/ld65/cfg/lunix.cfg
Normal file
17
src/ld65/cfg/lunix.cfg
Normal file
@@ -0,0 +1,17 @@
|
||||
MEMORY {
|
||||
COMBINED: start = $0000, size = $FFFF, file = %O;
|
||||
ZEROPAGE: start = $0000, size = $0100, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = COMBINED, type = wprot;
|
||||
RODATA: load = COMBINED, type = wprot;
|
||||
DATA: load = COMBINED, type = rw, define = yes;
|
||||
BSS: load = COMBINED, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZEROPAGE, type = zp;
|
||||
}
|
||||
FILES {
|
||||
%O: format = o65;
|
||||
}
|
||||
FORMATS {
|
||||
o65: os = lunix, type = small, extsym = "LUNIXKERNAL", extsym = "LIB6502";
|
||||
}
|
||||
11
src/ld65/cfg/nes.cfg
Normal file
11
src/ld65/cfg/nes.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $03FF, size = $7BFF, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
9
src/ld65/cfg/none.cfg
Normal file
9
src/ld65/cfg/none.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
MEMORY {
|
||||
RAM: start = %S, size = $10000, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
17
src/ld65/cfg/osa65.cfg
Normal file
17
src/ld65/cfg/osa65.cfg
Normal file
@@ -0,0 +1,17 @@
|
||||
MEMORY {
|
||||
COMBINED: start = $0000, size = $FFFF, file = %O;
|
||||
ZEROPAGE: start = $0000, size = $0100, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = COMBINED, type = wprot;
|
||||
RODATA: load = COMBINED, type = wprot;
|
||||
DATA: load = COMBINED, type = rw, define = yes;
|
||||
BSS: load = COMBINED, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZEROPAGE, type = zp;
|
||||
}
|
||||
FILES {
|
||||
%O: format = o65;
|
||||
}
|
||||
FORMATS {
|
||||
o65: os = osa65, type = small, extsym = "OSA2KERNAL", extsym = "LIB6502";
|
||||
}
|
||||
12
src/ld65/cfg/pet.cfg
Normal file
12
src/ld65/cfg/pet.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $03FF, size = $7BFF, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
|
||||
11
src/ld65/cfg/plus4.cfg
Normal file
11
src/ld65/cfg/plus4.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw;
|
||||
RAM: start = $0fff, size = $7001, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = wprot;
|
||||
RODATA: load = RAM, type = wprot;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
Reference in New Issue
Block a user