• Please review our updated Terms and Rules here

Commodore 4040 disk drive - change device number

Via hardware or temporary software change?

Referring to http://www.primrosebank.net/compute...nual_D9090_D9060_8250_8050_4040_2031_text.pdf
Pahe 33
To change the device number temporarily until a power cycle or reset,
OPEN15,8,15,"M-W"CHR$ (12) CHR$ (0) CHR$ (2) CHR$ (9+32) CHR$ (9+64)
CL0SE15
Where 8 is the existing device number and 9 is the new device number.
M-W is the write to memory command

To change it via hardware, there should be some small pad jumpers near the 6532 at UE1, on pins 22,23 & 24
You can cut the pad next to pin 24 or lift the leg on pin 24 so it's not connected when it's in the socket.
 
Last edited:
Thanks.

So if I have two devices trying to be device 8 (the 4040 and a PET Disk MAX), how does the PET arbitrate that?

All a bit theoretical really as I can easily assign id 9 to the PET Disk MAX, but I'm just wondering.

Thanks.

Colin.
 
You just specify the drive in the command.
For basic 4.0 to get a directory you type directory or the abbreviated command diR
To get a directory of disk 1 on device 8 it's diR d1
or for device 9 it's directory d0 on u9 (disk 0 on unit 9)
For basic 2.0 you just load from drive 9, load"$",9 or for disk 1 on the 4040 it's load "$1",9

to load a program using basic 4 use dload "filename",d1 on u9 (for disk 1 on device #9)
using basic 2 it's load "filename",9 or load "1:filename",9 for disk 1 on device #9
 
Normally with two drives, you would need to leave one drive powered off, until you change the device number on the first drive.
With the PETDisk you can't leave it off while you change the device number on the 4040, so you'll probably need to change the PETDisk first.
If the PETDisk needs to be device 8 you may have to start with it set to device 10, then change the 4040 to 9 and then change the PETDisk to 8
 
Thanks - got it all now.

It was a theoretical question, but I was interested in how the PET/GPIB bus coped with two devices with the same id.

As a matter of interest, do you know which id printers default to?

Colin.
 
Back
Top