From 2541ddd2f6cf055eacd339cc79a770f94745d47b Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 10 Oct 2003 16:30:55 +0000 Subject: [PATCH] New target: supervision git-svn-id: svn://svn.cc65.org/cc65/trunk@2495 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/target.c | 2 ++ src/common/target.h | 1 + src/ld65/cfg/supervision.cfg | 32 ++++++++++++++++++++++++++++++++ src/ld65/make/gcc.mak | 4 ++++ src/ld65/tgtcfg.c | 4 +++- 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/ld65/cfg/supervision.cfg diff --git a/src/common/target.c b/src/common/target.c index a32f08a80..a13801643 100644 --- a/src/common/target.c +++ b/src/common/target.c @@ -70,6 +70,7 @@ const char* TargetNames [TGT_COUNT] = { "lunix", "atmos", "nes", + "supervision", }; @@ -94,6 +95,7 @@ const cpu_t DefaultCPU[TGT_COUNT] = { CPU_6502, /* lunix */ CPU_6502, /* atmos */ CPU_6502, /* nes */ + CPU_65C02, /* supervision */ }; diff --git a/src/common/target.h b/src/common/target.h index 03affe2bf..bd252eaf8 100644 --- a/src/common/target.h +++ b/src/common/target.h @@ -70,6 +70,7 @@ typedef enum { TGT_LUNIX, TGT_ATMOS, TGT_NES, + TGT_SUPERVISION, TGT_COUNT /* Number of target systems */ } target_t; diff --git a/src/ld65/cfg/supervision.cfg b/src/ld65/cfg/supervision.cfg new file mode 100644 index 000000000..c7f0d8395 --- /dev/null +++ b/src/ld65/cfg/supervision.cfg @@ -0,0 +1,32 @@ +# if you want to combine the 2 16 kbyte roms +# make sure the halves are mirrored in the 64kbyte cartridge image +# or reset from code >0xc000 and switch bank to the 3rd bank + +MEMORY { + ZP: start = $0000, size = $100; + CPUSTACK: start = $0100, size =$100; + RAM: start = $0200, size = $1e00, define = yes; + VRAM: start = $4000, size = $2000; + ROM: start = $8000, size = $8000, fill = yes, fillval = $ff, file = %O, define = yes; +} + +SEGMENTS { + CODE: load = ROM, type = ro, define=yes; + RODATA: load = ROM, type = ro, define=yes; + DATA: load = ROM, run=RAM, type = rw, define = yes; + FFF0: load = ROM, type = ro, offset = $7FF0; + VECTOR: load = ROM, type = ro, offset = $7FFA; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp, define = yes; +} + +FEATURES { + CONDES: segment = RODATA, + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; +} diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index 241444fa2..31d85ef5d 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -66,6 +66,7 @@ INCS = apple2.inc \ none.inc \ pet.inc \ plus4.inc \ + supervision.inc \ vic20.inc # ----------------------------------------------------------------------------- @@ -159,6 +160,9 @@ pet.inc: cfg/pet.cfg plus4.inc: cfg/plus4.cfg @$(CVT) $< $@ CfgPlus4 +supervision.inc: cfg/supervision.cfg + @$(CVT) $< $@ CfgSupervision + vic20.inc: cfg/vic20.cfg @$(CVT) $< $@ CfgVic20 diff --git a/src/ld65/tgtcfg.c b/src/ld65/tgtcfg.c index cb9bdcfd0..9cc3c53e9 100644 --- a/src/ld65/tgtcfg.c +++ b/src/ld65/tgtcfg.c @@ -68,6 +68,7 @@ static const char CfgEmpty[] = ""; #include "none.inc" #include "pet.inc" #include "plus4.inc" +#include "supervision.inc" #include "vic20.inc" @@ -98,6 +99,7 @@ const TargetDesc Targets [TGT_COUNT] = { { BINFMT_O65, CfgLunix }, { BINFMT_BINARY, CfgAtmos }, { BINFMT_BINARY, CfgNES }, + { BINFMT_BINARY, CfgSupervision }, }; @@ -120,4 +122,4 @@ void DumpBuiltinConfig (FILE* F, target_t T) - + -- 2.39.5