This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 09 Jun 2003 05:41:31 pm    Post subject:

Ahhhhhhh! This is a section of code I think Maarten gave me, and it looks like it would work perfectly. However, I haven't had any luck with it on two linked calcs, and it didn't work on the virtual link for VTI either.

Can anyone see the problem?

rand->X
X->Y
GetCalc(Y
Pause
If X=Y
Then
GetCalc(X
(X>Y->T
Else
(X<Y->T
End
If T
Then
(Stuff for Player 1)
Else
(Stuff for Player2)
End

I'm confused. Neutral

Spyderbyte
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 10 Jun 2003 03:53:58 am    Post subject:

I think he is trying to make the two calculators decide which calculator is calculator 1 and which is calculator 2 automatically.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 10 Jun 2003 04:55:02 am    Post subject:

Here's what I would use but I don't know if it works since I've only got 1 calculator:

Repeat X!=Y
randInt(1,999->X
X->Y
getCalc(Y
Pause
End
(X>Y->Z
If Z:Then
calculator 1 stuff
Else
calculator 2 stuff
End

I can't see any problems in Maarten's code though. I think he also had a more optimized version of that code, might want to have a look at the old cirrus forums if it's still working. You could also try downloading (maartenderickx.tk if I remember correctly)one of his game's and have a look at the source code.

BTW what doesn't work, do both calculator's think they are calc1 or what?


Last edited by Guest on 10 Jun 2003 04:56:12 am; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 10 Jun 2003 05:44:16 pm    Post subject:

Well when I run it, neither calculator gets out of pause, and when you hit enter instead the calcs have different values for X and Y.

I can't think of any reason other than getcalc just isn't working. Mad

Spyderbyte
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 10 Jun 2003 06:22:18 pm    Post subject:

do to the fact that i can really use this code, ill try to work on it. (try is not a key word here)
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 10 Jun 2003 07:27:01 pm    Post subject:

i dont think getcalc works. period. end of sentence. cause, ive tried using it many times, and it did nothing!
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 10 Jun 2003 11:43:08 pm    Post subject:

It can only get info while at a pause, so it sucks.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 11 Jun 2003 04:36:38 pm    Post subject:

ive emailed them about that, so that the calculator would only be like that in asm and in BASIC it would just halt the current prgm, send the data and resume (all i got was a confermation letter that they recieved my email that was computerized) although when i sent them another idea, i got another conformation letter AND a letter from some lady (im not bothering to look up her name at this moment) at ti saying she passed this letter and the letter i sent previously to the dev team at ti. nothing since then. Neutral
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 11 Jun 2003 04:41:38 pm    Post subject:

was her name something like Yolanda? i get most of my replies from her...
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 12 Jun 2003 08:09:34 am    Post subject:

however, send and get require the CBL/CBR app
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 13 Jun 2003 10:47:21 am    Post subject:

Is everyone sure getcalc gets the other calculator out of pause? I tried pausing one calculator and running getcalc on the other, and it got the variable but left the other program paused.

I tried running over the virtual link in VTI as well and the same thing happened.

BTW - When you have two VTI's running, you have to select Virtual Link on both of them, right?

Thanks!

Spyderbyte
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 14 Jun 2003 03:25:29 am    Post subject:

TI has no plans to change getcalc( because among other things, it would cause incompatibilities.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 16 Jun 2003 09:25:21 pm    Post subject:

Maybe they should create a second command, like GetVar(.

I don't know if it's just my calculator, but GetCalc doesn't get the other calculator out of pause.

Spyderbyte
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 17 Jun 2003 03:26:33 am    Post subject:

GetCalc is not supposed to take the other calculator out of pause.

It is supposed to get a variable from the other calculator that is in pause.
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 17 Jun 2003 08:06:59 am    Post subject:

they need a sendentr command to take it out. Would you be content with an ASM routine that sent the enter key?

ld a,$83 ;device ID
bcall(_sendabyte) ;send register A
ld a,$87 ;command type
bcall(_sendabyte) ;Thanks to:
ld a,Kenter ;keypress to send
bcall(_sendabyte) ;David Lindström,
ld a,$00 ;Not sure, but include it anyway
bcall(_sendabyte) ;For the doccumentation

Warning: not yet tested!


Last edited by Guest on 17 Jun 2003 01:36:52 pm; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 17 Jun 2003 01:34:16 pm    Post subject:

Sure that would be great! I'll see if I can dig TASM out of my harddrive (It's been really long since I used it) and compile it.

By the way- For a virtual link in VTI I select Virtual Link in the options for both calcs, right?

Spyderbyte
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 17 Jun 2003 01:35:07 pm    Post subject:

I think so.

Edit: great! It works! I made code that works! YES!

Edit2:that goes after the getcalc in case you were wondering.


Last edited by Guest on 17 Jun 2003 02:20:20 pm; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 20 Jun 2003 04:10:21 pm    Post subject:

YAY! ZENTER works, and I edited and reworked parts of my program, and it almost works. But anyway, does getcalc work with strings? I'm hoping that my problem is VTI doesn't support it.

I can work around it if I need to, but I was just curious.

Thanks!

Spyderbyte
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 20 Jun 2003 04:15:49 pm    Post subject:

if getcalc doesnt work with strings, u may want to try a string to list routine... it should send strings just fine though...
Back to top
Pascal


Advanced Newbie


Joined: 24 May 2003
Posts: 76

Posted: 21 Jun 2003 03:16:42 pm    Post subject:

get calculator works for any varyable type. I think even programs, but im not sure. I extensivly researched get calculator in my 3 way network. And there is no possible way to make an "interactive" game with get calculator. Thje reason is baecasue as Jbirk said, the other calculator must in in pause. Or it may be at home screen, or in input waiting mode (when you input information in you basic programs") basiclaly any time when your caclulator is in a nested loop, it must wait, until it replys to any link requests. Asm protocals would work the best. Basically you need to cheack bytes sent, then if bytes are sent, recieve, if not continue loop. the sending calculator need to send bytes slightly longer than the other calcultor takes for one loop. THe fastest multiplayer possible is form using 3 calculators and a hub or 3 way link calble. Baically 2 calcs are runnign the game, and the third one sits at home screen. Each rnning cac send's its data (coordinates, stats ect) and recieves other calculator data. The principla is that the calcs send theiur data ato the main calculator, and the main calculator will divy out the data to the calcs that need it. So on calculator sends its data ( it is recieved by the idle calculator) and then the other clac wants that data, so it requests, and the idle calculator answerd (becasue it isnt doing anything) and the link data is sent. The idle calculator is then in a way, a server.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement