Commodore 64 CrossDev

So developing for the Commodore 64 in Assembly language is fun, and with all the modern tools such as emulators and cross compilers, it’s probably easier than ever to create useful programs much faster than we could 30 years ago.

Additionally, modern SD card storage solutions make them easily tested on a real C64 – how convenient!

However, when trying to build a piece of hardware to interface with one of the computers expansion ports, developing using emulation isn’t much use since any physical signal on the port cannot be replicated in the emulator.

Until recently, all my assembler code has been manually entered on a physical C64 using a machine code monitor like in the image below.

While this works great, manually keeping track of the memory locations for each piece of code when creating subroutines, branch instructions etc becomes very difficult the larger a program becomes. Not to mention the trouble that is caused should you need to insert instructions or move them around, since any references to the old locations will need updating too and this quickly becomes a tiresome task and makes the program difficult to debug!

There are programs available for the C64 which can help with this, such as Turbo Assembler which allows you to enter assembly code and use labels to refer to parts of the code, which can then be used later instead of an explicit memory address. This allows the computer to take care of all the memory locations and all you really need to do is tell it where in RAM you would like the program to begin.

However, before I began to re-input all my code in Turbo Assembler, I decided to see if there was any way of coding on a Windows PC, and somehow sending the code to the real C64 instead of an emulator. Well, of course there is… all you need to do is copy the compiled PRG file to an SD card then load it manually on the C64! While this would work, to do this every time you make a minor adjustment makes it a less than useful solution. So I have been looking for a cross-development solution that would allow me to send the code from the Windows IDE to the C64 to be executed using a direct connection of some sort.

I found in my box of parts an RR-NET Mk3 board which may have done the trick using the CodeNET server it contains – this allows a PRG file to be sent from a computer over a LAN and be executed on the C64. Sadly, despite having never been used, my RR-NET card doesn’t work so I had to abandon it.

I then looked at my EasyFlash 3 cartridge.

This thing is really is a superb bit of kit! The ability to load freezer cartridge roms and other cart games, utilities and alternative ROMs make it more than worth the price (including the extra £18 import duty I got stung with!).

Then I looked at the mini-usb port on the right hand side of it.

Now, I have never used this USB port before, and I assumed it was for programming the cartridge ROMs from the PC (I always program the ROMs using SD2IEC). While that was indeed true, the good news is that on the website there is a download named EasyTransfer which includes a command line app, ‘ef3xfer.exe’. This was exactly what I was looking for!

This small program runs from the Windows command line and allows sending a PRG file to the EasyFlash 3 over the USB connection, which is immediately executed on the Commodore 64 as long as it is currently on the EasyFlash menu.