Jump to content

Photo

Contiki - August 2015


70 replies to this topic

#1 ol.sc OFFLINE  

ol.sc

    Space Invader

  • 49 posts

Posted Sat Aug 8, 2015 10:57 AM

Hi,

 

I've create a new build of Contiki for the Atari 8-Bit Computers (with a Dragon Cart). Let me summarize the changes:

 
1. The Twitter client had to go :-( Twitter just doesn't want any 3rd party clients anymore and successfully drives them away.
 
2. The email client didn't make any sense anymore (it never did make much anyway). Nowadays everybody uses strong encryption.
 
3. The FTP was a similiar case. Without PASV support not interoperable with anything out there. Without support for sending files it was never really useful anyway.
 
4. The Telnet server is now part of the package. It was "always" there but had a bug keeping it from working with cc65. I found and fixed it because it is used as base for https://github.com/l...c64/Contiki-BBS. The demo Telnet server I'm providing comes with the shell command 'wget' allowing you to download a i.e. the Google homepage with 'wget www.google.com | write google.htm'.
 
5. I'm sure about everybody sees the web browser as most interesting Contiki app. So I went ahead and invested many hours in improvement:
 
- Originally there were several fixed sized arrays to hold the data of links and forms. While that had the benefit of simple (aka fast and small) 6502 code to access the data it turned out to be simply to inflexible to accommodate somewhat more complex pages. Quite some time ago I changed that https://github.com/c...7e2bbb121556f5e to use a single buffer containing linked lists of items allocated according to their actual size. As part of that change I moved away from storing input field data in the actual page allowing to support scrolling input fields and hidden input fields.
 
- In the meantime I fixed quite some issues. Among them there were several fixes improving the "skipping" of unhandled stuff:
a) HTTP header field parsing uses a fixed 1024 byte buffer. If a header field was longer the whole page parsing failed. Nowadays many pages set cookies - which are easily larger than 1024 bytes. Now the header field parsing successfully skips too-long header fields.
b) Nowadays about every pages comes with huge amounts of JavaScript. That was generally already skipped. But there were two special cases not handled:
- an HTML tag inside a JavaScript string.
- a JavaScript comparison using the less-than operator.
Now both cases are handled correctly.
 
- Regarding the actual page display nowadays people use loads of <div> to structure their content. Inserting a newline for every </div> sometimes meant literally empty pages ;-) Instead of blowing up the parser code I opted for a post-processing: There are simply never more than two consecutive newlines rendered.
 
- I was surprised to find that "THE" web page (www.google.com) is generally still operational without TLS and JavaScript. So I set out to bring it (back) to the Contiki web browser. The only thing I more or less explictly added for that purpose was https://github.com/c...7ec56d45445e83e
 
6. I moved away from those Contiki online configurator thingy. Contiki now comes as straight .atr downloads. Either as three 130k DOS 2.5 images or as one 800k MyDOS image.
 
7. Before the Atari version of Contiki had way less features than the Apple II / C64 version - because cc65 programs for the Atari had less memory to use than cc65 programs for the Apple II / C64. In the meantime Christian Grössler has put quite some effort into the Atari support of cc65 (Thanks !) allowing cc65 programs for the Atari to optionally make use of the RAM behind the ROM. Contiki now does so - and thus has as much memory available as the version of Contiki for the Apple II / C64 and therefore offers all features.
 
8. The Contiki GUI programs for the Atari now come with mouse support. This is possible because of the increased memory available to cc65 programs for the Atari - and because of the mouse support added to cc65 for the Atari (again Thanks to Christian Grössler !). If you have a non-ST mouse you may rename the mouse drivers on the disk(s) to get your mouse working.
 
I produced a video of configuring Contiki, bringing up the web browser, searching on Google for 'atari' and finally surfing to the Dragon Cart website, see https://vid.me/tEIm
 
and now for some more general info:
 
Contiki source code: https://github.com/contiki-os/contiki (all my Atari changes are there upstream - there's no need for another source)
 
Contiki home page: http://www.contiki-os.org/
 
On the Apple II we decided after literally years of consideration to move away from the CS8900A for the new Apple II Erthernet card. Rather it uses the WIZnet W5100, see http://www.a2retrosy...om/blog/?cat=26
 
The W5100 has basically two modes: In Raw MAC mode it behaves pretty much like a CS8900A. All porting efforts "simply" use the W5100 in that mode. In IP mode it includes a complete TCP/IP stack allowing for UDP and TCP (with up to four simultanious connections).
 
Using the W5100 in IP mode allows for totally different use cases than what we saw so far. Imagine super small drivers for virtual fast network floppy drives or alike. I've done a size-optimized send/receive of UDP frames for the W5100 in ~260 bytes.
 
The W5100 surely isn't the latest and greatest but it is very well understood - i.e. the Arduino Ethernet Shield contains it, meaning _LOT'S_ of people use it in the open source "makers" domain.
 
Just in case someone is consideriing to build a W5100 based cart for the Atari:
 
- Contiki works both with CS8900A and W5100 in just the same way. It would cost me 1/2 to build an Contiki-for-Atari actually doing so.
 
- Dan's code is based on IP65. I guess you know that I'm the IP65 maintainer now. I modified IP65 to share the low level driver code with Contiki. So IP65 already has full W5100 support.
 
So the existing Atari Ethernet software can work with the W5100 instead of the CS8900A without problems. On the other hand I know that there are quite some guys thinking that TCP/IP on the 6502 isn't the right way. They could enter the game with a W5100. So the W5100 basically offers the best of two worlds :-)
 
Regards,
Oliver

Attached Files



#2 billkendrick OFFLINE  

billkendrick

    Chopper Commander

  • 120 posts
  • Location:Davis, CA

Posted Sat Aug 8, 2015 11:08 AM

:thumbsup:



#3 FifthPlayer OFFLINE  

FifthPlayer

    Moonsweeper

  • 318 posts

Posted Sat Aug 8, 2015 12:02 PM

I love that when you visited Google, it invited you to install the Chrome browser.  Who knew Google had an A8 version of Chrome?



#4 w1k OFFLINE  

w1k

    Stargunner

  • 1,660 posts
  • Location:martin, slovakia

Posted Sat Aug 8, 2015 2:25 PM

woow, thank you very much:) tomorrow im going testing :D



#5 snicklin OFFLINE  

snicklin

    River Patroller

  • 2,066 posts
  • Location:Australia

Posted Sat Aug 8, 2015 4:33 PM

I like it! It's great to see more connectivity on the Atari 8-bit, somewhere that it lacks somewhat until now.

 

I was thinking about how it would be possible to expand in the future and I think that you may have hit quite close to the limits of what the Atari can do.

 

If however you think that there are perhaps things that are just about within reach, perhaps it could make all web connections through a proxy? Then that proxy would specifically know what the Atari 8-bit is capable of and then send a pre-rendered output to the Atari?

 

So for example (and not as a feature request as you've done enough as it is), lets say that you think that gr. 12 could be used and the colours could be intelligently selected, the proxy would approximate which colours go where in a readable format for the Atari and then sends it to the Atari. i.e. let a server do the "grunt" work.



#6 Bryan OFFLINE  

Bryan

    Quadrunner

  • 10,732 posts
  • Cruise Elroy = 4DB7
  • Location:Chesaning, MI

Posted Sat Aug 8, 2015 4:37 PM

I love that when you visited Google, it invited you to install the Chrome browser.  Who knew Google had an A8 version of Chrome?

The downside is you'll need 3,672 floppies to save it on.



#7 w1k OFFLINE  

w1k

    Stargunner

  • 1,660 posts
  • Location:martin, slovakia

Posted Sun Aug 9, 2015 5:35 AM

irc still not working?



#8 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Sun Aug 9, 2015 5:53 AM

irc still not working?

 

I have no experience at all with using IRC so I just don't have any idea what to expect and/or in which aspect the IRC client doesn't match reasonable expectations. I repeat reading here and there that it "does not work" or "is a rough ride". But with that type of feedback nothing will improve for sure. In all those years not a single individual cared enough to write an email to me explaining what exactly is wrong - and how to reproduce it from the perspective of an IRC noob.



#9 w1k OFFLINE  

w1k

    Stargunner

  • 1,660 posts
  • Location:martin, slovakia

Posted Sun Aug 9, 2015 6:02 AM

so, you can try many IRC servers to connect..



#10 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Sun Aug 9, 2015 6:04 AM

so, you can try many IRC servers to connect..

 

If connecting to IRC servers is what it is about then I can confirm that the IRC client works.



#11 danwinslow OFFLINE  

danwinslow

    River Patroller

  • 2,531 posts

Posted Sun Aug 9, 2015 6:34 AM

Awesome! Nice work, Oliver.



#12 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Sun Aug 9, 2015 7:49 AM

Awesome! Nice work, Oliver.

 

Thanks !



#13 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • 562 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Wed Aug 12, 2015 12:06 PM

I like it! It's great to see more connectivity on the Atari 8-bit, somewhere that it lacks somewhat until now.

 

I was thinking about how it would be possible to expand in the future and I think that you may have hit quite close to the limits of what the Atari can do.

 

If however you think that there are perhaps things that are just about within reach, perhaps it could make all web connections through a proxy? Then that proxy would specifically know what the Atari 8-bit is capable of and then send a pre-rendered output to the Atari?

 

So for example (and not as a feature request as you've done enough as it is), lets say that you think that gr. 12 could be used and the colours could be intelligently selected, the proxy would approximate which colours go where in a readable format for the Atari and then sends it to the Atari. i.e. let a server do the "grunt" work.

 

Good idea.

Nowadays I would need a proxy even for my Netbook.

There are web pages that have to be scrolled horizontally if you have 1366x768 screen resolution :)

 

Such proxy could act as a "mobile device", so the web servers that generate dynamically the content, would do the first processing.

The proxy would have less work if a mobile version of the web page is available, and would do the rest.

Or maybe the CONTIKI web-browser itself would be able to process mobile versions of the web sites directly?



#14 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Wed Aug 12, 2015 1:47 PM

Hi,

 

I like it! It's great to see more connectivity on the Atari 8-bit, somewhere that it lacks somewhat until now.

 

:-)

 

If however you think that there are perhaps things that are just about within reach, perhaps it could make all web connections through a proxy? Then that proxy would specifically know what the Atari 8-bit is capable of and then send a pre-rendered output to the Atari?

 

So for example (and not as a feature request as you've done enough as it is), lets say that you think that gr. 12 could be used and the colours could be intelligently selected, the proxy would approximate which colours go where in a readable format for the Atari and then sends it to the Atari. i.e. let a server do the "grunt" work.

 

From my perspective Contiki is more or less about NOT doing that. It's about making the old machine a first-class-citizen. When you start thinking about a proxy you quickly end up with running Lynx on some machine and using Dan's Telnet to view the output. Or you move even further asking why burden the old machine with TCP/IP and not just connect to the machine running Lynx via some serial connection. Then you might even not need new software on the old machine but could run a decent terminal program.

 

You see: It's all a matter of taste. The more useful it gets the less cool it gets. This for sure isn't only about black and white but about many shades of gray. But I see Contiki deliberate at the very edge. For me personally even the 6502 TCP/IP stack is an obligatory part of the story. The CS8900A Ethernet controller wasn't designed to offload something from (too) weak machines. It was a standard part of its time just doing the usual thing: Primarily Manchester coding and frame handling incl. CRC.

 

That's btw. the reason I'm not personally interested in combining Contiki with the W5100 TCP/IP stack. The TCP/IP stack of the W5100 allows for different, new things. But Contiki is cool as it stands. Just my two cents.

 

If I really wanted to provide the most useful web browser with the greatest experience on the Atari I'd create a proxy that knows the mode 8 format and streams mode 8 frames in real time. Just like games are nowadays streamed. The Atari does two things: a) Pull the stream and write it into its video RAM b) Push keyboard and mouse events. The proxy would run something like an old version of Opera Mini targeting old mobile phones with pretty lores graphical b&w displays. So you'd get different fonts, font sizes, graphics and even some JavaScript support (at least for the page onLoad() event), <...>.

 

Regards,

Oliver



#15 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Wed Aug 12, 2015 1:55 PM

Hi,

 

Or maybe the CONTIKI web-browser itself would be able to process mobile versions of the web sites directly?

 

I explicitly added support for MIME types like 'application/vnd.wap.xhtml+xml' beside 'text/html' for that reason - together with general XHTML parsing support. You may want to check out so called "WAP 2.0" portal pages.

 

Or you try the "Google Mobilizer". It's a proxy converting web pages into WAP 2.0 pages. Just type something like http://www.google.co...://atariage.com

 

Regards,

Oliver


Edited by ol.sc, Wed Aug 12, 2015 2:02 PM.


#16 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,279 posts
  • Location:USA

Posted Fri Aug 14, 2015 4:37 AM

Think I may have found a small issue in the DHCP client in ipconfig.com. According to RFC2131 a client is supposed to send a DHCPREQUEST message with the same 'xid' as the corresponding DHCPOFFER message from the server, but ipconfig is using a different xid. I ran into this problem with a custom dhcpd implementation that validated the xid field (which apparently most dhcpds don't). This is what I'm seeing:

client > server: DHCPDISCOVER, xid=1
server > client: DHCPOFFER, xid=1
client > server: DHCPREQUEST, xid=2

Apparently, lwIP had the same issue:

 

http://savannah.nong...?40303#comment2



#17 Ripdubski OFFLINE  

Ripdubski

    Stargunner

  • 1,246 posts

Posted Fri Aug 14, 2015 9:05 PM

Very cool!



#18 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • 562 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Sat Aug 15, 2015 7:10 AM

Well, it doesn't play Youtube videos yet ;)

And seriously - I tried it in Altirra and I'm really surprised how good it works :thumbsup:

 

sio2bt1.png sio2bt2.png sio2bt3.png sio2bt4.png

 



#19 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Sun Aug 16, 2015 3:19 AM

Hi,

 

Think I may have found a small issue in the DHCP client in ipconfig.com. [...]

 

I haven't looked at the Contiki/uIP DHCP closely so far. Maybe you could do so and create a pull request with a fix for https://github.com/contiki-os/contiki? I'd commit to create new disk images with the fix and upload them here...

 

Regards,

Oliver



#20 JAC! OFFLINE  

JAC!

    Stargunner

  • 1,550 posts
  • Always looking for GFX and MSX for my demos
  • Location:Lebach, Germany

Posted Sun Aug 16, 2015 3:41 AM

Just wanted to PM the contact details of a guy I got to know who is also into Contiki - now I realized, it's you :-)



#21 puppetmark OFFLINE  

puppetmark

    Dragonstomper

  • 710 posts

Posted Mon Aug 17, 2015 7:37 AM

Hey everyone,

 

I just wanted everyone to know I have updated the Atari Ethernet website with the latest Contiki, some website fixes and the current status of the hardware.  I have been enjoying and  monitoring this thread as well as the one on the WIZNET W5100.

 

I know have been pretty quiet on the forums over that last couple of years, and I am not going ot talk about that here, but sometimes life gets a little crazy.  Anyway,  I just ddidn't want the project to just be "hanging out there" without any movement for so long, and Olivers great work on Contiki prompted me to update the project Status.  The bottom line is that I will continue to support the Dragon Cartridge, but I agree that the W5100 would be the better solution moving forward.  I will let the hardware up so someone else, but I will certainly help out if anyone needs anything from the project and I will continue post updates on the  website.  I don't think at this point I am going to do another run of cartridges, but if anyone else would liike to give it a try, I also posted a schematic for the single board cartridge that would not require the now discontinued IP dragon breakout board.  It should also fit just fine in a standard cart shell if layed out carefully.



#22 puppetmark OFFLINE  

puppetmark

    Dragonstomper

  • 710 posts

Posted Mon Aug 17, 2015 11:32 AM

Sorry for the bump, I fogot to put in the website URL in case anyone is unfamiliar:

 

http://www.atari8eth....com/index.html


Edited by puppetmark, Mon Aug 17, 2015 11:33 AM.


#23 ol.sc OFFLINE  

ol.sc

    Space Invader

  • Topic Starter
  • 49 posts

Posted Tue Aug 18, 2015 6:32 AM

Hi,

 

I just wanted everyone to know I have updated the Atari Ethernet website with the latest Contiki, some website fixes and the current status of the hardware.  I have been enjoying and  monitoring this thread as well as the one on the WIZNET W5100.

 

As starter of this thread I feel entitled to add some words from my perspective...

 

First of all: Without you donating a Dragon Cart both to Chris and me the current Contiki wouldn't exist - thanks :-)

 

Regarding the (CS8900A-based) Dragon Cart vs. a potential W5100-based cart:

 

- The Dragon Cart has been - at least to my knowledge - the first Ethernet solution for the 8-bit Atari. Whatever should follow, that's still a fact !

 

- Even if there should be no more Dragon Carts built it's already virtually immortal through Altirra's Dragon Cart emulation:-)

 

- Even if there should be at some point a W5100-based cart that doesn't mean for me to drop Dragon Cart support. Remember that on the C64 there is no momentum for a (directly 65xx-accessible) W5100-based solution because of all the existing CS8900A-based software. That means to me that for all cross-machine projects (like Contiki) a 6502 TCP/IP stack with two Ethernet drivers (for the CS8900A and the W5100-Raw-Mode) will stay state-of-the-art. Not even talking about not just leaving the numerous customers of CS8900A-based solutions on the C64 and Apple II behind.

 

And finally: I would be very unhappy if my babbling about a W5100-based cart would be the reason for you to not realize your idea of a module-less CS8900A-based "Dragon Cart II" - without any alternative actually existing for Atari users interested in Ethernet connectivity !

 

Just my two cents,

Oliver



#24 danwinslow OFFLINE  

danwinslow

    River Patroller

  • 2,531 posts

Posted Tue Aug 18, 2015 7:56 AM

For my part, the dragoncart driver software can be adapted to a W5100 easily, as the raw mode is very similar. I'm continuing forward, I just started the TCP part yesterday. UDP and ICMP are working well, and are accessible from any language that can make CIO calls. With this, plus the amazing Contiki, and future hardware I think we are really moving the Atari forward into new realms.


Edited by danwinslow, Tue Aug 18, 2015 7:56 AM.


#25 puppetmark OFFLINE  

puppetmark

    Dragonstomper

  • 710 posts

Posted Tue Aug 18, 2015 11:26 AM

Hi,

 

 

As starter of this thread I feel entitled to add some words from my perspective...

 

First of all: Without you donating a Dragon Cart both to Chris and me the current Contiki wouldn't exist - thanks :-)

 

Regarding the (CS8900A-based) Dragon Cart vs. a potential W5100-based cart:

 

- The Dragon Cart has been - at least to my knowledge - the first Ethernet solution for the 8-bit Atari. Whatever should follow, that's still a fact !

 

- Even if there should be no more Dragon Carts built it's already virtually immortal through Altirra's Dragon Cart emulation:-)

 

- Even if there should be at some point a W5100-based cart that doesn't mean for me to drop Dragon Cart support. Remember that on the C64 there is no momentum for a (directly 65xx-accessible) W5100-based solution because of all the existing CS8900A-based software. That means to me that for all cross-machine projects (like Contiki) a 6502 TCP/IP stack with two Ethernet drivers (for the CS8900A and the W5100-Raw-Mode) will stay state-of-the-art. Not even talking about not just leaving the numerous customers of CS8900A-based solutions on the C64 and Apple II behind.

 

And finally: I would be very unhappy if my babbling about a W5100-based cart would be the reason for you to not realize your idea of a module-less CS8900A-based "Dragon Cart II" - without any alternative actually existing for Atari users interested in Ethernet connectivity !

 

Just my two cents,

Oliver

 

 

Thank you for the kind words Oliver.  I am very proud of the work we have done.  After lookig into the W500, I just think that might have more potential than the Dragon Cart, but it only had a small part in my decision to put the next hardware production oh hold.  You make a great point though, It is the only Ethernet solution for the Atari 8-bit at the moment, so I will certainly keep supporting it.  I still might do a run of single board Dragon Carts,  just not right now.  All the information is on the project site if anyone else wants to design and do a run of circuit boards  and / or carts.  I actually have a couple other Atari projects would like to work on as well, and I would to put some time and effort into those.  In the mean time, I will continue to support the Dragon Cart hardware that is out there, keep the website up to date,  and I will make sure I put some time aside to test any new software that comes along.  I am looking forward to being more active on the forums again as well.

 

Also,  I mentioned on the project website,  I am going to try out a new type of circuit board prototyping device that might make it very feasable to make short runs of circuit boards like Atari Cartridges, but I am not expecting the device until winter. The other issue I didn't mention in the availability of parts.  The CS8900a seems to still be pretty available, but the 10baseT transformer is getting REALLY hard to find.  Even the substitutes are getting rare.  I will look into getting parts from China, so I have some to build or share, I will have to see if that will be cost effective. 

 

I am really impressed at the software that has been done and how well it works on the Dragon Cart.  The fact that much of the work already done can be applied to the W5100 is amazing too.  I think Dan is right, these are new realms for the Atari, and it is exciting to see where it goes!
 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users