Added cc65 target 'atari' for Atari 8-bit machines. This addition was triggered by exsistence of http://www.atari8ethernet.com/.
This commit is contained in:
parent
f70d4c600d
commit
c839eacbdf
14 changed files with 301 additions and 0 deletions
1
cpu/6502/dhcp/Makefile.atari.defines
Normal file
1
cpu/6502/dhcp/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_DNS,WITH_GUI
|
1
examples/email/Makefile.atari.defines
Normal file
1
examples/email/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_CLIENT,WITH_DNS,WITH_GUI
|
1
examples/irc/Makefile.atari.defines
Normal file
1
examples/irc/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_CLIENT,WITH_DNS,WITH_GUI
|
1
examples/webbrowser/Makefile.atari.defines
Normal file
1
examples/webbrowser/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_CLIENT,WITH_DNS,WITH_GUI,MTU_SIZE=1000
|
1
examples/webserver/Makefile.atari.defines
Normal file
1
examples/webserver/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_LOGGING,WITH_BOOST
|
1
examples/wget/Makefile.atari.defines
Normal file
1
examples/wget/Makefile.atari.defines
Normal file
|
@ -0,0 +1 @@
|
|||
DEFINES = WITH_LOGGING,WITH_CLIENT,WITH_DNS
|
62
platform/atari/Makefile.atari
Normal file
62
platform/atari/Makefile.atari
Normal file
|
@ -0,0 +1,62 @@
|
|||
#
|
||||
# Copyright (c) 2007, 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.
|
||||
#
|
||||
# Author: Oliver Schmidt <ol.sc@web.de>
|
||||
#
|
||||
# $Id: Makefile.atari,v 1.1 2010/09/29 19:44:01 oliverschmidt Exp $
|
||||
#
|
||||
|
||||
ETHERNET = cs8900a
|
||||
|
||||
CONTIKI_CPU = $(CONTIKI)/cpu/6502
|
||||
include $(CONTIKI_CPU)/Makefile.6502
|
||||
|
||||
LDFLAGS += -C $(CONTIKI)/platform/$(TARGET)/$(TARGET).cfg -S 0x2000
|
||||
|
||||
ifeq ($(MAKECMDGOALS),disk)
|
||||
ifndef DIR2ATR
|
||||
${error DIR2ATR not defined! You must specify where dir2atr resides}
|
||||
endif
|
||||
endif
|
||||
|
||||
disk: all
|
||||
mkdir -p atr
|
||||
cp $(CONTIKI)/tools/$(TARGET)/dos.sys atr/dos.sys
|
||||
cp $(CONTIKI)/tools/$(TARGET)/dup.sys atr/dup.sys
|
||||
cp $(CONTIKI_PROJECT).$(TARGET) atr/autorun.sys
|
||||
cp $(CONTIKI)/tools/$(TARGET)/sample.cfg atr/contiki.cfg
|
||||
ifeq ($(HTTPD-CFS),1)
|
||||
cp httpd-cfs/index.htm atr/index.htm
|
||||
cp httpd-cfs/backgrnd.gif atr/backgrnd.gif
|
||||
cp httpd-cfs/contiki.gif atr/contiki.gif
|
||||
cp httpd-cfs/notfound.htm atr/notfound.htm
|
||||
endif
|
||||
$(DIR2ATR) -b Dos25 1040 contiki.atr atr
|
||||
rm -r atr
|
8
platform/atari/README
Normal file
8
platform/atari/README
Normal file
|
@ -0,0 +1,8 @@
|
|||
The platform/atari/ directory is used for targeting an Atari 8-bit computer.
|
||||
Most things are shared between the 6502-based targets so please consult
|
||||
cpu/6502/README for further details.
|
||||
|
||||
|
||||
The following Atari 8-bit Ethernet card is supported:
|
||||
|
||||
- Atari 8-bit Ethernet Project: Use driver cs8900a.eth with address $D500.
|
44
platform/atari/atari.cfg
Normal file
44
platform/atari/atari.cfg
Normal file
|
@ -0,0 +1,44 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2E00;
|
||||
}
|
||||
SYMBOLS {
|
||||
#__STACKSIZE__ = $800;
|
||||
__STACKSIZE__: value = $800, weak = yes;
|
||||
__RESERVED_MEMORY__: value = $0, weak = yes;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $0082, size = $007E, type = rw, define = yes;
|
||||
HEADER: start = $0000, size = $0006, file = %O;
|
||||
RAM: start = %S, size = $BC20 - __STACKSIZE__ - %S, file = %O;
|
||||
TRAILER: start = $0000, size = $0006, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
ZPSAVE: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
HEAP: load = RAM, type = bss, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: segment = INIT,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = RODATA,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
CONDES: type = interruptor,
|
||||
segment = RODATA,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__;
|
||||
}
|
||||
|
75
platform/atari/contiki-conf.h
Normal file
75
platform/atari/contiki-conf.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright (c) 2007, Swedish Institute of Computer Science.
|
||||
* 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: Oliver Schmidt <ol.sc@web.de>
|
||||
*
|
||||
* $Id: contiki-conf.h,v 1.1 2010/09/29 19:44:01 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONTIKI_CONF_H__
|
||||
#define __CONTIKI_CONF_H__
|
||||
|
||||
#include "6502def.h"
|
||||
|
||||
#define CTK_CONF_MENU_KEY CH_ESC
|
||||
#define CTK_CONF_WINDOWSWITCH_KEY 0x17 /* Ctrl-W */
|
||||
#define CTK_CONF_WIDGETUP_KEY 0x01 /* Ctrl-A */
|
||||
#define CTK_CONF_WIDGETDOWN_KEY '\t' /* Tab or Ctrl-I */
|
||||
|
||||
#define BORDERCOLOR COLOR_LIGHTBLUE
|
||||
#define SCREENCOLOR COLOR_BLUE
|
||||
#define BACKGROUNDCOLOR COLOR_BLUE
|
||||
#define WINDOWCOLOR COLOR_GRAY1
|
||||
#define WINDOWCOLOR_FOCUS COLOR_LIGHTBLUE
|
||||
#define WIDGETCOLOR COLOR_GRAY1
|
||||
#define WIDGETCOLOR_FOCUS COLOR_YELLOW
|
||||
#define WIDGETCOLOR_FWIN COLOR_LIGHTBLUE
|
||||
#define WIDGETCOLOR_HLINK COLOR_CYAN
|
||||
|
||||
#define EMAIL_CONF_WIDTH 39
|
||||
#define EMAIL_CONF_HEIGHT 19
|
||||
#define EMAIL_CONF_ERASE 0
|
||||
|
||||
#define IRC_CONF_WIDTH 40
|
||||
#define IRC_CONF_HEIGHT 23
|
||||
|
||||
#define WWW_CONF_WEBPAGE_WIDTH 40
|
||||
#define WWW_CONF_WEBPAGE_HEIGHT 19
|
||||
#define WWW_CONF_HISTORY_SIZE 0
|
||||
#define WWW_CONF_MAX_URLLEN 80
|
||||
#define WWW_CONF_MAX_NUMPAGEWIDGETS 20
|
||||
#define WWW_CONF_RENDERSTATE 0
|
||||
#define WWW_CONF_FORMS 0
|
||||
#define WWW_CONF_MAX_FORMACTIONLEN 20
|
||||
#define WWW_CONF_MAX_FORMNAMELEN 20
|
||||
#define WWW_CONF_MAX_INPUTNAMELEN 20
|
||||
#define WWW_CONF_MAX_INPUTVALUELEN 20
|
||||
|
||||
#endif /* __CONTIKI_CONF_H__ */
|
106
platform/atari/contiki-main.c
Normal file
106
platform/atari/contiki-main.c
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Copyright (c) 2006, Swedish Institute of Computer Science.
|
||||
* 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: Oliver Schmidt <ol.sc@web.de>
|
||||
*
|
||||
* $Id: contiki-main.c,v 1.1 2010/09/29 19:44:01 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#include "contiki-net.h"
|
||||
#include "ctk/ctk.h"
|
||||
#include "sys/log.h"
|
||||
#include "lib/config.h"
|
||||
#include "net/ethernet-drv.h"
|
||||
|
||||
#if WITH_GUI
|
||||
#define CTK_PROCESS &ctk_process,
|
||||
#else /* WITH_GUI */
|
||||
#define CTK_PROCESS
|
||||
#endif /* WITH_GUI */
|
||||
|
||||
#if WITH_DNS
|
||||
#define RESOLV_PROCESS &resolv_process,
|
||||
#else /* WITH_DNS */
|
||||
#define RESOLV_PROCESS
|
||||
#endif /* WITH_DNS */
|
||||
|
||||
PROCINIT(&etimer_process,
|
||||
CTK_PROCESS
|
||||
RESOLV_PROCESS
|
||||
&tcpip_process);
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
main(void)
|
||||
{
|
||||
struct ethernet_config *ethernet_config;
|
||||
|
||||
process_init();
|
||||
|
||||
#if 1
|
||||
ethernet_config = config_read("contiki.cfg");
|
||||
#else
|
||||
{
|
||||
static struct ethernet_config config = {0xD500, "cs8900a.eth"};
|
||||
uip_ipaddr_t addr;
|
||||
|
||||
uip_ipaddr(&addr, 192,168,0,128);
|
||||
uip_sethostaddr(&addr);
|
||||
|
||||
uip_ipaddr(&addr, 255,255,255,0);
|
||||
uip_setnetmask(&addr);
|
||||
|
||||
uip_ipaddr(&addr, 192,168,0,1);
|
||||
uip_setdraddr(&addr);
|
||||
|
||||
uip_ipaddr(&addr, 192,168,0,1);
|
||||
resolv_conf(&addr);
|
||||
|
||||
ethernet_config = &config;
|
||||
}
|
||||
#endif
|
||||
|
||||
procinit_init();
|
||||
|
||||
process_start((struct process *)ðernet_process, (char *)ethernet_config);
|
||||
|
||||
autostart_start(autostart_processes);
|
||||
|
||||
log_message("Contiki up and running ...", "");
|
||||
|
||||
while(1) {
|
||||
|
||||
if(process_run() < 2) {
|
||||
|
||||
etimer_request_poll();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
BIN
tools/atari/dos.sys
Normal file
BIN
tools/atari/dos.sys
Normal file
Binary file not shown.
BIN
tools/atari/dup.sys
Normal file
BIN
tools/atari/dup.sys
Normal file
Binary file not shown.
BIN
tools/atari/sample.cfg
Normal file
BIN
tools/atari/sample.cfg
Normal file
Binary file not shown.
Loading…
Reference in a new issue