So the (eventually) planned globalCALCnet needs a bridge between CALCnet and the rest of the internet, and one possible step in that direction is a piece of hardware that can speak both serial and CALCnet. Based on my previous experience with Arduino linking emulating the TI link protocol, I decided to write an Arduino sketch to send and receive on a CALCnet network. I haven't decided all the specifics about things like pretending to be a single calculator or many calculators, but I did indeed implement successful bit reception, byte reception, and frame grabbing. Check out the following sniff of two (real) calculators running Flourish together. All the lines except the last are ball screen->screen messages, while the last is a quit broadcast from pressing [clear] on one calculator. More on this tomorrow.

Very cool Very Happy Can't wait to play Raven against people online Smile
_player1537 wrote:
Very cool Very Happy Can't wait to play Raven against people online Smile
Hehe, should be a lot of fun. Smile Next up will probably be writing the sending routines (frame, byte, bit), then throwing together a rudimentary piece of serial port-interfacing software that can chat with the Arduino and tell it which frames it should be ack'ing. Once that program takes over, I can make the Arduino send a much more compact set of serial info, and probably finalize the sketch.
Nobody cares.
I realized that sending is going to be much, much harder, because I'll have to figure out the Arduino vs. TI timing, but I'll still be diligently working on this today. Smile
This does actually look pretty interesting. What server does the arduino talk through? Does this work on all systems that the arduino talks to?
graphmastur wrote:
This does actually look pretty interesting. What server does the arduino talk through? Does this work on all systems that the arduino talks to?
The hope is that it will talk to anything with FTDI USB-Serial capabilities. Smile I assume a simple computer-side program will be sufficient to communicate with an equally-simple server.
*bump* Transmission is at last (almost) working, except that the checksum the target calculator is telling me is incorrect! I can see that a sequence of bytes is being properly sent, though, so I just need to figure out why a checksum that should be $00A9 is coming out as $0280 from the target calculator. That's a job for the morning.
That's weird. Maybe it's bit-shifted, with bit 2 removed.

I know I can talk to Serial via Java, processing, etc., so I think two calcs talking to each other over a network are going to be easy.

Maybe we can connect to one of your spare servers and play calc games, Kerm. Wink
graphmastur wrote:
That's weird. Maybe it's bit-shifted, with bit 2 removed.

I know I can talk to Serial via Java, processing, etc., so I think two calcs talking to each other over a network are going to be easy.

Maybe we can connect to one of your spare servers and play calc games, Kerm. Wink
I got it working; it turned out to be a missing inc hl in the on-calc checksum routine, but since sending and receiving use the same routine, I never noticed until now. Sad I was calculating the checksum as basically N*Data[1] instead of Data[1]+Data[2]+...+Data[N]. I know have frame injection fully functioning! I was able to inject fake balls into a Flourish demo, telling one calculator that the other calculator in a pair was telling it about new balls arriving onscreen. I ended up with about 50 between the two of them before I was satisfied that everything is working. Very Happy I just uploaded Doors CS 7.1.1 to the archives, which fixes the checksum issue.
KermMartian wrote:
graphmastur wrote:
That's weird. Maybe it's bit-shifted, with bit 2 removed.

I know I can talk to Serial via Java, processing, etc., so I think two calcs talking to each other over a network are going to be easy.

Maybe we can connect to one of your spare servers and play calc games, Kerm. Wink
I got it working; it turned out to be a missing inc hl in the on-calc checksum routine, but since sending and receiving use the same routine, I never noticed until now. Sad I was calculating the checksum as basically N*Data[1] instead of Data[1]+Data[2]+...+Data[N]. I know have frame injection fully functioning! I was able to inject fake balls into a Flourish demo, telling one calculator that the other calculator in a pair was telling it about new balls arriving onscreen. I ended up with about 50 between the two of them before I was satisfied that everything is working. Very Happy I just uploaded Doors CS 7.1.1 to the archives, which fixes the checksum issue.

So just curious, what is the wiring diagram for the arduino to the calculator?

Also, You didn't say anything about playing over the internet. :'(
Of course we can play over the internet! Things I need:

1) Enhance the C++ CLI program to keep track of what calculators are on its local network
2) Enhance the C++ CLI program to join a "virtual hub" on the remote server, which will link various remote clients
3) Write a serverside program to:
3a) Track the calculators at each client
3b) Tell each client about the remote calculators at other clients on the virtual hub
3c) Store a set of virtual hubs, and the clients and calculators on each virtual hub
3d) Enforce rudimentary sanity-checking and flood protection
4) Add capability to C++ and Arduino program so that the C++ program can instruct the Arduino to ACK frames intended for remote calculators

Did I miss anything? Also, the wiring diagram is just white to digital 2, red to digital 3, ground to ground, and I have an RGB LED on PWM pins 8, 9, and 10.
Oh, okay, easy wiring then. Let's see. Are you programming the arduino in C or the java type thing. I would figure with timing, it would probably be C. Also, do you have any spare servers that you are going to test this on, because I have all the hardware to hook it up if I can set up the software.
graphmastur wrote:
Oh, okay, easy wiring then. Let's see. Are you programming the arduino in C or the java type thing. I would figure with timing, it would probably be C. Also, do you have any spare servers that you are going to test this on, because I have all the hardware to hook it up if I can set up the software.
As I said, the Arduino side is done. As I also said, I'll be using a spare server as the virtual hub aggregate; I now need the server-side and client-side software, at least to a sufficient extent to test out the system I'm proposing.
Is it going to be a dedicated server thing or can people make their own servers from their computers via the software?
comicIDIOT wrote:
Is it going to be a dedicated server thing or can people make their own servers from their computers via the software?
For the sake of simplicity and for the early stages, one centralized server on one of my spare machines. I'm sure that won't be feasible in the long run if a lot of people start using it, but it will be good enough to start.
hehe, Gemini with other people online ought to be AWESOME Razz
qazz42 wrote:
hehe, Gemini with other people online ought to be AWESOME Razz
Once someone adds a CALCnet port of it, yes. Smile I spent a lot of time (up to 4am in fact) working on the clientside C++ program; I am going to try mocking up a server in Python now.
heheh, I wonder who will. Perhaps soon there will be a calcnet port of almost any game. Think of Sam Heald's Mario with 2 player mode Very Happy
qazz42 wrote:
heheh, I wonder who will. Perhaps soon there will be a calcnet port of almost any game. Think of Sam Heald's Mario with 2 player mode Very Happy
I definitely hope that people will do such things! ASM coders, if you want help with CALCnet2.2 for such endeavors, please do not hesitate to contact me.
  
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
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement