André's 8-bit Pages  Projects  Code  Resources  Tools  Forum
(by Google)

SCSI-64: SCSI controller for the C64 and other 6502

This is the description of several SCSI controllers for the Commodore C64 computer. Some of them may be used with a VIC20 or C128 as well. All of the controllers are based on one hardware interface that is built into different setups.

After going a bit into the SCSI standard first I present the generic interface. (You can download a slightly older page and all schematics in one archive in scsi64-1.tar.gz. The link to the SCSI standard below is missing).

The driver code is made in a modular way. It consist of the hardware driver and the partition handler. Both are separated by a well-formed programming interface, as well as the partition handler presents a nice interface to the filesystem code. This architecture is presented in the second part.

The different hardware projects using the generic SCSI interface are described in the third chapter. Those include a SCSI interface directly for the C64, as well as disk-drive-like small computers that can be used via the C64s serial IEC bus.

Before you go on, you should know that all this stuff comes with no warranty at all . Of course this hardware is not to be used in any important or even life-critical systems. The hardware schematics and software are provided 'AS IS', WITHOUT WARRANTY of any kind. The entire risk as to the quality and performance of the hard- and software is with you. Should the hard- or software prove defective, you assume the cost of all necessary servicing, repair or correction.

This computer system is distributed under the GNU Public License V2.

SCSI means "Small Computer System Interface". It is an interface that connectes computers with peripheral devices, like disks, scanners, CD-ROMs etc. As such it is very flexible.

More on the SCSI standard can be found on its SCSI page on this site.

In my SCSI interfaces and devices for the Commodore computers I use a generic 6502 SCSI interface I developed for the CS/A65 computer. The SCSI interface has its own place there.

This interface has been designed for the CS/A65 bus system. However, this bus system basically is the 6502 bus. In fact, besides the /IOSEL line only 6502 CPU lines are used./IOSEL selects the I/O area and is generated from the address lines in the usual way. This means that the interface can be used on a variety of systems, and it is used on selfbuilt computers as well as the C64, as will be seen below. The 6809 has the same bus interface as the 6502, so it could even be used with this CPU (although no drivers exist for the 6809).

The software architecture is kept as flexible as possible. Three levels work together, the hardware driver, the partition level that transforms block numbers in a partition into block numbers in the device, and the third level which is the filesystem code.

An implementation of the drivers can be found in the GeckOS operating system. A description comes with the description of the CS/A65 SCSI interface.

The most recent SCSI drivers can be found in the GeckOS/A65 operating system. An example of a filesystem implementation can be found in oa-2.0.8/sysapps/fs/fsibm*, that implement a fileserver task for the GeckOS/A65 operating system. It handles PC-style disks with the FAT12 or FAT16 filesystem (no FAT32 and no long filenames). But be warned, it is an early beta!!! Don't ever try it on a disk that contains anything valuable to you!!!

Now I will describe the different approaches to use the generic SCSI interface in a Commodore system, more specifically with a C64 or C128.

C64 SCSI (harddisk) adapter

  • Idea : This interface should directly connect a harddisk to the C64. The C64 would then have to do all the filesystem handling itself, but it is fast (no serial IEC bus) and cheap.
  • Description :

    This is a simple example of how to use the C64-CS/A adapter with a CS/A65 I/O card. The C64-CS/A adapter is plugged into the expansion port using one I/O area (at $de** or $df**). It uses a VIA 6522 to expand the address range so that you can use the full CS/A bus system with all cards.

    The results of the combination with the CS/A-SCSI card is a simple C64 expansion port card without CS/A bus interface, in this case in the C64 SCSI controller.

    A picture says more than a thousand words, so here is the C64 SCSI interface schematics as c64scsi.png or c64scsi.ps.gz. This is a combination of the CS/A SCSI controller and the C64 CS/A adapter. However, as only the SCSI controller will be used, some parts of the combined schematics can be left out (shaded grey), and only one additional connection has to be made (indicated).

    Matthias Kirchner provided me with an Eagle schematics and board layout for the C64-SCSI board. However, There is absolutely no warranty with this schematics and layout, as I could not fully check it. You can find it in c64scsi.zip.

  • Status : The interface consisting of the C64-CS/A adapter and the CS/A-SCSI card has been tested on a C64 and works. The "imploded" version with the left out parts has not been tested.

VC-SCSI 1.0 drive

  • Idea : Provide a separate computer like the VC1541 and interface it with the C64 via the serial IEC bus. This would keep a lot of work off the C64, and provide easier access.
  • Description :

    This is a combination of the Gecko computer and the SCSI board.

    The Gecko (see the gecko directory) is a small single-board 6502 computer. The base system provides 32k RAM, 32k ROM and access to the CS/A I/O bus (which is the CS/A bus itself, but only using the lower 12 address bits with /IOSEL). The full Gecko includes an RS232 interface, as well as a VIA6522 with serial IEC and keyboard interface.

    Combining the Gecko with the SCSI interface is simple, just attach it. If you remove the backplane by putting both cards on the same board you can also leave out some parts of the Gecko that are of no use. Those parts are shaded grey in the schematics. This board can be used with the C64, C128 and VIC20.

    The schematics are available as vcscsi-1.0.png or vcscsi-1.0.ps.gz.

  • Status : The Gecko board and the SCSI interface have been tested separately and both work. Also the Gecko board works with several other CS/A cards (my Gecko prototype board developed a bad soldering so I cannot test it with the SCSI board at this time.). The SCSI interface has been tested with the orignal CS/A65 computer and with the C64 using the adapter from above. This will work with >99.5%.

VC-SCSI 1.x drive

  • Idea : Modify the Gecko board such that the VIA appears at the same place as the IEC VIA in the VC1541, and also use the very same IEC schematics as in the VC1541. This would allow building a VC1541 emulation mode for all speeders that use the standard FDC routines to acces a floppy - these routines would then be replaced to access a large file on the harddrive (a .d64 image basically)
  • Description :

    This is basically still the Gecko board. Only the address selection of the I/O area around IC2 would have to be changed, as well as the address value at IC9. The VIA would get the very same IEC electronics as the VC1541 has, removing anything else. The UART (RS232) would be removed as well.

    The 32k ROM would be divided into an upper 16k part and a lower 16k part. The upper part would be filled with a modified VC1541 ROM, and the lower part with the SCSI filesystem code.

    To make the emulation mode reasonably secure part of the RAM - that would then contain the mapping of VC1541 blocks -> blocks on the disk drive - should be made write-protectable. This way any floppy speeder going haywire could with high probability not overwrite other parts of the HD.

  • Status : Idea

VC-SCSI 2.0 drive

  • Idea : When the 6522 is replaced with a 6526 the burst mode of the VC1571 can be used.
  • Description :

    In this schematics I have molded the Gecko and the SCSI boards more together, without a bus in between. Also I replaced the 6522 with a 6526. This allows to use the fast serial IEC bus as used with the C128 (or with a modified C64). A place for a Speeder Cable is also provided.

    Thanks to Nicolas Welte I have improved the parallel speeder cable support, and provided a way to set the IEC ID.

    One word of warning, though: The schematics are preliminary, untested, and a mess! Again, they are provided AS IS, without warranty!

    The schematics are available as vcscsi-2.1C.png or vcscsi-2.1C.ps.gz. And there is the vcscsi-2.1C-parts.txt parts list.

    The memory map has RAM at $0000-$7FFF, ROM at $8000-$DFFF and $E800-$FFFF. I/O is at $E000-$E7FF, with $E000-$E3FF mirrored at $E400. $E0** is the 6526, $E1** is the SCSI interface and $E2** is the IEEE488 ID and speeder flag port. $E3** is not (yet) used, so there is place for a disk controller or whatever.

  • Status : Schematics exist, but they are preliminary, untested, and a mess! Again, they are provided AS IS, without warranty!


Return to Homepage

Last modified: 2010-05-31
follow

Follow my 8-bit tweets on Mastodon (In new window) or Bluesky

discuss

Discuss my site on this 6502.org forum thread

(Forum registration required to post)

hot!

Dive into the retro feeling and build yourself a Micro-PET or a Multi-board Commodore 4032 replica

Need more speed? Speed up your 6502 computer with this 10 MHz 6502 CPU accelerator board

Interested in electronics design? Look at the design lesson I got from Bil Herd, the hardware designer of the C128

Want 64bit? - pimp the 6502 with the 65k processor design!