Leading the way to the Future
Welcome Guest, Login!
28 Apr 2012 07:05:18 pm by geekboy1011 Quote
Unless my math is really wrong. Using my code is 1cc and 1 byte more optimized. Kinda moot but just putting that out there in the thread.

hopefully that chart helps you tho lincolnB Very Happy
28 Apr 2012 10:49:24 pm by LincolnB Quote
Alright, thanks. I'll be sure to check that out. How does this flowchart relate to the other one, can it be a complete replacement? Like, do I need to use the other one at all, or is this one complete?
28 Apr 2012 10:57:46 pm by geekboy1011 Quote
the first flow chart you used is the model for sending and receiving frames. the one i just linked is for setting up a peer to peer network within calcnet. so you need both as one is just initialization the other is what you use when actually handling data
28 Apr 2012 11:03:26 pm by LincolnB Quote
OK, so all I need to add is in the //program inits line, where I would set the respective memory areas to the sending and receiving calc's IDs?
28 Apr 2012 11:24:24 pm by geekboy1011 Quote
no alot more than that. basically you have to implement the second flow chart http://geekboy.57o9.org/CALCNet/CALCnet%20Server%20Client%20Initialization%20Flow.png

and then once that is done use the first flowchart to send data between the calcs in the network. both charts work together
30 Apr 2012 09:07:43 pm by LincolnB Quote
So the pseudo-pseudocode would look something like this:

.prgmTEST
#Axiom(GCNAXE)
//2nd flowchart here
Repeat getkey(15)
//1st flowchart here
//other game code
End
30 Apr 2012 09:27:31 pm by geekboy1011 Quote
.prgmTEST
#Axiom(GCNAXE)
while !GetR
asm(76)
end
//save id and quit to the next step in teh flow chart
30 Apr 2012 09:32:35 pm by LincolnB Quote
What does Asm(76) do?

EDIT: Also, I'm looking at that second flowchart, on the Client side; there's a line that's confusing me. It says, "Save ID and send frame back". Would that look something like this?

Copy(RXID,OTDAT,5
5->{TXID+2}
SetS
30 Apr 2012 10:15:41 pm by geekboy1011 Quote
yes but that would work. really all you are doing there is sending an ack to the calc that is broadcasting so it knows you exist
01 May 2012 11:55:24 am by KermMartian Quote
This is a bit off-topic, but I noticed that your assembly file for the Axiom is named gcn.asm. This is incorrect - you have made a CALCnet axiom. Calculators are (just about) never aware if they're communicating over CALCnet or gCn, since gCn is supposed to be entirely transparent to calculators. A half-hearted analogy would be Ethernet/ TCP/IP = CALCnet2.2, "the internet" (ie, its global infrastructure of satellites, fiber, copper, etc) = globalCALCnet. All a computer knows is that it's talking TCP/IP to something else, without knowing all the details of whether the other computer is on the end of a 3-foot Ethernet cable or thousands of miles of infrastructure.
01 May 2012 04:50:28 pm by LincolnB Quote
how do you broadcast directly across the link port? Also, what are the values in RCVID and SNDID used for?
01 May 2012 06:10:56 pm by geekboy1011 Quote
you don't need to send stuff over the link port lincoln calcnet does that for you.

RCVID is the person who will receive the data being sent

SNDID IS the person who sent you data
01 May 2012 09:13:35 pm by LincolnB Quote
So in a two player game, RCVID and SNDID will have the same value?
01 May 2012 11:00:51 pm by geekboy1011 Quote
yes
02 May 2012 09:25:32 am by Compynerd255 Quote
geekboy1011 wrote:
you don't need to send stuff over the link port lincoln calcnet does that for you.
RCVID is the person who will receive the data being sent
SNDID IS the person who sent you data

Actually, I think that RCVID and SNDID are reverse of what you said, because I can use {°RCVID + 6} to access the byte containing the recieve data flag.
But yes, setting the send flag tells CALCnet to broadcast across the link port, and resetting the recieve flag tells CALCnet that it's OK to accept a new recieve frame. In another context of "broadcast", If SNDID contains all zeroes, the frame sent is a "broadcast" frame that anyone can get, but there is no guarantee that any of the calcs will recieve it, so you should keep track of the other player's ID as soon as they get it and use that to send directed frames, which will only reach that calc and are far more likely to get there.

Out of curiosity, Kerm, does the current CALCnet protocol have a timer variable (one that is incremented by 1 every time the interrupt is run)? If not, is there a way that the 84 Plus crystal timers can work with CALCnet?
02 May 2012 09:32:19 am by KermMartian Quote
Compynerd255 wrote:
Out of curiosity, Kerm, does the current CALCnet protocol have a timer variable (one that is incremented by 1 every time the interrupt is run)? If not, is there a way that the 84 Plus crystal timers can work with CALCnet?
I'm not entirely sure what you're asking. You can indeed use the crystal timers with CALCnet, or at least two of the three (or maybe it's one?). If I recall my USB code correctly, and it's been quite some time since I touched it, one or two timers are required for part of the Direct USB system. I'll have to double-check my code and get back to you on that. I'm not sure what you're asking about the timer variable, though, unless you're saying that you want your program to know when the interrupt has executed, in which case I'd have to ask why.
02 May 2012 02:05:18 pm by geekboy1011 Quote
compy it very well might be i will post an updated and proofreaded readme before I sleep tonight as I am not home to work on it currently. It will also have a updated lib file called GCNLib (yes Kerm I know you want it to be cn2 which is what I will name it when its out of beta Razz) which will change the names around slightly to have TX and RX prefixes instead of SND and RCV just easier for me. you can really change them to what ever you want I don't care
03 May 2012 08:50:17 pm by LincolnB Quote
Compynerd255 wrote:
I did a little more testing with the Axiom and library, and I was able to get Calcnet up and running between two calculators (TI 84 Plus and TI 84 Plus Silver Edition, if you'd like to know).


Mind posting your code? Very Happy
07 May 2012 03:33:31 pm by LincolnB Quote
So what happens if RCVID and SNDID are filled with 5 bytes of zeros?
07 May 2012 03:36:26 pm by geekboy1011 Quote
ok sndid should never be filled with 5 0's thats pointless

rcvid when that is filled with 5 0's calcnet will send the data you have loaded to everyone. not just a specific endpoint

so say we had 3 calcs on the network
11111
22222
33333

if you filled rcvid with 22222 on calculator 11111 only 22222 will get the frame 33333 will ignore it

now if you filled rcvid with 00000 on calculator 11111 both 33333 and 22222 will get the data IF they are able to accept data. unlike a non braodcast frame it will not poll until it is sent it just sends it once and assumes the data got where it was intended to go