Cosam,
I'd be interested to hear other members' experiences with transferring data from a PC to a PET. I'd like to be able to transfer individual files (such as a .PRG) as well as disk images.
CBM-HD looks nice, but seems to require more work hardware-wise than something like
cbmlink, which looks like it just needs a cable.
since I don't own any PET-compatible disk drive (yet), but happen to own a datasette (which works with both C64 and PET), I would take a diversion via a 1541 drive and a C64 to copy PET PRG files to tape. I already successfully used a program called Star Commander and one of the standard cable types (X1541 or so -- don't remember exactly) to copy C64 PRG files from a PC to a 1541. In principle, this should be possible with PET PRG files, too, which can then be loaded into a C64 and saved to tape. However, different measures have to be taken depending on whether we're talking about a BASIC file or a machine language binary.
The problem with BASIC files is the following: The PET's BASIC RAM starts at $0401 -- and that's also what the first two bytes of a PET BASIC PRG file should state. When loading such a BASIC program into a C64, it gets nevertheless loaded to $0801 (the C64's BASIC RAM) and automatically re-linked so that all "next line" pointers point to the appropriate addresses. The PET, however, seems incapable of relocating BASIC programs so that a program thus saved to tape does get loaded to $0401, but its "next line" pointers keep pointing to their C64-based $08something targets.
Fortunately, the C64's memory model can be adusted in a very flexible manner. The following program will re-configure a C64 to use $0401 as BASIC start (rather than $0801). In addition, it re-locates the video RAM from $0400 to $8000, which is the PET's video RAM location. Apart from ensuring correct $0401-based line linking, this allows PET BASIC programs which POKE directly to video RAM (many games, for instance) to be run on the C64.
Code:
100 CIA = 56576:VIC = 53248:VRAM = 648:BSTART = 43:BTERM = 55:NMIVEC = 792
110 POKE CIA, PEEK(CIA) AND 252 OR 1:REM SELECT VIC MEMORY BANK #2 ($8000 - $BFFF)
120 POKE VIC+24, PEEK(VIC+24) AND 15:REM SET VIDEO RAM TO START OF BANK
130 POKE VRAM,128
140 POKE NMIVEC,193:REM POINT VECTOR TO RTI (DISABLE STOP/RESTORE)
150 POKE BSTART+1,4:REM SET START OF BASIC RAM TO $0401
160 POKE 1024,0:REM ENSURE BYTE AT NEW BASIC START - 1 IS NULL
170 POKE BTERM+1,128:SET END OF BASIC RAM TO $8000
200 POKE VIC+32,0:POKE VIC+33,0:REM SET BORDER/BACKGROUND COLOR TO BLACK
210 PRINT "{green}{clr}### COMMODORE BASIC ###"
220 PRINT " 31743 BYTES FREE."
230 NEW
As for PET machine language binaries, you can load and save them using a C64 without any problem, provided they don't load to the $0400 - $7fff area (which is the the C64's video RAM). In this case, you should re-configre the C64 as described above.
For saving machine language binaries a monitor program is a very handy tool. Unfortunately, the C64 doesn't have a built in one (as opposed to the PET), so you'll first have to load one. Alternatively, one could write a BASIC program that in turn PEEKs all relevant memory locations and writes their contents directly to a PRG file.