Sunday, 23 January 2022

C64 wi-fi modem

I received this wi-fi modem for the Commodore 64 already a few years ago. The board has no identification on it, but it looks like a bare-bones version of the same design that has been going around, like WiFi-64 and Strikelink.

Although there are various C64-cartridges that read SD cards, there are not that many direct file transfer solutions between PC<->C64. So I'm mostly looking at the modem from this angle. The modem sticks into the user port so it doesn't take the cartridge space.

The first time round I had some success with contacting a BBS, but the ftp, wget and other internet functions failed to work for me.

This was all because of not knowing one command! Re-reading the manuals, I found out I can upgrade the firmware directly with the terminal, connected to the internet (as it could do that much). After moving from version 2.62 to 3.6.4 I got the wget file transfer working.

From here you can download the disk image with C64NET WiFi apps by Bo Zimmerman. These are BASIC programs for various tasks. The site also has more comprehensive manuals. 

A better terminal, such as the CCGMS, is useful for contacting Bulletin Board Systems, but that's not my focus here. The minimal CBMTERM included in the apps disk is enough for adjusting the modem parameters.

From the same disk, CONFIGURE is for the first-time setup of the modem. It didn't do anything meaningful now that it seems I've run it before. Sadly I didn't make notes then. After the basic configuration has been done, the CBMTERM can be used for changing the network and the network password.


Terminal

CBMTERM is a simple terminal mostly useful for sending those AT commands to the modem.

Here are some of the commands to try:

ATE1 for command echo might be needed if you don't see the characters you are typing.

ATW lists available and compatible wi-fi networks, together with signal strength.

ATW "[SSID],[PASSWORD]" will connect to a wi-fi network.

Note that this will respond with "ok" if it was succesful, and with "error" if the SSID is wrong or the password is wrong. 

The CBMTERM runs in lowercase, but everything you type in lowercase is actually uppercase in the outside world. So if your wi-fi network name is XYZ5235, you'll type xyz5235. Same with the password. 

My network name had a _ character, this shows as a left arrow on C64, and can be typed in as such.

ATI gives information on firmware and the wi-fi network.

AT&U shows if you can download a newer firmware.

AT&U6502 then actually downloads and installs the firmware. Despite instructions I didn't need to physically reset the modem. Of course if the service ceases to exist, the firmware update can't be done.


Moving files

Again from C64NET WiFi apps disk, the WGET can be used for downloading a file from a web address. The output filename and type has to be defined here too. The default suggests a sequential file, but if you download a prg the line has to read something like @0:myprog,p 

I first tested the wget with the default example, downloading index.html from Bo Zimmer's page. Then I moved to downloading a C64 program file available elsewhere on the internet.

Of course, downloading a file from a web server on your local network is ok, using the IP address. So if the server is set up then for me http://192.168.###.###/index.html could be downloaded.

The bytes will mosey down the tubes to your Commodore 64 drive. Even if the interface was improved (and why not, it's in BASIC), the downloading won't be especially fast.

After setting up an ftp server on a Linux over the local network, I could also try the FTP program supplied for moving files between my Linux and the C-64. The program asks for the ftp address (in this case an IP address), the username and the user password. Then it's ftp commands all the way.

The ftp is already more handy for transfering multiple files, but I have to say that handling the switch between passive/binary mode and such, also takes time.

Some observations

A wi-fi modem that runs on 1200 or 9600 baud max, isn't going to be the final solution for immediate transfer between PC and C64. But I can see it could reduce the need for swapping that microSD card.

Now I simply tested the features and downloaded everything on the mounted C64NET apps disk image. Later, I'll have to think about how and what I am going to mount on the SD card reader and when.

As the programs are in BASIC (with shared M/L libraries), some ease of use could be achieved by rewriting the programs to apply to my local situation. For example I could modify the program to default to my local ftp server address, or just making the connection directly.

I mostly used the modem in conjunction with the SD2IEC+Epyx Fastload combo catridge, with the fastload on. This worked fine, although it seemed to me that after I'd broken out of a "modem session" using RUNSTOP/RESTORE, the SD2IEC lost the disk mounting.

Using the Ultimate 1541 II with the Action Replay VI cart, I couldn't get the software to run. Moving over to using the Epyx Fastload cartridge all seemed to work better. 

However, with Ultimate, on occasions the FTP app produced hiccups and a file refused to load completely. This is not a final judgment about these cartridges, it might just be bad luck and the problems could just as well appear with the SD2IEC+Epyx. I could try to test this more.

But certainly I'd recommend testing the modem first with a more "clean" Commodore 64.

Saturday, 15 January 2022

SD2IEC+Epyx Fastload combo cartridge

SD2IEC + Epyx Fastloader cartridge

SD2IEC has long been the sort of standard inexpensive way of accessing C64 files from a modern media. But it only becomes powerful when combined with a fastload cartridge such as Final Cartridge III or Epyx Fastload.

Juggling with the carts and power cables can be a chore, so someone got the clever idea of combining the fastload ROM with the SD2IEC for the Commodore 64. Here's a DIY version, my cart was based on this design. This was acquired from a certain tinkerer from Akaa, which I'm beginning to think is the C64 capital of Finland.

So, one-cart does all, and as a bonus it gets rid of the 5V power cable. As is usual with drive emulation, the serial needs to be connected.

Just as the plain SD2IEC, the cart has buttons for mounting the next/previous disk image and DIP switches for setting the device number. The Epyx combo comes with a reset button, drive reset button and a serial through-port has been included so for example a real drive can still be connected.

Switch the fastload on and turn on the C64, you'll see the minimal "fastload" message.

Epyx fastload cart isn't the most comprehensive or user-friendly cartridge, but it has enough functions, mostly single-character shortcut commands, a DOS wedge, disk operations menu and even a minimal monitor. It's worth reading through the manual.

LEDs shouting. At top, prev/next buttons and the drive reset. At right, C64 reset.

%filename loads machine code files, $ brings up the directory without erasing your BASIC listing. C= together with Run/Stop loads the first file on the drive.

My tiny gripe with Epyx is that $ for viewing directory is quite slow, and the loading commands don't auto-run files. Unlike other carts, the function keys do nothing. But then again the SD2IEC system works fine with the fileselector.

Plain SD2IEC also works with VIC-20, Plus/4, C16, C128, whereas this combo cart only works with the C64, so bear this in mind if you have more hardware.

Ahhhh.... weekend

For example, I copied my old SD2IEC card contents to my computer, then copied only my C64 folder to the new microSD card and the fb64 fileselector. This way, using C= + Run/stop keys I can run the selector almost instantly after turning on the computer.

There's a button on the cartridge that resets the drive. So if you have previously mounted a disk using the fileselector, you can reset the cart, press this button and bang, you are at the root and can run fileselector again.

Most people probably get the SD2IEC to load games and demos, but as a drive emulator it's also versatile for development on the C64, for saving and loading BASIC files for example. In this case it's probably better to work with the root directory, even if it can get cluttered eventually.

It has to be remembered the SD2IEC is not 100.0% compatible with a C64 floppy drive and especially fastloaders give trouble, but it's true enough and if you find a game that doesn't load there's probably a version somewhere that does.

I've also seen a variant with changeable EPROM, which could be nice for that added tinkering value.

Physically the SD2IEC+Epyx cart looks like a heavy deal, and it is quite close to the core functionality of the mighty Ultimate: a drive emulation with built-in fastload. However, the Ultimate also offers much, much more, such as injecting PRGs directly to memory, choice of cartridges and so on.

Still, the Epyx combo is very neat and not too expensive package for the Commodore 64.