Vice – autostart with a directory

Vice, the Commodore 64 emulator is a cross platform emulator that works on Windows, Linux, MacOS and other operating systems. It also allows you to emulate the Vic 20, C128 and other early Commodore machines.

Double clicking on a Commodore d64 disk image file will load x64, the Commodore 64 emulator and load the first programme on the disk image.


Quite often I want to look at a D64 image directory listing instead of running the first programme on the disk.

You can do this by unchecking the “autostart” box on the file open box of course but it’s not as convenient.

So, last Friday I asked on Twitter if it was possible to drag and drop a D64 image onto Vice to display the disk contents. Logiker replied and helped me by DM to handle double clicking on a C64 disk image.

What I needed to do was load the disk image and then feed the directory listing command to the C64.


Getting MacOS to accept the command line was harder to achieve. In Windows you can change the start up parameters for a programme. In MacOS it should be possible to modify the emulator “package” with a script that calls the real executable but I couldn’t get that working.
In Linux I would have just created a shell script that called the emulator. 🙂

What did work in MacOS was using Automator. I created a “Run Shell Script” action and filled it in with the following. If you want to follow along at home you’ll have to change the path to x64.

/Applications/Vice64/ -8 "$@" -keybuf load\\"$\\",8\\nlist\\n

I saved that as a new app in ~/bin/ called “Vice64”, and associated all D64 images with that application. Now double clicking on a disk image shows me a directory listing!

It doesn’t work unfortunately when I have an Action Replay cartridge loaded. Maybe I need to add F3 or F7 to the keyboard buffer?

One of the advantages of looking at the directory structure is the directory art some demos have. Here’s one from Pearls for Pigs, a D64 I happened to use while testing this but there are loads of them. I saw that Logiker has a page dedicated to directory art!

Happy times! 🙂

By Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

1 reply on “Vice – autostart with a directory”

I never did manage to stuff F7 into the keyboard buffer but I recently tried again and came up with an alternative. Use a “blank” config for loading in “Assembly” and Gamebase64 because Warp drive takes care of loading fast and then create apps, or shortcuts that load a different config using “-config” that load the Action Replay!

Leave a Reply