Author Topic: How do I use calcnet for Axe?  (Read 13537 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
How do I use calcnet for Axe?
« on: January 14, 2011, 02:35:39 pm »
Insofar as I can tell, using calcnet seems to be fairly simple - a certain amount of RAM is allocated for data, and there are about 4 commands I can use to send/recieve data.  However, I have no idea on the specifics, and the nature of the sending-of-data.
So out of curiosity...

1] Which area of RAM can I store data to?  (I think it's L1?)
2] How do I instruct my calculator to send/recieve data?
3] When sending data, how exactly does it work?  Does it take the contents of my buffer and update every other buffer to match mine, or what?
4] Is there a way to use Calcnet without having to require/bundle DoorsCS 7.1 with each program?
5] Could somebody provide a simple example of an Axe program using Calcnet?
6] How do I simulate linking two calculators in wabbitemu?
7] How is Calcnet spelled?  Is it 'calcnet', or 'CalcNet', or 'Calcnet', etc...
« Last Edit: January 14, 2011, 02:36:11 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #1 on: January 14, 2011, 02:36:46 pm »
4] Is there a way to use Calcnet without having to require/bundle DoorsCS 7.1 with each program?
No.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: How do I use calcnet for Axe?
« Reply #2 on: January 14, 2011, 02:37:01 pm »
you dont have to have cn, using a simple 2.5mm jack cable with get( and send( is enough
I'm not a nerd but I pretend:

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #3 on: January 14, 2011, 02:40:04 pm »
4] Is there a way to use Calcnet without having to require/bundle DoorsCS 7.1 with each program?
No.
Ah, well, pretty much what I expected.

you dont have to have cn, using a simple 2.5mm jack cable with get( and send( is enough
Okay,
8] Do the send( and get( commands send/recieve data for an extended period of time, or for only a brief millisecond?
9] Is it feasible to send about 100 bytes of data using get( and send(?
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: How do I use calcnet for Axe?
« Reply #4 on: January 14, 2011, 02:42:27 pm »
I cannot help you with Axe, but I can help you with CALCnet.  If you wish to pick my brain, I'll try to remember to check this topic (someone on #cemetech on IRC alerted me to it), but it's very likely I'll forget, so I'd ask that if you would like to pursue CALCnet that you poke my on Cemetech.



Offline Compynerd255

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +53/-4
  • Betafreak Games
    • View Profile
    • Betafreak Games
Re: How do I use calcnet for Axe?
« Reply #5 on: January 14, 2011, 02:44:29 pm »
Using CALCnet is actually very important for having 3+ player games. It basically works with every calculator having a 3-byte address. When you send data to someone else, you store the address first, then the packet contents, then the size of the packet contents, in that order. Once you do that, the interrupt routine will simply send the information byte by byte to the target's recieve buffer. Look up the CALCnet2.2 whitepaper on cemetech.net.
The Slime: On Hold, preparing to add dynamic tiles

Axe Eitrix: DONE

Betafreak Games: Fun filled games for XBox and PC. Check it out at http://www.betafreak.com



Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: How do I use calcnet for Axe?
« Reply #6 on: January 14, 2011, 02:44:57 pm »
the time is:
send(byte,timeinticks)
so to send 100 bytes in str1, you could use
for(a,0,99)
send({str1+a},10)
end

get checks if there's a byte in the link port
for(b,0,99
get->{str1+b}
end
I'm not a nerd but I pretend:

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: How do I use calcnet for Axe?
« Reply #7 on: January 14, 2011, 02:53:47 pm »
*Five byte address, but close enough.  The whitepaper (and an abbreviated HOWTO) are at the following pair of links, respectively:

http://www.cemetech.net/projects/item.php?id=33
http://dcs.cemetech.net/index.php?title=Interfacing_CALCnet2



Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: How do I use calcnet for Axe?
« Reply #8 on: January 14, 2011, 05:12:02 pm »
I cannot help you with Axe, but I can help you with CALCnet.  If you wish to pick my brain, I'll try to remember to check this topic (someone on #cemetech on IRC alerted me to it), but it's very likely I'll forget, so I'd ask that if you would like to pursue CALCnet that you poke my on Cemetech.
Idea, I can edit the topic title to "Kerm, read this or I'll eat you (CALCnet question)" so it highlights you on IRC. ;D

j/k that would get annoying :P

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #9 on: January 14, 2011, 05:24:58 pm »
One of your most powerful tools is "if"

all my send statements are.
If Send(#,"length)
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #10 on: January 14, 2011, 07:21:58 pm »
I think I might learn Axe+CalcNet some of these days. Those links are useful!
« Last Edit: January 14, 2011, 07:22:11 pm by ScoutDavid »

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: How do I use calcnet for Axe?
« Reply #11 on: January 14, 2011, 07:25:25 pm »
I think I might learn Axe+CalcNet some of these days. Those links are useful!
Cheers, Scout.  DJ, hehe.



Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #12 on: January 14, 2011, 07:29:22 pm »
I really need to learn assembly one of these days.
Thanks for the links, Kerm!
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: How do I use calcnet for Axe?
« Reply #13 on: January 14, 2011, 10:18:16 pm »
When full axiom support is available, It might be easy enough to just do the basic calcnet commands without DCS.  If you were doing an app or something, that might be best considering how big DCS is.

Offline Compynerd255

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +53/-4
  • Betafreak Games
    • View Profile
    • Betafreak Games
Re: How do I use calcnet for Axe?
« Reply #14 on: January 14, 2011, 11:26:46 pm »
Insofar as I can tell, using calcnet seems to be fairly simple - a certain amount of RAM is allocated for data, and there are about 4 commands I can use to send/recieve data.  However, I have no idea on the specifics, and the nature of the sending-of-data.
So out of curiosity...

1] Which area of RAM can I store data to?  (I think it's L1?)
2] How do I instruct my calculator to send/recieve data?
3] When sending data, how exactly does it work?  Does it take the contents of my buffer and update every other buffer to match mine, or what?
4] Is there a way to use Calcnet without having to require/bundle DoorsCS 7.1 with each program?
5] Could somebody provide a simple example of an Axe program using Calcnet?
6] How do I simulate linking two calculators in wabbitemu?
7] How is Calcnet spelled?  Is it 'calcnet', or 'CalcNet', or 'Calcnet', etc...
1) About the first 600 bytes of L1 are used by CALCnet2.2, so if you want to store data, you must store to the end of L1, to L3 (abandoning grayscale, L4 (abandoning archiving), or an appvar in user memory (this is actually what I do in Eitrix, which is being developed here).
2) Read the CALCnet whitepaper on cemetech.net. Sending basically is storing bytes in certain locations in a certain order. Recieving happens automatically, and you only have to check the recieve buffer, do what you want with it, and then clear it. The CALCnet interrupt takes care of the rest.
3) CALCnet uses point-to-point sending. Each calculator has a unique 3-byte address based on its serial number. When you send data, you store where you want it to go, and it will get there in less than a tenth of a second if everything is working right. You would store 0 to the address to send the message to everyone (this is how you would send your ID), and use AAAAAA to connect to a router that connects to the Internet.
4) Sadly, you do need DoorsCS, unless you can somewhow embed the libraries into your program. Someone with influence at Cemetech could convince Kerm to make a smaller version with some of the features removed (such as the BASIC libs).
6) I don't know about wabbitemu, but Tilem 0.992 (the emulator I use) supports libticables, which allows an instance of the emulator to set a virtual link cable for linking together two calculators. You can also use this to link with a real cable (except for TI-84 Plus Directlink) which you could modify or couple to link with more than one calculator (although I don't know how good that is for your computer).
7) The first time you use it, you write CALCnet2.2. Thereafter, you can write CALCnet.

CALCnet is essential when you are sending a lot of data or linking more than one calculator (through simply splicing link cables together). Other than that, you should use Axe's linking functionality.
The Slime: On Hold, preparing to add dynamic tiles

Axe Eitrix: DONE

Betafreak Games: Fun filled games for XBox and PC. Check it out at http://www.betafreak.com