From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2004-08-24 21:19:16
Hello, * On Tue, Jul 06, 2004 at 12:42:46PM +0800 ncoplin@orbeng.com wrote: wow, today, I received some mails from the beginning of July. Did the mailing list have some hick-up? > 1) check for ATN within the send and receive byte routines (because > you don't have interupt response, you need to simulate it by checking > often); Well, this is essentially what the 1541 does with the IRQ (but, yes, I know that you cannot use it) > 2) by-pass UNTALK/UNLISTEN when (1) happens and go straight to the ATN > polling loop (afterall whatelse will the C64 be telling the drive!); Interestingly, this is also done in the 1541. It does this on every received byte. In fact, it has a little routine which tests for the ATN line if it has changed: $EA59 LDA $7D ' Are we in ATN mode ($7D = $80)? $EA5B BEQ $EA63 ' No, then branch $EA5D LDA $1800 ' Yes, so test: Is there still an ATN? $EA60 BPL $EA6B ' No, then quit ATN mode $EA62 RTS ' Yes, we're done ' If we get here, there is currently No ATN mode ($7D.7 = 0) $EA63 LDA $1800 ' Test if there is ATN? $EA66 BPL $EA62 ' No ATN, so we're done $EA68 JMP $E85B ' Handle ATN $EA6B JMP $E8D7 ' Quit ATN mode The routine checks if the modus has changed. If it has not, the routine just exits with RTS ($EA62). If it has changed, whatever was currently processed is aborted. Instead, we jump to $E85B (for ATN) or $E8D7 (for end of ATN). This function is called quite often while sending over the IEC bus (in $E909-$E999, for example, $E916, $E925, $E937, $E941, $E94E, $E987) or when getting data from there ($E9C9-$EA2D, for example, $E9CD, $E9DF, $E9FD, $EA1A) - in fact, it is called whenever the IEC bus is waiting on anything. So, in fact, this seems to have nothing to do with the missing IRQ for ATN but with fault tolerance of the protocol. Regards, Spiro. -- Spiro R. Trikaliotis http://www.trikaliotis.net/ Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.