]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #27 from greg-king5/cbm2
authorOliver Schmidt <ol.sc@web.de>
Fri, 23 Aug 2013 11:28:49 +0000 (04:28 -0700)
committerOliver Schmidt <ol.sc@web.de>
Fri, 23 Aug 2013 11:28:49 +0000 (04:28 -0700)
Added a joystick-mouse driver to the CBM510 library.

cfg/geos-apple.cfg
cfg/geos-cbm.cfg
include/apple2.h
include/atari.h
libsrc/apple2/open.s

index 1900c486652842dcf10cefd7e9349c249541b009..746e1f2bf3be2135b0c7ba82957cddd4037095dd 100644 (file)
@@ -32,7 +32,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE:  type = zp,  load = ZP;
-    EXTZP:     type = zp,  load = ZP;
+    EXTZP:     type = zp,  load = ZP,                 optional   = yes;
     EXTBSS:    type = bss, load = EXT,                define     = yes,  optional = yes;
     FILEINFO:  type = ro,                 load = CVT, offset     = $002;
     RECORDS:   type = ro,                 load = CVT, offset     = $100, optional = yes;
index f2aea55a2da171005b91e90d225bbff31ae6e700..ddef00a99f3b66b68ef9008bfcd813257603f382 100644 (file)
@@ -31,7 +31,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE:  type = zp,  load = ZP;
-    EXTZP:     type = zp,  load = ZP;
+    EXTZP:     type = zp,  load = ZP,                 optional   = yes;
     DIRENTRY:  type = ro,                 load = CVT, align      = $FE;
     FILEINFO:  type = ro,                 load = CVT, align      = $FE;
     RECORDS:   type = ro,                 load = CVT, align      = $FE, optional = yes;
index 190248b0d2571bfe9f62e971b3da6c70b3225f7a..310e697b1809341137d29bfa5f82b2713c0d660c 100644 (file)
@@ -136,10 +136,22 @@ extern unsigned char _dos_type;
 
 
 /* The file stream implementation and the POSIX I/O functions will use the
- * following variables to determine the file type and the aux type to use.
+ * following variables to determine the file type, aux type and creation time
+ * stamp to use.
  */
-extern unsigned char _filetype;  /* Default 6 */
-extern unsigned int  _auxtype;   /* Default 0 */
+extern unsigned char _filetype;  /* Default: 6 */
+extern unsigned int _auxtype;    /* Default: 0 */
+extern struct {
+    struct {
+        unsigned day  :5;
+        unsigned mon  :4;
+        unsigned year :7;
+    }             createdate;    /* Current date: 0 */ 
+    struct {
+        unsigned char min;
+        unsigned char hour;
+    }             createtime;    /* Current time: 0 */ 
+} _datetime;
 
 /* The addresses of the static drivers */
 #if !defined(__APPLE2ENH__)
index e47d1ccea82fca79ddad8541999c46ab9eb9b9b2..61de88beb4d00d57967df0fad086ed02cb6a99f2 100644 (file)
 #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);
 extern void __fastcall__ _setcolor_low (unsigned char color_reg, unsigned char color_value);
index db40c3c743a4f622a944a02903ef8b16eb4dea8f..b1686df7067b6656397aad4ae9a0c44e376529f1 100644 (file)
@@ -5,7 +5,7 @@
 ;
 
         .export         _open, closedirect, freebuffer
-        .export         __filetype, __auxtype
+        .export         __filetype, __auxtype, __datetime
         .constructor    raisefilelevel
         .destructor     closeallfiles, 5
 
@@ -246,5 +246,6 @@ __filetype:
 __auxtype:
         .word   $0000           ; AUX_TYPE:     Load address N/A
         .byte   $01             ; STORAGE_TYPE: Standard seedling file
+__datetime:
         .word   $0000           ; CREATE_DATE:  Current date
         .word   $0000           ; CREATE_TIME:  Current time