RDCBM A Commodore To CP/M File Copy Utility By Rob Tillotson Version 2.1 - Mar. 8, 1987 Copyright 1986,1987 by TurboPenguin Software This program is a general purpose file copier, which copies from a Commodore DOS format disk to a CP/M disk. It is designed to be faster and more convenient to use than any of the existing CBM->CP/M copiers. It uses burst mode on 1571 drives, and can write to the 17xx RAM expander or to a 1571 onto any format disk the drive supports. It does not require you to exit from CP/M to use it, as it is a CP/M transient utility. Version 2.1 adds some support for GEOS disks. Now, GEOS files will be displayed in the directory with their GEOS filetype, time/date stamp, and write protect status. If the disk is a GEOS disk, this fact will be noted, as will be the presence of the "Master" or "Boot" flag. Also, the Off-Page Directory Block will be searched whenever a file is opened or the directory is displayed. Finally, a new option is available on the menu which will display the Information Block of a GEOS file. Other small improvements include a "[more]" pause at the end of each screen page during a directory listing or text file viewing, and the display of the disk name and ID at the top of the directory. Hardware requirements are as follows: o A Commodore 128 computer o At least one 1541 or 1571 disk drive (1571 recommended) o Optional but recommended 1700 or 1750 RAM expansion The program is set up to operate with two drives, and in fact this decreased the code size substantially. However, it works reasonably well with one floppy if you select drive E as the second drive. RDCBM expects to find a Commodore DOS disk in one drive, and a CP/M disk in the other. The Commodore drive must be a real floppy, either 1571 or 1541. The CP/M drive may be a physical drive, or a pseudo- drive such as E: or M: if you have a RAM expander. The program defaults to Commodore disk in A: and CP/M disk in M:; these may be changed at the main menu. When copying, RDCBM uses an internal 24k buffer to hold file data, to cut down on the amount of disk swapping necessary on a one drive system, and to reduce the number of file operations performed on the CP/M disk. The net effect of this is that when you copy to drive E:, you only have to swap disks every 24k or when the file is complete. To use this program, place RDCBM.COM on any active drive, and type RDCBM. The program will load and a menu will be displayed, along with the letters of the selected drives. At this time, you should place the Commodore disk in the drive you wish to copy from. If you do not like the default drive choices, use the P option to change them. To select an option, type it's letter in upper or lower case alone at the prompt and hit return. The options are: [B] Binary CBM -> CP/M Copy Copies a BINARY file from the Commodore disk to the CP/M disk. No conversions are done. [D] Directory of CBM Disk Displays the directory of the Commodore disk, in a reasonably Commodore-like format. GEOS files will have all of their pertinent information displayed: type, structure, size in K, time/date stamp, and a reversed block for write protect. If the disk is a GEOS one, the Off-Page Directory will be searched as well. Please note that since GEOS uses true ASCII, GEOS file names aren't readable when treated as Commodore ASCII. Therefore, GEOS file names will be displayed AS YOU WOULD SEE THEM UNDER GEOS, not as they would appear in the Commodore directory. In any case, when entering a file name, enter it as you see it in the directory shown by this program. Since GEOS and Commodore files are non-interchangeable, this should not present a problem... just be aware that the directory you see in this program might not match the one you see when you view it in 128 or 64 mode. [I] Information on a GEOS File This option prompts for the name of a GEOS file on the CBM disk. It will display all of the information, except the icon, from the Information Block of the file. This is very similar to the "info" menu selection under GEOS DeskTop, but gives a bit more information. [S] Select Drives Change the drives used to copy from and to. Simply type the letter of the drive and hit return when you are prompted. [T] Text CBM -> CP/M Copy Copy a TEXT file from the Commodore disk to the CP/M disk. The file is converted from Commodore-ASCII to true ASCII, and linefeeds are inserted after carriage returns. Use this on text files. [V] View CBM Text File Similar to [T], but displays the file instead of copying it. [X] - Exit to CP/M. Entomology and Comments ----------------------- This is the third release of RDCBM. The first one was an incredibly bug-infested and slow hack. Version 2.0 was the first usable version... at that time, I converted it to Turbo Pascal. The result was much faster and worked well. This is version 2.1, which adds a few new capabilities to version 2.0. As you may notice, most of the improvements have to do with GEOS. I feel GEOS support is important, because soon it will be THE Commodore operating system. It is an orders of magnitude better than Commodore DOS, and I expect that more and more software will be GEOS compatible in the future. Since an 80-column version of GEOS for the 128 will be out soon, it will be even more important to 128 owners. Now, to the bugs. Number one is really a feature, but since it may be surprising to some people I should mention it anyway. Like the two versions before it, this version of RDCBM ignores the Commodore file type when it copies a file. I don't intend to change this in the future. Anyway, this has some interesting results. Copying a PRG file will give you the whole file, including the two- byte load address at the beginning. Since the first two bytes are often NOT a load address, they will be copied and if you don't want them you must edit them out later. Copying a REL file will give you the contents of the data portion of the file, in fixed-length records of the length specified when the file was created. Number two bug is that it will not work on a 1571-format disk in a 1541. So far, I haven't found a reliable way to determine the type of drive, and the CP/M BIOS does not mask off improper track numbers. So if you attempt to read a file from the back of a 1571 disk with a 1541, the 1541 will try to read a track number higher than 35. This can cause the drive head to jam outside of normal range. To reset the head, issue a "format" command without a disk in the drive. If this doesn't work after several tries, open the drive and move the head back manually. As you can see, it's better to avoid the problem entirely. Finally, I do plan to make more improvements to RDCBM in the future. Version 2.2 should add support for copying GEOS text and program files, and GEOS Note Pad and Text Scrap support. After that, I plan to add the ability to write to CBM disks. Enjoy.