Added 80 column IRC client / web browser for the C64.

Recently support for 80 column CONIO based on 320x200 graphics was added to the cc65 C library for the C64. This change leverages this for the IRC client and the web browser. Because not everybody prefers this 'soft80' display with its small 4x8 charbox the 40 column programs are still available as before (with the new programs called 'irc80' and 'webbrowser80').
This commit is contained in:
Oliver Schmidt 2015-10-30 16:48:00 +01:00
parent fb5d0b7ef0
commit 5443c740e9
5 changed files with 52 additions and 16 deletions

View File

@ -32,8 +32,6 @@
*
*/
#include <string.h>
#include "contiki-net.h"
#include "ctk/ctk.h"
#include "sys/log.h"

View File

@ -38,6 +38,10 @@ include $(CONTIKI_CPU)/Makefile.6502
CFLAGS += -DWITH_PETSCII
ifeq ($(findstring WITH_80COL,$(DEFINES)),WITH_80COL)
LDFLAGS += c64-soft80.o
endif
ifeq ($(MAKECMDGOALS),disk)
ifndef C1541
${error C1541 not defined! You must specify where VICE c1541 resides}

View File

@ -42,7 +42,11 @@
#define CTK_CONF_WIDGETUP_KEY CH_F5
#define CTK_CONF_WIDGETDOWN_KEY CH_F7
#if WITH_80COL
#define MOUSE_CONF_XTOC(x) ((x) / 4)
#else
#define MOUSE_CONF_XTOC(x) ((x) / 8)
#endif
#define MOUSE_CONF_YTOC(y) ((y) / 8)
#define BORDERCOLOR COLOR_BLACK
@ -55,14 +59,22 @@
#define WIDGETCOLOR_FWIN COLOR_GRAY3
#define WIDGETCOLOR_HLINK COLOR_CYAN
#if WITH_80COL
#define IRC_CONF_WIDTH 80
#else
#define IRC_CONF_WIDTH 40
#endif
#define IRC_CONF_HEIGHT 24
#ifndef TELNETD_CONF_MAX_IDLE_TIME
#define TELNETD_CONF_MAX_IDLE_TIME 300
#endif
#if WITH_80COL
#define WWW_CONF_WEBPAGE_WIDTH 80
#else
#define WWW_CONF_WEBPAGE_WIDTH 40
#endif
#define WWW_CONF_WEBPAGE_HEIGHT 20
#define WWW_CONF_HISTORY_SIZE 4
#define WWW_CONF_WGET_EXEC(url) exec("wget", url)

View File

@ -32,7 +32,7 @@
*
*/
#include <string.h>
#include <stdlib.h>
#include "contiki-net.h"
#include "ctk/ctk.h"
@ -79,6 +79,10 @@ main(void)
#endif /* WITH_ARGS */
#if WITH_80COL
_heapadd((void *)0x0400, 0x0400);
#endif /* WITH_80COL */
process_init();
#if 1

View File

@ -257,15 +257,15 @@ $(eval $(call makes,c64))
c64: contiki-c64.zip
contiki-c64.zip: contiki-c64-1.d64 contiki-c64-2.d64 contiki-c64.d71 contiki-c64.d81
contiki-c64.zip: contiki-c64-1.d64 contiki-c64-2.d64 contiki-c64-3.d64 contiki-c64.d71 contiki-c64.d81
contiki-c64-1.d64: c64-makes
$(C1541) -format contiki-1,00 d64 $@
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/ethconfig.c64 ethconfig,p
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
$(C1541) -attach $@ -write ../../examples/webbrowser/webbrowser.c64 webbrowser,p
$(C1541) -attach $@ -write ../../examples/webbrowser-80col/webbrowser.c64 webbrowser80,p
$(C1541) -attach $@ -write ../../examples/wget/wget.c64 wget,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
@ -275,6 +275,20 @@ contiki-c64-1.d64: c64-makes
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-pot.mou pot.mou,s
contiki-c64-2.d64: c64-makes
$(C1541) -format contiki-2,00 d64 $@
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/ethconfig.c64 ethconfig,p
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach $@ -write ../../examples/irc-80col/irc-client.c64 irc80,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou contiki.mou,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-inkwell.mou inkwell.mou,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-joy.mou joy.mou,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-pot.mou pot.mou,s
contiki-c64-3.d64: c64-makes
$(C1541) -format contiki-3,00 d64 $@
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/ethconfig.c64 ethconfig,p
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
@ -297,8 +311,10 @@ contiki-c64.d71: c64-makes
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/ethconfig.c64 ethconfig,p
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
$(C1541) -attach $@ -write ../../examples/webbrowser/webbrowser.c64 webbrowser,p
$(C1541) -attach $@ -write ../../examples/webbrowser-80col/webbrowser.c64 webbrowser80,p
$(C1541) -attach $@ -write ../../examples/wget/wget.c64 wget,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach $@ -write ../../examples/irc-80col/irc-client.c64 irc80,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c64 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c64 telnetd,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
@ -318,8 +334,10 @@ contiki-c64.d81: c64-makes
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/ethconfig.c64 ethconfig,p
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
$(C1541) -attach $@ -write ../../examples/webbrowser/webbrowser.c64 webbrowser,p
$(C1541) -attach $@ -write ../../examples/webbrowser-80col/webbrowser.c64 webbrowser80,p
$(C1541) -attach $@ -write ../../examples/wget/wget.c64 wget,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach $@ -write ../../examples/irc-80col/irc-client.c64 irc80,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c64 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c64 telnetd,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s