From 1507eb6d678dab2345d684d7b4eaf942e6ad44aa Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 14 Sep 2001 16:39:48 +0000 Subject: [PATCH] Added CBM510 support git-svn-id: svn://svn.cc65.org/cc65/trunk@921 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/mousedemo.c | 19 +++++++++++-------- samples/nachtm.c | 14 +++++--------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/samples/mousedemo.c b/samples/mousedemo.c index 07998f85f..ce7af232e 100644 --- a/samples/mousedemo.c +++ b/samples/mousedemo.c @@ -1,6 +1,6 @@ /* * Demo program for mouse usage. Will work for the C64/C128/Atari - * + * * Ullrich von Bassewitz, 13.09.2001 * */ @@ -15,15 +15,18 @@ -#if defined(__C64__) || defined(__C128__) +#if defined(__C64__) || defined(__C128__) || defined(__CBM510__) -/* Address of data for sprite 1 */ +/* Address of data for sprite 0 */ #if defined(__C64__) -# define SPRITE0_DATA 0x340 -# define SPRITE0_PTR 0x7F8 +# define SPRITE0_DATA 0x0340 +# define SPRITE0_PTR 0x07F8 #elif defined(__C128__) -# define SPRITE0_DATA 0xE00 -# define SPRITE0_PTR 0x7F8 +# define SPRITE0_DATA 0x0E00 +# define SPRITE0_PTR 0x07F8 +#elif defined(__CBM510__) +# define SPRITE0_DATA 0xF800 +# define SPRITE0_PTR 0xF7F8 #endif /* The mouse sprite (an arrow) */ @@ -88,7 +91,7 @@ int main (void) cputsxy (0, 0, "d: debug h: hide q: quit s: show "); revers (0); -#if defined(__C64__) || defined(__C128__) +#if defined(__C64__) || defined(__C128__) || defined(__CBM510__) /* Copy the sprite data */ memcpy ((void*) SPRITE0_DATA, MouseSprite, sizeof (MouseSprite)); diff --git a/samples/nachtm.c b/samples/nachtm.c index 9663b3df6..e442418d2 100644 --- a/samples/nachtm.c +++ b/samples/nachtm.c @@ -866,7 +866,7 @@ static int Voice3 [] = { -#ifdef __C64__ +#if defined(__C64__) || defined(__CBM510__) static unsigned long FreqTab [12] = { #ifndef NTSC /* PAL */ @@ -878,16 +878,12 @@ static unsigned long FreqTab [12] = { 0x00BDAD, 0x00C8F4, 0x00D4E6, 0x00E18F, 0x00EEF9, 0x00FD2F, #endif }; -#endif - -#ifdef __C128__ +#elif defined(__C128__) static unsigned long FreqTab [12] = { 0x00892B, 0x009153, 0x0099F7, 0x00A31E, 0x00ACD2, 0x00B718, 0x00C1FD, 0x00CD85, 0x00D9BD, 0x00E6B0, 0x00F467, 0x0102F0, }; -#endif - -#ifdef __CBM610__ +#elif defined(__CBM610__) static unsigned long FreqTab [12] = { 0x004495, 0x0048AA, 0x004CFB, 0x00518F, 0x005669, 0x005B8C, 0x0060FE, 0x0066C3, 0x006CDE, 0x007358, 0x007A34, 0x008178, @@ -1045,10 +1041,10 @@ static void DisplayTime (void) -/* On the 610, the SID is in another bank (the system bank), so we cannot +/* On the 510/610, the SID is in another bank (the system bank), so we cannot * just write to the memory space. */ -#ifdef __CBM610__ +#if defined(__CBM510__) || defined(__CBM610__) # define outb(addr,val) pokebsys ((unsigned)(addr), val) # define outw(addr,val) pokewsys ((unsigned)(addr), val) #else