• Please review our updated Terms and Rules here

C2n232

Some user notes on cbmlink

Some user notes on cbmlink

OK, with the windows version of cbmlink, I got it to communicate successfully with my PET using the pc64 cable between the PET User Port and the parallel port of the PC. The instructions were a bit incomplete but one can fill in the gaps easily enough. The author is Finnish so it is understandable that writing a ‘bullet proof’ technical instruction in English might be fairly difficult. But his code is great.

Here are my notes on using cbmlink on a PC running Windows 98 and a PET 8032. Perhaps this will be useful as a supplement to the author’s instructions. See link below for authors' instructions.

cbmlink release notes for parallel cables

There is a neat way provided to transfer the server software into the PET. One types-in a short loader in BASIC. When run, it waits patiently for a load command on the user port. On the PC, in a DOS window, one changes to the subdirectory where the cbmlink program (cmblink.exe) and the files to be transferred are located, and enters the command line:
cbmlink –c pc64 0x378 –l plain.prg

This is for the pc64 cable protocol, and the LPT1 port and the proper server program to be loaded for your computer/configuration from the cbmlink-cbmprg.zip file. The instructions say that you can use port numbers like 0,1,2 or 3 but this did not work for me. The instruction also had an example of 0x3bc for LPT1 but that may be a typo. Perhaps they are for Windows XP.

Every once in a while I can get an error after executing a command that says something like no such protocol as pc45 even though I entered pc64. No matter. Just repeat the command.

This first server program is fixed to run at memory location $7C00. It is started with a sys 31744. Then one can transfer the re-locatable version if wanted from the cbmlink-cbmbasic.zip file. I needed that version as I will be transferring machine language code that will reside in the $7000 block of RAM, so I transferred the re-locatable one next. It then says to perform a SAVE of the transferred file. But it will not save correctly in BASIC. I had to go to the Machine Language Monitor (sys 1024) and determine the size of the ML program and perform the save there:

.s ”name”, 01,0401,0930 to save the re-locatable server on cassette.
.s “name1”,01,7C00,7D9F to save the fixed address server on casstte.

Another issue with the re-locatable version was that after you load it but before you run it, you are to change the second line of the BASIC portion of the program to point to the desired starting address. But the instructions are somewhat vague about telling you to delete the default second line that is there. If you do not, when run, the program hits a 00H ‘break instruction’ and lands in the monitor program.

A few times when it was run, the server software would immediately hang the PET. But it always seems to work the next time after a hard reset or power cycle. Nothing’s perfect in life.

One other thing that is important to remember is that just before or after the server is installed, say at $7C00, one must reset the top of BASIC so that the server code will not be stepped on later on if other programs are to be run. This is done in BASIC 4 with:
POKE 53, 124 : POKE 52,0 : new : REM sets top of BASIC to $7C00

The last thing to remember is that the addresses used in cbmlink default to decimal. So to SAVE a ML program located at $7000 to $7FFF in the PET, one uses the command:
cbmlink –c pc64 0x378 –s,28672,32768 name.prg
Or you can explicitly reference hex:
cbmlink –c pc64 0x378 –s,0x7000,0x8000 name.prg

I transferred several 4K test files with test patterns to see if the data arrived correctly and it seems fine. Overall, it looks like a very good way to transfer files between the PET and a PC.
 
Last edited:
Nice write-up, Dave.

Which version of Windows did you use? I remember that at least in XP you can't normally address the parallel port directly from userspace. I'm not sure this is an issue for cbmlink, but there are tools to "fix" this if it is.

I don't remember the type-in program being all that short when I last tried it. There are some programs which can supposedly translate BASIC code in ASCII into a .PRG, but I never got any of them to work. However, copy-pasting the code into VICE does work! I saved the result to a virtual tape and used audiotap to make a real one which loaded perfectly on my PET.
 
Which version of Windows did you use? I remember that at least in XP you can't normally address the parallel port directly from userspace. I'm not sure this is an issue for cbmlink, but there are tools to "fix" this if it is.

Very good point. I used Windows98 on an old computer. I'll update the writeup to mention it.

However, copy-pasting the code into VICE does work! I saved the result to a virtual tape and used audiotap to make a real one which loaded perfectly on my PET.

Nice, very clever.
-Dave
 
Who is this fellow with the assembled C2N232s?

Who is this fellow with the assembled C2N232s?

Hello all,

I was hoping Anders would post contact information or some such for that guy he mentioned (on page one of this thread) who had preassembled C2N232 units. Does anyone know if he still has any available? I’d _really_ like one, but I have no means of soldering very small connections, so I can’t assemble one myself.

G.
 
Sorry, I have forgotten. Anyway the person I was going to contact will only sell the adapter in kit form. You would need to do the SMD soldering yourself, or find someone to do it for you. This is due to relatively new laws/regulations within the European Union which makes it very hard and expensive for someone to sell ready-made electronics devices. Kits you assemble yourself does not (yet) fall under the same regulations.
 
Where can I buy a C2N232 adapter?

Where can I buy a C2N232 adapter?

Hi. Where can I buy a C2N232 adapter?
 
Oh.. time flies and I still haven't asked. Upon a closer look, the C2N232I is mentioned on his own homepage so I could just as well post a link to Nicolas page:
http://www.x1541.de/

Please note those adapters most likely would be sold in kit form and require SMD abilities to be assembled. Possibly there is someone elsewhere who would be willing to assemble a number of those, but I don't know.
 
This is due to relatively new laws/regulations within the European Union which makes it very hard and expensive for someone to sell ready-made electronics devices. Kits you assemble yourself does not (yet) fall under the same regulations.

Anders,
Is this due to the very strict regulations/certifications about using lead free solder in electronics? Or is there some other reason like product safety, etc?
-Dave
 
I think it all boils down to that the manufacturer is required to pay for and handle recycled products. You need to apply for a license which may even cost a lot of money to be a qualified producer and seller of electronics, but I haven't studied it further in detail.
 
cbmlink and the Commodore 2040 disk drive

cbmlink and the Commodore 2040 disk drive

I am the new owner of a Model 2040 dual floppy IEEE 488 drive for my Model 8032 PET. The disk has been updated with DOS 2 ROMs. It seems to work fine although I only have the performance test program meant for a 1541 single drive and so can only thoroughly test drive zero, but both drives seem OK. I can “New” the floppies (format) and read and write files.

Here is my problem. I tried to transfer disk file data from the 2040 to a PC via the cbmlink software and it does not seem to work. I also tried to copy a complete image in d64 format with no success. In fact cbmlink seems to do nothing except ‘hang’ the PET when this is attempted. Cbmlink has commands for disk transfer but they don’t seem to work on the PET. Are the disk commands for the Commodore 64 and the 1541 type drives only?

Has anyone successfully transferred data to/from a 2040 or 4040 drive using cbmlink?
I tried using no track numbers (default) and using 1 to 35 tracks for images to no avail. I think I may be missing something.
-Dave
 
I've written images to a PET's 8050 using cmblink, but I can't for the life of me remember how. Maybe if you run us through the steps you took it'll bring something back. Does your procedure for transferring individual files still work and how does a disk transfer differ?

BTW: Is d64 the right format for 2040 images? I remember there was some messing about involved trying to generate d80 images for the 8050.
 
I've written images to a PET's 8050 using cmblink, but I can't for the life of me remember how. Maybe if you run us through the steps you took it'll bring something back. Does your procedure for transferring individual files still work and how does a disk transfer differ?
Hi Steve,
When I first used cbmlink, I did not have a disk so I only needed it to transfer program code from the PC to PET memory as vice versa. That works fine with the -l (load) and -s (save).
But now I tried the File Read command (-fr switch) which I thought would transfer a disk file from the 2040 (connected to the PET) through to the PC.

BTW: Is d64 the right format for 2040 images? I remember there was some messing about involved trying to generate d80 images for the 8050.
Here I was attempting to copy the whole diskette image to the PC as a .d64 file. The only examples in the instructions were for a .d64 file or as a binary file. This is done with a 'disk read' command -dr. The full command line I used was:
cbmlink -c pc64 0x378 -dr0, 3,1,35 FILE.D64
I specified disk unit zero, interleave of 3, track 1 to track 35. When this did not work, I used all defaults:

cbmlink -c pc64 0x378 -dr FILE.D64
This did not work either. The PET just hung up. When I reset the PET, the prompt on the PC came back. I was thinking that the PET diskette format is compatible with the 1541 disk drive? I need to do some more research on formats. I am glad to read that you had some success transferring data to an 8050 drive. That gives me some hope. Thanks, Dave
 
For what it is worth, in January I successfully read two floppy disks from a 8250LP drive. I used cbmlink with the C2N232I interface connected to a CBM 610 and a custom cartridge with code to enable the cassette port. As for your second question, 4040 floppy disks should be read compatible with a 1541 so you shouldn't have to take the detour around the PET to read those.
 
For what it is worth, in January I successfully read two floppy disks from a 8250LP drive.
Anders, if you were reading the full diskette image, do you remember if you specified the starting and stopping track numbers in the command line or did you leave them out?
Thanks, Dave
 
Actually I used Bill Degnan's CBMXfer, but I'm quite sure that program leaves the track numbers out. After all, the D80 format (in my case) should already have the tracks defined.

While I don't own a working 2040, 3040 or 4040, if you like I could take the trouble of attaching a 2031 to a PET and see if I can transfer files that way. Note however I would be using the C2N232I interface rather than PC64 like you seem to use.
 
While I don't own a working 2040, 3040 or 4040, if you like I could take the trouble of attaching a 2031 to a PET and see if I can transfer files that way. Note however I would be using the C2N232I interface rather than PC64 like you seem to use.

Anders,
Yes when you get a chance, please see if you can transfer a file from the disk drive to the PC and then perhaps a whole diskette image.

I'm still looking for a C2N232 cable as it seems more universally used.

Have you looked into the XU 1541 adapter that hooks up the 1541 drive to the USB of a more modern PC running WIN XP and OpenCBM software? I have a 1541 and am tempted to try this setup. If it worked, I think my PET 2040 drive could then read the diskette for transfer data to the PET that way.
 
No, I haven't considered the XU1541 since I have enough transfer cables and devices as it is, and almost all my PC's have onboard parallel ports anyway. Of course I have a classic XM1541 cable that goes to a 1541-II. I have previously used that setup to write 35 track floppy disks read on the 2031 (connected to a CBM 710).
 
I've written images to a PET's 8050 using cmblink, but I can't for the life of me remember how. Maybe if you run us through the steps you took it'll bring something back. Does your procedure for transferring individual files still work and how does a disk transfer differ?

BTW: Is d64 the right format for 2040 images? I remember there was some messing about involved trying to generate d80 images for the 8050.

I'd love to know how to do this !!

I got an XE1541 cable and 1541 drive before I found out that images written on a 1541 are not compatible with the 8050 :(

I've got loads of pet software as .d64 files and can't get any onto the PET, I have only managed one program (Cosmic Cosmiads) by recording to tapoe and then loading, but cause it's machine code I can't then save back to disk !!!
 
You need a different kind of cable. The recommended one is a PC64 cable which connects the PC to the PET and will turn the PET into a slave. But as mentioned above, Dave had some problems using this kind of setup.
 
Back
Top