I’ve found myself recently needing a few utilities but for quick access I wanted to have them on a cartridge. I wasn’t able to find any clear cut information on how to exactly go about doing that so I decided to put this quick tutorial together.
Note: I’m doing this on MacOS so it should also work the same in any Linux environment. I’m not sure about Windows.
The first thing you’ll need to do is to make sure that you have Python installed.
The syntax is simple:
python prg2crt.py test.prg test.crt
This will convert the PRG file to a CRT file which can be used by any C64 emulator such as VICE but is not suitable for burning onto an EEPROM because it includes a header which is needed for it to work with emulators.
So what we need to do is to strip the header out and the easiest way to do that is to remove the last 8192 bytes from the file.
Fortunately, MacOS and Linux provide just the tool for the job.
tail -c 8192 test.crt > test.bin
Typing the above command will grab the last 8192 bytes from test.crt and output that into test.bin leaving us with a perfectly suitable file for burning onto an EEPROM.
Hope this tutorial helps someone. I mainly just post these for my own reference because as they are mostly just one-offs I tend to forget the process and often find myself digging through Google for that information again. So this will save some time in the future.