BrokenThorn Entertainment - View topic - Demo15 / Floppy Disk / DMA problem
It is currently Sun May 19, 2013 12:30 am




Post new topic Reply to topic  [ 4 posts ] 
Demo15 / Floppy Disk / DMA problem 
Author Message

Joined: Wed Jul 22, 2009 6:44 am
Posts: 63
Post Demo15 / Floppy Disk / DMA problem
Hi, guys...

the floppy/DMA/read is returning 0x00s. Any clue?
it's configured with buffer starting at 0x1000 (page 1)

_________________
_____________
Think it, build it, bit by bit...


Thu Jul 21, 2011 10:10 pm
Profile E-mail

Joined: Wed Jul 22, 2009 6:44 am
Posts: 63
Post Re: Demo15 / Floppy Disk / DMA problem
Hi,

Code:
//! 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
}


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,

_________________
_____________
Think it, build it, bit by bit...


Fri Jul 22, 2011 4:17 am
Profile E-mail
Moderator

Joined: Thu Jan 10, 2008 6:43 pm
Posts: 95
Location: USA
Post Re: Demo15 / Floppy Disk / DMA problem
I had problems with my floppy read as well, and had to move the buffer. Try that.


Mon Jul 25, 2011 1:12 pm
Profile

Joined: Wed Jul 22, 2009 6:44 am
Posts: 63
Post 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

_________________
_____________
Think it, build it, bit by bit...


Tue Jul 26, 2011 12:13 am
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB © phpBB Group.
Original Design by Vjacheslav Trushkin for Free Forums/DivisionCore.
Theme and forum modified by BrokenThorn Entertainment, Co.