The answer is that an NMI is arriving during that delay loop. from the debugger:
Code: Select all
0D45: 88 DEY >s
0D46: D0 FD BNE 0D45 >s
0D45: 88 DEY >s
0D46: D0 FD BNE 0D45 >s
0D45: 88 DEY >s
0D46: D0 FD BNE 0D45 >s
0D00: 85 CC STA CC >s
0D02: 84 CD STY CD >s
0D04: AD 84 FE LDA FE84 >s
0D07: 8D 36 10 STA 1036 >r
6502 registers :
A=83 X=FF Y=3C S=01D9 PC=0D07
Status : N I C
0D07: 8D 36 10 STA 1036 >s
0D0A: 29 5C AND #5C >s
0D0C: D0 07 BNE 0D15 >s
0D0E: AD 87 FE LDA FE87 >s
0D11: A4 A2 LDY A2 >s
0D13: 91 A0 STA (A0),Y >s
0D15: E6 A2 INC A2 >s
0D17: F0 05 BEQ 0D1E >s
0D19: A5 CC LDA CC >s
0D1B: A4 CD LDY CD >s
0D1D: 40 RTI >s
0D45: 88 DEY >s
0D46: D0 FD BNE 0D45 >s
0D45: 88 DEY >s
0D46: D0 FD BNE 0D45 >s
Clearly this NMI routine is not meant to be re-entrant because it stores the registers at fixed locations, not on a stack, so this is not what is expected to happen. So maybe the issue is that the 1770 emulation doesn't allow extra delay for the inter-sector gap, i.e. longer than the delay between any two bytes of the same sector.