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!
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
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
/* Check for errors */
-#if !defined(__ATARI__)
+#if !defined(__ATARI__) && !defined(__ATARIXL__)
# error This module may only be used when compiling for the Atari!
#endif
# 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>
#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 */
/* 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)
-#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()
TARGETS = apple2 \
apple2enh \
atari \
+ atarixl \
atmos \
$(CBMS) \
$(GEOS) \
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
# 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
NewSymbol ("__ATARI__", 1);
break;
+ case TGT_ATARIXL:
+ NewSymbol ("__ATARIXL__", 1);
+ break;
+
case TGT_C16:
CBMSystem ("__C16__");
break;
DefineNumericMacro ("__ATARI__", 1);
break;
+ case TGT_ATARIXL:
+ DefineNumericMacro ("__ATARIXL__", 1);
+ break;
+
case TGT_C16:
cbmsys ("__C16__");
break;
{ "apple2", TGT_APPLE2 },
{ "apple2enh", TGT_APPLE2ENH },
{ "atari", TGT_ATARI },
+ { "atarixl", TGT_ATARIXL },
{ "atmos", TGT_ATMOS },
{ "bbc", TGT_BBC },
{ "c128", TGT_C128 },
{ "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 },
TGT_NONE,
TGT_MODULE,
TGT_ATARI,
+ TGT_ATARIXL,
TGT_VIC20,
TGT_C16,
TGT_C64,
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);
}
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;
}
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;
char flag;
};
extern struct fd_t __fd_table[];
-#endif /* #ifdef __ATARI__ */
+#endif
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");
__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) {
' ', 0xa5, 0xb4, 0xb5, 0xa1, 0xb6, 0xaa, 0xa7\r
};\r
\r
-#elif defined(__ATARI__)\r
+#elif defined(__ATARI__) || defined(__ATARIXL__)\r
#endif\r
\r
/* Screen co-ordinates for the progress meter */\r
revers (revers_bar[Val]);\r
cputc (small_bar[Val]);\r
\r
-#elif defined(__ATARI__)\r
+#elif defined(__ATARI__) || defined(__ATARIXL__)\r
#endif\r
\r
revers (0);\r
" %u.%03u seconds.\n", Days, Hours, Minu, Sec, Milli);\r
#endif\r
\r
-#ifdef __ATARI__\r
- if (_dos_type != SPARTADOS && _dos_type != OSADOS) {\r
- cprintf ("\rTap a key, to exit. ");\r
- cgetc();\r
- }\r
-#endif\r
+ cprintf ("\rTap a key, to exit. ");\r
+ cgetc();\r
return 0;\r
}\r
\r
#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)
{
else
printf("OK (%d)\n", ret);
-#ifdef __ATARI__
- if (_dos_type != 1) {
- cgetc();
- }
-#endif
-
+ cgetc();
return 0;
}