The secret to linking two TI83's in TI BASIC written by Frank Schoep 04/04/2001 dsfs98@concepts.nl http://foreverfornow.cjb.net http://www.cahaltech.com INTRODUCTION ============ Writing games for two players is difficult. Expecially when you don't know how to link two calculators. In this text document, I want to explain how it is possible to link two TI83's in TI BASIC. You don't need to have any experience with advanced techniques or Assembler. I have written down all my experiences with TI83 linking and I'll maybe even release a new game for two players on two calculators. Have fun reading this file! STANDARD ======== The command necessary for communicating with another TI83 is GetCalc(. It can be used to transfer a variable from the linked TI83 to the current calc. It seems to work randomly: sometimes it gets the variable right, but other times it does not seem to work properly. I have found out what is causing this: the linked calculator must be in a power saving state so it can handle all tasks. How would you do this? Simple: make sure the sending (not the calc executing GetCalc) is in a 'Pause' state. It's that simple: just have the sending calc wait with the command Pause. A simple program will demonstrate this: prgmSENDER :12/->/A :Pause prgmGETCALC :7/->/A :GetCalc(A) :Disp A Now run prgmSENDER on one calc. Start up prgmGETCALC after you've initialized the first one. You will notice that the 'GETCALC' calc shows 12 (the variable from the other calc) and that the 'SENDER' calc is back in the homescreen. This means that: - GetCalc un'Pause's a sending calculator Using these simple techniques can be the first step to a nice multiplayer game. The most difficult part is to make sure that the sending calc is in 'Pause' state. I have discovered that one single Input command screws up communication, so make sure you don't use Input in your programs. I will give two new examples to show this: prgmSENDER :Input A :Pause prgmGETCALC :Input A :GetCalc(A) :Disp A Now, run the sender program and enter a value (e.g. 10). The calc will pause after you've pressed [ENTER]. Now start the GETCALC program on the other calc. Enter a value (e.g. 3). The calc will now get the value of the other calc and display the value entered on that calc. But this doesn't happen: it still displays the '3' entered on the 'GETCALC' calc. On some calculators this problem seems to not exist. Even VTI handles this situation as it should be. I don't know what is causing this (maybe ROM version or link cable...) The Menu command CAN be used. It turns the calculator in the same power saving mode as Pause. For/End loops can be used as well as Lbl/Goto. All other commands seem to be 'safe' as well. ADVANCED ======== If your calc should *send* a value to the other calc at a set time and then get a variable, you could use the following example: prgmSENDER ;needs to send var A and get B to/from the other calc :Pause wait until other calc is ready to get :For(O,1,50) \ start timeout loop :End / small timeout for the cable connection :GetCalc(B) get other variable (B in this case) prgmGETCALC ;needs to accept a new A value and send B :For(I,1,100,2) \ :Disp I > here goes the normal code :End / :GetCalc(A) unpause other calc (var is immediately sent) :Pause ready for another transmission from this side OTHER ===== This file has no goal: it only explains how you can create a multiuser program. Thank you for your time. - Frank Schoep dsfs98@concepts.nl http://foreverfornow.cjb.net http://www.cahaltech.com Dedicated OASIS fan Dedicated to ....... ....... .....