17. Transfer files

If you’ve got files on your Pi that aren’t inside one of your viritual disks, and you want to transfer them to your Apple II, you’ve got a few options.

 

Archive files:

If it’s an archive file, you can (and perhaps should) expand it directly on the Pi, as explained in A2CLOUD: working with archives and disk images. Otherwise, use one of the cool moves below, and then expand it with ShrinkIt or the appropriate program on the Apple II.

 

Copy a file into a disk image

acmd -c fileToBeCopied imageFileName

You can then use vsd1 or vsd2 to access the image file, or, alternatively, transfer it to a floppy with ADTPro. If you want to copy a file directly to a disk image already in a virtual drive, use $VSD1 or $VSD2 for imageFileName. You must immediately type vsdsync if you modify an image currently assigned to a virtual drive.

If you want to specify a different name and/or file type, you can use the long form:

acmd -p imageFileName APPLE2.FILENAME fileType auxType < fileToBeCopied

fileType should be a three-letter name (e.g. TXT), or a numeric type (e.g. 255 or \$E0). auxType is also needed for file types that require it (e.g. BIN), and can be either decimal, or hexadecimal if preceded with \$. You can use \$2000 for auxType if you’re not sure. If you want the file to go into a ProDOS subdirectory, you can specify the path as part of APPLE2.FILENAME (but do not include the volume name); any subdirectories that don’t already exist will be created.

(This is a slightly modified version of AppleCommander’s normal -p option: the file type and ProDOS file name are optional, the file name is checked to make sure it’s ProDOS-compatible, and any existing file of the same name within the image is first deleted.)

 

Transfer a file from your Pi to your Apple II

You can transfer a file to be saved on a local or virtual disk by using the YMODEM protocol. To send one or more files with YMODEM, type:

sb fileToBeTransferred1 fileToBeTransferred2 fileToBeTransferred3 (etc)

Once started, you will need to tell ProTERM or Z-Link to receive YMODEM. In ProTERM, choose YMODEM from the Receive menu; in Z-Link, type open-apple-downarrow, then option 4. In either one, accept the default options (unless you want to change them), and the files should transfer. If for whatever reason they don’t, and you can’t get access to the Linux shell prompt again, type ctrl-X until the prompt reappears. Transfer may be slow at the default 4800 baud rate; I’ll explain how to increase the baud rate in the next post.

If you are using ProTERM, you can also try ZMODEM by using sz instead of sb. ZMODEM is a more efficient protocol than YMODEM, it can auto-start, and it can recover from incomplete transfers, but those are less important in a direct-attached (rather than dial-up) situation, and I haven’t had as much success with it as I have had with YMODEM.

 

Transfer a file from your Apple II to your Pi

You can also go in the other direction — from your Apple II to the Pi. Type rb (for YMODEM) then tell ProTERM or Z-Link to send YMODEM. (If you prefer to send ZMODEM from ProTERM, just do that, and the Pi will automatically start receiving; you don’t need to type a command first.)

Another option is to save a file to a virtual disk — or transfer a real floppy using ADTPro — and then copy files out of the disk image on the Pi with this command:

acmd -g imageFileName APPLE2.FILENAME

If you saved to the virtual disk, you can type $VSD1 or $VSD2 for imageFileName.

acmd (AppleCommander) has some smarts, and it can translate (or “export”, as it prefers to say) from various Apple II file formats into modern formats. If you want it to give that a shot, use -e instead of -g above.

Leave a Reply

Your email address will not be published. Required fields are marked *