I just discovered the fun of writing small programs (Basic/asm) for an emulated C64 for me.

Unfortunately, I cannot get used to the emulated C64 keybord, and would like to write the programs on the Host-PC (Linux or Windows, doesn't matter) instead, and simply load them to the emulator

Does anyone know an easy way to do this?

(Or an emulator that simply accepts copy/paste of text dragged onto it?)

  • 1
    I think you may need to say more specifically what your host computer is. You're working on Linux? Some kind of Windows? (And then, is the question really about retrocomputing, I don't know...) Commented Mar 22, 2018 at 12:21

3 Answers 3


You can use petcat utility supplied with VICE emulator. Below is a .bat script which is smiliar to what I am using on my Windows machine.

SET VICE_PATH="C:\Program files\WinVICE\"

%VICE_PATH%\petcat -2 -o outfile.prg -- input.txt

IF %ERRORLEVEL%==0 %VICE_PATH%\x64 outfile.prg

Of course a smiliar script can be written for Linux/BSD in bash.

  • thanks a lot, VICE was really worth a try. It also accepts text files, copied from clipboard, like they've been entered on the keyboard.
    – Tommylee2k
    Commented Mar 23, 2018 at 8:11

If you're up for assembly programming, I can very highly recommend using the Sublime Text 3 KickAssembler package.

This allows you to edit a .asm file in ST3 with syntax highlighting. When you press F7 in the editor, it will compile your .asm file, start VICE and start executing your code in the emulator. Or if you don't like or use ST3, you can inspect the package source code to pretty much do the same steps in a script or in another editor.


Just ran on the same issue and the answers above did not help so my 5 cents...

So far it seems to me that the easiest way to deal with it is to use a simple script like this:

[ ! -f "$1" ] && { echo "usage: $0 filename.txt" ; exit 1; }
tr A-Z a-z < "$1" | petcat -w -2 -o "$1.prg" --

so basically lowercase the file and use the petcat tool that comes with VICE. The .prg file can be eg. copied on a .d64 (on Linux, FreeBSD eg. with c1541 or even mc, assuming that the prior is available in the system...) and loaded inside an emulator as usual (in VICE such a .prg file can be loaded directly).

Another way is just copy/pasting the text using the standard system's buffer - it works with VICE. I tried it but I find it not very comfortable (and it also requires lowercasing - otherwise the pasted code is a mess, the characters change into graphical petscii symbols...).

Btw. it is a pity that VICE does not provide a nice built-in solution like some other emulators (FS-UAE, Atari800, Hatari, ...) which allow to have a local directory with normal text files that can be loaded directly to the emulator like from a native disk image (or a hard disk), doing all the conversions on the fly. It would make things a lot easier and save time.

Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .