OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Now IRQ fires, and read ends successfully, but getting emp.
PostPosted: Wed Jul 11, 2018 8:23 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
@BenLunt : Thanks a lot, I have updated my FDC code with various error checking and real hardware tolerance you included in it. While looking at I noticed that I didn't used the configure command at all. Althrough that still did not fix the problem.
What did fixed it, is looking at the Bochs debug console.
Code:
04496036403d[DMA   ] DMA-1: set_mask_bit=4, channel=0, mask now=01h

This:
Code:
channel=0

And yes, I have made a mistake in the same function twice. Now it works anyway...
Now the IRQ does fire, I'm getting the result bytes, I get <<READ DONE>> in Bochs debug console, but DMA doesn't write anything on the buffer at all.
As I probably said in some of previous posts, one thing I suspect is this:
Code:
04496036477e[DMA   ] io write to address 00000004, len=2
04496036521e[DMA   ] io write to address 00000005, len=2

Now looking at the Bochs source code... :
Code:
BX_ERROR(("io write to address %08x, len=%u",  (unsigned) address, (unsigned) io_len))

That's a BX_ERROR! (Runs away in horror)
Updated code:


Attachments:
File comment: ISA DMA stuff.
dma.c [2.77 KiB]
Downloaded 13 times
File comment: Main floppy driver file.
fdc.c [9.49 KiB]
Downloaded 15 times
Top
 Profile  
 
 Post subject: Re: IRQ 6 (FDC) firing in initializ.. but not after read com
PostPosted: Wed Jul 11, 2018 10:15 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
Lukand wrote:
As I probably said in some of previous posts, one thing I suspect is this:
Code:
04496036477e[DMA   ] io write to address 00000004, len=2
04496036521e[DMA   ] io write to address 00000005, len=2

Now looking at the Bochs source code... :
Code:
BX_ERROR(("io write to address %08x, len=%u",  (unsigned) address, (unsigned) io_len))

That's a BX_ERROR! (Runs away in horror)

Those ports are only 8 bits, you can't write a word to them. You have to write one byte at a time, and keep track of whether the DMA controller thinks you're writing the low byte or the high byte.


Top
 Profile  
 
 Post subject: FDC [Solved]
PostPosted: Wed Jul 11, 2018 10:56 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
@Octocontrobass: Looking at the source code, I also noticed that. Though when I wanted to write that I have found the problem, you also found it :) Thanks.

Now it works because of true СЕРБСКИЙ POWER!
Which only the Srbski can create and imagine!


Hahaha, just joking. Really thanks to everybody who helped me and showed their will to help.
It appears to be working,
so now we go to the vast lands of FAT12, filesystem and etc....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], deblokc and 82 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group