Tips for using sd2iec

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.

The principle

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

where [device id] is the device number of uIEC and [command] is the command for sd2iec. The sd2iec user manual and a list of commands can be found here, on the sd2iec project page.

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

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.

Editing C-64 WEDGE BASIC 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:

LOAD”!*PROGRAM”,[device id],1

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.

File browsers

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:

  1. Load and run DOS Wedge
  2. 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):

  1. LOAD”!*FB64″,10,1
  2. RUN

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.

Other utilities

For copying between sd card and a real commodore disk drive or transferring disk images I’d suggest trying CBM-Command or DraCopy.

Bonus download

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.

Bonus pack (zip, 6 kb)

I’m glad if you will find these tips useful for your C64 retro computing pleasure!

18 Responses to Tips for using sd2iec

  1. Chris says:

    Great article, thanks! How easy is it to switch between disk images once a game is up and running though? I assume you can’t get into the Filebrowser at that point.

  2. ilesj says:

    File browser can not be accessed, but two possibilities comes to my mind:

    At least with uIEC and its daughter card it’s very easy with some preparations. One of the buttons in the daughter card can be used for disk change. This requires a swap list file on the folder that is currently in use. Search for chapter “Changing Disk Images” in sd2iec readme file (link in article).

    The other way I can think of is with the help of a freezer cartridge. Freeze the game, and if there is a way to enter drive commands in the freezer menu, you should be able to change disk images or what ever :)

  3. xdr says:

    I found a couple of problems with using these on sd2iec, namely the sjload wont start, it just resets c64. Maybe this one is for uIEC only or device #10?
    With recent updates there is two buttons you can use to switch disks, next and previous.

  4. ilesj says:

    It’s hard to tell what causes the SJLOAD to reset your C64, but it should work with both SD2IEC and uIEC as they run the same firmware. It’s definetely not uIEC only, as SJLOAD can be used also with JiffyDOS equipped floppy drive.

    SJLOAD itself can be of course loaded from any device number and it works with any device number in most cases.

    Everything else works OK and you can load other files with your SD2IEC?

  5. […] anything like me, you’ll probably insert it upside down. Like I did. But bloggers like Ilesj are helpful, and I wanted to do something similar. Please comment if you find any mistakes or have […]

  6. Andreas says:

    Very interesting article, but from own experiences with my SD2IEC i knew the most things before. One thing you should mention too – when using, for example a SD2IEC, together with the Final-Cartridge-3, then the fastloader of the cartridge also stay alive, when using SD2BRWSE or CBM-Filebrowser. Which makes it very easy to use, when renaming the filebrowser then to “00” and copying it in every folder on the SD-Card. Because then this is always the first file in every folder and can be loaded with a simple click on F5, where the FC3 has the command “load”*”,8,1″.So this is perfect solution. No more typing anyway, just turn on C64, press one time F5 and CBM-Browser is loaded, then press F3 to run it. And now you have Filebrowser with active FC3-Fastloader. Start a game – when you want to play the next – make Reset on FC3-Cartridge, click F5 then F3 and Browser is ready again for the next game. In my opinion, the perfect solution to wirk with SD2IE. You just need a good cartridge with a compatible fastloader, like for example the Final-Cartridge-3.

  7. Andreas says:

    One thing i forgot in my post above – that the thing with the F5-loading works, you must let a file-sorter over your SD-Card before, because only then the files are sorted alphabetically. Otherwise the SD2IEC sort the files on the date of origin.

  8. Tuksu says:

    The date of origin approach does not seem to work, at least for me. Can somebody recommend a file-sorter that would run on a Windows-PC or a Mac? Ubuntu would do as well.

  9. Mr. Bróg says:

    Will SJLOAD improve load times on directory listings aswell? A directory with hundreds of files takes ages to read, at least in the cbm filebrowser.

  10. Andreas says:

    Tuksu look here, this works perfect as a file-sorter:
    This windows-program was actually written to sort files on a SD-Card for the Dingoo-Handheld, but it works for every hardware which dont sort files alphabetically. Let this program run over your SD2IEC-SD-Card and use “subfolder on” mode. It will need a little bit, when you have lots of files on it, but after this, all files are sorted alphabetically and then you can do, what i describe above with the renaming of the sd2brwse-browser to 00. Then a simple click on F5 on your C64 and the file-browser was loaded and FC3-fastloader is on. Perfect using of SD2IEC.

  11. RickR says:

    This is awesome. Thanks for writing this and providing the bonus pack. I’m using these commands on an sd2iec:


    And everything is loading FAST. Finally, I can enjoy the 64 without getting aggravated at the slow load times. THANK YOU.

  12. Andreas says:

    Yes RickR, you use SJLOAD, which can be seen on the ! in your load-commando. SLOAD is a very fast and good fastloader. The only bad thing is, that it is still only a programm and you must still type commandos. When using a hardware-cartridge together with the SD2IEC, like for example the FC3, then no more typing is necessary to start a browser and you always have the FC3-fastloader active.

  13. […] GitHUB do Projeto Página do Retrocomputaria sobre o CBM-1541 Wikipedia sobre o CBM-1541 Pinagem dos conectores do Commodore 64 Dicas e Truques para usar a SD2IEC ( Leia! Vale à pena ) […]

  14. Anonymous says:

    I can use My uiec SD but there are issues with recognizing some filetypes that the uiec cannot recognize. I have noticed this with copying floppy disks into their own directories, then sometimes I get this error: this filetype cannot be written to SD. What would cause this?

    • ilesj says:

      The error message seems self explanatory. Afaik some CBM-DOS file types require a container (e.g. a .d64 file) until they can be written to a different file system. If you are copying or backing up complete disks, I would recommend writing them into disk images instead. Check CBM-COmmand for example

  15. Olga Machslochoff says:

    The newer firmware-versions of the SD2IEC dont support m2i-files anymore, so those files must be converted to another format, like for example p00-Files. Many SD2IEC-users have big m2i-file-archives on their SD-card. First this convertion was only possible by using the command-line tool m2i2pc64, now this is also possible by using the newest beta-version of 64Copy. m2i is now integrated into 64Copy and files can be easily converted in d81 or p00 (PC64 files) by using the nice GUI of the program. Look here at the entry from 01.Feb.2016:

    Here is the side english-translated:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 40 other followers

%d bloggers like this: