PDA

View Full Version : Copying C64 programs on a PET?



Eudimorphodon
June 9th, 2014, 02:02 PM
I'm sure this is sort of a dumb question, but...

This weekend a friend who's moving gave me a Commodore 64C (in its box!) on the condition that I also take a 1702 monitor he also didn't want to pack. (I haven't fired them up yet, but I assume they work.) My entire Commodore collection consists of PETs in various states of repair; I have no C64 software nor any peripherals *except* I happen to have a working MSD SD-1 "Super Disk" drive that has both IEEE-488 and C64 IEC Serial. I also have one of Gubbish's nifty PETDISKs, so here's the question:

If I were to extract the .prg programs from a .D64 image file (or find them ala carte) and copy them to the PETDISK is there a simple way I could then use my trusty (well, trustiest of the machines I have) 4032 to copy it from the PETDISK to an actual floppy in the SD1?

(Pre-emptive edit... I'm digging through the zimmers.net ftp site and I see several disk image tools for restoring .d64 files to an actual floppy and vice-versa. Anyone know if those will run off the PETDISK and do the right thing? I've also seen reference to a copy utility called "Unicopy", all I can find on Zimmers is a version in the c128 section. Would that do the job if I could find the PET version?)

Thanks.

gubbish
June 9th, 2014, 02:56 PM
If you have the programs as .prg files, then you could connect the PETdisk to your 4032, and connect the SD-1 to the passthrough connector on the back of the PETdisk. Just make sure the PETdisk and SD-1 are set up as different device numbers, and you should be able to load the files from PETdisk, then save them to the SD1. The PETdisk is configurable as dev # 8,9,10, or 11, so should be able to pick a number that won't conflict. One thing to note is that I've seen that if there's another IEEE-488 device plugged into the back of the PETdisk, if that device is powered off, it seems to have a loading effect on the PETdisk that prevents it from loading properly. So make sure your SD1 is turned on when doing this :)
Also the disk image utility would most likely not work on the PETdisk, as it only has support for SAVE/LOAD commands and doesn't currently have .d64 support. I've been able to copy some programs using an SFD-1001 and a PETdisk, so it should work with your configuration (hopefully!)
-Mike

dave_m
June 9th, 2014, 04:04 PM
I've been able to copy some programs using an SFD-1001 and a PETdisk, so it should work with your configuration (hopefully!)


I have done it also with PET programs from the PETdisk and the 4040 disk drive, but if the programs are for the C64 then the address load point is different. The C64 loads BASIC programs at $0801.

A tedious way is to load the C64 file from PETdisk into the PET and then use the machine language monitor to find where the program ends. For instance if you find that the BASIC program is from $0801 to $1000 then you can SAVE using the machine language .s command.

Syntax is:

.s "filename",08,0801,1001

If you are saving to a dual drive system, then make sure you specify the drive number:

.s "0:filename",08,0801,1001

I think there are easier ways to do this that others may know about.

carlsson
June 9th, 2014, 11:47 PM
I don't know if it is the best, but I seem to recall that CBM-Command exists in a PET version (PET-Command?) which might be useful.

Otherwise, if you have some soldering skills, a PC with a parallel port, a couple of suitable Schottky diodes and the right connectors, you could whip together an XM1541 cable to go between your PC and the SD-1 without involving any PET, but perhaps that is not an option.

Eudimorphodon
June 10th, 2014, 09:00 AM
Also the disk image utility would most likely not work on the PETdisk, as it only has support for SAVE/LOAD commands and doesn't currently have .d64 support.

The utility I was looking at on Zimmers' is a thing that loads a .D64 file off one device (using sequential file I/O) and writes it out to another compatible device. (The idea of course would be to put that utility and the .D64 file on the PETDISK and try targeting the SD-1.) I've also seen some BASIC file copiers (I wish I'd saved my last Google search, one of them pointed to a post on this forum) that apparently can copy programs by opening the source as "file" and writing a clone of it into a different file. Does the PETDISK support the file I/O commands or is strictly only working for SAVE/LOAD operations?

I guess before I get too far ahead of myself I suppose I should make sure everything works together. I *hope* I have a IEC serial cable; I'm pretty sure I grabbed one (maybe a couple?) when I got the SuperDrive with thoughts that I might make a XM1541 cable, but the PETDISK came along before I ever got to that. If I don't have one I guess I'll have to solve that problem first. :)