Welcome, Guest. Please login or register.

Author Topic: Contiki: I wonder....  (Read 6780 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Contiki: I wonder....
« on: April 07, 2005, 04:06:35 PM »
Hey all.

Something popped into my head late last night. Thought I'd share it with you.

As you may or may not be aware, there is a little almost-OS called contiki.

It has been ported to heaps of platforms because it is written in C.

Now, even if it were to run as an app, I think it'd be great fo amiga.
Imagine a TCP/IP stack, a (simple) web browser, http, and ftp server, irc client, and a few other things living in probably less than 100kb. I would love that for my 1mb a500.

Main thing that troubles me is contiki's multitasking vs the amigas multitasking. Probably not that hard to get around. preemptive multitasking is so simple.

Anyway, what are everyones thoughts?
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Magic-Merl

  • Full Member
  • ***
  • Join Date: Nov 2003
  • Posts: 229
    • Show only replies by Magic-Merl
Re: Contiki: I wonder....
« Reply #1 on: April 07, 2005, 04:12:22 PM »
This is certainly a curiosity.

If it was simply to utilise the TCP/IP features then it would be of use.  Quite frankly, can't think why anyone would want to use it but your idea of running it as an app sounds promising.

It goes to prove that it is possible if (as their web site states) it runs on the C64?


Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: Contiki: I wonder....
« Reply #2 on: April 07, 2005, 04:22:42 PM »
it does indeed run on a c64. I put it on disk about a year ago and chucked it in. Worked great. It's advanced since then though.

Been wanting to try it on my apple//e too.

someone even ported it to an atmel micro!
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Contiki: I wonder....
« Reply #3 on: April 07, 2005, 06:51:20 PM »
If nothing else, Contiki proves that "it can be done." A related project, lwIP, sounds like a good candidate for a small, open, and free IP stack packaged as a bsdsocket.library replacement. (Queue the naysayers.) Actually, the Amiga stands to benefit from all of Adam Dunkels' projects, assuming there are one or two dedicated programmers willing to put in a few hours of their spare time.

Trev
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: Contiki: I wonder....
« Reply #4 on: April 08, 2005, 02:54:36 AM »
Ah..here it is. I guess this thread does kind of fit into alternative OSes a bit better.

I do find Adam Dunkels' projects interesting too. I'm always impressed by small, functional programs created in a 3GL language.

Like I said, my a500 only has 1mb of ram, so anything that works in less space is interesting to me.

Unfortunately I have no knowledge of the Amiga APIs, or any of the development tools/docs, so I definitely wouldn't be one to port any of it.

Could also make an interesting replacement for launcher on palm. but not really worth the effort.
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: Contiki: I wonder....
« Reply #5 on: April 08, 2005, 07:47:31 AM »
Porting lightweight IP is one of the cool project I'm going to do in the future (unless someone beats me to it) A colleque of mine has already done it commercially. But I'm allowed to use his code as a guideline. But first I want to program a gamestarter.

I still haven't got the time really. I'm still in progress redecorating/restoring my apartment (almost a year busy now).

So I hope I get around to it. BTW the contiki stack is not a candidate. Contiki is a coorperative operating system. That will not do on AmigaOs. You'll need some changed done to get it to amiga multitasking.
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)
 

Offline jeffimix

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 853
    • Show only replies by jeffimix
Re: Contiki: I wonder....
« Reply #6 on: April 08, 2005, 08:58:58 AM »
The protothreads library comes from that project, perhaps the rest can become more standalone(I wonder how small a C64 emulator for the 500 can be...)
\\"The only benchmarks that matter is my impression of the system while using the apps I use. Everything else is opinion.\\" - FooGoo
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: Contiki: I wonder....
« Reply #7 on: April 08, 2005, 12:07:42 PM »
Hm. I thought that contiki was meant to be preemptive. I admit I thought it a little odd though. But if a CPU has interrupts, it can usually have a preemptive multitasking kernel made for it.
The multitasking would need to be changed for different platforms anyway. But it wouldn't need too much alteration if it runs as an app and the programs as loadable modules. That way Amigas OS can do the multitasking.

does anyone remember writing apps for win3.1? It needed bits put into the apps for the kernel to break in and multitask. This was great for jamming up a PC.
Back to the point. The method of cooperative multitasking became moot with the preemptive core. the core just broke in whenever it felt like it. Timed interrupts are a wonderful thing.

edit: Why would you want a c64 emulator on the amiga exactly? Not for the threading I hope? It's all portable you know  :-)
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
wow. Talk about different...
« Reply #8 on: April 11, 2005, 12:48:27 PM »
I just tried the latest release of contiki. It has really changed! Most notably a different menu system and ctk 80 column mode (c64 version).

If it can be ported to native X, I see no reason why it can't work on an amiga!
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #9 on: April 13, 2005, 07:29:13 AM »
As far as I know contiki is a coorperative multitasking environment. Keep in mind that contiki is designed to run on 8bits 64k (or less) devices. A preemitive task scedular would take too much ram (and time) due to it's complexity.

someone might have come up with something in the meantime that allows use of such scedular with contiki I don't know. My information might be old since I have not looked at contiki for some time.

Sure it can be ported to Amiga but why should you. The Amiga has a supperior OS sitting in it's ROM.

I'm more interested in lightweight-IP and that sort of thing. Does anyone know if someone attempted to port that to Amiga. I'd very much like to do it myself the next winter (these projects should not be attempted during the summer).
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: wow. Talk about different...
« Reply #10 on: April 13, 2005, 11:33:31 AM »
It's true, AmigaOS is good. I think contiki is stiff competition against OS 1.x though...

I had a better read about contikis multiprocessing abilities. I see what you mean. Except it uses preemptive multithreading as a loadable library of ~4k when it just can't be done without. Still pretty small, but on a 64k system, pretty big.

what about uIP? for those of you saying "eh?" Look here.

It's tiny!!!!

I'd love to see a port of a small IP stack to amiga. Just make sure it works on 1.3  :-D
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #11 on: April 13, 2005, 11:48:12 AM »
Thats is what I was talking about. there is micro-Ip (uIP) which is for microcontrollers. I've been told that this stack would not be really usefull for Amiga. It is ment to be in embedded controllers. The application is known and therefor the stack is very much tailored for the application at hand.

To be able to provide something like bsdsocket it will be easier to use lightweight-IP. A collegue of mine has sourcecode for that. I intend to use that as bases. When I have more time I'll look up some links for you.

Gotta go now. Lunch time!
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: wow. Talk about different...
« Reply #12 on: April 13, 2005, 12:44:36 PM »
Ohhh... I see. Any idea why the stack's no good?
It's just it's been used for a few ports of contiki, so I thought it would have been more veratile. Ah well. It's not my forte anyway.

Another year older. Happy birthday tooo meeeee.....

It should be interesting to see what you will create!
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #13 on: April 13, 2005, 01:26:03 PM »
Well Im kind of eager to start on it. But I have one programming project preceeding it. That will be my game database/starter. But since I have zero Amiga programming experience it will take some time getting worked in (I'm more into win32 and embedded systems). Adding to that the fact I will not do much programming in the upcoming summer it may take awhile for my project to see the light of day. So please be patient (or beat me to it ;-)). Anyways happy birthday.
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: wow. Talk about different...
« Reply #14 on: April 13, 2005, 01:37:47 PM »
You don't have any amiga programming experience either?

About the same as me. Except I'm guessing you're still an active programmer. I'm horribly rusty. Trying to relearn it all again. All I can still really understand is ANSI C and a few assemblers including PIC, and basic, but that doesn't count. I'd rather be tortured than use pascal again.

I think I'm moving again sometime too. I don't know.

I'm going to hassle one of the developers at infogrames for a job tomorrow. It can't hurt  :-D It'll give me more cash for living.
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3