Command Descriptor Block

BiLZfi54221fl Byte 00: xxxxxxxx

I I I_I_Operation Code

I_I_Controller Number

Byte 03:........ Least Significant byte of the Logical

Address

Byte 04:xxxxxxxx Operation Length (Usually Sector count in

512 Byte increments)

I_I_Operation Modifiers

(Data Request): Used by the Peripheral (Target) to request a DMA data transfer. Direction of transfer is determined by the R/_W signal.

Controller Number

A 3-bit number designating the physical controller receiving the Command Block. Up to eight (0 through 7) controllers can be connected to the Atari DMA channel. Usually set on target device with dip switches or jumpers.

Operation Code

A 5-bit number specifying the operation (Op-code) to be performed by the target controller given the information within the Command Block.

Operation Length (Block Count) '

An 8-bit number that determines the number of Blocks (sometimes called "Sectors" or "Data Sectors") to be transferred for read and write commands (should be non-zero). This number can be used to signify lengths in bytes for some command types.

Operation Modifiers

Some commands have optional "Operation Modifiers" that change the way a command is interpreted by the target device. See detailed command descriptions for more information.

Detailed Command-Data-Status Flowchart (Read)

START Read

Command

Set FLOCK File

System

Semaphore

Toggle the DMAOUT bit to Reset DMA Mode Control

Set the DMA Base Register

Load the Block Count Register

Write the first ^ Command Byte to the DMA port

FLOCK address is $43E.

DMA Mode Control Register address is $FF8606<- $190 $FF8606<- $090

DMA Base Counter $FF8609<- Low $FF860B<- Mid $FF860D<- High

Block Count Register address is SFF8604. $FF8604<-*NN $FF8606<-$088

The DMA Data Port address is $FF8604. $FF8604<-CMD0 $FF8606<-$08A

'Sent all bytes but last command?

'Sent all bytes but last command?

Send last command byte (See chapter section 7).

Receive Status Byte. Select Status by sending $8A to DMA Mode Register. Read DMA Data Port lor status byte.

Execute Error Routine

Clear FLOCK FUe System Semaphore

Detailed Command-Data-Status Flowchart (Write)

Set FLOCK File

System

Semaphore

Set FLOCK File

System

Semaphore

Toggle the DMAOUT bit to Reset DMA Mode Control

Set the DMA Base Register

Load the Block Count Register rWrite the first Command Byte to the DMA port

FLOCK address is $43E.

DMA Mode Control Register address is $FF8606<- $090 $FF8606<-$190

DMA Base Counter $FF8609<- Low $FF860B<- Mid $FF860D<- High

Block Count Register address is $FF8604. $FF8604<-*NN $FF8606<-$ 188

The DMA Data Port address Is $FF8604. $FF8604<-CMD0 $FF8606<-$ 18 A

Sent all bytes but last command?

Send last command byte (See chapter 4 section 7).

Send last command byte (See chapter 4 section 7).

DMA Mode Control Register address is $FF8606<- $090 $FF8606<-$190

DMA Base Counter $FF8609<- Low $FF860B<- Mid $FF860D<- High

Receive Status Byte. Select Status by sending $8A to DMA Mode Register. Read DMA Data Port for status byte.

Clear FLOCK File System Semaphore

Sent all bytes but last command?

LYes

CHAPTER 5: THE INQUIRY COMMAND

0 0

Post a comment

  • Receive news updates via email from this site