Programs C64

Internet on C64: Contiki

// Rian link copied

In this article series, we will set up the Commodore 64's internet connection step by step. We will start with web browsing, then move on to IRC, FTP, and other internet applications.

We will do all this using the VICE emulator, although the settings can also be used on real hardware.

Let's take a look at the browsers written for the C64:

Contiki 1.2

Contiki is an operating system for the Commodore 64 that includes a TCP/IP networking stack, a web browser, an IRC client, Telnet, and several other internet applications. Thanks to VICE's Ethernet emulation, these can also be tested on a PC.

This is one of my favorites because its appearance is eye-catching, and its runnable command-line functionality feels distinctly Linux-like.

Required software:

  • + VICE 3.9 emulator;
  • + Npcap is required on Windows/Linux so that VICE can access the network adapter through the PCAP interface.
  • + Contiki 1.2-devel1 - this includes Contiki and all of its extras, such as the web browser;
  • + Wireshark is recommended for troubleshooting, but it is not required. It allows us to log Contiki's network traffic to the internet.

Installing Npcap

VICE's Ethernet support relies on the Npcap package. During installation, you must enable WinPcap compatible mode, otherwise the PCAP driver will not work.

After installation, restart VICE so that the Ethernet backend can detect the Npcap driver.

Enabling RR-Net

First, Ethernet cartridge emulation must be enabled in VICE. This will simulate the Commodore 64 RR-Net network card:

In VICE, select Peripheral devices > Ethernet, choose pcap (PCAP) from the Ethernet driver drop-down list, and set Ethernet interface to the network device you use to connect to the internet (for example, a Wi-Fi LAN card or USB Ethernet).

In the VICE emulator, go to the settings and select the following:

  • + Under Ethernet cartridge, tick enable ethernet cartridge.
  • + Cartridge mode: RRNet;
  • + Cartridge I/O base: &dd00

In the Ethernet menu, select the PCAP driver, then choose the network adapter that actually has an internet connection. In our tests, the wired Ethernet adapter worked more reliably than Wi-Fi.

If several virtual adapters are installed on the machine (VMware, Wi-Fi Direct, firewall, etc.), always select the adapter that actually has an internet connection.

LOAD"*",8,1

run
Starting Contiki 1.2-devell
: TCP/IP
: CTK GUI
: Initial filesystem
ek-service: starting Filesystem
Starting process scheduling
Loading config.prg
Loading cfs-cbm.drv
ek-service: replacing Filesystem
Starting KERNAL CFS
Loading ctk-80col.drv
                               @

The boot process is quite informative: Contiki initializes the TCP/IP networking stack, the graphical user interface, and the file system in sequence, then loads the driver that provides the 80-column display.

Contiki 1.2-devel1

Configuring Contiki

Use F5 and F7 to navigate up and down, press RETURN to select an item, and use F1 to open the menu.

Start Contiki, then click the Configuration icon. Enter rrnet.drv in the Net driver field. (It did not work for me with eth64.drv, even though Contiki supports it as well.)

Network Setup

  • + Net driver: rrnet.drv
  • + IP address: manually enter an IP address that is likely to be free (for example: 192.168.1.200)
  • + Netmask: 255.255.255.0
  • + Gateway: router IP address.
  • + DNS: router or public DNS
  • + CTK theme: ctk-default.drv
  • (*you can also use ctk-default.drv and ctk-text.drv*)

If you are not sure what your router's IP address is, run cmd -> ipconfig in Windows and check the IP address shown for Default Gateway:

If everything has worked up to this point, the hardest part is already behind you. The next step is to load the first web page successfully in the browser.

After saving the configuration, start the rrnet.drv driver. If everything is configured correctly, Contiki will now be able to establish a TCP/IP connection.

During testing, the DHCP client did not work reliably, so we used a static IP address.

Start the browser

On the home screen, press F1 -> then choose run program -> and type www.prg - this method is more memory-efficient, but you can also try clicking the Directory icon and launching Web Browser from there.

It is important to note that Contiki's browser does not support HTTPS encryption, so only websites available over the HTTP protocol can be opened.

The CursorPunk website is particularly friendly to old browsers.

You can also choose the 40-column graphical mode. In the Configuration menu, set CTK theme to ctk-default.drv.

Or choose the text mode by entering ctk-text.drv:

Commodore 128

If you run Contiki on a Commodore 128 in native 80-column VDC mode (with a CGA monitor), this is the interface you will see. As shown in the image below, the display is sharper and much easier to read than the C64's software-based 80-column mode. During testing, it remained completely stable and I was not able to make it crash even once.