dwight wrote:
I suspect it isn't allowing access before the register has valid data.
I think there is some other hardware methods but I think the main issue
is that it is really designed to do DMA.
[...]
Anyway, I'm relatively sure that is it, unless someone else can come up with an
address dependency of the WD chip.
An address dependency does seem possible. Moving the
lda wdstat instruction around -- which is what the macro does -- apparently has an effect on the outcome.
My attention is on the transitions of address lines A1 and A0 in the cycles during and immediately after the
lda wdstat. These cycles are:
- ROM access: read the LDA opcode
- ROM access: read the LDA LS operand byte
- ROM access: read the LDA MS operand byte
- FDC access: read the Status register
- ROM access: fetch the opcode of the following instruction
Moving the
lda wdstat instruction around results in the following four possibilities. During the cycles of interest, the A1 and A0 values could be...
- 00,01,10,00,11 <-- problematic
- 01,10,11,00,00
- 10,11,00,00,01
- 11,00,01,00,10
Sequence (a) is the one that the macro prevents from happening, seemingly because it causes a failure. So, looking at the latter part of sequence (a), is there something weird about the 10,
00 transition? Better yet, what about the
00,11 afterward? (At the sub-cycle level, it's during phase 2 of the
00 cycle that the data gets moved. Then,
on the instantaneously following phase 1, A1 & A0 both change low-to-high.)
Theories, anyone? I tend to suspect a flaw in the 1581 more so than a problem in the FDC chip itself. Meanwhile keep us posted, please, floobydust, and best of luck in your efforts.
-- Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html