Hi, guys...
the floppy/DMA/read is returning 0x00s. Any clue?
it's configured with buffer starting at 0x1000 (page 1)
Demo15 / Floppy Disk / DMA problem
Moderator:Moderators
-
- Posts:63
- Joined:Wed Jul 22, 2009 6:44 am
_____________
Think it, build it, bit by bit...
Think it, build it, bit by bit...
-
- Posts:63
- Joined:Wed Jul 22, 2009 6:44 am
Re: Demo15 / Floppy Disk / DMA problem
Hi,
Questions:
1) Why are you using D8 port? where to find more details about ports ranging from 0x0c0 to 0x0df (8237 DMA controller 2 (AT))?? (I'm looking for 'Microprocessor and Peripherals Handbook' from 70/80's)
2) Why are you using 80 port? why not the 81? (Hight order 4 bits of DMA channel 2 address)
Thanks,
Code: Select all
//! initialize DMA to use phys addr 84k-128k
void flpydsk_initialize_dma ()
{
outportb (0x0a,0x06); //mask dma channel 2
outportb (0xd8,0xff); //reset master flip-flop
outportb (0x04, 0); //address=0x1000
outportb (0x04, 0x10);
outportb (0xd8, 0xff); //reset master flip-flop
outportb (0x05, 0xff); //count to 0x23ff (number of bytes in a 3.5" floppy disk track)
outportb (0x05, 0x23);
outportb (0x80, 0); //external page register = 0
outportb (0x0a, 0x02); //unmask dma channel 2
}
1) Why are you using D8 port? where to find more details about ports ranging from 0x0c0 to 0x0df (8237 DMA controller 2 (AT))?? (I'm looking for 'Microprocessor and Peripherals Handbook' from 70/80's)
2) Why are you using 80 port? why not the 81? (Hight order 4 bits of DMA channel 2 address)
Thanks,
_____________
Think it, build it, bit by bit...
Think it, build it, bit by bit...
Re: Demo15 / Floppy Disk / DMA problem
I had problems with my floppy read as well, and had to move the buffer. Try that.
-
- Posts:63
- Joined:Wed Jul 22, 2009 6:44 am
Re: Demo15 / Floppy Disk / DMA problem
even it works, I don't understand why using port 0x80 and not 0x81 (that is specific for channel 2). Why D8 and not 0C??? (for flip flop)...
I'm using different ports, is working with any address supported by the chips...
But, as always, I need to know why that ports... can you, please, explain? Thanks
I'm using different ports, is working with any address supported by the chips...
But, as always, I need to know why that ports... can you, please, explain? Thanks
_____________
Think it, build it, bit by bit...
Think it, build it, bit by bit...