CBM bus

from Wikipedia, the free encyclopedia
CBM bus connection to a Commodore 64

The CBM bus is a serial bus developed by Commodore for its home computer series .

It is a proprietary serial variant of the IEEE-488 bus and is used to connect peripheral devices (mainly floppy disk drives and printers ). The bus was found in the 6502 -based Commodore home computers from the VC 20 to the C128 , while the professional PET / CBM computers used the standardized parallel IEEE-488 bus. The computers of the Commodore Amiga series did not use such an interface, instead connections for external floppy disk drives, a parallel port similar to that of the IBM-compatible PCs and the SCSI bus for larger and faster models ( A3000 and A4000T ) were used.

The CBM bus was also often referred to as the (serial) IEC bus in the literature of the 1980s . This is not correct, however, as the CBM bus was not standardized by the International Electrotechnical Commission .

Labelling

In contrast to IEEE 488 (American) or the IEC-625 bus (international), data transmission with the CBM bus is serial. This means that fewer signal lines are required, so that savings have been made on the input / output chips as well as on the cables and the associated connectors. In addition, with the CBM bus, some functions for which separate control lines are provided in IEEE 488 are transmitted as specially formatted data over the normal data line. Ultimately, only 5 instead of the 24 lines of the IEEE-488 standard connector are needed. The bus protocol is very similar for both buses.

Number of usable devices

Theoretically, up to 31 devices can be connected (with each device being connected in a chain from the second to the previous one), the operating system used 27 device addresses (4 to 30, 31 is reserved for untalk / unlisten). In practice, however, the upper limit is around 8 devices, which results from the possible current strength of the output driver components and the current requirement of the input drivers. The number was usually quite sufficient.

Usually addresses 4 and 5 were used for printers, 6 for plotters, and 8 to 11 for drives. However, this assignment is not known to the computer itself; For example, it was entirely possible to instruct the computer to “save” a program on the printer, which resulted in a “ mess of characters ” being printed out.

The numbers 0 to 3 were reserved for "unintelligent" peripheral devices without their own CPU that were not connected via the CBM bus: 0 for the keyboard, 1 for the datasette , 2 for modems and other devices connected via RS-232 and 3 for the screen. The operating system therefore does not send these device numbers on the bus, but uses the respective internal access routines if the usual file I / O functions are used. For programmers who directly call the operating system routines for controlling the serial bus, it is also possible to address devices with the numbers 0 to 3 on the serial bus.

connection

Pin numbers
Pinout
Pin code Surname Function
1 / SRQIN Service request input for peripheral requests to the host (C64), used on the C128 for fast transmission.
2 GND Dimensions
3 / ATN Serial ATN input / output. Pulled to ground by the host at the start of a serial data transfer.
4th / CLK Serial CLK input / output for software handshake.
5 / DATA Serial DATA input / output, bit-by-bit data transmission.
6th / RESET Reset for peripherals and older C64.

Control chip MOS 6522

The price advantage of the serial structure is bought at the price of a greatly reduced transmission speed. Since the control chip used, MOS Technology VIA (MOS 6522), turned out to be faulty in the serialization and parallelization unit shortly before the VC-20 went on sale, this task had to be carried out by a firmware that was "patched together" and programmed suboptimally by the processor in a very short time using bit Banging can be taken over, whereby the speed dropped again sharply. Due to the small memory of this computer and the correspondingly small size of its programs, however, the low loading speed of the VC-20 was not that significant. For printers of the time, the speed is more than sufficient anyway.

Control chip MOS CIA

Although the C64 , in contrast to the VC-20, used the CIA chips (MOS 6526) that were error-free in this regard , for reasons of backward compatibility with the VC-20 and its VC1540 floppy , which still had large stocks, the suboptimal software version of the bus used. Also in the floppy disk drive VC1541 specially created for the C64, the CIA was still not installed, but the cheaper but faulty VIA-6522 chip. Since with the C64, unlike the VC-20, the processor is stopped by the video chip once per line of text for 40 clock cycles each, the bus speed had to be reduced even further compared to the VC-20 so that the C64 could not miss a bit during this hold state . In connection with the much larger memory of this computer, the loading times for extensive programs increased in the range of several minutes.

speed

variant speed Effective bit rate
Commodore 64 + 1541 0400 bytes / s 03,200 bit / s
Commodore 64 + 1541 with fast charger 2,560 bytes / s 20,480 bit / s
Commodore 128 + 1571 5,200 bytes / s 41,600 bit / s
Theoretical 20 µs cycle 6,250 bytes / s 50,000 bit / s

Turbo driver

Various external turbo solutions for fast floppy control on the C64 via its CIA chips became popular. These use either additional hardware (parallel cable) or highly optimized bus protocols on the existing hardware, whereby the GCR decoding of the data, the data flow control and the software serialization and deserialization have been improved at the same time . Since the computer always specified the bus clock instead of the sending partner in these so-called fast chargers, the problem of bits being missed while on hold was eliminated.

Most commercial programs used a procedure in which a small accelerator program was first loaded using the standard method, which then stored routines for faster bus operation in the RAM memory of the computer and drive. Then the actually desired program could be loaded at high speed. Since many programs could only be ended by resetting the computer, the accelerator program often had to be reloaded, which, together with changing the disk, significantly reduced the time savings.

There were also permanent solutions that made it possible to load your own programs quickly without any further work. Often these were implemented in the form of a plug-in module for the computer; this directly contained the computer-side routine for fast bus operation, while the drive-side routine was automatically transmitted to the drive before loading. Other solutions used ROMs with extended routines on both sides , which were built directly into the computer and drive, and in some cases an additional parallel cable between the user port of the computer and some otherwise unused pins on a chip in the drive. On the drive side, an additional DIP socket with a soldered-on cable was usually installed under this chip; an opening also had to be cut in the drive housing to lead the cable through. These solutions were more complex, but achieved the best performance. Common hardware solutions were z. B. SpeedDOS , DolphinDOS and JiffyDOS .

Early quick-chargers reached about five times the charging speed, more sophisticated later versions managed up to 25 or 30 times the normal speed.

The fast CBM bus on the C128

Only on the C128 was the long-planned hardware serialization finally used and thus the bus speed increased to a bearable value ex works. The prerequisite is the use of the special C128 drives VC1570 , VC1571 or VC1581 , as the error-free CIA chip is also used on the drive side.

Web links

Individual evidence

  1. a b C64 Serial I / O pinout and wiring @ old.pinouts.ru . December 16, 2013. Retrieved April 2, 2016.
  2. a b c d e C-64 Workshop / Pin Connections . December 10, 2005. Retrieved April 2, 2016.
  3. Design case history: the Commodore 64 (PDF) 1985. Retrieved on April 2, 2016: "Programming tricks used by Epyx have yielded transfer rates of up to 2.5 kilobytes per second."
  4. Commodore 1571 disk drive specifications . Commodore Business Machines, Inc .. Retrieved April 27, 2016.