Commodore Serial bus

Mycroft2152

Senior Member
I was cleaning out my cellar recently and came across a number of old Commodore 64 peripherals, printer, plotter, etc. These were all connected to the C64 on a serial bus.

It would be fun to re-use some of these with a PICAXE project. Has anyone done any work with the Commodore Serial Bus?

The C64 was a rather slow machine by today's standards, so there just may be a chance.

Myc
 

westaust55

Moderator
Hi Mycroft,

Did some work with the C64 serial bus about 25 years ago. It uses a data line and a clock line.

They were very slow as you say. I wrote some software to replace the normal ROM chip akin to some commercial software available at the time to provide amongst other things a 5 time sped up between the C64 and the hard disk drives to speed up download of program files. Involved first sending a small program to the microprocessor in the hard drive to send the data faster.

No longer have any of that information. Maybe some Googling will find something for you.
 

Mycroft2152

Senior Member
Hi Mycroft,

Did some work with the C64 serial bus about 25 years ago. It uses a data line and a clock line.

They were very slow as you say. I wrote some software to replace the normal ROM chip akin to some commercial software available at the time to provide amongst other things a 5 time sped up between the C64 and the hard disk drives to speed up download of program files. Involved first sending a small program to the microprocessor in the hard drive to send the data faster.

No longer have any of that information. Maybe some Googling will find something for you.
Doing that now.

I did find one reference on an Atari magazine that said the serial bus was a variant of the RS232C .
 
Last edited:

westaust55

Moderator
Yes and if I recall rightly, the clock line was basically unused so what I did was use the extra wire to shift 2 bits of data in parallel as part of getting the 5 times speedup for downloads.

Just found this information . . .


hmmm in look at that information, maybe it was the SRQ line I used in parallel with the data line . . .



Is this the article you found:
http://www.atarimagazines.com/compute/issue38/073_1_HOW_THE_VIC_64_SERIAL_BUS_WORKS.php
 

Attachments

Last edited:

Mycroft2152

Senior Member
Yes and if I recall rightly, the clock line was basically unused so what I did was use the extra wire to shift 2 bits of data in parallel as part of getting the 5 times speedup for downloads.

Just found this information . . .


hmmm in look at that information, maybe it was the SRQ line I used in parallel with the data line . . .



Is this the article you found:
http://www.atarimagazines.com/compute/issue38/073_1_HOW_THE_VIC_64_SERIAL_BUS_WORKS.php
I've been looking at that.

Do you remember what kind of speed was actually required?

I found a reference to a data transfer speed of 2400 bit/second.

Myc
 

westaust55

Moderator
Sorry Myc, I do not remember the serial port speed.

Do recall that with the OSI C2-4P computer I had prior to the C64 I mod’ed the serial baud rate to get from 300 Baud to 1200 Baud for saving to cassette. The C64 tape drives were 300 Baud and the disk drives were deemingly not too much faster as standard hence the changes to the ROM chip (to an EPROM) to speed up program downloads.

Be careful in reading about RS232 and baud rates as the C64 also had separate RS232 routines – I did not use them and “blew” those away to make room in the ROM for the faster disk drive comms routines.

The Serial bus for disk drives etc was a stripped down IEEE-488 bus from memory
 
Last edited:

moxhamj

New Member
A data and clock line? A PC keyboard works like that, albeit at about 10khz.

I've been pondering various solutions to the serin hang problem. In general terms, I wonder what is the most code efficient way of sending bytes from picaxe to picaxe using a protocol that does not hang?

There is the pulsout system - where a low is a short pulse and a high is a long pulse. It can work independently of any clock because the first byte can be 01010101 and the software can work out what is the length of a low and of a high and set a threshold half way between the two.

Then there is the data/clock system as mentioned. This ties up two lines - which is a bit of a pain for an 08/08M, but would not be such an issue for a 14M and only slightly more cost for 08M to 14M.

I'm sure there are other systems. Clock/data is a pretty standard system. I guess it needs a timeout so it doesn't hang waiting for a low to high transition. In terms of speed, the picaxe is probably slow enough that you could wait for a low to high transition on the clock line then just read the data line. Then start a do loop and wait for the next low to high transition, and also run a counter that times out. Just guessing ? about 1Khz.

I wonder what a common bus system might look like? Would a sending unit be responsible for generating the clock, or would you have a 555 making the clock pulses? Would you use a single picaxe pin for input and output? Would you 'wire or' onto the data bus with diodes?
 

krypton_john

Senior Member
I was cleaning out my cellar recently and came across a number of old Commodore 64 peripherals, printer, plotter, etc. These were all connected to the C64 on a serial bus.

It would be fun to re-use some of these with a PICAXE project. Has anyone done any work with the Commodore Serial Bus?

The C64 was a rather slow machine by today's standards, so there just may be a chance.

Myc
I had an BBC (acorn?) micro once and I have no idea what happened to it. It was an incredible educational platform in it's day, even having a well documented i/o port for experimenting and rather nice graphics (again, for its day).
 
Last edited:

westaust55

Moderator
Found several references to the Commodore 1541 floppy disk drive (which connected to the C64 serial port) operating at the speed of ~300 bytes.sec. With 8 bits per byte + start and stop bits, that would equate to a Baud Rate of ~3000 bps (bits per second).
That’s about 10 time the Commodore cassette data storage method.

Then there are references to increasing speed to 4000 bytes per second and even 10,000 bytes per second.
Cannot say these number gel. My mod gave me about a 5 time improvement and the commercial cartridge and replacement ROM’s were all advertising a 5 time speed increase. 300 * 5 = 1500 bytes per sec which is far short of the indicated 4000 bytes per sec supposedly achieved.

Or could it be that the original speed was 4000 / 5 = 800 bytes per sec or a baud rate of 8000 bps (bits per second) ? ?

If I find anything better I will let you know
 

westaust55

Moderator
Hi MyC,

If you are still searching for information, maybe these links will be useful. Seems many have been trying to interface Commodore floppy drives (1541) to PC’s. But theory still good for other Commodore serial bus devices.

These links give some theory, circuits and original C64 machine code.
http://www.bitcity.de/theory.htm
http://www.bitcity.de/1541 Serial Interface.htm

And a MPS1250 (Serial/parallel Printer) servcie manual with timing and other data
http://commodore-gg.hobby.nl/manuals/printer/mps1250_aanvulling_service_manual.pdf
 
Last edited:
Top