Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
Send( and Get Command
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Send( and Get Command (Read 4188 times)
0 Members and 1 Guest are viewing this topic.
Axe Programmer
LV2
Member (Next: 40)
Posts: 32
Rating: +0/-0
Send( and Get Command
«
on:
February 21, 2014, 12:16:00 pm »
Hello to all these smart programmers, can somebody please give me an example program on how to send the variable A from one calculator to another using the link cord? i am working on a two player pong game. I am not exactlly sure how to use the Get or Send( command. Thanks for the help
. And which link port should i use? I have a TI-84 Plus Silver Edition OS 2.55MP. I want to be able to send between both 84s and 83s.
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: Send( and Get Command
«
Reply #1 on:
February 21, 2014, 12:46:23 pm »
Send(BYTE,TIME) sends one byte. Keeps checking if the other calc wants to Get a byte until it times out. Returns 1 on success. Returns 0 when no byte was sent.
Get receives one byte. Never waits. Returns the byte on success. Returns -1 when no byte was received.
Mind that axe variables are two bytes long. When you send data using Send you only send the lower byte of a variable.'
You should use the linkport on the left. It says I/O on the back
«
Last Edit: February 21, 2014, 12:47:07 pm by Keoni29
»
Logged
If you like my work: why not
give me an internet?
Axe Programmer
LV2
Member (Next: 40)
Posts: 32
Rating: +0/-0
Re: Send( and Get Command
«
Reply #2 on:
February 24, 2014, 11:57:13 am »
Thanks, but can you please give me an example program?
If you stored 8 to A, how would you transfer the same value of A to another calculator?
Also, when you transfer variables between calculators, do they have to be the same model/os?
Logged
willrandship
Omnimagus of the Multi-Base.
LV11
Super Veteran (Next: 3000)
Posts: 2953
Rating: +98/-13
Insert sugar to begin programming subroutine.
Re: Send( and Get Command
«
Reply #3 on:
February 24, 2014, 11:58:29 am »
On Sender calc:
Send(A,some amount of time)
On Reciever calc:
Get->A
Logged
Matrefeytontias
Axe roxxor (kinda)
LV10
31337 u53r (Next: 2000)
Posts: 1982
Rating: +310/-12
Axe roxxor
Re: Send( and Get Command
«
Reply #4 on:
February 24, 2014, 01:28:42 pm »
It's a great pain since you'll have to take care of all possible delay. I don't really remember my attempts though, sorry.
Logged
/\ >< [- |_| _\~ [- /?
All of the TI-z80 screenshots that I will post, unless I specifically mention that it's not the case, will run at 6 MHz.
Always
. If you find that unbelievable, you should check the last link of my sig
Nerdiness
Projects :
[Ndless3.1] nKaruga
,
[Axe] Worms (yes !)
,
[Ndless 3.1] F-Zero TrackSpire (dropped)
,
[Ndless 3.1] nSpeedX 3D (paused)
,
[Ndless 3.1] nRayC, an easy-to-use raycasting (3D) engine in C for your Nspire ! (paused)
Proud author of :
[TI-8x] Jetpack 8x+
,
[TI-8x+] Gravity Walls
,
[ASM for Axe] AxeDCS axiom for Axe programmers
,
[TI-8x+] WiredWorks : a SolidWorks on your Ti-83+/84+ !
,
[TI-8x+] Super Crate Box
,
[Axe] IkarugaX, an awesomely challenging danmaku/shoot-them-up for your TI-83+/84+ !
,
[ASM for Axe] AxeJh3D axiom, a very fast 3D ASM library for Axe coders !
If at a certain moment you think that I'm awesome, you can express it by
giving me one more Internet (>^_^)>
josh landers
LV4
Regular (Next: 200)
Posts: 116
Rating: +1/-0
Re: Send( and Get Command
«
Reply #5 on:
March 01, 2014, 04:10:14 pm »
I dont see why one cant send a file? Is there an axiom for it?
Yah! Posted 40!!!!
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: Send( and Get Command
«
Reply #6 on:
March 01, 2014, 04:49:41 pm »
You don't want to send an entire file back and forth for a pong game. You just need to send a couple of bytes every time the ball passes the edge of the screen.
These bytes are:
-Horizontal velocity
-Vertical velocity
-X/Y position depending on which part of the screen is facing the other calculator.
Logged
If you like my work: why not
give me an internet?
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
Re: Send( and Get Command
«
Reply #7 on:
March 01, 2014, 06:29:46 pm »
To ensure that everything remains in sync and to be sure the game doesn't break if one calc is accidentally disconnected, would having each calc wait until the other sent new coordinate data work? That way, it would be slower, but if one calc is disconnected, gameplay would pause (with the ability to exit if it takes too long), then when the cable is connected again, gameplay would resume. Kinda like in Starcraft when a player is lagging.
This would also solve the problem about newer 84+ calcs having a clock speed that is slightly higher than older ones. (eg hardware A calcs run at 14.9 MHz instead of 15.1 or something)
«
Last Edit: March 01, 2014, 06:34:19 pm by DJ Omnimaga
»
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
Send( and Get Command