rasz_pl wrote on 2022-09-14, 10:29:I mean all the other "fdc->fintr = 0" (setting interrupt signal back to 0) instances are immediately following code sending inte […]
Show full quote
mogwaay wrote on 2022-09-14, 09:21:
Quick scan at the source didn't really help me, I'm not familair enough with it, but that sounds like the same thing I'm thinking - IRQ will lower once results phase has completed and the result bytes have been read.
I mean all the other "fdc->fintr = 0" (setting interrupt signal back to 0) instances are immediately following code sending interrupt request "fdc_int(fdc, 1)". IBM PC ISA interrupts are Edge triggered, you dont need to keep the interrupt line active. Looking at that code above *Sense interrupt status* command is the only direct way of forcing FDC to explicitly turn Interrupt signal off. The way I see it all other commands generating Interrupt will send quick impulse and do not require manual intervention. That of course assumes 86Box is a good FDC implementation. Ill look at mame code next to confirm.
Edit: found it https://github.com/mamedev/mame/blob/ef8ac6ee … pd765.cpp#L1512
looks very similar, same logic, Sense command will clear interrupt.
Btw this file shows some debug options like LOG_COMMAND LOG_TCIRQ but no idea how or where to invoke this
Now I dont know if DMA transfer should end with Interrupt being held high until manually cleared in the first place.
my guess as to the OP motherboard is one of:
-interrupt line sticking/being held high for some reason. This might prevent bios from recognizing end of consecutive command as afaik they all generate interrupt and bios waits for said interrupt to continue.
-IO command 8 *Sense interrupt status* is unsuccessfully send due to some IO corruption
-I dont know what to think about those 62ns short signals, ISA bus might be running too fast/glitching. Taking a capture at much faster rate (>50MHz) of at least iordy and DMAAEN with the fault manifesting would show if thats the case.
Thanks. I'm still fairly sure that for a normal read/write/verify/format command, the FDC will set the IRQ line at the end of the execution phase (once DMAC has done it's thing) and clear it once the results have been read - sense interrupt is only used to get the results from a Recalibrate or Seek (https://wiki.osdev.org/Floppy_Disk_Controller … Sense_Interrupt), no idea why that is, but FDCs are a bit of an 'evolved' not designed IC!
rasz_pl wrote on 2022-09-14, 10:29:
"-interrupt line sticking/being held high for some reason" -
Yeah this would be a problem but I think it would error out, not lock the machine, as the loops waiting for the Floppy Int flag to go high are not infinate, but should timeout
rasz_pl wrote on 2022-09-14, 10:29:
"-IO command 8 *Sense interrupt status* is unsuccessfully send due to some IO corruption"
Possible, but there isn't a seek/recalibrate at the end of a read/write/format/verify int 13 call, however I think Lee did the traces using DOS, so it might be reading the directory or something. I also can't see why this would only happen for a 2+ sector read from the floppy, but be perfectly stable on a 1 sector read...
rasz_pl wrote on 2022-09-14, 10:29:
-I dont know what to think about those 62ns short signals, ISA bus might be running too fast/glitching.
Hmm, this is interesting, does seem a bit spicy. Could it be the GC113 that is generating those IOCHRDY signals (input only on the GC101)? Looking at it's datasheet it's timing does suggest it would go low for 2 PROCCLK cylces, PROCCLK running at 32MHz for a 16Mhz CPU, so 62ns would be right. It would be for the benifit of the GC101 for lengthing the CPU cycle and not the ISA bus devices which tend to only use IOCHRDY as an output to request more time. The GC113 datasheet states that it only uses IOCHRDY to handle a page miss (not sure what that means to be honest). But maybe something else is dropping IOCHRDY? I don't think it's the FDC, a lot of the Goldstar ones don't even have it connected and it's not used on Sergey's 8-bit ISA FDC card for example (I think would need external circuitry to activate it anyway as not output by the integrated 82077 chip).
I wonder if when Lee has the energy, he could try using the very simple Debug-read-2-sectors-test, so less DOS in the way - and trace as much as he can using his LA, we could perhaps help him to identify what would be really good signals to look at? I'd be very interested in some of the following:
- CPUHRQ (GC101)
- CPUHLDA (GC101)
- DRQ2
- TC
- IOR
- IRQ6
- INTR (to CPU)
- INTA (from CPU)
- WE line to the Memory
- others I can't think of right now... 😉