CPC-POWER : CPC-SOFTS - CPCArchives 
Options de Recherche :
 
 
 

ARTICLES

23 / 43

Floppy disc controller

Floppy disc controller

 

The Amstrad floppy disc interface is part of the design of the CPC664, CPC6128 and CPC6128+.

To use floppy discs with the CPC464 or CPC464+ a disc interface is required. There are two major floppy disc interfaces:

  • Amstrad floppy disc interface, which is part of the DDI-1 package
  • Vortex floppy disc interface

To use floppy discs with the CPC464+ there are two options:

  • The CPC464+ circuit board is the same as the CPC6128+ therefore it has the Amstrad floppy disc interface support included in the design. However, the components have not been fitted. It is possible therefore to fit the correct components to the circuit board to give full support for floppy discs.
  • It is possible to use the DDI-1 package with the CPC464+. However, since the cartridge supplied with the CPC464+ is identical to the cartridge supplied with the CPC6128+, the disc operating system (AMSDOS) is included. The DDI-1 floppy disc interface must be modified to prevent conflict between the AMSDOS rom in the interface and the AMSDOS rom in the cartridge.
  • It may be possible to use a Vortex floppy disc interface with the CPC464+, but I have no way to test this (information is welcome!)

Amstrad floppy disc interface

This interface uses a NEC 765A floppy disc controller (FDC) operating at 4Mhz, and has the following limitations:

  • The interrupt signal (INT) of the NEC 765 is not connected, therefore interrupt driven data-transfers are not supported.
  • The signals for DMA transfer (/DACK = data acknowledge, DRQ = data request and TC = terminal count) are not connected, therefore DMA driven data-transfers are not supported.
  • DS1 is not connected, therefore only 2 disc drives are supported.
  • The density select signal (MFM) is fixed at "1", therefore only double-density is supported. It is not possible to read single or high-density floppy discs.

The following restrictions apply to disc drives:

  • The disc drives must support the "READY" signal. (The "READY" signal is not available on modern drives designed for the PC, therefore it must be simulated using an electronic circuit).
  • The disc drives must use the standard Shugart signals (SIDE SELECT, READ DATA, WRITE PROTECT, /TRACK 0, WRITE GATE, WRITE DATA, STEP, DIRECTION SELECT, MOTOR ON, DRIVE SELECT, INDEX)

The disc operating system (AMSDOS) has the following restrictions:

  • Only single sided disc drives are supported. To use double sided disc drives or 80 track disc drives you will need to use C/PM or another disc operating system (RODOS, ROMDOS, PARADOS etc).

The "polling" method is used to communicate with the FDC.

For each data transfer, the main status register (MSR) is read to determine:

  • the phase of the execution of a command ("COMMAND PHASE", "EXECUTION PHASE" or "RESULT PHASE")
  • the direction of data transfer (from CPU to FDC or from FDC to CPU)
  • when the FDC is ready for a byte of data to be transfered

All data transfers are through the data register of the FDC. (You are advised to read the official data-sheets covering the FDC for more information about the commands.)

The floppy disc drive interface is accessed using I/O commands (OUT, IN etc)

When bit 11 and bit 7 of the I/O address is set to "0" the FDC will be selected and bit 8 and bit 0 will select the operation as shown in the table below:

b8 b0 Function Read/Write state
0 0 FDD motor control Write Only
0 1 not used N/A
1 0 Main Status register of FDC (MSR) Read Only
1 1 Data register of FDC Read/Write

 

It is advised that the remaining bits of the I/O address are set to "1" to avoid conflict with other devices. The recommended I/O addressess are:

I/O address Function
&FA7EFDD motor control
&FB7EMain status register of FDC
&FB7FData register of FDC

 

FDD Motor Control

The FDD motor is controlled by OUTing values to this I/O port.

Bit 0 defines the state of the FDD motor:

  • When Bit 0 is "1" the FDD motor will be active.
  • When Bit 0 is "0" the FDD motor will be in-active.

The values of bit 7-1 are ignored.

NOTE:

  • The FDD motor will be active for the time that Bit 0 is "1", and conversly the FDD motor will be in-active for the time that Bit 0 is "0".
  • When the FDD motor is changed from in-active to active the FDD motor will start to accelerate. There will be a short time before the FDD motor is rotating at maximum velocity.

    It is advised that the programmer includes a sufficient delay to allow the motor to achieve maximum velocity before accessing the FDD through the FDC. If there is no delay then the FDC may report errors and the command may not succeed.

    The time for the FDD motor to achieve maximum velocity is not guaranteed to be the same for all FDD's, and there is no defined minimum or maximum time.

  • When the FDD motor is changed from active to in-active the FDD motor will start to decelerate, and there will be a short time before the FDD motor has stopped.

    However, there is no need for the programmer to include a delay for the FDD motor to stop.

Bit(s) Function
7..1 Ignored
0 FDD motor control: 1=active, 0=in-active

 

DDI-1 floppy disc interface

The DDI-1 package comprises:

  • The disc interface:
    • NEC765 floppy disc controller
    • AMSDOS disc operating system ROM
    • connection to a disc drive

    Note: The disc interface does not have a through connector for other expansion peripherals, therefore it must be connected last!

  • A single-sided 40-track 3" disc drive with internal power supply and a connector for a FD-1 disc drive. (the connector is IDC and not the same as either the CPC664's, CPC6128's or CPC6128's "second disk drive" connector!)

FD-1 floppy disc drive

The FD-1 package comprises:

  • A single-sided 40-track 3" disc drive with internal power supply and connector a for a second FD-1 or the CPC664's,CPC6128's or CPC6128's "second disk drive" connector.

Vortex floppy disc interface

Details on this disc interface are welcome!

 

Using a disc drive with a Amstrad

To connect a 3.5" or 5.25" disc drive to the CPC664, CPC6128 or CPC6128+ as a second drive is easy:

  • You will need a cable to connect from the "second disk drive" connector to the disc drive. (e.g. PCB edge connector for CPC end, ribbon cable and a IDC connector for the disc drive)
  • The floppy disc drive must have it's own power supply because the power supply for the Amstrad doesn't have enough power for the Amstrad and the disc drive.
  • The floppy disc drive must have a "READY" signal, or this signal must be simulated. The majority of modern 3.5" PC compatible floppy disc drives do not have this signal!

To use the full capacity of a 3.5" or 5.25" floppy disc you will need another disk operating system (e.g. Parados), because AMSDOS only supports 40-track single sided discs.

 

Amstrad 3" floppy disc drives and disks

Discs

The Amstrad CPC664, CPC6128, CPC6128+ and DDI-1 disc interface use 3" discs.

The discs are rectangular in shape, have a stiff outer plastic covering and a metal shutter protecting the media inside. The disc can be inserted on either side so it is possible to use both sides with a single sided disc drive.

 

Disc drives

The disc drives are 40-track double-density single-sided.

  • The disc drives are designed to access 40 tracks and this is guaranteed, however some are able to access more (in one case up to 43 tracks). Many disc drives appear to be able to access 41 tracks, and the extra track is used by some copyprotections.
  • As far as I know there is no guaranteed minimum or maximum time for the disc drive motor to achieve full velocity.

 

Article créé le : Samedi 28 Novembre 2009 à 19 h 45
 
 

CPC-POWER/CPCArchives, projet maintenu par Fredouille.
Programmation par Kukulcan © 2007-2024 tous droits réservés.
Reproduction sans autorisation interdite. Tous les titres utilisées appartiennent à leurs propriétaires respectifs.