It’s been already a while since I got the uIEC – one of the available hardware running the sd2iec firmware. I did some experimenting with it on how to make the best use of it if the nicely accompanying JiffyDOS is not present. I posted my experiences at Lemon64 forums, but I thought it would be nice to share them here as well. Still, you might want to read that instead for shorter, less detailed description.
Note that I’m describing sd2iec-firmware being used on uIEC/SD-hardware with Commodore 64. Many different hardware combinations are possible.
With sd2iec loading files from the SD card’s root folder is like loading files from a floppy disk. The very basic loading procedure is exactly the same – except that the default device number is not 8 but 10. So LOAD”$”,10 or LOAD”GAME”,10,1 works just like one would expect.
Things get more complicated if you want anything more. Something like to enter a directory on the SD card or to mount a .d64 disk image. A real Commodore disk drive wasn’t designed for such things so you don’t even have the commands for something like that. Since uIEC is connected only to the serial port of C64 it can be interfaced only using the IEC bus. Enter the command channel! Everything like directory navigation, disk image mounting and device configuration is done by sending drive commands over the command channel.
The Drive Commands and Command Channel
The standard drive command syntax is:
OPEN 1,[device id],15,”[command]”:CLOSE 1
Using the standard syntax is very awkward – you don’t want that. Instead, you’ll be happy with DOS Wedge. With DOS Wedge you are able to use the much nicer syntax that is simply:
DOS Wedge is a command extension software that originally came with 1541 demo disk. I copied the DOS Wedge files “C-64 WEDGE” and “DOS 5.1″ to the root of the SD card from the demo disk. If you use PC for copying the files from e.g. a disk image you might want to remove the .prg file extension from the files. Otherwise sd2iec will include the file extension as part of the file name on the C64.
When DOS Wedge is on the SD card you are able to load it from there. Note that the DOS Wedge is set to work with device number 8 by default. Without modification it will fail operating with any other device number. To resolve this, the C-64 WEDGE can be modified to match the device number of uIEC. The file “C-64 WEDGE” is just a simple BASIC program that loads the actual software from the file called “DOS 5.1″. It’s easy to do the needed modification if you have even the slightest understanding of BASIC. On the C-64 WEDGE program listing at the end of line 10 it reads LOAD”DOS 5.1″,8,1. Edit this loading command to match your uIEC device number. Then save your modified program.
If you like things made ready for you, look at the end of this post for bonus download with already modified files.
Many utility and fastload cartridges also have the DOS Wedge command set or similar built-in. For example Action Replay is very useful even though its fastloader is not supported by sd2iec. Loading does work with Action Replay fastloader activated, but the loading reverts to kernal routine speeds. You still have all the Action Replay’s single-stroke directory listing and program loading and execution shortcuts and you can send drive commands using the @[command] method.
Speeding up loading times
DOS Wedge makes the using of sd2iec device much more convenient, but it won’t help the loading speed. A sd2iec device is practically as slow as a real disk drive because of the very, very slow standard data transfer protocol. If JiffyDOS were installed on the C64, the loading would be much faster. But when it’s not, a software implementation of the JiffyDOS transfer protocol comes into aid: SJLOAD.
Loading with SJLOAD from sd2iec device is very fast! Check the SJLOAD C64 DTV Hacking Wiki page for usage instructions. Especially note the command:
As it says on the Wiki page, this loading command autostarts SJLOAD and then fast-loads the given program! A very nice shortcut. The SJLOAD program file “!” has to be in same folder as the program to load this way though. You can also first load the SJLOAD alone and then start browsing the SD card. When SJLOAD is activated the command channel syntax is a little different. It’s VERIFY”[command]“. So changing into a directory would be VERIFY”CD:GAMES”. Also SJLOAD assumes the device number to be 8. This can be worked around in most cases by adding the right device number at the end of the command. Examples using the device number 10:
LOAD”!”,10,1 //load and autostart SJLOAD
VERIFY”CD:GAMES”,10 //change into directory GAMES
VERIFY”$”,10 //display directory
LOAD”PROGRAM”,10 //load file called PROGRAM
According to sd2iec documentation there are various other supported software fastloaders. Non-supported fastloaders will fail.
It is also worth mentioning that some cartridge fastloaders and also KERNAL fastloaders other than JiffyDOS are supported by sd2iec. Compatible cartridges include The Final Cartridge III (as noted by Andreas in the comments) and Epyx Fastload Cartridge. Other KERNAL fastloaders that will work are e.g. EXOS V3 and The Beast System.
The easiest way to browse the SD card and run programs is to use CBM FileBrowser or some similar program. CBM FileBrowser or other available file browsers make it really convenient to browse the SD card contents and launch the programs. But the slow loading speed remains.
Use SJLOAD with DOS Wedge or CBM FileBrowser
Things get really swift if you combine the usability of DOS wedge or CBM FileBrowser with the loading speed of SJLOAD. Here’s how you do it for DOS Wedge:
- Load and run DOS Wedge
- Load SJLOAD (can be simply done by entering “%!”)
Now you can use DOS Wedge as usual, but the only drawback is that you have to use the traditional loading command LOAD”PROGRAM”,[device id],1. The nearly instant loading speed should make it up though.
And for CBM FileBrowser & SJLOAD combination, enter the following (with appropriate device id):
Now you can browse the SD card with CBM FileBrowser as usual, but loading happens nearly instantly. If you only want to launch games etc. from your memory card, this method will surely not fall much behind from JiffyDOS equipped C64.
Here is a pack of files that you can directly put into your sd2iec device’s SD card and you’re off with the above mentioned things. These files are SJLOAD (!), CBM FileBrowser C64 (fb64) and DOS Wedge loader for different device numbers (WEDGEn, n=device ID). The same files are also included in .d64 disk image. For DOS Wedge you will need the file DOS 5.1 from 1541 Demo Disk. I did not include it because it is copyrighted piece of software.
I’m glad if you will find these tips useful for your C64 retro computing pleasure!