🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #30680

DMA/FDC-1772

#30680
From: Lionel Fournigault
Date: Thu, 18 Feb 1988 09:57
59 lines
1922 bytes
 	I tried to use the write-sector command of the FDC 1772 on atari 1040
without the DMA and I have had some problems: After the write_sector command
has been issued, the status register always contains 0xff and so the data
request condition cannot tested.

	My question is : Is it possible to put the DMA in transparent mode
		during a write operation.

Please answered by E-mail. Many thanx.

	Lionel Fournigault
	Laboratoire de recherche en informatique
	Universite Paris Sud. Orsay
	France
	
	lf@sun8.lri.fr
	lf@lri.uucp
...
c_function ()
{
	write_fdc_track_register ( no_track );	/* No problem	*/
	write_fdc_sector_register ( no_sect );	/* No problem	*/

	asm {
		MOVEM.L	A0-A1/D1-D7,-(A7)
		LEA.L	00ff8606,A0		/* DMA		*/
		LEA.L	00ff8604,A1		/* FDC access	*/
		
		MOVE.W	#0x0a,D4	/* Write-sector command */
		MOVE.W	#0x80,D5	/* Status Register	*/
		MOVE.W	#0x180,D6	/* Command Register	*/
		MOVE.W	#0x186,D2	/* Data Register (write)*/
		MOVE.W	#0xd0,D3	/* Force command	*/
		
		MOVE.W	#25,D7		/* Copy 25 bytes	*/
		
		MOVE.W	D6,(A0)		/* Command access	*/
		MOVE.W	D4,(A1)		/* Write-sector running	*/
		
	cnt:	SUBI	#1,D7
		/* Problem begin here */
	r_st:	MOVE.W	D5,(A0)		/* Status Register access	*/
		MOVE.W	(A1),D1		/* read 0xffff ????		*/
		BTST	#1,D1		/* Data Request ?		*/
		BNE.S	r_st
		
		MOVE.W	D2,(A0)		/* Data Register access		*/
		MOVE.W	#0xaa,(A1)	/* Copy 0xaa			*/
		
		CMP.W	#0,D7
		BNE.S	cnt
		
		MOVE.W	D6,(A0)		/* Command access		*/
		MOVE.W	D3,(A1)		/* Stop command			*/
		
		MOVEM.L	+(A7),A0-A1/D1-D7
	}
}
Technical Details
Message-ID: <297@lri.lri.fr>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!husc6!mailrus!umix!uunet!mcvax!inria!lri!lf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!husc6!mailrus!umix!uunet!mcvax!inria!lri!lf
From: lf@lri.lri.fr (Lionel Fournigault)
Newsgroups: comp.sys.atari.st
Subject: DMA/FDC-1772
Message-ID: <297@lri.lri.fr>
Date: 18 Feb 88 09:57:24 GMT
Reply-To: lf@lri.UUCP ()
Organization: LRI - Orsay. France.
Lines: 59