]> git.sur5r.net Git - cc65/blobdiff - include/atari.h
Clarify help for -o option
[cc65] / include / atari.h
index 65defb0780bde3ffc0be12682dda5bb2c13fc298..82cd07330a0a3be7bf410b0896f0882e57921ea5 100644 (file)
@@ -1,14 +1,14 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                atari.h                                   */
+/*                                 atari.h                                   */
 /*                                                                           */
-/*                     Atari system specific definitions                    */
+/*                      Atari system specific definitions                    */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2005 Mark Keates <markk@dendrite.co.uk>                          */
+/* (C) 2000-2006 Mark Keates <markk@dendrite.co.uk>                          */
 /*               Freddy Offenga <taf_offenga@yahoo.com>                      */
-/*               Christian Groessler <cpg@aladdin.de>                        */
+/*               Christian Groessler <chris@groessler.org>                   */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 /* Character codes */
-#define CH_DELCHR      0xFE   /* delete char under the cursor */
-#define CH_ESC                 0x1B
-#define CH_CURS_UP     28
-#define CH_CURS_DOWN   29
+#define CH_DELCHR       0xFE   /* delete char under the cursor */
+#define CH_ENTER        0x9B
+#define CH_ESC          0x1B
+#define CH_CURS_UP      28
+#define CH_CURS_DOWN    29
 #define CH_CURS_LEFT    30
 #define CH_CURS_RIGHT   31
 
 #define CH_INSLINE      0x9D   /* insert line */
 
 /* These are defined to be Atari + NumberKey */
-#define CH_F1          177
-#define CH_F2          178
-#define CH_F3          179
-#define CH_F4          180
-#define CH_F5          181
-#define CH_F6          182
-#define CH_F7          183
-#define CH_F8          184
-#define CH_F9          185
-#define CH_F10                 176
-
-#define CH_ULCORNER    0x11
-#define CH_URCORNER    0x05
-#define CH_LLCORNER    0x1A
-#define CH_LRCORNER    0x03
-#define CH_TTEE        0x17
-#define CH_BTEE        0x18
-#define CH_LTEE        0x01
-#define CH_RTEE        0x04
-#define CH_CROSS       0x13
+#define CH_F1           177
+#define CH_F2           178
+#define CH_F3           179
+#define CH_F4           180
+#define CH_F5           181
+#define CH_F6           182
+#define CH_F7           183
+#define CH_F8           184
+#define CH_F9           185
+#define CH_F10          176
+
+#define CH_ULCORNER     0x11
+#define CH_URCORNER     0x05
+#define CH_LLCORNER     0x1A
+#define CH_LRCORNER     0x03
+#define CH_TTEE         0x17
+#define CH_BTEE         0x18
+#define CH_LTEE         0x01
+#define CH_RTEE         0x04
+#define CH_CROSS        0x13
 #define CH_HLINE        0x12
 #define CH_VLINE        0x7C
 
 /* Color defines, similar to c64 colors (untested) */
 /* Note that the conio color implementation is monochrome (bgcolor and textcolor are only placeholders) */
 /* Use the defines with the setcolor() or _atari_xxxcolor() functions */
-#define COLOR_BLACK            _gtia_mkcolor(HUE_GREY,0)
-#define COLOR_WHITE            _gtia_mkcolor(HUE_GREY,7)
-#define COLOR_RED              _gtia_mkcolor(HUE_REDORANGE,1)
-#define COLOR_CYAN             _gtia_mkcolor(HUE_CYAN,3)
-#define COLOR_VIOLET           _gtia_mkcolor(HUE_PURPLE,4)
-#define COLOR_GREEN            _gtia_mkcolor(HUE_GREEN,2)
-#define COLOR_BLUE             _gtia_mkcolor(HUE_BLUE,2)
-#define COLOR_YELLOW           _gtia_mkcolor(HUE_YELLOW,7)
-#define COLOR_ORANGE           _gtia_mkcolor(HUE_ORANGE,5)
-#define COLOR_BROWN            _gtia_mkcolor(HUE_YELLOW,2)
-#define COLOR_LIGHTRED         _gtia_mkcolor(HUE_REDORANGE,6)
-#define COLOR_GRAY1            _gtia_mkcolor(HUE_GREY,2)
-#define COLOR_GRAY2            _gtia_mkcolor(HUE_GREY,3)
-#define COLOR_LIGHTGREEN       _gtia_mkcolor(HUE_GREEN,6)
-#define COLOR_LIGHTBLUE        _gtia_mkcolor(HUE_BLUE,6)
-#define COLOR_GRAY3            _gtia_mkcolor(HUE_GREY,5)
+#define COLOR_BLACK             _gtia_mkcolor(HUE_GREY,0)
+#define COLOR_WHITE             _gtia_mkcolor(HUE_GREY,7)
+#define COLOR_RED               _gtia_mkcolor(HUE_REDORANGE,1)
+#define COLOR_CYAN              _gtia_mkcolor(HUE_CYAN,3)
+#define COLOR_VIOLET            _gtia_mkcolor(HUE_PURPLE,4)
+#define COLOR_GREEN             _gtia_mkcolor(HUE_GREEN,2)
+#define COLOR_BLUE              _gtia_mkcolor(HUE_BLUE,2)
+#define COLOR_YELLOW            _gtia_mkcolor(HUE_YELLOW,7)
+#define COLOR_ORANGE            _gtia_mkcolor(HUE_ORANGE,5)
+#define COLOR_BROWN             _gtia_mkcolor(HUE_YELLOW,2)
+#define COLOR_LIGHTRED          _gtia_mkcolor(HUE_REDORANGE,6)
+#define COLOR_GRAY1             _gtia_mkcolor(HUE_GREY,2)
+#define COLOR_GRAY2             _gtia_mkcolor(HUE_GREY,3)
+#define COLOR_LIGHTGREEN        _gtia_mkcolor(HUE_GREEN,6)
+#define COLOR_LIGHTBLUE         _gtia_mkcolor(HUE_BLUE,6)
+#define COLOR_GRAY3             _gtia_mkcolor(HUE_GREY,5)
+
+/* TGI color defines */
+#define TGI_COLOR_BLACK         COLOR_BLACK
+#define TGI_COLOR_WHITE         COLOR_WHITE
+#define TGI_COLOR_RED           COLOR_RED
+#define TGI_COLOR_CYAN          COLOR_CYAN
+#define TGI_COLOR_VIOLET        COLOR_VIOLET
+#define TGI_COLOR_GREEN         COLOR_GREEN
+#define TGI_COLOR_BLUE          COLOR_BLUE
+#define TGI_COLOR_YELLOW        COLOR_YELLOW
+#define TGI_COLOR_ORANGE        COLOR_ORANGE
+#define TGI_COLOR_BROWN         COLOR_BROWN
+#define TGI_COLOR_LIGHTRED      COLOR_LIGHTRED
+#define TGI_COLOR_GRAY1         COLOR_GRAY1
+#define TGI_COLOR_GRAY2         COLOR_GRAY2
+#define TGI_COLOR_LIGHTGREEN    COLOR_LIGHTGREEN
+#define TGI_COLOR_LIGHTBLUE     COLOR_LIGHTBLUE
+#define TGI_COLOR_GRAY3         COLOR_GRAY3
 
 /* color register functions */
 extern void __fastcall__ _setcolor     (unsigned char color_reg, unsigned char hue, unsigned char luminace);
@@ -149,7 +168,58 @@ extern void _rest_vecs(void);           /* restore system vectors */
 extern char *_getdefdev(void);          /* get default floppy device */
 
 /* global variables */
-extern unsigned char _dos_type;        /* the DOS flavour */
+extern unsigned char _dos_type;         /* the DOS flavour */
+#ifndef __ATARIXL__
+extern void atr130_emd[];
+extern void atrstd_joy[];               /* referred to by joy_static_stddrv[] */
+extern void atrmj8_joy[];
+extern void atrjoy_mou[];
+extern void atrst_mou[];                /* referred to by mouse_static_stddrv[] */
+extern void atrami_mou[];
+extern void atrtrk_mou[];
+extern void atrtt_mou[];
+extern void atrrdev_ser[];
+extern void atr3_tgi[];
+extern void atr4_tgi[];
+extern void atr5_tgi[];
+extern void atr6_tgi[];
+extern void atr7_tgi[];
+extern void atr8_tgi[];                 /* referred to by tgi_static_stddrv[] */
+extern void atr8p2_tgi[];
+extern void atr9_tgi[];
+extern void atr9p2_tgi[];
+extern void atr10_tgi[];
+extern void atr10p2_tgi[];
+extern void atr11_tgi[];
+extern void atr14_tgi[];
+extern void atr15_tgi[];
+extern void atr15p2_tgi[];
+#else
+extern void atrx130_emd[];
+extern void atrxstd_joy[];              /* referred to by joy_static_stddrv[] */
+extern void atrxmj8_joy[];
+extern void atrxjoy_mou[];
+extern void atrxst_mou[];               /* referred to by mouse_static_stddrv[] */
+extern void atrxami_mou[];
+extern void atrxtrk_mou[];
+extern void atrxtt_mou[];
+extern void atrxrdev_ser[];
+extern void atrx3_tgi[];
+extern void atrx4_tgi[];
+extern void atrx5_tgi[];
+extern void atrx6_tgi[];
+extern void atrx7_tgi[];
+extern void atrx8_tgi[];                /* referred to by tgi_static_stddrv[] */
+extern void atrx8p2_tgi[];
+extern void atrx9_tgi[];
+extern void atrx9p2_tgi[];
+extern void atrx10_tgi[];
+extern void atrx10p2_tgi[];
+extern void atrx11_tgi[];
+extern void atrx14_tgi[];
+extern void atrx15_tgi[];
+extern void atrx15p2_tgi[];
+#endif
 
 /* provide old names for backwards compatibility */
 #ifdef ATARI_COMPAT_PRE_2_11
@@ -194,8 +264,9 @@ extern unsigned char _dos_type;        /* the DOS flavour */
 #define ATARIDOS    0
 #define SPARTADOS   1
 #define OSADOS      2
-#define MYDOS       3     /* detection currently not implemented */
-#define NODOS       255   /* detection currently not implemented */
+#define MYDOS       3
+#define XDOS        4
+#define NODOS       255
 
 /* Define hardware */
 #include <_gtia.h>
@@ -248,5 +319,30 @@ struct __iocb {
 #define ZIOCB (*(struct __iocb *)0x20)  /* zero page IOCB */
 #define IOCB (*(struct __iocb *)0x340)  /* system IOCB buffers */
 
+/* IOCB Command Codes */
+#define IOCB_OPEN        0x03  /* open */
+#define IOCB_GETREC      0x05  /* get record */
+#define IOCB_GETCHR      0x07  /* get character(s) */
+#define IOCB_PUTREC      0x09  /* put record */
+#define IOCB_PUTCHR      0x0B  /* put character(s) */
+#define IOCB_CLOSE       0x0C  /* close */
+#define IOCB_STATIS      0x0D  /* status */
+#define IOCB_SPECIL      0x0E  /* special */
+#define IOCB_DRAWLN      0x11  /* draw line */
+#define IOCB_FILLIN      0x12  /* draw line with right fill */
+#define IOCB_RENAME      0x20  /* rename disk file */
+#define IOCB_DELETE      0x21  /* delete disk file */
+#define IOCB_LOCKFL      0x23  /* lock file (set to read-only) */
+#define IOCB_UNLOCK      0x24  /* unlock file */
+#define IOCB_POINT       0x25  /* point sector */
+#define IOCB_NOTE        0x26  /* note sector */
+#define IOCB_GETFL       0x27  /* get file length */
+#define IOCB_CHDIR_MYDOS 0x29  /* change directory (MyDOS) */
+#define IOCB_MKDIR       0x2A  /* make directory (MyDOS/SpartaDOS) */
+#define IOCB_RMDIR       0x2B  /* remove directory (SpartaDOS) */
+#define IOCB_CHDIR_SPDOS 0x2C  /* change directory (SpartaDOS) */
+#define IOCB_GETCWD      0x30  /* get current directory (MyDOS/SpartaDOS) */
+#define IOCB_FORMAT      0xFE  /* format */
+
 /* End of atari.h */
 #endif /* #ifndef _ATARI_H */