mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
Introduced target 'atarixl'.
The target 'atarixl' is to be used for Atari XL (and better) machines. It will disable the OS ROM and enable the Shadow RAM available on those machine. Note: This commit is only the inital step towards for this goal that just replicates the target 'atari' as a starting point!
This commit is contained in:
parent
2e8a65bda4
commit
98c47d1877
@ -43,7 +43,7 @@ BUFSIZ = 256
|
||||
EOF = -1
|
||||
.if .defined(__APPLE2__) .or .defined(__APPLE2ENH__)
|
||||
FILENAME_MAX = 64+1
|
||||
.elseif .defined(__ATARI__)
|
||||
.elseif .defined(__ATARI__) .or .defined(__ATARIXL__)
|
||||
FILENAME_MAX = 12+1
|
||||
.elseif .defined(__LUNIX__)
|
||||
FILENAME_MAX = 80+1
|
||||
|
61
cfg/atarixl-overlay.cfg
Normal file
61
cfg/atarixl-overlay.cfg
Normal file
@ -0,0 +1,61 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $2E00;
|
||||
}
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
HEADER: file = %O, start = $0000, size = $0006;
|
||||
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = $BC20 - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
ZPSAVE: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
42
cfg/atarixl.cfg
Normal file
42
cfg/atarixl.cfg
Normal file
@ -0,0 +1,42 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $2E00;
|
||||
}
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
HEADER: file = %O, start = $0000, size = $0006;
|
||||
RAM: file = %O, start = %S, size = $BC20 - __STACKSIZE__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
ZPSAVE: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__ATARI__)
|
||||
#if !defined(__ATARI__) && !defined(__ATARIXL__)
|
||||
# error This module may only be used when compiling for the Atari!
|
||||
#endif
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
# include <apple2.h>
|
||||
#elif defined(__APPLE2ENH__)
|
||||
# include <apple2enh.h>
|
||||
#elif defined(__ATARI__)
|
||||
#elif defined(__ATARI__) || defined(__ATARIXL__)
|
||||
# include <atari.h>
|
||||
#elif defined(__ATMOS__)
|
||||
# include <atmos.h>
|
||||
|
@ -78,7 +78,7 @@ struct dirent {
|
||||
#define _DE_ISLBL(t) (0)
|
||||
#define _DE_ISLNK(t) (0)
|
||||
|
||||
#elif defined(__ATARI__)
|
||||
#elif defined(__ATARI__) || defined(__ATARIXL__)
|
||||
|
||||
struct dirent {
|
||||
char d_name[13]; /* 8.3 + trailing 0 */
|
||||
|
@ -71,7 +71,7 @@ extern FILE* stderr;
|
||||
/* Standard defines that are platform dependent */
|
||||
#if defined(__APPLE2__) || defined(__APPLE2ENH__)
|
||||
# define FILENAME_MAX (64+1)
|
||||
#elif defined(__ATARI__)
|
||||
#elif defined(__ATARI__) || defined(__ATARIXL__)
|
||||
# define FILENAME_MAX (12+1)
|
||||
#elif defined(__LUNIX__)
|
||||
# define FILENAME_MAX (80+1)
|
||||
|
@ -76,7 +76,7 @@ extern struct _timezone {
|
||||
|
||||
|
||||
|
||||
#if defined(__ATARI__)
|
||||
#if defined(__ATARI__) || defined(__ATARIXL__)
|
||||
/* The clock depends on the video standard, so read it at runtime */
|
||||
unsigned _clocks_per_sec (void);
|
||||
# define CLK_TCK _clocks_per_sec()
|
||||
|
@ -13,6 +13,7 @@ GEOS = geos-apple \
|
||||
TARGETS = apple2 \
|
||||
apple2enh \
|
||||
atari \
|
||||
atarixl \
|
||||
atmos \
|
||||
$(CBMS) \
|
||||
$(GEOS) \
|
||||
@ -93,9 +94,13 @@ GEOSDIRS = common \
|
||||
system
|
||||
|
||||
ifeq ($(TARGET),apple2enh)
|
||||
SRCDIR = apple2
|
||||
OBJPFX = a2
|
||||
DRVPFX = a2e
|
||||
SRCDIR = apple2
|
||||
else ifeq ($(TARGET),atarixl)
|
||||
SRCDIR = atari
|
||||
OBJPFX = atr
|
||||
DRVPFX = atrx
|
||||
else ifeq ($(TARGET),sim65c02)
|
||||
SRCDIR = sim6502
|
||||
else
|
||||
|
@ -93,7 +93,7 @@ static char GetKeyUpdate (void);
|
||||
# define MAX_X 80
|
||||
# define MAX_Y 25
|
||||
# define DUMP_BYTES 16
|
||||
#elif defined(__APPLE2__) || defined(__APPLE2ENH__) || defined(__ATARI__)
|
||||
#elif defined(__APPLE2__) || defined(__APPLE2ENH__) || defined(__ATARI__) || defined(__ATARIXL__)
|
||||
# define MAX_X 40
|
||||
# define MAX_Y 24
|
||||
# define DUMP_BYTES 8
|
||||
|
@ -208,6 +208,10 @@ static void SetSys (const char* Sys)
|
||||
NewSymbol ("__ATARI__", 1);
|
||||
break;
|
||||
|
||||
case TGT_ATARIXL:
|
||||
NewSymbol ("__ATARIXL__", 1);
|
||||
break;
|
||||
|
||||
case TGT_C16:
|
||||
CBMSystem ("__C16__");
|
||||
break;
|
||||
|
@ -164,6 +164,10 @@ static void SetSys (const char* Sys)
|
||||
DefineNumericMacro ("__ATARI__", 1);
|
||||
break;
|
||||
|
||||
case TGT_ATARIXL:
|
||||
DefineNumericMacro ("__ATARIXL__", 1);
|
||||
break;
|
||||
|
||||
case TGT_C16:
|
||||
cbmsys ("__C16__");
|
||||
break;
|
||||
|
@ -125,6 +125,7 @@ static const TargetEntry TargetMap[] = {
|
||||
{ "apple2", TGT_APPLE2 },
|
||||
{ "apple2enh", TGT_APPLE2ENH },
|
||||
{ "atari", TGT_ATARI },
|
||||
{ "atarixl", TGT_ATARIXL },
|
||||
{ "atmos", TGT_ATMOS },
|
||||
{ "bbc", TGT_BBC },
|
||||
{ "c128", TGT_C128 },
|
||||
@ -156,6 +157,7 @@ static const TargetProperties PropertyTable[TGT_COUNT] = {
|
||||
{ "none", CPU_6502, BINFMT_BINARY, CTNone },
|
||||
{ "module", CPU_6502, BINFMT_O65, CTNone },
|
||||
{ "atari", CPU_6502, BINFMT_BINARY, CTAtari },
|
||||
{ "atarixl", CPU_6502, BINFMT_BINARY, CTAtari },
|
||||
{ "vic20", CPU_6502, BINFMT_BINARY, CTPET },
|
||||
{ "c16", CPU_6502, BINFMT_BINARY, CTPET },
|
||||
{ "c64", CPU_6502, BINFMT_BINARY, CTPET },
|
||||
|
@ -55,6 +55,7 @@ typedef enum {
|
||||
TGT_NONE,
|
||||
TGT_MODULE,
|
||||
TGT_ATARI,
|
||||
TGT_ATARIXL,
|
||||
TGT_VIC20,
|
||||
TGT_C16,
|
||||
TGT_C64,
|
||||
|
@ -16,11 +16,8 @@ int main(void)
|
||||
printf("clocks per second: %d\n", CLOCKS_PER_SEC);
|
||||
printf("current clock: %ld\n", clock());
|
||||
|
||||
#ifdef __ATARI__
|
||||
/* Atari DOS 2.x clears the screen after program termination, so wait... */
|
||||
printf("hit <return> to exit...");
|
||||
cgetc();
|
||||
#endif
|
||||
printf("\n");
|
||||
return(0);
|
||||
}
|
||||
|
@ -31,10 +31,8 @@ int main(void) {
|
||||
test(-40, -3);
|
||||
if (t)
|
||||
printf("\nThe div() function made a wrong result!\n");
|
||||
#ifdef __ATARI__
|
||||
/* Atari DOS 2 clears the screen after program-termination, so wait. */
|
||||
|
||||
printf("\nTap a key, to exit. ");
|
||||
getchar();
|
||||
#endif
|
||||
return (int)t;
|
||||
}
|
||||
|
@ -24,7 +24,8 @@
|
||||
|
||||
extern int getsp(void); /* is provided in getsp.s */
|
||||
|
||||
#ifdef __ATARI__ /* Atari's fd indirection table */
|
||||
/* Atari's fd indirection table */
|
||||
#if defined(__ATARI__) || defined(__ATARIXL__)
|
||||
extern char __fd_index[];
|
||||
struct fd_t {
|
||||
char usage;
|
||||
@ -33,7 +34,7 @@ struct fd_t {
|
||||
char flag;
|
||||
};
|
||||
extern struct fd_t __fd_table[];
|
||||
#endif /* #ifdef __ATARI__ */
|
||||
#endif
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
@ -73,7 +74,7 @@ int main(int argc,char **argv)
|
||||
return(0);
|
||||
}
|
||||
printf("open success -- handle = $%x, sp = %d\n",fd,csp);
|
||||
#ifdef __ATARI__
|
||||
#if defined(__ATARI__) || defined(__ATARIXL__)
|
||||
printf("fd_index:\n ");
|
||||
for (i=0; i<12; i++) printf("%02X ",__fd_index[i]);
|
||||
printf("\nfd_table:\n");
|
||||
@ -83,7 +84,7 @@ int main(int argc,char **argv)
|
||||
__fd_table[i].iocb,
|
||||
__fd_table[i].dev);
|
||||
}
|
||||
#endif /* #ifdef __ATARI__ */
|
||||
#endif
|
||||
lr = read(fd,buf,16); /* read first 16 bytes */
|
||||
csp = getsp();
|
||||
if (lr == -1) {
|
||||
|
@ -18,7 +18,7 @@ static const unsigned char small_bar[8] = {
|
||||
' ', 0xa5, 0xb4, 0xb5, 0xa1, 0xb6, 0xaa, 0xa7
|
||||
};
|
||||
|
||||
#elif defined(__ATARI__)
|
||||
#elif defined(__ATARI__) || defined(__ATARIXL__)
|
||||
#endif
|
||||
|
||||
/* Screen co-ordinates for the progress meter */
|
||||
@ -39,7 +39,7 @@ static void ProgressMeter (unsigned Val)
|
||||
revers (revers_bar[Val]);
|
||||
cputc (small_bar[Val]);
|
||||
|
||||
#elif defined(__ATARI__)
|
||||
#elif defined(__ATARI__) || defined(__ATARIXL__)
|
||||
#endif
|
||||
|
||||
revers (0);
|
||||
@ -162,12 +162,8 @@ Done:
|
||||
" %u.%03u seconds.\n", Days, Hours, Minu, Sec, Milli);
|
||||
#endif
|
||||
|
||||
#ifdef __ATARI__
|
||||
if (_dos_type != SPARTADOS && _dos_type != OSADOS) {
|
||||
cprintf ("\rTap a key, to exit. ");
|
||||
cgetc();
|
||||
}
|
||||
#endif
|
||||
cprintf ("\rTap a key, to exit. ");
|
||||
cgetc();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef __ATARI__
|
||||
#include <atari.h>
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
static int do_test(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
@ -70,11 +67,6 @@ int main(void)
|
||||
else
|
||||
printf("OK (%d)\n", ret);
|
||||
|
||||
#ifdef __ATARI__
|
||||
if (_dos_type != 1) {
|
||||
cgetc();
|
||||
}
|
||||
#endif
|
||||
|
||||
cgetc();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user