IRQ 6 (FDC) firing in initializ.. but not after read command

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Now IRQ fires, and read ends successfully, but getting emp.

Post by Ycep »

@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: Select all

04496036403d[DMA   ] DMA-1: set_mask_bit=4, channel=0, mask now=01h
This:

Code: Select all

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: Select all

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: Select all

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
dma.c
ISA DMA stuff.
(2.77 KiB) Downloaded 32 times
fdc.c
Main floppy driver file.
(9.49 KiB) Downloaded 39 times
Octocontrabass
Member
Member
Posts: 5586
Joined: Mon Mar 25, 2013 7:01 pm

Re: IRQ 6 (FDC) firing in initializ.. but not after read com

Post by Octocontrabass »

Lukand wrote:As I probably said in some of previous posts, one thing I suspect is this:

Code: Select all

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: Select all

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.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

FDC [Solved]

Post by Ycep »

@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....
Post Reply