]> git.sur5r.net Git - cc65/blobdiff - include/c128.h
Remove this copy of the apple include file - a copy was added to asminc
[cc65] / include / c128.h
index 1831f6e9bab29ad4ce77d2253c5f4737147182de..47fbb26b112f8281adbaa1d7c36e8510f32cfb37 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
-/*
- * c128.h
- *
- * Ullrich von Bassewitz, 12.08.1998
- */
+#ifndef _C128_H
+#define _C128_H
 
 
 
-#ifndef _C128_H
-#define _C128_H
+/* Check for errors */
+#if !defined(__C128__)
+#  error This module may only be used when compiling for the C128!
+#endif
 
 
 
@@ -56,8 +55,6 @@
 #define CH_F7                  136
 #define CH_F8                  140
 
-
-
 /* Color defines */
 #define COLOR_BLACK            0x00
 #define COLOR_WHITE            0x01
 #define COLOR_LIGHTBLUE        0x0E
 #define COLOR_GRAY3            0x0F
 
+/* Video mode defines */
+#define VIDEOMODE_40x25         0x00
+#define VIDEOMODE_80x25         0x80
+#define VIDEOMODE_40COL         VIDEOMODE_40x25
+#define VIDEOMODE_80COL         VIDEOMODE_80x25
+
 
 
 /* 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)
 
+#include <_vdc.h>
+#define VDC     (*(struct __vdc*)0xD600)
+
 #include <_6526.h>
 #define CIA1   (*(struct __6526*)0xDC00)
 #define CIA2   (*(struct __6526*)0xDD00)
 
 
 
+unsigned __fastcall__ videomode (unsigned Mode);
+/* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx
+ * constants.
+ */
+
+void toggle_videomode (void);
+/* Toggle the video mode between 40 and 80 chars (calls SWAPPER).
+ * THIS FUNCTION IS DEPRECATED, please use videomode instead!
+ */
+
+void c64mode (void);
+/* Switch the C128 into C64 mode. Note: This function will not return! */
+
+void fast (void);
+/* Switch the CPU into 2MHz mode. Note: This will disable video when in
+ * 40 column mode.
+ */
+
+void slow (void);
+/* Switch the CPU into 1MHz mode. */
+
+
+
 /* End of c128.h */
 #endif