Login
Back to forumSee the full topicGo to last reply

Posted By

JamesC
on 2017-05-02
06:56:00
 Re: identify drive #

First, let's start with some simple definitions:
UNIT is the disk drive, such as a Commodore 1541, 1571, or 1581.

DRIVE is the number assigned to a slot WITHIN a disk unit. If there's only one slot to hold a diskette, then that slot is always DRIVE 0, you cannot change this. If there are two slots within the same unit, then one slot is DRIVE 0 and the other DRIVE 1.

Let's not use the word DEVICE, because Commodore documentation defines that as ANY input or output ... well, device. You input from device 0 (the keyboard) and output to device 3 (the screen), for example. A printer is a device, a modem is a device. So is a tape drive (a Datasette).

Now, the next thing you need to know: every disk drive is UNIT 8 from the factory. Every. Single. One. Of. Them. If you have two disk drives, one of them needs to be told to answer to a different UNIT number.

If one of your disk drives is a Commodore 1541-II, a 1571, or a 1581, then changing the UNIT number is easy. Look at the dip switches on the back of the drive, and set them like this:
UNIT 8: both switches up
UNIT 9: left switch down, right switch up
UNIT 10: left switch up, right switch down
UNIT 11: both switches down
Turn the drive off and on again to finalize the change.

If both of your drives are Commodore straight 1541s (including the VIC-1541 and 1541-C) then you'll have to soft-mod the UNIT number for one of them. (By soft-mod, I mean a temporary change. When you reset the drive, or turn it off, this change is lost.)

To soft-mod a 1541, be sure that the one you want to be UNIT 8 is turned off. Turn the other one on (the one you want to answer to UNIT 9), and run this program:
10 N = 9
20 OPEN 15,8,15 : PRINT#15, "M-W", CHR$(119) CHR$(0) CHR$(2) CHR$(N + 32) CHR$(N + 64)
30 CLOSE 15
Put a formatted disk in, and DIRECTORY U9 to verify that the soft-mod worked. If so, turn the other drive on (the one that stays UNIT 8). Now you can run your file copier program.

If you have a Commodore 1551: the first 1551 is always UNIT 8, a second 1551 will magically configure itself to be UNIT 9.

All that is on the hardware side. For the software side:
1. the COPY command in the Plus/4 only works on the same UNIT. Use this to duplicate a file on the same diskette, such as COPY "MY DATA.FILE" TO "MY DATA.BACKUP" ON U8.
2. you cannot use the BACKUP command to back up a diskette in one UNIT to a diskette in another UNIT.
3. to get around these restrictions, you need a file copy program (or a diskette copy program). Depending on your goal, one of the copier programs on your 1541 Test/Demo diskette might work.

@gerliczer -- there were a few serial drives in North America that answered to D1. The MSD SD-2 is a complete dual drive; the Indus GT has a phantom D1 in ROM that holds C64 disk manipulation programs. wink



Back to top


Copyright © Plus/4 World Team, 2001-2024