]> git.sur5r.net Git - cc65/commitdiff
Moved _vic.h to _vic2.h. Renamed __vic to __vic2.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 5 Nov 2002 20:33:50 +0000 (20:33 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 5 Nov 2002 20:33:50 +0000 (20:33 +0000)
Added a new file _vic.h for the VIC (1) used in the VIC20.
Added the VIC chip to vic20.h.

git-svn-id: svn://svn.cc65.org/cc65/trunk@1492 b7a2c559-68d2-44c3-8de9-860c34a00d81

include/_vic.h
include/_vic2.h [new file with mode: 0644]
include/c128.h
include/c64.h
include/cbm510.h
include/vic20.h

index 05897140426e6decd7c4930d38a325d303d14d0f..7074aedba38d5c4e3e2a820675536b1a62840562 100644 (file)
@@ -1,12 +1,12 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                 _vic.h                                   */
+/*                                 _vic.h                                   */
 /*                                                                           */
-/*               Internal include file, do not use directly                 */
+/*               Internal include file, do not use directly                 */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/* (C) 2002      Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
 
 /* Define a structure with the vic register offsets */
 struct __vic {
-    unsigned char      spr0_x;         /* Sprite 0, X coordinate */
-    unsigned char      spr0_y;         /* Sprite 0, Y coordinate */
-    unsigned char              spr1_x;         /* Sprite 1, X coordinate */
-    unsigned char      spr1_y;         /* Sprite 1, Y coordinate */
-    unsigned char      spr2_x;         /* Sprite 2, X coordinate */
-    unsigned char      spr2_y;         /* Sprite 2, Y coordinate */
-    unsigned char      spr3_x;         /* Sprite 3, X coordinate */
-    unsigned char      spr3_y;         /* Sprite 3, Y coordinate */
-    unsigned char      spr4_x;         /* Sprite 4, X coordinate */
-    unsigned char      spr4_y;         /* Sprite 4, Y coordinate */
-    unsigned char      spr5_x;         /* Sprite 5, X coordinate */
-    unsigned char      spr5_y;         /* Sprite 5, Y coordinate */
-    unsigned char      spr6_x;         /* Sprite 6, X coordinate */
-    unsigned char      spr6_y;         /* Sprite 6, Y coordinate */
-    unsigned char      spr7_x;         /* Sprite 7, X coordinate */
-    unsigned char      spr7_y;         /* Sprite 7, Y coordinate */
-    unsigned char      spr_hi_x;       /* High bits of X coordinate */
-    unsigned char      ctrl1;          /* Control register 1 */
-    unsigned char      rasterline;     /* Current raster line */
+    unsigned char              leftborder;
+    unsigned char      upperborder;
+    unsigned char              charsperline;   /* Characters per line */
+    unsigned char      linecount;      /* Number of lines */
+    unsigned char      rasterline;     /* Current raster line */
+    unsigned char      addr;           /* Address of chargen and video ram */
     unsigned char      strobe_x;       /* Light pen, X position */
     unsigned char      strobe_y;       /* Light pen, Y position */
-    unsigned char      spr_ena;        /* Enable sprites */
-    unsigned char      ctrl2;          /* Control register 2 */
-    unsigned char      spr_exp_x;      /* Expand sprites in X dir */
-    unsigned char      addr;           /* Address of chargen and video ram */
-    unsigned char      irr;            /* Interrupt request register */
-    unsigned char      imr;            /* Interrupt mask register */
-    unsigned char      spr_bg_prio;    /* Priority to background */
-    unsigned char      spr_mcolor;     /* Sprite multicolor bits */
-    unsigned char      spr_exp_y;      /* Expand sprites in Y dir */
-    unsigned char      spr_coll;       /* Sprite/sprite collision reg */
-    unsigned char      spr_bg_coll;    /* Sprite/background collision reg */
-    unsigned char              bordercolor;    /* Border color */
-    unsigned char      bgcolor0;       /* Background color 0 */
-    unsigned char      bgcolor1;       /* Background color 1 */
-    unsigned char      bgcolor2;       /* Background color 2 */
-    unsigned char      bgcolor3;       /* Background color 3 */
-    unsigned char      spr_mcolor0;    /* Color 0 for multicolor sprites */
-    unsigned char              spr_mcolor1;    /* Color 1 for multicolor sprites */
-    unsigned char      spr0_color;     /* Color sprite 0 */
-    unsigned char              spr1_color;     /* Color sprite 1 */
-    unsigned char      spr2_color;     /* Color sprite 2 */
-    unsigned char      spr3_color;     /* Color sprite 3 */
-    unsigned char      spr4_color;     /* Color sprite 4 */
-    unsigned char      spr5_color;     /* Color sprite 5 */
-    unsigned char      spr6_color;     /* Color sprite 6 */
-    unsigned char      spr7_color;     /* Color sprite 7 */
-
-    /* The following ones are only valid in the C128: */
-    unsigned char      x_kbd;          /* Additional keyboard lines */
-    unsigned char      clock;          /* Clock switch bit */
+    unsigned char              analog_x;       /* Analog input X */
+    unsigned char      analog_y;       /* Analog input Y */
+    unsigned char      voice1;         /* Sound generator #1 */
+    unsigned char              voice2;         /* Sound generator #2 */
+    unsigned char      voice3;         /* Sound generator #3 */
+    unsigned char      noise;          /* Noise generator */
+    unsigned char              volume_color;   /* Bits 0..3: volume, 4..7: color */
+    unsigned char       bg_border_color;/* Background and border color */
 };
 
 
diff --git a/include/_vic2.h b/include/_vic2.h
new file mode 100644 (file)
index 0000000..06aa4e4
--- /dev/null
@@ -0,0 +1,102 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                                 _vic2.h                                  */
+/*                                                                           */
+/*               Internal include file, do not use directly                 */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+
+
+#ifndef __VIC2_H
+#define __VIC2_H
+
+
+
+/* Define a structure with the vic register offsets */
+struct __vic2 {
+    unsigned char      spr0_x;         /* Sprite 0, X coordinate */
+    unsigned char      spr0_y;         /* Sprite 0, Y coordinate */
+    unsigned char              spr1_x;         /* Sprite 1, X coordinate */
+    unsigned char      spr1_y;         /* Sprite 1, Y coordinate */
+    unsigned char      spr2_x;         /* Sprite 2, X coordinate */
+    unsigned char      spr2_y;         /* Sprite 2, Y coordinate */
+    unsigned char      spr3_x;         /* Sprite 3, X coordinate */
+    unsigned char      spr3_y;         /* Sprite 3, Y coordinate */
+    unsigned char      spr4_x;         /* Sprite 4, X coordinate */
+    unsigned char      spr4_y;         /* Sprite 4, Y coordinate */
+    unsigned char      spr5_x;         /* Sprite 5, X coordinate */
+    unsigned char      spr5_y;         /* Sprite 5, Y coordinate */
+    unsigned char      spr6_x;         /* Sprite 6, X coordinate */
+    unsigned char      spr6_y;         /* Sprite 6, Y coordinate */
+    unsigned char      spr7_x;         /* Sprite 7, X coordinate */
+    unsigned char      spr7_y;         /* Sprite 7, Y coordinate */
+    unsigned char      spr_hi_x;       /* High bits of X coordinate */
+    unsigned char      ctrl1;          /* Control register 1 */
+    unsigned char      rasterline;     /* Current raster line */
+    unsigned char      strobe_x;       /* Light pen, X position */
+    unsigned char      strobe_y;       /* Light pen, Y position */
+    unsigned char      spr_ena;        /* Enable sprites */
+    unsigned char      ctrl2;          /* Control register 2 */
+    unsigned char      spr_exp_x;      /* Expand sprites in X dir */
+    unsigned char      addr;           /* Address of chargen and video ram */
+    unsigned char      irr;            /* Interrupt request register */
+    unsigned char      imr;            /* Interrupt mask register */
+    unsigned char      spr_bg_prio;    /* Priority to background */
+    unsigned char      spr_mcolor;     /* Sprite multicolor bits */
+    unsigned char      spr_exp_y;      /* Expand sprites in Y dir */
+    unsigned char      spr_coll;       /* Sprite/sprite collision reg */
+    unsigned char      spr_bg_coll;    /* Sprite/background collision reg */
+    unsigned char              bordercolor;    /* Border color */
+    unsigned char      bgcolor0;       /* Background color 0 */
+    unsigned char      bgcolor1;       /* Background color 1 */
+    unsigned char      bgcolor2;       /* Background color 2 */
+    unsigned char      bgcolor3;       /* Background color 3 */
+    unsigned char      spr_mcolor0;    /* Color 0 for multicolor sprites */
+    unsigned char              spr_mcolor1;    /* Color 1 for multicolor sprites */
+    unsigned char      spr0_color;     /* Color sprite 0 */
+    unsigned char              spr1_color;     /* Color sprite 1 */
+    unsigned char      spr2_color;     /* Color sprite 2 */
+    unsigned char      spr3_color;     /* Color sprite 3 */
+    unsigned char      spr4_color;     /* Color sprite 4 */
+    unsigned char      spr5_color;     /* Color sprite 5 */
+    unsigned char      spr6_color;     /* Color sprite 6 */
+    unsigned char      spr7_color;     /* Color sprite 7 */
+
+    /* The following ones are only valid in the C128: */
+    unsigned char      x_kbd;          /* Additional keyboard lines */
+    unsigned char      clock;          /* Clock switch bit */
+};
+
+
+
+/* End of _vic2.h */
+#endif
+
+
+
index 0cb08dc788ba0852ae5a2f3c934f32384c8ab49e..85782aef377c307797f82ce521c92ce10b71426d 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2001 Ullrich von Bassewitz                                       */
+/* (C) 1998-2002 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
@@ -78,8 +78,8 @@
 
 
 /* Define hardware */
-#include <_vic.h>
-#define VIC    (*(struct __vic*)0xD000)
+#include <_vic2.h>
+#define VIC            (*(struct __vic2*)0xD000)
 
 #include <_sid.h>
 #define        SID     (*(struct __sid*)0xD400)
index 05dcde047f80dfc62e5957d7a318ddbca61c2b45..2191b742f6fc365cb153cf9dabef9bee2941f9ae 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2001 Ullrich von Bassewitz                                       */
+/* (C) 1998-2002 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
@@ -78,8 +78,8 @@
 
 
 /* Define hardware */
-#include <_vic.h>
-#define VIC    (*(struct __vic*)0xD000)
+#include <_vic2.h>
+#define VIC            (*(struct __vic2*)0xD000)
 
 #include <_sid.h>
 #define        SID     (*(struct __sid*)0xD400)
@@ -97,6 +97,6 @@
 
 /* End of c64.h */
 #endif
-
+                                
 
 
index d4785d5579b411203586ffce1370fc8db8929eb0..c429d80ecea1e442bce8c9a310ba90837eab34a9 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001      Ullrich von Bassewitz                                       */
+/* (C) 2001-2002 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
@@ -98,9 +98,9 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val);
 
 
 /* Define hardware */
-#include <_vic.h>
-#define VIC            (*(struct __vic*)0xD800)
-                                                                 
+#include <_vic2.h>
+#define VIC            (*(struct __vic2*)0xD800)
+
 #include <_sid.h>
 #define        SID     (*(struct __sid*)0xDA00)
 
index ae77dea20d8fbae0eaa74cd7938989ecab7949e1..0c4da418ecd36f390b4e7eb6076a0ef155a80798 100644 (file)
 
 
 
+/* Define hardware */
+#include <_vic.h>
+#define VIC            (*(struct __vic*)0x9000)
+
+
+
 /* Define special memory areas */
 #define COLOR_RAM      ((unsigned char*)0x9600)