The apple2enh banking implies screen distortions in graphics mode. Therefore I added a simple 'bouncing box' screensaver running in text mode.
diff --git a/contiki-apple2/Makefile.apple2 b/contiki-apple2/Makefile.apple2
index f246225..293f4d2 100644
--- a/contiki-apple2/Makefile.apple2
+++ b/contiki-apple2/Makefile.apple2
@@ -30,13 +30,11 @@
#
# This file is part of the Contiki desktop environment
#
-# $Id: Makefile.apple2,v 1.19 2006/05/17 15:55:29 oliverschmidt Exp $
+# $Id: Makefile.apple2,v 1.20 2006/05/30 20:51:01 oliverschmidt Exp $
#
all: contiki
-SYS=apple2enh
-
include $(CONTIKI)/Makefile.common
include $(CONTIKICC65)/Makefile.cc65
diff --git a/contiki-apple2/Makefile.programs b/contiki-apple2/Makefile.programs
index 39e980b..b3df70e 100644
--- a/contiki-apple2/Makefile.programs
+++ b/contiki-apple2/Makefile.programs
@@ -27,7 +27,7 @@
#
# This file is part of the Contiki desktop environment
#
-# $Id: Makefile.programs,v 1.19 2006/05/28 23:22:29 oliverschmidt Exp $
+# $Id: Makefile.programs,v 1.20 2006/05/30 20:51:01 oliverschmidt Exp $
#
all: loader-arch-module.o loader-arch-module-dsc.o contiki-labels.o \
@@ -44,7 +44,6 @@
processes.prg processes.dsc \
shell.prg shell.dsc \
telnet.prg telnet.dsc \
- webserver.prg webserver.dsc \
welcome.prg \
wget.prg wget.dsc \
www.prg www.dsc \
@@ -53,7 +52,12 @@
plasma.sav plasma.dsc \
ssfire.sav ssfire.dsc
-SYS=apple2enh
+ifeq ($(SYS),apple2enh)
+
+all: webserver.prg webserver.dsc \
+ bounce.sav bounce.dsc
+
+endif # apple2enh
include $(CONTIKI)/Makefile.common
include $(CONTIKICC65)/Makefile.cc65
diff --git a/contiki-apple2/apps/bounce-dsc.c b/contiki-apple2/apps/bounce-dsc.c
new file mode 100644
index 0000000..abc2251
--- /dev/null
+++ b/contiki-apple2/apps/bounce-dsc.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2003, Adam Dunkels.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This file is part of the Contiki desktop environment
+ *
+ * $Id: bounce-dsc.c,v 1.1 2006/05/30 20:50:26 oliverschmidt Exp $
+ *
+ */
+
+#include "dsc.h"
+
+extern struct ctk_icon bounce_icon;
+/*-----------------------------------------------------------------------------------*/
+DSC(ssfire_dsc,
+ "Screensaver with a bouncing box",
+ "bounce.sav",
+ bounce_init,
+ &bounce_icon);
+/*-----------------------------------------------------------------------------------*/
+#if CTK_CONF_ICON_BITMAPS
+static unsigned char bounceicon_bitmap[3*3*8] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+#endif /* CTK_CONF_ICON_BITMAPS */
+
+#if CTK_CONF_ICON_TEXTMAPS
+static char bounceicon_textmap[9] = {
+ '-', '|', '-',
+ '|', '|', '|',
+ '|', '-', '|'
+};
+#endif /* CTK_CONF_ICON_TEXTMAPS */
+
+#if CTK_CONF_ICONS
+static struct ctk_icon bounce_icon =
+ {CTK_ICON("Bounce", bounceicon_bitmap, bounceicon_textmap)};
+#endif /* CTK_CONF_ICONS */
+/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-apple2/apps/bounce.c b/contiki-apple2/apps/bounce.c
new file mode 100644
index 0000000..b56d1d1
--- /dev/null
+++ b/contiki-apple2/apps/bounce.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2002-2004, Adam Dunkels.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This file is part of the Contiki desktop environment
+ *
+ * $Id: bounce.c,v 1.1 2006/05/30 20:50:26 oliverschmidt Exp $
+ *
+ */
+
+#include "ctk.h"
+#include "ctk-draw.h"
+#include "ctk-mouse.h"
+#include "ek.h"
+#include "loader.h"
+
+EK_EVENTHANDLER(bounce_eventhandler, ev, data);
+EK_POLLHANDLER(bounce_pollhandler);
+EK_PROCESS(p, "Bounce screensaver", EK_PRIO_LOWEST,
+ bounce_eventhandler, bounce_pollhandler, NULL);
+static ek_id_t id = EK_ID_NONE;
+
+static char pos[4] = {3, 17, 7, 13};
+static char vec[4] = {-1, 1, -1, 1};
+static char max[4];
+static char rev[2];
+
+/*-----------------------------------------------------------------------------------*/
+LOADER_INIT_FUNC(ssfire_init, arg)
+{
+ arg_free(arg);
+ if(id == EK_ID_NONE) {
+ id = ek_start(&p);
+ }
+}
+/*-----------------------------------------------------------------------------------*/
+EK_EVENTHANDLER(bounce_eventhandler, ev, data)
+{
+ EK_EVENTHANDLER_ARGS(ev, data);
+
+ if(ev == EK_EVENT_INIT) {
+ ctk_mode_set(CTK_MODE_SCREENSAVER);
+ ctk_mouse_hide();
+ max[0] = max[1] = ctk_draw_width();
+ max[2] = max[3] = ctk_draw_height();
+ } else if(ev == ctk_signal_screensaver_stop ||
+ ev == EK_EVENT_REQUEST_EXIT) {
+ ctk_draw_init();
+ ctk_desktop_redraw(NULL);
+ ek_exit();
+ id = EK_ID_NONE;
+ LOADER_UNLOAD();
+ }
+}
+/*-----------------------------------------------------------------------------------*/
+EK_POLLHANDLER(bounce_pollhandler)
+{
+ static unsigned char i;
+
+ if(ctk_mode_get() == CTK_MODE_SCREENSAVER) {
+ for(i = 0; i < 4; ++i) {
+ pos[i] += vec[i];
+ if(pos[i] <= 0 || pos[i] >= max[i]) {
+ vec[i] = -vec[i];
+ }
+ }
+ if(pos[0] == pos[1] || pos[2] == pos[3]) {
+ return;
+ }
+ for(i = 0; i < 2; ++i) {
+ rev[i] = pos[i * 2] > pos[i * 2 + 1];
+ }
+ _textframexy(pos[0 + rev[0]],
+ pos[2 + rev[1]],
+ pos[1 - rev[0]] - pos[0 + rev[0]],
+ pos[3 - rev[1]] - pos[2 + rev[1]], _TEXTFRAME_TALL);
+ }
+}
+/*-----------------------------------------------------------------------------------*/