I really need a snappy name for this project, so I can register a domain (or at least a Sourceforge project). InfraBaby isn't really doing it for me.
So, since my last update, I've managed to completely decode the V.Smile Baby's IR format. Those last three bits that were so confusing to me were actually a combination of a very simple "repeat" bit, and two checksum bits! Once I figured out how the checksum worked, everything became clear. I've attached a small document containing the complete decoding scheme, which is actually much smaller now since I can take the raw data out for repeat codes and so forth.
The next step is to write a little script to generate the Lirc configuration file.
The step after that is to package everything up into a user-friendly bundle. Even if I don't have a nice menu or configuration method to start, it'd be good to bundle WinLIRC and automatically start it when you boot up. Not to mention building an EXE instead of requiring the end-user to install Python and the various random libraries that I'm using.
As an aside, my son enjoys AlphaBoogie, but so far he still hasn't really made the connection between pressing buttons on the controller and things happening on the TV.
IT TOTALLY WORKS
OH MAN OH MAN OH YES
Eric is in bed now, but I can't wait to let him play with Alphaboogie.
It's going pretty smoothly, actually!
I wrote a little oscilloscope program in Python that interprets the raw pulse/space data from WinLirc (pasted into text files), then gathered the data for each of the buttons. Thankfully the encoding was easy to decipher (each bit has a short pulse to start, and then a short or long space indicating one or zero; a long pulse ends each batch of sixteen bits), so it's just a matter of looking at the picture and turning it into a code. I haven't really looked at how to write the configuration file properly quite yet, but I'm sure it won't be too hard after all.
Important findings for game designers:
- The codes are the same whether you roll the trackball up or down. :(
- The "release" code appears to be the same for all buttons, so there's no possibility of holding down multiple buttons simultaneously.
EDIT! For all the V.Smile Baby hackers out there, I've attached a text file detailing the codes associated with every button. If someone is ever crazy enough to try hacking the V.Smile console itself, knowing these codes could help you out.
So my infrared reciever has arrived! And I can totally read the raw IR coming out of the V.Smile. Unforunately, WinLIRC's learning function is retarded and completely refuses to learn my weird-ass device automagically. The raw IR data that I get from WinLIRC is very unfriendly state; it's not something I can just paste into a config file, or even a visualization program, for that matter.
Looks like there's lots more reverse engineering and learning about WinLIRC configuration files in my future! Yay?
So, the working name for my homebrew videogame system for infants is now InfraBaby. If anyone has any better suggestions, I would love to hear them.
Though I can't test it until my IR receiver arrives in the mail, I've built the core of the system. I've got a small Python program that reads data from LIRC, and, based on a configuration object, presses keys in Windows. Obviously I've still got some work to do to discover what codes the V.Smile emits, but I'm hoping that'll end up being relatively straightforward.
Now, if everyone was happy writing python code to configure their games, and starting up three programs whenever they wanted their baby to play a game, I'd be done. But no -- I'm coming to the realization that I've got a frontend to write, which lets you set up configurations for your games, and has one-click (or one-press-the-orange-circle) launching of games. I'm really, really itching to give the program a try, but at least a proper user interface will give me something to do while I wait for the damn sensor to come.