• Please review our updated Terms and Rules here

How do I format a floppy in Basic 2.0?

Joined
Jul 4, 2024
Messages
46
Location
High Wycombe UK
I have now got the PET up and running and I would like to try to get the 3040 series floppy drive that came with it working.
On power up it seems to be doing its boot test but until I can work out the format command I cant try it.
The PET is a 2001-16N BS and I think it is running basic 2.0 looking on the net all I can find is info for using basic 4.0.
I am sure it can work with basic 2.0 as the drive came with the PET but unfortunately no documentation.
 
Hi,
I am not sure with your PET, but with my 8032 I can use HEADER"Test" ,d0 to format.

I have a Commodore "Demo" disk with some useful programs, making life a bit easier for "normal" users. One of the programs is called "dum 3.4" which includes many useful functions such as format, backup, copy etc.

Maybe you could try and get hold of such a disk?

Joe
 
for basic 2.0 (same for c64, vic20) for drive 0 (left hand one):

open 1,8,15,"n0:name,id":close 1

should work. if it works, to show the directory

load "$0",8
list

will display the new disk dir. use n1 or $1 for drive 1.
there is a tsr prog "dos" you can run which adds easier cmds for all of this.
The 3040 manuals are online as pdfs.

https://archive.org/details/CBMUser...DrivesPartNumber320/mode/1up?q=3040+commodore

The basic dos commands are nearly the same for the c64/1541.
 
Last edited:
Ok thanks for the replies but still no luck!
Have tried

HEADER"Test",d0
and
open 1,8,15,"n0:name,id":close 1

Both give syntax error!
I am beginning to wonder if basic 2.0 works with floppy drives even though the drives came with the PET!
Could it be because I am entering all in upper case? I can't find a way to change to lower case or even if it's possible.
Maybe I need to upgrade to basic 4.0 to get the floppy to work.

I am not sure the drives even work but when I power them up all the leds flash then go out and I can hear the drive motors initializing.
I was trying to format a disk first but now am thinking maybe try reading to see if the drive starts but I don't know what commands to try as I keep getting syntax error.
 
I think the direct command HEADER is only for BASIC 4.

You have missed a ',' out from between the 15 and the double quote. I would also add the 1 to the end of the CLOSE command.

Dave
 
Here's my two pennorth (but I'm away from home).

Put a space between HEADER and the first quote.

Also my recollection is that you may need ,Ixx where xx is a number at the end of the line.

For example

HEADER "TEST",D0,I87

Colin.
 
You could also try breaking the command down into separate direct commands as follows:

Code:
OPEN 1,8,15
PRINT #1,"N0:DAVE,DR"
CLOSE 1

This way you can see what is erroring.

Dave
 
If you happen to get hold of the Commodore Test disk, there are a few neat programs, I found it very helpful. Admittedly, I have BASIC 4.0 on my 8032 which helps.
 
Ahh yes now I get this >>

OPEN 1,8,15
PRINT#1,"N0:TEST,DR"

At this point the PET seems to ljust lock up and all I can do is power off the on again to get it back.
I get the same with or witout the floppy drive power on and with or without a disk installed.
 
If you happen to get hold of the Commodore Test disk, there are a few neat programs, I found it very helpful. Admittedly, I have BASIC 4.0 on my 8032 which helps.
No I don't have the test disk but even if I did I would need to get the drive working first.

Have you run the PET IEEE488 port test program?

You can find this on page 181 (onwards) of: http://primrosebank.net/computers/pet/documents/PET_and_the_IEEE488_Bus_text.pdf.

Run this without anything connected to the PETs IEEE488 port.

Good idea Dave, I will type it in tommorrow.
I just had a thought could I connect the 3040 to a C64 to test the drive?
I have never used a floppy drive on Commodores before so this may be a stupid idea?
 
Doesn't the C64 have a funny 6-pin DIN Commodore serial interface for disks (unless you have the IEEE 488 adapter for it).

Dave
 
No I don't have the test disk but even if I did I would need to get the drive working first.



Good idea Dave, I will type it in tommorrow.
I just had a thought could I connect the 3040 to a C64 to test the drive?
I have never used a floppy drive on Commodores before so this may be a stupid idea?
Maybe you could get hold of a SD2PET device? This is a very helpful tool for many things.

Joe
 
Doesn't the C64 have a funny 6-pin DIN Commodore serial interface for disks (unless you have the IEEE 488 adapter for it).
No I don't have the adapter so I guess it is a stupid idea :)
Maybe you could get hold of a SD2PET device? This is a very helpful tool for many things.
Hi Joe, Maybe later but I would like to get the floppy working first.

Have you run the PET IEEE488 port test program?
Ok I have typed in the test program and it say the DAV is bad!
looking at the schematic the DAV comes from the 6522 goes through the mc3446 (A9) then to the 6520
I have swapped the mc3446 chips around (A7,A8 and A9) but its the same in any combination so I don't think it's a faulty mc3446
I added a few lines to the test program to see what was happening and found that after line 460 "A" was 0 and after line 480 "A" was 64 but it should be 128 to pass this part of the test.
 
Maybe you've already been here, but it's worth trying to use some deoxit and an eraser to polish up the edge connector on your PET. It could just be a bad connection. Perhaps it's just something about the local climate or whatever, but I've found PETs extremely susceptible to contact oxidation problems, both the edge connectors and the keyboard pads.
 
Maybe you've already been here, but it's worth trying to use some deoxit and an eraser to polish up the edge connector on your PET. It could just be a bad connection. Perhaps it's just something about the local climate or whatever, but I've found PETs extremely susceptible to contact oxidation problems, both the edge connectors and the keyboard pads.

Hi thanks for the suggestion but yes been there done that :)

Also I forgot to mention I tried swaping the PIA's but no differnce.
 
DAV IN should be PB7 of the 6522 (128).

Just out of interest, what are the values of C and C1 after line 440?

Dave
 
Back
Top