Wednesday, January 11, 2017

So, What's New? A WiFi Modem, That's What!


I haven't updated the blog in awhile, but this is not because I've been idle.  In fact, I've been so constantly busy on Commodore things that I just never took a breath long enough to talk about it.  As a result, you can expect an endless barrage of posts as I try to get you, and my future self, caught up.



The Commodore WiFi Modem project has been an effort by our local Commodore users group, and has been progressing nicely, both at the hardware and software level.  A WiFi modem is a wireless ethernet device usable by Commodore computers.  Anyway, as I've been handling the software side, I'll talk a bit about the hardware side first.

Shown above is the REV1 fab.  We (CTCUG) are just days away from Carlos having REV2 in his hands.    REV1 featured a fully powered ESP8266 board with proper RS232 levels for the Commodore 64 and 128, allowing basic KERNAL I/O between the two.  REV2 will feature DCD detection for BBS support, and support for UP9600 in C64 mode.  It will also have an optimized and cheaper design, and be only half the length of REV1.

I've done almost all of my software development using the REV1 board, as well as my own hand-made version.



I have several features I desire in a Commodore 8-bit internet device, which this WiFi modem is capable of fulfilling, with the right firmware.  These desires are:

  1. Uses the User Port (No cartridge port/bus hogging)
  2. Supports KERNAL RS232 (easy simple BASIC/ML programming)
  3. Does not hog system CPU/Memory (the TCP stack is in the device, not the Commodore)
  4. Supports socket listening and multiple client connections.
  5. Supports both streaming and controllable packet-based data.
  6. Supports CRC for error detection and correction of packet data.
  7. Can look enough like a modem to the Commodore to support old BBS programs.
  8. Supports boot-options (again, for BBS support)
With those goals in mind, I wrote firmware for the ESP8266 that would run in this device, which I called Zimodem.   The project is mirrored here on GitHub. 



After some initial frustrations, development went pretty well.  If you check out the build instructions, you'll see that I had all kinds of problems with the ESP8266 Arduino libraries.  And I probably should never have bothered with trying to program for it using Arduino IDE, but, well, it seemed like the best idea at the time.

To make a long story short, all of the features listed above, and many more, are implemented, with periodic bug fixes as the capabilities are tested and stretched.

While the initial landmark was being able to use a standard Commodore terminal program, such as Novaterm in the picture above, to connect to MUDs and BBS programs, the second landmark of a suite of internet applications that run natively in the C64 and C128 is also coming along.


Here is my C128D testing an early version of the IRC chat client.  Like all the clients, the same BASIC program works in a C64, in a C128 in C64 mode, in a C128 in C128 mode, in 40 or 80 columns.  The biggest difference is which machine language support file it loads.  All the clients will be made available on my ftp site, and in a separate GitHub project when available.

In addition to the IRC client, a TELNET client has also been completed, which does full ASCII/PETSCII translation, supports color as far as it can, supports TELNET codes, at least to the extent of eating them, and supports local keystroke echo, all in super-fast machine language core wrapped by the BASIC handler.  It also has a little phonebook that gets saved to your disk.

A WGET client has ALSO been completed, which allows any text or binary file to be downloaded from a non-SSL Url off the internet.  So, if the URL starts with HTTP://, it can probably download it to your commodore.

Lastly, an FTP client is currently in the works.  It uses PASSIVE modem FTP to get around firewall issues, although early tests with non-PASSIVE socket listeners were also promising.  This will be super cool.

Beyond these, a special MUD client, similar to TELNET except for some extra features unique to MUD clients, will be done.  A special C= BBS client will also be done.  It's also similar to TELNET except that it skips ascii and telnet translation.

So, that's it.  Keep your eyes posted here for more updates!






















4 comments:

  1. I'm very interested in the BBS client. Any ETA?

    ReplyDelete
  2. Hey Bo,

    Maybe for future revisions, you guys could include other other modern internet protocols like SSL, TLS, HTTPS, HTTP etc on the hardware itself so that we could see modern(esque) software to take advantage of this.....like Email clients, Chat programs, maybe a payment gateway like paypal....

    Any chance you could get into developing these applications for the c128 in 80 column mode?

    1) a modern email client
    2) an integrated chat application for whatsapp, facebook etc (if twitter is possible, why not these)
    3) a decent browser able to display black and white /grayscale images to access most sites given the limitations....something like the Singular browser. where we can download applications directly to our commodore instead of using a pc/mac as a proxy
    4)a twitter client for the c128 in 80 column mode(it already exists for the c64)

    wishful thinking?

    - Saveen

    ReplyDelete
    Replies
    1. An email client is definitely doable, though, with spam today, disk space might become an issue. :)

      To do that though, we'd almost certainly need SSL, TLS, etc. The problem there is free space in the microcontroller -- the core SSL certs take lots of memory. I'm hoping a future revision of the board will have the space for it.

      For chat, we have IRC! And there's also the CommodoreServer chat program. :)

      The biggest problem with a browser is JavaScript and CSS -- almost every page uses it. And of course the SSL problem needs to be solved first. Twitter also requires modern SSL.

      Basically, lots of possibilities open up with good SSL/TLS and all the certs.

      Delete
  3. You could probably host a Commodore App world like the google playstore or the apple app store, directly accessible by internet capable commodores and post your apps there for direct download for a decent sum (using google / apple costing model) linked to paypal or something.....make the commodore usable again !!!...i know, i know..i am dreaming much...but fingers crossed....

    ReplyDelete