Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!husc6!mit-eddie!rutgers!princeton!allegra!ulysses!mhuxt!ihnp4!inuxc!pur-ee!cyliax
From: cyliax@pur-ee.UUCP
Newsgroups: comp.sys.atari.st
Subject: programming the dma port
Message-ID: <5252@pur-ee.UUCP>
Date: Wed, 14-Jan-87 09:25:17 EST
Article-I.D.: pur-ee.5252
Posted: Wed Jan 14 09:25:17 1987
Date-Received: Thu, 15-Jan-87 21:58:22 EST
Reply-To: cyliax@pur-ee.UUCP (Ingo Cyliax)
Organization: Electrical Engineering Department , Purdue University
Lines: 30

Has anyone had any experience programming the dma port ? I have build
an interface to use on the port, but I have some problems accessing
it in software. I used the following code segment to access the port:
	{
	short rv;
	short *flock = (short *)0x43e;	   /* flag to disable flpvbl routine */
	short *hdcreg = (short *)0xff8604; /* the fdc/sector count register */
	short *dmareg = (short *)0xff8606; /* dma mode/status register */

		while(!*flock)		/* wait for flock */
			;
		*flock++ ;		/* and set it */

		*dmareg = 0x08;		/* select hdc register with A1 = 0 */
		*hdcreg = 0x00;		/* now write to it */
		rv = *hdcreg;		/* now read from it */

		*flock = 0;		/* enable flpvbl routine */
		return(rv);
	}
When this was run in supervisory mode, there was no activity on the dma port
control signals ( CS R/W* d0-d7 .. ) at all. Although the returned value
did reflect the state on the data lines, for example pulling one low would
reset the coreesponding bit in the returned value.  I have also tried putting
some delays between the reads and writes. Any hints or pointers would be
greatly apreciated.

				Ingo Cyliax
				cyliax@ee.ecn.purdue.edu
				cyliax@ihnp4!pur-ee