]> git.sur5r.net Git - cc65/blobdiff - include/atari.h
Fixed wrong statements
[cc65] / include / atari.h
index 735433e27cac84414101da64ad704eea457c3ee9..315f883eea49e46e7d968f07812fbf0844f5c918 100644 (file)
@@ -45,7 +45,7 @@
 
 
 /* Character codes */
-#define CH_DEL                 0xFE
+#define CH_DELCHR      0xFE   /* delete char under the cursor */
 #define CH_ESC                 0x1B
 #define CH_CURS_UP     28
 #define CH_CURS_DOWN   29
@@ -56,7 +56,8 @@
 #define CH_EOL          0x9B   /* end-of-line marker */
 #define CH_CLR          0x7D   /* clear screen */
 #define CH_BEL          0xFD   /* bell */
-#define CH_RUBOUT       0x7E   /* back space (rubout) */
+#define CH_DEL          0x7E   /* back space (delete char to the left) */
+#define CH_RUBOUT       0x7E   /* back space (old, deprecated) */
 #define CH_DELLINE      0x9C   /* delete line */
 #define CH_INSLINE      0x9D   /* insert line */
 
@@ -80,7 +81,7 @@
 #define CH_BTEE        0x18
 #define CH_LTEE        0x01
 #define CH_RTEE        0x04
-#define CH_CROSS       0x19
+#define CH_CROSS       0x13
 #define CH_HLINE        0x12
 #define CH_VLINE        0x16
 
 #define HUE_GREEN       12
 #define HUE_YELLOWGREEN 13
 #define HUE_YELLOW      14
-#define HUE_YELLOWRED   15                                       
+#define HUE_YELLOWRED   15
 
 /* 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)
@@ -133,6 +136,7 @@ extern void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char co
 extern unsigned char __fastcall__ getcolor (unsigned char color_reg);
 
 /* other screen functions */
+extern int  __fastcall__ graphics(unsigned char mode); /* mode value same as in BASIC */
 extern void __fastcall__ scroll (signed char numlines);
                                           /* numlines > 0  scrolls up */
                                           /* numlines < 0  scrolls down */
@@ -142,6 +146,10 @@ extern void save_vecs(void);           /* save system vectors */
 extern void rest_vecs(void);           /* restore system vectors */
 extern unsigned char get_ostype(void); /* get ROM version */
 extern unsigned char get_tv(void);     /* get TV system */
+extern char *getdefdev(void);          /* get default floppy device */
+
+/* global variables */
+extern unsigned char _dos_type;        /* the DOS flavour */
 
 /* get_ostype return value defines (for explanation, see ostype.s) */
 /* masks */
@@ -170,6 +178,13 @@ extern unsigned char get_tv(void);     /* get TV system */
 #define AT_NTSC     0
 #define AT_PAL      1
 
+/* valid _dos_type values */
+#define ATARIDOS    0
+#define SPARTADOS   1
+#define OSADOS      2
+#define MYDOS       3     /* detection currently not implemented */
+#define NODOS       255   /* detection currently not implemented */
+
 /* Define hardware */
 #include <_gtia.h>
 #define GTIA_READ  (*(struct __gtia_read*)0xD000)
@@ -190,7 +205,7 @@ extern unsigned char get_tv(void);     /* get TV system */
 /* device control block */
 struct __dcb {
     unsigned char device;     /* device id */
-    unsigned char unit;       /* unix number */
+    unsigned char unit;       /* unit number */
     unsigned char command;    /* command */
     unsigned char status;     /* command type / status return */
     void          *buffer;    /* pointer to buffer */