| New Post | New Topic |
| Goto page Previous 1, 2, 3, 4, 5 Next | |
| 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 |
||
| 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 | |||
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 | |||
|
||||
| 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 |
||
| 03 May 2012 08:50:17 pm by LincolnB | Quote | |||
Mind posting your code? |
||||
| 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 |
||
| New Post | New Topic |
| Goto page Previous 1, 2, 3, 4, 5 Next | |
[Switch to Desktop view]
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
