[Wow, is this thing still on? I didn't remember I was subscribed!]
On Fri, 11 Jun 2021 14:04:41 -0700 (PDT)
Joseph Herning <
joe.h...@gmail.com> wrote:
> Hello everyone!
>
> I'm new to this group. I am playing around with the link protocol for
> the 68k calculators.
>
> I have a TI-89 with AMS 2.09 and a V200 with 3.10. When I send a file
> request for a file that doesn't exist on the calculator the Link
> Guide seems to suggest the calculator should ACK then end the
> transmission
> (
https://www.ticalc.org/archives/files/fileinfo/247/24750.html or
>
http://merthsoft.com/linkguide/ti89/silent.html). This doesn't make
> much sense because the computer wouldn't know whether to receive data
> or move on. In testing the calculator actually responds with a
> SKIP/EXIT packet using error code 03h. The link guide calls this code
> "can't delete application."
>
> I cannot figure out the state of the calculator at this point. It
> does not immediately respond to a new variable request or a RDY even
> after an ACK, and is not trying to send data.
>
> I tried to verify this in TiLP. If I get a directory listing then
> change the name of a file on the calc, then try to get it with TiLP,
> sure enough the error message I usually get is "Msg: cannot delete
> application."
>
> What's going on here?
>
> - Joe
>
I don't know if my half-remembered knowledge of the Z80-series link
protocols will be any use, but just in case... :)
As far as I can recall, any time the PC or calculator sends a packet
with attached data and checksum, the other device is expected to
respond with an ACK (or an ERR if the checksum was wrong.) ACKs are
sometimes sent at other times too, but there should always be an ACK
in response to any packet with attached data.
So if you send a REQ, and the variable doesn't exist, the calculator
should send first an ACK (meaning the REQ was received correctly) and
then a SKP (meaning that variable doesn't exist). The SKP contains
data (an error code), so in response to that, the calculator expects
the PC to send an ACK. After that, as far as I know, the transaction
is over.
As for the actual contents of the SKP packet, I don't know. What TILP
calls the "error code", I guess, is the third of five data bytes? (In
the Z80 world, it's typically only one byte...) I'm sure those other
four bytes are there for a reason, and perhaps they would tell you
more about the cause of the error.
Romain Lievin did an absolutely fantastic job of reverse-engineering
the link protocols, but from what I remember, I think he did all of
that through trial and error, observing the data sent and received
over the wire - not by disassembling/decompiling the software, and not
from any official documentation. So, as excellent a document as it
is, it's unsurprising that the Link Guide is incomplete in some areas,
especially when it comes to error handling.
Best of luck in your protocol hacking adventures!
Benjamin