Toughie? Floppy read and DMA write problem 
Author Message
 Toughie? Floppy read and DMA write problem

This problem is driving me nuts.  I've tried everything I can think of.

I'm writing DMA-contoller and Floppy-controller drivers.  No operating
system (well, my own {*filter*}y one).

I've got basic operations working with the floppy driver (seeking,
recalibrating, motor on/off) and now I'm trying to read data from the
disk.

I'm setting up my DMA write.  I have verified that the address, count
and page registers are correct.  The DMA controller (controller #1) is
enabled.  The channel (channel #2) is masked while setting the
registers, then enabled for the transfer.

I issue the "read normal sectors" command to the floppy controller
(command E6 I think?).  I write the 8 following command bytes to the
command register, waiting each time for the controller to indicate that
it's ready.  

After the whole command has been issued, no floppy interrupt ever
occurs.  There is a short delay (the time it takes for the floppy
controller to start transferring data?) and the machine hangs, with no
exceptions or faults.

This might just be some stupid bug in my existing code.  Has anyone seen
anything like this before?  Help!

--
Andy McLaughlin

"A computer lets you make more mistakes faster than any
invention in human history with the possible exceptions
of handguns and tequila."
- Mitch Ratliffe, Technology Review, April, 1992.



Sat, 19 Jan 2002 03:00:00 GMT  
 Toughie? Floppy read and DMA write problem

Quote:

> I issue the "read normal sectors" command to the floppy controller
> (command E6 I think?).  I write the 8 following command bytes to the
> command register, waiting each time for the controller to indicate that
> it's ready.

The command should be 46 or C6, depending whether you are using
multitrack or not.

If you haven't enabled auto-seek you must first perform a seek operation
to the desired cylinder and then do a 'Sense Interupt Status'

Of course, make sure you have turned ON the disk drive before doing
anything.

Quote:
> After the whole command has been issued, no floppy interrupt ever
> occurs.  

Make sure you haven't disabled maskable interupts and that you have told
the FDC to create an IRQ6 after each disk operation.

John



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DMA and floppy reading/writing

2. Read FDD sector via DMA & Floppy Controller

3. Floppy read & write

4. direct read/write to FLOPPY + WIN NT ?

5. How to read/write floppy disk through PORT ?

6. Code to Low-Level read/write to Floppy Disks

7. direct read/write to FLOPPY + WIN NT ?

8. How to read/write floppy disk through PORT?

9. Need help reading/writing boot sector (floppy disk)

10. Windows ME and floppy-disc write problem

11. floppy DMA

12. Floppy disc controller - data without DMA?

 

 
Powered by phpBB® Forum Software