From 43a98024737ed6f7bd2b16e69278118bfe2455ca Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 30 Mar 2005 18:26:11 +0000 Subject: [PATCH] Predefined #defines have changed. Cosmetic changes. git-svn-id: svn://svn.cc65.org/cc65/trunk@3434 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- include/cbm510.h | 52 ++++++++++++++++++++++++++++-------------------- include/cbm610.h | 2 +- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/include/cbm510.h b/include/cbm510.h index 3755ade92..7883e9cc6 100644 --- a/include/cbm510.h +++ b/include/cbm510.h @@ -45,6 +45,12 @@ +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + /* Additional key defines */ #define CH_F1 224 #define CH_F2 225 @@ -67,8 +73,6 @@ #define CH_F19 242 #define CH_F20 243 - - /* Color defines */ #define COLOR_BLACK 0x00 #define COLOR_WHITE 0x01 @@ -88,6 +92,29 @@ #define COLOR_LIGHTBLUE 0x0E #define COLOR_GRAY3 0x0F +/* Define hardware */ +#include <_vic2.h> +#define VIC (*(struct __vic2*)0xD800) + +#include <_sid.h> +#define SID (*(struct __sid*)0xDA00) + +#include <_6526.h> +#define CIA (*(struct __cia*)0xDC00) + +#include <_6551.h> +#define ACIA (*(struct __6551*)0xDD00) + +#include <_6525.h> +#define TPI1 (*(struct __6525*)0xDE00) +#define TPI2 (*(struct __6525*)0xDF00) + + + +/*****************************************************************************/ +/* Code */ +/*****************************************************************************/ + /* Special routines to read/write bytes and words in the system bank */ @@ -96,7 +123,7 @@ unsigned __fastcall__ peekwsys (unsigned addr); void __fastcall__ pokebsys (unsigned addr, unsigned char val); void __fastcall__ pokewsys (unsigned addr, unsigned val); -#if defined(__OPT_i__) && defined(__OPT_s__) +#if defined(__OPT_i__) && (__OPT_i__ >= 600) #define peekbsys(addr) \ __AX__ = (addr), \ asm ("sta ptr1"), \ @@ -113,25 +140,6 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val); -/* Define hardware */ -#include <_vic2.h> -#define VIC (*(struct __vic2*)0xD800) - -#include <_sid.h> -#define SID (*(struct __sid*)0xDA00) - -#include <_6526.h> -#define CIA (*(struct __cia*)0xDC00) - -#include <_6551.h> -#define ACIA (*(struct __6551*)0xDD00) - -#include <_6525.h> -#define TPI1 (*(struct __6525*)0xDE00) -#define TPI2 (*(struct __6525*)0xDF00) - - - /* End of cbm510.h */ #endif diff --git a/include/cbm610.h b/include/cbm610.h index e1b4a9df8..88c5d3171 100644 --- a/include/cbm610.h +++ b/include/cbm610.h @@ -108,7 +108,7 @@ unsigned __fastcall__ peekwsys (unsigned addr); void __fastcall__ pokebsys (unsigned addr, unsigned char val); void __fastcall__ pokewsys (unsigned addr, unsigned val); -#if defined(__OPT_i__) && defined(__OPT_s__) +#if defined(__OPT_i__) && (__OPT_i__ >= 600) #define peekbsys(addr) \ __AX__ = (addr), \ asm ("sta ptr1"), \ -- 2.39.5