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:
@@ -2,4 +2,12 @@
|
|||||||
ld65
|
ld65
|
||||||
*.map
|
*.map
|
||||||
*.s
|
*.s
|
||||||
|
apple2.inc
|
||||||
|
atari.inc
|
||||||
|
c128.inc
|
||||||
|
c64.inc
|
||||||
|
cbm610.inc
|
||||||
|
geos.inc
|
||||||
|
none.inc
|
||||||
|
pet.inc
|
||||||
|
plus4.inc
|
||||||
|
|||||||
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;
|
||||||
|
}
|
||||||
@@ -11,6 +11,12 @@ CFLAGS = -g -O2 -Wall -I$(COMMON) $(CDEFS)
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
|
# Perl script for config file conversion
|
||||||
|
CVT=cfg/cvt-cfg.pl
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# List of all object files
|
||||||
|
|
||||||
OBJS = bin.o \
|
OBJS = bin.o \
|
||||||
binfmt.o \
|
binfmt.o \
|
||||||
config.o \
|
config.o \
|
||||||
@@ -29,7 +35,23 @@ OBJS = bin.o \
|
|||||||
objfile.o \
|
objfile.o \
|
||||||
scanner.o \
|
scanner.o \
|
||||||
segments.o \
|
segments.o \
|
||||||
tgtcfg.o
|
tgtcfg.o
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# List of all config includes
|
||||||
|
|
||||||
|
INCS = apple2.inc \
|
||||||
|
atari.inc \
|
||||||
|
c64.inc \
|
||||||
|
c128.inc \
|
||||||
|
cbm610.inc \
|
||||||
|
geos.inc \
|
||||||
|
none.inc \
|
||||||
|
pet.inc \
|
||||||
|
plus4.inc
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
LIBS = $(COMMON)/common.a
|
LIBS = $(COMMON)/common.a
|
||||||
|
|
||||||
@@ -47,14 +69,14 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ld65: $(OBJS) $(LIBS)
|
ld65: $(INCS) $(OBJS) $(LIBS)
|
||||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ core *.map
|
rm -f *~ core *.map
|
||||||
|
|
||||||
zap: clean
|
zap: clean
|
||||||
rm -f *.o $(EXECS) .depend
|
rm -f *.o $(INCS) $(EXECS) .depend
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -63,6 +85,36 @@ zap: clean
|
|||||||
.PHONY: depend dep
|
.PHONY: depend dep
|
||||||
depend dep: $(OBJS:.o=.c)
|
depend dep: $(OBJS:.o=.c)
|
||||||
@echo "Creating dependency information"
|
@echo "Creating dependency information"
|
||||||
$(CC) -I$(COMMON) -MM $^ > .depend
|
$(CC) -I$(COMMON) -MM -MG $^ > .depend
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Rules to make config includes
|
||||||
|
|
||||||
|
apple2.inc: cfg/apple2.cfg
|
||||||
|
@$(CVT) $< $@ CfgApple2
|
||||||
|
|
||||||
|
atari.inc: cfg/atari.cfg
|
||||||
|
@$(CVT) $< $@ CfgAtari
|
||||||
|
|
||||||
|
c64.inc: cfg/c64.cfg
|
||||||
|
@$(CVT) $< $@ CfgC64
|
||||||
|
|
||||||
|
c128.inc: cfg/c128.cfg
|
||||||
|
@$(CVT) $< $@ CfgC128
|
||||||
|
|
||||||
|
cbm610.inc: cfg/cbm610.cfg
|
||||||
|
@$(CVT) $< $@ CfgCBM610
|
||||||
|
|
||||||
|
geos.inc: cfg/geos.cfg
|
||||||
|
@$(CVT) $< $@ CfgGeos
|
||||||
|
|
||||||
|
none.inc: cfg/none.cfg
|
||||||
|
@$(CVT) $< $@ CfgNone
|
||||||
|
|
||||||
|
pet.inc: cfg/pet.cfg
|
||||||
|
@$(CVT) $< $@ CfgPET
|
||||||
|
|
||||||
|
plus4.inc: cfg/plus4.cfg
|
||||||
|
@$(CVT) $< $@ CfgPlus4
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,180 +43,20 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const char CfgNone [] =
|
/* An empty config */
|
||||||
"MEMORY {"
|
static const char CfgEmpty[] = "";
|
||||||
"RAM: start = %S, size = $10000, file = %O;"
|
|
||||||
"}"
|
/* Actual target configurations, converted into C strings by a perl script */
|
||||||
"SEGMENTS {"
|
#include "apple2.inc"
|
||||||
"CODE: load = RAM, type = rw;"
|
#include "atari.inc"
|
||||||
"RODATA: load = RAM, type = rw;"
|
#include "c128.inc"
|
||||||
"DATA: load = RAM, type = rw;"
|
#include "c64.inc"
|
||||||
"BSS: load = RAM, type = bss, define = yes;"
|
#include "cbm610.inc"
|
||||||
"}";
|
#include "geos.inc"
|
||||||
|
#include "none.inc"
|
||||||
static const char CfgAtari [] =
|
#include "pet.inc"
|
||||||
"MEMORY {"
|
#include "plus4.inc"
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgC64 [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgC128 [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgAce [] =
|
|
||||||
"";
|
|
||||||
|
|
||||||
static const char CfgPlus4 [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgCBM610 [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgPET [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgNES [] =
|
|
||||||
"MEMORY {"
|
|
||||||
"RAM: start = $0200, size = $0600, file = \"\";"
|
|
||||||
"ROM: start = $8000, size = $8000, file = %O;"
|
|
||||||
"}"
|
|
||||||
"SEGMENTS {"
|
|
||||||
"CODE: load = ROM, type = ro;"
|
|
||||||
"RODATA: load = ROM, type = ro;"
|
|
||||||
"DATA: load = ROM, run = RAM, type = rw, define = yes;"
|
|
||||||
"BSS: load = RAM, type = bss, define = yes;"
|
|
||||||
"VECTORS: load = ROM, type = ro, start = $FFFA;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgLunix [] =
|
|
||||||
"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\";"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgOSA65 [] =
|
|
||||||
"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\";"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgApple2 [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
static const char CfgGeos [] =
|
|
||||||
"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;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -232,18 +72,15 @@ const TargetDesc Targets [TGT_COUNT] = {
|
|||||||
{ BINFMT_BINARY, CfgAtari },
|
{ BINFMT_BINARY, CfgAtari },
|
||||||
{ BINFMT_BINARY, CfgC64 },
|
{ BINFMT_BINARY, CfgC64 },
|
||||||
{ BINFMT_BINARY, CfgC128 },
|
{ BINFMT_BINARY, CfgC128 },
|
||||||
{ BINFMT_BINARY, CfgAce },
|
{ BINFMT_BINARY, CfgEmpty }, /* Ace */
|
||||||
{ BINFMT_BINARY, CfgPlus4 },
|
{ BINFMT_BINARY, CfgPlus4 },
|
||||||
{ BINFMT_BINARY, CfgCBM610 },
|
{ BINFMT_BINARY, CfgCBM610 },
|
||||||
{ BINFMT_BINARY, CfgPET },
|
{ BINFMT_BINARY, CfgPET },
|
||||||
{ BINFMT_BINARY, CfgNES },
|
{ BINFMT_BINARY, CfgEmpty }, /* NES */
|
||||||
#if 0
|
|
||||||
{ BINFMT_O65, CfgLunix },
|
|
||||||
{ BINFMT_O65, CfgOSA65 },
|
|
||||||
#endif
|
|
||||||
{ BINFMT_BINARY, CfgApple2 },
|
{ BINFMT_BINARY, CfgApple2 },
|
||||||
{ BINFMT_BINARY, CfgGeos },
|
{ BINFMT_BINARY, CfgGeos },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user