ZCom v2.11
ZCom v2.11 - Fast USB and I/O
Communication Routine for Basic Games
(83+/84+/SE)











Created by Johan Rydh

Introduction
Example Screenshots
Instructions
ZComLogo
ZConnect
ZGet and ZSend
Troubleshooting
Version History
Future Additions
Legal Disclaimer
Thanks to
Contact me


Introduction

ZCom is a communication routine for Basic programs and games. It can transfer real/complex variables and lists, matrixes, strings and pictures (new since v2.10) between TI-83 Plus
and TI-84 Plus calculators, at a speed around 1.2 kB/s trough the I/O port!
This version supports now the USB port! The USB port speed is around 2-3 kB/s.

This routine is 100% compatible with:

the TI-83 Plus, the TI-83 Plus Silver Edition, (only the I/O port)
the TI-84 Plus and the TI-84 Plus Silver Edition (USB and I/O port)

ZCom v2.11 is compatible with the syntax of v2.xx; you can replace v2.xx with this version.
You can't transfer data between v2.11 and earlier versions of ZCom!

This routine is made to replace the communication routine built-in in Basic,
which often doesn't work. This routine should always work!

This routine will be very useful for Basic Games that is for multi-players. This routine will enable link-games between three or even more players, for the TI-84 Plus family!

NOTE: Where it says anything about TI-83 Plus or TI-84 Plus,
this means the Silver Edition model too.

A major bug in ZConnect fixed! I included an earlier version by mistake, that does not work with the USB port. Now the USB port should work as well as the I/O port!

Information from earlier version (second release of ZCom v2.10):
The required routine Resource has been updated and is now also fully documented. A bug I found has been fixed, and the functionality has increased, it's also easier to use the routine now.
(If you have read the first version ReadMe, please take time
to read the new one; it's now much easier to understand.)

Top


Example Screenshots

Example Screenshot of Sending a Complex Value:


Example Screenshot of Sending a String:

Note: These animations were made for an earlier version, now the transfer speed is higher!
Read the instructions below, for more information how to use.

Top


Instructions

ZCom is a communication routine that sends the content of the Ans variable, which can be a real or complex value, a real or complex list, a matrix, or a string, and stores it as the Ans variable at the receiving calc. This routine is fully compatible with all members of the TI-83 Plus family and the TI-84 Plus family, you can transfer data through two different types of these calcs!
Version 2.11 can also transfer pictures, see instruction below.

ZCom v 2.11 is compatible with the syntax of v2.xx; you can replace v2.xx with this version.
You should not transfer data between v2.11 and earlier versions of ZCom!


ZComLogo

The syntax and use of ZComLogo has been changed a lot, but it is still fully compatible to the syntax of ZCom v2.00! It means that all programs made for v2.00 should work as previous
with v2.11, because of some code to be compatible is included.

A new feature is that ZCom only requires two files on the calc:
The assembler program ZCOMLOGO, which could be in Archive!
(Not if you have any program that was made for ZCom v2.00)
The application variable ZCOMDATA that should be in Archive! (Can be in RAM.)
This will save a lot of RAM when you aren't running a program that uses ZCom.

NOTE THAT YOU NEED TO HAVE THE ROUTINE "RESOURCE" IN RAM:

Everybody who is using ZCom v2.11 should also use the routine "Resource" (v1.00).
(Resource is a routine to copy programs from Archive to RAM.
It's included in this zip-file, and I have at the moment also
released the first fully documented version of Resource.)
(I'm sorry about that I haven't released it when I said, but I hope you will forgive me)

Syntax to setup ZCom:
:"0ZCOMLOGO
:prgmLDSOURCE
:"ZCOM0
:prgmTEMP
:Ans→List
:"0
:Asm(prgmRESOURCE

This will erase any settings and return information in Ans (list).
The programs ZSend, ZGet, and ZConnect will be created.
This version will save the current graph picture and show it when finished! (If Ans isn't any
valid value for ZComLogo the graph picture will be cleared, to be compatible with v2.00)

The list is in this format: (Have to be stored to a list instead of Ans)
{(1st) USB-port (1 if, else 0),
(2nd) Model: 83 or 84,
(3rd) Silver Edition (1 if, else 0),
(4th) OS version (X.XX),
(5th) ZCom version (X.XX) (will be 2.11 for this version),
(6th) RAM free minus the size of ZComLogo (the 7th element).
(6th) (You have to add the size of ZComLogo (the 7th element) to get the right approx. value)
(6th) (Returns a bit lesser value than the memory menu! (Some bytes)),
(7th) Size of ZComLogo,
(8th) Size of other programs (ZSend, ZGet, and ZConnect)}

Syntax to choose which port that should be used:
(On the TI-83 Plus family this won't affect the settings.)
:"0ZCOMLOGO
:prgmLDSOURCE
:"ZCOM#" or :#→Θ:"ZCOM"
:prgmTEMP
:"0
:Asm(prgmRESOURCE

(Θ is Theta)

# is a number 1 - 3:
1 - Mode 1: Chooses the USB port
2 - Mode 2: Chooses the I/O port (default)
3 - Mode 3: The real variable Z decides which port that should be used.
1 - Mode 3: Will be checked every time you run ZGET or ZSEND
1 - Mode 3: USB: Z=1......I/O: Z=2

Syntax to remove ZCom from RAM when the program should exit:
:"0ZCOMLOGO
:prgmLDSOURCE
:"ZCOM-
:prgmTEMP
:"0
:Asm(prgmRESOURCE

NOTE: It is the minus token '-' not the negation token '(-)'.

This will erase the program ZSend, ZGet and ZConnect to save free RAM.
(The programs will be created in the setup.)


ZConnect

ZConnect is a new member of the ZCom family since v2.10.
I'm sorry that I included a wrong version of ZConnect in v2.10 (that only worked with the I/O port). Now the right version is included and the USB port works as well as the I/O port!

It is used to setup the communication between two calcs in an easy way. It will check that the same program and version of the program (and even more properties) are the same at both calcs. It can use the USB port (TI-84 Plus family), the I/O port, or search for the right port! (Works on all models.)
The user can break the setup before it is completed.

The routine "Resource" is required, see under ZComLogo.
Note that it sometimes can take a few seconds to setup the connection!

Input variables:
Str1 Program name, (program ID), version, load a saved game, ...
K.... The getKey value for the key that can be used to cancel.
ZM| 0 = Auto (search for the right port)
ZM| 1 = The USB port
ZM| 2 = The I/O port

Returns variables:
Theta and Ans (Result of Setup)
XX"-2 = Not the same program, (program ID), version, ...
XX =|.2 "It means that Str1 is not the same on the two calcs.
XX"-1 = An error has occurred (A retry may be successful)
XX|."0 = Cancelled by user (The cancel key was pressed)
XX|."1 = Success, first player (1 of 2)
XX|."2 = Success, second player (2 of 2)
ZXX The TI-84 Plus family: 1 = The USB port X2 = The I/O port
ZXX The TI-83 Plus family: 1 or 2, the value is random (always the I/O port)
Str1 is unchanged.

NOTE: The values of the variables A and B are changed!

Syntax:
:SETUP THE VARIABLES
:prgmZCONNECT
:CHECK THE RESULT


ZConnect will set the right port if successful. (ZCom mode 1 or 2)
If not successful the routine will set ZCom to mode 3.


ZGet and ZSend

ZSend and ZGet are used to transfer variables (the content of Ans) and pictures (new since v2.10).
ZSend will not wait at a receiving calc. ZGet can be set to wait in three different lengths,
while waiting for data, the user now could break with the ON key!
To be sure that a variable is successfully transferred use the loop construction (in red text).

ZGet and ZSend will store the Theta variable, Θ, so you know if the transfer was successful:
#1 = Transfer successful
-1 = Transfer error or timeout
-2 = Not enough memory, only returned at the receiving calc!
The sending calc returns -1 if the I/O port was used, if the USB port was used the sending calc returns 1 (successful)!!! This will be changed in the next release (probably v2.12 that should be even faster, it will be out within a few months! I have now not the same problems when testing the USB routine)

ZGet will also store the Ans variable with the received data (not when transferring pictures).


ZSend Syntax 1: (Variables only, not pictures)
:Variable/Value
:Repeat Θ=1
:Asm(prgmZSEND
:End
This will transfer the content of the Ans variable to the Ans variable at the receiving calc.

ZSend Syntax 2: (Stored pictures in RAM only)
:"Pic############One of the tokens Pic0 - Pic9
:Repeat Θ=1
:Asm(prgmZSEND
:End
This will copy the Pic# to the same Pic# variable. (An existing variable will be overwritten.)
The Ans variable at the receiving calc will not be changed! (Will not affect the sending calc.)

ZSend Syntax 3: (Transfers the current LCD screen image to Pic# at the receiving calc)
:"StorePic #######The StorePic token and a number 0-9
:Repeat Θ=1
:Asm(prgmZSEND
:End
This will send the current LCD screen image to the Pic# (0-9) variable at the receiving calc.
(An existing variable will be overwritten.)
The Ans variable at the receiving calc will not be changed! (Will not affect the sending calc.)


ZGet Syntax: (Variables and pictures)
:Repeat Θ=1
:Time|###########A number 0-2, see below
:Asm(prgmZGET
:End
The Ans variable will hold the received data if successful), else Ans could be unchanged.
If a picture is received the Ans variable will be unchanged.

The input time is how long to wait before timeout: (approx. values)
USB:..............I/O:
0: 0.3 s...........0.3 s
1: 4.5 s...........9.5 s
2: 2:05 min....4:50 min
These values have been changed since v2.00 and are not the same for the USB and I/O ports!



Don't forget that you have to run the program ZComLogo
to create the other programs in the ZCom family! (ZConnect, ZGet, and ZSend)
At the end you should remove these programs to free up some RAM, see under ZComLogo.

If you are using this routine please include the zip-file or this document!



IMPORTANT!

This routine needs, for the TI-83 Plus, at least OS 1.16! (Else ZCom will not run.)
The USB communication protocol used for ZCom is not the standard protocol for USB!
This results that you
SHOULD NOT CONNECT THE USB COMPUTER CABLE WHEN RUNNING ZCOM!
(Another calculator in the TI-84 Plus family should not react on this protocol!)

Top


Troubleshooting

You can't transfer a variable:

• For the TI-84 Plus family you have to choose one of the ports. (USB or I/O)
• Check the cable connection.
• Check that ZGet is running while you send the variable with ZSend.
• Check the version of ZCom, you can't transfer data with to different versions.

One or both of the calcs has "locked":

(The program should not actually "lock", but it can seems like that.)
• Press ON until the message ERR:BREAK appears. (This could sometimes take a few seconds)
On the TI-84 Plus family the program can lock if you has connect the USB Cable to a computer!
Note: The run-indicator will not run while running any of these programs, it is not an error!

I think that this routine should be almost 100% bug free, but if you find any bug, please tell me!

Top


Version History

v1.00: First release with same functions as v2.00, but with a low speed.
v1.01: Mostly the same as v1.00.
v2.00: A new rewritten version, that both are a lot faster and smaller,
v2.00: a new logotype was added, and also a new HTML-based ReadMe.
v2.10: An updated and optimized version for supporting the USB port,
v2.10: and some other new features are added.
v2.10: The logotype is changed, ZComLogo is rewritten for saving more RAM when not used,
v2.10: it will now also return system and software information, and an easy way to
v2.10: choose what port that should be used, is included.
v2.10: A new program ZConnect, to easy setup the communication, is added to the ZCom family. v2.10 Second Release:
v2.10: The included routine Resource is updated. The ZCom documentation is changed a bit. v2.11: Right version of ZConnect included, just a few minor changes in manual.

Top


Future Additions

Even faster communication.
Better verification for the USB port.

(The thoughts about add a function to send programs
seem to be useless and only a waste of memory.)

Top


Legal Disclaimer

The author assumes no responsibility for any damage or error.

Top


Thanks to

Sean McLaughlin for the Learn TI-83 Plus Assembly In 28 Days -guide,
where I have learnt much about assembly programming.

Jimmy Nordström who has helped me to test the USB routine for the TI-84 Plus Silver Edition,
and who has given me some good ideas.

Top


Contact me

If you have any questions or anything else to report, mail me at
jrydh@hotmail.com
Please set the subject to ZCom 2.11.

Top


ZCom v2.11 - Fast USB and I/O Communication Routine for Basic Games (83+/84+/SE)
Created by Johan Rydh
10.7.2005