Remove duplicate CPC sources.
diff --git a/contiki-cpc/arch/contiki.lnk b/contiki-cpc/arch/contiki.lnk
new file mode 100644
index 0000000..902e616
--- /dev/null
+++ b/contiki-cpc/arch/contiki.lnk
@@ -0,0 +1,28 @@
+-im contiki
+-k /usr/local/share/sdcc/lib/z80
+-b _CODE=0x0100
+-l z80
+./arch/crt0.o
+./arch/key.o
+./arch/mem.o
+./arch/malloc.o
+./arch/clock.o
+./loader/loader-arch-cpc.o
+./loader/rel.o
+./loader/cfs-cpc.o
+../contiki/lib/cfs.o
+./loader/dir.o
+../contiki/apps/program-handler.o
+../contiki/ctk/ctk.o
+../contiki/ctk/ctk-draw.o
+../contiki/ek/ek-service.o
+../contiki/ek/ek.o
+../contiki/ek/arg.o
+../contiki/lib/list.o
+../contiki/lib/timer.o
+./apps/directory-dsc.o
+./apps/configedit-dsc.o
+../contiki/apps/processes-dsc.o
+./arch/main.o
+./arch/arch.o
+-e
diff --git a/contiki-cpc/contiki-cpc/Makefile b/contiki-cpc/contiki-cpc/Makefile
deleted file mode 100644
index 7834d44..0000000
--- a/contiki-cpc/contiki-cpc/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (c) 2002, 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. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Adam Dunkels.
-# 4. 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: Makefile,v 1.1 2006/04/17 15:11:35 kthacker Exp $
-#
-
-CONTIKI=../contiki
-
-usage:
-	@echo "Make sure the Contiki sources is in the directory $(CONTIKI)"
-	@echo 'To compile Contiki, use "'$(MAKE)' target" where target'
-	@echo 'is one of the following:'
-	@echo all
-	@echo cpc
-	@echo cpcnet
-	@echo programs
-	@echo netprogs
-	@echo '(Also check the Makefile for more targets to try...)'
-
-all: clean cpc cpcnet programs 
-
-programs:
-	$(MAKE) CONTIKI=$(CONTIKI) -f Makefile.programs
-
-netprogs:
-	$(MAKE) CONTIKI=$(CONTIKI) -f Makefile.netprogs
-
-cpc:
-	$(MAKE) CONTIKI=$(CONTIKI) -f Makefile.cpc
-
-cpcnet:
-	$(MAKE) CONTIKI=$(CONTIKI) -f Makefile.cpc-net
-
-include Makefile.common
-
diff --git a/contiki-cpc/contiki-cpc/Makefile.common b/contiki-cpc/contiki-cpc/Makefile.common
deleted file mode 100644
index 0c3c9e9..0000000
--- a/contiki-cpc/contiki-cpc/Makefile.common
+++ /dev/null
@@ -1,162 +0,0 @@
-CC=sdcc
-AS=as-z80
-CL=link-z80
-LD=link-z80
-
-CFLAGSCOMMON= \
-	-I apps \
-	-I conf \
-	-I ctk \
-	-I lib \
-	-I loader \
-	-I uip \
-	-I arch \
-	-I $(CONTIKI)/apps \
-	-I $(CONTIKI)/ctk \
-	-I $(CONTIKI)/ek \
-	-I $(CONTIKI)/lib \
-	-I $(CONTIKI)/ppp \
-	-I $(CONTIKI)/uip \
-	-mz80 -D__fastcall__=/**/ -D__CPC__ -DCLK_TCK=16384 \
-	--no-std-crt0 --opt-code-size --peep-file ~/peeph/peep.def
-
-CLFLAGS= 
-OPT=
-AFLAGS = -o -g
-
-%.o: %.c
-	$(CC) $(CFLAGS) $(OPT) -o $*.o $<
-
-%.o: %.s
-	$(AS) $(AFLAGS) $*.o $<
-
-UIP=	../contiki/uip/uip.o \
-	uip/uip_arch.o \
-	../contiki/uip/resolv.o \
-	../contiki/uip/tcpip.o \
-	../contiki/uip/uiplib.o 
-
-
-#	../contiki/uip/uip-signal.o
-#	../contiki/uip/uip_main.o \
-
-
-WWW=	../contiki/apps/www.o \
-	../contiki/apps/webclient.o \
-	../contiki/apps/http-strings.o \
-	../contiki/apps/http-user-agent-string.o \
-	../contiki/apps/htmlparser.o \
-	../contiki/apps/html-strings.o 
-
-EMAIL= ../contiki/apps/email.o \
-	../contiki/apps/smtp-socket.o \
-	../contiki/apps/smtp-strings.o \
-	../contiki/ctk-textedit.o \
-	../contiki/uip/socket.o \
-	./lib/lc-asm.o \
-	../lib/memb.o 
-
-WEBSERVER= ../contiki/apps/webserver.o ../contiki/apps/httpd.o \
-	../contiki/apps/http-strings.o \
-	../contiki/apps/httpd-fs.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/uipbuf.o \
-	../contiki/apps/httpd-cgi.o \
-	../contiki/lib/memb.o \
-	./lib/lc-asm.o 
-
-TELNET= ../contiki/apps/simpletelnet.o ../contiki/apps/telnet.o 
-
-WGET= apps/wget.o ../contiki/apps/webclient.o \
-	../contiki/apps/http-strings.o \
-	../contiki/apps/http-user-agent-string.o 
-
-clean: 
-	rm -f ../arch/*.o
-	rm -f ../loader/*.o
-	rm -f ../contiki/ctk/*.o 
-	rm -f ../contiki/ctk/*.asm
-	rm -f ../contiki/ctk/*.lst
-	rm -f ../contiki/ctk/*.map
-	rm -f ../contiki/ctk/*.sym
-	rm -f ../contiki/ctk/*.rst
-	rm -f ../contiki/ek/*.o 
-	rm -f ../contiki/ek/*.asm 
-	rm -f ../contiki/ek/*.lst
-	rm -f ../contiki/ek/*.map
-	rm -f ../contiki/ek/*.sym
-	rm -f ../contiki/ek/*.rst
-	rm -f ../contiki/lib/*.o 
-	rm -f ../contiki/lib/*.asm 
-	rm -f ../contiki/lib/*.lst
-	rm -f ../contiki/lib/*.map
-	rm -f ../contiki/lib/*.sym
-	rm -f ../contiki/lib/*.rst
-	rm -f ../contiki/apps/*.o 
-	rm -f ../contiki/apps/*.ihx
-	rm -f ../contiki/apps/*.lnk 
-	rm -f ../contiki/apps/*.asm 
-	rm -f ../contiki/apps/*.lst
-	rm -f ../contiki/apps/*.sym
-	rm -f ../contiki/apps/*.prg
-	rm -f ../contiki/apps/*.dsc
-	rm -f ../contiki/apps/*.ams
-	rm -f ../contiki/apps/*.bin
-	rm -f ../contiki/apps/*.map
-	rm -f ../contiki/apps/*.rst
-	rm -f ../contiki/uip/*.o 
-	rm -f ../contiki/uip/*.ihx
-	rm -f ../contiki/uip/*.lnk 
-	rm -f ../contiki/uip/*.asm 
-	rm -f ../contiki/uip/*.lst
-	rm -f ../contiki/uip/*.sym
-	rm -f ../contiki/uip/*.prg
-	rm -f ../contiki/uip/*.dsc
-	rm -f ../contiki/uip/*.ams
-	rm -f ../contiki/uip/*.bin
-	rm -f ./apps/*.o 
-	rm -f ./apps/*.ihx
-	rm -f ./apps/*.lnk 
-	rm -f ./apps/*.asm 
-	rm -f ./apps/*.lst
-	rm -f ./apps/*.sym
-	rm -f ./apps/*.prg
-	rm -f ./apps/*.dsc
-	rm -f ./apps/*.ams
-	rm -f ./apps/*.bin
-	rm -f ./apps/*.map
-	rm -f ./apps/*.rst
-	rm -f ./ctk/*.o 
-	rm -f ./ctk/*.ihx
-	rm -f ./ctk/*.lnk 
-	rm -f ./ctk/*.asm 
-	rm -f ./ctk/*.lst
-	rm -f ./ctk/*.sym
-	rm -f ./ctk/*.prg
-	rm -f ./ctk/*.dsc
-	rm -f ./ctk/*.ams
-	rm -f ./ctk/*.bin
-	rm -f ./ctk/*.map
-	rm -f ./ctk/*.rst
-	rm -f lib/*.o 
-	rm -f lib/*.asm 
-	rm -f lib/*.lst
-	rm -f lib/*.map
-	rm -f lib/*.sym
-	rm -f loader/*.o 
-	rm -f loader/*.asm 
-	rm -f loader/*.lst
-	rm -f loader/*.map
-	rm -f loader/*.sym
-	rm -f uip/*.o 
-	rm -f uip/*.asm 
-	rm -f uip/*.lst
-	rm -f uip/*.map
-	rm -f uip/*.sym
-	rm -f arch/*.o 
-	rm -f arch/*.asm 
-	rm -f arch/*.lst
-	rm -f arch/*.map
-	rm -f arch/*.sym
-
-
diff --git a/contiki-cpc/contiki-cpc/Makefile.cpc b/contiki-cpc/contiki-cpc/Makefile.cpc
deleted file mode 100644
index 3f8a4d7..0000000
--- a/contiki-cpc/contiki-cpc/Makefile.cpc
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright (c) 2002, 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. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Adam Dunkels.
-# 4. 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: Makefile.cpc,v 1.1 2006/04/17 15:11:35 kthacker Exp $
-#
-
-all: contiki
-
-include Makefile.common
-
-CFLAGS:=$(CFLAGSCOMMON) --compile-only \
-        -DWITH_ASCII \
-	-DCTK_CONIO \
-	-DWITH_LOADER_ARCH \
-	-DWITH_LOADER_ARCH=1
-
-UIP_OBJ = ../contiki/uip/dhcpc.o \
-	../contiki/uip/resolv.o \
-	../contiki/uip/slipdev.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/tcpdump.o \
-	../contiki/uip/tcpip.o \
-	../contiki/uip/uip-fw.o \
-	../contiki/uip/uip-fw-service.o \
-	../contiki/uip/uip-split.o \
-	../contiki/uip/uip.o \
-	../contiki/uip/uip_arp.o \
-	../contiki/uip/uiplib.o \
-	./uip/uip_arch.o \
-	./lib/lc-asm.o
-
-
-CONTIKI_OBJ= ./arch/crt0.o \
-	./loader/rel.o \
-	./arch/key.o \
-	./arch/mem.o \
-	./arch/malloc.o \
-	./arch/clock.o \
-	./loader/dir.o \
-	./loader/loader-arch-cpc.o \
-	./arch/putchar.o \
-	./arch/uip.o \
-	./arch/conio.o \
-	./apps/configedit.o \
-	./apps/configedit-dsc.o \
-	../contiki/apps/directory.o \
-	./apps/directory-dsc.o \
-	../contiki/apps/processes.o \
-	../contiki/apps/processes-dsc.o \
-	../contiki/apps/program-handler.o \
-	../contiki/ctk/ctk.o \
-	../contiki/ctk/ctk-conio-service.o \
-	../contiki/ctk/ctk-draw.o \
-	../contiki/ctk/ctk-term-in.o \
-	../contiki/ctk/ctk-term-out.o \
-	../contiki/ctk/ctk-term.o \
-	../contiki/ctk/ctk-termtelnet.o \
-	../contiki/ctk/ctk-vncfont.o \
-	../contiki/ctk/vnc-server.o \
-	../contiki/ek/ek-service.o \
-	../contiki/ek/ek.o \
-	../contiki/ek/arg.o \
-	../contiki/ek/mt.o \
-	../contiki/lib/cfs.o \
-	../contiki/lib/ctk-filedialog.o \
-	../contiki/lib/ctk-textedit.o \
-	../contiki/lib/list.o \
-	../contiki/lib/memb.o \
-	../contiki/lib/timer.o \
-	../contiki/lib/strncasecmp.o \
-	./loader/cfs-cpc.o \
-	./arch/main.o \
-	./arch/arch.o \
-	$(UIP)
-
-
-contiki: $(CONTIKI_OBJ)
-	$(LD) -f arch/contiki.lnk
-	./bin/make_labels -a _CODE -a _DATA -x _main -x __clock -x _exit contiki.map arch/contiki_labels.s
-	./bin/makebin -p -b 256 -s 65535 < contiki.ihx > temp/contiki.bin
-	./bin/addhead -s 256 -t "binary" -x 256 temp/contiki.bin temp/contiki_ams.bin
-	./bin/cpcxfs contiki.dsk -f -b -p temp/contiki_ams.bin contiki.bin
-
diff --git a/contiki-cpc/contiki-cpc/Makefile.cpc-net b/contiki-cpc/contiki-cpc/Makefile.cpc-net
deleted file mode 100644
index f76aee2..0000000
--- a/contiki-cpc/contiki-cpc/Makefile.cpc-net
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright (c) 2002, 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. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Adam Dunkels.
-# 4. 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: Makefile.cpc-net,v 1.1 2006/04/17 15:11:35 kthacker Exp $
-#
-
-all: contikin
-
-include Makefile.common
-
-CFLAGS:=$(CFLAGSCOMMON) --compile-only \
-        -DWITH_ASCII \
-	-DCTK_CONIO \
-	-DWITH_LOADER_ARCH \
-	-DWITH_LOADER_ARCH=1
-
-UIP_OBJ = ../contiki/uip/dhcpc.o \
-	../contiki/uip/resolv.o \
-	../contiki/uip/slipdev.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/tcpdump.o \
-	../contiki/uip/tcpip.o \
-	../contiki/uip/uip-fw.o \
-	../contiki/uip/uip-fw-service.o \
-	../contiki/uip/uip-split.o \
-	../contiki/uip/uip.o \
-	../contiki/uip/uip_arp.o \
-	../contiki/uip/uiplib.o \
-	./uip/uip_arch.o \
-	./lib/lc-asm.o
-
-
-CONTIKI_OBJ= ./arch/crt0.o \
-	./loader/rel.o \
-	./arch/key.o \
-	./arch/mem.o \
-	./arch/malloc.o \
-	./arch/clock.o \
-	./loader/dir.o \
-	./loader/loader-arch-cpc.o \
-	./arch/putchar.o \
-	./arch/uip.o \
-	./arch/conio.o \
-	./apps/configedit.o \
-	./apps/configedit-dsc.o \
-	../contiki/apps/directory.o \
-	./apps/directory-dsc.o \
-	../contiki/apps/processes.o \
-	../contiki/apps/processes-dsc.o \
-	../contiki/apps/program-handler.o \
-	../contiki/ctk/ctk.o \
-	../contiki/ctk/ctk-conio-service.o \
-	../contiki/ctk/ctk-draw.o \
-	../contiki/ctk/ctk-term-in.o \
-	../contiki/ctk/ctk-term-out.o \
-	../contiki/ctk/ctk-term.o \
-	../contiki/ctk/ctk-termtelnet.o \
-	../contiki/ctk/ctk-vncfont.o \
-	../contiki/ctk/vnc-server.o \
-	../contiki/ek/ek-service.o \
-	../contiki/ek/ek.o \
-	../contiki/ek/arg.o \
-	../contiki/ek/mt.o \
-	../contiki/lib/cfs.o \
-	../contiki/lib/ctk-filedialog.o \
-	../contiki/lib/ctk-textedit.o \
-	../contiki/lib/list.o \
-	../contiki/lib/memb.o \
-	../contiki/lib/timer.o \
-	../contiki/lib/strncasecmp.o \
-	./loader/cfs-cpc.o \
-	./arch/main.o \
-	./arch/arch.o \
-	$(UIP)
-
-
-contikin: $(CONTIKI_OBJ)
-	$(LD) -f arch/contiki-uip.lnk
-	./bin/make_labels -a _CODE -a _DATA -x _main -x __clock -x _exit contiki.map arch/contiki_labels.s
-	./bin/makebin -p -b 256 -s 65535 < contiki.ihx > temp/contiki.bin
-	./bin/addhead -s 256 -t "binary" -x 256 temp/contiki.bin temp/contiki_ams.bin
-	./bin/cpcxfs contiki.dsk -f -b -p temp/contiki_ams.bin contiki.bin
-
diff --git a/contiki-cpc/contiki-cpc/Makefile.netprogs b/contiki-cpc/contiki-cpc/Makefile.netprogs
deleted file mode 100644
index e05a810..0000000
--- a/contiki-cpc/contiki-cpc/Makefile.netprogs
+++ /dev/null
@@ -1,242 +0,0 @@
-# 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. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Adam Dunkels.
-# 4. 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: Makefile.netprogs,v 1.1 2006/04/17 15:11:35 kthacker Exp $
-#
-# convert to cpc
-
-UIP_PRGS = ../contiki/apps/www.prg ../contiki/apps/www.dsc \
-	../contiki/apps/websrv.prg ../contiki/apps/websrv.dsc \
-	../contiki/apps/stelnet.prg ../contiki/apps/stelnet.dsc \
-	../contiki/apps/ftp.prg ../contiki/apps/ftp.dsc \
-	../contiki/apps/email.prg ../contiki/apps/email.dsc \
-	../contiki/apps/dhcp.prg ../contiki/apps/dhcp.dsc \
-	../contiki/apps/wget.dsc \
-	../contiki/apps/vnc.prg ../contiki/apps/vnc.dsc \
-#	../contiki/apps/irc.prg ../contiki/apps/irc.dsc 
-#	../contiki/apps/wget.prg 
-#	../contiki/apps/telnetd.prg ../contiki/apps/telnetd.dsc \
-
-
-
-all: 	./arch/crt0-dsc.o \
-	./arch/crt0-prg.o \
-	./arch/contiki_labels.o \
-	./loader/loader-arch-module.o \
-	$(UIP_PRGS)
-
-SYS=cpc
-
-include Makefile.common 
-
-CFLAGS:=$(CFLAGSCOMMON) --compile-only \
-	-DWITH_ASCII \
-	-DWITH_CONIO \
-	-DWITH_LOADER_ARCH
-
-
-# conversion of intel hex record to binary, cpc binary with header, then inject into disc image
-define MAKE_DSC
-	bin/makelnk -r -o $@.ihx arch/crt0-prg.o $< > $@.lnk
-	$(LD) -f $@.lnk
-	bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
-	bin/addhead  $@.bin $@.bin.ams
-	bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
-endef	
-
-%.dsc: %-dsc.o 
-	$(MAKE_DSC)
-
-define MAKE_PRG
-	bin/makelnk -r -m -o $@.ihx -k /usr/local/share/sdcc/lib/z80 -l z80 arch/crt0-prg.o loader/loader-arch-module.o arch/contiki_labels.o $^ > $@.lnk
-	$(LD) -f $@.lnk
-	bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
-	bin/addhead  $@.bin $@.bin.ams
-	bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
-endef	
-
-../contiki/apps/irc.prg: ../contiki/apps/ircc.o ../contiki/apps/ircc-strings.o \
-	../contiki/apps/irc.o ../contiki/uip/socket.o ../contiki/uip/uipbuf.o
-	$(MAKE_PRG)
-
-../contiki/apps/irc.dsc: ../contiki/apps/irc-dsc.o
-	$(MAKE_DSC)
-
-./apps/config.prg: apps/config.o
-	$(MAKE_PRG)
-
-./apps/confedit.prg: apps/configedit.o
-	$(MAKE_PRG)
-
-./apps/confedit.dsc: apps/configedit-dsc.o
-	$(MAKE_DSC)
-
-./apps/welcome.prg: apps/welcome.o
-	$(MAKE_PRG)
-
-../contiki/apps/about.prg: ../contiki/apps/about.o
-	$(MAKE_PRG)
-
-../contiki/apps/calc.prg: ../contiki/apps/calc.o
-	$(MAKE_PRG)
-
-./apps/cgterm.prg: ./apps/cgterm.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/uipbuf.o	\
-	lib/lc-asm.o
-	$(MAKE_PRG)
-
-./apps/cgterm.dsc: ./apps/cgterm-dsc.o 
-	$(MAKE_DSC)
-
-../contiki/apps/dhcp.prg: ../contiki/apps/dhcp.o ../contiki/uip/dhcpc.o ./lib/lc-asm.o
-	$(MAKE_PRG)
-
-../contiki/apps/editor.prg: ../contiki/apps/editor.o \
-	../contiki/lib/ctk-filedialog.o \
-	../contiki/lib/memb.o
-	$(MAKE_PRG)
-
-../contiki/apps/email.prg: ../contiki/apps/email.o \
-	../contiki/lib/ctk-textedit.o \
-	../contiki/apps/smtp-socket.o \
-	../contiki/apps/smtp-strings.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/uipbuf.o \
-	./lib/lc-asm.o 
-	$(MAKE_PRG)
-
-../contiki/apps/ftp.prg: ../contiki/apps/ftp.o \
-	../contiki/apps/ftpc.o \
-	../contiki/lib/memb.o
-	$(MAKE_PRG)
-
-../contiki/apps/netconf.prg: ../contiki/apps/netconf.o
-	$(MAKE_PRG)
-
-../contiki/apps/process.prg: ../contiki/apps/processes.o
-	$(MAKE_PRG)
-
-../contiki/apps/process.dsc: ../contiki/apps/processes-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/dir.prg: ../contiki/apps/directory.o
-	$(MAKE_PRG)
-
-./apps/dir.dsc: ./apps/directory-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/shell.prg: ../contiki/apps/shell-gui.o ./apps/shell.o
-	$(MAKE_PRG)
-
-../contiki/apps/telnetd.prg: ../contiki/apps/telnetd.o \
- 	../contiki/apps/shell.o \
-	../contiki/lib/memb.o \
-	../contiki/apps/telnetd-gui.o
-	$(MAKE_PRG)
-
-../contiki/apps/telnetd.dsc: telnetd-dsc.o 
-	$(MAKE_DSC)
-
-../contiki/apps/www.prg: $(WWW)
-	$(MAKE_PRG)
-
-../contiki/apps/websrv.prg: $(WEBSERVER)
-	$(MAKE_PRG)
-
-../contiki/apps/websrv.dsc: ../contiki/apps/webserver-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/stelnet.prg: $(TELNET)
-	$(MAKE_PRG)
-
-../contiki/apps/stelnet.dsc: ../contiki/apps/telnet-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/wget.prg: $(WGET)
-	$(MAKE_PRG)
-
-../contiki/apps/wget.dsc: apps/wget-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/splip.drv: slip-drv.o rs232dev.o
-
-
-VNC=../contiki/apps/vnc.o \
-	../contiki/apps/vnc-viewer.o \
-	./apps/vnc-draw.o 
-
-../contiki/apps/conio.prg: \
-	../contiki/ctk/ctk-conio-service.o \
-	./arch/conio.o
-	$(MAKE_PRG)
-
-#ctk-text.drv: ctk-conio-service.o
-
-ctk-80col.drv: ctk-80col.o 
-
-ctk-default.drv: ctk-hires-service.o
-
-default.prg: themeloader.o ctk-hires-theme-default.o
-
-
-
-../contiki/apps/vnc.prg: $(VNC)
-	$(MAKE_PRG)
-
-#blueround.prg: themeloader.o ctk-hires-theme-blueround.o contiki-labels.o
-#	cl65 --module -t c64 -o $@ loader-arch-module.o $^
-
-#default.prg: themeloader.o ctk-hires-theme-default.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#enabler.prg: themeloader.o ctk-hires-theme-enabler.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#springlight.prg: themeloader.o ctk-hires-theme-springlight.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#ravenpine.prg: themeloader.o ctk-hires-theme-ravenpine.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-
-
-
-./apps/memstat.prg: apps/memstat.o
-	$(MAKE_PRG)
-
-./apps/memstat.dsc: apps/memstat-dsc.o
-	$(MAKE_DSC)
-
-mtest.prg: mtest.o mtp.o mt.o mtarch.o mtarch-asm.o
-
-lc-test: lc-test.o lc-asm.o
diff --git a/contiki-cpc/contiki-cpc/Makefile.programs b/contiki-cpc/contiki-cpc/Makefile.programs
deleted file mode 100644
index 8e98e91..0000000
--- a/contiki-cpc/contiki-cpc/Makefile.programs
+++ /dev/null
@@ -1,263 +0,0 @@
-# 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. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Adam Dunkels.
-# 4. 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: Makefile.programs,v 1.1 2006/04/17 15:11:36 kthacker Exp $
-#
-# convert to cpc
-
-UIP_PRGS = ../contiki/apps/www.prg ../contiki/apps/www.dsc \
-	../contiki/apps/websrv.prg ../contiki/apps/websrv.dsc \
-	../contiki/apps/stelnet.prg ../contiki/apps/stelnet.dsc \
-	../contiki/apps/ftp.prg ../contiki/apps/ftp.dsc \
-	../contiki/apps/email.prg ../contiki/apps/email.dsc \
-	../contiki/apps/dhcp.prg ../contiki/apps/dhcp.dsc \
-	../contiki/apps/wget.dsc \
-	../contiki/apps/vnc.prg ../contiki/apps/vnc.dsc \
-#	../contiki/apps/irc.prg ../contiki/apps/irc.dsc 
-#	../contiki/apps/wget.prg 
-#	../contiki/apps/telnetd.prg ../contiki/apps/telnetd.dsc \
-
-
-
-all: 	./arch/crt0-dsc.o \
-	./arch/crt0-prg.o \
-	./arch/contiki_labels.o \
-	./loader/loader-arch-module.o \
-	./apps/welcome.prg \
-	../contiki/apps/conio.prg \
-	../contiki/apps/about.prg ../contiki/apps/about.dsc \
-	../contiki/apps/netconf.prg ../contiki/apps/netconf.dsc \
-	../contiki/apps/process.prg ../contiki/apps/process.dsc \
-	../contiki/apps/calc.prg ../contiki/apps/calc.dsc \
-	../contiki/apps/editor.prg ../contiki/apps/editor.dsc \
-	../contiki/apps/dir.prg ./apps/dir.dsc \
-	./apps/config.prg \
-	./apps/confedit.prg \
-	./apps/confedit.dsc \
-	../contiki/apps/shell.prg ../contiki/apps/shell.dsc 
-#	$(UIP_PRGS) \
-
-#	./cfs-cpc.drv \
-#	./ctk-text.drv \
-#	./ctk-default.drv \
-#	./ctk-80col.drv \
-#	./slip.drv slip.dsc \
-#	./cgterm.prg cgterm.dsc \
-
-#	./apps/memstat.prg ./apps/memstat.dsc \
-
-SYS=cpc
-
-include Makefile.common 
-
-CFLAGS:=$(CFLAGSCOMMON) --compile-only \
-	-DWITH_ASCII \
-	-DWITH_CONIO \
-	-DWITH_LOADER_ARCH
-
-
-# conversion of intel hex record to binary, cpc binary with header, then inject into disc image
-define MAKE_DSC
-	bin/makelnk -r -o $@.ihx arch/crt0-prg.o $< > $@.lnk
-	$(LD) -f $@.lnk
-	bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
-	bin/addhead  $@.bin $@.bin.ams
-	bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
-endef	
-
-%.dsc: %-dsc.o 
-	$(MAKE_DSC)
-
-define MAKE_PRG
-	bin/makelnk -r -m -o $@.ihx -k /usr/local/share/sdcc/lib/z80 -l z80 arch/crt0-prg.o loader/loader-arch-module.o arch/contiki_labels.o $^ > $@.lnk
-	$(LD) -f $@.lnk
-	bin/makebin -p -b 0 -s 65535 < $@.ihx > $@.bin
-	bin/addhead  $@.bin $@.bin.ams
-	bin/cpcxfs contiki.dsk -f -b -p $@.bin.ams $(@F)
-endef	
-
-../contiki/apps/irc.prg: ../contiki/apps/ircc.o ../contiki/apps/ircc-strings.o \
-	../contiki/apps/irc.o ../contiki/uip/socket.o ../contiki/uip/uipbuf.o
-	$(MAKE_PRG)
-
-../contiki/apps/irc.dsc: ../contiki/apps/irc-dsc.o
-	$(MAKE_DSC)
-
-./apps/config.prg: apps/config.o
-	$(MAKE_PRG)
-
-./apps/confedit.prg: apps/configedit.o
-	$(MAKE_PRG)
-
-./apps/confedit.dsc: apps/configedit-dsc.o
-	$(MAKE_DSC)
-
-./apps/welcome.prg: apps/welcome.o
-	$(MAKE_PRG)
-
-../contiki/apps/about.prg: ../contiki/apps/about.o
-	$(MAKE_PRG)
-
-../contiki/apps/calc.prg: ../contiki/apps/calc.o
-	$(MAKE_PRG)
-
-./apps/cgterm.prg: ./apps/cgterm.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/uipbuf.o	\
-	lib/lc-asm.o
-	$(MAKE_PRG)
-
-./apps/cgterm.dsc: ./apps/cgterm-dsc.o 
-	$(MAKE_DSC)
-
-../contiki/apps/dhcp.prg: ../contiki/apps/dhcp.o ../contiki/uip/dhcpc.o ./lib/lc-asm.o
-	$(MAKE_PRG)
-
-../contiki/apps/editor.prg: ../contiki/apps/editor.o \
-	../contiki/lib/ctk-filedialog.o \
-	../contiki/lib/memb.o
-	$(MAKE_PRG)
-
-../contiki/apps/email.prg: ../contiki/apps/email.o \
-	../contiki/lib/ctk-textedit.o \
-	../contiki/apps/smtp-socket.o \
-	../contiki/apps/smtp-strings.o \
-	../contiki/uip/socket.o \
-	../contiki/uip/uipbuf.o \
-	./lib/lc-asm.o 
-	$(MAKE_PRG)
-
-../contiki/apps/ftp.prg: ../contiki/apps/ftp.o \
-	../contiki/apps/ftpc.o \
-	../contiki/lib/memb.o
-	$(MAKE_PRG)
-
-../contiki/apps/netconf.prg: ../contiki/apps/netconf.o
-	$(MAKE_PRG)
-
-../contiki/apps/process.prg: ../contiki/apps/processes.o
-	$(MAKE_PRG)
-
-../contiki/apps/process.dsc: ../contiki/apps/processes-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/dir.prg: ../contiki/apps/directory.o
-	$(MAKE_PRG)
-
-./apps/dir.dsc: ./apps/directory-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/shell.prg: ../contiki/apps/shell-gui.o ./apps/shell.o
-	$(MAKE_PRG)
-
-../contiki/apps/telnetd.prg: ../contiki/apps/telnetd.o \
- 	../contiki/apps/shell.o \
-	../contiki/lib/memb.o \
-	../contiki/apps/telnetd-gui.o
-	$(MAKE_PRG)
-
-../contiki/apps/telnetd.dsc: telnetd-dsc.o 
-	$(MAKE_DSC)
-
-../contiki/apps/www.prg: $(WWW)
-	$(MAKE_PRG)
-
-../contiki/apps/websrv.prg: $(WEBSERVER)
-	$(MAKE_PRG)
-
-../contiki/apps/websrv.dsc: ../contiki/apps/webserver-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/stelnet.prg: $(TELNET)
-	$(MAKE_PRG)
-
-../contiki/apps/stelnet.dsc: ../contiki/apps/telnet-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/wget.prg: $(WGET)
-	$(MAKE_PRG)
-
-../contiki/apps/wget.dsc: apps/wget-dsc.o
-	$(MAKE_DSC)
-
-../contiki/apps/splip.drv: slip-drv.o rs232dev.o
-
-
-VNC=../contiki/apps/vnc.o \
-	../contiki/apps/vnc-viewer.o \
-	./apps/vnc-draw.o 
-
-../contiki/apps/conio.prg: \
-	../contiki/ctk/ctk-conio-service.o \
-	./arch/conio.o
-	$(MAKE_PRG)
-
-#ctk-text.drv: ctk-conio-service.o
-
-ctk-80col.drv: ctk-80col.o 
-
-ctk-default.drv: ctk-hires-service.o
-
-default.prg: themeloader.o ctk-hires-theme-default.o
-
-
-
-../contiki/apps/vnc.prg: $(VNC)
-	$(MAKE_PRG)
-
-#blueround.prg: themeloader.o ctk-hires-theme-blueround.o contiki-labels.o
-#	cl65 --module -t c64 -o $@ loader-arch-module.o $^
-
-#default.prg: themeloader.o ctk-hires-theme-default.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#enabler.prg: themeloader.o ctk-hires-theme-enabler.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#springlight.prg: themeloader.o ctk-hires-theme-springlight.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-#ravenpine.prg: themeloader.o ctk-hires-theme-ravenpine.o contiki-labels.o
-#	cl65 -Ln default-prg.labels --module -t c64 -o $@ loader-arch-module.o $^
-
-
-
-
-./apps/memstat.prg: apps/memstat.o
-	$(MAKE_PRG)
-
-./apps/memstat.dsc: apps/memstat-dsc.o
-	$(MAKE_DSC)
-
-mtest.prg: mtest.o mtp.o mt.o mtarch.o mtarch-asm.o
-
-lc-test: lc-test.o lc-asm.o
diff --git a/contiki-cpc/contiki-cpc/README b/contiki-cpc/contiki-cpc/README
deleted file mode 100644
index 854e27f..0000000
--- a/contiki-cpc/contiki-cpc/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This is the Amstrad CPC port of Contiki, maintained by Kevin Thacker
-<amstrad@aiind.upv.es>
diff --git a/contiki-cpc/contiki-cpc/arch/contiki_labels.s b/contiki-cpc/contiki-cpc/arch/contiki_labels.s
deleted file mode 100644
index 8192104..0000000
--- a/contiki-cpc/contiki-cpc/arch/contiki_labels.s
+++ /dev/null
@@ -1,346 +0,0 @@
-__jpbc == 0x0107
-_kbhit == 0x0109
-_cgetc == 0x0115
-_calc_free_ram == 0x011B
-_get_ram_start == 0x0183
-_get_ram_end == 0x0187
-ram_start == 0x018B
-ram_end == 0x018D
-__sdcc_heap_init == 0x018F
-__sdcc_heap_init_start == 0x018F
-__sdcc_heap_init_end == 0x021B
-_malloc == 0x021B
-_malloc_start == 0x021B
-_free == 0x0366
-_free_start == 0x0366
-_malloc_end == 0x0366
-_free_end == 0x03CE
-__clock_init == 0x03CE
-event_routine == 0x03DC
-__clock_val == 0x03E6
-event_block == 0x03E8
-_loader_arch_load == 0x03F1
-_loader_arch_load_start == 0x03F1
-_loader_arch_load_end == 0x0455
-_loader_arch_load_dsc == 0x0455
-_loader_arch_load_dsc_start == 0x0455
-_loader_arch_load_dsc_end == 0x04A7
-_loader_arch_free == 0x04A7
-_loader_arch_free_start == 0x04A7
-_loader_arch_free_end == 0x04BF
-_loader_arch_free_dsc == 0x04BF
-_loader_arch_free_dsc_start == 0x04BF
-_loader_arch_free_dsc_end == 0x04D7
-_get_file_length == 0x04D7
-_load_file == 0x04FB
-_relocate == 0x0519
-_cfs_cpc_init == 0x05B8
-_cfs_cpc_init_start == 0x05B8
-_cfs_cpc_init_end == 0x05DB
-_cfs_find_service == 0x08B2
-_cfs_find_service_start == 0x08B2
-_cfs_find_service_end == 0x08CE
-__readdir == 0x08E8
-fetch_directory == 0x0901
-_program_handler_add == 0x091D
-_program_handler_add_start == 0x091D
-_program_handler_add_end == 0x0977
-_program_handler_init == 0x0A59
-_program_handler_init_start == 0x0A59
-_program_handler_init_end == 0x0AB0
-_pnarg_init == 0x0AB8
-_pnarg_init_start == 0x0AB8
-_pnarg_init_end == 0x0ACB
-_program_handler_load == 0x0B62
-_program_handler_load_start == 0x0B62
-_program_handler_load_end == 0x0BA9
-_program_handler_screensaver == 0x0BB7
-_program_handler_screensaver_sta == 0x0BB7
-_program_handler_screensaver_end == 0x0BE6
-_ctk_restore == 0x109A
-_ctk_restore_start == 0x109A
-_ctk_init_start == 0x10BF
-_ctk_restore_end == 0x10BF
-_ctk_init == 0x10BF
-_ctk_init_end == 0x11F2
-_ctk_mode_set == 0x11FA
-_ctk_mode_set_start == 0x11FA
-_ctk_mode_get == 0x120F
-_ctk_mode_get_start == 0x120F
-_ctk_mode_set_end == 0x120F
-_ctk_mode_get_end == 0x1217
-_ctk_icon_add == 0x1217
-_ctk_icon_add_start == 0x1217
-_ctk_dialog_open == 0x1243
-_ctk_icon_add_end == 0x1243
-_ctk_dialog_open_start == 0x1243
-_ctk_dialog_open_end == 0x126A
-_ctk_dialog_close == 0x126A
-_ctk_dialog_close_start == 0x126A
-_ctk_window_open == 0x1283
-_ctk_window_open_start == 0x1283
-_ctk_dialog_close_end == 0x1283
-_ctk_window_close == 0x139C
-_ctk_window_close_start == 0x139C
-_ctk_window_open_end == 0x139C
-_ctk_window_close_end == 0x14CB
-_ctk_window_clear_start == 0x163B
-_ctk_window_clear == 0x163B
-_ctk_menu_add_start == 0x1695
-_ctk_window_clear_end == 0x1695
-_ctk_menu_add == 0x1695
-_ctk_menu_add_end == 0x1707
-_ctk_menu_remove == 0x1707
-_ctk_menu_remove_start == 0x1707
-_ctk_menu_remove_end == 0x178B
-_ctk_desktop_redraw == 0x18E0
-_ctk_desktop_redraw_start == 0x18E0
-_ctk_window_redraw_start == 0x192F
-_ctk_desktop_redraw_end == 0x192F
-_ctk_window_redraw == 0x192F
-_ctk_window_redraw_end == 0x19AC
-_ctk_window_new == 0x1B5F
-_ctk_window_new_start == 0x1B5F
-_ctk_window_new_end == 0x1B93
-_ctk_dialog_new == 0x1B93
-_ctk_dialog_new_start == 0x1B93
-_ctk_menu_new == 0x1BB9
-_ctk_menu_new_start == 0x1BB9
-_ctk_dialog_new_end == 0x1BB9
-_ctk_menuitem_add == 0x1C1B
-_ctk_menu_new_end == 0x1C1B
-_ctk_menuitem_add_start == 0x1C1B
-_ctk_menuitem_add_end == 0x1C9E
-_ctk_widget_redraw == 0x1DCD
-_ctk_widget_redraw_start == 0x1DCD
-_ctk_widget_add == 0x1DF7
-_ctk_widget_add_start == 0x1DF7
-_ctk_widget_redraw_end == 0x1DF7
-_ctk_desktop_width_start == 0x1EA6
-_ctk_widget_add_end == 0x1EA6
-_ctk_desktop_width == 0x1EA6
-_ctk_desktop_width_end == 0x1EB4
-_ctk_desktop_height == 0x1EB4
-_ctk_desktop_height_start == 0x1EB4
-_ctk_desktop_height_end == 0x1EC2
-_ctk_draw_init == 0x2EFD
-_ctk_draw_init_start == 0x2EFD
-_ctk_draw_clear == 0x2F46
-_ctk_draw_init_end == 0x2F46
-_ctk_draw_clear_start == 0x2F46
-_ctk_draw_clear_window == 0x2F79
-_ctk_draw_clear_window_start == 0x2F79
-_ctk_draw_clear_end == 0x2F79
-_ctk_draw_clear_window_end == 0x2FBA
-_ctk_draw_window == 0x2FBA
-_ctk_draw_window_start == 0x2FBA
-_ctk_draw_dialog_start == 0x2FFB
-_ctk_draw_window_end == 0x2FFB
-_ctk_draw_dialog == 0x2FFB
-_ctk_draw_widget == 0x302B
-_ctk_draw_dialog_end == 0x302B
-_ctk_draw_widget_start == 0x302B
-_ctk_draw_menus_start == 0x306C
-_ctk_draw_widget_end == 0x306C
-_ctk_draw_menus == 0x306C
-_ctk_draw_menus_end == 0x309C
-_ctk_draw_width == 0x309C
-_ctk_draw_width_start == 0x309C
-_ctk_draw_width_end == 0x30BE
-_ctk_draw_height == 0x30BE
-_ctk_draw_height_start == 0x30BE
-_ctk_mouse_xtoc == 0x30E0
-_ctk_mouse_xtoc_start == 0x30E0
-_ctk_draw_height_end == 0x30E0
-_ctk_mouse_ytoc == 0x3115
-_ctk_mouse_ytoc_start == 0x3115
-_ctk_mouse_xtoc_end == 0x3115
-_ctk_draw_quit == 0x314A
-_ctk_mouse_ytoc_end == 0x314A
-_ctk_draw_quit_start == 0x314A
-_ctk_draw_quit_end == 0x3168
-_ek_service_start == 0x3173
-_ek_service_start_start == 0x3173
-_ek_service_find_start == 0x31B2
-_ek_service_start_end == 0x31B2
-_ek_service_find == 0x31B2
-_ek_service_state_start == 0x31DF
-_ek_service_find_end == 0x31DF
-_ek_service_state == 0x31DF
-_ek_service_reset == 0x3229
-_ek_service_reset_start == 0x3229
-_ek_service_state_end == 0x3229
-_ek_service_reset_end == 0x323F
-_ek_alloc_event == 0x323F
-_ek_alloc_event_start == 0x323F
-_ek_alloc_event_end == 0x324A
-_ek_start_start == 0x3369
-_ek_start == 0x3369
-_ek_exit == 0x33F8
-_ek_start_end == 0x33F8
-_ek_exit_start == 0x33F8
-_ek_process == 0x352B
-_ek_process_start == 0x352B
-_ek_exit_end == 0x352B
-_ek_init == 0x3558
-_ek_init_start == 0x3558
-_ek_process_end == 0x3558
-_ek_process_event == 0x35AC
-_ek_init_end == 0x35AC
-_ek_process_event_start == 0x35AC
-_ek_process_poll == 0x3743
-_ek_process_event_end == 0x3743
-_ek_process_poll_start == 0x3743
-_ek_run == 0x378B
-_ek_run_start == 0x378B
-_ek_process_poll_end == 0x378B
-_ek_post == 0x37AD
-_ek_post_start == 0x37AD
-_ek_run_end == 0x37AD
-_ek_post_synch == 0x3828
-_ek_post_synch_start == 0x3828
-_ek_post_end == 0x3828
-_ek_post_synch_end == 0x3887
-_ek_find == 0x3887
-_ek_find_start == 0x3887
-_ek_find_end == 0x38F2
-_ek_replace == 0x38F2
-_ek_replace_start == 0x38F2
-_ek_replace_end == 0x394A
-_ek_procstate == 0x394A
-_ek_procstate_start == 0x394A
-_ek_procstate_end == 0x397F
-_arg_init == 0x397F
-_arg_init_start == 0x397F
-_arg_init_end == 0x3986
-_arg_alloc == 0x3986
-_arg_alloc_start == 0x3986
-_arg_alloc_end == 0x39A4
-_arg_free == 0x39A4
-_arg_free_start == 0x39A4
-_arg_free_end == 0x39C5
-_list_init == 0x39C5
-_list_init_start == 0x39C5
-_list_init_end == 0x39E1
-_list_head == 0x39E1
-_list_head_start == 0x39E1
-_list_copy_start == 0x39FD
-_list_head_end == 0x39FD
-_list_copy == 0x39FD
-_list_copy_end == 0x3A22
-_list_tail == 0x3A22
-_list_tail_start == 0x3A22
-_list_add == 0x3A54
-_list_add_start == 0x3A54
-_list_tail_end == 0x3A54
-_list_push_start == 0x3A95
-_list_add_end == 0x3A95
-_list_push == 0x3A95
-_list_push_end == 0x3AC0
-_list_chop == 0x3AC0
-_list_chop_start == 0x3AC0
-_list_pop == 0x3B46
-_list_pop_start == 0x3B46
-_list_chop_end == 0x3B46
-_list_pop_end == 0x3B71
-_timer_set == 0x3B71
-_timer_set_start == 0x3B71
-_timer_set_end == 0x3B9D
-_timer_reset == 0x3B9D
-_timer_reset_start == 0x3B9D
-_timer_expired == 0x3BBA
-_timer_reset_end == 0x3BBA
-_timer_expired_start == 0x3BBA
-_timer_expired_end == 0x3C04
-_directory_dsc == 0x3C04
-_directory_icon == 0x3C5D
-_configedit_dsc == 0x3C90
-_configedit_icon == 0x3CE9
-_processes_dsc == 0x3D2F
-_processes_icon == 0x3D88
-_uip_fw_forward_start == 0x3DC2
-_uip_fw_forward == 0x3DC2
-_uip_fw_forward_end == 0x3DC5
-_uip_fw_periodic == 0x3DC5
-_uip_fw_periodic_start == 0x3DC5
-_uip_fw_periodic_end == 0x3DC6
-_main_start == 0x3DEF
-_main_end == 0x3E48
-_reset == 0x3E68
-_reset_start == 0x3E68
-_reset_end == 0x3E69
-_clock_time_start == 0x3E6E
-_clock_time == 0x3E6E
-_ctk_arch_isprint == 0x3E72
-_clock_time_end == 0x3E72
-_ctk_arch_isprint_start == 0x3E72
-_ctk_arch_isprint_end == 0x3E8D
-_strcpy == 0x3E8D
-_strcpy_start == 0x3E8D
-_strcpy_end == 0x3EB2
-__divschar_rrx_s == 0x3EB2
-__divschar_rrx_hds == 0x3EB9
-__modschar_rrx_s == 0x3EC0
-__modschar_rrx_hds == 0x3EC7
-__divsint_rrx_s == 0x3ECE
-__divsint_rrx_hds == 0x3EDA
-__modsint_rrx_s == 0x3EE2
-__modsint_rrx_hds == 0x3EEE
-__divuchar_rrx_s == 0x3EF6
-__divuchar_rrx_hds == 0x3EFD
-__moduchar_rrx_s == 0x3F04
-__moduchar_rrx_hds == 0x3F0B
-__divuint_rrx_s == 0x3F12
-__divuint_rrx_hds == 0x3F1E
-__moduint_rrx_s == 0x3F26
-__moduint_rrx_hds == 0x3F32
-.mod8 == 0x3F3A
-.div8 == 0x3F3A
-.mod16 == 0x3F42
-.div16 == 0x3F42
-.modu8 == 0x3F7F
-.divu8 == 0x3F7F
-.modu16 == 0x3F82
-.divu16 == 0x3F82
-_strncmp == 0x3FB3
-_strncmp_start == 0x3FB3
-_strncmp_end == 0x4040
-_isprint == 0x4040
-_isprint_start == 0x4040
-_isprint_end == 0x4062
-_memset == 0x4062
-_memset_start == 0x4062
-_memset_end == 0x40AA
-__mulschar_rrx_s == 0x40AA
-__mulschar_rrx_hds == 0x40B1
-__muluchar_rrx_s == 0x40BD
-__mulint_rrx_s == 0x40CA
-__mulint_rrx_hds == 0x40D6
-__muluchar_rrx_hds == 0x40D6
-_strncpy == 0x40EF
-_strncpy_start == 0x40EF
-_strncpy_end == 0x415E
-_strlen_start == 0x415E
-_strlen == 0x415E
-_strlen_end == 0x417E
-_ctk_signal_keypress == 0x439D
-_ctk_signal_widget_activate == 0x439E
-_ctk_signal_button_activate == 0x439F
-_ctk_signal_widget_select == 0x43A0
-_ctk_signal_button_hover == 0x43A1
-_ctk_signal_hyperlink_activate == 0x43A2
-_ctk_signal_hyperlink_hover == 0x43A3
-_ctk_signal_menu_activate == 0x43A4
-_ctk_signal_window_close == 0x43A5
-_ctk_signal_pointer_move == 0x43A6
-_ctk_signal_pointer_button == 0x43A7
-_ctk_screensaver_timeout == 0x43AA
-_ctk_draw_windowborder_width == 0x43BC
-_ctk_draw_windowborder_height == 0x43BD
-_ctk_draw_windowtitle_height == 0x43BE
-_ek_procs == 0x43C2
-_ek_proclist == 0x43C4
-_ek_current == 0x4404
-_ek_event_quit == 0x4406
-_ek_event_msg == 0x4407
-_ek_poll_request == 0x448B
diff --git a/contiki-cpc/contiki-cpc/arch/crt0-backup.s b/contiki-cpc/contiki-cpc/arch/crt0-backup.s
deleted file mode 100644
index b014aa8..0000000
--- a/contiki-cpc/contiki-cpc/arch/crt0-backup.s
+++ /dev/null
@@ -1,33 +0,0 @@
-;; File: crt0.s
-;; Generic crt0.s for a Z80
-;; From SDCC..
-;; Modified to suit execution on the Amstrad CPC!
-;; by H. Hansen 2003
-
-    .module crt0
-	.globl	_main
-	.globl _progend
-	.area _HEADER (ABS)
-	.org 	0x100 ;; Start from address &100
-init:
-
-;; Initialise global variables
-    call    gsinit
-	call	_main
-
-_exit::
-	ret
-
-	;; Ordering of segments for the linker.
-	.area	_HOME
-	.area	_CODE
-	.area	_DATA
-	 .area   _BSS
-	
-	.area   _GSINIT
-gsinit::	
-
-    .area   _GSFINAL
-    ret
-    	.area   _HEAP
-_progend::
diff --git a/contiki-cpc/contiki-cpc/arch/crt0-dsc.s b/contiki-cpc/contiki-cpc/arch/crt0-dsc.s
deleted file mode 100644
index 381bc27..0000000
--- a/contiki-cpc/contiki-cpc/arch/crt0-dsc.s
+++ /dev/null
@@ -1,26 +0,0 @@
-;; File: crt0-dsc.s
-
-    .module crt0
-	.globl	_main
-
-	.area _HEADER (REL)
-;;	.org 	0x100 ;; Start from address &100
-
-init:
-_main:
-	;; Ordering of segments for the linker.
-	.area	_HOME (REL)
-	.area	_CODE (REL)
-    .area   _GSINIT (REL)
-    .area   _GSFINAL (REL)
-        
-	.area	_DATA (REL)
-    .area   _BSS (REL)
-    .area   _HEAP (REL)
-
-   .area   _CODE (REL)
-	
-_exit::
-	.area   _GSINIT (REL)
-gsinit::	
-    .area   _GSFINAL (REL)
diff --git a/contiki-cpc/contiki-cpc/arch/crt0-prg.s b/contiki-cpc/contiki-cpc/arch/crt0-prg.s
deleted file mode 100644
index 8984742..0000000
--- a/contiki-cpc/contiki-cpc/arch/crt0-prg.s
+++ /dev/null
@@ -1,16 +0,0 @@
-;; File: crt0-dsc.s
-
-    .module crt0
-	.area _HEADER (ABS)
-	.area _HOME (REL)	
-	.area _CODE (REL)
-	;; relocation data
-	.dw 0
-     .area _DATA (REL)
-    .area   _BSS (REL)
-    .area   _HEAP (REL)
-
-	.area   _GSINIT (REL)
-gsinit::	
-    .area   _GSFINAL (REL)
-	ret
diff --git a/contiki-cpc/contiki-cpc/arch/crt0.s b/contiki-cpc/contiki-cpc/arch/crt0.s
deleted file mode 100644
index a8aafdb..0000000
--- a/contiki-cpc/contiki-cpc/arch/crt0.s
+++ /dev/null
@@ -1,35 +0,0 @@
-;; File: crt0.s
-;; Generic crt0.s for a Z80
-;; From SDCC..
-;; Modified to suit execution on the Amstrad CPC!
-;; by H. Hansen 2003
-
-    .module crt0
-	.globl	_main
-	.globl _progend
-	.globl __jpbc
-	.area	_HEADER (ABS)
-	;; Ordering of segments for the linker.
-	.area	_CODE
-init:
-
-;; Initialise global variables
-    call    gsinit
-	call	_main
-
-_exit::
-	ret
-__jpbc:
-	push bc
-	ret
-
-	.area	_DATA (REL)
-	 .area   _BSS (REL)
-	
-	.area   _GSINIT (REL)
-gsinit::	
-
-    .area   _GSFINAL (REL)
-    ret
-    	.area   _HEAP (REL)
-_progend::
diff --git a/contiki-cpc/contiki-cpc/arch/hires.s b/contiki-cpc/contiki-cpc/arch/hires.s
deleted file mode 100644
index c482768..0000000
--- a/contiki-cpc/contiki-cpc/arch/hires.s
+++ /dev/null
@@ -1,101 +0,0 @@
-;; Hires: 
-;;
-;; Mode 0, 40 columns. Each character is 4 pixels wide and 8 pixels tall.
-;; Each character is two bytes wide and 8 lines tall.
-;;
-;; The graphics for each character is a bitmap defined using
-;; pen 0 and pen 15.
-;;
-;; The bitmap is processed at runtime to convert the font to the 
-;; appropiate pixel colours.
-		.area _CODE
-;; This table converts between pen index (0-15) and pixel bitmap.
-.pen_table
-defb #00	;; pen 0  (%00000000)
-defb #c0	;; pen 1  (%11000000)
-defb #0c	;; pen 2  (%00001100)
-defb #cc	;; pen 3  (%11001100)
-defb #30	;; pen 4  (%00110000)
-defb #f0	;; pen 5  (%11110000)
-defb #3c	;; pen 6  (%00111100)
-defb #fc	;; pen 7  (%11111100)
-defb #03	;; pen 8  (%00000011)
-defb #c3	;; pen 9  (%11000011)
-defb #0f	;; pen 10 (%00001111)
-defb #cf	;; pen 11 (%11001111)
-defb #33	;; pen 12 (%00110011)
-defb #f3	;; pen 13 (%11110011)
-defb #3f	;; pen 14 (%00111111)
-defb #ff	;; pen 15 (%11111111)
-
-;; A = pen
-.get_pen_mask
-ld hl,pen_table
-add a,l
-ld l,a
-ld a,h
-adc a,0
-ld h,a
-ld a,(hl)
-ret
-
-.set_pen
-call get_pen_mask
-ld (pen_mask+1),a
-ld (pen_mask2+1),a
-ret
-
-.set_paper
-call get_pen_mask
-ld (paper_mask+1),a
-ld (paper_mask2+1),a
-ret
-
-;; enter:
-;; HL = current memory address
-;; exit:
-;; HL = memory address of byte immediatly below
-;; AF corrupt.
-.scr_next_line
-ld a,h
-add a,8
-ld h,a
-ret nc
-ld a,l
-add a,&50
-ld l,a
-ld a,h
-adc a,&c0
-ld h,a
-ret
-
-;; enter:
-;; HL = screen address
-;; DE = character pixel graphics
-;; exit:
-;; AF, BC, HL, DE corrupt
-.plot_char
-ld b,8
-.pc1
-ld a,(de)		;; convert 'on' pixels
-.pen_mask and 1
-ld c,a
-ld a,(de)
-cpl 
-.paper_mask and 1
-or c
-ld (hl),a
-inc l
-ld a,(de)
-.pen_mask2 and 1
-ld c,a
-ld a,(de)
-cpl
-.paper_mask2 and 1
-or c
-ld (hl),a
-dec l
-call scr_next_line
-djnz pc1
-ret
-
diff --git a/contiki-cpc/contiki-cpc/arch/key.s b/contiki-cpc/contiki-cpc/arch/key.s
deleted file mode 100644
index 8ca55ad..0000000
--- a/contiki-cpc/contiki-cpc/arch/key.s
+++ /dev/null
@@ -1,33 +0,0 @@
-; unsigned char kbhit (void);
-; Return true if there's a key waiting, return false if not 
-; TESTED
-
-.globl _kbhit
-		.area _CODE
-_kbhit::
-		call	0xBB09	; KM READ KEY
-		ld (key),a
-		ld		l,#1
-		ret		c
-		ld		l,#0
-		ret
-
-; char cgetc (void);
-; Return a character from the keyboard. If there is no character available,
-; the functions waits until the user does press a key. If cursor is set to
-; 1 (see below), a blinking cursor is displayed while waiting.
-; TESTED
-
-.globl _cgetc
-
-_cgetc::	
-		ld a,(key)
-		ld l,a
-		ret
-
-;;		call	0xBB09
-;;		jr nc,_cgetc
-;;		ld		l,a
-;;		ret
-
-key:		.db 0
diff --git a/contiki-cpc/contiki-cpc/arch/main.c b/contiki-cpc/contiki-cpc/arch/main.c
deleted file mode 100644
index a7f8d2c..0000000
--- a/contiki-cpc/contiki-cpc/arch/main.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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 operating system
- *
- * $Id: main.c,v 1.1 2006/04/17 15:11:44 kthacker Exp $
- *
- */
-
-#include "contiki.h"
-
-#include "ctk.h"
-#include "ctk-draw.h"
-#include "ek.h"
-#include "log.h"
-#include "program-handler.h"
-
-#include "uip.h"
-#include "uip_arp.h"
-
-#include "resolv.h"
-
-#include "configedit-dsc.h"
-#include "directory-dsc.h"
-#include "processes-dsc.h"
-
-//#include "cfs-cbm.h"
-#include "cfs-cpc.h"
-
-#include "clock.h"
-
-#include "arch.h"
-
-unsigned char
-uip_fw_forward(void)
-{
-  return 0;
-}
-void
-uip_fw_periodic(void)
-{
-  return;
-}
-/*-----------------------------------------------------------------------------------*/
-EK_EVENTHANDLER(init_eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-    program_handler_load("conio.prg",NULL);
-//    program_handler_load("config.prg", NULL);
-    break;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-EK_PROCESS(init, "Init", EK_PRIO_LOWEST,
-	   init_eventhandler, NULL, NULL);
-/*-----------------------------------------------------------------------------------*/
-#if LOG_CONF_ENABLED
-void
-log_message(char *part1, char *part2)
-{
-}
-#endif
-void
-main(void)
-{
-  
- log_message("Starting ", CONTIKI_VERSION_STRING);
-  
-  ek_init();
-
-  ek_start(&init);
-    
- // log_message(": TCP/IP", "");
-    
- // tcpip_init(NULL);
-
- // resolv_init(NULL); 
-
-  log_message(": CTK GUI", "");
-  ctk_init();
-
-  log_message(": Initial filesystem", "");
-  cfs_cpc_init(NULL);
-
-  program_handler_init();
-   
-  program_handler_add(&directory_dsc, "Directory", 1);
-//  program_handler_add(&configedit_dsc, "Configuration", 1);
-  program_handler_add(&processes_dsc, "Processes", 1);  
-  
-  
-  log_message("Starting process scheduling", "");  
-
-  while(1) {
-    if(ek_run() == 0) {
-      program_handler_load("welcome.prg", NULL);
-      break;
-    }
-  }
-    
-  while(1) {
-    ek_run();
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void
-reset(void)
-{
-/*  asm("lda #$36");
-  asm("sta $01");
-  asm("jmp $fce2");
-*/
-}
-
diff --git a/contiki-cpc/contiki-cpc/arch/malloc.c b/contiki-cpc/contiki-cpc/arch/malloc.c
deleted file mode 100644
index d4e91b5..0000000
--- a/contiki-cpc/contiki-cpc/arch/malloc.c
+++ /dev/null
@@ -1,268 +0,0 @@
-#include <sdcc-lib.h>
-#include <malloc.h>
-
-#if _SDCC_MALLOC_TYPE_MLH
-
-typedef struct _MEMHEADER MEMHEADER;
-
-struct _MEMHEADER
-{
-  MEMHEADER *  next;
-  MEMHEADER *  prev;
-  unsigned int       len;
-  unsigned char      mem;
-};
-
-#define HEADER_SIZE (sizeof(MEMHEADER)-sizeof(char))
-
-/* These veriables are defined through the crt0 functions. */
-/* Base of this variable is the first byte of the heap. */
-//extern MEMHEADER _sdcc_heap_start;
-/* Address of this variable is the last byte of the heap. */
-//extern char _sdcc_heap_end;
-
-extern char *get_ram_start();
-extern char *get_ram_end();
-extern void calc_free_ram();
-extern char progend;
-
-static MEMHEADER *firstheader;
-/* setup two headers. One at start of free ram, second at end of free ram.
- We find free ram range by asking Amstrad's firmware. */
-
-void
-_sdcc_heap_init(void)
-{
-  MEMHEADER *lastheader;
-  unsigned int size;
-  char * ramstart;
-
-  /* ask firmware for free ram */
-  calc_free_ram();
-
-  /* start of ram is either start of range given by firmware,
-  or end of program; whichever is largest */
-  ramstart = get_ram_start();
-  if (ramstart<&progend)
-	ramstart = &progend;
-
-  /* this is our first mem header */
-  firstheader = (MEMHEADER *)ramstart;
-  
-  /* this is the size of ram available */
-  size = get_ram_end() - ramstart;
-
-  /* calc address of last header */
-  lastheader = (MEMHEADER *)((char *)firstheader + size - HEADER_SIZE); 
-  
-  /* setup last header */
-  lastheader->next = NULL;
-  lastheader->prev = firstheader;
-  lastheader->len = 0;
-
-  /* setup first header */
-  firstheader->next = lastheader;
-  firstheader->prev       = NULL; //and mark first as first
-  firstheader->len        = 0;    //Empty and ready.
-}
-
-void *
-malloc (unsigned int size)
-{
-  MEMHEADER * current_header;
-  MEMHEADER * new_header;
-
-  if (size>(0xFFFF-HEADER_SIZE))
-    {
-      return NULL; //To prevent overflow in next line
-    }
-
-  size += HEADER_SIZE; //We need a memory for header too
-  current_header = firstheader;
-
-  while (1)
-    {
-      //    current
-      //    |   len       next
-      //    v   v         v
-      //....*****.........******....
-      //         ^^^^^^^^^
-      //           spare
-
-      if ((((unsigned int)current_header->next) -
-           ((unsigned int)current_header) -
-           current_header->len) >= size) 
-        {
-          break; //if spare is more than need
-        }
-      current_header = current_header->next;    //else try next             
-      if (!current_header->next)  
-        {
-          return NULL;  //if end_of_list reached    
-        }
-    }
-
-  if (!current_header->len)
-    { //This code works only for first_header in the list and only
-      current_header->len = size; //for first allocation
-      return &current_header->mem;
-    } 
-  else
-    {
-      //else create new header at the begin of spare
-      new_header = (MEMHEADER * )((char *)current_header + current_header->len);
-      new_header->next = current_header->next; //and plug it into the chain
-      new_header->prev = current_header;
-      current_header->next  = new_header;
-      if (new_header->next)
-        {
-          new_header->next->prev = new_header;
-        }
-      new_header->len  = size; //mark as used
-      return &new_header->mem;
-    }
-}
-
-void
-free (void *p)
-{
-  MEMHEADER *prev_header, *pthis;
-
-  if ( p ) //For allocated pointers only!
-    {
-      pthis = (MEMHEADER * )((char *)  p - HEADER_SIZE); //to start of header
-      if ( pthis->prev ) // For the regular header
-        {
-          prev_header = pthis->prev;
-          prev_header->next = pthis->next;
-          if (pthis->next)
-            {
-              pthis->next->prev = prev_header;
-            }
-        }
-      else
-        {
-          pthis->len = 0; //For the first header
-        }
-    }
-}
-
-#else
-
-            //--------------------------------------------------------------------
-            //Written by Dmitry S. Obukhov, 1997
-            //dso@usa.net
-            //--------------------------------------------------------------------
-            //Modified for SDCC by Sandeep Dutta, 1999
-            //sandeep.dutta@usa.net
-            //--------------------------------------------------------------------
-            //malloc and free functions implementation for embedded system
-            //Non-ANSI keywords are C51 specific.
-            // xdata - variable in external memory (just RAM)
-            //--------------------------------------------------------------------
-
-            #define MEMHEADER   struct MAH// Memory Allocation Header
-
-            MEMHEADER
-            {
-              MEMHEADER xdata *  next;
-              MEMHEADER xdata *  prev;
-              unsigned int       len;
-	      unsigned char      mem;
-            };
-
-            #define HEADER_SIZE (sizeof(MEMHEADER)-1)
-
-            //Static here means: can be accessed from this module only
-            static MEMHEADER xdata * FIRST_MEMORY_HEADER_PTR;
-            void init_dynamic_memory(MEMHEADER xdata * array, unsigned int size) 
-            {
-
-            //This function MUST be called after the RESET.
-            //Parameters: array - pointer to memory allocated by the linker
-            //            size  - size of this memory pool
-            //Example:
-            //     #define DYNAMIC_MEMORY_SIZE 0x2000
-            //     .....
-            //     unsigned char xdata dynamic_memory_pool[DYNAMIC_MEMORY_SIZE];
-            //     unsigned char xdata * current_buffer;
-            //     .....
-            //     void main(void)
-            //     {
-            //         ...
-            //         init_dynamic_memory(dynamic_memory_pool,DYNAMIC_MEMORY_SIZE);
-            //         Now it is possible to use malloc.
-            //         ...
-            //         current_buffer = malloc(0x100);
-            //
-            //
-
-              if ( !array ) /*Reserved memory starts on 0x0000 but it's NULL...*/
-              {             //So, we lost one byte!
-                 array = (MEMHEADER xdata * )((char xdata * ) array + 1) ;
-                 size --;
-              }
-              FIRST_MEMORY_HEADER_PTR = array;
-              //Reserve a mem for last header
-              array->next = (MEMHEADER xdata * )(((char xdata * ) array) + size - HEADER_SIZE);
-              array->next->next = (void xdata * ) NULL; //And mark it as last
-              array->prev       = (void xdata * ) NULL; //and mark first as first
-              array->len        = 0;    //Empty and ready.
-            }
-
-            void  xdata * malloc (unsigned int size)
-            {
-              register MEMHEADER xdata * current_header;
-              register MEMHEADER xdata * new_header;
-
-              if (size>(0xFFFF-HEADER_SIZE)) return (void xdata *) NULL; //To prevent overflow in next line
-              size += HEADER_SIZE; //We need a memory for header too
-              current_header = FIRST_MEMORY_HEADER_PTR;
-              while (1)
-              {
-
-                //    current
-                //    |   len       next
-                //    v   v         v
-                //....*****.........******....
-                //         ^^^^^^^^^
-                //           spare
-
-                if ((((unsigned int)current_header->next) -
-                     ((unsigned int)current_header) -
-                     current_header->len) >= size) break; //if spare is more than need
-                current_header = current_header->next;    //else try next             
-                if (!current_header->next)  return (void xdata *) NULL;  //if end_of_list reached
-              }
-              if (!current_header->len)
-              { //This code works only for first_header in the list and only
-                 current_header->len = size; //for first allocation
-                 return ((xdata *)&(current_header->mem));
-              } //else create new header at the begin of spare
-              new_header = (MEMHEADER xdata * )((char xdata *)current_header + current_header->len);
-              new_header->next = current_header->next; //and plug it into the chain
-              new_header->prev = current_header;
-              current_header->next  = new_header;
-              if (new_header->next)  new_header->next->prev = new_header;
-              new_header->len  = size; //mark as used
-              return ((xdata *)&(new_header->mem));
-            }
-
-            void free (void xdata * p)
-            {
-              register MEMHEADER xdata * prev_header;
-              if ( p ) //For allocated pointers only!
-              {
-                  p = (MEMHEADER xdata * )((char xdata *)  p - HEADER_SIZE); //to start of header
-                  if ( ((MEMHEADER xdata * ) p)->prev ) // For the regular header
-                  {
-                    prev_header = ((MEMHEADER xdata * ) p)->prev;
-                    prev_header->next = ((MEMHEADER xdata * ) p)->next;
-                    if (((MEMHEADER xdata * ) p)->next)
-		       ((MEMHEADER xdata * ) p)->next->prev = prev_header;
-                  }
-                  else ((MEMHEADER xdata * ) p)->len = 0; //For the first header
-              }
-            }
-            //END OF MODULE
-#endif
diff --git a/contiki-cpc/contiki-cpc/arch/mem.s b/contiki-cpc/contiki-cpc/arch/mem.s
deleted file mode 100644
index e994238..0000000
--- a/contiki-cpc/contiki-cpc/arch/mem.s
+++ /dev/null
@@ -1,105 +0,0 @@
-	.globl _calc_free_ram
-	.globl _get_ram_start
-	.globl _get_ram_end
-	.globl __sdcc_heap_init
-
-	.area _GSINIT
-	call __sdcc_heap_init
-
-	.area _CODE
-
-_calc_free_ram::
-	push bc
-        ;; get information about BASIC ROM
-        ld c,#0x0
-        call  #0xb915
-        cp #0x80
-        jr nz,gfr
-        ;; must be built in ROM
-
-        ;; v1.0 (BASIC 1.0 in CPC464)
-        ;; v1.1 (BASIC 1.1 in CPC664)
-        ;; v1.2 (BASIC 1.1 in CPC6128 and KC Compact)
-        ;; v1.4 (BASIC 1.1 in CPC+)
-
-        ld a,h
-        cp #0x1
-        ret z
-        ld a,l
-        or a
-        jr z,basic10       
-
-        ;; basic 1.1       
-  
-        ld hl,(#0xb073)
-        inc hl
-        ld bc,(#0xb736)
-        or a
-        sbc hl,bc
-        jr nz,after_himem11
-
-        ld hl,(#0xae6c)
-        ld (ram_start),hl
-
-        ld hl,(#0xb071)
-        ld (ram_end),hl
-gfr:
-	pop bc
-        ret
-
-after_himem11:
-
-        ;; after himem
-        ld hl,(#0xb073)
-        inc hl
-        ld (ram_start),hl
-        
-        ;; start of UDG
-        ld hl,(#0xb736)
-        dec hl
-        ld (ram_end),hl
-	pop bc
-        ret
-
-
-basic10:
-        ld hl,(#0xb08f)
-        inc hl
-        ld bc,(#0xb296)
-        or a
-        sbc hl,bc
-        jr nz,after_himem10
-
-        ld hl,(#0xae89)
-        ld (ram_start),hl
-
-        ld hl,(#0xb08d)
-        ld (ram_end),hl
-	pop bc
-        ret
-
-after_himem10:
-
-        ;; after himem
-        ld hl,(#0xb08f)
-        inc hl
-        ld (ram_start),hl
-
-        ;; start of UDG
-        ld hl,(#0xb296)
-        dec hl
-        ld (ram_end),hl
-	pop bc
-        ret
-
-_get_ram_start:: 
-	ld hl,(ram_start)
-	ret
-_get_ram_end::
-	ld hl,(ram_end)
-	ret
-	
-ram_start:: 
-	.dw 0
-ram_end:: 
-	.dw 0
diff --git a/contiki-cpc/contiki-cpc/arch/putchar.s b/contiki-cpc/contiki-cpc/arch/putchar.s
deleted file mode 100644
index cc98c8d..0000000
--- a/contiki-cpc/contiki-cpc/arch/putchar.s
+++ /dev/null
@@ -1,27 +0,0 @@
-;; File: putchar.s
-;; Modified to suit execution on the Amstrad CPC
-;; by H. Hansen 2003
-;; Original lines has been marked out!
-
-		.area _CODE
-_putchar::       
-_putchar_rr_s:: 
-        ld      hl,#2
-        add     hl,sp
-        
-        ld      a,(hl)
-;;      ld      a,#1
-;;      rst     0x08
-        call	0xBB5A
-        ret
-           
-_putchar_rr_dbs::
-
-;;      ld      l,e
-;;		ld		a,#1
-;;      rst     0x08
-
-        ld		a,e
-        call	0xBB5A
-        ret
-			
\ No newline at end of file
diff --git a/contiki-cpc/contiki-cpc/arch/uip.c b/contiki-cpc/contiki-cpc/arch/uip.c
deleted file mode 100644
index 76f0d0a..0000000
--- a/contiki-cpc/contiki-cpc/arch/uip.c
+++ /dev/null
@@ -1,9 +0,0 @@
-void chksumi()
-{
-}
-
-void add32i()
-{
-}
-
-
diff --git a/contiki-cpc/contiki-cpc/conf/FILES b/contiki-cpc/contiki-cpc/conf/FILES
deleted file mode 100644
index 72ec6f2..0000000
--- a/contiki-cpc/contiki-cpc/conf/FILES
+++ /dev/null
@@ -1,30 +0,0 @@
-The contiki/conf/ directory contains example configuration
-files.
-
-cc-conf.h.example
-
-  An example configuration file for C compiler tweaks.
-
-clock-conf.h.example
-
-  An example configuration file for the clock module.
-
-ctk-conf.h.example
-
-  An example configuration file for the CTK GUI module.
-
-ek-conf.h.example
-
-  An example configuration file for the Contiki event kernel.
-
-telnetd-conf.h.example
-
-  An example configuration file for the telnet server.
-
-uip-conf.h.example
-
-  An example configuration file for the uIP TCP/IP stack.
-
-www-conf.h.example
-
-  An example configuration file for the web browser.
\ No newline at end of file
diff --git a/contiki-cpc/contiki-cpc/conf/cc-conf.h b/contiki-cpc/contiki-cpc/conf/cc-conf.h
deleted file mode 100644
index 8ba952a..0000000
--- a/contiki-cpc/contiki-cpc/conf/cc-conf.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 OS
- *
- * $Id: cc-conf.h,v 1.1 2006/04/17 15:11:45 kthacker Exp $
- *
- */
-#ifndef __CC_CONF_H__
-#define __CC_CONF_H__
-
-/* This file is used to configure stuff that depends on the
-   capabilities of the C compiler used. */
-
-/* CC_CONF_REGISTER_ARGS: 1 or 0; 1 if the C compiler can handle the
-   "register" keyword in function argument, 0 otherwise. */
-#define CC_CONF_REGISTER_ARGS          0
-
-/* CC_CONF_FUNCTION_POINTR_ARGS: 1 or 0; 1 if the C compiler can
-   handle function arguments with function pointers, 0 otherwise. */
-#define CC_CONF_FUNCTION_POINTER_ARGS  1
-
-/* CC_CONF_FASTCALL: if the C compiler supports the fastcall keyword,
-   it should be defined here. If the C compiler does not support it,
-   leave the definition blank. 
-
-   Example:
-   #define CC_CONF_FASTCALL               fastcall */
-#define CC_CONF_FASTCALL
-
-#endif /* __CC_CONF_H__ */
-
diff --git a/contiki-cpc/contiki-cpc/conf/cc-conf.h.old b/contiki-cpc/contiki-cpc/conf/cc-conf.h.old
deleted file mode 100644
index c416ebf..0000000
--- a/contiki-cpc/contiki-cpc/conf/cc-conf.h.old
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 OS
- *
- * $Id: cc-conf.h.old,v 1.1 2006/04/17 15:11:45 kthacker Exp $
- *
- */
-#ifndef __CC_CONF_H__
-#define __CC_CONF_H__
-
-#define register			/**/
-#define CC_CONF_REGISTER_ARGS          0
-#define CC_CONF_FUNCTION_POINTER_ARGS  0
-
-#define CC_CONF_FASTCALL               /*fastcall*/
-
-#endif /* __CC_CONF_H__ */
-
diff --git a/contiki-cpc/contiki-cpc/conf/clock-conf.h b/contiki-cpc/contiki-cpc/conf/clock-conf.h
deleted file mode 100644
index a690e15..0000000
--- a/contiki-cpc/contiki-cpc/conf/clock-conf.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __CLOCK_CONF_H__
-#define __CLOCK_CONF_H__
-
-typedef unsigned short clock_time_t;
-
-#define CLOCK_CONF_SECOND CLK_TCK
-
-#endif /* __CLOCK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/ctk-conf.h b/contiki-cpc/contiki-cpc/conf/ctk-conf.h
deleted file mode 100644
index 8496fc2..0000000
--- a/contiki-cpc/contiki-cpc/conf/ctk-conf.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-#ifndef __CTK_CONF_H__
-#define __CTK_CONF_H__
-
-/*
- * This file is used for setting various compile time settings for the
- * CTK GUI toolkit.
-*/
-
-/* Defines which key that is to be used for activating the menus */
-#define CTK_CONF_MENU_KEY             CH_F1
-
-/* Defines which key that is to be used for switching the frontmost
-   window.  */
-#define CTK_CONF_WINDOWSWITCH_KEY     CH_F2
-
-/* Defines which key that is to be used for switching to the prevoius
-   widget.  */
-#define CTK_CONF_WIDGETUP_KEY         CH_F7
-
-/* Defines which key that is to be used for switching to the next
-   widget.  */
-#define CTK_CONF_WIDGETDOWN_KEY       CH_F4
-
-/* Toggles mouse support (must have support functions in the
-architecture specific files to work). */
-#define CTK_CONF_MOUSE_SUPPORT        0 /* 1342 bytes */
-
-/* Toggles support for icons. */
-#define CTK_CONF_ICONS                1 /* 107 bytes */
-
-/* Toggles support for icon bitmaps. */
-#define CTK_CONF_ICON_BITMAPS         1
-
-/* Toggles support for icon textmaps. */
-#define CTK_CONF_ICON_TEXTMAPS        1
-
-/* Toggles support for movable windows. */
-#define CTK_CONF_WINDOWMOVE           1 /* 333 bytes */
-
-/* Toggles support for closable windows. */
-#define CTK_CONF_WINDOWCLOSE          1 /* 14 bytes */
-
-/* Toggles support for menus. */
-#define CTK_CONF_MENUS                1 /* 1384 bytes */
-
-/* Defines the default width of a menu. */
-#define CTK_CONF_MENUWIDTH            16
-/* The maximum number of menu items in each menu. */
-#define CTK_CONF_MAXMENUITEMS         10
-
-/* Toggles support for screen savers. */
-#define CTK_CONF_SCREENSAVER          0
-
-#endif /* __CTK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/ctk-conf.h.old b/contiki-cpc/contiki-cpc/conf/ctk-conf.h.old
deleted file mode 100644
index 5c832c9..0000000
--- a/contiki-cpc/contiki-cpc/conf/ctk-conf.h.old
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2002, 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-conf.h.old,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-#ifndef __CTK_CONF_H__
-#define __CTK_CONF_H__
-
-//typedef char ctk_arch_key_t;
-
-#define ctk_arch_keyavail kbhit
-#define ctk_arch_getkey cgetc
-
-#undef CH_ENTER
-#define CH_ENTER 0x0d
-#define CH_STOP 0x01b
-#define CH_F1 0x031
-#define CH_F3 0x033
-#define CH_F5 0x035
-#define CH_F7 0x037
-#define CH_DEL 0x07f
-
-#define CH_CURS_LEFT 0x0f2
-#define CH_CURS_DOWN 0x0f1
-#define CH_CURS_RIGHT 0x0f3
-#define CH_CURS_UP 0x0f0
-
-#define CH_ESC 0x01b
-
-/*
- * This file is used for setting various compile time settings for the
- * CTK GUI toolkit.
-*/
-
-/* Defines which key that is to be used for activating the menus */
-#define CTK_CONF_MENU_KEY             CH_F1
-
-/* Defines which key that is to be used for switching the frontmost
-   window.  */
-#define CTK_CONF_WINDOWSWITCH_KEY     CH_F3
-
-
-#define CTK_CONF_WIDGETUP_KEY         CH_F5
-#define CTK_CONF_WIDGETDOWN_KEY       CH_F7
-
-/* Toggles mouse support (must have support functions in the
-architecture specific files to work). */
-#define CTK_CONF_MOUSE_SUPPORT        0 /* 1342 bytes */
-
-/* Toggles support for desktop icons. */
-#define CTK_CONF_ICONS                1 /* 107 bytes */
-
-/* Toggles support for movable windows. */
-#define CTK_CONF_WINDOWMOVE           1 /* 333 bytes */
-
-/* Toggles support for closable windows. */
-#define CTK_CONF_WINDOWCLOSE          1 /* 14 bytes */
-
-/* Toggles support for multiline text entry editing. */
-#define CTK_CONF_TEXTENTRY_MULTILINE  0 /* 118 bytes */
-
-/* Toggles support for menus. */
-#define CTK_CONF_MENUS                1 /* 1384 bytes */
-
-/* Defines the default width of a menu. */
-#define CTK_CONF_MENUWIDTH            16
-/* The maximum number of menu items in each menu. */
-#define CTK_CONF_MAXMENUITEMS         10
-
-/* Toggles support for screen savers. */
-#define CTK_CONF_SCREENSAVER          0
-
-#endif /* __CTK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/ctk-term-conf.h b/contiki-cpc/contiki-cpc/conf/ctk-term-conf.h
deleted file mode 100644
index e69de29..0000000
--- a/contiki-cpc/contiki-cpc/conf/ctk-term-conf.h
+++ /dev/null
diff --git a/contiki-cpc/contiki-cpc/conf/ctk-vncserver-conf.h b/contiki-cpc/contiki-cpc/conf/ctk-vncserver-conf.h
deleted file mode 100644
index fd45e81..0000000
--- a/contiki-cpc/contiki-cpc/conf/ctk-vncserver-conf.h
+++ /dev/null
@@ -1 +0,0 @@
-#define CTK_VNCSERVER_CONF_MAX_ICONS 1
diff --git a/contiki-cpc/contiki-cpc/conf/ek-conf.h b/contiki-cpc/contiki-cpc/conf/ek-conf.h
deleted file mode 100644
index bfbcfb1..0000000
--- a/contiki-cpc/contiki-cpc/conf/ek-conf.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ek" event kernel.
- *
- * $Id: ek-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-
-#ifndef __EK_CONF_H__
-#define __EK_CONF_H__
-
-#include <time.h>
-
-typedef void *ek_data_t;
-
-typedef unsigned char ek_event_t;
-typedef unsigned char ek_id_t;
-
-#define EK_CONF_EVENTS   32    /* Must be 2^n */
-#define EK_CONF_NUMEVENTS EK_CONF_EVENTS
-
-typedef unsigned char ek_num_events_t;
-
-#define EK_CONF_MAXPROCS 32
-
-#endif /* __EK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/ek-conf.h.old b/contiki-cpc/contiki-cpc/conf/ek-conf.h.old
deleted file mode 100644
index a64bbe7..0000000
--- a/contiki-cpc/contiki-cpc/conf/ek-conf.h.old
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 "ek" event kernel.
- *
- * $Id: ek-conf.h.old,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-
-#ifndef __EK_CONF_H__
-#define __EK_CONF_H__
-
-#include <time.h>
-
-typedef void *ek_data_t;
-
-typedef unsigned char ek_signal_t;
-typedef unsigned char ek_id_t;
-
-/* ek_ticks_t: should be defined to be the largest type that fits the
-   highest timeout value used by the system. For example, if all
-   timeouts are between 1 and 150, the ek_ticks_t can be typedef'd as
-   "unsigned char", but if the maximum timeout is over 256, "unsigned
-   short" is a better choise. */
-typedef unsigned short ek_ticks_t;
-
-/* ek_clock_t: should be defined to be the native clock ticks type
-   used by the underlying system. (Look for time_t or similar.) */
-typedef unsigned long ek_clock_t; 
-
-#define EK_CONF_NUMSIGNALS   16    /* Must be 2^n */
-typedef unsigned char ek_num_signals_t;
-
-#define EK_CONF_NUMTIMERS    4    /* Must be 2^n */
-typedef unsigned char ek_num_timers_t;
-
-#define EK_CONF_NUMLISTENERS  16    /* Must be 2^n */
-typedef unsigned char ek_num_listeners_t;
-
-#endif /* __EK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/irc-conf.h b/contiki-cpc/contiki-cpc/conf/irc-conf.h
deleted file mode 100644
index 056f71a..0000000
--- a/contiki-cpc/contiki-cpc/conf/irc-conf.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: irc-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- */
-#ifndef __IRC_CONF_H__
-#define __IRC_CONF_H__
-
-#define IRC_CONF_WIDTH 78
-#define IRC_CONF_HEIGHT 21
-
-#define IRC_CONF_SYSTEM_STRING "c64"
-
-#endif /* __IRC_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/libconio-conf.h b/contiki-cpc/contiki-cpc/conf/libconio-conf.h
deleted file mode 100644
index d420d5c..0000000
--- a/contiki-cpc/contiki-cpc/conf/libconio-conf.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LIBCONIO_CONF_SCREEN_WIDTH 40
-#define LIBCONIO_CONF_SCREEN_HEIGHT 25
diff --git a/contiki-cpc/contiki-cpc/conf/log-conf.h b/contiki-cpc/contiki-cpc/conf/log-conf.h
deleted file mode 100644
index 1036014..0000000
--- a/contiki-cpc/contiki-cpc/conf/log-conf.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LOG_CONF_ENABLED 0
diff --git a/contiki-cpc/contiki-cpc/conf/shell-gui-conf.h b/contiki-cpc/contiki-cpc/conf/shell-gui-conf.h
deleted file mode 100644
index 235b1c6..0000000
--- a/contiki-cpc/contiki-cpc/conf/shell-gui-conf.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SHELL_GUI_CONF_XSIZE 20
-#define SHELL_GUI_CONF_YSIZE 20
diff --git a/contiki-cpc/contiki-cpc/conf/telnetd-conf.h b/contiki-cpc/contiki-cpc/conf/telnetd-conf.h
deleted file mode 100644
index 8355598..0000000
--- a/contiki-cpc/contiki-cpc/conf/telnetd-conf.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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 Destop OS
- *
- * $Id: telnetd-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-#ifndef __TELNETD_CONF_H__
-#define __TELNETD_CONF_H__
-
-#define TELNETD_CONF_LINELEN 36
-#define TELNETD_CONF_NUMLINES 24
-
-#endif /* __TELNETD_CONF_H__ */
-
-
-
-
-
-
-
-
diff --git a/contiki-cpc/contiki-cpc/conf/uip-conf.h b/contiki-cpc/contiki-cpc/conf/uip-conf.h
deleted file mode 100644
index 8955c6d..0000000
--- a/contiki-cpc/contiki-cpc/conf/uip-conf.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * \file
- * uIP configuration file.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * This file contains configuration options for the uIP TCP/IP
- * stack. Each Contiki port will contain its own uip-conf.h file
- * containing architecture specific configuration options.
- *
- */
-
-/*
- * 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 Destop OS
- *
- * $Id: uip-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-#ifndef __UIP_CONF_H__
-#define __UIP_CONF_H__
-
-/**
- * The maximum number of TCP connections.
- *
- * Since the TCP connections are statically allocated, turning this
- * configuration knob down results in less RAM used. Each TCP
- * connection requires approximatly 30 bytes of memory.
- */
-#define UIP_CONF_MAX_CONNECTIONS 40
-
-/**
- * The maximum number of listening TCP ports.
- *
- * Each listening TCP port requires 2 bytes of memory.
- */
-#define UIP_CONF_MAX_LISTENPORTS 40
-
-/**
- * The size of the uIP packet buffer.
- *
- * The uIP packet buffer should not be smaller than 60 bytes, and does
- * not need to be larger than 1500 bytes. Lower size results in lower
- * TCP throughput, larger size results in higher TCP throughput.
- */
-#define UIP_CONF_BUFFER_SIZE     400
-
-/**
- * The host byte order.
- *
- * Used for telling uIP if the architecture has LITTLE_ENDIAN or
- * BIG_ENDIAN byte order. x86 CPUs have LITTLE_ENDIAN byte order,
- * whereas Motorola CPUs have BIG_ENDIAN. Check the documentation of
- * the CPU to find out the byte order.
- */
-#define UIP_CONF_BYTE_ORDER      LITTLE_ENDIAN
-
-
-/**
- * IP address configuration through ping.
- *
- * uIP features IP address configuration using an ICMP echo (ping)
- * packet. In this mode, the destination IP address of the first ICMP
- * echo packet that is received is used to set the host IP address.  
- */
-#define UIP_CONF_PINGADDRCONF    0
-#endif /* __UIP_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/uip-conf.h.old b/contiki-cpc/contiki-cpc/conf/uip-conf.h.old
deleted file mode 100644
index 8de8b7a..0000000
--- a/contiki-cpc/contiki-cpc/conf/uip-conf.h.old
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 Destop OS
- *
- * $Id: uip-conf.h.old,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-#ifndef __UIP_CONF_H__
-
-#define UIP_CONF_MAX_CONNECTIONS 10
-#define UIP_CONF_MAX_LISTENPORTS 10
-#define UIP_CONF_BUFFER_SIZE     310
-
-#define UIP_CONF_BYTE_ORDER      LITTLE_ENDIAN
-
-#endif /* __UIP_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/vnc-conf.h b/contiki-cpc/contiki-cpc/conf/vnc-conf.h
deleted file mode 100644
index 1e6906a..0000000
--- a/contiki-cpc/contiki-cpc/conf/vnc-conf.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 VNC client
- *
- * $Id: vnc-conf.h,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-
-#ifndef __VNC_CONF_H__
-
-#define VNC_CONF_VIEWPORT_WIDTH  (32*8)
-#define VNC_CONF_VIEWPORT_HEIGHT (16*8)
-
-#define VNC_CONF_REFRESH_ROWS    8
-
-#endif /* __VNC_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/vnc-conf.h.old b/contiki-cpc/contiki-cpc/conf/vnc-conf.h.old
deleted file mode 100644
index fedc904..0000000
--- a/contiki-cpc/contiki-cpc/conf/vnc-conf.h.old
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 VNC client
- *
- * $Id: vnc-conf.h.old,v 1.1 2006/04/17 15:11:46 kthacker Exp $
- *
- */
-
-
-#ifndef __VNC_CONF_H__
-
-#define VNC_CONF_VIEWPORT_WIDTH  (32*8)
-#define VNC_CONF_VIEWPORT_HEIGHT (16*8)
-
-#define VNC_CONF_REFRESH_ROWS    8
-
-#endif /* __VNC_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/www-conf.h b/contiki-cpc/contiki-cpc/conf/www-conf.h
deleted file mode 100644
index 5178724..0000000
--- a/contiki-cpc/contiki-cpc/conf/www-conf.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * \file
- * The Contiki web browser configuration file.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- */
-
-/*
- * Copyright (c) 2002-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: www-conf.h,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-#ifndef __WWW_CONF_H__
-#define __WWW_CONF_H__
-
-/**
- * The width of the web page viewing area, measured in characters.
- */
-#define WWW_CONF_WEBPAGE_WIDTH 36
-
-/**
- * The height of the web page viewing area, measured in characters.
- */
-#define WWW_CONF_WEBPAGE_HEIGHT 17
-
-/**
- * The size of the "Back" history.
- */
-#define WWW_CONF_HISTORY_SIZE 4
-
-/**
- * The maximum length of the URLs the web browser will handle.
- */
-#define WWW_CONF_MAX_URLLEN 100
-
-/**
- * The maxiumum number of widgets (i.e., hyperlinks, form elements) on
- * a single web page view.
- *
- * \note This does not limit the total number of widgets in a web
- * page, only the number of widget that are visible simultaneously.
- */
-#define WWW_CONF_MAX_NUMPAGEWIDGETS 20
-
-/**
- * Turns support for the \<center\> tag on or off, and must be on for
- * HTML forms to work.
- */
-#define WWW_CONF_RENDERSTATE 1
-
-/**
- * Toggles support for HTML forms.
- */
-#define WWW_CONF_FORMS       1
-
-/**
- * Maximum length of HTML form action URLs.
- */
-#define WWW_CONF_MAX_FORMACTIONLEN  40
-
-/**
- * Maximum length of HTML form name.
- */
-#define WWW_CONF_MAX_FORMNAMELEN    20
-
-/**
- * Maximum length of HTML form input name.
- */
-#define WWW_CONF_MAX_INPUTNAMELEN   20
-
-/**
- * Maximum length of HTML form input value.
- */
-#define WWW_CONF_MAX_INPUTVALUELEN  (WWW_CONF_WEBPAGE_WIDTH - 1)
-
-/**
- * The defaule home page.
- */
-#define WWW_CONF_HOMEPAGE "http://contiki.c64.org/"
-
-#endif /* __WWW_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/conf/www-conf.h.old b/contiki-cpc/contiki-cpc/conf/www-conf.h.old
deleted file mode 100644
index 9ac8b4b..0000000
--- a/contiki-cpc/contiki-cpc/conf/www-conf.h.old
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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: www-conf.h.old,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-#ifndef __WWW_CONF_H__
-#define __WWW_CONF_H__
-
-#define WWW_CONF_HOMEPAGE "http://contiki.c64.org/"
-
-/* The size of the HTML viewing area. */
-#define WWW_CONF_WEBPAGE_WIDTH 36
-#define WWW_CONF_WEBPAGE_HEIGHT 17
-
-/* The size of the "Back" history. */
-#define WWW_CONF_HISTORY_SIZE 4
-
-/* Defines the maximum length of an URL */
-#define WWW_CONF_MAX_URLLEN 65
-
-/* The maxiumum number of widgets (i.e., hyperlinks, form elements) on
-   a page. */
-#define WWW_CONF_MAX_NUMPAGEWIDGETS 26
-
-/* Turns <center> support on or off; must be on for forms to work. */
-#define WWW_CONF_RENDERSTATE 1
-
-/* Toggles support for HTML forms. */
-#define WWW_CONF_FORMS       1
-
-/* Maximum lengths for various HTML form parameters. */
-#define WWW_CONF_MAX_FORMACTIONLEN  30
-#define WWW_CONF_MAX_FORMNAMELEN    20
-#define WWW_CONF_MAX_INPUTNAMELEN   20
-
-#define WWW_CONF_MAX_INPUTVALUELEN  (WWW_CONF_WEBPAGE_WIDTH - 1)
-
-#endif /* __WWW_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/conio.h b/contiki-cpc/contiki-cpc/ctk/conio.h
deleted file mode 100644
index e8c3cdb..0000000
--- a/contiki-cpc/contiki-cpc/ctk/conio.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- CONIO.H - Console I/O library for the Amsrad CPC
- To use with the Small Devices C Compiler
- CONIO.H is a implementation of the Contiki CONIO.H (Derived from the borland CONIO.H)
-
- 2003 H. Hansen
-*/
-
-#ifndef  __conio_h__
-#define __conio_h__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "arch.h"
-
-#define CH_ULCORNER 0x096
-#define CH_URCORNER 0x09c
-#define CH_LLCORNER 0x093
-#define CH_LRCORNER 0x099
-
-void clrscr (void);
-
-unsigned char kbhit (void);
-
-void gotox (unsigned char x);
-
-void gotoy (unsigned char y);
-
-void gotoxy (unsigned char x, unsigned char y);
-
-unsigned char wherex (void);
-
-unsigned char wherey (void);
-
-void cputc (char c);
-
-void cputcxy (unsigned char x, unsigned char y, char c);
-
-void cputs (char* s);
-
-char cgetc (void);
-
-void  revers ();
-
-void textcolor (unsigned char color);
-
-void bgcolor (unsigned char color);
-
-void  bordercolor (unsigned char color);
-
-void chline (unsigned char length);
-
-void chlinexy (unsigned char x, unsigned char y, unsigned char length);
-
-void cvline (unsigned char length);
-
-void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
-
-void cclear (unsigned char length);
-
-void cclearxy (unsigned char x, unsigned char y, unsigned char length);
-
-void screensize (unsigned char* x, unsigned char* y);
-
-#endif /* __conio_h__ */
-
diff --git a/contiki-cpc/contiki-cpc/ctk/ctk-arch.h b/contiki-cpc/contiki-cpc/ctk/ctk-arch.h
deleted file mode 100644
index b043013..0000000
--- a/contiki-cpc/contiki-cpc/ctk/ctk-arch.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-arch.h,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-
-#ifndef __CTK_ARCH_H__
-#define __CTK_ARCH_H__
-
-#if CTK_HIRES
-#include "ctk-hires.h"
-#endif 
-
-#if CTK_CONIO
-#include "ctk-conio.h"
-#endif 
-
-#if CTK_VNCSERVER
-#include "ctk-vncarch.h"
-#endif
-
-#include <ctype.h>
-
-//#define ctk_arch_isprint(c) isprint(c)
-
-#include "ctk-arch2.h"
-
-
-#endif /* __CTK_ARCH_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/ctk-arch2.h b/contiki-cpc/contiki-cpc/ctk/ctk-arch2.h
deleted file mode 100644
index 1d39254..0000000
--- a/contiki-cpc/contiki-cpc/ctk/ctk-arch2.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*#include "fire.h"*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-//char *strncpy(char *, const char *, unsigned int);
-
-//typedef char ctk_arch_key_t;
-
-#define ctk_arch_keyavail kbhit
-#define ctk_arch_getkey cgetc
-
-// have to undefine because of it being defined in
-// ctk-conio.h
-#undef CH_ENTER
-#undef CH_F1
-#undef CH_F3
-#undef CH_CURS_LEFT
-#undef CH_CURS_RIGHT
-
-#define CH_ENTER 0x0d
-#define CH_STOP 0x01b
-#define CH_F1 0x031
-#define CH_F2 0x032
-#define CH_F3 0x033
-#define CH_F4 0x034
-#define CH_F5 0x035
-#define CH_F6 0x036
-#define CH_F7 0x037
-#define CH_DEL 0x07f
-#define CH_TAB 0x09
-#define CH_CURS_LEFT 0x0f2
-#define CH_CURS_DOWN 0x0f1
-#define CH_CURS_RIGHT 0x0f3
-#define CH_CURS_UP 0x0f0
-
-#define CH_ESC CH_STOP
-
diff --git a/contiki-cpc/contiki-cpc/ctk/ctk-conf.h.old b/contiki-cpc/contiki-cpc/ctk/ctk-conf.h.old
deleted file mode 100644
index 84666d0..0000000
--- a/contiki-cpc/contiki-cpc/ctk/ctk-conf.h.old
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2002, 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-conf.h.old,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-
-#ifndef __CTK_CONF_H__
-#define __CTK_CONF_H__
-
-//typedef char ctk_arch_key_t;
-
-#define ctk_arch_keyavail kbhit
-#define ctk_arch_getkey cgetc
-
-#undef CH_ENTER
-#define CH_ENTER 0x0d
-#define CH_STOP 0x01b
-#define CH_F1 0x031
-#define CH_F3 0x033
-#define CH_F5 0x035
-#define CH_F7 0x037
-#define CH_DEL 0x07f
-
-#define CH_CURS_LEFT 0x0f2
-#define CH_CURS_DOWN 0x0f1
-#define CH_CURS_RIGHT 0x0f3
-#define CH_CURS_UP 0x0f0
-
-#define CH_ESC 0x01b
-
-/*
- * This file is used for setting various compile time settings for the
- * CTK GUI toolkit.
-*/
-
-/* Defines which key that is to be used for activating the menus */
-#define CTK_CONF_MENU_KEY             CH_F1
-
-/* Defines which key that is to be used for switching the frontmost
-   window.  */
-#define CTK_CONF_WINDOWSWITCH_KEY     CH_F3
-
-
-#define CTK_CONF_WIDGETUP_KEY         CH_F5
-#define CTK_CONF_WIDGETDOWN_KEY       CH_F7
-
-/* Toggles mouse support (must have support functions in the
-architecture specific files to work). */
-#define CTK_CONF_MOUSE_SUPPORT        0 /* 1342 bytes */
-
-/* Toggles support for desktop icons. */
-#define CTK_CONF_ICONS                1 /* 107 bytes */
-
-/* Toggles support for movable windows. */
-#define CTK_CONF_WINDOWMOVE           1 /* 333 bytes */
-
-/* Toggles support for closable windows. */
-#define CTK_CONF_WINDOWCLOSE          1 /* 14 bytes */
-
-/* Toggles support for multiline text entry editing. */
-#define CTK_CONF_TEXTENTRY_MULTILINE  0 /* 118 bytes */
-
-/* Toggles support for menus. */
-#define CTK_CONF_MENUS                1 /* 1384 bytes */
-
-/* Defines the default width of a menu. */
-#define CTK_CONF_MENUWIDTH            16
-/* The maximum number of menu items in each menu. */
-#define CTK_CONF_MAXMENUITEMS         10
-
-/* Toggles support for screen savers. */
-#define CTK_CONF_SCREENSAVER          0
-
-#endif /* __CTK_CONF_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/ctk-conio-conf.h b/contiki-cpc/contiki-cpc/ctk/ctk-conio-conf.h
deleted file mode 100644
index 89c47c5..0000000
--- a/contiki-cpc/contiki-cpc/ctk/ctk-conio-conf.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-conio-conf.h,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-
-#ifndef __CTK_CONIO_CONF_H__
-#define __CTK_CONIO_CONF_H__
-
-/* Black and white monocrome color scheme: */
-#define BORDERCOLOR         0
-#define SCREENCOLOR         0
-
-#define BACKGROUNDCOLOR		0
-
-
-#define WINDOWCOLOR_FOCUS   1		/* colour of window which has focus */
-#define WINDOWCOLOR         2		/* colour of window which doesn't have focus */
-
-#define DIALOGCOLOR         1
-
-#define WIDGETCOLOR_HLINK   3
-#define WIDGETCOLOR_FWIN    2		/* colour of widget */
-#define WIDGETCOLOR         2
-#define WIDGETCOLOR_DIALOG  2
-#define WIDGETCOLOR_FOCUS   3		/* colour of widge which has focus */
-
-// 0 = blue
-// 1 = yellow
-// 2 = cyan
-// 3 = red
-
-#define MENUCOLOR           2
-#define OPENMENUCOLOR       1	
-#define ACTIVEMENUITEMCOLOR 3
-
-#endif
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.S b/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.S
deleted file mode 100644
index 4df6cad..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.S
+++ /dev/null
@@ -1,986 +0,0 @@
-
-;---------------------------------------------------------------------       
-	.importzp       ptr1, ptr2, ptr3, ptr4, sreg
-	.importzp	sp
-
-	.import		pushax
-	.import		incsp2
-
-	.import		_ctk_80col_screencolors
-	.import		_ctk_80col_screenpattern	
-		
-	.import		_ctk_80col_lefttab
-	.import		_ctk_80col_righttab
-	
-	.import		_ctk_80col_cursx
-	.import		_ctk_80col_cursy
-	.import		_ctk_80col_color
-	.import		_ctk_80col_underline	
-	.import		_ctk_80col_reversed
-
-	.import		_ctk_80col_yscreenaddr
-	.import		_ctk_80col_yhiresaddr
-
-	.import		_ctk_80col_windowparams
-	
-	.import		_ctk_80col_bitmapptr
-
-	.import		_ctk_80col_versionstring
-	.import		_ctk_80col_versionstring_len	
-	
-	.import		_ctk_80col_theme
-			
-	.export		_ctk_80col_cclear
-	.export		_ctk_80col_chline
-	.export		_ctk_80col_cputc
-	.export		_ctk_80col_cputsn
-	
-	.export		_ctk_80col_clear_line
-	.export		_ctk_80col_draw_bitmapline
-	
-	.export		_ctk_80col_draw_windowborders
-
-;---------------------------------------------------------------------
-
-ptr5 = sreg
-
-	;; Offsets in the theme struct
-
-	ulcornerpattern =	8
-	titlebarpattern =	ulcornerpattern+8
-	urcornerpattern =	titlebarpattern+8
-	rborderpattern  =	urcornerpattern+8
-	lrcornerpattern =	rborderpattern+8
-	lowerborderpattern =	lrcornerpattern+8
-	llcornerpattern =	lowerborderpattern+8
-	lborderpattern =	llcornerpattern+8
-
-	
-	buttonleftpattern =	lborderpattern+8
-	buttonrightpattern =	buttonleftpattern+8
-
-				
-.bss
-tmp01:	.res 1
-tmpl:	.res 1
-tmpf:	.res 1
-tmpc:	.res 1
-tmpw:	.res 1	
-tmpptr:	.res 2
-
-tmpy:	.res 1
-tmph:	.res 1
-
-	;; Window border parameters	
-w:	.res 1
-wpw          = 0
-h:	.res 1
-wph          = 1	
-clipy1:	.res 1
-wpclipy1     = 2
-clipy2:	.res 1
-wpclipy2     = 3	
-color1:	.res 1
-wpcolor1     = 4	
-color2:	.res 1
-wpcolor2     = 5	
-titlecolor:  .res 1
-wptitlecolor = 6
-titlelen:    .res 1
-wptitlelen   = 7
-title:	.res 2
-wptitle      = 8
-	
-;---------------------------------------------------------------------
-.data
-;---------------------------------------------------------------------
-.code
-setupptrs:	
-	;; Find hires address.	
-	lda _ctk_80col_cursy
-	asl
-	tax
-	lda _ctk_80col_yhiresaddr,x
-	sta ptr2
-	lda _ctk_80col_yhiresaddr+1,x
-	sta ptr2+1
-
-	;; Add X coordinate to the hires address. 
-	lda #0
-	sta ptr1+1
-	lda _ctk_80col_cursx
-	asl
-	rol ptr1+1
-; 	asl	
-; 	rol ptr1+1	
-	asl
-	rol ptr1+1
-	clc
-	adc ptr2
-	and #$f8
-	sta ptr2
-	lda ptr2+1
-	adc ptr1+1
-	sta ptr2+1
-
-	;; Find screen address. 
-	lda _ctk_80col_cursy
-	asl
-	tax
-	lda _ctk_80col_cursx
-	lsr
-	clc
-	adc _ctk_80col_yscreenaddr,x
-	sta ptr1
-	lda _ctk_80col_yscreenaddr+1,x
-	adc #0
-	sta ptr1+1
-	
-	;; Turn off interrupts, prepare $01 to store color data in RAM
-	;; under I/O area.		
-	sei
-	lda $01
-	sta tmp01
-	and #$f8
-	sta $01
-	rts
-;---------------------------------------------------------------------	
-restore01:	
-	lda tmp01
-	sta $01
-	cli
-	rts		
-;---------------------------------------------------------------------
-_ctk_80col_cclear:
-	sta tmpl
-	cmp #0
-	bne @norts
-	rts
-@norts:		
-		
-	jsr setupptrs		
-
-	ldy tmpl
-	lda _ctk_80col_color
-:		
-	sta (ptr1),y
-	dey
-	bpl :-
-	
-	;; Store either $00 or $ff in hires memory, depending on the
-	;; reversed flag		
-	
-	ldx tmpl
-	lda _ctk_80col_reversed
-	beq @noff
-	lda #$ff
-@noff:		
-	sta tmpf
-
-		
-@loop1:
-	ldy #7
-	lda tmpf
-@loop2:
-	sta (ptr2),y
-	dey
-	bpl @loop2
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc @noinc
-	inc ptr2+1
-@noinc:		
-
-	inc _ctk_80col_cursx
-
-	dex
-	bpl @loop1
-
-	jmp restore01
-;---------------------------------------------------------------------
-_ctk_80col_chline:
-	sta tmpl
-	cmp #0
-	bne @norts
-	rts
-@norts:	
-			
-	jsr setupptrs		
-
-	;; Store horizontal line pattern in hires memory
-	ldx tmpl
-@loop1:
-	ldy #0
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$ff
-	sta (ptr2),y
-	iny
-	lda #$ff
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc @noinc
-	inc ptr2+1
-@noinc:	
-
-	inc _ctk_80col_cursx
-
-	dex
-	bne @loop1
-
-	jmp restore01
-;---------------------------------------------------------------------	
-_ctk_80col_cputc:
-	sta tmpc
-
-	jsr setupptrs
-	
-	;; Turn on font ROM
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	lda #0
-	sta ptr1+1		  
-	
-	;; Convert from PETSCII to screen encoding
-	lda tmpc
-	eor #$e0
-	clc
-	adc #$20
-	bpl @cont
-	adc #$40
-	bpl @cont
-	eor #$a0
-@cont:
-	ldx _ctk_80col_reversed
-	beq :+
-	eor #$80
-:		
-
-	;; Convert to address in character ROM
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	sta ptr1
-	lda #$d8
-	adc ptr1+1
-	sta ptr1+1
-
-	lda _ctk_80col_cursx
-	and #1
-	beq @left
-
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_80col_underline
-	beq @rightnounderline
-	eor #$ff
-@rightnounderline:
-	tax
-	lda (ptr2),y
-	and #$f0
-	ora _ctk_80col_righttab,x	
- 	sta (ptr2),y
-	dey
-@rightloop:
-	lda (ptr1),y
-	tax
-	lda (ptr2),y
-	and #$f0
-	ora _ctk_80col_righttab,x	
- 	sta (ptr2),y
-	dey
-	bpl @rightloop	
-	
-	inc _ctk_80col_cursx	
-	
-	jmp restore01		
-	
-@left:		
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_80col_underline
-	beq @nounderline
-	eor #$ff
-@nounderline:
-	tax
-	lda (ptr2),y
-	and #$0f
-	ora _ctk_80col_lefttab,x	
- 	sta (ptr2),y
-	dey
-@loop:
-	lda (ptr1),y
-	tax
-	lda (ptr2),y
-	and #$0f
-	ora _ctk_80col_lefttab,x	
- 	sta (ptr2),y
-	dey
-	bpl @loop
-
-	
-	
-	inc _ctk_80col_cursx	
-	
-	jmp restore01		
-;---------------------------------------------------------------------
-_ctk_80col_cputsn:
-	sta tmpl
-	cmp #0
-	bne :+
-        jmp incsp2	
-:		
-
-	jsr setupptrs
-	
-	;; Turn on font ROM
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	;; Output each character from the string
-	lda #0
-	sta tmpc
-	ldy #0
-	lda (sp),y
-	sta ptr3
-	iny
-	lda (sp),y
-	sta ptr3+1	
-	
-@loop1:		
-
-	
-	lda #0
-	sta ptr1+1		  	
-
-	ldy tmpc
-	lda (ptr3),y
-	bne :+
-	jmp @end
-:	
-			
-	;; Convert from PETSCII to screen encoding
-	eor #$e0
-	clc
-	adc #$20
-	bpl @cont
-	adc #$40
-	bpl @cont
-	eor #$a0
-@cont:
-	ldx _ctk_80col_reversed
-	beq :+
-	eor #$80
-:		
-
-	;; Convert to address in character ROM
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	sta ptr1
-	lda #$d8
-	adc ptr1+1
-	sta ptr1+1
-
-	lda _ctk_80col_cursx
-	and #1
-	beq @left
-
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_80col_underline
-	beq @rightnounderline
-	eor #$ff
-@rightnounderline:
-	tax
-	lda (ptr2),y
-	and #$f0
-	ora _ctk_80col_righttab,x	
- 	sta (ptr2),y
-	dey
-@rightloop:
-	lda (ptr1),y
-	tax
-	lda (ptr2),y
-	and #$f0
-	ora _ctk_80col_righttab,x	
- 	sta (ptr2),y
-	dey
-	bpl @rightloop	
-
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc :+
-	inc ptr2+1
-:	
-	
-	inc _ctk_80col_cursx	
-	
-	jmp @loopend
-	
-@left:		
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_80col_underline
-	beq @nounderline
-	eor #$ff
-@nounderline:
-	tax
-	lda (ptr2),y
-	and #$0f
-	ora _ctk_80col_lefttab,x	
- 	sta (ptr2),y
-	dey
-@loop:
-	lda (ptr1),y
-	tax
-	lda (ptr2),y
-	and #$0f
-	ora _ctk_80col_lefttab,x	
- 	sta (ptr2),y
-	dey
-	bpl @loop
-			
-	inc _ctk_80col_cursx	
-@loopend:
-	inc tmpc
-	lda tmpc
-	cmp tmpl
-	beq :+
-	jmp @loop1
-:	
-	
-@end:
-	jsr restore01
-	
-        jmp incsp2	
-;---------------------------------------------------------------------
-_ctk_80col_clear_line:
-	sta tmpl
-	asl
-	tax
-	lda _ctk_80col_yscreenaddr,x
-	sta ptr1
-	lda _ctk_80col_yscreenaddr+1,x
-	sta ptr1+1	
-	lda _ctk_80col_yhiresaddr,x
-	sta ptr2
-	lda _ctk_80col_yhiresaddr+1,x
-	sta ptr2+1
-	
-	sei
-	lda $01
-	sta tmp01
-	and #$f8
-	sta $01
-
-	ldy #39
-	ldx tmpl
-	lda _ctk_80col_screencolors,x
-:	
-	sta (ptr1),y
-	dey
-	bpl :-
-
-	lda tmpl
-	asl
-	asl
-	asl
-	tax
-	ldy #0
-:
-	lda _ctk_80col_screenpattern,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+1,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+2,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+3,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+4,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+5,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+6,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+7,x
-	sta (ptr2),y
-	iny
-	bne :-
-
-	inc ptr2+1
-	
-:	
-	lda _ctk_80col_screenpattern,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+1,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+2,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+3,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+4,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+5,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+6,x
-	sta (ptr2),y
-	iny
-	lda _ctk_80col_screenpattern+7,x
-	sta (ptr2),y
-	iny
-	cpy #$40
-	bne :-
-
-	lda tmpl
-	cmp #24
-	bne :+			
-
-	sta _ctk_80col_cursy
-	lda #2
-	sta _ctk_80col_cursx
-
-	jsr restore01
-		
-	lda #<_ctk_80col_versionstring
-	ldx #>_ctk_80col_versionstring
- 	jsr pushax		
-	lda _ctk_80col_versionstring_len
-	jmp _ctk_80col_cputsn
-:		
-	jmp restore01	
-;---------------------------------------------------------------------	
-_ctk_80col_draw_bitmapline:
-	sta tmpl
-	cmp #0
-	bne :+
-	rts
-:		
-
-	jsr setupptrs
-	
-	ldy #0	
-	lda _ctk_80col_color
-:	
-	sta (ptr1),y	
-	iny
-	cpy tmpl
-	bne :-
-
-	lda _ctk_80col_bitmapptr
-	sta ptr1
-	lda _ctk_80col_bitmapptr+1
-	sta ptr1+1
-	
-	ldy #0
-	ldx #0
-:		
-	lda (ptr1),y
- 	sta (ptr2),y		
-	iny
-	inx
-	cpx #8
-	bne :-
-
-	ldx #0
-	
-	dec tmpl
-	bne :-
-	
-	jmp restore01	
-;---------------------------------------------------------------------
-_ctk_80col_draw_windowborders:
-
-	jsr setupptrs
-
-	lda _ctk_80col_windowparams + wpclipy1
-	beq :+
-	jmp @nofirstline
-:		
-	
-	;; Draw first line of the border, including the window title
-
-	;; Start with filling color memory
-	lda _ctk_80col_windowparams + wpw
-	sta tmpw	
-
-	
-	ldy #0
-	lda _ctk_80col_windowparams + wptitlecolor	
-:	
-	sta (ptr1),y
-	iny
-	cpy tmpw
-	bcc :-
-
-	dec tmpw
-
-	;; Set color for upper right corner
-	sta (ptr1),y	
-	iny
-	sta (ptr1),y
-		
-	
-	;; Turn on font ROM for drawing the title
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	;; Use a temporary pointer (ptr3) rather than ptr2 so we can
-	;; reuse it later.
-	lda ptr2
-	sta ptr3
-	lda ptr2+1
-	sta ptr3+1
-		
-	;; Draw upper left corner
-	ldy #7
-:	
-	lda _ctk_80col_theme+ulcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	clc
-	adc #$8
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-
-	
-	;; Draw window title bar pattern
-@titlebarloop:	
-	ldy #7
-:
-	lda _ctk_80col_theme+titlebarpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	clc
-	adc #$8
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-	;; Loop until we are three characters away from right border
-	;; to avoid flickering since we would be overwriting the close
-	;; button.
-	dec tmpw
-	bpl @titlebarloop
-
-	;; Draw upper right corner piece
-	ldy #7
-:
-	lda _ctk_80col_theme+urcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-
-@nofirstline:
-
-
-	ldx _ctk_80col_windowparams + wph
-	inx
-	stx tmph
-
-	;; Draw left and right borders
-
-	;; Fill color memory (pointer in ptr1, setup by setupptrs)
-
-	;; First check how much we actually should draw by inspecting
-	;; the clipy1 and clipy2 fields in the _ctk_80col_windowparams 
-	;; structure		
-
-	lda #1
-	sta tmpy
-	
-	ldx _ctk_80col_windowparams + wpclipy1
-@clipy1loop:
-	cpx #0
-	beq @clipy1loopend
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-
-	inc tmpy
-	
-	dex
-	jmp @clipy1loop
-@clipy1loopend:	
-
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-		
-	ldx tmpy
-	ldy _ctk_80col_windowparams + wpw
-	iny
-	sty tmpw
-@bordercloop:
-	cpx _ctk_80col_windowparams + wpclipy2
-	beq @bordercloopend
-	
-	ldy tmpw
-	lda _ctk_80col_windowparams + wpcolor2
-	sta (ptr1),y
-	ldy #0
-	lda _ctk_80col_windowparams + wpcolor1
-	sta (ptr1),y
-
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-	
-	inx
-	cpx tmph
-	bcc @bordercloop
-	beq @bordercloop	
-@bordercloopend:
-
-	
-	;; Fill color memory for lower border, if clipy2 allows
-	cpx _ctk_80col_windowparams + wpclipy2
-	beq @noclowerborder
-
-	lda ptr1
-	sec
-	sbc #$28
-	sta ptr1
-	bcs :+
-	dec ptr1+1
-:
-		
-	ldy _ctk_80col_windowparams + wpw
-	lda _ctk_80col_windowparams + wpcolor2		
-@lbordercloop:	
-	sta (ptr1),y
-	dey
-	bne @lbordercloop
-	
-@noclowerborder:	
-		
-	;; Draw right border
-	ldx tmpy
-@rborderloop:
-	cpx _ctk_80col_windowparams + wpclipy2
-	beq @rborderloopend
-
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-
-	ldy #7
-:
-	lda _ctk_80col_theme+rborderpattern,y		
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	inx
-	cpx tmph
-	bne @rborderloop	
-@rborderloopend:
-	
- 	cpx _ctk_80col_windowparams + wpclipy2 
- 	beq @norbordercorner
-	
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-	
-	;; Draw lower right corner, if clipy2 allows it
-	ldy #7
-:		
-	lda _ctk_80col_theme+lrcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-@norbordercorner:	
-
-	stx tmpy
-		
-	;; Draw lower border
-	ldx _ctk_80col_windowparams + wpw
-
-@lowerborderloop:
-	lda ptr3
-	sec
-	sbc #$8
-	sta ptr3
-	bcs :+
-	dec ptr3+1
-:	
-
-	lda tmpy
-	cmp _ctk_80col_windowparams + wpclipy2
-	beq @nolowerborder
-	
-	ldy #7
-:	
-	lda _ctk_80col_theme+lowerborderpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-@nolowerborder:	
-		
-	dex
-	bne @lowerborderloop
-
-	lda ptr3
-	sec
-	sbc #$8
-	sta ptr3
-	bcs :+
-	dec ptr3+1
-:	
-
-
-	ldx tmpy
- 	cpx tmph
- 	bne @nolbordercorner
-	
-	;; Draw lower left corner, if clipy2 allows it
-	ldy #7
-:		
-	lda _ctk_80col_theme+llcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	sec
-	sbc #$40
-	sta ptr3
-	lda ptr3+1
-	sbc #1
-	sta ptr3+1
-
-@nolbordercorner:	
-				
-	;; Draw left border
-
-	
-		
-@lborderloop:
-	cpx #1
-	beq @lborderloopend
-	cpx _ctk_80col_windowparams + wpclipy1
-	bcc @lborderloopend
-	
-	ldy #7
-:
-	lda _ctk_80col_theme+lborderpattern,y	
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	sec
-	sbc #$40
-	sta ptr3
-	lda ptr3+1
-	sbc #1
-	sta ptr3+1
-	
-	dex
-	jmp @lborderloop
-	
-@lborderloopend:		
-
-	
-	jmp restore01
-;---------------------------------------------------------------------	
-	
\ No newline at end of file
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.h b/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.h
deleted file mode 100644
index 21787d4..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-asm.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-80col-asm.h,v 1.1 2006/04/17 15:11:47 kthacker Exp $
- *
- */
-
-#ifndef __CTK_80COL_ASM_H__
-#define __CTK_80COL_ASM_H__
-
-void __fastcall__ ctk_80col_cclear(unsigned char len);
-void __fastcall__ ctk_80col_chline(unsigned char len);
-void __fastcall__ ctk_80col_cputc(unsigned char c);
-void __fastcall__ ctk_80col_cputsn(unsigned char *str,
-				      unsigned char len);
-
-void ctk_80col_draw_buttonleft(void);
-void ctk_80col_draw_buttonright(void);
-
-struct ctk_80col_windowparams {
-  unsigned char w;
-  unsigned char h;
-  unsigned char clipy1;
-  unsigned char clipy2;
-  unsigned char color1;
-  unsigned char color2;
-  unsigned char titlecolor;
-  unsigned char titlelen;
-  char *title;
-};
-extern struct ctk_80col_windowparams ctk_80col_windowparams;
-void ctk_80col_draw_windowborders(void);
-
-extern unsigned char ctk_80col_cursx,
-  ctk_80col_cursy,
-  ctk_80col_color,
-  ctk_80col_reversed,
-  ctk_80col_underline;
-
-
-void __fastcall__ ctk_80col_draw_bitmapline(unsigned char len);
-
-void __fastcall__ ctk_80col_clear_line(unsigned char len);
-
-#endif /* __CTK_80COL_ASM_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-theme.h b/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-theme.h
deleted file mode 100644
index ffc168c..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col-theme.h
+++ /dev/null
@@ -1,83 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-80col-theme.h,v 1.1 2006/04/17 15:11:48 kthacker Exp $
- *
- */
-#ifndef __CTK_80COL_THEME_H__
-#define __CTK_80COL_THEME_H__
-
-struct ctk_80col_theme {
-  /* Version string. */
-  char version[8];
-  
-  /* Window borders patterns. */
-  unsigned char ulcorner[8], /* Upper left corner. */
-    titlebar[8],             /* Title bar pattern. */
-    urcorner[8],             /* Upper right corner. */
-    rightborder[8],          /* Right border. */
-    lrcorner[8],             /* Lower right corner. */
-    lowerborder[8],          /* Lower border. */
-    llcorner[8],             /* Lower left corner. */
-    leftborder[8];           /* Left border. */
-
-  /* Button corner patterns. */
-  unsigned char buttonleftpattern[8],
-    buttonrightpattern[8];
-
-  /* Menu border patterns. */
-  unsigned char menuleftpattern[8],
-    menurightpattern[8];
-  
-
-
-  /* Window and widget colors. */
-  unsigned char windowcolors[6],
-    separatorcolors[6],
-    labelcolors[6],
-    buttoncolors[6],
-    hyperlinkcolors[6],
-    textentrycolors[6],
-    bitmapcolors[6],
-    textmapcolors[6],
-    iconcolors[6];
-
-  /* Menu colors. */
-  unsigned char menucolor,
-    openmenucolor,
-    activemenucolor;
-
-};
-
-extern struct ctk_80col_theme ctk_80col_theme;
-extern struct ctk_80col_theme *ctk_80col_theme_ptr;
-
-#endif /* __CTK_80COL_THEME_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col.c
deleted file mode 100644
index fc7d5f6..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-80col.c
+++ /dev/null
@@ -1,1200 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: ctk-80col.c,v 1.2 2006/05/28 20:42:34 oliverschmidt Exp $
- */
-
-#include "contiki.h"
-
-#include "ctk.h"
-#include "ctk-draw.h"
-#include "ctk-draw-service.h"
-
-#include "ctk-80col-asm.h"
-
-#include "ctk-80col-theme.h"
-
-#include <string.h>
-
-unsigned char ctk_80col_cursx, ctk_80col_cursy;
-unsigned char ctk_80col_reversed;
-unsigned char ctk_80col_color;
-unsigned char *ctk_80col_bitmapptr;
-unsigned char ctk_80col_underline = 0;
-
-#define SCREEN_HEIGHT 25
-#define SCREEN_WIDTH  80
-
-#define SCREENADDR 0xdc00
-#define HIRESADDR  0xe000
-
-unsigned char ctk_80col_lefttab[256];
-unsigned char ctk_80col_righttab[256];
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define COLOR_DIALOG            0x01
-#define COLOR_FOCUS_WINDOW      0xbf
-#define COLOR_BACKGROUND_WINDOW 0x0c
-
-#define color(c) ctk_80col_color = c
-
-#define BGCOLOR1 7
-#define BGCOLOR2 10
-#define BGCOLOR3 4
-#define BGCOLOR4 6
-
-unsigned char ctk_80col_screencolors[25] =
-  {COLOR(BGCOLOR4,BGCOLOR1),
-   COLOR(BGCOLOR2,BGCOLOR1),
-   COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-   COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-   COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-   COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-   COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-   COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-   COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-   COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-   COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-   COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-   COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-   COLOR(BGCOLOR4,1)};
-
-unsigned char ctk_80col_screenpattern[25*8] =
-  {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-   0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-   0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-   0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-   0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-   0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-   0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-   0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-   0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-   0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-   0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-   0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-   0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-   0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-   0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-   0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-   0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-   0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-   0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-   0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-   0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-   0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-
-unsigned short ctk_80col_yscreenaddr[25] =
-  {0 * 40 + SCREENADDR, 1 * 40 + SCREENADDR,
-   2 * 40 + SCREENADDR, 3 * 40 + SCREENADDR,
-   4 * 40 + SCREENADDR, 5 * 40 + SCREENADDR,
-   6 * 40 + SCREENADDR, 7 * 40 + SCREENADDR,
-   8 * 40 + SCREENADDR, 9 * 40 + SCREENADDR,
-   10 * 40 + SCREENADDR, 11 * 40 + SCREENADDR,
-   12 * 40 + SCREENADDR, 13 * 40 + SCREENADDR,
-   14 * 40 + SCREENADDR, 15 * 40 + SCREENADDR,
-   16 * 40 + SCREENADDR, 17 * 40 + SCREENADDR,
-   18 * 40 + SCREENADDR, 19 * 40 + SCREENADDR,
-   20 * 40 + SCREENADDR, 21 * 40 + SCREENADDR,
-   22 * 40 + SCREENADDR, 23 * 40 + SCREENADDR,
-   24 * 40 + SCREENADDR};
-
-unsigned short ctk_80col_yhiresaddr[25] =
-  {0 * 320 + HIRESADDR, 1 * 320 + HIRESADDR,
-   2 * 320 + HIRESADDR, 3 * 320 + HIRESADDR,
-   4 * 320 + HIRESADDR, 5 * 320 + HIRESADDR,
-   6 * 320 + HIRESADDR, 7 * 320 + HIRESADDR,
-   8 * 320 + HIRESADDR, 9 * 320 + HIRESADDR,
-   10 * 320 + HIRESADDR, 11 * 320 + HIRESADDR,
-   12 * 320 + HIRESADDR, 13 * 320 + HIRESADDR,
-   14 * 320 + HIRESADDR, 15 * 320 + HIRESADDR,
-   16 * 320 + HIRESADDR, 17 * 320 + HIRESADDR,
-   18 * 320 + HIRESADDR, 19 * 320 + HIRESADDR,
-   20 * 320 + HIRESADDR, 21 * 320 + HIRESADDR,
-   22 * 320 + HIRESADDR, 23 * 320 + HIRESADDR,
-   24 * 320 + HIRESADDR};
-
-
-struct ctk_80col_theme ctk_80col_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0xff,0xc0,0x80,0xbf,0x80,0xbf,0x80,0x80},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0xff,0x00,0x00,0xff,0x00,0xff,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0xff,0x03,0x01,0xfd,0x01,0xfd,0x01,0x01},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x01,0x01,0x01,0x01,0x01,0x01,0x03,0xff},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0x80,0x80,0x80,0x80,0x80,0x80,0xc0,0xff},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0xc5,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf},
-    
-    /* buttonright[8]; */
-    {0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xa3},
-
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0x0f,0x3f,0x3f,0x7f,0x7f,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xf0,0xfc,0xfc,0xfe,0xfe,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_BLACK),
-     COLOR(COLOR_GRAY2, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_GRAY1)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3)},
-    
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_WHITE),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_WHITE)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_WHITE),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_YELLOW)},
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_YELLOW, COLOR_BLACK),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_WHITE, COLOR_BLACK),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_BLACK, COLOR_WHITE),
-    
-  };
-char ctk_80col_versionstring[] = CONTIKI_VERSION_STRING;
-char ctk_80col_versionstring_len = sizeof(CONTIKI_VERSION_STRING) - 1;
-
-struct ctk_80col_windowparams ctk_80col_windowparams;
-
-/*---------------------------------------------------------------------------*/
-/*void
-ctk_arch_draw_char(char c,
-		   unsigned char xpos,
-		   unsigned char ypos,
-		   unsigned char reversedflag,
-		   unsigned char color)
-{
-  ctk_80col_cursx = xpos;
-  ctk_80col_cursy = ypos;
-  ctk_80col_reversed = reversedflag;
-  ctk_80col_color = color;
-  
-  ctk_80col_cputc(c);
-}*/
-/*---------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi2(void)
-{
-  asm("pla");
-  asm("sta $01");
-  asm("pla");
-  asm("rti");
-}  
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi(void)
-{
-  asm("sei");
-  asm("pha");
-  asm("inc $d020");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$36");
-  asm("sta $01");
-  asm("lda #>_nmi2");
-  asm("pha");
-  asm("lda #<_nmi2");
-  asm("pha");
-  asm("php");
-  asm("jmp ($0318)");
-
-  nmi2();
-}
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-setup_nmi(void)
-{
-  asm("lda #<_nmi");
-  asm("sta $fffa");
-  asm("lda #>_nmi");
-  asm("sta $fffb");
-  return;
-  nmi();
-}
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-void reset(void);
-void
-quit(void)
-{
-  VIC.ctrl1 = 0x1b;  /* $D011 */
-  VIC.addr  = 0x17;  /* $D018 */
-  VIC.ctrl2 = 0xc8;  /* $D016 */
-  CIA2.pra  = 0x03;  /* $DD00 */
-
-  VIC.bordercolor = 0x0e; /* $D020 */
-  VIC.bgcolor0 = 0x06; /* $D021 */
-
-  memset((char *)0xd800, 0x0e, 40*25);
-
-}
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-ctk_80col_init(void)
-{
-  int i;
-  
-  setup_nmi();
-  
-  /* Turn on hires mode, bank 0 ($c000 - $ffff) and $e000/$c000 for
-     hires/colors. */
-  VIC.ctrl1 = 0x3b;  /* $D011 */
-  VIC.addr  = 0x78;  /* $D018 */
-  VIC.ctrl2 = 0xc8;  /* $D016 */
-  CIA2.pra  = 0x00;  /* $DD00 */
-
-  VIC.bordercolor = 0x06; /* $D020 */
-  VIC.bgcolor0 = 0x0b; /* $D021 */  
-
-  /* Fill color memory. */
-  asm("sei");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$30");
-  asm("sta $01");
-  asm("ldx #0");
-  asm("lda #$0");
-  asm("fillcolorloop:");
-  asm("sta $dc00,x");
-  asm("sta $dd00,x");
-  asm("sta $de00,x");
-  asm("sta $df00,x");
-  asm("inx");
-  asm("bne fillcolorloop");
-
-  /* Setup sprite pointers */
-  asm("ldx #$fd");
-  asm("stx $dff8");
-  asm("inx");
-  asm("stx $dff9");
-  asm("pla");
-  asm("sta $01");
-  asm("cli");
-
-  /* Fill hires memory with 0. */
-
-  memset((char *)0xe000, 0, 8000);
-
-  for(i = 0; i < 256; ++i) {
-#if 0
-    ctk_80col_lefttab[i] =
-      ((i & 0x40) << 1) |
-      ((i & 0x20) << 1) |
-      ((i & 0x08) << 2) |
-      ((i & 0x02) << 3);
-    ctk_80col_righttab[i] =
-      ((i & 0x40) >> 3) |
-      ((i & 0x20) >> 3) |
-      ((i & 0x08) >> 2) |
-      ((i & 0x02) >> 1);
-#else
-    ctk_80col_lefttab[i] =
-      ((i & 0x40) << 1) |
-      ((i & 0x10) << 2) |
-      ((i & 0x04) << 3) |
-      ((i & 0x01) << 4);
-    ctk_80col_righttab[i] =
-      ((i & 0x40) >> 3) |
-      ((i & 0x10) >> 2) |
-      ((i & 0x04) >> 1) |
-      ((i & 0x01));
-#endif
-  }
-  
-#if 0
-  /* Setup mouse pointer sprite. */
-  asm("lda %v+%w", ctk_80col_theme,
-      offsetof(struct ctk_80col_theme, pointermaskcolor));
-  asm("sta $d027");
-  asm("lda %v+%w", ctk_80col_theme,
-      offsetof(struct ctk_80col_theme, pointercolor));
-  asm("sta $d028");
-
-  ptr1 = ctk_80col_theme.pointer;
-  ptr2 = (unsigned char *)0xff40;
-  
-  for(i = 0; i < 0x80; ++i) {
-    *ptr2++ = *ptr1++;
-  }
-#endif
-  return;
-}
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-/*static unsigned char cursx, cursy;
-  static unsigned char reversed;*/
-
-/*-----------------------------------------------------------------------------------*/
-static void CC_FASTCALL 
-cputc(char c) 
-{
-  /*  ctk_arch_draw_char(c, cursx, cursy, reversed, 0);*/
-  ctk_80col_cputc(c);
-  /*  ++cursx;*/
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-wherex(void)
-{
-  return ctk_80col_cursx;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-wherey(void)
-{
-  return ctk_80col_cursy;
-}
-/*-----------------------------------------------------------------------------------*/
-/*void
-clrscr(void)
-{
-  unsigned char x, y;
-
-  for(x = 0; x < SCREEN_WIDTH; ++x) {
-    for(y = 0; y < SCREEN_HEIGHT; ++y) {
-      gotoxy(x, y);
-      cputc(' ');
-    }
-  }
-}*/
-/*-----------------------------------------------------------------------------------*/
-#define revers(c) ctk_80col_reversed = c
-/*-----------------------------------------------------------------------------------*/
-static void CC_FASTCALL 
-_cputs(char *str)
-{
-  char *ptr = str;
-  
-  while(*ptr != 0) {
-    cputc(*ptr++);
-  }
-
-  /*  int i;
-  for(i = 0; i < strlen(str); ++i) {
-    cputc(str[i]);
-    }*/
-}
-/*-----------------------------------------------------------------------------------*/
-static void CC_FASTCALL
-cclear(unsigned char length)
-{
-  int i;
-  for(i = 0; i < length; ++i) {
-    cputc(' ');
-  } 
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-chline(unsigned char length)
-{
-  int i;
-  for(i = 0; i < length; ++i) {
-    cputc('-');
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-cvline(unsigned char length)
-{
-  int i;
-  for(i = 0; i < length; ++i) {
-    cputc('|');
-    --ctk_80col_cursx;
-    ++ctk_80col_cursy;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-gotoxy(unsigned char x, unsigned char y)
-{
-  ctk_80col_cursx = x;
-  ctk_80col_cursy = y;
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-cclearxy(unsigned char x, unsigned char y, unsigned char length)
-{
-  gotoxy(x, y);
-  cclear(length);
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-chlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  gotoxy(x, y);
-  chline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-cvlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  gotoxy(x, y);
-  cvline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-_cputsxy(unsigned char x, unsigned char y, char *str)
-{
-  gotoxy(x, y);
-  _cputs(str);
-}
-/*-----------------------------------------------------------------------------------*/
-void CC_FASTCALL
-cputcxy(unsigned char x, unsigned char y, char c)
-{
-  gotoxy(x, y);
-  cputc(c);
-}
-/*-----------------------------------------------------------------------------------*/
-/*void CC_FASTCALL
-screensize(unsigned char *x, unsigned char *y)
-{
-  *x = SCREEN_WIDTH;
-  *y = SCREEN_HEIGHT;
-}*/
-/*-----------------------------------------------------------------------------------*/
-/*static unsigned char sizex, sizey;*/
-/*-----------------------------------------------------------------------------------*/
-static void
-_cputsn(char *str, unsigned char len)
-{
-  /*  char c;
-
-  while(len > 0) {
-    --len;
-    c = *str;
-    if(c == 0) {
-      break;
-    }
-    cputc(c);
-    ++str;
-    }*/  
-  ctk_80col_cputsn(str, len);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_init(void)
-{
-  ctk_80col_init();
-
-  /*  screensize(&sizex, &sizey);*/
-  
-  ctk_draw_clear(0, SCREEN_HEIGHT);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-draw_widget(struct ctk_widget *w,
-	    unsigned char x, unsigned char y,
-	    unsigned char clipx,
-	    unsigned char clipy,
-	    unsigned char clipy1, unsigned char clipy2,
-	    unsigned char focus)
-{
-  unsigned char xpos, ypos, xscroll;
-  unsigned char i, j;
-  char c, *text;
-  unsigned char len, wfocus;
-
-  wfocus = 0;
-  if(focus & CTK_FOCUS_WINDOW) {    
-    if(focus & CTK_FOCUS_WIDGET) {
-      wfocus = 1;
-    }
-  } else if(focus & CTK_FOCUS_DIALOG) {
-    if(focus & CTK_FOCUS_WIDGET) {
-      wfocus = 1;
-    }
-  } else {
-  }
-  
-  xpos = x + w->x;
-  ypos = y + w->y;
-    
-  switch(w->type) {
-  case CTK_WIDGET_SEPARATOR:
-    if(ypos >= clipy1 && ypos < clipy2) {
-      chlinexy(xpos, ypos, w->w);
-    }
-    break;
-  case CTK_WIDGET_LABEL:
-    text = w->widget.label.text;
-    for(i = 0; i < w->h; ++i) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	gotoxy(xpos, ypos);
-	_cputsn(text, w->w);
-	if(w->w - (wherex() - xpos) > 0) {
-	  cclear(w->w - (wherex() - xpos));
-	}
-      }
-      ++ypos;
-      text += w->w;
-    }
-    break;
-  case CTK_WIDGET_BUTTON:
-    if(ypos >= clipy1 && ypos < clipy2) {
-      if(wfocus != 0) {
-	revers(1);
-      } else {
-	revers(0);
-      }
-      cputcxy(xpos, ypos, '[');
-      _cputsn(w->widget.button.text, w->w);
-      cputc(']');
-      revers(0);
-    }
-    break;
-  case CTK_WIDGET_HYPERLINK:
-    if(ypos >= clipy1 && ypos < clipy2) {
-      if(wfocus != 0) {
-	revers(0);
-      } else {
-	revers(1);
-      }
-      gotoxy(xpos, ypos);
-      _cputsn(w->widget.button.text, w->w);
-      revers(0);
-    }
-    break;
-  case CTK_WIDGET_TEXTENTRY:
-    text = w->widget.textentry.text;
-    if(wfocus != 0) {
-      revers(1);
-    } else {
-      revers(0);
-    }
-    xscroll = 0;
-    if(w->widget.textentry.xpos >= w->w - 1) {
-      xscroll = w->widget.textentry.xpos - w->w + 1;
-    }
-    for(j = 0; j < w->h; ++j) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	if(w->widget.textentry.state == CTK_TEXTENTRY_EDIT &&
-	   w->widget.textentry.ypos == j) {
-	  revers(0);
-	  cputcxy(xpos, ypos, '>');
-	  c = 1;
-	  for(i = 0; i < w->w; ++i) {
-	    if(c != 0) {
-	      c = text[i + xscroll];
-	    }
-	    if(i == w->widget.textentry.xpos - xscroll) {
-	      revers(1);
-	    } else {
-	      revers(0);
-	    }
-	    if(c == 0) {
-	      cputc(' ');
-	    } else {
-	      cputc(c);
-	    }
-	    revers(0);
-	  }
-	  cputc('<');
-	} else {
-	  cvlinexy(xpos, ypos, 1);
-	  gotoxy(xpos + 1, ypos);          
-	  _cputsn(text, w->w);
-	  i = wherex();
-	  if(i - xpos - 1 < w->w) {
-	    cclear(w->w - (i - xpos) + 1);
-	  }
-	  cvline(1);
-	}
-      }
-      ++ypos;
-      text += w->w;
-    }
-    revers(0);
-    break;
-  case CTK_WIDGET_ICON:
-    if(ypos >= clipy1 && ypos < clipy2) {
-      color(ctk_80col_theme.iconcolors[focus]);
-      
-      /*      if(focus & 1) {
-	
-	revers(1);
-      } else {
-	revers(0);
-	}*/
-      /*      gotoxy(xpos, ypos);*/
-      if(xpos >= 73) {
-	xpos = 73;
-      }
-      if(xpos <= 2) {
-	xpos = 2;
-      }
-      if(w->widget.icon.textmap != NULL) {
-	ctk_80col_bitmapptr = w->widget.icon.bitmap;
-	for(i = 0; i < 3; ++i) {
-	  if(ypos >= clipy1 && ypos < clipy2) {
-	    gotoxy(xpos, ypos);
-	    ctk_80col_draw_bitmapline(3);	    
-	  }
-	  ctk_80col_bitmapptr += 3 * 8;
-	  ++ypos;
-	}
-      }
-      x = xpos;
-  
-      len = strlen(w->widget.icon.title);
-      if(x + len >= SCREEN_WIDTH) {
-	x = SCREEN_WIDTH - len;
-      }
-
-      if(ypos >= clipy1 && ypos < clipy2) {
-	len = strlen(w->widget.icon.title);
-	gotoxy((x & 0xfe) + 1, ypos);
-	ctk_80col_cclear((len - 1)/ 2);
-	gotoxy(x, ypos);
-	ctk_80col_cputsn(w->widget.icon.title, len);
-      }
-      revers(0);
-    }
-    break;
-
-  default:
-    break;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_widget(struct ctk_widget *w,
-		  unsigned char focus,
-		  unsigned char clipy1,
-		  unsigned char clipy2)
-{
-  struct ctk_window *win = w->window;
-  unsigned char posx, posy;
-
-  posx = (win->x & 0xfe) + 1;
-  posy = win->y + 2;
-
-  if(w == win->focused) {
-    focus |= CTK_FOCUS_WIDGET;
-  }
-  
-  draw_widget(w, posx, posy,
-	      posx + win->w,
-	      posy + win->h,
-	      clipy1, clipy2,
-	      focus);
-  
-#ifdef CTK_CONIO_CONF_UPDATE
-  CTK_CONIO_CONF_UPDATE();
-#endif /* CTK_CONIO_CONF_UPDATE */
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_clear_window(struct ctk_window *window,
-		      unsigned char focus,
-		      unsigned char clipy1,
-		      unsigned char clipy2)
-{
-  unsigned char i;
-  unsigned char h;
-  
-  if(focus & CTK_FOCUS_WINDOW) {
-    color(COLOR_FOCUS_WINDOW);
-  } else {
-    color(COLOR_BACKGROUND_WINDOW);
-  }
-    
-  h = window->y + 2 + window->h;
-  /* Clear window contents. */
-  for(i = window->y + 2; i < h; ++i) {
-    if(i >= clipy1 && i < clipy2) {
-      gotoxy((window->x & 0xfe) + 1, i);
-      ctk_80col_cclear((window->w + 1)/2);
-    }
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-draw_window_contents(struct ctk_window *window, unsigned char focus,
-		     unsigned char clipy1, unsigned char clipy2,
-		     unsigned char x1, unsigned char x2,
-		     unsigned char y1, unsigned char y2)
-{
-  struct ctk_widget *w;
-  unsigned char wfocus;
-  
-  /* Draw inactive widgets. */
-  for(w = window->inactive; w != NULL; w = w->next) {
-    draw_widget(w, x1, y1, x2, y2,
-		clipy1, clipy2,
-		focus);
-  }
-  
-  /* Draw active widgets. */
-  for(w = window->active; w != NULL; w = w->next) {  
-    wfocus = focus;
-    if(w == window->focused) {
-      wfocus |= CTK_FOCUS_WIDGET;
-    }
-
-   draw_widget(w, x1, y1, x2, y2, 
-	       clipy1, clipy2,
-	       wfocus);
-  }
-
-#ifdef CTK_CONIO_CONF_UPDATE
-  CTK_CONIO_CONF_UPDATE();
-#endif /* CTK_CONIO_CONF_UPDATE */
-
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_window(struct ctk_window *window, unsigned char focus,
-		  unsigned char clipy1, unsigned char clipy2)
-{
-  unsigned char x, y;
-  unsigned char h;
-  unsigned char x1, y1, x2, y2;
-
-  
-  if(window->y + 1 >= clipy2) {
-    return;
-  }
-    
-  x = window->x & 0xfe;
-  y = window->y + 1;
-  
-/*  if(focus & CTK_FOCUS_WINDOW) {
-  } else {
-  }*/
-
-  x1 = x + 1;
-  y1 = y + 1;
-  x2 = x1 + window->w;
-  y2 = y1 + window->h;
-
-  /* Draw window frame. */
-  gotoxy(x, y);
-  ctk_80col_windowparams.w = (window->w-1)/2;
-  ctk_80col_windowparams.h = window->h;
-  if(clipy1 < y) {
-    ctk_80col_windowparams.clipy1 = 0;
-  } else {
-    ctk_80col_windowparams.clipy1 = clipy1 - y;
-  }
-  ctk_80col_windowparams.clipy2 = clipy2 - y + 1;
-  ctk_80col_windowparams.color1 = ctk_80col_theme.windowcolors[focus];
-  ctk_80col_windowparams.color2 = ctk_80col_theme.windowcolors[focus];
-  ctk_80col_windowparams.titlecolor = ctk_80col_theme.windowcolors[focus+1];
-  ctk_80col_windowparams.title = window->title;
-  ctk_80col_windowparams.titlelen = window->titlelen/2;
-
-  if(ctk_80col_windowparams.clipy1 < ctk_80col_windowparams.clipy2 &&
-     ctk_80col_windowparams.clipy2 > 0) {
-    ctk_80col_draw_windowborders();
-  }
-  /*  
-  if(y >= clipy1) {
-    cputcxy(x, y, CH_ULCORNER);
-    gotoxy(wherex() + window->titlelen + 2, wherey());
-    chline(window->w - (wherex() - x) - 2);
-    cputcxy(x2, y, CH_URCORNER);
-  }
-
-  h = window->h;
-  
-  if(clipy1 > y1) {
-    if(clipy1 - y1 < h) {
-      h = clipy1 - y1;
-            y1 = clipy1;
-    } else {
-      h = 0;
-    }
-  }
-
-  if(clipy2 < y1 + h) {
-    if(y1 >= clipy2) {
-      h = 0;
-    } else {
-      h = clipy2 - y1;
-    }
-  }
-
-  cvlinexy(x, y1, h);
-  cvlinexy(x2, y1, h);  
-
-  if(y + window->h >= clipy1 &&
-     y + window->h < clipy2) {
-    cputcxy(x, y2, CH_LLCORNER);
-    chlinexy(x1, y2, window->w);
-    cputcxy(x2, y2, CH_LRCORNER);
-  }
-  */
-  if(ctk_mode_get() != CTK_MODE_WINDOWMOVE) {
-    draw_window_contents(window, focus & CTK_FOCUS_WINDOW, clipy1, clipy2,
-			 x1, x2, y + 1, y2);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_dialog(struct ctk_window *dialog)
-{
-  unsigned char x, y;
-  unsigned char i;
-  unsigned char x1, y1, x2, y2;
-  
-  
-  x = dialog->x & 0xfe;
-  y = dialog->y + 1;
-
-
-  x1 = x + 1;
-  y1 = y + 1;
-  x2 = x1 + dialog->w;
-  y2 = y1 + dialog->h;
-
-
-  /* Draw dialog frame. */
-  
-  /*  cvlinexy(x, y1,
-	   dialog->h);
-  cvlinexy(x2, y1,
-	   dialog->h);
-
-  chlinexy(x1, y,
-	   dialog->w);
-  chlinexy(x1, y2,
-	   dialog->w);
-
-  cputcxy(x, y, CH_ULCORNER);
-  cputcxy(x, y2, CH_LLCORNER);
-  cputcxy(x2, y, CH_URCORNER);
-  cputcxy(x2, y2, CH_LRCORNER);
-  */
-  gotoxy(x, y);
-  ctk_80col_windowparams.w = (dialog->w-1)/2;
-  ctk_80col_windowparams.h = dialog->h;
-  ctk_80col_windowparams.clipy1 = 0;
-  ctk_80col_windowparams.clipy2 = SCREEN_HEIGHT;
-  ctk_80col_windowparams.color1 = ctk_80col_theme.windowcolors[4];
-  ctk_80col_windowparams.color2 = ctk_80col_theme.windowcolors[4];
-  ctk_80col_windowparams.titlecolor = ctk_80col_theme.windowcolors[5];
-
-  ctk_80col_draw_windowborders();  
-  
-  /* Clear dialog contents. */
-  color(COLOR_DIALOG);
-  for(i = y1; i < y2; ++i) {
-    gotoxy((x1 & 0xfe) + 2, i);
-    ctk_80col_cclear((dialog->w + 1)/2 - 2);
-    /*    cclearxy(x1, i, dialog->w);*/
-  }
-
-  draw_window_contents(dialog, CTK_FOCUS_DIALOG, 0, SCREEN_HEIGHT,
-		       x1, x2, y1, y2);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_clear(unsigned char y1, unsigned char y2)
-{
-  unsigned char i;
-
-  
-  for(i = y1; i < y2; ++i) {
-    
-    ctk_80col_clear_line(i);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-draw_menu(struct ctk_menu *m)
-{
-  unsigned char x, x2, y;
-  
-  color(ctk_80col_theme.openmenucolor);
-  
-  revers(0);
-  x = wherex();
-  _cputs(m->title);
-  cputc(' ');
-  x2 = wherex();
-  if(x + CTK_CONF_MENUWIDTH > SCREEN_WIDTH) {
-    x = SCREEN_WIDTH - CTK_CONF_MENUWIDTH - 2;
-  }
-    
-  for(y = 0; y < m->nitems; ++y) {
-    if(y == m->active) {
-      color(ctk_80col_theme.activemenucolor);
-    } else {
-      color(ctk_80col_theme.openmenucolor);
-    }
-    gotoxy(x, y + 1);
-    ctk_80col_cclear(CTK_CONF_MENUWIDTH/2);
-
-    gotoxy(x, y + 1);
-    if(m->items[y].title[0] == '-') {
-      chline(CTK_CONF_MENUWIDTH);
-    } else {
-      /*      _cputs(m->items[y].title);*/
-      ctk_80col_cputsn(m->items[y].title, m->items[y].titlelen);
-    }
-    /*    if(x + CTK_CONF_MENUWIDTH > wherex()) {
-      cclear(x + CTK_CONF_MENUWIDTH - wherex());
-      }*/
-  
-  }
-  gotoxy(x2, 0);
-  revers(1);
-
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_menus(struct ctk_menus *menus)
-{
-  struct ctk_menu *m;  
-  
-  memcpy((char *)0xe000, ctk_80col_theme.menuleftpattern, 8);
-  /* Draw menus */
-  gotoxy(2, 0);
-
-  revers(1); 
-  for(m = menus->menus->next; m != NULL; m = m->next) {
-    color(ctk_80col_theme.menucolor);
-    if(m != menus->open) {
-      /*      _cputs(m->title);*/
-      ctk_80col_cputsn(m->title, m->titlelen);
-      cputc(' ');
-    } else {
-      draw_menu(m);
-    }
-  }
-
-  color(ctk_80col_theme.menucolor);
-    
-  if(wherex() + strlen(menus->desktopmenu->title) + 2 >= SCREEN_WIDTH) {
-    gotoxy(SCREEN_WIDTH - strlen(menus->desktopmenu->title) - 2, 0);
-  } else {
-    cclear(SCREEN_WIDTH - wherex() -
-	   strlen(menus->desktopmenu->title) - 2);
-  }
-  
-  /* Draw desktopmenu */
-  if(menus->desktopmenu != menus->open) {
-    ctk_80col_cputsn(menus->desktopmenu->title, menus->desktopmenu->titlelen);
-  } else {
-    draw_menu(menus->desktopmenu);
-  }
-
-  /*  gotoxy(78, 0);
-  color(ctk_80col_screencolors[0]);
-  cputc(' ');
-  cputc(' ');    */
-  
-  revers(0);
-  memcpy((char *)0xe138, ctk_80col_theme.menurightpattern, 8);
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-s_ctk_draw_height(void)
-{
-  return SCREEN_HEIGHT;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-s_ctk_draw_width(void)
-{
-  return SCREEN_WIDTH;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned short
-s_ctk_mouse_xtoc(unsigned short x)
-{
-  return x / 4;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned short
-s_ctk_mouse_ytoc(unsigned short y)
-{
-  return y / 8;
-}
-/*-----------------------------------------------------------------------------------*/
-static const struct ctk_draw_service_interface interface =
-  {CTK_DRAW_SERVICE_VERSION,
-   1,
-   1,
-   1,
-   s_ctk_draw_init,
-   s_ctk_draw_clear,
-   s_ctk_draw_clear_window,
-   s_ctk_draw_window,
-   s_ctk_draw_dialog,
-   s_ctk_draw_widget,
-   s_ctk_draw_menus,
-   s_ctk_draw_width,
-   s_ctk_draw_height,
-   s_ctk_mouse_xtoc,
-   s_ctk_mouse_ytoc,
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_PROCESS(proc, CTK_DRAW_SERVICE_NAME ": 80col", EK_PRIO_NORMAL,
-	   eventhandler, NULL, (void *)&interface);
-
-/*--------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(ctk_80col_service_init, arg)
-{ 
-  ek_service_start(CTK_DRAW_SERVICE_NAME, &proc);
-}
-/*--------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  EK_EVENTHANDLER_ARGS(ev, data);
-  
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    s_ctk_draw_init();
-    ctk_restore();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    VIC.ctrl1 = 0x1b;  /* $D011 */
-    VIC.addr  = 0x17;  /* $D018 */
-    VIC.ctrl2 = 0xc8;  /* $D016 */
-    CIA2.pra  = 0x03;  /* $DD00 */
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    quit();
-    ek_exit();
-    LOADER_UNLOAD();
-    break;    
-  }
-}
-/*--------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.S b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.S
deleted file mode 100644
index 8d52510..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.S
+++ /dev/null
@@ -1,934 +0,0 @@
-
-;---------------------------------------------------------------------       
-	.importzp       ptr1, ptr2, ptr3, ptr4, sreg
-	.importzp	sp
-
-	.import		incsp2
-
-	
-	.import		_ctk_hires_cursx
-	.import		_ctk_hires_cursy
-	.import		_ctk_hires_color
-	.import		_ctk_hires_underline
-	.import		_ctk_hires_reversed
-
-	.import		_ctk_hires_yscreenaddr
-	.import		_ctk_hires_yhiresaddr
-
-	.import		_ctk_hires_windowparams
-	
-	.import		_ctk_hires_bitmapptr
-
-	.import		_ctk_hires_theme
-			
-	.export		_ctk_hires_cclear
-	.export		_ctk_hires_chline
-	.export		_ctk_hires_cputc
-	.export		_ctk_hires_cputsn
-
-	.export		_ctk_hires_draw_buttonleft
-	.export		_ctk_hires_draw_buttonright
-	
-	.export		_ctk_hires_draw_windowborders
-
-	.export		_ctk_hires_draw_bitmapline
-;---------------------------------------------------------------------
-
-ptr5 = sreg
-
-	;; Offsets in the theme struct
-
-	ulcornerpattern =	8
-	titlebarpattern =	ulcornerpattern+8
-	urcornerpattern =	titlebarpattern+8
-	rborderpattern  =	urcornerpattern+8
-	lrcornerpattern =	rborderpattern+8
-	lowerborderpattern =	lrcornerpattern+8
-	llcornerpattern =	lowerborderpattern+8
-	lborderpattern =	llcornerpattern+8
-
-	
-	buttonleftpattern =	lborderpattern+8
-	buttonrightpattern =	buttonleftpattern+8
-
-				
-.bss
-tmp01:	.res 1
-tmpl:	.res 1
-tmpf:	.res 1
-tmpc:	.res 1
-tmpw:	.res 1	
-tmpptr:	.res 2
-
-tmpy:	.res 1
-tmph:	.res 1
-
-	;; Window border parameters	
-w:	.res 1
-wpw          = 0
-h:	.res 1
-wph          = 1	
-clipy1:	.res 1
-wpclipy1     = 2
-clipy2:	.res 1
-wpclipy2     = 3	
-color1:	.res 1
-wpcolor1     = 4	
-color2:	.res 1
-wpcolor2     = 5	
-titlelen:	.res 1
-wptitlelen   = 6
-title:	.res 2
-wptitle      = 7	
-	
-;---------------------------------------------------------------------
-.data
-;---------------------------------------------------------------------
-.code
-setupptrs:	
-	;; Find hires address.	
-	lda _ctk_hires_cursy
-	asl
-	tax
-	lda _ctk_hires_yhiresaddr,x
-	sta ptr2
-	lda _ctk_hires_yhiresaddr+1,x
-	sta ptr2+1
-
-	;; Add X coordinate to the hires address. 
-	lda #0
-	sta ptr1+1
-	lda _ctk_hires_cursx
-	asl
-	rol ptr1+1
-	asl	
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	clc
-	adc ptr2
-	sta ptr2
-	lda ptr2+1
-	adc ptr1+1
-	sta ptr2+1
-
-
-	;; Find screen address. 
-	lda _ctk_hires_cursy
-	asl
-	tax	
-	lda _ctk_hires_yscreenaddr,x
-	clc
-	adc _ctk_hires_cursx
-	sta ptr1
-	lda _ctk_hires_yscreenaddr+1,x
-	adc #0
-	sta ptr1+1
-
-	;; Turn off interrupts, prepare $01 to store color data in RAM
-	;; under I/O area.		
-	sei
-	lda $01
-	sta tmp01
-	and #$f8
-	sta $01
-	rts
-;---------------------------------------------------------------------	
-restore01:	
-	lda tmp01
-	sta $01
-	cli
-	rts		
-;---------------------------------------------------------------------
-_ctk_hires_cclear:
-	sta tmpl
-	cmp #0
-	bne @norts
-	rts
-@norts:		
-		
-	jsr setupptrs		
-
-	;; Store color value in color memory
-
-	ldy tmpl
-	dey
-	lda _ctk_hires_color
-@loop0:
-	sta (ptr1),y
-	dey
-	bpl @loop0
-
-	;; Store either $00 or $ff in hires memory, depending on the
-	;; reversed flag		
-	
-	ldx tmpl
-	lda _ctk_hires_reversed
-	beq @noff
-	lda #$ff
-@noff:		
-	sta tmpf	
-@loop1:
-	ldy #7
-	lda tmpf
-@loop2:
-	sta (ptr2),y
-	dey
-	bpl @loop2
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc @noinc
-	inc ptr2+1
-@noinc:		
-
-	inc _ctk_hires_cursx
-
-	dex
-	bne @loop1
-
-	jmp restore01
-;---------------------------------------------------------------------
-_ctk_hires_chline:
-	sta tmpl
-	cmp #0
-	bne @norts
-	rts
-@norts:	
-			
-	jsr setupptrs		
-
-	;; Store color value in color memory
-
-	ldy tmpl
-	dey
-	lda _ctk_hires_color
-@loop0:
-	sta (ptr1),y
-	dey
-	bpl @loop0
-
-	;; Store horizontal line pattern in hires memory
-	ldx tmpl
-@loop1:
-	ldy #0
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$ff
-	sta (ptr2),y
-	iny
-	lda #$ff
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-	iny
-	lda #$00
-	sta (ptr2),y
-
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc @noinc
-	inc ptr2+1
-@noinc:	
-
-	inc _ctk_hires_cursx
-
-	dex
-	bne @loop1
-
-	jmp restore01
-;---------------------------------------------------------------------	
-_ctk_hires_cputc:
-	sta tmpc
-
-	jsr setupptrs
-
-	ldy #0
-	lda _ctk_hires_color
-	sta (ptr1),y
-	
-	;; Turn on font ROM
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	lda #0
-	sta ptr1+1		  
-	
-	;; Convert from PETSCII to screen encoding
-	lda tmpc
-	eor #$e0
-	clc
-	adc #$20
-	bpl @cont
-	adc #$40
-	bpl @cont
-	eor #$a0
-@cont:
-	ldx _ctk_hires_reversed
-	beq :+
-	eor #$80
-:		
-
-	;; Convert to address in character ROM
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	sta ptr1
-	lda #$d8
-	adc ptr1+1
-	sta ptr1+1
-
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_hires_underline
-	beq @nounderline
-	eor #$ff
-@nounderline:
-	sta (ptr2),y
-	dey
-@loop:
-	lda (ptr1),y
-	sta (ptr2),y
-	dey
-	bpl @loop
-	
-	inc _ctk_hires_cursx	
-	
-	jmp restore01		
-;---------------------------------------------------------------------
-_ctk_hires_cputsn:
-	sta tmpl
-	cmp #0
-	bne :+
-	rts
-:		
-	
-	jsr setupptrs
-
-	ldy tmpl
-	dey
-	lda _ctk_hires_color
-@loop0:
-	sta (ptr1),y
-	dey
-	bpl @loop0
-			
-	;; Turn on font ROM
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	
-	;; Output each character from the string
-	lda #0
-	sta tmpc
-	ldy #0
-	lda (sp),y
-	sta ptr3
-	iny
-	lda (sp),y
-	sta ptr3+1	
-	
-@loop1:	
-	
-	lda #0
-	sta ptr1+1		  
-		
-	ldy tmpc
-	lda (ptr3),y
-	beq @end
-	
-	;; Convert from PETSCII to screen encoding		
-	eor #$e0
-	clc
-	adc #$20
-	bpl @cont
-	adc #$40
-	bpl @cont
-	eor #$a0
-@cont:
-	ldx _ctk_hires_reversed
-	beq :+
-	eor #$80
-:		
-
-	;; Convert to address in character ROM
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	asl
-	rol ptr1+1
-	sta ptr1
-	lda #$d8
-	adc ptr1+1
-	sta ptr1+1
-
-	;; Print on hires screen, bottom-up. If we should underline,
-	;; we do this by eor:ing the bottom line with #$ff
-	ldy #7
-	lda (ptr1),y
-	ldx _ctk_hires_underline
-	beq @nounderline
-	eor #$ff
-@nounderline:
-	sta (ptr2),y
-	dey
-@loop:
-	lda (ptr1),y
-	sta (ptr2),y
-	dey
-	bpl @loop
-	
-	inc _ctk_hires_cursx
-
-	lda ptr2
-	clc
-	adc #8
-	sta ptr2
-	bcc :+
-	inc ptr2+1
-:
-	inc tmpc
-	lda tmpc
-	cmp tmpl
-	bne @loop1
-	
-@end:		
-	jsr restore01
-	
-        jmp incsp2
-	
-;---------------------------------------------------------------------
-_ctk_hires_draw_windowborders:
-
-	jsr setupptrs
-
-	lda _ctk_hires_windowparams + wpclipy1
-	beq :+
-	jmp @nofirstline
-:		
-	
-	;; Draw first line of the border, including the window title
-
-	;; Start with filling color memory
-	ldy _ctk_hires_windowparams + wpw
-	iny
-	lda _ctk_hires_windowparams + wpcolor1
-	sta (ptr1),y	
-	dey
-	dey
-	dey
-	sty tmpw	
-
-	ldy _ctk_hires_windowparams + wptitlelen
-	iny
-	iny
-	iny
-:	
-	sta (ptr1),y
-	iny
-	cpy tmpw
-	bcc :-
-
-	inc tmpw
-
-	;; Set color for upper left corner
-	ldy #0
-	lda _ctk_hires_windowparams + wpcolor1
-	sta (ptr1),y
-		
-	
-	;; Turn on font ROM for drawing the title
-	lda tmp01
-	and #$f8
-	ora #$01
-	sta $01
-
-	;; Use a temporary pointer (ptr3) rather than ptr2 so we can
-	;; reuse it later.
-	lda ptr2
-	sta ptr3
-	lda ptr2+1
-	sta ptr3+1
-		
-	;; Draw upper left corner
-	ldy #7
-:	
-	lda _ctk_hires_theme+ulcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	;; Draw first empty char left of the title
-	ldy #8
-	lda #0
-:		
-; 	sta (ptr3),y		
-	iny
-	cpy #$10
-	bne :-
-
-	lda ptr3
-	clc
-	adc #$10
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-	dec tmpw
-
-	;;  Draw the title
-	lda _ctk_hires_windowparams + wptitle
-	sta ptr4
-	lda _ctk_hires_windowparams + wptitle+1
-	sta ptr4+1
-	
-
-	lda #0
-	sta tmpc
-@titleloop:
-	lda #0
-	sta ptr5+1
-
-	ldy tmpc
-	lda (ptr4),y
-
-	
-	;; Convert from PETSCII to screen encoding		
-	eor #$e0
-	clc
-	adc #$20
-	bpl @cont
-	adc #$40
-	bpl @cont
-	eor #$a0
-@cont:
-	;; Convert to address in character ROM
-	asl
-	rol ptr5+1
-	asl
-	rol ptr5+1
-	asl
-	rol ptr5+1
-	sta ptr5
-	lda #$d8
-	adc ptr5+1
-	sta ptr5+1
-
-	;; Print on hires screen, character by character, bottom-up.
-	ldy #7
-:
-	lda (ptr5),y
-; 	sta (ptr3),y		
-	dey
-	bpl :-
-	
-	lda ptr3
-	clc
-	adc #8
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-	dec tmpw
-	
-	inc tmpc
-	lda tmpc
-	cmp _ctk_hires_windowparams + wptitlelen
-	bne @titleloop
-
-	;; Draw empty char after the title
-	ldy #7
-	lda #0
-:		
-; 	sta (ptr3),y
-	dey	
-	bpl :-
-
-	lda ptr3
-	clc
-	adc #$8
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-	dec tmpw
-
-	;; Draw window title bar pattern
-@titlebarloop:	
-	ldy #7
-:
-	lda _ctk_hires_theme+titlebarpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	clc
-	adc #$8
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:
-	;; Loop until we are three characters away from right border
-	;; to avoid flickering since we would be overwriting the close
-	;; button.
-	dec tmpw
-	lda tmpw
-	cmp #3
-	bcs @titlebarloop
-
-	lda ptr3
-	clc
-	adc #$18
-	sta ptr3
-	bcc :+
-	inc ptr3+1
-:		
-	;; Draw upper right corner piece
-	ldy #7
-:
-	lda _ctk_hires_theme+urcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-
-@nofirstline:
-
-
-	ldx _ctk_hires_windowparams + wph
-	inx
-	stx tmph
-
-	;; Draw left and right borders
-
-	;; Fill color memory (pointer in ptr1, setup by setupptrs)
-
-	;; First check how much we actually should draw by inspecting
-	;; the clipy1 and clipy2 fields in the _ctk_hires_windowparams 
-	;; structure		
-
-	lda #1
-	sta tmpy
-	
-	ldx _ctk_hires_windowparams + wpclipy1
-@clipy1loop:
-	cpx #0
-	beq @clipy1loopend
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-
-	inc tmpy
-	
-	dex
-	jmp @clipy1loop
-@clipy1loopend:	
-
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-		
-	ldx tmpy
-	ldy _ctk_hires_windowparams + wpw
-	iny
-	sty tmpw
-@bordercloop:
-	cpx _ctk_hires_windowparams + wpclipy2
-	beq @bordercloopend
-	
-	ldy tmpw
-	lda _ctk_hires_windowparams + wpcolor2
-	sta (ptr1),y
-	ldy #0
-	lda _ctk_hires_windowparams + wpcolor1
-	sta (ptr1),y
-
-	lda ptr1
-	clc
-	adc #$28
-	sta ptr1
-	bcc :+
-	inc ptr1+1
-:
-	
-	inx
-	cpx tmph
-	bcc @bordercloop
-	beq @bordercloop	
-@bordercloopend:
-
-	
-	;; Fill color memory for lower border, if clipy2 allows
-	cpx _ctk_hires_windowparams + wpclipy2
-	beq @noclowerborder
-
-	lda ptr1
-	sec
-	sbc #$28
-	sta ptr1
-	bcs :+
-	dec ptr1+1
-:
-		
-	ldy _ctk_hires_windowparams + wpw
-	lda _ctk_hires_windowparams + wpcolor2		
-@lbordercloop:	
-	sta (ptr1),y
-	dey
-	bne @lbordercloop
-	
-@noclowerborder:	
-		
-	;; Draw right border
-	ldx tmpy
-@rborderloop:
-	cpx _ctk_hires_windowparams + wpclipy2
-	beq @rborderloopend
-
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-
-	ldy #7
-:
-	lda _ctk_hires_theme+rborderpattern,y		
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	inx
-	cpx tmph
-	bne @rborderloop	
-@rborderloopend:
-	
- 	cpx _ctk_hires_windowparams + wpclipy2 
- 	beq @norbordercorner
-	
-	lda ptr3
-	clc
-	adc #$40
-	sta ptr3
-	lda ptr3+1
-	adc #1
-	sta ptr3+1
-	
-	;; Draw lower right corner, if clipy2 allows it
-	ldy #7
-:		
-	lda _ctk_hires_theme+lrcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-@norbordercorner:	
-
-	stx tmpy
-		
-	;; Draw lower border
-	ldx _ctk_hires_windowparams + wpw
-
-@lowerborderloop:
-	lda ptr3
-	sec
-	sbc #$8
-	sta ptr3
-	bcs :+
-	dec ptr3+1
-:	
-
-	lda tmpy
-	cmp _ctk_hires_windowparams + wpclipy2
-	beq @nolowerborder
-	
-	ldy #7
-:	
-	lda _ctk_hires_theme+lowerborderpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-@nolowerborder:	
-		
-	dex
-	bne @lowerborderloop
-
-	lda ptr3
-	sec
-	sbc #$8
-	sta ptr3
-	bcs :+
-	dec ptr3+1
-:	
-
-
-	ldx tmpy
- 	cpx tmph
- 	bne @nolbordercorner
-	
-	;; Draw lower left corner, if clipy2 allows it
-	ldy #7
-:		
-	lda _ctk_hires_theme+llcornerpattern,y
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	sec
-	sbc #$40
-	sta ptr3
-	lda ptr3+1
-	sbc #1
-	sta ptr3+1
-
-@nolbordercorner:	
-				
-	;; Draw left border
-
-	
-		
-@lborderloop:
-	cpx #1
-	beq @lborderloopend
-	cpx _ctk_hires_windowparams + wpclipy1
-	bcc @lborderloopend
-	
-	ldy #7
-:
-	lda _ctk_hires_theme+lborderpattern,y	
-	sta (ptr3),y
-	dey
-	bpl :-
-
-	lda ptr3
-	sec
-	sbc #$40
-	sta ptr3
-	lda ptr3+1
-	sbc #1
-	sta ptr3+1
-	
-	dex
-	jmp @lborderloop
-	
-@lborderloopend:		
-
-	
-	jmp restore01
-;---------------------------------------------------------------------	
-_ctk_hires_draw_buttonleft:
-	jsr setupptrs
-
-	ldy #0
-	lda _ctk_hires_color
-	sta (ptr1),y
-
-:		
-	lda _ctk_hires_theme+buttonleftpattern,y
-	sta (ptr2),y
-	iny
-	cpy #8
-	bne :-
-	
-	jmp restore01
-;---------------------------------------------------------------------	
-_ctk_hires_draw_buttonright:
-	jsr setupptrs
-	ldy #0
-	lda _ctk_hires_color
-	sta (ptr1),y
-
-:		
-	lda _ctk_hires_theme+buttonrightpattern,y
-	sta (ptr2),y
-	iny
-	cpy #8
-	bne :-
-	
-	jmp restore01	
-;---------------------------------------------------------------------
-_ctk_hires_draw_bitmapline:
-	sta tmpl
-	cmp #0
-	bne :+
-	rts
-:		
-
-	jsr setupptrs
-	
-	ldy #0	
-	lda _ctk_hires_color
-:	
- 	sta (ptr1),y
-	iny
-	cpy tmpl
-	bne :-
-
-	lda _ctk_hires_bitmapptr
-	sta ptr1
-	lda _ctk_hires_bitmapptr+1
-	sta ptr1+1
-	
-	ldy #0
-	ldx #0
-:		
-	lda (ptr1),y
- 	sta (ptr2),y		
-	iny
-	inx
-	cpx #8
-	bne :-
-
-	ldx #0
-	
-	dec tmpl
-	bne :-
-	
-	jmp restore01	
-;---------------------------------------------------------------------
-	
\ No newline at end of file
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.h b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.h
deleted file mode 100644
index 58fea69..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-asm.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-hires-asm.h,v 1.1 2006/04/17 15:11:49 kthacker Exp $
- *
- */
-
-#ifndef __CTK_HIRES_ASM_H__
-#define __CTK_HIRES_ASM_H__
-
-void __fastcall__ ctk_hires_cclear(unsigned char len);
-void __fastcall__ ctk_hires_chline(unsigned char len);
-void __fastcall__ ctk_hires_cputc(unsigned char c);
-void __fastcall__ ctk_hires_cputsn(unsigned char *str,
-				      unsigned char len);
-
-void ctk_hires_draw_buttonleft(void);
-void ctk_hires_draw_buttonright(void);
-
-struct ctk_hires_windowparams {
-  unsigned char w;
-  unsigned char h;
-  unsigned char clipy1;
-  unsigned char clipy2;
-  unsigned char color1;
-  unsigned char color2;
-  unsigned char titlelen;
-  char *title;
-};
-extern struct ctk_hires_windowparams ctk_hires_windowparams;
-void ctk_hires_draw_windowborders(void);
-
-extern unsigned char ctk_hires_cursx,
-  ctk_hires_cursy,
-  ctk_hires_color,
-  ctk_hires_reversed,
-  ctk_hires_underline;
-
-
-void __fastcall__ ctk_hires_draw_bitmapline(unsigned char len);
-
-#endif /* __CTK_HIRES_ASM_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-service.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-service.c
deleted file mode 100644
index c35b3cd..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-service.c
+++ /dev/null
@@ -1,931 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-hires-service.c,v 1.1 2006/04/17 15:11:51 kthacker Exp $
- *
- */
-
-#include "contiki-version.h"
-
-#include "ctk.h"
-#include "ctk-draw.h"
-#include "ctk-draw-service.h"
-#include "ctk-hires.h"
-#include "ctk-hires-asm.h"
-
-#include "ctk-hires-theme.h"
-
-#include <string.h>
-
-#ifndef NULL
-#define NULL (void *)0
-#endif /* NULL */
-
-#define SCREEN_HEIGHT 25
-#define SCREEN_WIDTH  40
-
-#define SCREENADDR 0xdc00
-#define HIRESADDR  0xe000
-
-static unsigned char lineptr;
-
-unsigned char ctk_hires_cursx, ctk_hires_cursy;
-unsigned char ctk_hires_reversed;
-unsigned char ctk_hires_color;
-unsigned char ctk_hires_underline;
-
-/*static unsigned char cchar;
-
-static unsigned char tmp01;
-static unsigned char tmph, tmpl, tmpborder;
-static unsigned char *tmpptr;*/
-
-
-static unsigned char x, y, i;
-/*static unsigned char h;*/
-static unsigned char wfocus;
-static unsigned char x1, y1, x2, y2;
-
-struct ctk_hires_windowparams ctk_hires_windowparams;
-unsigned char *ctk_hires_bitmapptr;
-
-/*unsigned char ctk_draw_windowborder_height = 1;
-unsigned char ctk_draw_windowborder_width = 1;
-unsigned char ctk_draw_windowtitle_height = 1;*/
-
-static void s_ctk_draw_clear(unsigned char y1, unsigned char y2);
-
-
-/*-----------------------------------------------------------------------------------*/
-/* Tables. */
-
-unsigned short ctk_hires_yscreenaddr[25] =
-  {0 * SCREEN_WIDTH + SCREENADDR, 1 * SCREEN_WIDTH + SCREENADDR,
-   2 * SCREEN_WIDTH + SCREENADDR, 3 * SCREEN_WIDTH + SCREENADDR,
-   4 * SCREEN_WIDTH + SCREENADDR, 5 * SCREEN_WIDTH + SCREENADDR,
-   6 * SCREEN_WIDTH + SCREENADDR, 7 * SCREEN_WIDTH + SCREENADDR,
-   8 * SCREEN_WIDTH + SCREENADDR, 9 * SCREEN_WIDTH + SCREENADDR,
-   10 * SCREEN_WIDTH + SCREENADDR, 11 * SCREEN_WIDTH + SCREENADDR,
-   12 * SCREEN_WIDTH + SCREENADDR, 13 * SCREEN_WIDTH + SCREENADDR,
-   14 * SCREEN_WIDTH + SCREENADDR, 15 * SCREEN_WIDTH + SCREENADDR,
-   16 * SCREEN_WIDTH + SCREENADDR, 17 * SCREEN_WIDTH + SCREENADDR,
-   18 * SCREEN_WIDTH + SCREENADDR, 19 * SCREEN_WIDTH + SCREENADDR,
-   20 * SCREEN_WIDTH + SCREENADDR, 21 * SCREEN_WIDTH + SCREENADDR,
-   22 * SCREEN_WIDTH + SCREENADDR, 23 * SCREEN_WIDTH + SCREENADDR,
-   24 * SCREEN_WIDTH + SCREENADDR};
-
-unsigned short ctk_hires_yhiresaddr[25] =
-  {0 * 320 + HIRESADDR, 1 * 320 + HIRESADDR,
-   2 * 320 + HIRESADDR, 3 * 320 + HIRESADDR,
-   4 * 320 + HIRESADDR, 5 * 320 + HIRESADDR,
-   6 * 320 + HIRESADDR, 7 * 320 + HIRESADDR,
-   8 * 320 + HIRESADDR, 9 * 320 + HIRESADDR,
-   10 * 320 + HIRESADDR, 11 * 320 + HIRESADDR,
-   12 * 320 + HIRESADDR, 13 * 320 + HIRESADDR,
-   14 * 320 + HIRESADDR, 15 * 320 + HIRESADDR,
-   16 * 320 + HIRESADDR, 17 * 320 + HIRESADDR,
-   18 * 320 + HIRESADDR, 19 * 320 + HIRESADDR,
-   20 * 320 + HIRESADDR, 21 * 320 + HIRESADDR,
-   22 * 320 + HIRESADDR, 23 * 320 + HIRESADDR,
-   24 * 320 + HIRESADDR};
-extern struct ctk_hires_theme ctk_hires_theme;
-struct ctk_hires_theme *ctk_hires_theme_ptr = &ctk_hires_theme;
-/*-----------------------------------------------------------------------------------*/
-#define hires_wherex() ctk_hires_cursx
-#define hires_revers(c)   ctk_hires_reversed = c
-#define hires_color(c)   ctk_hires_color = c
-#define hires_underline(c)   ctk_hires_underline = c
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cvline(unsigned char length)
-{
-  static unsigned char i;
-  
-  for(i = 0; i < length; ++i) {
-    ctk_hires_cputc('|');
-    --ctk_hires_cursx;
-    ++ctk_hires_cursy;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_gotoxy(unsigned char x, unsigned char y)
-{
-  ctk_hires_cursx = x;
-  ctk_hires_cursy = y;
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cclearxy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_cclear(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_chlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_chline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cvlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  hires_cvline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cputcxy(unsigned char x, unsigned char y, char c)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_cputc(c);
-}
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void 
-clear_line(unsigned char line)
-{
-  lineptr = line;
-  asm("lda %v", lineptr);
-  asm("asl");
-  asm("tax");
-  asm("lda %v,x", ctk_hires_yhiresaddr);
-  asm("sta ptr2");
-  asm("lda %v+1,x", ctk_hires_yhiresaddr);
-  asm("sta ptr2+1");
-  asm("lda %v,x", ctk_hires_yscreenaddr);
-  asm("sta ptr1");
-  asm("lda %v+1,x", ctk_hires_yscreenaddr);
-  asm("sta ptr1+1");
-
-  
-  asm("sei");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$30");
-  asm("sta $01");
-  asm("ldy #39");
-  asm("ldx %v", lineptr);
-  asm("lda %v+%w,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpatterncolors));
-  asm("clearlineloop1:");
-  asm("sta (ptr1),y");
-  asm("dey");
-  asm("bpl clearlineloop1");
-  asm("pla");
-  asm("sta $01");
-  asm("cli");
-
-
-  asm("lda %v", lineptr);
-  /*  asm("and #7");*/
-  asm("asl");
-  asm("asl");
-  asm("asl");
-  asm("tax");
-  asm("ldy #0");
-  asm("clearlineloop2:");
-  asm("lda %v+%w+0,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+1,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+2,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+3,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+4,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+5,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+6,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+7,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("bne clearlineloop2");
-  
-  asm("inc ptr2+1");
-
-  asm("ldy #0");
-  asm("clearlineloop3:");
-  asm("lda %v+%w+0,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+1,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+2,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+3,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+4,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+5,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+6,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+7,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("cpy #$40");
-  asm("bne clearlineloop3");
-
-  
-  if(lineptr == 24) {
-    hires_color(ctk_hires_theme.backgroundpatterncolors[24]);
-    hires_gotoxy(0, 24);
-    ctk_hires_cputsn(CONTIKI_VERSION_STRING,
-		     sizeof(CONTIKI_VERSION_STRING) - 1);
-  }
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi2(void)
-{
-  asm("pla");
-  asm("sta $01");
-  asm("pla");
-  asm("rti");
-}  
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi(void)
-{
-  asm("sei");
-  asm("pha");
-  asm("inc $d020");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$36");
-  asm("sta $01");
-  asm("lda #>_nmi2");
-  asm("pha");
-  asm("lda #<_nmi2");
-  asm("pha");
-  asm("php");
-  asm("jmp ($0318)");
-
-  nmi2();
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-setup_nmi(void)
-{
-  asm("lda #<_nmi");
-  asm("sta $fffa");
-  asm("lda #>_nmi");
-  asm("sta $fffb");
-  return;
-  nmi();
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-s_ctk_draw_init(void)
-{
-  unsigned char i, *ptr1, *ptr2;
-
-  
-  setup_nmi();
-  
-  /* Turn on hires mode, bank 0 ($c000 - $ffff) and $e000/$c000 for
-     hires/colors. */
-  VIC.ctrl1 = 0x3b;  /* $D011 */
-  VIC.addr  = 0x78;  /* $D018 */
-  VIC.ctrl2 = 0xc8;  /* $D016 */
-  CIA2.pra  = 0x00;  /* $DD00 */
-  
-  VIC.bordercolor = ctk_hires_theme.bordercolor; /* $D020 */
-  VIC.bgcolor0 = ctk_hires_theme.screencolor; /* $D021 */  
-
-  /* Fill color memory. */
-  asm("sei");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$30");
-  asm("sta $01");
-  asm("ldx #0");
-  asm("lda #$c0");
-  asm("fillcolorloop:");
-  asm("sta $dc00,x");
-  asm("sta $dd00,x");
-  asm("sta $de00,x");
-  asm("sta $df00,x");
-  asm("inx");
-  asm("bne fillcolorloop");
-
-  /* Setup sprite pointers */
-  asm("ldx #$fd");
-  asm("stx $dff8");
-  asm("inx");
-  asm("stx $dff9");
-  asm("pla");
-  asm("sta $01");
-  asm("cli");
-
-  /* Fill hires memory with 0. */
-
-  asm("lda $fd");
-  asm("pha");
-  asm("lda $fe");
-  asm("pha");
-  asm("lda #0");
-  asm("sta $fd");
-  asm("lda #$e0");
-  asm("sta $fe");
-  asm("ldy #0");
-  asm("lda #0");
-  asm("clrscrnloop:");
-  asm("lda #$55");
-  asm("sta ($fd),y");
-  asm("iny");
-  asm("lda #$aa");
-  asm("sta ($fd),y");
-  asm("iny");
-  asm("bne clrscrnloop");
-  asm("inc $fe");
-  asm("lda $fe");
-  asm("cmp #$ff");
-  asm("bne clrscrnloop");
-
-  asm("ldy #$00");
-  asm("clrscrnloop2:");
-  asm("lda #$55");
-  asm("sta $ff00,y");
-  asm("iny");
-  asm("lda #$aa");
-  asm("sta $ff00,y");
-  asm("iny");
-  asm("cpy #$40");
-  asm("bne clrscrnloop2");
-
-  
-  asm("pla");
-  asm("sta $fe");
-  asm("pla");
-  asm("sta $fd");
-
-  
-  s_ctk_draw_clear(0, SCREEN_HEIGHT);
-
-  /* Setup mouse pointer sprite. */
-  asm("lda %v+%w", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, pointermaskcolor));
-  asm("sta $d027");
-  asm("lda %v+%w", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, pointercolor));
-  asm("sta $d028");
-
-  ptr1 = ctk_hires_theme.pointer;
-  ptr2 = (unsigned char *)0xff40;
-  
-  for(i = 0; i < 0x80; ++i) {
-    *ptr2++ = *ptr1++;
-  }
-
-  return;
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-draw_widget(register struct ctk_widget *w,
-	    unsigned char x, unsigned char y,
-	    unsigned char clipy1, unsigned char clipy2,
-	    unsigned char afocus)
-{
-  static unsigned char xpos, ypos, xscroll;
-  static unsigned char i;
-  static char c;
-  static unsigned char len;
-  static unsigned char tmp;
-  static unsigned char yclipped;
-  static unsigned char focus;
-  char *text;
-  
-  xpos = x + w->x;
-  ypos = y + w->y;  
-
-  yclipped = 0;  
-  if(ypos >= clipy1 && ypos < clipy2) {
-    yclipped = 1;
-  }
-  focus = afocus;
-  
-  
-  switch(w->type) {
-  case CTK_WIDGET_SEPARATOR:
-    hires_color(ctk_hires_theme.separatorcolors[focus]);
-    if(yclipped) {
-      hires_chlinexy(xpos, ypos, w->w);
-    }
-    break;
-  case CTK_WIDGET_LABEL:
-    hires_color(ctk_hires_theme.labelcolors[focus]);
-    text = w->widget.label.text;
-    for(i = 0; i < w->h; ++i) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	hires_gotoxy(xpos, ypos);
-	ctk_hires_cputsn(text, w->w);
-	tmp = w->w - (hires_wherex() - xpos);
-	if(tmp > 0) {
-	  ctk_hires_cclear(tmp);
-	}
-      }
-      ++ypos;
-      text += w->w;
-    }
-    break;
-  case CTK_WIDGET_BUTTON:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.buttonleftcolors[focus]);
-      hires_gotoxy(xpos, ypos);
-      ctk_hires_draw_buttonleft();
-      hires_color(ctk_hires_theme.buttoncolors[focus]);
-      hires_gotoxy(xpos + 1, ypos);
-      ctk_hires_cputsn(w->widget.button.text, w->w);
-      hires_color(ctk_hires_theme.buttonrightcolors[focus]);
-      ctk_hires_draw_buttonright();
-    }
-    break;
-  case CTK_WIDGET_HYPERLINK:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.hyperlinkcolors[focus]);
-      hires_underline(1);
-      hires_gotoxy(xpos, ypos);
-      ctk_hires_cputsn(w->widget.button.text, w->w);
-      hires_underline(0);
-    }
-    break;
-  case CTK_WIDGET_TEXTENTRY:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.textentrycolors[focus]);
-      
-      if((focus & CTK_FOCUS_WIDGET) &&
-	 w->widget.textentry.state != CTK_TEXTENTRY_EDIT) {
-	hires_revers(1);
-      } else {
-	hires_revers(0);
-      }
-      xscroll = 0;
-      tmp = w->w - 1;
-      if(w->widget.textentry.xpos >= tmp) {
-	xscroll = w->widget.textentry.xpos - tmp;
-      }
-      text = w->widget.textentry.text;
-      if(w->widget.textentry.state == CTK_TEXTENTRY_EDIT) {
-	hires_revers(0);
-	hires_cputcxy(xpos, ypos, '>');
-	text += xscroll;
-	for(i = 0; i < w->w; ++i) {
-	  c = *text;
-	  if(i == w->widget.textentry.xpos - xscroll) {
-	    hires_revers(1);
-	  } else {
-	    hires_revers(0);
-	  }
-	  if(c == 0) {
-	    ctk_hires_cputc(' ');
-	  } else {
-	    ctk_hires_cputc(c);
-	  }
-	  hires_revers(0);
-	  ++text;
-	}
-	ctk_hires_cputc('<');
-      } else {
-	hires_cputcxy(xpos, ypos, '|');
-	/*	  hires_gotoxy(xpos + 1, ypos);          */
-	ctk_hires_cputsn(text, w->w);
-	i = hires_wherex();
-	tmp = i - xpos - 1;
-	if(tmp < w->w) {
-	  ctk_hires_cclear(w->w - tmp);
-	}
-	ctk_hires_cputc('|');
-      }
-    }
-    hires_revers(0);
-    break;
-  case CTK_WIDGET_ICON:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.iconcolors[focus]);
-
-      x = xpos;
-      len = strlen(w->widget.icon.title);
-      if(x + len >= SCREEN_WIDTH) {
-	x = SCREEN_WIDTH - len;
-      }
-
-      tmp = ypos + 3;
-	
-      if(tmp < clipy2) {
-	hires_gotoxy(x, tmp);
-	ctk_hires_cputsn(w->widget.icon.title, len);
-      }
-
-      hires_gotoxy(xpos, ypos);
-      if(w->widget.icon.bitmap != NULL) {
-	ctk_hires_bitmapptr = w->widget.icon.bitmap;
-	for(i = 0; i < 3; ++i) {
-	  if(ypos >= clipy1 && ypos < clipy2) {
-	    hires_gotoxy(xpos, ypos);
-	    ctk_hires_draw_bitmapline(3);
-	  }
-	  ctk_hires_bitmapptr += 3 * 8;
-	  ++ypos;
-	}
-	
-	/*	draw_bitmap_icon(w->widget.icon.bitmap);*/
-      }
-
-    }
-    break;
-  case CTK_WIDGET_BITMAP:
-    hires_color(ctk_hires_theme.bitmapcolors[focus]);
-    ctk_hires_bitmapptr = w->widget.bitmap.bitmap;
-    for(i = 0; i < w->h; ++i) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	hires_gotoxy(xpos, ypos);
-	ctk_hires_draw_bitmapline(w->w);
-      }
-      ctk_hires_bitmapptr += w->w * 8;
-      ++ypos;
-    }
-    break;
-
-  default:
-    break;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_widget(struct ctk_widget *w,
-		unsigned char focus,
-		unsigned char clipy1,
-		unsigned char clipy2)
-{
-  struct ctk_window *win = w->window;
-  unsigned char posx, posy;
-
-  posx = win->x + 1;
-  posy = win->y + 2;
-
-  if(w == win->focused) {
-    focus |= CTK_FOCUS_WIDGET;
-  }
-  
-  draw_widget(w, posx, posy,
-	      clipy1, clipy2,
-	      focus);
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_clear_window(register struct ctk_window *window,
-		      unsigned char focus,
-		      unsigned char clipy1,
-		      unsigned char clipy2)
-{
-  static unsigned char h;
-
-  hires_color(ctk_hires_theme.windowcolors[focus]);
-  
-  h = window->y + 2 + window->h;
-  /* Clear window contents. */
-  for(i = window->y + 2; i < h; ++i) {
-    if(i >= clipy1 && i <= clipy2) {
-      hires_cclearxy(window->x + 1, i, window->w);
-    }
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_window(register struct ctk_window *window,
-		unsigned char focus,
-		unsigned char clipy1, unsigned char clipy2)
-{
-  register struct ctk_widget *w;
-
-  x = window->x;
-  y = window->y + 1;
-  
-  ++clipy2;
-  
-  if(clipy2 <= y) {
-    return;
-  }
-  
-  /*  hires_color(ctk_hires_theme.windowcolors[focus+1]);*/
-  
-  x1 = x + 1;
-  y1 = y + 1;
-  /*  x2 = x1 + window->w;
-      y2 = y1 + window->h;*/
-    
-  hires_gotoxy(x, y);
-  ctk_hires_windowparams.w = window->w;
-  ctk_hires_windowparams.h = window->h;
-  if(clipy1 < y) {
-    ctk_hires_windowparams.clipy1 = 0;
-  } else {
-    ctk_hires_windowparams.clipy1 = clipy1 - y;
-  }
-  ctk_hires_windowparams.clipy2 = clipy2 - y;
-  ctk_hires_windowparams.color1 = ctk_hires_theme.windowcolors[focus+1];
-  ctk_hires_windowparams.color2 = ctk_hires_theme.windowcolors[focus];
-  ctk_hires_windowparams.title = window->title;
-  ctk_hires_windowparams.titlelen = window->titlelen;
-
-  if(ctk_hires_windowparams.clipy1 < ctk_hires_windowparams.clipy2 &&
-     ctk_hires_windowparams.clipy2 > 0) {
-    ctk_hires_draw_windowborders();
-  }
-  
-  focus = focus & CTK_FOCUS_WINDOW;
-  
-  /* Draw inactive widgets. */
-  for(w = window->inactive; w != NULL; w = w->next) {
-    draw_widget(w, x1, y1,
-		clipy1, clipy2,
-		focus);
-  }
-  
-  /* Draw active widgets. */
-  for(w = window->active; w != NULL; w = w->next) {  
-    wfocus = focus;
-    if(w == window->focused) {
-      wfocus |= CTK_FOCUS_WIDGET;
-    }
-    draw_widget(w, x1, y1,
-		clipy1, clipy2,
-		wfocus);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_dialog(register struct ctk_window *dialog)
-{
-  register struct ctk_widget *w;
-
-  hires_color(ctk_hires_theme.windowcolors[CTK_FOCUS_DIALOG]);
-
-  /*  x = (SCREEN_WIDTH - dialog->w) / 2;
-      y = (SCREEN_HEIGHT - 1 - dialog->h) / 2; */
-  x = dialog->x;
-  y = dialog->y + 1;
-
-
-  x1 = x + 1;
-  y1 = y + 1;
-  x2 = x1 + dialog->w;
-  y2 = y1 + dialog->h;
-
-
-  /* Draw dialog frame. */
-  
-  hires_cvlinexy(x, y1, dialog->h);
-  hires_cvlinexy(x2, y1, dialog->h);
-
-  hires_chlinexy(x1, y, dialog->w);
-  hires_chlinexy(x1, y2, dialog->w);
-
-  hires_cputcxy(x, y, CH_ULCORNER);
-  hires_cputcxy(x, y2, CH_LLCORNER);
-  hires_cputcxy(x2, y, CH_URCORNER);
-  hires_cputcxy(x2, y2, CH_LRCORNER);
-  
-  
-  /* Clear window contents. */
-  for(i = y1; i < y2; ++i) {
-    hires_cclearxy(x1, i, dialog->w);
-  }
-  
-  /* Draw inactive widgets. */
-  for(w = dialog->inactive; w != NULL; w = w->next) {
-    draw_widget(w, x1, y1,
-		0, SCREEN_HEIGHT, CTK_FOCUS_DIALOG);
-  }
-
-
-  /* Draw active widgets. */
-  for(w = dialog->active; w != NULL; w = w->next) {
-    wfocus = CTK_FOCUS_DIALOG;
-    if(w == dialog->focused) {
-      wfocus |= CTK_FOCUS_WIDGET;
-    }
-    draw_widget(w, x1, y1, 
-		0, SCREEN_HEIGHT, wfocus);
-  }
-
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_clear(unsigned char y1, unsigned char y2)
-{
-  for(i = y1; i < y2; ++i) {
-    clear_line(i);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-draw_menu(register struct ctk_menu *m)
-{
-  static unsigned char x, x2, y;
-  
-  hires_color(ctk_hires_theme.openmenucolor);
-  x = hires_wherex();
-  ctk_hires_cputsn(m->title, m->titlelen);
-  ctk_hires_cputc(' ');
-  x2 = hires_wherex();
-  if(x + CTK_CONF_MENUWIDTH > SCREEN_WIDTH) {
-    x = SCREEN_WIDTH - CTK_CONF_MENUWIDTH;
-  }      
-  for(y = 0; y < m->nitems; ++y) {
-    if(y == m->active) {
-      hires_color(ctk_hires_theme.activemenucolor);
-    } else {
-      hires_color(ctk_hires_theme.menucolor);
-    }
-    hires_gotoxy(x, y + 1);
-    if(m->items[y].title[0] == '-') {
-      ctk_hires_chline(CTK_CONF_MENUWIDTH);
-    } else {
-      ctk_hires_cputsn(m->items[y].title,
-			  strlen(m->items[y].title));
-    }
-    ctk_hires_cclear(x + CTK_CONF_MENUWIDTH - hires_wherex());
-    hires_revers(0);
-  }
-  hires_gotoxy(x2, 0);
-  hires_color(ctk_hires_theme.menucolor);  
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-s_ctk_draw_menus(struct ctk_menus *menus)
-{
-  struct ctk_menu *m;
-  
-  /* Draw menus */
-  hires_color(ctk_hires_theme.menucolor); 
-  hires_gotoxy(0, 0);
-  hires_revers(0);
-  ctk_hires_cputc(' ');
-  for(m = menus->menus->next; m != NULL; m = m->next) {
-    if(m != menus->open) {
-      ctk_hires_cputsn(m->title, m->titlelen);
-      ctk_hires_cputc(' ');
-    } else {     
-      draw_menu(m);
-    }
-  }
-  ctk_hires_cclear(SCREEN_WIDTH - hires_wherex() -
-		      strlen(menus->desktopmenu->title) - 1);
-  
-  /* Draw desktopmenu */  
-  if(menus->desktopmenu != menus->open) {
-    ctk_hires_cputsn(menus->desktopmenu->title,
-			menus->desktopmenu->titlelen);
-    ctk_hires_cputc(' ');
-  } else {
-    draw_menu(menus->desktopmenu);
-  }
-
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-s_ctk_draw_height(void)
-{
-  return SCREEN_HEIGHT;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-s_ctk_draw_width(void)
-{
-  return SCREEN_WIDTH;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned short
-s_ctk_mouse_xtoc(unsigned short x)
-{
-  return x / 8;
-}
-/*-----------------------------------------------------------------------------------*/
-static unsigned short
-s_ctk_mouse_ytoc(unsigned short y)
-{
-  return y / 8;
-}
-/*-----------------------------------------------------------------------------------*/
-static const struct ctk_draw_service_interface interface =
-  {CTK_DRAW_SERVICE_VERSION,
-   1,
-   1,
-   1,
-   s_ctk_draw_init,
-   s_ctk_draw_clear,
-   s_ctk_draw_clear_window,
-   s_ctk_draw_window,
-   s_ctk_draw_dialog,
-   s_ctk_draw_widget,
-   s_ctk_draw_menus,
-   s_ctk_draw_width,
-   s_ctk_draw_height,
-   s_ctk_mouse_xtoc,
-   s_ctk_mouse_ytoc,
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_PROCESS(proc, CTK_DRAW_SERVICE_NAME ": hires", EK_PRIO_NORMAL,
-	   eventhandler, NULL, (void *)&interface);
-
-/*--------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(ctk_conio_service_init, arg)
-{
-  ek_service_start(CTK_DRAW_SERVICE_NAME, &proc);
-}
-/*--------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  EK_EVENTHANDLER_ARGS(ev, data);
-  
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    s_ctk_draw_init();
-    ctk_restore();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    VIC.ctrl1 = 0x1b;  /* $D011 */
-    VIC.addr  = 0x17;  /* $D018 */
-    VIC.ctrl2 = 0xc8;  /* $D016 */
-    CIA2.pra  = 0x03;  /* $DD00 */
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;    
-  }
-}
-/*--------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-blueround.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-blueround.c
deleted file mode 100644
index 10fc27e..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-blueround.c
+++ /dev/null
@@ -1,313 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme-blueround.c,v 1.1 2006/04/17 15:11:51 kthacker Exp $
- *
- */
-
-#include <conio.h>
-#include "ctk-hires-theme.h"
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define BGCOLOR1 0x06
-#define BGCOLOR2 0x00
-#define BGCOLOR3 0x06
-#define BGCOLOR4 0x00
-
-struct ctk_hires_theme ctk_hires_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0xfe,0xf8,0xe0,0xc0,0xc0,0x80,0x80,0x00},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0x00,0x55,0xaa,0x00,0xaa,0x00,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0x7f,0x1f,0x07,0x03,0x03,0x01,0x01,0x00},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x00,0x01,0x01,0x03,0x03,0x07,0x1f,0x7f},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0x00,0x80,0x80,0xc0,0xc0,0xe0,0xf8,0xfe},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0x03,0x0f,0x1f,0x1f,0x1f,0x1f,0x0f,0x03},
-    
-    /* buttonright[8]; */
-    {0xc0,0xf0,0xf8,0xf8,0xf8,0xf8,0xf0,0xc0},
-    
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_CYAN),
-     COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_CYAN)},
-    
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_CYAN),
-     COLOR(COLOR_BLUE, COLOR_WHITE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_CYAN),
-     COLOR(COLOR_LIGHTBLUE, COLOR_WHITE)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLACK, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLACK, COLOR_CYAN),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_CYAN),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_CYAN)},
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_BLUE, COLOR_BLACK),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLACK),
-     COLOR(COLOR_LIGHTBLUE, COLOR_CYAN)},
-
-
-    /* Button corner colors. */
-    /* unsigned char buttonleftcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-    
-    /* buttonrightcolors[6]; */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-     COLOR(COLOR_LIGHTBLUE, COLOR_BLUE)},
-
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_BLUE, COLOR_LIGHTBLUE),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_LIGHTBLUE, COLOR_BLUE),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_CYAN, COLOR_BLUE),
-    
-    /* Border and screen colors. */
-    /*    unsigned char bordercolor,*/
-    0,
-    
-    /* screencolor; */
-    0,
-
-    /* Pointer sprite 0 color */
-    /*unsigned char pointermaskcolor,*/
-    3,
-
-    /* Pointer sprite 1 color */
-    /*     pointercolor; */
-    6,
-
-    
-    /* Pointer sprite. */
-    /* unsigned char pointer[128]; */
-    {0x00, 0x00, 0x00,
-    0x40, 0x00, 0x00,
-    0x60, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x78, 0x00, 0x00,
-    0x7c, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x58, 0x00, 0x00,
-    0x18, 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,
-    
-    0xc0, 0x00, 0x00,
-    0xe0, 0x00, 0x00,
-    0xf0, 0x00, 0x00,
-    0xf8, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0x3c, 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 },
-    
-
-
-    /* Background pattern fill. */
-    /*    unsigned char backgroundpattern[8*25]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x10,0x38,0x10,0x00,0x00,0x00,
-     0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,
-     0x00,0x18,0x3c,0x7e,0x7e,0x3c,0x18,0x00,
-     0x00,0x3c,0x7e,0x7e,0x7e,0x7e,0x3c,0x00,
-     0x3c,0x7e,0xff,0xff,0xff,0xff,0x7e,0x3c,
-     0x7e,0xff,0xff,0xff,0xff,0xff,0xff,0x7e,
-     
-     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x10,0x38,0x10,0x00,0x00,0x00,
-     0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,
-     0x00,0x18,0x3c,0x7e,0x7e,0x3c,0x18,0x00,
-     0x00,0x3c,0x7e,0x7e,0x7e,0x7e,0x3c,0x00,
-     0x3c,0x7e,0xff,0xff,0xff,0xff,0x7e,0x3c,
-     0x7e,0xff,0xff,0xff,0xff,0xff,0xff,0x7e,
-
-     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
-     0x00,0x00,0x10,0x38,0x10,0x00,0x00,0x00,
-     0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,
-     0x00,0x18,0x3c,0x7e,0x7e,0x3c,0x18,0x00,
-     0x00,0x3c,0x7e,0x7e,0x7e,0x7e,0x3c,0x00,
-     0x3c,0x7e,0xff,0xff,0xff,0xff,0x7e,0x3c,
-     0x7e,0xff,0xff,0xff,0xff,0xff,0xff,0x7e,
-
-     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    },
-
-    /* Background colors. */
-    /*    unsigned char backgroundpatterncolors[25]; */
-      {
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-
-       COLOR(BGCOLOR2,BGCOLOR3),COLOR(BGCOLOR2,BGCOLOR3),
-       COLOR(BGCOLOR2,BGCOLOR3),COLOR(BGCOLOR2,BGCOLOR3),
-       COLOR(BGCOLOR2,BGCOLOR3),COLOR(BGCOLOR2,BGCOLOR3),
-       COLOR(BGCOLOR2,BGCOLOR3),COLOR(BGCOLOR2,BGCOLOR3),
-
-       COLOR(BGCOLOR3,BGCOLOR4),COLOR(BGCOLOR3,BGCOLOR4),
-       COLOR(BGCOLOR3,BGCOLOR4),COLOR(BGCOLOR3,BGCOLOR4),
-       COLOR(BGCOLOR3,BGCOLOR4),COLOR(BGCOLOR3,BGCOLOR4),
-       COLOR(BGCOLOR3,BGCOLOR4),COLOR(BGCOLOR3,BGCOLOR4),
-
-      COLOR(BGCOLOR4,BGCOLOR4)},
-      
-    
-
-  };
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-default.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-default.c
deleted file mode 100644
index ad8b430..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-default.c
+++ /dev/null
@@ -1,303 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme-default.c,v 1.1 2006/04/17 15:11:51 kthacker Exp $
- *
- */
-
-#include <conio.h>
-#include "ctk-hires-theme.h"
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define BGCOLOR1 7
-#define BGCOLOR2 10
-#define BGCOLOR3 4
-#define BGCOLOR4 6
-
-struct ctk_hires_theme ctk_hires_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0xff,0xff,0xc0,0xcf,0xc0,0xc3,0xc0,0xc0},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0xff,0xff,0x00,0xff,0x00,0xff,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0xff,0xfc,0x00,0xf0,0x00,0xc0,0x00,0x00},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x0b,0x0b,0x0b,0x0b,0xfb,0x03,0xff,0xff},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0xff,0x00,0xff,0xff},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x80,0x00},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0xc5,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf},
-    
-    /* buttonright[8]; */
-    {0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xa3},
-    
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY3),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_WHITE),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_GRAY1)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3)},
-    
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_WHITE),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_WHITE)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_YELLOW),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_YELLOW)},
-
-
-    /* Button corner colors. */
-    /* unsigned char buttonleftcolors[6], */
-    {COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_GRAY3),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY3),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3)},
-    
-    /* buttonrightcolors[6]; */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY3),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY3)},
-
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_YELLOW, COLOR_BLACK),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_BLACK, COLOR_YELLOW),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_WHITE, COLOR_BLACK),
-    
-    /* Border and screen colors. */
-    /*    unsigned char bordercolor,*/
-    6,
-    
-    /* screencolor; */
-    0,
-
-    /* Pointer sprite 0 color */
-    0,
-
-    /* Pointer sprite 1 color */
-    1,
-
-
-    /* Pointer sprite. */
-    /* unsigned char pointer[128]; */
-    {0x00, 0x00, 0x00,
-    0x40, 0x00, 0x00,
-    0x60, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x78, 0x00, 0x00,
-    0x7c, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x58, 0x00, 0x00,
-    0x18, 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,
-    
-    0xc0, 0x00, 0x00,
-    0xe0, 0x00, 0x00,
-    0xf0, 0x00, 0x00,
-    0xf8, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0x3c, 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 },
-    
-
-
-    /* Background pattern fill. */
-    /*    unsigned char backgroundpattern[8*25]; */
-      {0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00},
-
-    /* Background colors. */
-    /*    unsigned char backgroundpatterncolors[25]; */
-      {COLOR(BGCOLOR1,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3)},
-      
-    
-
-  };
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-enabler.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-enabler.c
deleted file mode 100644
index 996a558..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-enabler.c
+++ /dev/null
@@ -1,303 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme-enabler.c,v 1.1 2006/04/17 15:11:52 kthacker Exp $
- *
- */
-
-#include <conio.h>
-#include "ctk-hires-theme.h"
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define BGCOLOR1 0x0f
-#define BGCOLOR2 0x0c
-#define BGCOLOR3 0x0b
-#define BGCOLOR4 0x00
-
-struct ctk_hires_theme ctk_hires_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0xff,0xfc,0xf0,0xf0,0xe0,0xe0,0xe0,0xe0},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0xff,0x3f,0x0f,0x0f,0x07,0x07,0x07,0x07},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x07,0x07,0x0f,0x0f,0x3f,0xff,0xff,0xff},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0xe0,0xe0,0xf0,0xf0,0xfc,0xff,0xff,0xff},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0x03,0x0f,0x1f,0x1f,0x1f,0x1f,0x0f,0x03},    
-    
-    /* buttonright[8]; */
-    {0xc0,0xf0,0xf8,0xf8,0xf8,0xf8,0xf0,0xc0},    
-    
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY2, COLOR_GRAY3),
-     COLOR(COLOR_GRAY2, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_GRAY1)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3)},
-    
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GRAY2, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_GRAY2),
-     COLOR(COLOR_WHITE, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_WHITE)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY3, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_YELLOW)},
-
-
-    /* Button corner colors. */
-    /* unsigned char buttonleftcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY3),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY1)},
-    
-    /* buttonrightcolors[6]; */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY3),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_GRAY3),
-     COLOR(COLOR_WHITE, COLOR_GRAY1)},
-
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_GRAY3, COLOR_BLACK),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_GRAY1, COLOR_GRAY3),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_WHITE, COLOR_BLACK),
-    
-    /* Border and screen colors. */
-    /*    unsigned char bordercolor,*/
-    0,
-    
-    /* screencolor; */
-    0,
-
-    /* Pointer sprite 0 color */
-    0,
-
-    /* Pointer sprite 1 color */
-    1,
-
-
-    /* Pointer sprite. */
-    /* unsigned char pointer[128]; */
-    {0x00, 0x00, 0x00,
-    0x40, 0x00, 0x00,
-    0x60, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x78, 0x00, 0x00,
-    0x7c, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x58, 0x00, 0x00,
-    0x18, 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,
-    
-    0xc0, 0x00, 0x00,
-    0xe0, 0x00, 0x00,
-    0xf0, 0x00, 0x00,
-    0xf8, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0x3c, 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 },
-    
-
-
-    /* Background pattern fill. */
-    /*    unsigned char backgroundpattern[8*25]; */
-      {0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00,
-       0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-       0xff,0xdd,0xff,0x77,0xff,0xdd,0xff,0x77,
-       0xff,0x55,0xff,0x55,0xff,0x55,0xff,0x55,
-       0xee,0x55,0xbb,0x55,0xee,0x55,0xbb,0x55,
-       0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,
-       0xaa,0x44,0xaa,0x11,0xaa,0x44,0xaa,0x11,
-       0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,
-       0x88,0x00,0x22,0x00,0x88,0x00,0x22,0x00},
-
-    /* Background colors. */
-    /*    unsigned char backgroundpatterncolors[25]; */
-      {COLOR(BGCOLOR1,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR2,BGCOLOR1),COLOR(BGCOLOR2,BGCOLOR1),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR3,BGCOLOR2),COLOR(BGCOLOR3,BGCOLOR2),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3),
-       COLOR(BGCOLOR4,BGCOLOR3),COLOR(BGCOLOR4,BGCOLOR3)},
-      
-    
-
-  };
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-ravenpine.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-ravenpine.c
deleted file mode 100644
index 71dd3fe..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-ravenpine.c
+++ /dev/null
@@ -1,288 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme-ravenpine.c,v 1.1 2006/04/17 15:11:52 kthacker Exp $
- *
- */
-
-#include <conio.h>
-#include "ctk-hires-theme.h"
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define BGCOLOR1 0x00
-#define BGCOLOR2 0x05
-
-
-struct ctk_hires_theme ctk_hires_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0x00,0x3f,0x3f,0x30,0x30,0x30,0x30,0x30},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0x00,0xfc,0xfc,0x0c,0x0c,0x0c,0x0c,0x0c},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x0c,0x0c,0x0c,0x0c,0x0c,0xfc,0xfc,0x00},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0x30,0x30,0x30,0x30,0x30,0x3f,0x3f,0x00},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0x3e,0x30,0x30,0x30,0x30,0x30,0x30,0x3c},
-    
-    /* buttonright[8]; */
-    {0x1c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c},
-    
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-        
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_BLACK, COLOR_BLUE),
-     COLOR(COLOR_GREEN, COLOR_LIGHTBLUE),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLUE),
-     COLOR(COLOR_LIGHTGREEN, COLOR_LIGHTBLUE)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_BLACK, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-        
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_WHITE)},
-        
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_WHITE)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_WHITE)},
-
-
-    /* Button corner colors. */
-    /* unsigned char buttonleftcolors[6], */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-    
-    /* buttonrightcolors[6]; */
-    {COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GRAY1),
-     COLOR(COLOR_BLACK, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_GREEN, COLOR_BLACK),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_BLACK, COLOR_GREEN),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_LIGHTGREEN, COLOR_GREEN),
-    
-    /* Border and screen colors. */
-    /*    unsigned char bordercolor,*/
-    0,
-    
-    /* screencolor; */
-    0,
-
-    /* Pointer sprite 0 color */
-    COLOR_LIGHTGREEN,
-
-    /* Pointer sprite 1 color */
-    COLOR_GREEN,
-
-
-    /* Pointer sprite. */
-    /* unsigned char pointer[128]; */
-    {0x00, 0x00, 0x00,
-    0x40, 0x00, 0x00,
-    0x60, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x78, 0x00, 0x00,
-    0x7c, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x58, 0x00, 0x00,
-    0x18, 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,
-    
-    0xc0, 0x00, 0x00,
-    0xe0, 0x00, 0x00,
-    0xf0, 0x00, 0x00,
-    0xf8, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0x3c, 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 },
-    
-
-
-    /* Background pattern fill. */
-    /*    unsigned char backgroundpattern[8*25]; */
-    {
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,      
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
-      0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,      
-    },
-    /* Background colors. */
-    /*    unsigned char backgroundpatterncolors[25]; */
-      {COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2)},
-      
-    
-
-  };
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-springlight.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-springlight.c
deleted file mode 100644
index 0dcdf2e..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme-springlight.c
+++ /dev/null
@@ -1,284 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme-springlight.c,v 1.1 2006/04/17 15:11:53 kthacker Exp $
- *
- */
-
-#include <conio.h>
-#include "ctk-hires-theme.h"
-
-#define COLOR(bg, fg) ((fg << 4) | (bg))
-
-#define BGCOLOR1 0x05
-#define BGCOLOR2 0x0d
-
-
-struct ctk_hires_theme ctk_hires_theme =
-  {
-    /* Version string. */
-    /*    char version[8]; */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
-
-    /* Window borders patterns. */
-    /* unsigned char ulcorner[8], */ /* Upper left corner. */
-    {0x00,0x3f,0x6a,0x40,0x60,0x40,0x60,0x40},
-    
-    /* titlebar[8], */            /* Title bar pattern. */
-    {0x00,0xff,0xaa,0x00,0x00,0x00,0x00,0x00},
-    
-    /* urcorner[8],       */       /* Upper right corner. */
-    {0x00,0xf0,0x20,0x00,0x00,0x00,0x00,0x00},
-    
-    /* rightborder[8],     */      /* Right border. */
-    {0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},
-    
-    /* lrcorner[8],      */        /* Lower right corner. */
-    {0x02,0x02,0x02,0x02,0x02,0x06,0xfc,0x00},
-    
-    /* lowerborder[8], */          /* Lower border. */
-    {0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00},
-    
-    /* llcorner[8],  */            /* Lower left corner. */
-    {0x60,0x40,0x40,0x40,0x00,0x00,0x00,0x00},
-    
-    /* leftborder[8]; */          /* Left border. */
-    {0x60,0x40,0x60,0x40,0x60,0x40,0x60,0x40},
-
-    /* Button corner patterns. */
-    /*    unsigned char buttonleft[8], */
-    {0x0f,0x18,0x10,0x10,0x10,0x10,0x10,0x00},    
-    
-    /* buttonright[8]; */
-    {0x00,0x08,0x08,0x08,0x08,0x08,0x18,0xf0},    
-    
-      /* Menu border patterns. */
-    /*    unsigned char menuleftpattern[8], */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* menurightpatterns[8]; */
-    {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
-    
-    /* Window and widget colors. */
-    /*    unsigned char windowcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_GREEN),
-     COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK)},
-    
-    /* separatorcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GRAY1, COLOR_GRAY2),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY1),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY1)},
-    
-    /* labelcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK)},
-    
-    /* buttoncolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_GREEN),
-     COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY2),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-    
-    /* hyperlinkcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GRAY2, COLOR_LIGHTBLUE),
-     COLOR(COLOR_GREEN, COLOR_CYAN),
-     COLOR(COLOR_GREEN, COLOR_BLUE),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLUE),
-     COLOR(COLOR_BLUE, COLOR_LIGHTGREEN)},
-    
-    /* textentrycolors[6],  */
-    {COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_GREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_LIGHTGREEN, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* bitmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_GRAY1),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK),
-     COLOR(COLOR_GRAY3, COLOR_BLACK)},
-    
-    /* textmapcolors[6], */
-    {COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_GRAY2, COLOR_GRAY1),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_WHITE, COLOR_BLACK)},
-    
-    /* iconcolors[6]; */
-    {COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_GREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY1),
-     COLOR(COLOR_GRAY1, COLOR_LIGHTGREEN),
-     COLOR(COLOR_WHITE, COLOR_BLACK),
-     COLOR(COLOR_BLACK, COLOR_YELLOW)},
-
-
-    /* Button corner colors. */
-    /* unsigned char buttonleftcolors[6], */
-    {COLOR(COLOR_GRAY1, COLOR_GREEN),
-     COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY2)},
-    
-    /* buttonrightcolors[6]; */
-    {COLOR(COLOR_GRAY1, COLOR_BLACK),
-     COLOR(COLOR_GRAY1, COLOR_GREEN),
-     COLOR(COLOR_GREEN, COLOR_GRAY1),
-     COLOR(COLOR_GREEN, COLOR_LIGHTGREEN),
-     COLOR(COLOR_LIGHTGREEN, COLOR_GRAY2),
-     COLOR(COLOR_LIGHTGREEN, COLOR_WHITE)},
-
-    
-    /* Menu colors. */
-    /*    unsigned char menucolor,*/
-    COLOR(COLOR_LIGHTGREEN, COLOR_GRAY1),
-    
-    /*    openmenucolor, */
-    COLOR(COLOR_BLACK, COLOR_GREEN),
-    
-    /* activemenucolor; */
-    COLOR(COLOR_BLACK, COLOR_LIGHTGREEN),
-    
-    /* Border and screen colors. */
-    /*    unsigned char bordercolor,*/
-    5,
-    
-    /* screencolor; */
-    0,
-
-    /* Pointer sprite 0 color */
-    COLOR_WHITE,
-
-    /* Pointer sprite 1 color */
-    COLOR_GREEN,
-
-
-    /* Pointer sprite. */
-    /* unsigned char pointer[128]; */
-    {0x00, 0x00, 0x00,
-    0x40, 0x00, 0x00,
-    0x60, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x78, 0x00, 0x00,
-    0x7c, 0x00, 0x00,
-    0x70, 0x00, 0x00,
-    0x58, 0x00, 0x00,
-    0x18, 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,
-    
-    0xc0, 0x00, 0x00,
-    0xe0, 0x00, 0x00,
-    0xf0, 0x00, 0x00,
-    0xf8, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfe, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0xfc, 0x00, 0x00,
-    0x3c, 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 },
-    
-
-
-    /* Background pattern fill. */
-    /*    unsigned char backgroundpattern[8*25]; */
-      {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
-255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
-255, 255, 223, 255, 255, 247, 255, 255, 191, 247, 255, 255, 219, 255, 255, 187,
-255, 239, 251, 191, 239, 253, 223, 251, 223, 253, 183, 255, 213, 127, 237, 191,
-245, 95, 245, 223, 181, 255, 85, 255, 85, 219, 118, 219, 109, 219, 182, 109, 219, 182, 109, 219, 170, 109, 219, 170, 181, 173, 85, 218, 85, 173, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 170, 146, 85, 146, 170, 82, 138, 50, 74, 164, 73,
-146, 84, 137, 82, 4, 169, 18, 164, 2, 168, 18, 68, 18, 160, 10, 32, 74, 0, 42, 128, 18, 64, 20, 0, 82, 0, 4, 80, 4, 0, 72, 2, 0, 16, 132, 0, 0, 72, 0, 0, 4, 64, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
-
-    /* Background colors. */
-    /*    unsigned char backgroundpatterncolors[25]; */
-      {COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2),
-       COLOR(BGCOLOR1,BGCOLOR2),COLOR(BGCOLOR1,BGCOLOR2)},
-      
-    
-
-  };
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme.h b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme.h
deleted file mode 100644
index 8659e07..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires-theme.h
+++ /dev/null
@@ -1,105 +0,0 @@
- /*
- * 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 OS for the C64
- *
- * $Id: ctk-hires-theme.h,v 1.1 2006/04/17 15:11:53 kthacker Exp $
- *
- */
-#ifndef __CTK_HIRES_THEME_H__
-#define __CTK_HIRES_THEME_H__
-
-struct ctk_hires_theme {
-  /* Version string. */
-  char version[8];
-  
-  /* Window borders patterns. */
-  unsigned char ulcorner[8], /* Upper left corner. */
-    titlebar[8],             /* Title bar pattern. */
-    urcorner[8],             /* Upper right corner. */
-    rightborder[8],          /* Right border. */
-    lrcorner[8],             /* Lower right corner. */
-    lowerborder[8],          /* Lower border. */
-    llcorner[8],             /* Lower left corner. */
-    leftborder[8];           /* Left border. */
-
-  /* Button corner patterns. */
-  unsigned char buttonleftpattern[8],
-    buttonrightpattern[8];
-
-  /* Menu border patterns. */
-  unsigned char menuleftpattern[8],
-    menurightpatterns[8];
-  
-
-
-  /* Window and widget colors. */
-  unsigned char windowcolors[6],
-    separatorcolors[6],
-    labelcolors[6],
-    buttoncolors[6],
-    hyperlinkcolors[6],
-    textentrycolors[6],
-    bitmapcolors[6],
-    textmapcolors[6],
-    iconcolors[6];
-
-  
-  /* Button corner colors. */
-  unsigned char buttonleftcolors[6],
-    buttonrightcolors[6];
-
-  /* Menu colors. */
-  unsigned char menucolor,
-    openmenucolor,
-    activemenucolor;
- 
-  /* Border and screen colors. */
-  unsigned char bordercolor,
-    screencolor;
-
-  /* Pointer sprite colors. */
-  unsigned char pointermaskcolor,
-    pointercolor;
-  
-  /* Pointer sprite. */
-  unsigned char pointer[128];
-
-  /* Background pattern fill. */
-  unsigned char backgroundpattern[8*25];
-
-  /* Background colors. */
-  unsigned char backgroundpatterncolors[25];
-
-};
-
-extern struct ctk_hires_theme ctk_hires_theme;
-extern struct ctk_hires_theme *ctk_hires_theme_ptr;
-
-#endif /* __CTK_HIRES_THEME_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.c
deleted file mode 100644
index 49a2b8c..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.c
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-hires.c,v 1.1 2006/04/17 15:11:54 kthacker Exp $
- *
- */
-
-#include "contiki-version.h"
-
-#include "ctk.h"
-#include "ctk-draw.h"
-#include "ctk-hires.h"
-#include "ctk-hires-asm.h"
-
-#include "ctk-hires-theme.h"
-
-#include <string.h>
-#include <ctype.h>
-
-#ifndef NULL
-#define NULL (void *)0
-#endif /* NULL */
-
-#define SCREEN_HEIGHT 25
-#define SCREEN_WIDTH  40
-
-#define SCREENADDR 0xdc00
-#define HIRESADDR  0xe000
-
-static unsigned char lineptr;
-
-unsigned char ctk_hires_cursx, ctk_hires_cursy;
-unsigned char ctk_hires_reversed;
-unsigned char ctk_hires_color;
-unsigned char ctk_hires_underline;
-
-/*static unsigned char cchar;
-
-static unsigned char tmp01;
-static unsigned char tmph, tmpl, tmpborder;
-static unsigned char *tmpptr;*/
-
-
-static unsigned char x, y, i;
-/*static unsigned char h;*/
-static unsigned char wfocus;
-static unsigned char x1, y1, x2, y2;
-
-struct ctk_hires_windowparams ctk_hires_windowparams;
-unsigned char *ctk_hires_bitmapptr;
-
-unsigned char ctk_draw_windowborder_height = 1;
-unsigned char ctk_draw_windowborder_width = 1;
-unsigned char ctk_draw_windowtitle_height = 1;
-
-/*-----------------------------------------------------------------------------------*/
-/* Tables. */
-
-unsigned short ctk_hires_yscreenaddr[25] =
-  {0 * SCREEN_WIDTH + SCREENADDR, 1 * SCREEN_WIDTH + SCREENADDR,
-   2 * SCREEN_WIDTH + SCREENADDR, 3 * SCREEN_WIDTH + SCREENADDR,
-   4 * SCREEN_WIDTH + SCREENADDR, 5 * SCREEN_WIDTH + SCREENADDR,
-   6 * SCREEN_WIDTH + SCREENADDR, 7 * SCREEN_WIDTH + SCREENADDR,
-   8 * SCREEN_WIDTH + SCREENADDR, 9 * SCREEN_WIDTH + SCREENADDR,
-   10 * SCREEN_WIDTH + SCREENADDR, 11 * SCREEN_WIDTH + SCREENADDR,
-   12 * SCREEN_WIDTH + SCREENADDR, 13 * SCREEN_WIDTH + SCREENADDR,
-   14 * SCREEN_WIDTH + SCREENADDR, 15 * SCREEN_WIDTH + SCREENADDR,
-   16 * SCREEN_WIDTH + SCREENADDR, 17 * SCREEN_WIDTH + SCREENADDR,
-   18 * SCREEN_WIDTH + SCREENADDR, 19 * SCREEN_WIDTH + SCREENADDR,
-   20 * SCREEN_WIDTH + SCREENADDR, 21 * SCREEN_WIDTH + SCREENADDR,
-   22 * SCREEN_WIDTH + SCREENADDR, 23 * SCREEN_WIDTH + SCREENADDR,
-   24 * SCREEN_WIDTH + SCREENADDR};
-
-unsigned short ctk_hires_yhiresaddr[25] =
-  {0 * 320 + HIRESADDR, 1 * 320 + HIRESADDR,
-   2 * 320 + HIRESADDR, 3 * 320 + HIRESADDR,
-   4 * 320 + HIRESADDR, 5 * 320 + HIRESADDR,
-   6 * 320 + HIRESADDR, 7 * 320 + HIRESADDR,
-   8 * 320 + HIRESADDR, 9 * 320 + HIRESADDR,
-   10 * 320 + HIRESADDR, 11 * 320 + HIRESADDR,
-   12 * 320 + HIRESADDR, 13 * 320 + HIRESADDR,
-   14 * 320 + HIRESADDR, 15 * 320 + HIRESADDR,
-   16 * 320 + HIRESADDR, 17 * 320 + HIRESADDR,
-   18 * 320 + HIRESADDR, 19 * 320 + HIRESADDR,
-   20 * 320 + HIRESADDR, 21 * 320 + HIRESADDR,
-   22 * 320 + HIRESADDR, 23 * 320 + HIRESADDR,
-   24 * 320 + HIRESADDR};
-extern struct ctk_hires_theme ctk_hires_theme;
-struct ctk_hires_theme *ctk_hires_theme_ptr = &ctk_hires_theme;
-/*-----------------------------------------------------------------------------------*/
-#define hires_wherex() ctk_hires_cursx
-#define hires_revers(c)   ctk_hires_reversed = c
-#define hires_color(c)   ctk_hires_color = c
-#define hires_underline(c)   ctk_hires_underline = c
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cvline(unsigned char length)
-{
-  static unsigned char i;
-  
-  for(i = 0; i < length; ++i) {
-    ctk_hires_cputc('|');
-    --ctk_hires_cursx;
-    ++ctk_hires_cursy;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_gotoxy(unsigned char x, unsigned char y)
-{
-  ctk_hires_cursx = x;
-  ctk_hires_cursy = y;
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cclearxy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_cclear(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_chlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_chline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cvlinexy(unsigned char x, unsigned char y, unsigned char length)
-{
-  hires_gotoxy(x, y);
-  hires_cvline(length);
-}
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-hires_cputcxy(unsigned char x, unsigned char y, char c)
-{
-  hires_gotoxy(x, y);
-  ctk_hires_cputc(c);
-}
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void 
-clear_line(unsigned char line)
-{
-  lineptr = line;
-  asm("lda %v", lineptr);
-  asm("asl");
-  asm("tax");
-  asm("lda %v,x", ctk_hires_yhiresaddr);
-  asm("sta ptr2");
-  asm("lda %v+1,x", ctk_hires_yhiresaddr);
-  asm("sta ptr2+1");
-  asm("lda %v,x", ctk_hires_yscreenaddr);
-  asm("sta ptr1");
-  asm("lda %v+1,x", ctk_hires_yscreenaddr);
-  asm("sta ptr1+1");
-
-  
-  asm("sei");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$30");
-  asm("sta $01");
-  asm("ldy #39");
-  asm("ldx %v", lineptr);
-  asm("lda %v+%w,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpatterncolors));
-  asm("clearlineloop1:");
-  asm("sta (ptr1),y");
-  asm("dey");
-  asm("bpl clearlineloop1");
-  asm("pla");
-  asm("sta $01");
-  asm("cli");
-
-
-  asm("lda %v", lineptr);
-  /*  asm("and #7");*/
-  asm("asl");
-  asm("asl");
-  asm("asl");
-  asm("tax");
-  asm("ldy #0");
-  asm("clearlineloop2:");
-  asm("lda %v+%w+0,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+1,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+2,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+3,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+4,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+5,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+6,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+7,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("bne clearlineloop2");
-  
-  asm("inc ptr2+1");
-
-  asm("ldy #0");
-  asm("clearlineloop3:");
-  asm("lda %v+%w+0,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+1,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+2,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+3,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+4,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+5,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+6,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("lda %v+%w+7,x", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, backgroundpattern));
-  asm("sta (ptr2),y");
-  asm("iny");
-  asm("cpy #$40");
-  asm("bne clearlineloop3");
-
-  
-  if(lineptr == 24) {
-    hires_color(ctk_hires_theme.backgroundpatterncolors[24]);
-    hires_gotoxy(0, 24);
-    ctk_hires_cputsn(CONTIKI_VERSION_STRING,
-		     sizeof(CONTIKI_VERSION_STRING) - 1);
-  }
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi2(void)
-{
-  asm("pla");
-  asm("sta $01");
-  asm("pla");
-  asm("rti");
-}  
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-nmi(void)
-{
-  asm("sei");
-  asm("pha");
-  asm("inc $d020");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$36");
-  asm("sta $01");
-  asm("lda #>_nmi2");
-  asm("pha");
-  asm("lda #<_nmi2");
-  asm("pha");
-  asm("php");
-  asm("jmp ($0318)");
-
-  nmi2();
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-setup_nmi(void)
-{
-  asm("lda #<_nmi");
-  asm("sta $fffa");
-  asm("lda #>_nmi");
-  asm("sta $fffb");
-  return;
-  nmi();
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-ctk_draw_init(void)
-{
-  unsigned char i, *ptr1, *ptr2;
-
-  
-  setup_nmi();
-  
-  /* Turn on hires mode, bank 0 ($c000 - $ffff) and $e000/$c000 for
-     hires/colors. */
-  VIC.ctrl1 = 0x3b;  /* $D011 */
-  VIC.addr  = 0x78;  /* $D018 */
-  VIC.ctrl2 = 0xc8;  /* $D016 */
-  CIA2.pra  = 0x00;  /* $DD00 */
-
-  VIC.bordercolor = ctk_hires_theme.bordercolor; /* $D020 */
-  VIC.bgcolor0 = ctk_hires_theme.screencolor; /* $D021 */  
-
-  /* Fill color memory. */
-  asm("sei");
-  asm("lda $01");
-  asm("pha");
-  asm("lda #$30");
-  asm("sta $01");
-  asm("ldx #0");
-  asm("lda #$c0");
-  asm("fillcolorloop:");
-  asm("sta $dc00,x");
-  asm("sta $dd00,x");
-  asm("sta $de00,x");
-  asm("sta $df00,x");
-  asm("inx");
-  asm("bne fillcolorloop");
-
-  /* Setup sprite pointers */
-  asm("ldx #$fd");
-  asm("stx $dff8");
-  asm("inx");
-  asm("stx $dff9");
-  asm("pla");
-  asm("sta $01");
-  asm("cli");
-
-  /* Fill hires memory with 0. */
-
-  asm("lda $fd");
-  asm("pha");
-  asm("lda $fe");
-  asm("pha");
-  asm("lda #0");
-  asm("sta $fd");
-  asm("lda #$e0");
-  asm("sta $fe");
-  asm("ldy #0");
-  asm("lda #0");
-  asm("clrscrnloop:");
-  asm("lda #$55");
-  asm("sta ($fd),y");
-  asm("iny");
-  asm("lda #$aa");
-  asm("sta ($fd),y");
-  asm("iny");
-  asm("bne clrscrnloop");
-  asm("inc $fe");
-  asm("lda $fe");
-  asm("cmp #$ff");
-  asm("bne clrscrnloop");
-
-  asm("ldy #$00");
-  asm("clrscrnloop2:");
-  asm("lda #$55");
-  asm("sta $ff00,y");
-  asm("iny");
-  asm("lda #$aa");
-  asm("sta $ff00,y");
-  asm("iny");
-  asm("cpy #$40");
-  asm("bne clrscrnloop2");
-
-  
-  asm("pla");
-  asm("sta $fe");
-  asm("pla");
-  asm("sta $fd");
-
-  
-  ctk_draw_clear(0, SCREEN_HEIGHT);
-
-  /* Setup mouse pointer sprite. */
-  asm("lda %v+%w", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, pointermaskcolor));
-  asm("sta $d027");
-  asm("lda %v+%w", ctk_hires_theme,
-      offsetof(struct ctk_hires_theme, pointercolor));
-  asm("sta $d028");
-
-  ptr1 = ctk_hires_theme.pointer;
-  ptr2 = (unsigned char *)0xff40;
-  
-  for(i = 0; i < 0x80; ++i) {
-    *ptr2++ = *ptr1++;
-  }
-
-  return;
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-static void __fastcall__
-draw_widget(register struct ctk_widget *w,
-	    unsigned char x, unsigned char y,
-	    unsigned char clipy1, unsigned char clipy2,
-	    unsigned char afocus)
-{
-  static unsigned char xpos, ypos, xscroll;
-  static unsigned char i;
-  static char c;
-  static unsigned char len;
-  static unsigned char tmp;
-  static unsigned char yclipped;
-  static unsigned char focus;
-  char *text;
-  
-  xpos = x + w->x;
-  ypos = y + w->y;  
-
-  yclipped = 0;  
-  if(ypos >= clipy1 && ypos < clipy2) {
-    yclipped = 1;
-  }
-  focus = afocus;
-  
-  
-  switch(w->type) {
-  case CTK_WIDGET_SEPARATOR:
-    hires_color(ctk_hires_theme.separatorcolors[focus]);
-    if(yclipped) {
-      hires_chlinexy(xpos, ypos, w->w);
-    }
-    break;
-  case CTK_WIDGET_LABEL:
-    hires_color(ctk_hires_theme.labelcolors[focus]);
-    text = w->widget.label.text;
-    for(i = 0; i < w->h; ++i) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	hires_gotoxy(xpos, ypos);
-	ctk_hires_cputsn(text, w->w);
-	tmp = w->w - (hires_wherex() - xpos);
-	if(tmp > 0) {
-	  ctk_hires_cclear(tmp);
-	}
-      }
-      ++ypos;
-      text += w->w;
-    }
-    break;
-  case CTK_WIDGET_BUTTON:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.buttonleftcolors[focus]);
-      hires_gotoxy(xpos, ypos);
-      ctk_hires_draw_buttonleft();
-      hires_color(ctk_hires_theme.buttoncolors[focus]);
-      hires_gotoxy(xpos + 1, ypos);
-      ctk_hires_cputsn(w->widget.button.text, w->w);
-      hires_color(ctk_hires_theme.buttonrightcolors[focus]);
-      ctk_hires_draw_buttonright();
-    }
-    break;
-  case CTK_WIDGET_HYPERLINK:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.hyperlinkcolors[focus]);
-      hires_underline(1);
-      hires_gotoxy(xpos, ypos);
-      ctk_hires_cputsn(w->widget.button.text, w->w);
-      hires_underline(0);
-    }
-    break;
-  case CTK_WIDGET_TEXTENTRY:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.textentrycolors[focus]);
-      
-      if((focus & CTK_FOCUS_WIDGET) &&
-	 w->widget.textentry.state != CTK_TEXTENTRY_EDIT) {
-	hires_revers(1);
-      } else {
-	hires_revers(0);
-      }
-      xscroll = 0;
-      tmp = w->w - 1;
-      if(w->widget.textentry.xpos >= tmp) {
-	xscroll = w->widget.textentry.xpos - tmp;
-      }
-      text = w->widget.textentry.text;
-      if(w->widget.textentry.state == CTK_TEXTENTRY_EDIT) {
-	hires_revers(0);
-	hires_cputcxy(xpos, ypos, '>');
-	text += xscroll;
-	for(i = 0; i < w->w; ++i) {
-	  c = *text;
-	  if(i == w->widget.textentry.xpos - xscroll) {
-	    hires_revers(1);
-	  } else {
-	    hires_revers(0);
-	  }
-	  if(c == 0) {
-	    ctk_hires_cputc(' ');
-	  } else {
-	    ctk_hires_cputc(c);
-	  }
-	  hires_revers(0);
-	  ++text;
-	}
-	ctk_hires_cputc('<');
-      } else {
-	hires_cputcxy(xpos, ypos, '|');
-	/*	  hires_gotoxy(xpos + 1, ypos);          */
-	ctk_hires_cputsn(text, w->w);
-	i = hires_wherex();
-	tmp = i - xpos - 1;
-	if(tmp < w->w) {
-	  ctk_hires_cclear(w->w - tmp);
-	}
-	ctk_hires_cputc('|');
-      }
-    }
-    hires_revers(0);
-    break;
-  case CTK_WIDGET_ICON:
-    if(yclipped) {
-      hires_color(ctk_hires_theme.iconcolors[focus]);
-
-      x = xpos;
-      len = strlen(w->widget.icon.title);
-      if(x + len >= SCREEN_WIDTH) {
-	x = SCREEN_WIDTH - len;
-      }
-
-      tmp = ypos + 3;
-	
-      if(tmp < clipy2) {
-	hires_gotoxy(x, tmp);
-	ctk_hires_cputsn(w->widget.icon.title, len);
-      }
-
-      hires_gotoxy(xpos, ypos);
-      if(w->widget.icon.bitmap != NULL) {
-	ctk_hires_bitmapptr = w->widget.icon.bitmap;
-	for(i = 0; i < 3; ++i) {
-	  if(ypos >= clipy1 && ypos < clipy2) {
-	    hires_gotoxy(xpos, ypos);
-	    ctk_hires_draw_bitmapline(3);
-	  }
-	  ctk_hires_bitmapptr += 3 * 8;
-	  ++ypos;
-	}
-	
-	/*	draw_bitmap_icon(w->widget.icon.bitmap);*/
-      }
-
-    }
-    break;
-  case CTK_WIDGET_BITMAP:
-    hires_color(ctk_hires_theme.bitmapcolors[focus]);
-    ctk_hires_bitmapptr = w->widget.bitmap.bitmap;
-    for(i = 0; i < w->h; ++i) {
-      if(ypos >= clipy1 && ypos < clipy2) {
-	hires_gotoxy(xpos, ypos);
-	ctk_hires_draw_bitmapline(w->w);
-      }
-      ctk_hires_bitmapptr += w->w * 8;
-      ++ypos;
-    }
-    break;
-
-  default:
-    break;
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_widget(struct ctk_widget *w,
-		unsigned char focus,
-		unsigned char clipy1,
-		unsigned char clipy2)
-{
-  struct ctk_window *win = w->window;
-  unsigned char posx, posy;
-
-  posx = win->x + 1;
-  posy = win->y + 2;
-
-  if(w == win->focused) {
-    focus |= CTK_FOCUS_WIDGET;
-  }
-  
-  draw_widget(w, posx, posy,
-	      clipy1, clipy2,
-	      focus);
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_clear_window(register struct ctk_window *window,
-		      unsigned char focus,
-		      unsigned char clipy1,
-		      unsigned char clipy2)
-{
-  static unsigned char h;
-
-  hires_color(ctk_hires_theme.windowcolors[focus]);
-  
-  h = window->y + 2 + window->h;
-  /* Clear window contents. */
-  for(i = window->y + 2; i < h; ++i) {
-    if(i >= clipy1 && i <= clipy2) {
-      hires_cclearxy(window->x + 1, i, window->w);
-    }
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_window(register struct ctk_window *window,
-		unsigned char focus,
-		unsigned char clipy1, unsigned char clipy2)
-{
-  register struct ctk_widget *w;
-
-  x = window->x;
-  y = window->y + 1;
-  
-  ++clipy2;
-  
-  if(clipy2 <= y) {
-    return;
-  }
-  
-  /*  hires_color(ctk_hires_theme.windowcolors[focus+1]);*/
-  
-  x1 = x + 1;
-  y1 = y + 1;
-  /*  x2 = x1 + window->w;
-      y2 = y1 + window->h;*/
-    
-  hires_gotoxy(x, y);
-  ctk_hires_windowparams.w = window->w;
-  ctk_hires_windowparams.h = window->h;
-  if(clipy1 < y) {
-    ctk_hires_windowparams.clipy1 = 0;
-  } else {
-    ctk_hires_windowparams.clipy1 = clipy1 - y;
-  }
-  ctk_hires_windowparams.clipy2 = clipy2 - y;
-  ctk_hires_windowparams.color1 = ctk_hires_theme.windowcolors[focus+1];
-  ctk_hires_windowparams.color2 = ctk_hires_theme.windowcolors[focus];
-  ctk_hires_windowparams.title = window->title;
-  ctk_hires_windowparams.titlelen = window->titlelen;
-
-  if(ctk_hires_windowparams.clipy1 < ctk_hires_windowparams.clipy2 &&
-     ctk_hires_windowparams.clipy2 > 0) {
-    ctk_hires_draw_windowborders();
-  }
-  
-  focus = focus & CTK_FOCUS_WINDOW;
-  
-  /* Draw inactive widgets. */
-  for(w = window->inactive; w != NULL; w = w->next) {
-    draw_widget(w, x1, y1,
-		clipy1, clipy2,
-		focus);
-  }
-  
-  /* Draw active widgets. */
-  for(w = window->active; w != NULL; w = w->next) {  
-    wfocus = focus;
-    if(w == window->focused) {
-      wfocus |= CTK_FOCUS_WIDGET;
-    }
-    draw_widget(w, x1, y1,
-		clipy1, clipy2,
-		wfocus);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_dialog(register struct ctk_window *dialog)
-{
-  register struct ctk_widget *w;
-
-  hires_color(ctk_hires_theme.windowcolors[CTK_FOCUS_DIALOG]);
-
-  /*  x = (SCREEN_WIDTH - dialog->w) / 2;
-      y = (SCREEN_HEIGHT - 1 - dialog->h) / 2; */
-  x = dialog->x;
-  y = dialog->y + 1;
-
-
-  x1 = x + 1;
-  y1 = y + 1;
-  x2 = x1 + dialog->w;
-  y2 = y1 + dialog->h;
-
-
-  /* Draw dialog frame. */
-  
-  hires_cvlinexy(x, y1, dialog->h);
-  hires_cvlinexy(x2, y1, dialog->h);
-
-  hires_chlinexy(x1, y, dialog->w);
-  hires_chlinexy(x1, y2, dialog->w);
-
-  hires_cputcxy(x, y, CH_ULCORNER);
-  hires_cputcxy(x, y2, CH_LLCORNER);
-  hires_cputcxy(x2, y, CH_URCORNER);
-  hires_cputcxy(x2, y2, CH_LRCORNER);
-  
-  
-  /* Clear window contents. */
-  for(i = y1; i < y2; ++i) {
-    hires_cclearxy(x1, i, dialog->w);
-  }
-  
-  /* Draw inactive widgets. */
-  for(w = dialog->inactive; w != NULL; w = w->next) {
-    draw_widget(w, x1, y1,
-		0, SCREEN_HEIGHT, CTK_FOCUS_DIALOG);
-  }
-
-
-  /* Draw active widgets. */
-  for(w = dialog->active; w != NULL; w = w->next) {
-    wfocus = CTK_FOCUS_DIALOG;
-    if(w == dialog->focused) {
-      wfocus |= CTK_FOCUS_WIDGET;
-    }
-    draw_widget(w, x1, y1, 
-		0, SCREEN_HEIGHT, wfocus);
-  }
-
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_clear(unsigned char y1, unsigned char y2)
-{
-  for(i = y1; i < y2; ++i) {
-    clear_line(i);
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-static void
-draw_menu(register struct ctk_menu *m)
-{
-  static unsigned char x, x2, y;
-  
-  hires_color(ctk_hires_theme.openmenucolor);
-  x = hires_wherex();
-  ctk_hires_cputsn(m->title, m->titlelen);
-  ctk_hires_cputc(' ');
-  x2 = hires_wherex();
-  if(x + CTK_CONF_MENUWIDTH > SCREEN_WIDTH) {
-    x = SCREEN_WIDTH - CTK_CONF_MENUWIDTH;
-  }      
-  for(y = 0; y < m->nitems; ++y) {
-    if(y == m->active) {
-      hires_color(ctk_hires_theme.activemenucolor);
-    } else {
-      hires_color(ctk_hires_theme.menucolor);
-    }
-    hires_gotoxy(x, y + 1);
-    if(m->items[y].title[0] == '-') {
-      ctk_hires_chline(CTK_CONF_MENUWIDTH);
-    } else {
-      ctk_hires_cputsn(m->items[y].title,
-			  strlen(m->items[y].title));
-    }
-    ctk_hires_cclear(x + CTK_CONF_MENUWIDTH - hires_wherex());
-    hires_revers(0);
-  }
-  hires_gotoxy(x2, 0);
-  hires_color(ctk_hires_theme.menucolor);  
-}
-/*-----------------------------------------------------------------------------------*/
-void
-ctk_draw_menus(struct ctk_menus *menus)
-{
-  struct ctk_menu *m;
-  
-  /* Draw menus */
-  hires_color(ctk_hires_theme.menucolor); 
-  hires_gotoxy(0, 0);
-  hires_revers(0);
-  ctk_hires_cputc(' ');
-  for(m = menus->menus->next; m != NULL; m = m->next) {
-    if(m != menus->open) {
-      ctk_hires_cputsn(m->title, m->titlelen);
-      ctk_hires_cputc(' ');
-    } else {     
-      draw_menu(m);
-    }
-  }
-  ctk_hires_cclear(SCREEN_WIDTH - hires_wherex() -
-		      strlen(menus->desktopmenu->title) - 1);
-  
-  /* Draw desktopmenu */  
-  if(menus->desktopmenu != menus->open) {
-    ctk_hires_cputsn(menus->desktopmenu->title,
-			menus->desktopmenu->titlelen);
-    ctk_hires_cputc(' ');
-  } else {
-    draw_menu(menus->desktopmenu);
-  }
-
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-ctk_draw_height(void)
-{
-  return SCREEN_HEIGHT;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-ctk_draw_width(void)
-{
-  return SCREEN_WIDTH;
-}
-/*-----------------------------------------------------------------------------------*/
-/*unsigned char
-ctk_arch_isprint(char c)
-{
-  return isprint(c);
-}*/
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.h b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.h
deleted file mode 100644
index 5d8db4b..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2002, 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-hires.h,v 1.1 2006/04/17 15:11:54 kthacker Exp $
- *
- */
-
-#ifndef __CTK_HIRES_H__
-#define __CTK_HIRES_H__
-
-#include <conio.h>
-
-typedef char ctk_arch_key_t;
-
-#define ctk_arch_keyavail kbhit
-#define ctk_arch_getkey   cgetc
-
-#define CH_ENTER '\n'
-
-#endif /* __CTK_HIRES_H__ */
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires2.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires2.c
deleted file mode 100644
index d3e8f03..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-hires2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-void ctk_hires_cputc(unsigned char ch)
-{
-}
-
-void ctk_hires_cclear(unsigned char len)
-{
-}
-
-void ctk_hires_chline(unsigned char len)
-{
-}
-void ctk_hires_cputsn(unsigned char *str, unsigned char len)
-{
-}
-
-void ctk_hires_draw_buttonleft()
-{
-}
-
-void ctk_hires_draw_buttonright()
-{
-}
-
-void ctk_hires_draw_bitmapline(unsigned char len)
-{
-}
-
-void ctk_hires_draw_windowborders()
-{
-}
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-1351.S b/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-1351.S
deleted file mode 100644
index eeef7b5..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-1351.S
+++ /dev/null
@@ -1,149 +0,0 @@
-
-;---------------------------------------------------------------------
-	;; The 1351 mouse code was taken from the CC65 libraries,
-	;; written by Ullrich von Bassewitz 
-;---------------------------------------------------------------------	
-
-        .macpack        generic
-
-	.import		_ctk_mouse_joyx, _ctk_mouse_joyy
-	.import		_ctk_mouse_firebutton	
-	.export		_ctk_mouse_1351
-;---------------------------------------------------------------------
-.bss
-OldValue:       .res    1               ; Temp for MoveCheck routine
-NewValue:       .res    1               ; Temp for MoveCheck routine
-YCorr:          .res    1               ; Correction for Y coordinate
-	
-OldPotX:        .res    1               ; Old hw counter values
-OldPotY:        .res    1
- 
-SID_ADConv1     = $D419
-SID_ADConv2     = $D41A
-CIA1_PRA        = $DC00	
-CIA1_PRB        = $DC01	
-CIA1_DDRB       = $DC03	
-
-
-;---------------------------------------------------------------------
-.data
-XMin:           .word    0               ; X1 value of bounding box
-YMin:           .word    0               ; Y1 value of bounding box
-XMax:           .word    319             ; X2 value of bounding box
-YMax:           .word    199             ; Y2 value of bounding box
-	
-;---------------------------------------------------------------------
-.code
-
-;---------------------------------------------------------------------
-;---------------------------------------------------------------------
-	;; Most of the mouse code is taken from the CC65 libraries written by
-	;; Ullrich von Bassewitz
-MoveCheck:
-        sty     OldValue
-        sta     NewValue
-        ldx     #$00
- 
-        sub     OldValue                ; a = mod64 (new - old)
-        and     #%01111111
-        cmp     #%01000000              ; if (a > 0)
-        bcs     @L1                     ;
-        lsr     a                       ;   a /= 2;
-        beq     @L2                     ;   if (a != 0)
-        ldy     NewValue                ;     y = NewValue
-        rts                             ;   return
- 
-@L1:    ora     #%11000000              ; else or in high order bits
-        cmp     #$FF                    ; if (a != -1)
-        beq     @L2
-        sec
-        ror     a                       ;   a /= 2
-        dex                             ;   high byte = -1 (X = $FF)
-        ldy     NewValue
-        rts
-                                                                               
-@L2:    txa                             ; A = $00
-        rts
-                                                                               
-;---------------------------------------------------------------------	
-_ctk_mouse_1351:
-        lda     SID_ADConv1             ; Get mouse X movement
-        ldy     OldPotX
-        jsr     MoveCheck               ; Calculate movement vector
-        sty     OldPotX
- 
-; Calculate the new X coordinate (--> a/y)
- 
-        add     _ctk_mouse_joyx
-        tay                             ; Remember low byte
-        txa
-        adc     _ctk_mouse_joyx+1
-        tax
- 
-; Limit the X coordinate to the bounding box
- 
-        cpy     XMin
-        sbc     XMin+1
-        bpl     @L1
-        ldy     XMin
-        ldx     XMin+1
-        jmp     @L2
-@L1:    txa
- 
-        cpy     XMax
-        sbc     XMax+1
-        bmi     @L2
-        ldy     XMax
-        ldx     XMax+1
-@L2:    sty     _ctk_mouse_joyx
-        stx     _ctk_mouse_joyx+1
-; Calculate the Y movement vector
- 
-        lda     SID_ADConv2             ; Get mouse Y movement
-        ldy     OldPotY
-        jsr     MoveCheck               ; Calculate movement
-        sty     OldPotY
- 
-; Calculate the new Y coordinate (--> a/y)
- 
-        sta     OldValue
-        lda     _ctk_mouse_joyy
-        sub     OldValue
-        tay
-        stx     OldValue
-        lda     _ctk_mouse_joyy+1
-        sbc     OldValue
-        tax
- 
-        cpy     YMin
-        sbc     YMin+1
-        bpl     @L3
-        ldy     YMin
-        ldx     YMin+1
-        jmp     @L4
-@L3:    txa
-                                                                               
-        cpy     YMax
-        sbc     YMax+1
-        bmi     @L4
-        ldy     YMax
-        ldx     YMax+1
-@L4:    sty     _ctk_mouse_joyy
-        stx     _ctk_mouse_joyy+1
-
-	;; Get mouse button
-        lda     #$7F
-        sta     CIA1_PRA
-        lda     CIA1_PRB                ; Read joystick #0
-        ldx     #0
-        and     #$1F
-        eor     #$1F
-	
-	ora     _ctk_mouse_firebutton
-	sta	_ctk_mouse_firebutton
-	
-	lda	#0
-	sta	CIA1_PRA
-	sta	CIA1_DDRB	
-	rts	
-;---------------------------------------------------------------------			
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-asm.S b/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-asm.S
deleted file mode 100644
index 6aa53b4..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-asm.S
+++ /dev/null
@@ -1,48 +0,0 @@
-
-;---------------------------------------------------------------------
-	;; The 1351 mouse code was taken from the CC65 libraries,
-	;; written by Ullrich von Bassewitz 
-;---------------------------------------------------------------------	
-
-        .macpack        generic
-
-	.import		_ctk_mouse_joyx, _ctk_mouse_joyy
-	.import		_ctk_mouse_firebutton
-	.export		_ctk_mouse_asm_irq
-	.import		_ctk_mouse_joy, _ctk_mouse_1351
-;---------------------------------------------------------------------
-	
-;---------------------------------------------------------------------
-.code
-
-;---------------------------------------------------------------------			
-_ctk_mouse_asm_irq:
-	lda #0
-	sta _ctk_mouse_firebutton
-	
-	jsr _ctk_mouse_joy
-	;; jsr_ctk_mouse_1351
-
- ; 	lda _ctk_mouse_joybutton
- ; 	ora _ctk_mouse_1351button
- ; 	sta _ctk_mouse_firebutton
-	
-	  lda _ctk_mouse_joyy
-	  clc
-	  adc #$32
-	  sta $d001
-	  sta $d003	
-
-	  lda _ctk_mouse_joyx
-	  clc
-	  adc #$18
-	  sta $d000
-	  sta $d002	
-	  lda #0
-	  adc _ctk_mouse_joyx+1
-	  and #1
-	  beq :+
-	  lda #3
-:		
-	  sta $d010                                                                                       
-	  jmp $ea31
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-joy.S b/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-joy.S
deleted file mode 100644
index 963ca36..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse-joy.S
+++ /dev/null
@@ -1,135 +0,0 @@
-
-;---------------------------------------------------------------------
-
-        .macpack        generic
-
-	.import		_ctk_mouse_joyx, _ctk_mouse_joyy
-	.import		_ctk_mouse_firebutton	
-	.export		_ctk_mouse_joy	
-;---------------------------------------------------------------------
-.bss
-lastjoydy:	.res 1
-lastjoydx:	.res 1
-joydycnt:	.res 1
-joydxcnt:	.res 1
-	
-;---------------------------------------------------------------------
-.code
-
-;---------------------------------------------------------------------
-_ctk_mouse_joy:
-	  ldy $dc02
-	  lda #0
-          sta $dc02
-          lda $dc00
-          sty $dc02
-	  ldy #0
-	  ldx #0
-	  lsr
-	  bcs nodey
-	  dey
-nodey:
-	  lsr
-	  bcs noiny
-	  iny
-noiny:
-	  lsr
-	  bcs nodex
-	  dex
-nodex:
-	  lsr
-	  bcs noinx
-	  inx
-noinx:
-	  and #1
-	  eor #1
-	  ora _ctk_mouse_firebutton
-	  sta _ctk_mouse_firebutton
-
-	  cpy lastjoydy
-	  sty lastjoydy
-	  bne noydy
-	  tya
-	  pha
-	  inc joydycnt
-	  lda joydycnt
-          cmp #$1f
-          bmi nostajoydycnt
-          lda #$20
-	  sta joydycnt
-nostajoydycnt:
-	  lsr
-	  lsr
-	  lsr
-	  lsr
-	  tay
-	  pla
-asldeyloop:
-	  asl
-	  dey
-	  bpl asldeyloop
-	  tay
-	  jmp ydy
-noydy:
-	  lda #0
-	  sta joydycnt
-ydy:
-
-	  tya
-	  clc
-	  adc _ctk_mouse_joyy
-
-	  cmp #240
-	  bcc :+
-	  lda #0
-:	
-		
- 	  cmp #200
- 	  bcc :+
- 	  lda #199		
-:
-	  sta _ctk_mouse_joyy
-	
-	  cpx lastjoydx
-	  stx lastjoydx
-	  bne noxdx
-	  txa
-	  pha
-	  inc joydxcnt
-	  lda joydxcnt
-          cmp #$1f
-          bmi nostajoydxcnt
-          lda #$20
-	  sta joydxcnt
-nostajoydxcnt:
-	  lsr
-	  lsr
-	  lsr
-	  lsr
-	  tax
-	  pla
-asldexloop:
-	  asl
-	  dex
-	  bpl asldexloop
-	  tax
-	  jmp xdx
-noxdx:
-	  lda #0
-	  sta joydxcnt
-xdx:
-	                                                                                       
-	  txa
-	  clc
-	  adc _ctk_mouse_joyx
-	  sta _ctk_mouse_joyx
-	  php
-	  lda #$ff
-	  cpx #0
-	  bmi nolda02
-	  lda #0
-nolda02:
-	  plp
-	  adc _ctk_mouse_joyx+1
-	  sta _ctk_mouse_joyx+1
-	  rts	                                                                                       
diff --git a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse.c b/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse.c
deleted file mode 100644
index 98ef49c..0000000
--- a/contiki-cpc/contiki-cpc/ctk/unused/ctk-mouse.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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 "ctk" console GUI toolkit for cc65
- *
- * $Id: ctk-mouse.c,v 1.1 2006/04/17 15:11:54 kthacker Exp $
- *
- */
-
-#include "ctk.h"
-#include "ctk-mouse.h"
-#include "ctk-conf.h"
-
-#if CTK_CONF_MOUSE_SUPPORT
-
-unsigned short ctk_mouse_joyy, ctk_mouse_joyx;
-unsigned char ctk_mouse_firebutton;
-
-extern void ctk_mouse_asm_irq(void);
-
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-ctk_mouse_init(void)
-{
-  /* Place mouse pointer at the middle of the screen. */
-  ctk_mouse_joyx = 160;
-  ctk_mouse_joyy = 100;
-  
-  /* Setup and start IRQ */
-  asm("sei");
-  asm("lda #<%v", ctk_mouse_asm_irq);
-  asm("sta $0314");
-  asm("lda #>%v", ctk_mouse_asm_irq);
-  asm("sta $0315");   
-  asm("cli");
-  
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-unsigned short
-ctk_mouse_x(void)
-{
-  if(ctk_mouse_joyx >= 342) {
-    ctk_mouse_joyx = 0;
-  } else if(ctk_mouse_joyx >= 320) {
-    ctk_mouse_joyx = 319;
-  }
-  return ctk_mouse_joyx;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned short
-ctk_mouse_y(void)
-{
-  return ctk_mouse_joyy;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-ctk_mouse_button(void)
-{
-  return ctk_mouse_firebutton;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-ctk_mouse_xtoc(unsigned short x)
-{
-  return x / 8;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-ctk_mouse_ytoc(unsigned short y)
-{
-  return y / 8;
-}
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-ctk_mouse_hide(void)
-{
-  /* Turn off sprites 0 and 1 */
-  asm("lda #0");
-  asm("sta $d015"); 
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-ctk_mouse_show(void)
-{  
-  /* Turn on sprites 0 and 1 */
-  asm("lda #3");
-  asm("sta $d015"); 
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#endif /* CTK_CONF_MOUSE_SUPPORT */
diff --git a/contiki-cpc/contiki-cpc/lib/lc-asm.s b/contiki-cpc/contiki-cpc/lib/lc-asm.s
deleted file mode 100644
index 05f773d..0000000
--- a/contiki-cpc/contiki-cpc/lib/lc-asm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-;---------------------------------------------------------------------
-;;	.globl ptr1
-;---------------------------------------------------------------------
-_lc_set::
-;;	sta ptr1
-;;	stx ptr1+1
-;;	tsx
-;;	lda $0102,x
-;;	ldy #$01
-;;	sta (ptr1),y
-;;	lda $0101,x
-;;	dey
-;;	sta (ptr1),y
-
-	ret
-;---------------------------------------------------------------------
-_lc_resume::
-;;	sta ptr1
-;;	stx ptr1+1
-;;	ldy #$01
-;;	lda (ptr1),y
-;;	beq :+
-;;	tsx
-;;	sta $0102,x
-;;	dey
-;;	lda (ptr1),y
-;;	sta $0101,x
-
-	ret
-;---------------------------------------------------------------------	
diff --git a/contiki-cpc/contiki-cpc/lib/lc.h b/contiki-cpc/contiki-cpc/lib/lc.h
deleted file mode 100644
index a90c7ae..0000000
--- a/contiki-cpc/contiki-cpc/lib/lc.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2004, Adam Dunkels and Oliver Schmidt
- * 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>, Oliver Schmidt <ol.sc0web.de>
- *
- * $Id: lc.h,v 1.1 2006/04/17 15:11:54 kthacker Exp $
- */
-/* Local continuations: a form of continuation that only works locally
-   within a function.
-*/
-
-#ifndef __LC_H__
-#define __LC_H__
-
-#include "cc.h"
-
-typedef void * lc_t;
-
-void __fastcall__ lc_set(lc_t *lc);
-void __fastcall__ lc_resume(lc_t *lc);
-
-#define LC_SET(lc)    lc_set(&(lc))
-#define LC_RESUME(lc) lc_resume(&(lc))
-#define LC_INIT(lc)   (lc) = NULL
-#define LC_END(lc)
-
-#endif /* __LC_H__ */
diff --git a/contiki-cpc/contiki-cpc/lib/mtarch-asm.S b/contiki-cpc/contiki-cpc/lib/mtarch-asm.S
deleted file mode 100644
index 22ab609..0000000
--- a/contiki-cpc/contiki-cpc/lib/mtarch-asm.S
+++ /dev/null
@@ -1,245 +0,0 @@
-;---------------------------------------------------------------------       
-	.importzp       ptr1
-	.importzp	sp
-	.import		__ZP_START__
-
-	
-	.import		_mtarch_asm_threadstack
-	.import		_mtarch_asm_threadsp
-	.import		_mtarch_asm_threadspreg
-	.import		_mtarch_asm_threadzp	
-	
-	.export		_mtarch_asm_exec
-	.export		_mtarch_yield
-	.export		_mtarch_asm_start
-	.export		_mtarch_pstart, _mtarch_pstop
-	
-;---------------------------------------------------------------------
-.bss
-kernelsp:	.res 2
-kernelspreg:	.res 1		
-	
-oldirq:		.res 2
-
-	zpsize = 32
-.code
-;---------------------------------------------------------------------	
-	;; Switch to thread defined by threadsp, threadstack and threadspreg.
-	;; The kernel stack is swapped onto the threadstack, and the
-	;; sp and spreg are saved to the local variables "kernelsp" and
-	;; "kernelspreg". Also, the zeropage variables are saved.
-	
-_mtarch_asm_exec:
-	sei
-	;; Save current stack pointer
-	lda sp
-	sta kernelsp
-	lda sp+1
-	sta kernelsp+1
-	
-	tsx
-	stx kernelspreg
-	
-	lda _mtarch_asm_threadzp
-	sta ptr1
-	lda _mtarch_asm_threadzp+1
-	sta ptr1+1
-
-	ldy #0
-:		
-	lda <__ZP_START__,y
-	tax
-	lda (ptr1),y
-	sta <__ZP_START__,y
-	txa
-	sta (ptr1),y	
-	iny
-	cpy #zpsize
-	bne :-
-	
-	lda _mtarch_asm_threadstack
-	sta ptr1
-	lda _mtarch_asm_threadstack+1
-	sta ptr1+1
-
-	ldy kernelspreg                  ; determine the smallest of the two stack pointers,
-        cpy _mtarch_asm_threadspreg              ; as we only need to swap the used part of the stack
-        bcc :+
-        ldy _mtarch_asm_threadspreg
-
-:
-	lda $0100,y
-	tax	
-	lda (ptr1),y
-	sta $0100,y
-	txa
-	sta (ptr1),y
-	iny
-	bne :-
-
-	lda _mtarch_asm_threadsp
-	sta sp
-	lda _mtarch_asm_threadsp+1
-	sta sp+1
-	
-	ldx _mtarch_asm_threadspreg
-	txs
-
-; 	jsr _mtarch_pstart	
-
-	lda $0314
-	sta oldirq
-	lda $0315
-	sta oldirq+1
-
-	lda #<irq
- 	sta $0314
-	lda #>irq
-	sta $0315
-
-	
-	pla
-	tay
-	pla
-	tax
-	pla
-	
-	rti
-
-	;; Switch from thread defined by threadsp, threadstack and threadspreg.
-	;; The kernel stack is swapped back from the threadstack, and the
-	;; sp and spreg are restored from the local variables "kernelsp" and
-	;; "kernelspreg".
-yield:
-	sei
-	lda sp
-	sta _mtarch_asm_threadsp
-	lda sp+1
-	sta _mtarch_asm_threadsp+1
-
-	tsx
-	stx _mtarch_asm_threadspreg
-
-	lda _mtarch_asm_threadzp
-	sta ptr1
-	lda _mtarch_asm_threadzp+1
-	sta ptr1+1
-
-	ldy kernelspreg                  ; determine the smallest of the two stack pointers,
-        cpy _mtarch_asm_threadspreg              ; as we only need to swap the used part of the stack
-        bcc :+
-        ldy _mtarch_asm_threadspreg
-
-:		
-	lda <__ZP_START__,y
-	tax
-	lda (ptr1),y
-	sta <__ZP_START__,y
-	txa
-	sta (ptr1),y	
-	iny
-	cpy #zpsize
-	bne :-
-
-	lda _mtarch_asm_threadstack
-	sta ptr1
-	lda _mtarch_asm_threadstack+1
-	sta ptr1+1
-
-	ldy #0
-:
-	lda $0100,y
-	tax	
-	lda (ptr1),y
-	sta $0100,y
-	txa
-	sta (ptr1),y
-	iny
-	bne :-
-
-	lda kernelsp
-	sta sp
-	lda kernelsp+1
-	sta sp+1
-	
-	ldx kernelspreg
-	txs
-
-	cli
-	
-	rts
-;---------------------------------------------------------------------
-	;; Simulate an IRQ by pushing CPU status and CPu registers
-	;; onto the stack. Then call the yield function to yield the
-	;; process.		
-_mtarch_yield:	
-	php
-	pha
-	txa
-	pha
-	tya
-	pha
-
-        tsx
-         
-                                ; the rts adds 1 to the PC
-                                ; saved on the stack. We want
-        lda $0105,x             ; the stack to look like is would
-        clc                     ; do inside of an interrupt.
-        adc #1                  ; (this is what the 'rts' does,
-        sta $0105,x             ;  but not the 'rti')
-        lda $0106,x
-        adc #0
-        sta $0106,x
- 
-	
-	jmp yield		
-;---------------------------------------------------------------------
-_mtarch_asm_start:
-	lda _mtarch_asm_threadzp
-	sta ptr1
-	lda _mtarch_asm_threadzp+1
-	sta ptr1+1
-
-	ldy #0
-:		
-	lda <__ZP_START__,y
-	sta (ptr1),y	
-	iny
-	cpy #zpsize
-	bne :-
-	rts
-
-;---------------------------------------------------------------------
-irq:
-	lda oldirq
-	sta $0314
-	lda oldirq+1
-	sta $0315
-	jmp yield
-;---------------------------------------------------------------------	
-	;; Setup preemption IRQ
-_mtarch_pstart:
-	sei
-	lda $0314
-	sta oldirq
-	lda $0315
-	sta oldirq+1
-
-	lda #<irq
- 	sta $0314
-	lda #>irq
-	sta $0315		
-	cli
-	rts
-;---------------------------------------------------------------------
-_mtarch_pstop:
-	sei
-	lda oldirq
-	sta $0314
-	lda oldirq+1
-	sta $0315
-	cli
-	rts	
-;---------------------------------------------------------------------
-
diff --git a/contiki-cpc/contiki-cpc/lib/mtarch.c b/contiki-cpc/contiki-cpc/lib/mtarch.c
deleted file mode 100644
index dc8e3cd..0000000
--- a/contiki-cpc/contiki-cpc/lib/mtarch.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: mtarch.c,v 1.1 2006/04/17 15:11:55 kthacker Exp $
- */
-#include "mtarch.h"
-#include <string.h>
-
-unsigned char  mtarch_asm_threadspreg;
-unsigned char *mtarch_asm_threadsp;
-unsigned char *mtarch_asm_threadzp;
-unsigned char *mtarch_asm_threadstack;
-
-void mtarch_asm_start(void);
-void mtarch_asm_exec(void);
-
-
-/*--------------------------------------------------------------------------*/
-void
-mtarch_start(struct mtarch_thread *thread,
-	     void (* function)(void *data),
-	     void *data)
-{
-  memset(thread->cpustack, 0, sizeof(thread->cpustack));
-  memset(thread->cstack, 0, sizeof(thread->cstack));
-  
-  /* Create a CPU stack frame with the appropriate values... */
-  thread->cpustack[MTARCH_CPUSTACKSIZE - 2] = ((unsigned short)function) >> 8; /* high byte of return address. */
-  thread->cpustack[MTARCH_CPUSTACKSIZE - 3] = ((unsigned short)function) & 0xff; /* low byte of return address. */
-  thread->cpustack[MTARCH_CPUSTACKSIZE - 4] = 0x21; /* processor flags. */
-  thread->cpustack[MTARCH_CPUSTACKSIZE - 5] =       /* a register */
-    thread->cpustack[MTARCH_CPUSTACKSIZE - 6] =     /* x register */
-    thread->cpustack[MTARCH_CPUSTACKSIZE - 7] = 0;  /* y register */
-  thread->spreg = MTARCH_CPUSTACKSIZE - 8;
-
-  /* Setup the C stack with the data pointer. */
-  thread->sp = &thread->cstack[MTARCH_CSTACKSIZE - 1];
-  
-  mtarch_asm_threadzp    = &(thread->zp);  
-  mtarch_asm_start();
-}
-/*--------------------------------------------------------------------------*/
-void
-mtarch_exec(struct mtarch_thread *thread)
-{
-  /* Switch processor stack. The call to mtarch_asm_switch() will not
-     return until the process that we switch to calls yield(). */
-  mtarch_asm_threadspreg = thread->spreg;
-  mtarch_asm_threadsp    = thread->sp;
-
-  mtarch_asm_threadstack = &(thread->cpustack[0]);  
-  mtarch_asm_threadzp    = &(thread->zp[0]);
-  
-  mtarch_asm_exec();
-
-  thread->sp = mtarch_asm_threadsp;
-  thread->spreg = mtarch_asm_threadspreg;  
-}
-/*--------------------------------------------------------------------------*/
-void
-mtarch_init(void) {
-
-}
-/*--------------------------------------------------------------------------*/
-void
-mtarch_remove(void)
-{
-
-}
diff --git a/contiki-cpc/contiki-cpc/lib/mtarch.h b/contiki-cpc/contiki-cpc/lib/mtarch.h
deleted file mode 100644
index 44a8424..0000000
--- a/contiki-cpc/contiki-cpc/lib/mtarch.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: mtarch.h,v 1.1 2006/04/17 15:11:55 kthacker Exp $
- */
-#ifndef __MTARCH_H__
-#define __MTARCH_H__
-
-#define MTARCH_CPUSTACKSIZE 256
-#define MTARCH_CSTACKSIZE 256
-#define MTARCH_ZPSIZE 32
-
-struct mtarch_thread {
-  unsigned char  spreg;
-  unsigned char *sp;
-  unsigned char  cpustack[MTARCH_CPUSTACKSIZE];
-  unsigned char  cstack[MTARCH_CSTACKSIZE];
-  unsigned char  zp[MTARCH_ZPSIZE];
-};
-
-#endif /* __MTARCH_H__ */
-	
diff --git a/contiki-cpc/contiki-cpc/loader/cfs-cpc.c b/contiki-cpc/contiki-cpc/loader/cfs-cpc.c
deleted file mode 100644
index 7976d7e..0000000
--- a/contiki-cpc/contiki-cpc/loader/cfs-cpc.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-cpc.c,v 1.1 2006/04/17 15:11:55 kthacker Exp $
- */
-#include "contiki.h"
-
-#include "log.h"
-#include "cfs.h"
-#include "cfs-service.h"
-
-extern void _readdir(void *);
-
-struct cpc_dir 
-{
-	char *buffer; 
-	char *ptr;
-};
-
-//#include <cbm.h>
-#include <string.h>
-
-static int  s_open(const char *n, int f);
-static void s_close(int f);
-static int  s_read(int f, char *b, unsigned int l);
-static int  s_write(int f, char *b, unsigned int l);
-static int  s_opendir(struct cfs_dir *p, const char *n);
-static int  s_readdir(struct cfs_dir *p, struct cfs_dirent *e);
-static int  s_closedir(struct cfs_dir *p);
-
-static const struct cfs_service_interface interface =
-  {
-    CFS_SERVICE_VERSION,
-    s_open,
-    s_close,
-    s_read,
-    s_write,
-    s_opendir,
-    s_readdir,
-    s_closedir
-  };
-
-EK_EVENTHANDLER(cpc_cfs_eventhandler, ev, data);
-EK_PROCESS(proc, CFS_SERVICE_NAME ": KERNAL", EK_PRIO_NORMAL,
-           cpc_cfs_eventhandler, NULL, (void *)&interface);
-
-/*---------------------------------------------------------------------------*/
-EK_PROCESS_INIT(cfs_cpc_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(CFS_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(cpc_cfs_eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    log_message("Starting KERNAL CFS", "");
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, &interface);
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_open(const char *n, int f)
-{
- // if(cbm_open(2, 8, f, n) == 0) {
- //   return 2;
- // }
-  return -1;
-}
-/*---------------------------------------------------------------------------*/
-static void
-s_close(int f)
-{
- // cbm_close(f);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_read(int f, char *b, unsigned int l)
-{
-  return 0; //return cbm_read(f, b, l);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_write(int f, char *b, unsigned int l)
-{
-  return 0; //  return cbm_write(f, b, l);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_opendir(struct cfs_dir *p, const char *n)
-{
-	struct cpc_dir *cpcdir = (struct cpc_dir *)p;
-
-	char *buffer = malloc(2048);
-	
-	if (buffer)
-	{
-		cpcdir->buffer = buffer;
-		cpcdir->ptr = buffer;	
-		_readdir(buffer);
-		return 0;
-	}
-	return 1;
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_readdir(struct cfs_dir *p, struct cfs_dirent *e)
-{
-  int i;
-  int size;
-  int npos;
-  struct cpc_dir *cpcdir = (struct cpc_dir *)p;
-  char *ptr = cpcdir->ptr;
-
-  if (ptr[0]!=0xff)
-	return 1;
-  
-  ptr++;
-
-  npos = 0;
-  for (i=0; i<8; i++)
-  {  
-    char ch = ptr[0]&0x07f;
-    ptr++;
-    e->name[npos] = ch;
-    npos++;    
-  }
-  e->name[npos] = '.';
-  npos++;
-  for (i=0; i<3; i++)
-  {
-    char ch = ptr[0]&0x07f;
-    ptr++;
-    e->name[npos] = ch;
-    npos++;
-  }
-  e->name[npos] = '\0';
- 
-  size = (ptr[0]&0x0ff) + ((ptr[1]&0x0ff)<<8);  
-  size = size*1024;
-  ptr+=2;
-  e->size = size;
-  cpcdir->ptr = ptr;
-
-  return 0;
-
-/* 1 = if no more dir entries
- 0 = more dir entries */
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_closedir(struct cfs_dir *p)
-{
-	struct cpc_dir *cpcdir = (struct cpc_dir *)p;
-	free(cpcdir->buffer);
-	return 1;
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/loader/cfs-cpc.h b/contiki-cpc/contiki-cpc/loader/cfs-cpc.h
deleted file mode 100644
index ddf55a0..0000000
--- a/contiki-cpc/contiki-cpc/loader/cfs-cpc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-cpc.h,v 1.1 2006/04/17 15:11:55 kthacker Exp $
- */
-#ifndef __CFS_CPC_H__
-#define __CFS_CPC_H__
-
-#include "ek.h"
-
-EK_PROCESS_INIT(cfs_cpc_init, arg);
-
-#endif /* __CFS_CBM_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/dir.s b/contiki-cpc/contiki-cpc/loader/dir.s
deleted file mode 100644
index 2de266a..0000000
--- a/contiki-cpc/contiki-cpc/loader/dir.s
+++ /dev/null
@@ -1,99 +0,0 @@
-;; This example shows how to perform a directory of a disc
-;; and extract the filenames. 
-;;
-;; This code is public domain and can freely be used in your
-;; own programs.
-;;
-;; Written by Kevin Thacker. 2002
-
-
-
-;;------------------------------------------------------------------
-
-;; firmware function to catalog a disc or cassette
-cas_catalog == 0xbc9b
-;; firmware function to disable text output
-txt_vdu_enable == 0xbb54
-;; firmware function to enable text output
-txt_vdu_disable == 0xbb57
-;; firmware function to find a RSX 
-kl_find_command == 0xbcd4
-
-		.globl __readdir
-		.area _CODE
-
-;;------------------------------------------------------------------
-;; find BIOS SET MESSAGE command
-;; this is used to disable disc messages.
-;; this is compatible with other DOSs that also provide this command
-__readdir::
-
-ld hl,#cmd_bios_set_message
-call kl_find_command
-ret nc
-
-;; command found
-
-;; store address of command
-ld (bios_set_message),hl
-ld a,c
-;; store "rom select" of command
-ld (bios_set_message+2),a
-
-;;------------------------------------------------------------------
-
-;; do CAT
-ld hl,#2
-add hl,sp
-ld e,(hl)
-inc hl
-ld d,(hl)
-call fetch_directory
-ret
-
-
-;;------------------------------------------------------------------
-;; display files from data generated by CAS CATALOG function
-
-;; perform a CAT command
-
-fetch_directory::
-push de
-;; disable disc messages. Error messages will not be displayed.
-ld a,#0xff
-rst 0x018						;; KL FAR CALL
-.dw bios_set_message
-
-;; disable text output
-call txt_vdu_disable
-
-pop de
-
-;; initialise in case of an error
-xor a
-ld (de),a
-
-;; do catalog
-call cas_catalog
-
-;; enable text output
-call txt_vdu_enable
-
-;; enable disc messages. Error messages will be displayed
-ld a,#0x0
-rst 0x018						;; KL FAR CALL
-.dw bios_set_message
-ret
-
-
-;;------------------------------------------------------------------
-
-;; this is initialised when the "BIOS SET MESSAGE" RSX has been found.
-bios_set_message:
-.dw 0                    ;; address of function
-.db 0                    ;; "rom select" for function
-
-
-cmd_bios_set_message:
-.db #0x01+#0x80				;; this is the "BIOS SET MESSAGE" RSX
-
diff --git a/contiki-cpc/contiki-cpc/loader/loader-arch-cpc.c b/contiki-cpc/contiki-cpc/loader/loader-arch-cpc.c
deleted file mode 100644
index 84d12be..0000000
--- a/contiki-cpc/contiki-cpc/loader/loader-arch-cpc.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "loader-arch.h"
-#include "rel.h"
-#include <stddef.h>
-#include <malloc.h>
-
-extern void *progend;
-
-struct prg_hdr {
-	char *relocatedata;
-	char arch[8];
-	char version[8];
-	char initfunc[1];
-};
-
-struct dsc_hdr {
-	char *relocatedata;
-	struct dsc dscdata;
-};
-
-unsigned char loader_arch_load(const char *name, char *arg)
-{
-	char *loadaddr;	
-	struct prg_hdr *prghdr;
-	int length;
-
-	/* get length of file */
-	length = get_file_length(name);
-	if (length==0)
-		return LOADER_ERR_OPEN;
-
-	/* allocate memory */
-	loadaddr = malloc(length);
-	if (loadaddr==NULL)
-		return LOADER_ERR_MEM;
-	
-	/* load the file */
-	load_file(name,loadaddr);
-
-	prghdr = (struct prg_hdr *)loadaddr;
-
-	/* relocate it */
-	relocate(prghdr->relocatedata,loadaddr);
-
-	((void (*)(char *))prghdr->initfunc)(arg);
-
-	return LOADER_OK;
-}
-
-struct dsc *loader_arch_load_dsc(const char *name)
-{
-	char *loadaddr;
-	struct dsc_hdr *dschdr;
-	int length;
-
-	/* get length of file */
-	length = get_file_length(name);
-	if (length==0)
-		return NULL;
-
-	/* allocate memory */
-	loadaddr = malloc(length);
-	if (loadaddr==NULL)
-		return NULL;
-
-	/* load the file */
-	load_file(name, loadaddr);
-	
-	dschdr = (struct dsc_hdr *)loadaddr;
-	/* relocate it */
-	relocate(dschdr->relocatedata, loadaddr);
-
-	return &dschdr->dscdata;
-}
-
-void loader_arch_free(void *loadaddr)
-{
-	/* free module */
-	/* we're given the start of 'arch' member of the prg_hdr,
-	calculate the real start address and then free the block */
-	void *header = (void *)((char *)loadaddr - offsetof(struct prg_hdr,arch));
-	free(header);
-}
-
-void loader_arch_free_dsc(struct dsc *dscdata)
-{
-	/* we're given the start of 'dsc' member of the dsc_hdr,
-	calculate the real start address and then free the block */
-	void *header = (void *)((char *)dscdata - 2);
-//offsetof(struct 
-//dsc_hdr,dscdata));
-	free(header);
-}
-
diff --git a/contiki-cpc/contiki-cpc/loader/loader-arch-module.s b/contiki-cpc/contiki-cpc/loader/loader-arch-module.s
deleted file mode 100644
index 2539b86..0000000
--- a/contiki-cpc/contiki-cpc/loader/loader-arch-module.s
+++ /dev/null
@@ -1,16 +0,0 @@
-;; This is the header for Contiki program files
-;;
-;; This must always be at at the start of the file
-;; The order of the data must not change.
-;;
-.globl _loader_appinit
-		.area _CODE
-
-_loader_arch_loadaddr::
-arch:		.byte	0,0,0,0,0,1,1,1
-version:	.byte	0,0,0,0,0,1,1,1
-
-;; The position of the init function can be anywhere in the file.
-;; This jump is always in the same place, and points to the actual init function.
-	call gsinit
-	jp _loader_appinit
diff --git a/contiki-cpc/contiki-cpc/loader/loader-arch.h b/contiki-cpc/contiki-cpc/loader/loader-arch.h
deleted file mode 100644
index efce757..0000000
--- a/contiki-cpc/contiki-cpc/loader/loader-arch.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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 OS
- *
- * $Id: loader-arch.h,v 1.1 2006/04/17 15:11:55 kthacker Exp $
- *
- */
-#ifndef __LOADER_ARCH_H__
-#define __LOADER_ARCH_H__
-
-#include "dsc.h"
-
-unsigned char loader_arch_load(const char *name, char *arg);
-struct dsc *loader_arch_load_dsc(const char *name);
-void loader_arch_free(void *addr);
-void loader_arch_free_dsc(struct dsc *);
-
-extern void *loader_arch_loadaddr;
-
-#define LOADER_LOAD_DSC(name) loader_arch_load_dsc(name)
-#define LOADER_LOAD(name, arg) loader_arch_load(name, arg)
-#define LOADER_UNLOAD() loader_arch_free(&loader_arch_loadaddr)
-#define LOADER_UNLOAD_DSC(dsc) loader_arch_free_dsc(dsc)
-
-#endif /* __LOADER_ARCH_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/rel.h b/contiki-cpc/contiki-cpc/loader/rel.h
deleted file mode 100644
index fd3c264..0000000
--- a/contiki-cpc/contiki-cpc/loader/rel.h
+++ /dev/null
@@ -1,3 +0,0 @@
-int get_file_length(const char *);
-void load_file(const char *, void *);
-void relocate(void *relocate_data, void *base);
diff --git a/contiki-cpc/contiki-cpc/loader/rel.s b/contiki-cpc/contiki-cpc/loader/rel.s
deleted file mode 100644
index be8f085..0000000
--- a/contiki-cpc/contiki-cpc/loader/rel.s
+++ /dev/null
@@ -1,219 +0,0 @@
-	.area _CODE
-	.globl _get_file_length
-	.globl _load_file
-;;----------------------------------------------------------------------------
-;; get length of file on disc. Assumption file has a AMSDOS header
-;;
-;; int get_file_length(const char *filename);
-
-_get_file_length::
-	ld hl,#2
-	add hl,sp
-	ld a,(hl)
-	inc hl
-	ld h,(hl)
-	ld l,a
-
-	;; HL = address of null terminated string
-	call count_string_length
-	ld de,#0x0c000		;; points to unused 2k buffer
-	call 0x0bc77		;; cas in open
-	push bc			;; BC = length of file
-	call 0x0bc7d		;; cas in abandon
-	pop hl
-	ret
-
-;;---------------------------------------------------------------------
-
-count_string_length:
-	push hl
-	ld b,#0
-csl:	ld a,(hl)
-	or a
-	jr z,csl2
-	inc hl
-	inc b
-	jr csl
-csl2:
-	pop hl
-	ret
-
-;;---------------------------------------------------------------------------
-;; void load_file(const char *filename, void *addr)
-
-_load_file::
-	ld hl,#5
-	add hl,sp
-	ld d,(hl)
-	dec hl
-	ld e,(hl)
-	dec hl
-
-	push de
-	ld a,(hl)
-	dec hl
-	ld l,(hl)
-	ld h,a
-
-	call count_string_length
-	ld de,#0x0c000
-	call 0x0bc77		;; cas in open
-	pop hl			;; load address
-	call 0x0bc83		;; cas in direct
-	call 0x0bc7a		;; cas in close
-	ret
-
-;; void relocate(void *addr,void *base)
-
-;; IX = address of relocate data
-_relocate::
-	ld hl,#5
-	add hl,sp
-	push ix
-	ld b,(hl)			;; base address
-	dec hl
-	ld c,(hl)
-	dec hl
-	ld a,(hl)
-	.db #0x0dd
-	ld h,a	
-	dec hl
-	ld a,(hl)
-	.db #0x0dd
-	ld l,a				;; IX is offset of table from start of loaded file
-	add ix,bc			;; relocate IX to give absolute address of table.
-
-	push bc
-	pop hl
-	call relocate_16bit
-	push bc
-	pop hl
-	call relocate_8bitl	;; lower byte
-	push bc
-	pop hl
-	call relocate_8bith	;; upper byte
-	pop ix
-	ret
-
-;;--------------------------------------------------------------------------
-;; Relocate 8-bit values (e.g. where low and high parts of an address
-;; are loaded seperatly into registers)
-;;
-;; IX = list of 16-bit addresses. Each address identifies an 8-bit
-;; value
-;; 
-relocate_8bith:
-ld a,0(ix)
-inc ix
-or a
-ret z
-cp #0x0ff
-jr nz,r8bh
-ld e,0(ix)
-inc ix
-ld d,0(ix)
-inc ix
-add hl,de
-jr relocate_8bith
-
-r8bh:
-;; add offset
-add a,l
-ld l,a
-ld a,h
-adc a,#0x0
-ld h,a
-
-;; get low byte of address
-ld e,0(ix)
-inc ix
-
-;; get high byte to relocate
-ld d,(hl)
-ex de,hl
-add hl,bc
-ex de,hl
-ld (hl),d
-jr relocate_8bith
-
-relocate_8bitl:
-ld a,0(ix)
-inc ix
-or a
-ret z
-cp #0x0ff
-jr nz,r8bl
-ld e,0(ix)
-inc ix
-ld d,0(ix)
-inc ix
-add hl,de
-jr relocate_8bitl
-
-r8bl:
-add a,l
-ld l,a
-ld a,h
-adc a,#0x0
-ld h,a
-
-ld e,(hl)
-ld d,#0x0
-ex de,hl
-add hl,bc
-ex de,hl
-ld (hl),e
-jr relocate_8bitl
-
-;;--------------------------------------------------------------------------
-;; Relocate 16-bit values
-;;
-;; Entry conditions:
-;;
-;; IX = list of 16-bit addresses. Each address identifies a 16-bit 
-;; value to relocate. 
-;;
-;; BC = base address
-;; 
-;; NOTE: 
-;; - Relocatable 16-bit values come from CALL and JP instructions and
-;; loading a 16-bit register.
-
-relocate_16bit:
-ld a,0(ix)		;; number of items to relocate
-inc ix
-or a
-ret z
-cp #0x0ff
-jr nz,r16
-ld e,0(ix)
-inc ix
-ld d,0(ix)
-inc ix
-add hl,de
-jr relocate_16bit
-
-r16:
-;; add offset
-add a,l
-ld l,a
-ld a,h
-adc a,#0x0
-ld h,a
-
-;; get the 16-bit value
-ld e,(hl)
-inc hl
-ld d,(hl)
-
-
-;; add base address; therefore relocating it.
-ex de,hl
-add hl,bc
-ex de,hl
-;; write relocated value
-ld (hl),d
-dec hl
-ld (hl),e
-jr relocate_16bit
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.S b/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.S
deleted file mode 100644
index 86b9639..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.S
+++ /dev/null
@@ -1,505 +0,0 @@
-
-	
-	.export _c64_dio_asm_init
-	.export _c64_dio_asm_read_block
-	.export _c64_dio_asm_write_block	
-
-	.export _c64_dio_asm_track, _c64_dio_asm_sector
-
-	.export _c64_dio_asm_ptr
-	
-	.importzp ptr1, ptr2
-		
-	;; job code $80 read, $90 write
-	
-
-ciout    = $ffa8
-listen   = $ffb1
-second   = $ff93
-unlsn    = $ffae
-
-nbytes   = 34
-esc      = $42
-
-blockread = 1
-blockwrite = 2
-
-errok    = 0
-errerr   = 1
-
-.data
-_c64_dio_asm_track: .byte 0
-_c64_dio_asm_sector: .byte 0
-_c64_dio_asm_ptr: .byte 0,0			
-
-.code
-;---------------------------------------
-_c64_dio_asm_read_block:		
-
-  	lda #blockread
-         jsr send
-
-         lda _c64_dio_asm_track
-         jsr send
-	 lda _c64_dio_asm_sector
-         jsr send
-
-
-         jsr recv
-         cmp #errok
-         bne readerr
-
-	 lda _c64_dio_asm_ptr
-	 sta ptr1 
-	 lda _c64_dio_asm_ptr+1
-	 sta ptr1+1
-        ldy #0
-readl:	
-         jsr recv
-         sta (ptr1),y
-         iny
-         bne readl
-         clc
-	 lda #0
-         tax	
-         rts
-readerr:	
-	;          sta $07c0	
-	 jsr recv
-	; 	 sta $07c1
-         ldx #0
-         rts
-;---------------------------------------
-_c64_dio_asm_write_block:		
-
- 	lda #blockwrite
-         jsr send
-
-         lda _c64_dio_asm_track
-         jsr send
-         lda _c64_dio_asm_sector
-         jsr send
-
-
-	 lda _c64_dio_asm_ptr
-	 sta ptr1 
-	 lda _c64_dio_asm_ptr+1
-	 sta ptr1+1
-        ldy #0
-writel:
-         lda (ptr1),y	
-         jsr send
-         iny
-         bne writel
-
-         jsr recv
-         cmp #errok
-         bne writeerr
-         lda #0
-	 tax
-         rts
-
-writeerr:	
-	;          sta $07c0
-	 jsr recv
-	; 	 sta $07c1
-         ldx #0
-         rts
-;---------------------------------------
-_c64_dio_asm_init:		
-         sta devnr
-         lda #$00
-         sta drvmem
-         lda #$05
-         sta drvmem+1
-
-         lda #<drive
-         sta ptr1
-         lda #>drive
-         sta ptr1+1
-
-       ; lda devnr
-       ; ldx #<icmd
-       ; ldy #>icmd
-       ; jsr drvcmd
-       ; jsr unlsn
-
-mwl:	
-         lda devnr
-         ldx #<mwcmd
-         ldy #>mwcmd
-         jsr drvcmd
-
-         ldy #0
-         lda (ptr1),y
-         jsr ciout
-         iny
-         cpy #nbytes
-         bne *-8
-
-         jsr unlsn
-
-         lda drvmem
-         clc
-         adc #nbytes
-         sta drvmem
-         lda drvmem+1
-         adc #0
-         sta drvmem+1
-
-         lda ptr1
-         clc
-         adc #nbytes
-         sta ptr1
-         tax
-         lda ptr1+1
-         adc #0
-         sta ptr1+1
-         cpx #<driveend
-         sbc #>driveend
-         bcc mwl
-
-         lda devnr
-         ldx #<mecmd
-         ldy #>mecmd
-         jsr drvcmd
-         jsr unlsn
-
-         rts
-;---------------------------------------
-drvcmd:	
-         stx ptr2
-         sty ptr2+1
-         jsr listen
-         lda #$6f
-         jsr second
-
-         ldy #0
-         lda (ptr2),y
-         sta drvcmdcmp+1
-         inc ptr2
-         bne *+4
-         inc ptr2+1
-
-         ldy #0
-         lda (ptr2),y
-         jsr ciout
-         iny
-drvcmdcmp:	 cpy #0
-         bne *-8
-         rts
-;---------------------------------------
-devnr:	    .byte 8
-mwcmd:	    .byte 6
-	.byte $4d, $2d, $57
-drvmem:	   .word $0500
-         .byte nbytes
-         .byte 0
-mecmd:	    .byte 2
-	 .byte $55, $33
-         .byte 0
-;---------------------------------------
-send:
-
-         sta ptr2
-         ldx #7
-sendl:	
-         lsr ptr2
-
-
-         lda $dd00
-         and #$df
-         ora #$10
-         bcc *+4
-         eor #$30
-         sta $dd00
-
-         lda #$c0
-         bit $dd00
-         bne *-3
-
-         lda $dd00
-         and #$cf
-         sta $dd00
-
-         lda $dd00
-         and #$c0
-         eor #$c0
-         bne *-7
-
-         dex
-         bpl sendl
-
-	 ldx $d020
-	 lda #1
-	 sta $d020
-	 stx $d020
-		
-         rts
-;---------------------------------------
-recv:
-	 ldx $d020
-	 lda #0
-	 sta $d020
-	 stx $d020
-	
-         ldx #7
-recvl:	
-         lda $dd00
-         and #$c0
-         eor #$c0
-         beq *-7
-         asl a
-
-         lda $dd00
-         and #$df
-         ora #$10
-         bcs *+4
-         eor #$30
-         sta $dd00
-         ror ptr2
-
-         lda #$c0
-         bit $dd00
-         beq *-3
-
-         lda $dd00
-         and #$cf
-         sta $dd00
-
-         dex
-         bpl recvl
-         lda ptr2
-         rts
-;---------------------------------------
-
-;---------------------------------------
-;the code residing in the drive:
-;---------------------------------------
-dtmp     = $46
-dtmp2    = $97
-dbuf     = $0300
-dbufcmd  = $00
-dbuftrack = $06
-dbufsect = $07
-
-retries  = 10
-bretries = 2
-;---------------------------------------
-drive  :		
-	.org $0500
-
-
-
-         cld
-         tsx
-         stx dstack
-         sei
-         jsr ledoff
-
-drivel:	
-         jsr dload
-         jsr ledoff
-         cli
-         jmp drivel
-;---------------------------------------
-ledon:	
-         lda $1c00
-         ora #$08
-         sta $1c00
-         rts
-ledoff:	
-         lda $1c00
-         and #$f7
-         sta $1c00
-         rts
-;---------------------------------------
-drecv:	
-         ldx #7
-drecvl:	
-         lda $1800
-         bmi atn
-         and #5
-         beq *-7
-         lsr a
-         lda #2
-         bcc *+4
-         lda #8
-         sta $1800
-         ror dtmp
-         lda $1800
-         bmi atn
-         and #5
-         eor #5
-         beq *-9
-         lda #0
-         sta $1800
-         dex
-         bpl drecvl
-         lda dtmp
-         rts
-;---------------------------------------
-atn:	
-         ldx dstack
-         txs
-         cli
-         rts
-;---------------------------------------
-dsend:	
-         sta dtmp
-         ldx #7
-dsendl:	
-         lsr dtmp
-         lda #2
-         bcs *+4
-         lda #8
-         sta $1800
-
-         lda $1800
-         bmi atn
-         and #5
-         eor #5
-         bne *-9
-
-         sta $1800
-
-         lda #5
-         bit $1800
-         bne *-3
-         dex
-         bpl dsendl
-         rts
-;---------------------------------------
-dload:
-         ldy #0
-
-         jsr drecv
-         sta dcmd
-	
-         jsr ledon
-	
-         jsr drecv
-         sta dbuftrack
-
-         jsr drecv
-         sta dbufsect
-
-	 lda dcmd
-	 cmp #blockwrite
-	 bne dblockread
-dblockwrite:
-         ldy #0
-drecvpl:	
-         jsr drecv
-         sta dbuf,y	
-         iny
-         bne drecvpl
-	
-	 jmp dputsect
-
-dblockread:		
-         jsr dgetsect
-
-dsendpage:	
-         ldy #0
-dsendpl:	
-         lda dbuf,y
-         jsr dsend
-         iny
-         bne dsendpl
-         rts
-;---------------------------------------
-dgetsect:	
-       ; stx dbuftrack
-       ; sty dbufsect
-         ldx #retries
-dgetsectl:	
-         lda #$80
-         sta dbufcmd
-
-         cli
-:
-         lda dbufcmd
-         bmi :-
-         sei
-         cmp #1
-         beq dgsnoerr
-
-         cpx #0
-         beq dgsserr
-         dex
-         cpx #bretries
-         bcs dgetsectl
-         pha
-         lda #$c0
-         sta dbufcmd
-         cli
-:		
-         lda dbufcmd
-         bmi :-
-         pla
-         cpx #0
-         bne dgetsectl
-
-dgsserr:	
-         pha
-         lda #errerr
-         jsr dsend
-         pla
-         jsr dsend
-         rts
-dgsnoerr:	
-         lda #errok
-         jsr dsend
-         rts
-;---------------------------------------
-dputsect:	
-       ; stx dbuftrack
-       ; sty dbufsect
-         ldx #retries
-dputsectl:	
-         lda #$90
-         sta dbufcmd
-
-         cli
-:
-         lda dbufcmd
-         bmi :-
-         sei
-         cmp #1
-         beq dpsnoerr
-
-         cpx #0
-         beq dpsserr
-         dex
-         cpx #bretries
-         bcs dputsectl
-         pha
-         lda #$c0
-         sta dbufcmd
-         cli
-:		
-         lda dbufcmd
-         bmi :-
-         pla
-         cpx #0
-         bne dputsectl
-
-dpsserr:	
-         pha
-         lda #errerr
-         jsr dsend
-         pla
-         jsr dsend
-         rts
-dpsnoerr:	
-         lda #errok
-         jsr dsend
-         rts
-;---------------------------------------
-led:	      .byte 0,0
-dstack:	   .byte 0
-dcmd:	     .byte 0
-.RELOC
-driveend:	
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.h b/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.h
deleted file mode 100644
index c00355a..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-dio-asm.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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 OS
- *
- * $Id: c64-dio-asm.h,v 1.1 2006/04/17 15:11:56 kthacker Exp $
- *
- */
-#ifndef __C64_DIO_ASM_H__
-#define __C64_DIO_ASM_H__
-
-extern unsigned char c64_dio_asm_track,
-  c64_dio_asm_sector;
-
-extern unsigned char *c64_dio_asm_ptr;
-
-void __fastcall__ c64_dio_asm_init(unsigned char drive);
-unsigned char c64_dio_asm_read_block(void);
-unsigned char c64_dio_asm_write_block(void);
-
-#endif /* __C64_DIO_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-dio.c b/contiki-cpc/contiki-cpc/loader/unused/c64-dio.c
deleted file mode 100644
index ff09e03..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-dio.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * \addtogroup c64fs
- * @{
- *
- */
-
-/**
- * \file
- * C64 direct disk I/O.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- */ 
-
-/*
- * 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 OS
- *
- * $Id: c64-dio.c,v 1.1 2006/04/17 15:11:56 kthacker Exp $
- *
- */
-
-#include "c64-dio.h"
-#include "c64-dio-asm.h"
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Read a block of data (256 bytes) from the disk.
- *
- * \param track The track of the disk block to be read.
- *
- * \param sector The sector of the disk block to be read.
- *
- * \param ptr A pointer to a buffer than must be able to accomodate
- * 256 bytes of data.
- *
- * \return An error code or C64_DIO_OK if the data was successfully
- * read.
- */
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-c64_dio_read_block(unsigned char track,
-		   unsigned char sector,
-		   unsigned char *ptr)
-{
-  c64_dio_asm_track = track;
-  c64_dio_asm_sector = sector;
-  c64_dio_asm_ptr = ptr;
-  return c64_dio_asm_read_block();
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Write a block of data (256 bytes) to the disk.
- *
- * \param track The track of the disk block to be written.
- *
- * \param sector The sector of the disk block to be written.
- *
- * \param ptr A pointer to a buffer containing the 256 bytes of data
- * to be written.
- *
- * \return An error code or C64_DIO_OK if the data was successfully
- * written.
- */
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-c64_dio_write_block(unsigned char track,
-		   unsigned char sector,
-		   unsigned char *ptr)
-{
-  c64_dio_asm_track = track;
-  c64_dio_asm_sector = sector;
-  c64_dio_asm_ptr = ptr;
-  return c64_dio_asm_write_block();
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Initialize the direct disk I/O routines for a particular disk drive.
- *
- * This function must be called before any of the other direct disk
- * I/O functions can be used.
- *
- * \param drive The drive number of the disk drive for which the
- * direct disk I/O should be enabled.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-c64_dio_init(unsigned char drive)
-{
-  c64_dio_asm_init(drive);
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-dio.h b/contiki-cpc/contiki-cpc/loader/unused/c64-dio.h
deleted file mode 100644
index 6773c0e..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-dio.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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 OS
- *
- * $Id: c64-dio.h,v 1.1 2006/04/17 15:11:56 kthacker Exp $
- *
- */
-#ifndef __C64_DIO_H__
-#define __C64_DIO_H__
-
-void c64_dio_init(unsigned char drive);
-
-unsigned char c64_dio_read_block(unsigned char track,
-				 unsigned char sector,
-				 unsigned char *buf);
-
-unsigned char c64_dio_write_block(unsigned char track,
-				  unsigned char sector,
-				  unsigned char *buf);
-
-#define C64_DIO_OK 0
-
-#endif /* __C64_DIO_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.c b/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.c
deleted file mode 100644
index 7b8577c..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * \addtogroup c64fs
- * @{
- */
-
-/**
- * \file
- * "Raw" C64 file system access.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * This file provides functions that allow reading data from files
- * without updating the file descriptor pointer. The functions are not
- * automatically included in the core Contiki code and therefore
- * application programs that use tham must manually link with this
- * file.
- *
- */
-
-
-/*
- * 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: c64-fs-raw.c,v 1.1 2006/04/17 15:11:56 kthacker Exp $
- *
- */
-
-#include "c64-fs-raw.h"
-
-#include <string.h>
-
-struct directory_entry {
-  unsigned char type;
-  unsigned char track, sect;
-  unsigned char name[16];
-  unsigned char reltrack, relsect, relreclen;
-  unsigned char unused1, unused2, unused3, unused4;
-  unsigned char tmptrack, tmpsect;
-  unsigned char blockslo, blockshi;
-};
-
-
-extern unsigned char _c64_fs_dirbuf[256];
-extern unsigned char _c64_fs_dirbuftrack, _c64_fs_dirbufsect;
-
-extern unsigned char _c64_fs_filebuf[256];
-extern unsigned char _c64_fs_filebuftrack, _c64_fs_filebufsect;
-
-void _c64_fs_readdirbuf(unsigned char track, unsigned char sect);
-
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Read data from a file without updating the file descriptor pointer.
- *
- * This function reads data from an open file into a buffer than must
- * be allocated by the caller, but does not update the file
- * description pointer like the c64_fs_read() function does.
- *
- * \param f A pointer to a file descriptor structure that must have
- * been opened with c64_fs_open().
- *
- * \param buf A pointer to the buffer in which the data should be placed.
- *
- * \param len The maxiumum amount of bytes to read.
- *
- * \return The number of bytes that actually was read, or 0 if an end
- * of file was encountered.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-int __fastcall__
-c64_fs_read_raw(register struct c64_fs_file *f, char *buf, int len)
-{
-  int i;
-  unsigned char fptr, ftrack, fsect;
-
-  /* Check if current block is already in buffer, and if not read it
-     from disk. */
-  if(_c64_fs_filebuftrack != f->track ||
-     _c64_fs_filebufsect != f->sect) {
-    _c64_fs_filebuftrack = f->track;
-    _c64_fs_filebufsect = f->sect;
-    c64_dio_read_block(_c64_fs_filebuftrack,
-		       _c64_fs_filebufsect, _c64_fs_filebuf);
-  }
-
-  if(_c64_fs_filebuf[0] == 0 &&
-     f->ptr == _c64_fs_filebuf[1]) {
-    return 0; /* EOF */
-  }
-
-  fptr = f->ptr;
-  ftrack = f->track;
-  fsect = f->sect;
-  
-  for(i = 0; i < len; ++i) {
-    *buf = _c64_fs_filebuf[fptr];
-    
-    ++fptr;
-    if(_c64_fs_filebuf[0] == 0) {
-      if(fptr == _c64_fs_filebuf[1]) {
-	/* End of file reached, we return the amount of bytes read so
-	   far. */
-	return i + 1;
-      }
-    } else if(fptr == 0) {
-
-      /* Read new block into buffer and set buffer state
-	 accordingly. */
-      _c64_fs_filebuftrack = ftrack = _c64_fs_filebuf[0];
-      _c64_fs_filebufsect = fsect = _c64_fs_filebuf[1];
-      fptr = 2;
-      c64_dio_read_block(_c64_fs_filebuftrack,
-			 _c64_fs_filebufsect, _c64_fs_filebuf);
-    }
-    
-    ++buf;
-  }
-  return i;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Move the file descriptior pointer forward in the file.
- *
- *
- * \param f A pointer to a file descriptor structure that must have
- * been opened with c64_fs_open().
- *
- * \param len The number of bytes the pointer should be moved forward.
- *
- * \return The number of bytes that the pointer actually was moved, or
- * 0 if an end of file was encountered.
- */
-/*-----------------------------------------------------------------------------------*/
-int
-c64_fs_read_next(register struct c64_fs_file *f, int len)
-{
-  int i;
-
-  /* Check if current block is already in buffer, and if not read it
-     from disk. */
-  if(_c64_fs_filebuftrack != f->track ||
-     _c64_fs_filebufsect != f->sect) {
-    _c64_fs_filebuftrack = f->track;
-    _c64_fs_filebufsect = f->sect;
-    c64_dio_read_block(_c64_fs_filebuftrack,
-		       _c64_fs_filebufsect, _c64_fs_filebuf);
-  }
-
-  if(_c64_fs_filebuf[0] == 0 &&
-     f->ptr == _c64_fs_filebuf[1]) {
-    return 0; /* EOF */
-  }
-
-  for(i = 0; i < len; ++i) {
-    
-    ++f->ptr;
-    if(_c64_fs_filebuf[0] == 0) {
-      if(f->ptr == _c64_fs_filebuf[1]) {
-	/* End of file reached, we return the amount of bytes read so
-	   far. */
-	return i + 1;
-      }
-    } else if(f->ptr == 0) {
-      /* Read new block into buffer and set buffer state
-	 accordingly. */
-      _c64_fs_filebuftrack = f->track = _c64_fs_filebuf[0];
-      _c64_fs_filebufsect = f->sect = _c64_fs_filebuf[1];
-      f->ptr = 2;
-      c64_dio_read_block(_c64_fs_filebuftrack,
-			 _c64_fs_filebufsect, _c64_fs_filebuf);
-    }    
-  }
-  return i;
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.h b/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.h
deleted file mode 100644
index 9e434d6..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-raw.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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: c64-fs-raw.h,v 1.1 2006/04/17 15:11:56 kthacker Exp $
- *
- */
-#ifndef __C64_FS_RAW_H__
-#define __C64_FS_RAW_H__
-
-#include "c64-fs.h"
-
-int __fastcall__ c64_fs_read_raw(struct c64_fs_file *f,
-				 char *buf, int len);
-
-int c64_fs_read_next(struct c64_fs_file *f, int len);
-
-
-#endif /* __C64_FS_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-write.c b/contiki-cpc/contiki-cpc/loader/unused/c64-fs-write.c
deleted file mode 100644
index 8f74c00..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-fs-write.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * \addtogroup c64fs
- * @{
- */
-
-/**
- * \file
- * Implementation of C64 file writes.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * The functions in this file are not included in the core Contiki
- * code, but must be explicitly linked by an application that that
- * wishes to be able to write to files.
- */
-
-
-/*
- * 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: c64-fs-write.c,v 1.1 2006/04/17 15:11:57 kthacker Exp $
- *
- */
-
-#include "c64-dio.h"
-#include "c64-fs.h"
-#include <string.h>
-
-/* An *UGLY* implementation of c64_fs_write that only can be used to
-   overwrite a single block file. */
-
-extern unsigned char _c64_fs_filebuf[256];
-extern unsigned char _c64_fs_filebuftrack,
-  _c64_fs_filebufsect;
-
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Write data to an open file.
- *
- * \note This function currently does not support writing to other than a single block file (cannot be more than 254 bytes long).
- *
- * \param f A pointer to a file descriptor previously opened with c64_fs_open().
- *
- * \param buf A pointer to a buffer with data that should be written
- * to the file.
- *
- * \param len The length of the data that should be written.
- *
- * \return The number of bytes actually written.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-int __fastcall__
-c64_fs_write(register struct c64_fs_file *f, char *buf, int len)
-{
-  int i;
-
-  if(len <= 0) {
-    return 0;
-  }
-
-  /* Check if current block is already in buffer, and if not read it
-     from disk. */
-  if(_c64_fs_filebuftrack != f->track ||
-     _c64_fs_filebufsect != f->sect) {
-    _c64_fs_filebuftrack = f->track;
-    _c64_fs_filebufsect = f->sect;
-    c64_dio_read_block(_c64_fs_filebuftrack,
-		       _c64_fs_filebufsect,
-		       _c64_fs_filebuf);
-  }
-
-  i = 256 - f->ptr;
-  if(len < i) {
-    i = len;
-  }
-
-  memcpy(&_c64_fs_filebuf[f->ptr], buf, i);
-
-  f->ptr += i;
-  if(_c64_fs_filebuf[0] == 0 &&
-     f->ptr > _c64_fs_filebuf[1]) {
-    _c64_fs_filebuf[1] = f->ptr;    
-  }
-
-  c64_dio_write_block(_c64_fs_filebuftrack,
-		      _c64_fs_filebufsect,
-		      _c64_fs_filebuf);
-  
-  return i;
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-fs.c b/contiki-cpc/contiki-cpc/loader/unused/c64-fs.c
deleted file mode 100644
index d0b8f47..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-fs.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/**
- * \defgroup c64fs C64 file system and disk functions.
- * @{
- *
- * The C64 file system functions are divided into two categories:
- * those that deal with C64 files and the C64 disk directory, and
- * those that allow direct block access to the disk. The former
- * functions can be used for accessing regular files, whereas the
- * latter functions are used e.g. to download D64 files onto 1541
- * disks.
- *
- * \note The C64 filesystem functions currently only work with the
- * 1541/1541-II/1571 and compatible drives, and not with the IDE64
- * hard disks or the 1581/FD2000 3.5" drives.
- *
- * 
- */
-
-/**
- * \file
- * C64 file system operations interface for Contiki.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- */
-
-/*
- * 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: c64-fs.c,v 1.1 2006/04/17 15:11:57 kthacker Exp $
- *
- */
-
-#include "c64-dio.h"
-#include "c64-dio-asm.h"
-#include "c64-fs.h"
-
-#include <string.h>
-#include <stdio.h>
-
-struct directory_entry {
-  unsigned char type;
-  unsigned char track, sect;
-  unsigned char name[16];
-  unsigned char reltrack, relsect, relreclen;
-  unsigned char unused1, unused2, unused3, unused4;
-  unsigned char tmptrack, tmpsect;
-  unsigned char blockslo, blockshi;
-};
-
-unsigned char _c64_fs_dirbuf[256];
-unsigned char _c64_fs_dirbuftrack = 0, _c64_fs_dirbufsect = 0;
-
-unsigned char _c64_fs_filebuf[256];
-unsigned char _c64_fs_filebuftrack = 0, _c64_fs_filebufsect = 0;
-
-static struct c64_fs_dirent lastdirent;
-
-static struct c64_fs_dir opendir;
-static struct c64_fs_dirent opendirent;
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * Open a file.
- *
- * The file description must be allocated by the caller and a pointer
- * to it is passed to this function.
- *
- * \param name A pointer to the name of the file to be opened.
- * \param f A pointer to the file descriptor struct.
- *
- * \retval 0 If the file was successfully opened.
- * \retval -1 If the file does not exist.
- */
-/*-----------------------------------------------------------------------------------*/
-int
-c64_fs_open(const char *name, register struct c64_fs_file *f)
-{
-  /* First check if we already have the file cached. If so, we don't
-     need to do an expensive directory lookup. */
-  if(strncmp(lastdirent.name, name, 16) == 0) {
-    f->track = lastdirent.track;
-    f->sect = lastdirent.sect;
-    f->ptr = 2;
-    return 0;
-  }
-
-  /* Not in cache, so we walk through directory instead. */
-  c64_fs_opendir(&opendir);
-
-  do {
-    c64_fs_readdir_dirent(&opendir, &opendirent);
-    if(strncmp(opendirent.name, name, 16) == 0) {
-      f->track = opendirent.track;
-      f->sect = opendirent.sect;
-      f->ptr = 2;
-      return 0;
-    }
-  } while(c64_fs_readdir_next(&opendir) == 0);
-
-  /* The file was not found in the directory. We flush the directory
-     buffer cache now in order to prevent a nasty problem from
-     happening: If the first directory block of an empty disk was
-     cached, *all* subsequent file opens would return "file not
-     found". */
-  _c64_fs_dirbuftrack = 0; /* There are no disk blocks on track 0. */
-  return -1;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Read data from an open file.
- *
- * This function reads data from an open file into a buffer than must
- * be allocated by the caller.
- *
- * \param f A pointer to a file descriptor structure that must have
- * been opened with c64_fs_open().
- *
- * \param buf A pointer to the buffer in which the data should be placed.
- *
- * \param len The maxiumum amount of bytes to read.
- *
- * \return The number of bytes that actually was read, or 0 if an end
- * of file was encountered.
- */
-/*-----------------------------------------------------------------------------------*/
-#if !NOASM
-#pragma optimize(push, off)
-#endif /* !NOASM */
-int __fastcall__
-c64_fs_read(register struct c64_fs_file *f, char *buf, int len)
-{
-  static int i;
-
-  /* Check if current block is already in buffer, and if not read it
-     from disk. */
-
-#if NOASM
-  if(f->track != _c64_fs_filebuftrack ||
-     _c64_fs_filebufsect != f->sect) {
-    _c64_fs_filebuftrack = f->track;
-    _c64_fs_filebufsect = f->sect;
-    c64_dio_read_block(_c64_fs_filebuftrack, _c64_fs_filebufsect,
-		       _c64_fs_filebuf);
-  }
-#else /* NOASM */
-  asm("ldy #%b", offsetof(struct c64_fs_file, track));
-  asm("lda (regbank+%b),y", 4);
-  asm("cmp %v", _c64_fs_filebuftrack);
-  asm("bne doblock");
-  
-  asm("ldy #%b", offsetof(struct c64_fs_file, sect));
-  asm("lda (regbank+%b),y", 4);
-  asm("cmp %v", _c64_fs_filebufsect);
-  asm("bne doblock");
-
-  asm("jmp noblock");
-
-  asm("doblock:");
-  
-  asm("ldy #%b", offsetof(struct c64_fs_file, track));
-  asm("lda (regbank+%b),y", 4);
-  asm("sta %v", _c64_fs_filebuftrack);
-  asm("sta %v", c64_dio_asm_track);
-  
-  asm("ldy #%b", offsetof(struct c64_fs_file, sect));
-  asm("lda (regbank+%b),y", 4);
-  asm("sta %v", _c64_fs_filebufsect);
-  asm("sta %v", c64_dio_asm_sector);
-
-  asm("lda #<(%v)", _c64_fs_filebuf);
-  asm("sta %v", c64_dio_asm_ptr);
-  asm("lda #>(%v)", _c64_fs_filebuf);
-  asm("sta %v+1", c64_dio_asm_ptr);
-
-  asm("jsr %v", c64_dio_asm_read_block);
-
-  asm("noblock:");
-
-#endif /* NOASM */
-
-  if(_c64_fs_filebuf[0] == 0 &&
-     f->ptr == _c64_fs_filebuf[1]) {
-    return 0; /* EOF */
-  }
-
-  for(i = 0; i < len; ++i) {
-#if NOASM    
-    *buf = _c64_fs_filebuf[f->ptr];
-    ++f->ptr;
-#else /* NOASM */	
-    asm("ldy #%o+1", buf);
-    asm("jsr ldaxysp");
-    asm("sta ptr2");
-    asm("stx ptr2+1");
-
-    asm("ldy #%b", offsetof(struct c64_fs_file, ptr));
-    asm("lda (regbank+%b),y", 4);    
-    asm("tax");
-
-    asm("ldy #0");
-    asm("lda %v,x", _c64_fs_filebuf);
-    asm("sta (ptr2),y");
-
-    asm("inx");
-    asm("txa");
-    asm("ldy #%b", offsetof(struct c64_fs_file, ptr));
-    asm("sta (regbank+%b),y", 4);    
-#endif /* NOASM */
-
-    
-    if(_c64_fs_filebuf[0] == 0) {
-      if(f->ptr == _c64_fs_filebuf[1]) {
-	/* End of file reached, we return the amount of bytes read so
-	   far. */
-	return i + 1;
-      }
-    } else if(f->ptr == 0) {
-
-      /* Read new block into buffer and set buffer state
-	 accordingly. */
-      _c64_fs_filebuftrack = f->track = _c64_fs_filebuf[0];
-      _c64_fs_filebufsect = f->sect = _c64_fs_filebuf[1];
-      f->ptr = 2;
-      c64_dio_read_block(_c64_fs_filebuftrack,
-			 _c64_fs_filebufsect, _c64_fs_filebuf);
-    }
-    
-    ++buf;
-  }
-  return i;
-}
-#if !NOASM    
-#pragma optimize(pop)
-#endif /* !NOASM */
-/*-----------------------------------------------------------------------------------*/
-/**
- * Close an open file.
- *
- * \param f A pointer to a file descriptor struct that previously has
- * been opened with c64_fs_open().
- */
-/*-----------------------------------------------------------------------------------*/
-void
-c64_fs_close(struct c64_fs_file *f)
-{
-  
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * \internal
- * Read a directory buffer into the _c64_fs_dirbuf buffer.
- *
- * This function is shared between this and  the c64-fs-raw module.
- *
- * \param track The track of the directory block.
- * \param sect The sector of the directory block.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-_c64_fs_readdirbuf(unsigned char track, unsigned char sect)
-{
-  if(_c64_fs_dirbuftrack == track &&
-     _c64_fs_dirbufsect == sect) {
-    /* Buffer already contains requested block, return. */
-    return;
-  }
-  c64_dio_read_block(track, sect, _c64_fs_dirbuf);
-  _c64_fs_dirbuftrack = track;
-  _c64_fs_dirbufsect = sect;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Open the disk directory for reading.
- *
- * The caller must supply a pointer to a directory descriptor.
- *
- * \param d A pointer to a directory description that must be
- * allocated by the caller.
- */
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-c64_fs_opendir(register struct c64_fs_dir *d)
-{
-  d->track = 18;
-  d->sect = 1;
-  d->ptr = 2;
-
-  return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Read the current directory entry.
- *
- * This function reads the directory entry to which the directory
- * descriptor currently points into a struct c64_fs_dirent supplied by
- * the caller.
- *
- * The function c64_fs_readdir_next() is used to move the directory
- * entry pointer forward in the directory.
- *
- * \param d A pointer to a directory descriptor previously opened with c64_fs_opendir().
- *
- * \param f A pointer to a directory entry that must have been
- * previously allocated by the caller.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-c64_fs_readdir_dirent(register struct c64_fs_dir *d,
-		      register struct c64_fs_dirent *f)
-{
-  struct directory_entry *de;
-  int i;
-  register char *nameptr;
-  
-  _c64_fs_readdirbuf(d->track, d->sect);
-  de = (struct directory_entry *)&_c64_fs_dirbuf[d->ptr];
-  nameptr = de->name;
-  for(i = 0; i < 16; ++i) {
-    if(*nameptr == 0xa0) {
-      *nameptr = 0;
-      break;
-    }
-    ++nameptr;
-  }
-  strncpy(f->name, de->name, 16);
-  f->track = de->track;
-  f->sect = de->sect;
-  f->size = de->blockslo + (de->blockshi >> 8);
-  memcpy(&lastdirent, f, sizeof(struct c64_fs_dirent));
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Move the directory pointer forward.
- *
- * This function moves the directory entry pointer in the directory
- * descriptor forward so that it points to the next file.
- *
- * \param d A pointer to a directory descriptor previously opened with
- * c64_fs_opendir().
- *
- * \retval 1 If there are no more directory entried in the directory.
- * \retval 0 There were more directory entries and the pointer has
- * been moved to point to the next one.
- */
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-c64_fs_readdir_next(struct c64_fs_dir *d)
-{
-  struct directory_entry *de;
- again:
-  _c64_fs_readdirbuf(d->track, d->sect);
-  if(d->ptr == 226) {
-    if(_c64_fs_dirbuf[0] == 0) {
-      return 1;
-    }
-    d->track = _c64_fs_dirbuf[0];
-    d->sect = _c64_fs_dirbuf[1];
-    d->ptr = 2;
-  } else {
-    d->ptr += 32;
-  }
-
-  de = (struct directory_entry *)&_c64_fs_dirbuf[d->ptr];
-  if(de->type == 0) {
-    goto again;
-  }
-  return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Close a directory descriptor previously opened by c64_fs_opendir().
- *
- * \param d A poitner to a directory descriptor previously opened with
- * c64_fs_opendir().
- */
-/*-----------------------------------------------------------------------------------*/
-void
-c64_fs_closedir(struct c64_fs_dir *d)
-{
-  
-}
-/*-----------------------------------------------------------------------------------*/
-/** @} */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/c64-fs.h b/contiki-cpc/contiki-cpc/loader/unused/c64-fs.h
deleted file mode 100644
index bfacb70..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/c64-fs.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * \addtogroup c64fs
- * @{
- */
-
-/**
- * \file
- * Header file for the C64 filesystem functions.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- */
-
-/*
- * 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: c64-fs.h,v 1.1 2006/04/17 15:11:57 kthacker Exp $
- *
- */
-#ifndef __C64_FS_H__
-#define __C64_FS_H__
-
-#include "c64-dio.h"
-
-/**
- * An opaque structure with no user visible elements that represents
- * an open file.
- */
-struct c64_fs_file {
-  unsigned char track, sect, ptr;
-};
-
-int c64_fs_open(const char *name, struct c64_fs_file *f);
-void c64_fs_close(struct c64_fs_file *f);
-int __fastcall__ c64_fs_read(struct c64_fs_file *f,
-			     char *buf, int len);
-
-int __fastcall__ c64_fs_write(struct c64_fs_file *f,
-			      char *buf, int len);
-
-/**
- * An opaque structure with no user visible elements that represents a
- * directory descriptor.
- */
-struct c64_fs_dir {
-  unsigned char track, sect, ptr;
-};
-
-/**
- * A C64 directory entry.
- */
-struct c64_fs_dirent {
-  char name[17];        /**< The name of the directory entry. */
-  unsigned short size;  /**< The size of the directory entry in 256 byte blocks. */
-  unsigned char track,  
-    sect;
-};
-
-
-unsigned char c64_fs_opendir(struct c64_fs_dir *d);
-
-void c64_fs_readdir_dirent(struct c64_fs_dir *d,
-			   struct c64_fs_dirent *f);
-unsigned char c64_fs_readdir_next(struct c64_fs_dir *d);
-
-void c64_fs_closedir(struct c64_fs_dir *d);
-
-/** @} */
-
-#endif /* __C64_FS_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.c b/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.c
deleted file mode 100644
index 66aaa2d..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-cbm.c,v 1.1 2006/04/17 15:11:57 kthacker Exp $
- */
-#include "contiki.h"
-
-#include "log.h"
-#include "cfs.h"
-#include "cfs-service.h"
-
-#include <cbm.h>
-#include <string.h>
-
-static int  s_open(const char *n, int f);
-static void s_close(int f);
-static int  s_read(int f, char *b, unsigned int l);
-static int  s_write(int f, char *b, unsigned int l);
-static int  s_opendir(struct cfs_dir *p, const char *n);
-static int  s_readdir(struct cfs_dir *p, struct cfs_dirent *e);
-static int  s_closedir(struct cfs_dir *p);
-
-static const struct cfs_service_interface interface =
-  {
-    CFS_SERVICE_VERSION,
-    s_open,
-    s_close,
-    s_read,
-    s_write,
-    s_opendir,
-    s_readdir,
-    s_closedir
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_PROCESS(proc, CFS_SERVICE_NAME ": KERNAL", EK_PRIO_NORMAL,
-           eventhandler, NULL, (void *)&interface);
-
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(cfs_cbm_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(CFS_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    log_message("Starting KERNAL CFS", "");
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, &interface);
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_open(const char *n, int f)
-{
-  if(cbm_open(2, 8, f, n) == 0) {
-    return 2;
-  }
-  return -1;
-}
-/*---------------------------------------------------------------------------*/
-static void
-s_close(int f)
-{
-  cbm_close(f);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_read(int f, char *b, unsigned int l)
-{
-  return cbm_read(f, b, l);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_write(int f, char *b, unsigned int l)
-{
-  return cbm_write(f, b, l);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_opendir(struct cfs_dir *p, const char *n)
-{
-  return cbm_opendir(4, 8);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_readdir(struct cfs_dir *p, struct cfs_dirent *e)
-{
-  struct cbm_dirent ce;
-  int ret;
-  ret = cbm_readdir(4, &ce);
-  strncpy(e->name, ce.name, sizeof(ce.name));
-  e->size = ce.size;
-  return ret;
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_closedir(struct cfs_dir *p)
-{
-  cbm_closedir(4);
-  return 1;
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.h b/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.h
deleted file mode 100644
index 774d855..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/cfs-cbm.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-cbm.h,v 1.1 2006/04/17 15:11:58 kthacker Exp $
- */
-#ifndef __CFS_CBM_H__
-#define __CFS_CBM_H__
-
-#include "ek.h"
-
-EK_PROCESS_INIT(cfs_cbm_init, arg);
-
-#endif /* __CFS_CBM_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/cfs-init.c b/contiki-cpc/contiki-cpc/loader/unused/cfs-init.c
deleted file mode 100644
index b4536f5..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/cfs-init.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-init.c,v 1.1 2006/04/17 15:11:58 kthacker Exp $
- */
-#include "contiki.h"
-
-#include "cfs.h"
-#include "cfs-service.h"
-
-#include <cbm.h>
-#include <string.h>
-
-static int  s_open(const char *n, int f);
-static void s_close(int f);
-static int  s_read(int f, char *b, unsigned int l);
-static int  s_write(int f, char *b, unsigned int l) {return -1;}
-static int  s_opendir(struct cfs_dir *p, const char *n) {return -1;}
-static int  s_readdir(struct cfs_dir *p, struct cfs_dirent *e) {return -1;}
-static int  s_closedir(struct cfs_dir *p) {return -1;}
-
-static const struct cfs_service_interface interface =
-  {
-    CFS_SERVICE_VERSION,
-    s_open,
-    s_close,
-    s_read,
-    s_write,
-    s_opendir,
-    s_readdir,
-    s_closedir
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_PROCESS(proc, CFS_SERVICE_NAME ": init", EK_PRIO_NORMAL,
-           eventhandler, NULL, (void *)&interface);
-
-/*---------------------------------------------------------------------------*/
-EK_PROCESS_INIT(cfs_init_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(CFS_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, &interface);
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_open(const char *n, int f)
-{
-  if(cbm_open(2, 8, CBM_READ, n) == 0) {
-    return 2;
-  }
-  return -1;
-}
-/*---------------------------------------------------------------------------*/
-static void
-s_close(int f)
-{
-  cbm_close(f);
-}
-/*---------------------------------------------------------------------------*/
-static int
-s_read(int f, char *b, unsigned int l)
-{
-  return cbm_read(f, b, l);
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/loader/unused/cfs-init.h b/contiki-cpc/contiki-cpc/loader/unused/cfs-init.h
deleted file mode 100644
index 6289941..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/cfs-init.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cfs-init.h,v 1.1 2006/04/17 15:11:58 kthacker Exp $
- */
-#ifndef __CFS_INIT_H__
-#define __CFS_INIT_H__
-
-#include "ek.h"
-
-EK_PROCESS_INIT(cfs_init_init, arg);
-
-#endif /* __CFS_INIT_H__ */
diff --git a/contiki-cpc/contiki-cpc/loader/unused/loader-arch-cpc.h b/contiki-cpc/contiki-cpc/loader/unused/loader-arch-cpc.h
deleted file mode 100644
index 9a2a22e..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/loader-arch-cpc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-int cpc_load(char *name, char *arg);
-void cpc_unload();
-struct dsc *cpc_load_dsc(char *name);
-void cpc_unload_dsc(struct dsc *dsc);
-
-#define LOADER_LOAD(name,arg) \
-	cpc_load(name, arg)
-
-#define LOADER_UNLOAD() \
-	cpc_unload()
-
-#define LOADER_LOAD_DSC(name) \
-	cpc_load_dsc(name)
-
-#define LOADER_UNLOAD_DSC(dsc) \
-	cpc_unload_dsc(dsc)
-
-
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c b/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c
deleted file mode 100644
index 0785ce0..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * \file
- * File loader implementation.
- * \author Adam Dunkels <adam@dunkels.com>
- *
- * This file implements dynamically loadable files for Contiki using
- * the cc65 module loading system. The actual file operations are
- * implemented in other files.
- */
-
-/*
- * 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 OS
- *
- * $Id: loader-arch.c,v 1.1 2006/04/17 15:11:58 kthacker Exp $
- *
- */
-
-#include <stdlib.h>
-#include "modload.h" 
-
-#ifndef NULL
-#define NULL (void *)0
-#endif /* NULL */
-
-#include "cfs.h"
-
-#include "loader.h"
-
-#include "loader-arch.h"
-
-static int __fastcall__
-do_read(int f, char *buf, unsigned int len)
-{
-  return cfs_read(f, buf, len);
-}
-
-static struct mod_ctrl ctrl = {
-  (void *)do_read            /* Read from disk */
-};
-
-
-struct loader_arch_hdr {
-  char arch[8];
-  char version[8];
-
-  char initfunc[1];
-};
-
-/*-----------------------------------------------------------------------------------*/
-/**
- * \internal
- * Load a program from disk and execute it.
- *
- * Code originally written by Ullrich von Bassewitz.
- */
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-load(const char *name)
-{
-  unsigned char res;
-  
-  /* Now open the file */
-  ctrl.callerdata = cfs_open(name, 0);
-  if(ctrl.callerdata < 0) {
-    /* Could not open the file, display an error and return */
-    /* ### */
-    return LOADER_ERR_OPEN;
-  }
-  
-  /* Load the module */
-  res = mod_load(&ctrl);
-  
-  /* Close the input file */
-  cfs_close(ctrl.callerdata);
-  
-  /* Check the return code */
-  if(res != MLOAD_OK) {
-    /* Wrong module, out of memory or whatever. Print an error
-     * message and return.
-     */
-    /* ### */
-    return res;
-  }
-  
-  /* We've successfully loaded the module. */
-  
-  return LOADER_OK;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Load and start a program.
- *
- * \param name The name of the program file.
- * \param arg A pointer that will be passed to the new process.
- */
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-loader_arch_load(const char *name, char *arg)
-{
-  unsigned char r;
-  struct loader_arch_hdr *hdr;
-  
-  r = load(name);
-  if(r != MLOAD_OK) {
-    return r;
-  }
-  hdr = (struct loader_arch_hdr *)ctrl.module;
-  
-  /* Check the program header and see that version and architecture
-     matches. */
-  
-  /* Call the init function. */
-  ((void (*)(char *))hdr->initfunc)(arg);
-
-  return LOADER_OK;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Load a DSC file into memory.
- *
- * The memory must be deallocated with the loader_arch_free() function
- * after is has been used.
- *
- * \param name The name of the DSC file.
- *
- * \return A pointer to the struct dsc or NULL if the DSC file could
- * not be loaded.
- */
-/*-----------------------------------------------------------------------------------*/
-struct dsc *
-loader_arch_load_dsc(const char *name)
-{
-  unsigned char r;
-
-  r = load(name);
-  if(r == MLOAD_OK) {
-    return (struct dsc *)ctrl.module;
-  }
-  return NULL;
-}
-/*-----------------------------------------------------------------------------------*/
-/**
- * Deallocate memory previously allocated by the loader.
- *
- * The loader allocates memory when it loads programs or DSC
- * files. All such memory must be deallocated with this function. Memory for programs is automatically deallocated when calling the LOADER_UNLOAD() function, but memory for DSCs must be explicitly deallcated with this function.
- *
- * \param addr A pointer to memory allocated by the loader.
- */
-/*-----------------------------------------------------------------------------------*/
-void
-loader_arch_free(void *addr)
-{
-  mod_free(addr);
-}
-/*-----------------------------------------------------------------------------------*/
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c.old b/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c.old
deleted file mode 100644
index d76c3cc..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/loader-arch.c.old
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgement:
- *        This product includes software developed by Adam Dunkels. 
- * 4. 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 OS
- *
- * $Id: loader-arch.c.old,v 1.1 2006/04/17 15:11:58 kthacker Exp $
- *
- */
-
-#include <stdlib.h>
-#include <modload.h>
-
-#ifndef NULL
-#define NULL (void *)0
-#endif /* NULL */
-
-#include "cpc-fs.h"
-
-#include "loader.h"
-
-#include "loader-arch.h"
-
-struct loader_arch_hdr {
-  char arch[8];
-  char version[8];
-
-  char initfunc[1];
-};
-
-/*-----------------------------------------------------------------------------------*/
-/* load(name)
- *
- * Loads a program from disk and executes it. Code originally written by
- * Ullrich von Bassewitz.
- */
-/*-----------------------------------------------------------------------------------*/
-static unsigned char
-load(const char *name)
-{
-  unsigned char res;
-  int ret;
-  
-  /* Now open the file */
-  ret = cpc_fs_open(name);
-  if(ret < 0) {
-    /* Could not open the file, display an error and return */
-    /* ### */
-    return LOADER_ERR_OPEN;
-  }
-/*  ctrl.callerdata = (int)&file; */
-  
-  /* Load the module */
-  res = cpc_fs_read();
-  
-  /* Close the input file */
-  cpc_fs_close();
-  
-  /* Check the return code */
-  if(res != MLOAD_OK) {
-    /* Wrong module, out of memory or whatever. Print an error
-     * message and return.
-     */
-    /* ### */
-    return res;
-  }
-  
-  /* We've successfully loaded the module. */
-  
-  return LOADER_OK;
-}
-/*-----------------------------------------------------------------------------------*/
-unsigned char
-loader_arch_load(const char *name, char *arg)
-{
-  unsigned char r;
-  struct loader_arch_hdr *hdr;
-  
-  r = load(name);
-  if(r != MLOAD_OK) {
-    return r;
-  }
-//  hdr = (struct loader_arch_hdr *)ctrl.module;
-  
-  /* Check the program header and see that version and architecture
-     matches. */
-  
-  /* Call the init function. */
-
-  ((void (*)(char *))hdr->initfunc)(arg);
-
-  return LOADER_OK;
-}
-/*-----------------------------------------------------------------------------------*/
-struct dsc *
-loader_arch_load_dsc(const char *name)
-{
-  unsigned char r;
-
-  r = load(name);
-  if(r == MLOAD_OK) {
-    return (struct dsc *)ctrl.module;    
-  }
-  return NULL;
-}
-/*-----------------------------------------------------------------------------------*/
-void
-loader_arch_free(void *addr)
-{
-  mod_free(addr);
-}
-/*-----------------------------------------------------------------------------------*/
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/modload.c b/contiki-cpc/contiki-cpc/loader/unused/modload.c
deleted file mode 100644
index 9c33b16..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/modload.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "modload.h"
-
-void mod_free(struct dsc *d)
-{
-
-
-}
-
-int mod_load(struct mod_ctrl *ctrl)
-{
-	return MLOAD_OK;
-}
diff --git a/contiki-cpc/contiki-cpc/loader/unused/modload.h b/contiki-cpc/contiki-cpc/loader/unused/modload.h
deleted file mode 100644
index ff0dc41..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/modload.h
+++ /dev/null
@@ -1,13 +0,0 @@
-void mod_free(struct dsc *);
-
-struct mod_ctrl
-{ 
-	void *read;
-	void *module;
-	int callerdata;
-}; 
-
-#define MLOAD_OK 0
-
-int mod_load(struct mod_ctrl *);
-
diff --git a/contiki-cpc/contiki-cpc/loader/unused/rel-old.s b/contiki-cpc/contiki-cpc/loader/unused/rel-old.s
deleted file mode 100644
index 8b03baa..0000000
--- a/contiki-cpc/contiki-cpc/loader/unused/rel-old.s
+++ /dev/null
@@ -1,167 +0,0 @@
-	.area _CODE
-	.globl _get_file_length
-	.globl _load_file
-;;----------------------------------------------------------------------------
-;; get length of file on disc. Assumption file has a AMSDOS header
-;;
-;; int get_file_length(const char *filename);
-
-_get_file_length::
-	ld hl,#2
-	add hl,sp
-	ld a,(hl)
-	inc hl
-	ld h,(hl)
-	ld l,a
-
-	;; HL = address of null terminated string
-	call count_string_length
-	ld de,#0x0c000		;; points to unused 2k buffer
-	call 0x0bc77		;; cas in open
-	push bc			;; BC = length of file
-	call 0x0bc7d		;; cas in abandon
-	pop hl
-	ret
-
-;;---------------------------------------------------------------------
-
-count_string_length:
-	push hl
-	ld b,#0
-csl:	ld a,(hl)
-	or a
-	jr z,csl2
-	inc hl
-	inc b
-	jr csl
-csl2:
-	pop hl
-	ret
-
-;;---------------------------------------------------------------------------
-;; void load_file(const char *filename, void *addr)
-
-_load_file::
-	ld hl,#5
-	add hl,sp
-	ld d,(hl)
-	dec hl
-	ld e,(hl)
-	dec hl
-
-	push de
-	ld a,(hl)
-	dec hl
-	ld l,(hl)
-	ld h,a
-
-	call count_string_length
-	ld de,#0x0c000
-	call 0x0bc77		;; cas in open
-	pop hl			;; load address
-	call 0x0bc83		;; cas in direct
-	call 0x0bc7a		;; cas in close
-	ret
-
-;; void relocate(void *addr,void *base)
-
-;; IX = address of relocate data
-_relocate::
-	ld hl,#5
-	add hl,sp
-	push ix
-	ld b,(hl)			;; base address
-	dec hl
-	ld c,(hl)
-	dec hl
-	ld a,(hl)
-	.db #0x0dd
-	ld h,a	
-	dec hl
-	ld a,(hl)
-	.db #0x0dd
-	ld l,a				;; IX is offset of table from start of loaded file
-	add ix,bc			;; relocate IX to give absolute address of table.
-	call relocate_16bit
-	ld e,c
-	call relocate_8bit	;; lower byte
-	ld e,b
-	call relocate_8bit	;; upper byte
-	pop ix
-	ret
-
-;;--------------------------------------------------------------------------
-;; Relocate 8-bit values (e.g. where low and high parts of an address
-;; are loaded seperatly into registers)
-;;
-;; IX = list of 16-bit addresses. Each address identifies an 8-bit
-;; value
-;; 
-relocate_8bit:
-	ld a,0(ix)
-	or a
-	ret z
-	inc ix
-rel8bit: push af
-	ld l,0(ix)
-	inc ix
-	ld h,0(ix)
-inc ix
-add hl,bc
-ld a,(hl)
-add e
-ld (hl),a
-pop af
-dec a
-jr nz,rel8bit
-ret
-
-
-;;--------------------------------------------------------------------------
-;; Relocate 16-bit values
-;;
-;; Entry conditions:
-;;
-;; IX = list of 16-bit addresses. Each address identifies a 16-bit 
-;; value to relocate. 
-;;
-;; BC = base address
-;; 
-;; NOTE: 
-;; - Relocatable 16-bit values come from CALL and JP instructions and
-;; loading a 16-bit register.
-
-relocate_16bit:
-ld a,0(ix)		;; number of items to relocate
-or a
-ret z
-
-inc ix
-
-rel16bit:
-push af
-;; get offset (from start of file) of 16-bit value to relocate
-ld l,0(ix)
-inc ix
-ld h,0(ix)
-inc ix
-add hl,bc
-;; get the 16-bit value
-ld e,(hl)
-inc hl
-ld d,(hl)
-
-
-;; add base address; therefore relocating it.
-ex de,hl
-add hl,bc
-ex de,hl
-;; write relocated value
-ld (hl),d
-dec hl
-ld (hl),e
-pop af
-dec a
-jr nz,rel16bit
-ret
-
diff --git a/contiki-cpc/contiki-cpc/readme.txt b/contiki-cpc/contiki-cpc/readme.txt
deleted file mode 100644
index 2fc791a..0000000
--- a/contiki-cpc/contiki-cpc/readme.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-What I did to make contiki for CPC:
-
-1. I took the contiki sources and made it compile with gcc on linux.
-2. Next I made it compile with sdcc
-3. Next I added cpc version of some files.
-4. Then I prayed.
-
-About contiki:
-
-contiki is both the initial program to run to start the operating system 
-AND contains a library of functions to use by the other programs. 
-
-Compile contiki executable to generate the executable and to generate a 
-list of symbols.
-
-These symbols are used to compile the other programs. When they are run 
-they will automatically call the appropiate functions.
-
-This is not as good as referencing a fixed location jumptable, because 
-each utility has to be recompiled if the contiki executable is recompiled 
-:(
-
diff --git a/contiki-cpc/contiki-cpc/uip/cs8900a.c b/contiki-cpc/contiki-cpc/uip/cs8900a.c
deleted file mode 100644
index ebb525c..0000000
--- a/contiki-cpc/contiki-cpc/uip/cs8900a.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) 2001, 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 C64 RealAudio server demo project.
- *
- * $Id: cs8900a.c,v 1.1 2006/04/17 15:11:59 kthacker Exp $
- *
- */
-
-/* cs8900a.c: device driver for the CS8900a chip in 8-bit mode. Mostly
-   written in 6502 assembler for speed. */
-
-#include "cs8900a.h"
-#include "uip.h"
-#include "uip_arp.h"
-
-/*#define UIP_ETHADDR0 0x00
-#define UIP_ETHADDR1 0x00
-#define UIP_ETHADDR2 0x00
-#define UIP_ETHADDR3 0x64
-#define UIP_ETHADDR4 0x64
-#define UIP_ETHADDR5 0x64*/
-
-extern u8_t *cs8900a_rxtxreg,
-  *cs8900a_txcmd,
-  *cs8900a_txlen,
-  *cs8900a_packetpp,
-  *cs8900a_ppdata;
-
-static u16_t len;
-static u8_t r;
-
-
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-cs8900a_init(void)
-{
-  /* Turn on transmission and reception of frames. */
-  /* PACKETPP = 0x0112;
-     PPDATA   = 0x00c0; */
-  asm("lda #$12");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda #$c0");
-  asm("sta %v", cs8900a_ppdata);
-  asm("lda #$00");
-  asm("sta %v+1", cs8900a_ppdata);
-
-  /* Accept valid unicast+broadcast frames. */
-  /* PACKETPP = 0x0104;
-     PPDATA   = 0x0d05; */
-  asm("lda #$04");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda #$05");
-  asm("sta %v", cs8900a_ppdata);
-  asm("lda #$0d");
-  asm("sta %v+1", cs8900a_ppdata);
-
-  /* Set MAC address. */
-  /* PACKETPP = 0x0158;
-     PPDATA   = (ETHADDR1 << 8) | (ETHADDR0); */
-  asm("lda #$58");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v", uip_ethaddr);
-  asm("sta %v", cs8900a_ppdata);
-  asm("lda %v+1", uip_ethaddr);
-  asm("sta %v+1", cs8900a_ppdata);
-
-  /* PACKETPP = 0x015a;
-     PPDATA   = (ETHADDR3 << 8) | (ETHADDR2); */
-  asm("lda #$5a");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v+2", uip_ethaddr);
-  asm("sta %v", cs8900a_ppdata);
-  asm("lda %v+3", uip_ethaddr);
-  asm("sta %v+1", cs8900a_ppdata);
-
-  /* PACKETPP = 0x015c;
-     PPDATA   = (ETHADDR5 << 8) | (ETHADDR4); */
-  asm("lda #$5c");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v+4", uip_ethaddr);
-  asm("sta %v", cs8900a_ppdata);
-  asm("lda %v+5", uip_ethaddr);
-  asm("sta %v+1", cs8900a_ppdata);
-
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-void
-cs8900a_send(void)
-{
-  if(uip_len > UIP_BUFSIZE) {
-    asm("inc $d020");
-    return;
-  }
-    
-  /* Transmit command. */
-  asm("lda #$c0");
-  asm("sta %v", cs8900a_txcmd);
-  asm("lda #$00");
-  asm("sta %v+1", cs8900a_txcmd);
-  asm("lda _uip_len");
-  asm("sta %v", cs8900a_txlen);
-#if UIP_BUFSIZE > 255  
-  asm("lda _uip_len+1");
-#else
-  asm("lda #0");
-#endif      
-  asm("sta %v+1", cs8900a_txlen);
-
-  asm("ldx #8");
-  asm("tryagain:");
-  /* Check for avaliable buffer space. */
-  asm("lda #$38");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v+1", cs8900a_ppdata);
-  asm("and #1");
-  asm("bne send");
-
-  /* No space avaliable, skip a received frame and try again. */
-  asm("lda #$02");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v", cs8900a_ppdata);
-  asm("ora #$40");
-  asm("sta %v", cs8900a_ppdata);
-
-  asm("dex");
-  asm("bne tryagain");
-  
-  asm("bailout:");
-  return;
-
-  /* Send the frame. */
-  asm("send:");
-
-  
-  /* First, send 40+14=54 bytes of header. */
-  
-  asm("ldx #54");
-  asm("ldy #0");
-  asm("sendloop1:");
-  asm("lda _uip_buf,y");
-  asm("sta %v", cs8900a_rxtxreg);
-  asm("lda _uip_buf+1,y");
-  asm("sta %v+1", cs8900a_rxtxreg);
-  asm("iny");
-  asm("iny");
-  asm("dex");
-  asm("dex");
-  asm("bne sendloop1");
-
-  if(uip_len <= 54) {
-    return;
-  }
-
-  /* Next, send rest of the packet. */
-
-  uip_len -= 54;
-
-
-  asm("lda ptr1");
-  asm("pha");
-  asm("lda ptr1+1");
-  asm("pha");
-  
-  asm("lda _uip_appdata");
-  asm("sta ptr1");
-  asm("lda _uip_appdata+1");
-  asm("sta ptr1+1");  
-
-  asm("sendloop2:");
-  asm("lda _uip_len");  
-  asm("tax");
-  asm("and #1");
-  asm("beq noinc");
-  asm("inx");
-  asm("noinc:");
-#if UIP_BUFSIZE > 255
-  asm("lda _uip_len+1");
-#else
-  asm("lda #0");
-#endif
-  asm("beq nozero");
-  asm("ldx #0");
-  asm("nozero:");
-  asm("ldy #0");
-  asm("sendloop:");
-  asm("lda (ptr1),y");
-  asm("sta %v", cs8900a_rxtxreg);
-  asm("iny");
-  asm("lda (ptr1),y");
-  asm("sta %v+1", cs8900a_rxtxreg);
-  asm("iny");
-  asm("dex");
-  asm("dex");
-  asm("bne sendloop");
-  asm("inc ptr1+1");
-#if UIP_BUFSIZE > 255
-  asm("dec _uip_len+1");
-  asm("bpl sendloop2");
-#endif
-
-  asm("pla");
-  asm("sta ptr1+1");
-  asm("pla");
-  asm("sta ptr1");  
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-static void
-skip_frame(void)
-{
-  /* PACKETPP = 0x0102;
-     PPDATA   = PPDATA | 0x0040; */
-  asm("lda #$02");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v", cs8900a_ppdata);
-  asm("ora #$40");
-  asm("sta %v", cs8900a_ppdata);
-}
-#pragma optimize(pop)
-/*-----------------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-u8_t
-cs8900a_poll(void)
-{
-  /* Check receiver event register to see if there are any valid
-     unicast frames avaliable.  */
-  /* PACKETPP = 0x0124;
-     if(PPDATA & 0x000d == 0x0000) {
-       return 0;
-     }
-  */
-  asm("lda #$24");
-  asm("sta %v", cs8900a_packetpp);
-  asm("lda #$01");
-  asm("sta %v+1", cs8900a_packetpp);
-  asm("lda %v+1", cs8900a_ppdata);
-  asm("and #$0d");
-  asm("cmp #$00");
-  asm("bne noreturn");
-  /* No frame ready. */
-  return 0;
-  
-  asm("noreturn:");
-  /* Process the incoming frame. */
-  
-  /* Read receiver event and discard it. */
-  /* dummy = RXTXREG; */
-     
-  asm("lda %v+1", cs8900a_rxtxreg);
-  asm("sta _len+1");
-  asm("lda %v", cs8900a_rxtxreg);
-  asm("sta _len");
-  
-  /* Read frame length. */
-  /* len = uip_len = RXTXREG; */
-  asm("lda %v+1", cs8900a_rxtxreg);
-  asm("sta _len+1");
-  asm("sta _uip_len+1");
-  asm("lda %v", cs8900a_rxtxreg);
-  asm("sta _len");
-  asm("sta _uip_len");
-
-  
-  if(len > UIP_BUFSIZE) {
-    skip_frame();
-    return 0;
-  }
-  
-  /* Read bytes into uip_buf. */
-  asm("lda ptr1");
-  asm("pha");
-  asm("lda ptr1+1");
-  asm("pha");
-  
-  asm("lda #<_uip_buf");
-  asm("sta ptr1");
-  asm("lda #>_uip_buf");
-  asm("sta ptr1+1");  
-  
-  asm("lda _len+1");
-  asm("beq read256");
-  
-    /* Read first 256*n bytes. */
-  asm("ldy #0");
-  asm("read256loop:");
-  asm("lda %v", cs8900a_rxtxreg);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("lda %v+1", cs8900a_rxtxreg);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("bne read256loop");
-  asm("inc ptr1+1");
-  
-  asm("dec _len+1");
-  asm("bne read256loop");
-  
-  /* Read last 255 or less bytes. */
-  asm("read256:");
-  asm("lda _len");
-  asm("lsr");
-  asm("bcc noinc");
-  asm("inc _len");
-  asm("noinc:");
-  asm("ldy #$0");
-  asm("readloop:");
-  asm("lda %v", cs8900a_rxtxreg);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("lda %v+1", cs8900a_rxtxreg);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("cpy _len");
-  asm("bne readloop");
-
-  asm("pla");
-  asm("sta ptr1+1");
-  asm("pla");
-  asm("sta ptr1");
-  return len;
-}
-#pragma optimize(pop)
diff --git a/contiki-cpc/contiki-cpc/uip/cs8900a.h b/contiki-cpc/contiki-cpc/uip/cs8900a.h
deleted file mode 100644
index 0112450..0000000
--- a/contiki-cpc/contiki-cpc/uip/cs8900a.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: cs8900a.h,v 1.1 2006/04/17 15:11:59 kthacker Exp $
- */
-#ifndef __CS8900A_H__
-#define __CS8900A_H__
-
-#include "uip_arch.h"
-
-void cs8900a_init(void);
-void cs8900a_send(void);
-u8_t cs8900a_poll(void);
-
-#endif /* __CS8900A_H__ */
diff --git a/contiki-cpc/contiki-cpc/uip/eth64-drv.c b/contiki-cpc/contiki-cpc/uip/eth64-drv.c
deleted file mode 100644
index 73b12bc..0000000
--- a/contiki-cpc/contiki-cpc/uip/eth64-drv.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: eth64-drv.c,v 1.1 2006/04/17 15:11:59 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "lan91c96.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x0d,0x60,0x80,0x3d,0xb9}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": ETH64", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(eth64_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  lan91c96_send();
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    uip_setethaddr(addr);
-    lan91c96_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = lan91c96_poll();
-  if(uip_len > 0) {
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        lan91c96_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/eth64-dsc.c b/contiki-cpc/contiki-cpc/uip/eth64-dsc.c
deleted file mode 100644
index 5504061..0000000
--- a/contiki-cpc/contiki-cpc/uip/eth64-dsc.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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: eth64-dsc.c,v 1.1 2006/04/17 15:11:59 kthacker Exp $
- *
- */
-
-#include "dsc.h"
-
-extern struct ctk_icon lan91c96_icon;
-/*-----------------------------------------------------------------------------------*/
-DSC(lan91c96_dsc,
-    "IDE64/ETH64 driver",
-    "lan91c96.drv",
-    lan91c96_init,
-    &lan91c96_icon);
-/*-----------------------------------------------------------------------------------*/
-#if CTK_CONF_ICON_BITMAPS
-static unsigned char lan91c96icon_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 lan91c96icon_textmap[9] = {
-  'I', 'D', 'E',
-  ' ', '6', '4',
-  'E', 'T', 'H'
-};
-#endif /* CTK_CONF_ICON_TEXTMAPS */
-
-static struct ctk_icon lan91c96_icon =
-  {CTK_ICON("ETH64 driver", lan91c96icon_bitmap, lan91c96icon_textmap)};
-/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/eth64-dump-drv.c b/contiki-cpc/contiki-cpc/uip/eth64-dump-drv.c
deleted file mode 100644
index 9adf3aa..0000000
--- a/contiki-cpc/contiki-cpc/uip/eth64-dump-drv.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: eth64-dump-drv.c,v 1.1 2006/04/17 15:11:59 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "lan91c96.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x0d,0x60,0x80,0x3d,0xb9}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": ETH64", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-#include "tcpdump.h"
-#include <string.h>
-#include "ctk.h"
-
-#define DUMP_WIDTH 38
-#define DUMP_HEIGHT 20
-static struct ctk_window window;
-static char dump[DUMP_WIDTH * DUMP_HEIGHT];
-static struct ctk_label dumplabel =
-  {CTK_LABEL(0, 0, DUMP_WIDTH, DUMP_HEIGHT, dump)};
-static void
-dump_packet(void)
-{
-  memcpy(dump, &dump[DUMP_WIDTH], DUMP_WIDTH * (DUMP_HEIGHT - 1));
-  tcpdump_print(&dump[DUMP_WIDTH * (DUMP_HEIGHT - 1)], DUMP_WIDTH);
-  CTK_WIDGET_REDRAW(&dumplabel);
-}
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(tfe_dump_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  lan91c96_send();
-  dump_packet();
-}
-/*---------------------------------------------------------------------------*/
-
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    ctk_window_new(&window, DUMP_WIDTH, DUMP_HEIGHT, "TFE dump");
-    CTK_WIDGET_ADD(&window, &dumplabel);
-    ctk_window_open(&window);
-    uip_setethaddr(addr);
-    lan91c96_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ctk_window_close(&window);
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ctk_window_close(&window);
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = lan91c96_poll();
-  if(uip_len > 0) {
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      dump_packet();
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        lan91c96_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/lan91c96.c b/contiki-cpc/contiki-cpc/uip/lan91c96.c
deleted file mode 100644
index 485b974..0000000
--- a/contiki-cpc/contiki-cpc/uip/lan91c96.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * uIP lan91c96 (smc9194) driver
- * Based on cs8900a driver, copyrighted (c) 2001, by Adam Dunkels
- * Copyright (c) 2003, Josef Soucek
- * All rights reserved.
- *
- * Ethernet card for Commodore 64, based on lan91c96 chip
- * is a device created by IDE64 Project team.
- * More information: http://ide64.come.to
- *
- * 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.
- *
- * $Id: lan91c96.c,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- *
- */
-
-#define UIP_ETHADDR0 0x00
-#define UIP_ETHADDR1 0x0d
-#define UIP_ETHADDR2 0x60
-#define UIP_ETHADDR3 0x80
-#define UIP_ETHADDR4 0x3d
-#define UIP_ETHADDR5 0xb9
-
-#include "lan91c96.h"
-#include "uip.h"
-#include "uip_arp.h"
-
-#include <stdio.h>
-
-// #define DEBUG
-
-#define ETHBASE 0xde10
-
-#define ETHBSR     ETHBASE+0x0e  //Bank select register             R/W (2B)
-
-/* Register bank 0 */
-
-#define ETHTCR     ETHBASE       //Transmition control register     R/W (2B)
-#define ETHEPHSR   ETHBASE+2     //EPH status register              R/O (2B)
-#define ETHRCR     ETHBASE+4     //Receive control register         R/W (2B)
-#define ETHECR     ETHBASE+6     //Counter register                 R/O (2B)
-#define ETHMIR     (ETHBASE+8)     //Memory information register      R/O (2B)
-#define ETHMCR     ETHBASE+0x0a  //Memory Config. reg.    +0 R/W +1 R/O (2B)
-
-/* Register bank 1 */
-
-#define ETHCR      ETHBASE       //Configuration register           R/W (2B)
-#define ETHBAR     ETHBASE+2     //Base address register            R/W (2B)
-#define ETHIAR     ETHBASE+4     //Individual address register      R/W (6B)
-#define ETHGPR     ETHBASE+0x0a  //General address register         R/W (2B)
-#define ETHCTR     ETHBASE+0x0c  //Control register                 R/W (2B)
-
-/* Register bank 2 */
-
-#define ETHMMUCR   ETHBASE       //MMU command register             W/O (1B)
-#define ETHAUTOTX  ETHBASE+1     //AUTO TX start register           R/W (1B)
-#define ETHPNR     ETHBASE+2     //Packet number register           R/W (1B)
-#define ETHARR     ETHBASE+3     //Allocation result register       R/O (1B)
-#define ETHFIFO    ETHBASE+4     //FIFO ports register              R/O (2B)
-#define ETHPTR     ETHBASE+6     //Pointer register                 R/W (2B)
-#define ETHDATA    ETHBASE+8     //Data register                    R/W (4B)
-#define ETHIST     (ETHBASE+0x0c)  //Interrupt status register        R/O (1B)
-#define ETHACK     ETHBASE+0x0c  //Interrupt acknowledge register   W/O (1B)
-#define ETHMSK     ETHBASE+0x0d  //Interrupt mask register          R/W (1B)
-
-/* Register bank 3 */
-
-#define ETHMT      ETHBASE       //Multicast table                  R/W (8B)
-#define ETHMGMT    ETHBASE+8     //Management interface             R/W (2B)
-#define ETHREV     ETHBASE+0x0a  //Revision register                R/W (2B)
-#define ETHERCV    ETHBASE+0x0c  //Early RCV register               R/W (2B)
-
-#define BANK(num) asm("lda #%b",num); asm("sta %w",ETHBSR);
-
-#ifdef DEBUG
-static void print_packet(u8_t *, u16_t);
-#endif
-
-static u8_t packet_status;
-static u16_t packet_length;
-
-extern u16_t uip_len;
-
-
-#pragma optimize(push, off)
-void lan91c96_init(void)
-{
-  /* Check if high byte is 0x33 */
-  asm("lda %w", ETHBSR+1);
-  asm("cmp #$33");
-  asm("beq @L1");
-
-  asm("inc $d021");              // Error
-
-  asm("@L1:");
-
-  /* Reset ETH card */
-  BANK(0);
-  asm("lda #%%10000000");        //Software reset
-  asm("sta %w", ETHRCR+1);
-
-  asm("lda #0");
-  asm("sta %w", ETHRCR);
-  asm("sta %w", ETHRCR+1);
-
-  /* delay */
-  asm("ldx #0");
-  asm("@L2:");
-  asm("cmp ($ff,x)");            //6 cycles
-  asm("cmp ($ff,x)");            //6 cycles
-  asm("dex");                    //2 cycles
-  asm("bne @L2");                //3 cycles
-                                 //17*256=4352 => 4,4 ms
-
-  /* Enable transmit and receive */
-  asm("lda #%%10000001");        //Enable transmit TXENA, PAD_EN
-  asm("sta %w", ETHTCR);
-  asm("lda #%%00000011");        //Enable receive, strip CRC ???
-  asm("sta %w", ETHRCR+1);
-
-  BANK(1);
-  asm("lda %w", ETHCR+1);
-  asm("ora #%%00010000");        //No wait (IOCHRDY)
-  asm("sta %w", ETHCR+1);
-
-  asm("lda #%%00001001");        //Auto release
-  asm("sta %w", ETHCTR+1);
-  
-  /* Set MAC address */
-  asm("lda #%b", (unsigned)UIP_ETHADDR0);
-  asm("sta %w", ETHIAR);
-  asm("lda #%b", (unsigned)UIP_ETHADDR1);
-  asm("sta %w", ETHIAR+1);
-  asm("lda #%b", (unsigned)UIP_ETHADDR2);
-  asm("sta %w", ETHIAR+2);
-  asm("lda #%b", (unsigned)UIP_ETHADDR3);
-  asm("sta %w", ETHIAR+3);
-  asm("lda #%b", (unsigned)UIP_ETHADDR4);
-  asm("sta %w", ETHIAR+4);
-  asm("lda #%b", (unsigned)UIP_ETHADDR5);
-  asm("sta %w", ETHIAR+5);
-
-  BANK(2);
-  asm("lda #%%00001111");               //RCV INT, ALLOC INT, TX INT, TX EMPTY 
-  asm("sta %w", ETHMSK);
-}
-#pragma optimize(pop)
-
-
-#pragma optimize(push, off)
-#if UIP_BUFSIZE > 255
-u16_t lan91c96_poll(void)
-#else
-u8_t lan91c96_poll(void)
-#endif
-{
-  // #######
-//  BANK(0);
-//  printf("RAM: %d ", ((*(unsigned int *)ETHMIR) & 0xff00));
-//  BANK(2);
-  // #######
-
-  asm("lda %w", ETHIST);
-  asm("and #%%00000001");                //RCV INT
-  asm("bne @L1");
-
-  /* No packet available */
-  return 0;
-
-  asm("@L1:");
-
-  #ifdef DEBUG
-  printf("RCV: IRQ\n");
-  #endif
-
-  asm("lda #0");
-  asm("sta %w", ETHPTR);
-  asm("lda #%%11100000");               //RCV,AUTO INCR.,READ
-  asm("sta %w", ETHPTR+1);
-
-  asm("lda %w", ETHDATA);               //Status word
-  asm("lda %w", ETHDATA);
-  asm("sta _packet_status");            //High byte only
-
-  asm("lda %w", ETHDATA);               //Total number of bytes
-  asm("sta _packet_length");
-  asm("lda %w", ETHDATA);
-  asm("sta _packet_length+1");
-
-  /* Last word contain 'last data byte' and 0x60 */
-  /* or 'fill byte' and 0x40 */
-
-  packet_length -= 6;            //The packet contains 3 extra words
-
-  asm("lda _packet_status");
-  asm("and #$10");
-  asm("beq @L2");
-
-  packet_length++;
-
-  #ifdef DEBUG
-  printf("RCV: odd number of bytes\n");
-  #endif
-
-  asm("@L2:");
-                    
-  #ifdef DEBUG
-  printf("RCV: L:%d ST-HIGH:0x%02x ",packet_length,packet_status);
-  #endif
-
-  if (packet_length > UIP_BUFSIZE)
-  {
-    /* Remove and release RX packet from FIFO*/ 
-    asm("lda #%%10000000");
-    asm("sta %w", ETHMMUCR);
-
-    #ifdef DEBUG
-    printf("RCV: UIP_BUFSIZE exceeded - packet dropped!\n");
-    #endif
-
-    return 0;
-  }
-
-  asm("lda #<_uip_buf");
-  asm("sta ptr1");
-  asm("lda #>_uip_buf");
-  asm("sta ptr1+1");
-
-  asm("ldy #0");
-  asm("ldx _packet_length+1");
-  asm("beq @RE1");               //packet_length < 256
-
-  asm("@RL1:");
-  asm("lda %w", ETHDATA);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("bne @RL1");
-  asm("inc ptr1+1");
-  asm("dex");
-  asm("bne @RL1");
-
-  asm("@RE1:");
-  asm("lda %w", ETHDATA);
-  asm("sta (ptr1),y");
-  asm("iny");
-  asm("cpy _packet_length");
-  asm("bne @RE1");
-
-  /* Remove and release RX packet from FIFO*/ 
-  asm("lda #%%10000000");
-  asm("sta %w", ETHMMUCR);
-
-  #ifdef DEBUG
-//  print_packet(uip_buf, packet_length);
-  #endif
-
-  return packet_length;
-}
-#pragma optimize(pop)
-
-/* First 40+14 (IP nad TCP header) is send from uip_buf */
-/* than data from uip_appdata                           */
-
-#pragma optimize(push, off)
-void lan91c96_send(void)
-{
-  #ifdef DEBUG
-  printf("SND: send packet\n");
-  #endif
-
-  #if UIP_BUFSIZE > 255
-  asm("lda _uip_len+1");  
-  #else
-  asm("lda #0");
-  #endif
-  asm("ora #%%00100000");        //Allocate memory for TX
-  asm("sta %w", ETHMMUCR);
-
-  asm("ldx #8");                 //Wait...
-  asm("@L1:");                   //Wait for allocation ready
-  asm("lda %w", ETHIST);
-  asm("and #%%00001000");        //ALLOC INT
-  asm("bne @X1");
-  asm("dex");
-  asm("bne @L1");
-
-    #ifdef DEBUG
-    printf("SND: ERR: memory alloc timeout\n");
-    #endif
-
-    return;
-
-  asm("@X1:");
-  #ifdef DEBUG
-  printf("SND: packet memory allocated\n");
-  #endif
-
-  asm("lda #%%00001000");        //Acknowledge int, is it necessary ???
-  asm("sta %w", ETHACK);
-
-  asm("lda %w", ETHARR);
-  asm("sta %w", ETHPNR);         //Set packet address
-
-  asm("lda #0");
-  asm("sta %w", ETHPTR);
-  asm("lda #%%01000000");        //AUTO INCR.
-  asm("sta %w", ETHPTR+1);
-
-  #ifdef DEBUG
-  printf("SND: L:%d ", uip_len);
-  #endif
-
-  asm("lda #0");                 //Status written by CSMA
-  asm("sta %w", ETHDATA);
-  asm("sta %w", ETHDATA);
-
-  asm("lda _uip_len");
-  asm("and #$01");
-  asm("beq @SD1");
-
-    packet_length=uip_len+5;
-    asm("jmp @LC1");
-
-  asm("@SD1:");
-
-    packet_length=uip_len+6;       //+6 for status word, length and ctl byte
-
-  asm("@LC1:");
-
-//  printf("SND: L:%d ", packet_length);
-
-  asm("lda _packet_length");
-  asm("sta %w", ETHDATA);
-  asm("lda _packet_length+1");
-  asm("sta %w", ETHDATA);
-
-  #ifdef DEBUG
-//  print_packet(uip_buf, uip_len);
-  #endif
-
-  /* Send 40+14=54 bytes of header */
-
-  if(uip_len <= 54) {
-
-    #ifdef DEBUG
-    printf("SND: short packet sent.\n");
-    #endif
-
-    asm("ldx _uip_len");
-    asm("ldy #0");
-    asm("@WL1:");
-    asm("lda _uip_buf,y");
-    asm("sta %w", ETHDATA);
-    asm("iny");
-    asm("dex");
-    asm("bne @WL1");
-
-  } else {
-
-    asm("ldx #54");
-    asm("ldy #0");
-    asm("@WL2:");
-    asm("lda _uip_buf,y");
-    asm("sta %w", ETHDATA);
-    asm("iny");
-    asm("dex");
-    asm("bne @WL2");
-
-    uip_len -= 54;
-
-    asm("lda _uip_appdata");       //uip_appdata is pointer
-    asm("sta ptr1");
-    asm("lda _uip_appdata+1");
-    asm("sta ptr1+1");
-
-    asm("ldy #0");
-    #if UIP_BUFSIZE > 255
-    asm("ldx _uip_len+1");
-    #else
-    asm("ldx #0");
-    #endif
-    asm("beq @RE1");               //packet_length < 256
-
-    asm("@RL1:");
-    asm("lda (ptr1),y");
-    asm("sta %w", ETHDATA);
-    asm("iny");
-    asm("bne @RL1");
-    asm("inc ptr1+1");
-    asm("dex");
-    asm("bne @RL1");
-
-    asm("@RE1:");
-    asm("lda (ptr1),y");
-    asm("sta %w", ETHDATA);
-    asm("iny");
-    asm("cpy _uip_len");
-    asm("bne @RE1");
-
-  }
-
-  asm("lda _uip_len");
-  asm("and #$01");
-  asm("beq @R3");
-
-  asm("lda #%%00100000");
-  asm("sta %w", ETHDATA);        //Control byte
-
-  asm("lda #%%11000000");        //ENQUEUE PACKET - transmit packet
-  asm("sta %w", ETHMMUCR);
-
-//  printf("\n## %02x", *(unsigned char *)ETHIST);
-
-  return;
-
-  asm("@R3:");
-
-  asm("lda #0");
-  asm("sta %w", ETHDATA);        //Fill byte
-  asm("sta %w", ETHDATA);        //Control byte
-
-  asm("lda #%%11000000");        //ENQUEUE PACKET - transmit packet
-  asm("sta %w", ETHMMUCR);
-
-//  printf("\n## %02x\n", *(unsigned char *)ETHIST);
-  return;
-}
-#pragma optimize(pop)
-
-#ifdef DEBUG
-static void print_packet(u8_t *buf, u16_t length)
-{
-  int i;
-  int remainder;
-  int lines;
-  u8_t a;
-  int cur;
-  int address=0;
-
-  printf("\nPacket of length %d \n", length );
-
-  lines = length / 8;
-  remainder = length % 8;
-
-  for ( i = 0; i < lines ; i ++ ) {
-    printf(":%04x ", address=i*8);
-
-    for ( cur = 0; cur < 8; cur ++ ) {
-      a = *(buf ++ );
-      printf("%02x ", a);
-    }
-    printf("\n");
-  }
-
-  printf(":%04x ", address+8);
-
-  for ( i = 0; i < remainder ; i++ ) {
-    a = *(buf ++ );
-    printf("%02x ", a);
-  }
-  printf("\n");
-}
-#endif /* DEBUG */
-
diff --git a/contiki-cpc/contiki-cpc/uip/lan91c96.h b/contiki-cpc/contiki-cpc/uip/lan91c96.h
deleted file mode 100644
index 762a1e4..0000000
--- a/contiki-cpc/contiki-cpc/uip/lan91c96.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 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. Neither the name of the Institute nor the names of its contributors 
- *    may be used to endorse or promote products derived from this software 
- *    without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 operating system.
- * 
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $Id: lan91c96.h,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- */
-
-#ifndef _LAN91C96_H
-#define _LAN91C96_H
-
-#include "uip_arch.h"
-
-void lan91c96_init(void);
-void lan91c96_done(void);
-void lan91c96_send(void);
-#if UIP_BUFSIZE > 255
-u16_t lan91c96_poll(void);
-#else
-u8_t lan91c96_poll(void);
-#endif
-
-/* End of lan91c96.h */
-#endif
-
diff --git a/contiki-cpc/contiki-cpc/uip/rrnet-drv-asm.S b/contiki-cpc/contiki-cpc/uip/rrnet-drv-asm.S
deleted file mode 100644
index 595c00c..0000000
--- a/contiki-cpc/contiki-cpc/uip/rrnet-drv-asm.S
+++ /dev/null
@@ -1,17 +0,0 @@
-
-;---------------------------------------------------------------------       
-	.export		_cs8900a_rxtxreg
-	.export		_cs8900a_txcmd
-	.export		_cs8900a_txlen
-	.export		_cs8900a_packetpp
-	.export		_cs8900a_ppdata
-	
-
-;---------------------------------------------------------------------
-
-	_cs8900a_rxtxreg	= $de08
-	_cs8900a_txcmd		= $de0c
-	_cs8900a_txlen		= $de0e
-	_cs8900a_packetpp	= $de02
-	_cs8900a_ppdata		= $de04
-
diff --git a/contiki-cpc/contiki-cpc/uip/rrnet-drv.c b/contiki-cpc/contiki-cpc/uip/rrnet-drv.c
deleted file mode 100644
index 0e3b4b5..0000000
--- a/contiki-cpc/contiki-cpc/uip/rrnet-drv.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: rrnet-drv.c,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "cs8900a.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x00,0x00,0x64,0x64,0x64}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": RR-net", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(rrnet_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  cs8900a_send();
-}
-/*---------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    uip_setethaddr(addr);
-    asm("lda #1");
-    asm("ora $de01");
-    asm("sta $de01");
-    cs8900a_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = cs8900a_poll();
-  if(uip_len > 0) {
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        cs8900a_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/rrnet-dsc.c b/contiki-cpc/contiki-cpc/uip/rrnet-dsc.c
deleted file mode 100644
index b19135e..0000000
--- a/contiki-cpc/contiki-cpc/uip/rrnet-dsc.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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: rrnet-dsc.c,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- *
- */
-
-#include "dsc.h"
-
-extern struct ctk_icon rrnet_icon;
-/*-----------------------------------------------------------------------------------*/
-DSC(rrnet_dsc,
-    "RR-Net driver",
-    "rrnet.drv",
-    rrnet_init,
-    &rrnet_icon);
-/*-----------------------------------------------------------------------------------*/
-#if CTK_CONF_ICON_BITMAPS
-static unsigned char rrneticon_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 rrneticon_textmap[9] = {
-  'R', 'R', '-',
-  'N', 'e', 't',
-  'D', 'R', 'V'
-};
-#endif /* CTK_CONF_ICON_TEXTMAPS */
-
-static struct ctk_icon rrnet_icon =
-  {CTK_ICON("RR-Net driver", rrneticon_bitmap, rrneticon_textmap)};
-/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/rrnet-dump-drv.c b/contiki-cpc/contiki-cpc/uip/rrnet-dump-drv.c
deleted file mode 100644
index 2863457..0000000
--- a/contiki-cpc/contiki-cpc/uip/rrnet-dump-drv.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: rrnet-dump-drv.c,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "cs8900a.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x00,0x00,0x64,0x64,0x64}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": RR-net", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-#include "tcpdump.h"
-#include <string.h>
-#include "ctk.h"
-
-#define DUMP_WIDTH 38
-#define DUMP_HEIGHT 20
-static struct ctk_window window;
-static char dump[DUMP_WIDTH * DUMP_HEIGHT];
-static struct ctk_label dumplabel =
-  {CTK_LABEL(0, 0, DUMP_WIDTH, DUMP_HEIGHT, dump)};
-static void
-dump_packet(void)
-{
-  memcpy(dump, &dump[DUMP_WIDTH], DUMP_WIDTH * (DUMP_HEIGHT - 1));
-  tcpdump_print(&dump[DUMP_WIDTH * (DUMP_HEIGHT - 1)], DUMP_WIDTH);
-  CTK_WIDGET_REDRAW(&dumplabel);
-}
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(rrnet_dump_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  cs8900a_send();
-  dump_packet();
-}
-/*---------------------------------------------------------------------------*/
-#pragma optimize(push, off)
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    ctk_window_new(&window, DUMP_WIDTH, DUMP_HEIGHT, "RR-Net dump");
-    CTK_WIDGET_ADD(&window, &dumplabel);
-    ctk_window_open(&window);
-    uip_setethaddr(addr);
-    asm("lda #1");
-    asm("ora $de01");
-    asm("sta $de01");
-    cs8900a_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ctk_window_close(&window);
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ctk_window_close(&window);
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-#pragma optimize(pop)
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = cs8900a_poll();
-  if(uip_len > 0) {
-    dump_packet();
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        cs8900a_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/rs232dev-ss.c b/contiki-cpc/contiki-cpc/uip/rs232dev-ss.c
deleted file mode 100644
index f9e900b..0000000
--- a/contiki-cpc/contiki-cpc/uip/rs232dev-ss.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2001, 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 uIP TCP/IP stack.
- *
- * $Id: rs232dev-ss.c,v 1.1 2006/04/17 15:12:00 kthacker Exp $
- *
- */
-
-/*
- * This is a generic implementation of the SLIP protocol over an RS232
- * (serial) device. While initially intented for the C64, the code can
- * easily be ported to other platforms as well.
- *
- * Huge thanks to Ullrich von Bassewitz <uz@cc65.org> of cc65 fame for
- * and endless supply of bugfixes, insightsful comments and
- * suggestions, and improvements to this code!
- */
-
-#include "rs232silversurfer.h"
-#include <time.h>
-#include <string.h>
-
- /* This will include the system specific header files as well */
-#if defined(__CBM__)
-#  include <cbm.h>
-#elif defined(__ATARI__)
-#  include <atari.h>
-#endif
-
-#include "uip.h"
-
-#define SLIP_END     0300
-#define SLIP_ESC     0333
-#define SLIP_ESC_END 0334
-#define SLIP_ESC_ESC 0335
-
-
-#define SIO_RECV(c)  while(rs232_get(&c) == RS_ERR_NO_DATA)
-#define SIO_POLL(c)  (rs232_get(&c) != RS_ERR_NO_DATA)
-#define SIO_SEND(c)  while(rs232_put(c) == RS_ERR_OVERFLOW)
-
-#define MAX_SIZE (UIP_BUFSIZE - UIP_LLH_LEN)
-
-static u8_t slip_buf[MAX_SIZE + 2];
-
-#if MAX_SIZE > 255
-static u16_t len, tmplen;
-#else
-static u8_t len, tmplen;
-#endif /* MAX_SIZE > 255 */
-
-#if 1
-#define printf(x)
-#else
-#include <stdio.h>
-#endif
-
-
-/*-----------------------------------------------------------------------------------*/
-static void
-rs232_err(char err)
-{
-  switch(err) {
-  case RS_ERR_OK:
-    printf("RS232 OK\n");
-    break;
-  case RS_ERR_NOT_INITIALIZED:
-    printf("RS232 not initialized\n");
-    break;
-  case RS_ERR_BAUD_TOO_FAST:
-    printf("RS232 baud too fast\n");
-    break;
-  case RS_ERR_BAUD_NOT_AVAIL:
-    printf("RS232 baud rate not available\n");
-    break;
-  case RS_ERR_NO_DATA:
-    printf("RS232 nothing to read\n");
-    break;
-  case RS_ERR_OVERFLOW:
-    printf("RS232 overflow\n");
-    break;
-  }
-
-}
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_send():
- *
- * Sends the packet in the uip_buf and uip_appdata buffers. The first
- * 40 bytes of the packet (the IP and TCP headers) are read from the
- * uip_buf buffer, and the following bytes (the application data) are
- * read from the uip_appdata buffer.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-rs232dev_send(void)
-{
-#if MAX_SIZE > 255
-  u16_t i;
-#else
-  u8_t i;
-#endif /* MAX_SIZE > 255 */
-  u8_t *ptr;
-  u8_t c;
-
-  SIO_SEND(SLIP_END);
-
-  ptr = &uip_buf[UIP_LLH_LEN];
-  for(i = 0; i < uip_len; ++i) {
-    if(i == 40) {
-      ptr = uip_appdata;
-    }
-    c = *ptr++;
-    switch(c) {
-    case SLIP_END:
-      SIO_SEND(SLIP_ESC);
-      SIO_SEND(SLIP_ESC_END);
-      break;
-    case SLIP_ESC:
-      SIO_SEND(SLIP_ESC);
-      SIO_SEND(SLIP_ESC_ESC);
-      break;
-    default:
-      SIO_SEND(c);
-      break;
-    }
-  }
-  SIO_SEND(SLIP_END);
-}
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_poll():
- *
- * Read all avaliable bytes from the RS232 interface into the slip_buf
- * buffer. If no more bytes are avaliable, it returns with 0 to
- * indicate that no packet was immediately ready. When a full packet
- * has been read into the buffer, the packet is copied into the
- * uip_buf buffer and the length of the packet is returned.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-#if MAX_SIZE > 255
-u16_t
-#else 
-u8_t
-#endif /* MAX_SIZE > 255 */
-rs232dev_poll(void)
-{
-  u8_t c;
-  static u8_t lastc;
-  
-  while(SIO_POLL(c)) {
-    /*    printf("c %x\n", c);*/
-    switch(c) {
-    case SLIP_ESC:
-      lastc = c;
-      break;
-      
-    case SLIP_END:
-      lastc = c;
-      /* End marker found, we copy our input buffer to the uip_buf
-	 buffer and return the size of the packet we copied. */
-      memcpy(&uip_buf[UIP_LLH_LEN], slip_buf, len);
-      tmplen = len;
-      len = 0;
-      return tmplen;
-      
-    default:     
-      if(lastc == SLIP_ESC) {
-	lastc = c;
-	/* Previous read byte was an escape byte, so this byte will be
-	   interpreted differently from others. */
-	switch(c) {
-	case SLIP_ESC_END:
-	  c = SLIP_END;
-	  break;
-	case SLIP_ESC_ESC:
-	  c = SLIP_ESC;
-	  break;
-	}
-      } else {
-	lastc = c;
-      }
-      
-      
-      slip_buf[len] = c;
-      ++len;
-      
-      if(len > MAX_SIZE) {
-	len = 0;
-      }
-    
-      break;
-    }
-  }
-  return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_init():
- *
- * Initializes the RS232 device and sets the parameters of the device.
- *
- */ 
-/*-----------------------------------------------------------------------------------*/
-void
-rs232dev_init(void)
-{
-  char err;
-  
-  err = rs232_init(0);
-  rs232_err(err);
-  err = rs232_params(RS_BAUD_9600 | RS_BITS_8 | RS_STOP_1, RS_PAR_NONE);
-  rs232_err(err);
-
-  len = 0;
-
-  return;
-}
-/*-----------------------------------------------------------------------------------*/
-
diff --git a/contiki-cpc/contiki-cpc/uip/rs232dev.c b/contiki-cpc/contiki-cpc/uip/rs232dev.c
deleted file mode 100644
index cc89d52..0000000
--- a/contiki-cpc/contiki-cpc/uip/rs232dev.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2001, 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 uIP TCP/IP stack.
- *
- * $Id: rs232dev.c,v 1.1 2006/04/17 15:12:01 kthacker Exp $
- *
- */
-
-/*
- * This is a generic implementation of the SLIP protocol over an RS232
- * (serial) device. While initially intented for the C64, the code can
- * easily be ported to other platforms as well.
- *
- * Huge thanks to Ullrich von Bassewitz <uz@cc65.org> of cc65 fame for
- * and endless supply of bugfixes, insightsful comments and
- * suggestions, and improvements to this code!
- */
-
-#include <serial.h>
-#include <time.h>
-#include <string.h>
-
- /* This will include the system specific header files as well */
-#if defined(__CBM__)
-#  include <cbm.h>
-#elif defined(__ATARI__)
-#  include <atari.h>
-#endif
-
-#include "uip.h"
-
-#define SLIP_END     0300
-#define SLIP_ESC     0333
-#define SLIP_ESC_END 0334
-#define SLIP_ESC_ESC 0335
-
-
-#define SIO_RECV(c)  while(ser_get(&c) == SER_ERR_NO_DATA)
-#define SIO_POLL(c)  (ser_get(&c) != SER_ERR_NO_DATA)
-#define SIO_SEND(c)  ser_put(c)
-
-#define MAX_SIZE (UIP_BUFSIZE - UIP_LLH_LEN)
-
-static u8_t slip_buf[MAX_SIZE + 2];
-
-static u16_t len, tmplen;
-
-static char loaded = 0;
-
-#if 1
-#define printf(x)
-#else
-#include <stdio.h>
-#endif
-
-
-/*-----------------------------------------------------------------------------------*/
-/*static void
-rs232_err(char err)
-{
-  switch(err) {
-  case RS_ERR_OK:
-    printf("RS232 OK\n");
-    break;
-  case RS_ERR_NOT_INITIALIZED:
-    printf("RS232 not initialized\n");
-    break;
-  case RS_ERR_BAUD_TOO_FAST:
-    printf("RS232 baud too fast\n");
-    break;
-  case RS_ERR_BAUD_NOT_AVAIL:
-    printf("RS232 baud rate not available\n");
-    break;
-  case RS_ERR_NO_DATA:
-    printf("RS232 nothing to read\n");
-    break;
-  case RS_ERR_OVERFLOW:
-    printf("RS232 overflow\n");
-    break;
-  }
-}*/
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_send():
- *
- * Sends the packet in the uip_buf and uip_appdata buffers. The first
- * 40 bytes of the packet (the IP and TCP headers) are read from the
- * uip_buf buffer, and the following bytes (the application data) are
- * read from the uip_appdata buffer.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-void
-rs232dev_send(void)
-{
-  u16_t i;
-  u8_t *ptr;
-  u8_t c;
-  
-  SIO_SEND(SLIP_END);
-
-  ptr = &uip_buf[UIP_LLH_LEN];
-  for(i = 0; i < uip_len; ++i) {
-    if(i == 40) {
-      ptr = uip_appdata;
-    }
-    c = *ptr++;
-    switch(c) {
-    case SLIP_END:
-      SIO_SEND(SLIP_ESC);
-      SIO_SEND(SLIP_ESC_END);
-      break;
-    case SLIP_ESC:
-      SIO_SEND(SLIP_ESC);
-      SIO_SEND(SLIP_ESC_ESC);
-      break;
-    default:
-      SIO_SEND(c);
-      break;
-    }
-  }
-  SIO_SEND(SLIP_END);
-}
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_poll():
- *
- * Read all avaliable bytes from the RS232 interface into the slip_buf
- * buffer. If no more bytes are avaliable, it returns with 0 to
- * indicate that no packet was immediately ready. When a full packet
- * has been read into the buffer, the packet is copied into the
- * uip_buf buffer and the length of the packet is returned.
- *
- */
-/*-----------------------------------------------------------------------------------*/
-u16_t
-rs232dev_poll(void)
-{
-  u8_t c;
-  static u8_t lastc;
-  
-  if(loaded == 0) {
-    return 0;
-  }
-  
-  while(SIO_POLL(c)) {
-
-    switch(c) {
-    case SLIP_ESC:
-      lastc = c;
-      break;
-      
-    case SLIP_END:
-      lastc = c;
-      /* End marker found, we copy our input buffer to the uip_buf
-	 buffer and return the size of the packet we copied. */
-      memcpy(&uip_buf[UIP_LLH_LEN], slip_buf, len);
-      tmplen = len;
-      len = 0;
-      return tmplen;
-      
-    default:     
-      if(lastc == SLIP_ESC) {
-	lastc = c;
-	/* Previous read byte was an escape byte, so this byte will be
-	   interpreted differently from others. */
-	switch(c) {
-	case SLIP_ESC_END:
-	  c = SLIP_END;
-	  break;
-	case SLIP_ESC_ESC:
-	  c = SLIP_ESC;
-	  break;
-	}
-      } else {
-	lastc = c;
-      }
-            
-      slip_buf[len] = c;
-      ++len;
-      
-      if(len > MAX_SIZE) {
-	len = 0;
-      }
-    
-      break;
-    }
-  }
-  return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-/*
- * rs232dev_init():
- *
- * Initializes the RS232 device and sets the parameters of the device.
- *
- */ 
-/*-----------------------------------------------------------------------------------*/
-void
-rs232dev_init(void)
-{
-  char err;
-  struct ser_params p;
-  
-  err = ser_load_driver("c64-swlink.ser");
-
-  if(err != SER_ERR_OK) {
-    asm("inc $d020");
-    return;
-  }
-  
-  p.baudrate = SER_BAUD_9600;
-  p.databits = SER_BITS_8;
-  p.stopbits = SER_STOP_1;
-  p.parity = SER_PAR_NONE;
-  p.handshake = SER_HS_HW;
-
-  err = ser_open(&p);
-
-  if(err != SER_ERR_OK) {
-    asm("inc $d020");
-    return;
-  }
-  
-
-  loaded = 1;
-  
-  /*  err = rs232_init(0); */
-  /*  rs232_err(err);*/
-  /*  err = rs232_params(RS_BAUD_9600 | RS_BITS_8 | RS_STOP_1, RS_PAR_NONE);*/
-  /*  rs232_err(err);*/
-
-  len = 0;
-
-  return;
-}
-/*-----------------------------------------------------------------------------------*/
-void
-rs232dev_unload(void)
-{
-  if(loaded){
-    ser_unload();
-  }
-}
-/*-----------------------------------------------------------------------------------*/
-
diff --git a/contiki-cpc/contiki-cpc/uip/rs232dev.h b/contiki-cpc/contiki-cpc/uip/rs232dev.h
deleted file mode 100644
index ddce6ef..0000000
--- a/contiki-cpc/contiki-cpc/uip/rs232dev.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2001, 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 uIP TCP/IP stack.
- *
- * $Id: rs232dev.h,v 1.1 2006/04/17 15:12:01 kthacker Exp $
- *
- */
-
-#ifndef __RS232DEV_H__
-#define __RS232DEV_H__
-
-#include "uip.h"
-
-void rs232dev_init(void);
-u8_t rs232dev_read(void);
-void rs232dev_send(void);
-
-u16_t rs232dev_poll(void);
-
-void rs232dev_unload(void);
-
-#endif /* __RS232DEV_H__ */
diff --git a/contiki-cpc/contiki-cpc/uip/rs232silversurfer.S b/contiki-cpc/contiki-cpc/uip/rs232silversurfer.S
deleted file mode 100644
index 89bbf9d..0000000
--- a/contiki-cpc/contiki-cpc/uip/rs232silversurfer.S
+++ /dev/null
@@ -1,329 +0,0 @@
-	;; The following code is written and is copyrighted by
-	;; Groepaz/Hitmen
-
-	;; Small changes by Adam Dunkels (renamed ss232 -> rs232)
-	
-;----------------------------------------------------------------------------------------------
-; silver surfer polling mode driver for cc65
-; - work from here to create a full featured driver with interupts.
-; gpz fixed 20020828: fatal bug fixed in _rs232_params
-;----------------------------------------------------------------------------------------------
-
-rs16550base             = $de08
-
-fifo_rxd     = rs16550base+$00 ;8  (r)
-fifo_txd     = rs16550base+$00 ;8 (w)
-
-fifo_dll     = rs16550base+$00 ;8 (r/w)
-fifo_dlm     = rs16550base+$01 ;9 (r/w)
-
-fifo_ier     = rs16550base+$01 ;9
-
-fifo_fcr     = rs16550base+$02 ;a (w)
-fifo_iir     = rs16550base+$02 ;a (r)
-fifo_lcr     = rs16550base+$03 ;b
-fifo_mcr     = rs16550base+$04 ;c
-fifo_lsr     = rs16550base+$05 ;d
-fifo_msr     = rs16550base+$06 ;e (r)
-fifo_scratch = rs16550base+$07 ;f (r/w)
-	
-
-
-                        .export _rs232_init
-                        .export _rs232_done
-                        .export _rs232_params
-                        .export _rs232_put
-                        .export _rs232_get
-
-                        .importzp ptr1, ptr2
-                        .import   popa, popax
-
-;----------------------------------------------------------------------------------------------
-; Error codes. Beware: The codes must match the codes in the C header file
-
-ErrNotInitialized       = $01
-ErrBaudTooFast    	= $02
-ErrBaudNotAvail   	= $03
-ErrNoData         	= $04
-ErrOverflow       	= $05
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_init (char hacked);
-;/* Initialize the serial port, install the interrupt handler. The parameter
-; * has no effect for now and should be set to 0.
-; */
-;----------------------------------------------------------------------------------------------
-
-         .code
-
-_rs232_init:
-         ; enable ssurfer-port
-         lda $de01
-         ora #$01
-         sta $de01
-
-         ; disable nmi's from ssurfer
-         lda #%00000000
-         sta fifo_ier
-
-         ; activate dtr
-         lda #%00000001
-         sta fifo_mcr
-
-         lda #$00       ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_done (void);
-;/* Close the port, deinstall the interrupt hander. You MUST call this function
-; * before terminating the program, otherwise the machine may crash later. If
-; * in doubt, install an exit handler using atexit(). The function will do
-; * nothing, if it was already called.
-; */
-;----------------------------------------------------------------------------------------------
-
-_rs232_done:
-         ; disable nmi's from ssurfer
-         lda #%00000000
-         sta fifo_ier
-
-         ; deactivate dtr
-         sta fifo_mcr
-
-         ; disable ssurfer-port
-         lda $de01
-         and #$fe
-         sta $de01
-
-         lda #$00       ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_params (unsigned char params, unsigned char parity);
-;/* Set the port parameters. Use a combination of the #defined values above. */
-;----------------------------------------------------------------------------------------------
-
-         .data
-
-_rs232_baudrates:
-
-         .word          (7372800 / (      50 * 16))
-         .word          (7372800 / (     110 * 16))
-         .word          (7372800 / (     269 *  8))
-         .word          (7372800 / (     300 * 16))
-         .word          (7372800 / (     600 * 16))
-         .word          (7372800 / (    1200 * 16))
-         .word          (7372800 / (    2400 * 16))
-         .word          (7372800 / (    4800 * 16))
-         .word          (7372800 / (    9600 * 16))
-         .word          (7372800 / (   19200 * 16))
-         .word          (7372800 / (   38400 * 16))
-         .word          (7372800 / (   57600 * 16))
-         .word          (7372800 / (  115200 * 16))
-         .word          (7372800 / (  230400 * 16))
-
-         .bss
-
-_rs232_tmp1:
-         .res 1
-
-         .code
-
-_rs232_params:
-
-         sta _rs232_tmp1 ; save parity
-
-         ; reset fifo
-         lda #%10000111
-         sta fifo_fcr
-
-   ; that delay thing really needed ?!
-   ; (original datasheet mentions a delay here)
-   ;      ldy #$00
-   ;      dey
-   ;      bny *-1
-
-         ; set dlab
-         lda #%10000011 ; we assmume 8n1
-         sta fifo_lcr
-
-         jsr popa
-         tay             ; save param
-
-         ; set baudrate
-         clc
-         lsr a		
-         lsr a
-         lsr a
-         lsr a
-         asl a
-         tax
-         lda _rs232_baudrates,x
-         sta fifo_dll
-         lda _rs232_baudrates+1,x
-         sta fifo_dlm
-
-         tya             ; param
-         and #$0f
-         ora _rs232_tmp1 ; parity
-
-         ; reset dlab
-         sta fifo_lcr
-
-         lda #$00       ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-; check if byte available, returns AKKU=0 if none
-
-ss_getlsr:
-         lda fifo_lsr
-         and #$01
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_get (char* b);
-;/* Get a character from the serial port. If no characters are available, the
-; * function will return RS_ERR_NO_DATA, so this is not a fatal error.
-; */
-;----------------------------------------------------------------------------------------------
-; get byte (non blocking, returns byte in A or CARRY=1 - error)
-
-_rs232_get:
-         sta ptr1
-         stx ptr1+1
-
-         jsr ss_getlsr  ; check if byte available
-;         bne sk32 ; yes
-         bne sk33 ; yes
-
-         ; activate rts
-         lda #%00000011
-         sta fifo_mcr
-sk32:
-
-         ; deactivate rts
-;         lda #%00000001
-;         sta fifo_mcr
-
-	 jsr ss_getlsr  ; check if byte available
-         bne sk33 ; yes
-
-         ; deactivate rts
-         lda #%00000001
-         sta fifo_mcr
-
-         lda #ErrNoData      ; no data
-         ldx #0
-         rts
-sk33:
-         ; deactivate rts
-         lda #%00000001
-         sta fifo_mcr
-
-         ; get byte
-         ldy #$00
-         lda fifo_rxd
-         sta (ptr1),y
-
-         lda #0      ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_put (char b);
-;/* Send a character via the serial port. There is a transmit buffer, but
-; * transmitting is not done via interrupt. The function returns
-; * RS_ERR_OVERFLOW if there is no space left in the transmit buffer.
-; */
-;----------------------------------------------------------------------------------------------
-
-_rs232_put:
-         tax
-         ; transmit buf ready?
-         lda fifo_lsr
-         and #%00100000
-         bne @sk1
-@sk2:
-         lda #ErrOverflow       ; overflow
-         ldx #$00
-         rts
-@sk1:
-         ; reciever ready?
-         lda fifo_msr
-         and #%00010000
-         beq @sk2
-
-         stx fifo_txd
-
-         lda #$00               ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_pause (void);
-;/* Assert flow control and disable interrupts. */
-;----------------------------------------------------------------------------------------------
-
-_rs232_pause:
-         ; activate rts
-         lda #%00000011
-         sta fifo_mcr
-
-         lda #$00       ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_unpause (void);
-;/* Re-enable interrupts and release flow control */
-;----------------------------------------------------------------------------------------------
-
-_rs232_unpause:
-         ; deactivate rts
-         lda #%00000001
-         sta fifo_mcr
-
-         lda #$00       ; ok
-         tax
-         rts
-
-;----------------------------------------------------------------------------------------------
-;unsigned char __fastcall__ rs232_status (unsigned char* status,
-;                                         unsigned char* errors);
-;/* Return the serial port status. */
-;----------------------------------------------------------------------------------------------
-
-_rs232_status:
- 	sta    	ptr2
- 	stx    	ptr2+1
- 	jsr    	popax
- 	sta    	ptr1
- 	stx    	ptr1+1
-
-        ldy     #$00
-
-        ; Get status
-        lda     fifo_iir
-        and     #%00000001
-        sta     _rs232_tmp1
-        lda     fifo_msr
-        lsr     a
-        and     #%01010000
-        ora     _rs232_tmp1
-        sta     _rs232_tmp1
-        lda     fifo_lsr
-        and     #%00101110
-        ora     _rs232_tmp1
- 	sta    	(ptr1),y
-
-        ; Get errors
-        lda     #$00    ; ok
-       	sta    	(ptr2),y
-
-        lda     #$00    ; ok
-        tax
-        rts
diff --git a/contiki-cpc/contiki-cpc/uip/rs232silversurfer.h b/contiki-cpc/contiki-cpc/uip/rs232silversurfer.h
deleted file mode 100644
index 9e9a49f..0000000
--- a/contiki-cpc/contiki-cpc/uip/rs232silversurfer.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2003, Groepaz/Hitmen.
- * 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.  
- *
- * rs232silversurfer.h
- *
- * Groepaz/Hitmen, 16.12.2001
- *
- * This defines for the SilverSurver (16c550 UART) what Ullrichs rs232 module
- * defines for the Swithlink/Turbo232
- *
- * this driver operates in polling mode only atm !
- *
- */
-
-#ifndef _RS232silversurfer_H
-#define _RS232silversurfer_H
-
-/*****************************************************************************/
-/*                   Data                                                    */
-/*****************************************************************************/
-
-/* Baudrate settings */
-#define RS_BAUD_50                0x00
-#define RS_BAUD_110               0x10
-#define RS_BAUD_134_5             0x20
-#define RS_BAUD_300               0x30
-#define RS_BAUD_600               0x40
-#define RS_BAUD_1200              0x50
-#define RS_BAUD_2400              0x60
-#define RS_BAUD_4800              0x70
-#define RS_BAUD_9600              0x80
-#define RS_BAUD_19200             0x90
-#define RS_BAUD_38400             0xa0
-#define RS_BAUD_57600             0xb0
-#define RS_BAUD_115200            0xc0
-#define RS_BAUD_230400            0xd0
-
-/* Stop bit settings */
-#define RS_STOP_1      	       		0x00
-#define RS_STOP_2      	       		0x04
-
-/* Data bit settings */
-#define RS_BITS_5      	       		0x00
-#define RS_BITS_6      	       		0x01
-#define RS_BITS_7      	       		0x02
-#define RS_BITS_8      	       		0x03
-
-/* Parity settings */
-#define RS_PAR_NONE    	       		0x00
-#define RS_PAR_ODD     	       		0x28
-#define RS_PAR_EVEN    	       		0x38
-#define RS_PAR_MARK    	       		0x48
-#define RS_PAR_SPACE   	       		0x48
-
-/* Bit masks to mask out things from the status returned by rs232_status */
-#define RS_STATUS_IRQ                   0x01    /* (iir) IRQ condition */
-#define RS_STATUS_OVERRUN               0x02    /* (lsr) Overrun error */
-#define RS_STATUS_PE                    0x04    /* (lsr) Parity error */
-#define RS_STATUS_FE                    0x08    /* (lsr) Framing error */
-#define RS_STATUS_DSR                   0x10    /* (msr>>1) NOT data set ready */
-#define RS_STATUS_THRE                  0x20    /* (lsr) Transmit holding reg. empty */
-#define RS_STATUS_DCD                   0x40    /* (msr>>1) NOT data carrier detect */
-#define RS_STATUS_RDRF                  0x80    /* Receiver data register full */
-
-/* Error codes returned by all functions */
-#define RS_ERR_OK                       0x00    /* Not an error - relax */
-#define RS_ERR_NOT_INITIALIZED 		0x01   	/* Module not initialized */
-#define RS_ERR_BAUD_TOO_FAST            0x02    /* Cannot handle baud rate */
-#define RS_ERR_BAUD_NOT_AVAIL           0x03    /* Baud rate not available */
-#define RS_ERR_NO_DATA                  0x04    /* Nothing to read */
-#define RS_ERR_OVERFLOW                 0x05    /* No room in send buffer */
-
-/*****************************************************************************/
-/*				     Code			                                               	     */
-/*****************************************************************************/
-
-unsigned char __fastcall__ rs232_init (char hacked);
-/* Initialize the serial port, install the interrupt handler. The parameter
- * has no effect for now and should be set to 0.
- */
-
-unsigned char __fastcall__ rs232_params (unsigned char params, unsigned char parity);
-/* Set the port parameters. Use a combination of the #defined values above. */
-
-unsigned char __fastcall__ rs232_done (void);
-/* Close the port, deinstall the interrupt hander. You MUST call this function
- * before terminating the program, otherwise the machine may crash later. If
- * in doubt, install an exit handler using atexit(). The function will do
- * nothing, if it was already called.
- */
-
-unsigned char __fastcall__ rs232_get (char* b);
-/* Get a character from the serial port. If no characters are available, the
- * function will return RS_ERR_NO_DATA, so this is not a fatal error.
- */
-
-unsigned char __fastcall__ rs232_put (char b);
-/* Send a character via the serial port. There is a transmit buffer, but
- * transmitting is not done via interrupt. The function returns
- * RS_ERR_OVERFLOW if there is no space left in the transmit buffer.
- */
-
-unsigned char __fastcall__ rs232_pause (void);
-/* Assert flow control and disable interrupts. */
-
-unsigned char __fastcall__ rs232_unpause (void);
-/* Re-enable interrupts and release flow control */
-
-unsigned char __fastcall__ rs232_status (unsigned char* status,
-					 unsigned char* errors);
-/* Return the serial port status. */
-
-/* End of rs232silversurfer.h */
-#endif
-
-
-
diff --git a/contiki-cpc/contiki-cpc/uip/slip-drv.c b/contiki-cpc/contiki-cpc/uip/slip-drv.c
deleted file mode 100644
index dc37f1b..0000000
--- a/contiki-cpc/contiki-cpc/uip/slip-drv.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 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 OS
- *
- * $Id: slip-drv.c,v 1.1 2006/04/17 15:12:01 kthacker Exp $
- *
- */
-
-#include "contiki.h"
-#include "rs232dev.h"
-
-#include "packet-service.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": SLIP", EK_PRIO_HIGH,
-	   eventhandler, pollhandler, (void *)&state);
-
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(tapdev_service_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  rs232dev_send();
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    rs232dev_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, NULL);
-    rs232dev_unload();
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    rs232dev_unload();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{  
-  uip_len = rs232dev_poll();
-  if(uip_len > 0) {
-    tcpip_input();
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/slip-dsc.c b/contiki-cpc/contiki-cpc/uip/slip-dsc.c
deleted file mode 100644
index 2cf7720..0000000
--- a/contiki-cpc/contiki-cpc/uip/slip-dsc.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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: slip-dsc.c,v 1.1 2006/04/17 15:12:02 kthacker Exp $
- *
- */
-
-#include "dsc.h"
-
-extern struct ctk_icon slip_icon;
-/*-----------------------------------------------------------------------------------*/
-DSC(slip_dsc,
-    "SLIP driver",
-    "slip.drv",
-    slip_init,
-    &slip_icon);
-/*-----------------------------------------------------------------------------------*/
-#if CTK_CONF_ICON_BITMAPS
-static unsigned char slipicon_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 slipicon_textmap[9] = {
-  'R', 'S', ' ',
-  '2', '3', '2',
-  '/', 'I', 'P'
-};
-#endif /* CTK_CONF_ICON_TEXTMAPS */
-
-static struct ctk_icon slip_icon =
-  {CTK_ICON("SLIP driver", slipicon_bitmap, slipicon_textmap)};
-/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/slip-dump-drv.c b/contiki-cpc/contiki-cpc/uip/slip-dump-drv.c
deleted file mode 100644
index 4741e74..0000000
--- a/contiki-cpc/contiki-cpc/uip/slip-dump-drv.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 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 OS
- *
- * $Id: slip-dump-drv.c,v 1.1 2006/04/17 15:12:02 kthacker Exp $
- *
- */
-
-#include "contiki.h"
-#include "rs232dev.h"
-
-#include "packet-service.h"
-
-#include "tcpdump.h"
-#include <string.h>
-#include "ctk.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": SLIP", EK_PRIO_HIGH,
-	   eventhandler, pollhandler, (void *)&state);
-
-#define DUMP_WIDTH 38
-#define DUMP_HEIGHT 20
-static struct ctk_window window;
-static char dump[DUMP_WIDTH * DUMP_HEIGHT];
-static struct ctk_label dumplabel =
-  {CTK_LABEL(0, 0, DUMP_WIDTH, DUMP_HEIGHT, dump)};
-static void
-dump_packet(void)
-{
-  memcpy(dump, &dump[DUMP_WIDTH], DUMP_WIDTH * (DUMP_HEIGHT - 1));
-  tcpdump_print(&dump[DUMP_WIDTH * (DUMP_HEIGHT - 1)], DUMP_WIDTH);
-  CTK_WIDGET_REDRAW(&dumplabel);
-}
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(slip_service_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  rs232dev_send();
-  dump_packet();
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    ctk_window_new(&window, DUMP_WIDTH, DUMP_HEIGHT, "SLIP dump");
-    CTK_WIDGET_ADD(&window, &dumplabel);
-    ctk_window_open(&window);
-    rs232dev_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ctk_window_close(&window);
-    ek_replace((struct ek_proc *)data, NULL);
-    rs232dev_unload();
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ctk_window_close(&window);
-    ek_exit();
-    rs232dev_unload();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{  
-  uip_len = rs232dev_poll();
-  if(uip_len > 0) {
-    dump_packet();
-    tcpip_input();
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/tfe-drv-asm.S b/contiki-cpc/contiki-cpc/uip/tfe-drv-asm.S
deleted file mode 100644
index d31c320..0000000
--- a/contiki-cpc/contiki-cpc/uip/tfe-drv-asm.S
+++ /dev/null
@@ -1,17 +0,0 @@
-
-;---------------------------------------------------------------------       
-	.export		_cs8900a_rxtxreg
-	.export		_cs8900a_txcmd
-	.export		_cs8900a_txlen
-	.export		_cs8900a_packetpp
-	.export		_cs8900a_ppdata
-	
-
-;---------------------------------------------------------------------
-
-	_cs8900a_rxtxreg	= $de00
-	_cs8900a_txcmd		= $de04
-	_cs8900a_txlen		= $de06
-	_cs8900a_packetpp	= $de0a
-	_cs8900a_ppdata		= $de0c
-
diff --git a/contiki-cpc/contiki-cpc/uip/tfe-drv.c b/contiki-cpc/contiki-cpc/uip/tfe-drv.c
deleted file mode 100644
index ea807ac..0000000
--- a/contiki-cpc/contiki-cpc/uip/tfe-drv.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: tfe-drv.c,v 1.1 2006/04/17 15:12:02 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "cs8900a.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x0d,0x60,0x64,0x64,0x64}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": TFE", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(tfe_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  cs8900a_send();
-}
-/*---------------------------------------------------------------------------*/
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    uip_setethaddr(addr);
-    cs8900a_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = cs8900a_poll();
-  if(uip_len > 0) {
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        cs8900a_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/tfe-dsc.c b/contiki-cpc/contiki-cpc/uip/tfe-dsc.c
deleted file mode 100644
index 24d9314..0000000
--- a/contiki-cpc/contiki-cpc/uip/tfe-dsc.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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: tfe-dsc.c,v 1.1 2006/04/17 15:12:02 kthacker Exp $
- *
- */
-
-#include "dsc.h"
-
-extern struct ctk_icon tfe_icon;
-/*-----------------------------------------------------------------------------------*/
-DSC(tfe_dsc,
-    "The Final Ethernet driver",
-    "tfe.drv",
-    tfe_init,
-    &tfe_icon);
-/*-----------------------------------------------------------------------------------*/
-#if CTK_CONF_ICON_BITMAPS
-static unsigned char tfeicon_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 tfeicon_textmap[9] = {
-  'T', 'C', 'P',
-  '/', 'I', 'P',
-  'T', 'F', 'E'
-};
-#endif /* CTK_CONF_ICON_TEXTMAPS */
-
-static struct ctk_icon tfe_icon =
-  {CTK_ICON("TFE driver", tfeicon_bitmap, tfeicon_textmap)};
-/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/tfe-dump-drv.c b/contiki-cpc/contiki-cpc/uip/tfe-dump-drv.c
deleted file mode 100644
index e572909..0000000
--- a/contiki-cpc/contiki-cpc/uip/tfe-dump-drv.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2001-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 uIP TCP/IP stack.
- *
- * $Id: tfe-dump-drv.c,v 1.1 2006/04/17 15:12:02 kthacker Exp $
- *
- */
-
-#include "packet-service.h"
-
-#include "cs8900a.h"
-
-#include "uip_arp.h"
-
-static void output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen);
-
-static const struct uip_eth_addr addr =
-  {{0x00,0x00,0x00,0x64,0x64,0x64}};
-
-static const struct packet_service_state state =
-  {
-    PACKET_SERVICE_VERSION,
-    output
-  };
-
-EK_EVENTHANDLER(eventhandler, ev, data);
-EK_POLLHANDLER(pollhandler);
-EK_PROCESS(proc, PACKET_SERVICE_NAME ": TFE", EK_PRIO_NORMAL,
-	   eventhandler, pollhandler, (void *)&state);
-
-#include "tcpdump.h"
-#include <string.h>
-#include "ctk.h"
-
-#define DUMP_WIDTH 38
-#define DUMP_HEIGHT 20
-static struct ctk_window window;
-static char dump[DUMP_WIDTH * DUMP_HEIGHT];
-static struct ctk_label dumplabel =
-  {CTK_LABEL(0, 0, DUMP_WIDTH, DUMP_HEIGHT, dump)};
-static void
-dump_packet(void)
-{
-  memcpy(dump, &dump[DUMP_WIDTH], DUMP_WIDTH * (DUMP_HEIGHT - 1));
-  tcpdump_print(&dump[DUMP_WIDTH * (DUMP_HEIGHT - 1)], DUMP_WIDTH);
-  CTK_WIDGET_REDRAW(&dumplabel);
-}
-/*---------------------------------------------------------------------------*/
-LOADER_INIT_FUNC(tfe_dump_drv_init, arg)
-{
-  arg_free(arg);
-  ek_service_start(PACKET_SERVICE_NAME, &proc);
-}
-/*---------------------------------------------------------------------------*/
-static void
-output(u8_t *hdr, u16_t hdrlen, u8_t *data, u16_t datalen)
-{
-  uip_arp_out();
-  cs8900a_send();
-  dump_packet();
-}
-/*---------------------------------------------------------------------------*/
-
-EK_EVENTHANDLER(eventhandler, ev, data)
-{
-  switch(ev) {
-  case EK_EVENT_INIT:
-  case EK_EVENT_REPLACE:
-    ctk_window_new(&window, DUMP_WIDTH, DUMP_HEIGHT, "TFE dump");
-    CTK_WIDGET_ADD(&window, &dumplabel);
-    ctk_window_open(&window);
-    uip_setethaddr(addr);
-    cs8900a_init();
-    break;
-  case EK_EVENT_REQUEST_REPLACE:
-    ctk_window_close(&window);
-    ek_replace((struct ek_proc *)data, NULL);
-    LOADER_UNLOAD();
-    break;
-  case EK_EVENT_REQUEST_EXIT:
-    ctk_window_close(&window);
-    ek_exit();
-    LOADER_UNLOAD();
-    break;
-  default:
-    break;
-  }
-}
-
-/*---------------------------------------------------------------------------*/
-EK_POLLHANDLER(pollhandler)
-{
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-  
-  /* Poll Ethernet device to see if there is a frame avaliable. */
-  uip_len = cs8900a_poll();
-  if(uip_len > 0) {
-    dump_packet();
-    /* A frame was avaliable (and is now read into the uip_buf), so
-       we process it. */
-    if(BUF->type == HTONS(UIP_ETHTYPE_IP)) {
-      uip_arp_ipin();
-      uip_len -= sizeof(struct uip_eth_hdr);
-      tcpip_input();
-    } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) {
-      uip_arp_arpin();
-      /* If the above function invocation resulted in data that
-         should be sent out on the network, the global variable
-         uip_len is set to a value > 0. */
-      if(uip_len > 0) {
-        cs8900a_send();
-      }
-    }
-  }
-
-}
-/*---------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/uip_arch.c b/contiki-cpc/contiki-cpc/uip/uip_arch.c
deleted file mode 100644
index 3e07ef1..0000000
--- a/contiki-cpc/contiki-cpc/uip/uip_arch.c
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 2001, 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 uIP TCP/IP stack.
- *
- * $Id: uip_arch.c,v 1.1 2006/04/17 15:12:03 kthacker Exp $
- *
- */
-
-
-#include "uip.h"
-#include "uip_arch.h"
-
-#define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define IP_PROTO_TCP    6
-#define IP_PROTO_UDP    17
-
-/*-----------------------------------------------------------------------------------*/
-/*#pragma optimize(push, off) */
-void
-uip_add32(u8_t *op32, u16_t op16)
-{
-#if 0
-  asm("ldy #3");
-  asm("jsr ldaxysp");
-  asm("sta ptr1");
-  asm("stx ptr1+1");
-  asm("ldy #0");
-  asm("lda (sp),y");
-  asm("ldy #3");
-  asm("clc");
-  asm("adc (ptr1),y");
-  asm("sta _uip_acc32+3");
-  asm("dey");
-  asm("lda (ptr1),y");
-  asm("ldy #1");
-  asm("adc (sp),y");
-  asm("sta _uip_acc32+2");
-  asm("ldy #1");
-  asm("lda (ptr1),y");
-  asm("adc #0");
-  asm("sta _uip_acc32+1");
-  asm("dey");
-  asm("lda (ptr1),y");
-  asm("adc #0");
-  asm("sta _uip_acc32+0");  
-#endif
-}
-/*#pragma optimize(pop)*/
-/*-----------------------------------------------------------------------------------*/
-static u16_t chksum_ptr, chksum_len, chksum_tmp;
-static u8_t chksum_protocol;
-static u16_t chksum(void);
-/*-----------------------------------------------------------------------------------*/
-/*#pragma optimize(push, off) */
-u16_t
-chksum(void) {
-
-#if 0
-  asm("lda #0");
-  asm("sta tmp1");
-  asm("sta tmp1+1");
-  asm("lda _chksum_ptr");
-  asm("sta ptr1");
-  asm("lda _chksum_ptr+1");
-  asm("sta ptr1+1");
-
-
-  asm("lda _chksum_len+1");
-  asm("beq chksumlast");
-
-
-  /* If checksum is > 256, do the first runs. */
-  asm("ldy #0");
-  asm("clc");
-  asm("chksumloop_256:");
-  asm("lda (ptr1),y");
-  asm("adc tmp1");
-  asm("sta tmp1");
-  asm("iny");
-  asm("lda (ptr1),y");
-  asm("adc tmp1+1");
-  asm("sta tmp1+1");
-  asm("iny");
-  asm("bne chksumloop_256");
-  asm("inc ptr1+1");
-  asm("dec _chksum_len+1");
-  asm("bne chksumloop_256");
-
-  asm("chksum_endloop_256:");
-  asm("lda tmp1");
-  asm("adc #0");
-  asm("sta tmp1");
-  asm("lda tmp1+1");
-  asm("adc #0");
-  asm("sta tmp1+1");
-  asm("bcs chksum_endloop_256");
-  
-  asm("chksumlast:");
-  asm("lda _chksum_len");
-  asm("lsr");
-  asm("bcc chksum_noodd");  
-  asm("ldy _chksum_len");
-  asm("dey");
-  asm("lda (ptr1),y");
-  asm("clc");
-  asm("adc tmp1");
-  asm("sta tmp1");
-  asm("bcc noinc1");
-  asm("inc tmp1+1");
-  asm("bne noinc1");
-  asm("inc tmp1");
-  asm("noinc1:");
-  asm("dec _chksum_len");
-
-  asm("chksum_noodd:");
-  asm("clc");
-  asm("php");
-  asm("ldy _chksum_len");
-  asm("chksum_loop1:");
-  asm("cpy #0");
-  asm("beq chksum_loop1_end");
-  asm("plp");
-  asm("dey");
-  asm("dey");
-  asm("lda (ptr1),y");
-  asm("adc tmp1");
-  asm("sta tmp1");
-  asm("iny");
-  asm("lda (ptr1),y");
-  asm("adc tmp1+1");
-  asm("sta tmp1+1");
-  asm("dey");
-  asm("php");
-  asm("jmp chksum_loop1");
-  asm("chksum_loop1_end:");
-  asm("plp");
-  
-  asm("chksum_endloop:");
-  asm("lda tmp1");
-  asm("adc #0");
-  asm("sta tmp1");
-  asm("lda tmp1+1");
-  asm("adc #0");
-  asm("sta tmp1+1");
-  asm("bcs chksum_endloop");
-  
-  asm("lda tmp1");
-  asm("ldx tmp1+1");
-#endif
-}
-/*#pragma optimize(pop)*/
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_chksum(u16_t *buf, u16_t len)
-{
-  /*  unsigned long sum;
-
-  sum = 0;
-
-  chksum_ptr = (u16_t)buf;
-  while(len >= 256) {  
-    chksum_len = 256;
-    sum += chksum();
-    len -= 256;
-    chksum_ptr += 256;
-  }
-
-  if(len < 256) {
-    chksum_len = len;
-    sum += chksum();
-  }
-
-  while((sum >> 16) != 0) {
-    sum = (sum >> 16) + (sum & 0xffff);
-  }
-
-  return sum;*/
-
-  chksum_len = len;
-  chksum_ptr = (u16_t)buf;
-  return chksum();
-}
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_ipchksum(void)
-{  
-  chksum_ptr = (u16_t)uip_buf + UIP_LLH_LEN;
-  chksum_len = 20;  
-  return chksum();
-}
-/*-----------------------------------------------------------------------------------*/
-/*#pragma optimize(push, off) */
-static u16_t
-transport_chksum(u8_t protocol)
-{
-  chksum_protocol = protocol;
-  chksum_ptr = (u16_t)&uip_buf[20 + UIP_LLH_LEN];
-  chksum_len = 20;  
-  chksum_tmp = chksum();
-
-  chksum_ptr = (u16_t)uip_appdata;
-
-#if 0
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #40");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-
-  asm("jsr %v", chksum);
-
-  asm("clc");
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("txa");
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-
-  /* Fold carry */
-  /*  asm("bcc noinc");
-  asm("inc _chksum_tmp");
-  asm("noinc:");*/
-  
-  asm("tcpchksum_loop1:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop1");
-
-
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #20");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-  
-  
-  asm("ldy #$0c");
-  asm("clc");
-  asm("php");
-  asm("tcpchksum_loop2:");
-  asm("plp");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("iny");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-  asm("iny");
-  asm("php");
-  asm("cpy #$14");
-  asm("bne tcpchksum_loop2");
-
-  asm("plp");
-  
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc %v", chksum_protocol);  
-  asm("sta _chksum_tmp+1");
-
-  
-  asm("lda _chksum_tmp");
-  asm("adc _chksum_len+1");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc _chksum_len");
-  asm("sta _chksum_tmp+1");
-
-  
-
-  asm("tcpchksum_loop3:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop3");
-#endif
-
-  return chksum_tmp;
-}
-/*#pragma optimize(pop)*/
-
-/*-----------------------------------------------------------------------------------*/
-u16_t
-uip_tcpchksum(void)
-{
-  return transport_chksum(IP_PROTO_TCP);
-#if 0
-  chksum_ptr = (u16_t)&uip_buf[20 + UIP_LLH_LEN];
-  chksum_len = 20;  
-  chksum_tmp = chksum();
-
-  chksum_ptr = (u16_t)uip_appdata;
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #40");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-
-  asm("jsr %v", chksum);
-
-  asm("clc");
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("txa");
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-
-  /* Fold carry */
-  /*  asm("bcc noinc");
-  asm("inc _chksum_tmp");
-  asm("noinc:");*/
-  
-  asm("tcpchksum_loop1:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop1");
-
-
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #20");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-  
-  
-  asm("ldy #$0c");
-  asm("clc");
-  asm("php");
-  asm("tcpchksum_loop2:");
-  asm("plp");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("iny");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-  asm("iny");
-  asm("php");
-  asm("cpy #$14");
-  asm("bne tcpchksum_loop2");
-
-  asm("plp");
-  
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #6");  /* IP_PROTO_TCP */
-  asm("sta _chksum_tmp+1");
-
-  
-  asm("lda _chksum_tmp");
-  asm("adc _chksum_len+1");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc _chksum_len");
-  asm("sta _chksum_tmp+1");
-
-  
-
-  asm("tcpchksum_loop3:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop3");
-
-
-  return chksum_tmp;
-#endif 
-}
-
-/*-----------------------------------------------------------------------------------*/
-#if UIP_UDP_CHECKSUMS
-u16_t
-uip_udpchksum(void)
-{
-  return transport_chksum(IP_PROTO_UDP);
-#if 0
-  chksum_ptr = (u16_t)&uip_buf[20 + UIP_LLH_LEN];
-  chksum_len = 20;  
-  chksum_tmp = chksum();
-
-  chksum_ptr = (u16_t)uip_appdata;
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #40");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-
-  asm("jsr %v", chksum);
-
-  asm("clc");
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("txa");
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-
-  /* Fold carry */
-  /*  asm("bcc noinc");
-  asm("inc _chksum_tmp");
-  asm("noinc:");*/
-  
-  asm("tcpchksum_loop1:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop1");
-
-
-  asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
-  asm("sec");
-  asm("sbc #20");
-  asm("sta _chksum_len");
-  asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
-  asm("sbc #0");
-  asm("sta _chksum_len+1");
-  
-  
-  asm("ldy #$0c");
-  asm("clc");
-  asm("php");
-  asm("tcpchksum_loop2:");
-  asm("plp");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp");
-  asm("sta _chksum_tmp");
-  asm("iny");
-  asm("lda _uip_buf+%b,y", UIP_LLH_LEN);
-  asm("adc _chksum_tmp+1");
-  asm("sta _chksum_tmp+1");
-  asm("iny");
-  asm("php");
-  asm("cpy #$14");
-  asm("bne tcpchksum_loop2");
-
-  asm("plp");
-  
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #17");  /* IP_PROTO_UDP */
-  asm("sta _chksum_tmp+1");
-
-  
-  asm("lda _chksum_tmp");
-  asm("adc _chksum_len+1");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc _chksum_len");
-  asm("sta _chksum_tmp+1");
-
-  
-
-  asm("tcpchksum_loop3:");
-  asm("lda _chksum_tmp");
-  asm("adc #0");
-  asm("sta _chksum_tmp");
-  asm("lda _chksum_tmp+1");
-  asm("adc #0");
-  asm("sta _chksum_tmp+1");
-  asm("bcs tcpchksum_loop3");
-
-
-  return chksum_tmp;
-#endif
-}
-#endif /* UIP_UDP_CHECKSUMS */
-/*-----------------------------------------------------------------------------------*/
diff --git a/contiki-cpc/contiki-cpc/uip/uip_arch.h b/contiki-cpc/contiki-cpc/uip/uip_arch.h
deleted file mode 100644
index b850435..0000000
--- a/contiki-cpc/contiki-cpc/uip/uip_arch.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2001, 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 uIP TCP/IP stack.
- *
- * $Id: uip_arch.h,v 1.1 2006/04/17 15:12:03 kthacker Exp $
- *
- */
-
-#ifndef __UIP_ARCH_H__
-#define __UIP_ARCH_H__
-
-#include "uip.h"
-
-void uip_add_rcv_nxt(u16_t n);
-void uip_add32(u8_t *op32, u16_t op16);
-
-u16_t uip_chksum(u16_t *data, u16_t len);
-u16_t uip_ipchksum(void);
-u16_t uip_tcpchksum(void);
-
-#endif /* __UIP_ARCH_H__ */