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.
#c64 fans. Is there any way to drag/drop a d64 image onto Vice so it does NOT autostart with LOAD "*",8,1 ? I'd much rather a directory listing most of the time. I know about the autostart checkbox in the file dialog.— Donncha Ó Caoimh 👤 (@donncha) August 17, 2018
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/x64.app/Contents/MacOS/x64 -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! 🙂