/*
* Demo program for mouse usage. Will work for the C64/C128/Atari
- *
+ *
* Ullrich von Bassewitz, 13.09.2001
*
*/
-#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) */
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));
-#ifdef __C64__
+#if defined(__C64__) || defined(__CBM510__)
static unsigned long FreqTab [12] = {
#ifndef NTSC
/* PAL */
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,
-/* 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