Page 1 of 4

Bell release v0.2!

Posted: Thu 09 Nov, 2006 9:11 pm
by Timendus
Bell release v0.2
(Binary data Exchange Link Library)

http://bell.timendus.com/

Timendus wrote:My point of view here is that I want things to work, be simple and preferably be fast. Or at least fast enough to be useful.

I think I'm going to have to make two versions of the library (and the protocol); one that is optimized for simple data transfer between two(!) calculators, mainly aimed at game programmers who need speed and don't care about the theoretical possibilities of networking [...]

I want to make a simple, small and fast library using some implementation of TI's protocol that can exchange bytes, data blocks or strings fast from one calculator to another to accomodate game programmers [...] it uses known technology in a welltried manner and only the wrapping is more shiny than TI's version (it should be more easy to use, better documented, and perhaps a tad faster, but that's about it). I hope to be able to release that rather soon.
So, it's here :)

Download latest version - Thursday 16th of november 2006
(Library and manual only, no demo software included)


Image

Image


Things it can do
  • Set up a connection between two calculators, uniquely identifying the two and checking if they are running the same program
  • Swap data without the user having to worry about who goes first
  • Send data from one calculator to another in the form of a byte, a block of data (max 255 bytes), a large block of data (max 65535 bytes) or a zero terminated string
  • Autodetect the calculator model you're compiling for (currently Ti-82, Ti-83 and Ti-83+ series are supported and tested for, Ti-84 "should work" but I don't have a rom image for it) and configure it's hardware control routines to match at compile time
  • Alert the coder about errors by always returning a status flag in z (nz is always an indication that an error has occured)
  • Be compiled with your requirements only (by commenting what you don't need)
  • Use a user-definable timeout duration (you can even turn the feature off)
  • Output the selected hardware type (or an error if it wasn't able to detect it) and the number of bytes that the library takes up in your program to the compiler output
Things it can't do yet
  • Compile for Ti-85/Ti-86 or other calculator models
  • Detect a connection "on the fly" (without having to wait at the "waiting for opponent" screen) - though I'm not sure if anyone would want/use this
  • Detect data transfer corruption (I plan to implement a simple parity bit check, but I doubt it's neccessary..)
  • Detect if the other calculator wants to send anything before going to receive mode (I'm not sure how to implement this yet)
Things it will never be able to do
  • Connect more than two calculators; that's what the CLAP project is for, this project didn't get it's own name for no reason :)
Why the name?
  • Alexander Graham Bell may not have been the inventor of the first telephone, but it was Bell who made it popular and who, through his company, made it possible for ordinary people to make phonecalls. That's pretty much what this library should do; it's not really anything new, nothing that hasn't been done before, but it should make a different kind of electronic communication more popular and much easier to use.

    Apart from that, the word "Bell" nicely fits with the word "Clap" :-)
Documentation
  • The source code is heavily documented, and you can find the manual here or in the download zip file.
Speed
  • The speed of a transfer routine is always difficult to determine, so I'm not even going to try to be accurate, but the routines take approximately 7 and a half seconds to transfer 10000 bytes from one calculator to another in PTI. Seeing that PTI nicely reports the calculators to be running at 100%, I guess I could base my calculations on that. 7.5 seconds for 10KB makes 1.33 kB/s or 10.66 kbps. According to this website that pretty much rivals the Ti-OS routines, or it may even be a slight bit faster. Anyway, I think the demo speaks for itself.

    The connect routine is a bit slow though; as you may be able to see in the second screenshot it takes almost a third of a second to conclude that the programs aren't compatible. It's slowness is probably also the main reason why I can't reduce the timeout any further in the demo in the first screenshot (which is why it takes a while before the "connection lost" message appears). It's not really a problem as you only have to go through that routine once, but it would be nice if I could improve it.

Posted: Thu 09 Nov, 2006 9:23 pm
by kv83
wow nice. I'll make good use of it, in my next project :)

Posted: Fri 10 Nov, 2006 12:14 am
by KermMartian
Cool deal, sounds like a helpful tool for the people who have been laboring over MV's Tachyon forever.

Posted: Fri 10 Nov, 2006 2:38 am
by tr1p1ea
Awesome! I am adefinately going to do some testing with this. I need some nice, easy and quick linking routines ... Bell just might be the answer :).

Posted: Fri 10 Nov, 2006 9:33 am
by Timendus
kv83 wrote:I'll make good use of it, in my next project
tr1p1ea wrote:I am adefinately going to do some testing with this
Please do give me some feedback on your findings! :)

I've been thinking about speeding it up a bit further, and I think it might be possible to get just a little bit more out of it. I will probably not have time to work on it untill somewhere next week, so you'll have to do with this version for the time being ;)

Posted: Fri 10 Nov, 2006 11:50 am
by kv83
Yeah, with me... could be some time. I have to rewrite EM first :'(

Posted: Fri 10 Nov, 2006 11:55 am
by Timendus
No problem :) What projects are you (both) planning to use this for?

Posted: Fri 10 Nov, 2006 12:12 pm
by kv83
It's a secret... A SECRET *evil laughter*


... I don't know yet

Posted: Mon 13 Nov, 2006 12:04 am
by Timendus
Improvements soon to be released in v0.2:
  • Send or receive zero terminated strings
  • Swap datablocks or strings (only single bytes can be swapped at the moment)
  • Compile for Ti-82
Known bugs (in both versions):
  • "Connection lost" sometimes results in a total crash (RAM clear) on Ti-83+ (not on Ti-83). Reason unknown.

Posted: Mon 13 Nov, 2006 11:32 am
by kv83
I thought of a nice little project for me, making good use of this :) It's a topdown "shoter" with support for 4 players (2 "real" player, 2 CPU's)

Different modes, like detahmatch, capture the flag and hunter :)

Posted: Mon 13 Nov, 2006 12:18 pm
by Timendus
Sounds cool :)
Version 0.2 is going to take a while longer than anticipated, because my (300GB) harddrive seems te have crashed this night, taking the last version of Bell in it's grave... :(

Posted: Mon 13 Nov, 2006 12:32 pm
by CoBB
Timendus wrote:Version 0.2 is going to take a while longer than anticipated, because my (300GB) harddrive seems te have crashed this night, taking the last version of Bell in it's grave... :(
We never learn the lesson, right? :(

Posted: Mon 13 Nov, 2006 1:27 pm
by CompWiz
Hey, backup all the data on your computer for $45 a year, with automatic backup of all changed and new files with Carbonite. Unlimited backup for an amazing price. If you want it, using this link to sign up will give you a free month of service(and yes, it also gives me two months free)

Link: http://www.carbonite.com/raf/signup.asp ... =19821&a=0

Some features:

-Unlimited backup
-if you lose any files, you can choose which ones you want to restore, or just restore them all.
-deleted files are stored for a few days in you backup, so you can easily restore anything you deleted accidentally.
-Can be set to low priority so that it will not interfere with anything else you are doing on the web, from downloads to games
-very easy to use
-double encryption(once at your computer before the data is sent, and once at carbonite's server)
-15 day free trial, with no credit card required

If you're thinking about it, look up some reviews. SmallBusinessComputing.com and Cnet's Downloads.com both have reviewed it. (links point to the review)

Posted: Mon 13 Nov, 2006 1:34 pm
by Timendus
:mrgreen:@CoBB (crosspost)

I wrote the string and swap routines yesterday evening in one go, and they all worked... No debugging for hours, no stupid typos, no mistaking z flags for nz flags, it just all worked. I was amazed, and I thought "it can't be this simple"... Turns out I was right... :(
If I hadn't left my PC on during the night because I was too lazy to add a few websites as bookmarks it would probably still boot... *sigh*

I hope I can get it to boot when I get back home this afternoon, not that it has all too much irretrieveable data on it (some photos, some logs, some work that's mostly backed up, and Bell), but I don't have my trusted desktop environment to work on now, and my laptop is slooow...

@CompWiz: I don't want to send all my data over the Internet, I don't want other people to have access to all my data, if I wanted to backup my data automatically bad enough, I'd do it myself to my own server over an encrypted connection. But as I said; data-wise not much is lost. It's mostly that I can't use my computer now, and I've probably lost my carefully set up preferences for dozens of programs...

Posted: Mon 13 Nov, 2006 5:07 pm
by kv83
How many bytes is the compiled version of Bell?