<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HunterDavis.com &#187; Programs</title>
	<atom:link href="http://hunterdavis.com/archives/category/programs/feed" rel="self" type="application/rss+xml" />
	<link>http://hunterdavis.com</link>
	<description>4.0!</description>
	<lastBuildDate>Wed, 02 Jun 2010 00:24:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>IM-ME Linux Drivers Beta Release and Sourceforge Page</title>
		<link>http://hunterdavis.com/archives/450</link>
		<comments>http://hunterdavis.com/archives/450#comments</comments>
		<pubDate>Mon, 01 Feb 2010 17:49:19 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hacking and Robotics]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[hacking im-me driver linux c protocol reverse-engineering]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=450</guid>
		<description><![CDATA[To follow up on my earlier articles, the IM-ME has been gaining some traction in the hacking community. There's been a couple of driver releases in various forms, as well as a lot of information and protocol specs. Scott Albertine sent me a great gpl implementation in C, so we've made a sourceforge page for [...]]]></description>
			<content:encoded><![CDATA[<p>To follow up on my earlier articles, the IM-ME has been gaining some traction in the hacking community.  There's been a couple of driver releases in various forms, as well as a lot of information and protocol specs.  Scott Albertine sent me a great gpl implementation in C, so we've made a sourceforge page for everyone to download the driver.  </p>
<p>The SF page is at <a href="http://im-megpldrivers.sourceforge.net">http://im-megpldrivers.sourceforge.net</a> .  There's the initial C driver, some protocol information from Scott, as well as a SVN repository to push any code changes to.  If any of the other IM-ME driver implementations also want to host their drivers/source code there, it would make for a good launch pad for IM-ME hackers.  Let me know if you need file or SVN access and I can help set it up.  Hope to see you there, happy hacking!  <img src="http://www.hunterdavis.com/im_me.jpg" alt="IM-ME console" /></p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/450/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Great New Z2 Userland from RootNexus</title>
		<link>http://hunterdavis.com/archives/440</link>
		<comments>http://hunterdavis.com/archives/440#comments</comments>
		<pubDate>Mon, 25 Jan 2010 17:20:38 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hacking and Robotics]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Zipit Hacking]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=440</guid>
		<description><![CDATA[Although I've been spending my time on other hacking projects besides the Z2 lately, that does not mean there's nothing exciting happening in the Z2 community. Our friend SoundGuy has finished putting together his Z2 root image, and it is slick! After working out some of the kinks with help from our comments (they are [...]]]></description>
			<content:encoded><![CDATA[<p>Although I've been spending my time on other hacking projects besides the Z2 lately, that does not mean there's nothing exciting happening in the Z2 community.  Our friend SoundGuy has finished putting together his Z2 root image, and it is slick!  After working out some of the kinks with help from our comments (they are practically forums now...) threads, SoundGuy posted up a link to his newest "For the Average User" userland image.  Terrific work!  He's really got a good eye for usability.  More info after the break.<br />
<img src="http://zipit.rootnexus.org/screenshot.png" alt="Z2 userland from rootnexus" /> </p>
<p><span id="more-440"></span><br />
<br />
You can find more info on his page <a href="http://zipit.rootnexus.org/">here</a>, and downloads on his page <a href="http://zipit.rootnexus.org/files/Z2-USERLAND/SCRATCH/REVA01-PRE/">here</a>.  </p>
<p>For those of you who know me, you know I don't accept donations and usually tell potential benefactors to send the money to Haiti or another developer who might need the money.  Looks like RootNexus has got a paypal donate page up, and he's done some great work, so consider donating to support him and his work.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/440/feed</wfw:commentRss>
		<slash:comments>249</slash:comments>
		</item>
		<item>
		<title>17$ Mobile Java Gaming Console &#8211; Plus Sample Code and Application To Get You Started!</title>
		<link>http://hunterdavis.com/archives/385</link>
		<comments>http://hunterdavis.com/archives/385#comments</comments>
		<pubDate>Mon, 21 Dec 2009 03:32:15 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hacking and Robotics]]></category>
		<category><![CDATA[Programs]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=385</guid>
		<description><![CDATA[I finally had a few minutes to start working through the new list of 'to hack' items this weekend, so I started with the Nickelodean NPower fusion gaming console. Buy.com had these for 17$, and I've seen them at various secondhand retailers here in southern California for about the same. It supports j2me, cldc1.1, and [...]]]></description>
			<content:encoded><![CDATA[<p>I finally had a few minutes to start working through the new list of 'to hack' items this weekend, so I started with the Nickelodean NPower fusion gaming console.  Buy.com had these for 17$, and I've seen them at various secondhand retailers here in southern California for about the same.  It supports j2me, cldc1.1, and midp2.  For 17$ this would be a fantastic target for a beginning java games developer.  The absolute rock bottom price would allow for some fun opportunities like beta test groups, without the terrible expense usually incurred purchasing mobile devices.  <img src="http://hunterdavis.com/wp-content/uploads/2009/12/npowerjava.JPG" alt="npower fusion with custom java" width=200 height=200/></p>
<p><span id="more-385"></span></p>
<p>After plugging it in, it's recognized as a 1gb photo storage device.  There are a couple of .wmv videos installed stock, as well as an enticing java_vm folder, which will load .jar/.jad files.  My goals were simple, get a custom application running on the Npower, and get some system information and a sample application for other developers to use as an example.  </p>
<p>I started by downloading the JavaME SDK.  It comes with a few sample applications, I chose the UI demo app as a good starting point.  JavaME supports the java.lang.runtime class, so I figured a couple of quick system monitors would be useful.  The GaugeDemo seemed like a good starting target, so I built it fresh to ensure it would run on the fusion.  It installed and ran fine, so I set about altering the page to display the system memory as it changes.  I first added a label to the frame which contained the total and free memory.  Looks like the Npower is allocating Java around 2mb of ram.  That's about 10x more than is required by the cldc1.1, and more than enough for some hefty (and fun) mobile java development.  As the free memory doesn't change, I drop the gauge to zero every 3 ticks to show change in memory.<br />
<img src="http://hunterdavis.com/wp-content/uploads/2009/12/nmp4075sbs.jpg" alt="npower fusion stock" width=200 height=200 align=right/><br />
<a href="http://www.hunterdavis.com/freememuidemo.zip">You can download the changed source files and .jar/.jad file here</a>.  Just install it to your npower, then navigate to games->UIDemo->gauge, and there's your memory gauge.  Fun!  Happy Programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/385/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Hacking the Girltech IM-ME USB Wireless device</title>
		<link>http://hunterdavis.com/archives/333</link>
		<comments>http://hunterdavis.com/archives/333#comments</comments>
		<pubDate>Sun, 15 Nov 2009 14:34:32 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programs]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=333</guid>
		<description><![CDATA[The Girltech IM-ME is a basic usb radio transmiter paired with a small console like device. It was suggested to me on the TP hacking thread I posted up a while ago. Hacking the IM-ME turned out to be an easy reverse-engineer, as there is no crypto to worry about and everything is sent in [...]]]></description>
			<content:encoded><![CDATA[<p>The Girltech IM-ME is a basic usb radio transmiter paired with a small console like device.  It was suggested to me on the TP hacking thread I posted up a while ago.  Hacking the IM-ME turned out to be an easy reverse-engineer, as there is no crypto to worry about and everything is sent in cleartext hex (everything).  For 12$, this makes quite a nice little wireless console device.  Read on for the protocol and info on implementing your own driver <img src="http://www.hunterdavis.com/im_me.jpg" alt="im-me instant messenger device" width=150 height=150 align=right/><br />
<span id="more-333"></span><br />
After ordering the IM-ME as a filler item on Amazon (what won't I do for super-saver shipping), I plugged it in to my linux box.  It was recognized as a standard HID device.  This is good, as Girltech obviously didn't go to any great lengths to protect the communication coming off this thing.  At this point, I could have either loaded up a windows VM with a promiscuous USB driver at the host OS level, or loaded up a windows VM with snoopypro installed.  I went (as I usually do when reverse-engineering usb protocols) with snoopypro.  The output driver strings are quite easy to read and patterns are colored by communication direction.</p>
<p>I set up a user 'toastc2c' with a password 'password'.  The default software install (windows only) is basically an online multiplexer.  You log into their software, which syncs with their website.  Each instant message is sent to the handheld with a identifier string, which is used by the device to pagify the different messages.  This is great, as it's pretty much arbitrary as to what we pipe down to the device.  I figured I would need to inject some custom messages to the device (standard crypto protocol breaking stuff like huge messages and repeated characters etc) to get a handle on the communication scheme, but that wasn't really necessary.  Turns out it's all clearhex, all the time.  Either initialize with a VM and inject your own messages, or copy the init strings out of the spreadsheet I post below and init/multiplex with libusb.  </p>
<p><a href="http://www.hunterdavis.com/immeusblog.log.ods">Here is a spreadsheet</a> with the initialization strings and username/password authentication.  This is more than enough to write an interface driver in with libusb.  I'm not sure about the DMCA implications of releasing a driver, but there's a script out there to ease the process for you if you're new to it.  Note the device receives data in one hex byte strings which are each padded with hex 00.  My username is 'toastc2c', which you can see is clearly transmitted and accepted by the receiving device (IM-ME usb dongle->console pairing).  Happy Hacking</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/333/feed</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>100$ 64-bit 3ghz ppc cross compiler for the Z2 (Installing PS3 Linux and Cross Compiling Env from Thumbdrive)</title>
		<link>http://hunterdavis.com/archives/125</link>
		<comments>http://hunterdavis.com/archives/125#comments</comments>
		<pubDate>Mon, 07 Sep 2009 03:26:36 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Zipit Hacking]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=125</guid>
		<description><![CDATA[I've been seeing a lot of PS3s come up on craigslist with broken optical drives, usually around 100$. Figuring this was a great way to free up my quadcore from mundane cross-compiling duty, I set about purchasing one and setting up the Z2 cross compiling environment. It took a bit of doing, but it works. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://hunterdavis.com/wp-content/uploads/2009/09/YDL-PS3-Logo.jpg" alt="ps3 ydl logo" width=150 height=150 align="right" /> I've been seeing a lot of PS3s come up on craigslist with broken optical drives, usually around 100$.  Figuring this was a great way to free up my quadcore from mundane cross-compiling duty, I set about purchasing one and setting up the Z2 cross compiling environment.  It took a bit of doing, but it works.  Here's a step by step guide for setting yours up.<span id="more-125"></span></p>
<p>I picked up an old 40gb ps3 with a broken optical drive for 100$.  Everything else I had laying around.  Here's how I got the Z2 environment cross compiling.</p>
<ol>
<li>I am using YDL 6.2.  You can grab the newest 6.2 release from <a href="http://mirror.anl.gov/yellowdog/iso/">here</a></li>
<li>You'll need a usb thumb drive formatted fat32 128mb or above to install the ng bootloader you can download <a href="http://wiki.pdaxrom.org/index.php/Bootloader_for_PS3">here</a> </li>
<li>Youll need a usb thumb drive formatted ext3 4gb or above, or a 1gb thumb drive formatted ext3 with a way to share the iso over the network</li>
<li>On the fat32 thumb drive, create a directory structure /PS3/otheros/</li>
<li>Copy the ng bootloader.bld to /PS3/otheros/otheros.bld</li>
<li>Boot the PS3, go to settings->system settings, format system and split the drive up for your linux install</li>
<li>In the PS3 menu, go to settings->system settings, install other os and insert your fat32 thumb drive, this will install the ng bootloader</li>
<li>In the PS3 menu, go to settings->system settings, default os and select 'other os', then shutdown</li>
<li>Extract the contents of the ISO (but not the YellowDogLinux folder) to the ext3 thumbdrive</li>
<li>At this point you can either copy the iso to the root of the thumb drive, or make it available over a network share</li>
<li>Insert the ext3 thumbdrive into the ps3 and reboot with a usb keyboard attached, selecting the thumb drive as the bootable device</li>
<li>At this point you are in the YDL text installer, select the ISO or the network file share, and continue to graphical installation</li>
<li>During the graphical install, you'll be given the mac address, I like to use this to setup static IP and tunneling while the system is installing</li>
<li>Continue through graphical installation, making sure to set a root password and install any dev libraries you may want (saves you some downloading later)</li>
<li>Watch a movie.  Or two.  Maybe the LOTR Trilogy.  Seriously this will take a while</li>
<li>While the install is running, if you setup static IP for the PS3 mac you can setup your Z2's package manager, on the z2. just <code>vim /etc/ipkg/*</code> and replace all instances of "Your IP HERE" with the static IP you setup for your PS3.  </li>
<li>Once the graphical install finishes and you've set up your user, it's time to start installing software as listed on the beagleboard port page</li>
<li><code>yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl</code></li>
<li><code>yum install texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds</code></li>
<li><code>yum install docbook-utils sed bison bc glibc-devel glibc-static gcc binutils pcre pcre-devel git</code></li>
<li><code>yum install quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man perl-ExtUtils-MakeMaker python-sqlite2</code></li>
<li>now compile the bitbake env. (this will dl the git objects ~150 megs as well) <code>cd ~/oe &#038;& source ./oe_zipit2.sh</code></li>
<li><code>make</code></li>
<li>At this point, I log out of E17 and into a shell (ctrl-alt-f1).  With only 200megs ram we want to conserve ram</li>
<li>Likewise, I like to decrease the number of bitbake threads in oe/zipit2/conf/local.conf from 8 to 1 and disable make threads</li>
<li>re-source oe_zipit2.sh and bitbake something small to get the skeleton directory made (this will take a long time) <code>bitbake tree</code></li>
<li>If you told apache to install during graphical installer, run it now with <code>/etc/init.d/httpd start</code>.  Otherwise install first.</li>
<li>Make a symbolic link from /var/www/zipit to your zipit deploy target, this allows the Z2 to see the packages you compiled <code>ln -s /var/www/zipit /home/zipituser/oe/zipit2-tmp/deploy/glibc/ipk </code></li>
<li>on the ps3 (you will need to do this after every set of packages you compile) <code>bitbake package-index</code></li>
<li>on the z2 (you will need to do this after every set of packages you compile) <code>ipkg update</code></li>
<li>That's that!  Install and test your package on the Z2 with <code>ipkg install tree &#038;& tree</code></li>
<li>Repeat for each package you wish to install, It'll be SLOW, but you can stash the ps3 in a closet somewhere and be content it won't red ring like certain consoles... even if it does thrash with 200megs ram..  happy bitbaking!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/125/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ScummVM and Monkey Island working on Zipit Z2</title>
		<link>http://hunterdavis.com/archives/91</link>
		<comments>http://hunterdavis.com/archives/91#comments</comments>
		<pubDate>Mon, 17 Aug 2009 02:08:48 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[Zipit Hacking]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=91</guid>
		<description><![CDATA[New Zipit Update! I've gotten ScummVM working with the new kernel. Xserver-kdrive too, so our memory usage is down again. You'll need to edit your .scummvmrc file and add the game entries by hand (I still don't have the keys as joystick or mouse in), but they play fine. Update your git tree and remove [...]]]></description>
			<content:encoded><![CDATA[<p>New Zipit Update!  I've gotten ScummVM working with the new kernel.  Xserver-kdrive too, so our memory usage is down again.<br />
<img src="http://hunterdavis.com/wp-content/uploads/2009/08/scummvm-selector.jpg" alt="Scummvm Selector" width = 200 height = 200/><br />
<span id="more-91"></span><br />
You'll need to edit your .scummvmrc file and add the game entries by hand (I still don't have the keys as joystick or mouse in), but they play fine.  Update your git tree and remove the zipit temp directory, Bitbake intltool, then bitbake xserver-kdrive.  Intltool will fail unless you bitbake it directly, and not as a dependency include.  Set the graphics scale to 1x and everything is gravy.  Screenshots of the Scummvm selector screen and the Monkey Island EGA DRM scheme are below.  This is running even better than the dosbox build as there's not x86 conversion happening!</p>
<p><img src="http://hunterdavis.com/wp-content/uploads/2009/08/monkeyislandstartup.jpg" alt="Monkey Island Starting Up" width = 200 height = 200/><br />
<img src="http://hunterdavis.com/wp-content/uploads/2009/08/monkeyisland-drm.jpeg" alt="Monkey Island DRM scheme" width = 200 height = 200/></p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/91/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Wallclock 2.0</title>
		<link>http://hunterdavis.com/archives/50</link>
		<comments>http://hunterdavis.com/archives/50#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:07:56 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[hacking linux wallclock personal]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/?p=50</guid>
		<description><![CDATA[After a power out blanked my wallclock's memory, I was not eager to go searching through ten year old websites looking for a new terminal emulator. Luckily I found a ten year old NES emulator that loads fine! Behold wallclock 2.0, NES edition! Also be sure to peep the ancient medical tablet that is pulling [...]]]></description>
			<content:encoded><![CDATA[<p>After a power out blanked my wallclock's memory, I was not eager to go searching through ten year old websites looking for a new terminal emulator.  Luckily I found a ten year old NES emulator that loads fine! Behold wallclock 2.0, NES edition! Also be sure to peep the ancient medical tablet that is pulling duty as my new serial terminal. Fun!  </p>
<p><a href="http://hunterdavis.com/wp-content/uploads/2009/04/l-1600-1200-93fbb402-0d5d-4c8b-b1b6-b45e1fe32822.jpeg"><img src="http://hunterdavis.com/wp-content/uploads/2009/04/l-1600-1200-93fbb402-0d5d-4c8b-b1b6-b45e1fe32822.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://hunterdavis.com/wp-content/uploads/2009/04/p-1600-1200-2a5048fe-4588-4ad0-ada8-d7ba5d1d6d0a.jpeg"><img src="http://hunterdavis.com/wp-content/uploads/2009/04/p-1600-1200-2a5048fe-4588-4ad0-ada8-d7ba5d1d6d0a.jpeg" alt="" width="225" height="300" class="alignnone size-full wp-image-364" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/50/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Save Game Saver &#8211; Backup and Retrieve your Save Games from Gmail</title>
		<link>http://hunterdavis.com/archives/46</link>
		<comments>http://hunterdavis.com/archives/46#comments</comments>
		<pubDate>Tue, 17 Feb 2009 19:24:56 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[save games programs python gmail free gpl]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/archives/46</guid>
		<description><![CDATA[A couple of months ago, Mark and I were playing some wormux on the PC. I had all my characters and teams set up, and all my macros just the way I liked them. The next day my computer crashed and lost everything. To prevent this from happening again, we sat down and wrote this [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://hunterdavis.com/wp-content/uploads/2009/02/sgsscreenshot.png' alt='Save Game Saver Screensot' width=200 height=200 align="right"/> A couple of months ago, <a href="mailto:christensen.mark.a@gmail.com">Mark</a> and <a href="mailto:hunter@hunterdavis.com">I</a> were playing some wormux on the PC.  I had all my characters and teams set up, and all my macros just the way I liked them.  The next day my computer crashed and lost everything.  To prevent this from happening again, we sat down and wrote this python program, "Save Game Saver".  Basically you set up a profile for a game (location of save game), then it allows you to upload those saves to gmail.  Each upload is versioned in gmail, so you can store and retrieve multiple saves you uploaded on any day for any game.   Considering Steam and Xbox are both moving towards this internally, this would be kind of a stepping stone till game developers get off their asses and figure it out.  Mark and I both found it really useful though, so go ahead and download it or alter the source.  As usual, it's GPLv2.0.</p>
<p><a href='http://hunterdavis.com/wp-content/uploads/2009/02/gmailsavegame.zip' title='Save Game Saver'>Download Save Game Saver here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/46/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Calorie Counter for Game Boy Advance and Nintendo DS</title>
		<link>http://hunterdavis.com/archives/34</link>
		<comments>http://hunterdavis.com/archives/34#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:14:26 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking and Robotics]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programs]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/archives/34</guid>
		<description><![CDATA[Ok, So having lost 30lbs since I wrote the python calorie counter, I'm a big proponent of counting calories. It WORKS. Not only that it's easy, and it appeals to the chewy mathematics center of my brain. All is well and good, and I've got a nice phone that supports python scripts so I'm set. [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, </p>
<p>So having lost 30lbs since I wrote the python calorie counter, I'm a big proponent of counting calories.  It WORKS.  Not only that it's easy, and it appeals to the chewy mathematics center of my brain.  All is well and good, and I've got a nice phone that supports python scripts so I'm set.  There are some instances though, where a phone is just too much bulk to carry around and I really just need something smaller.</p>
<p>As luck would have it, I came across a game boy micro.<img src='http://hunterdavis.com/wp-content/uploads/2008/11/micro.jpg' alt='Game Boy Micro' align=left /></a>  This little devil is TINY, and fits right in a shirt pocket no troubles.  Plus you can get one for 30$ used at gamestop, bonus!  However there was one tiny snag, there's no python interpreter for GBA! </p>
<p>So I wrote a version of the calorie counter application for the game boy advance.  It uses the savegame sram to store your current calories and calorie goal.  It'll work in any gba emulator, flash cart, or the nintendo ds gba slot.  Even better, most flash carts allow you to use it for your startup game so the time to start is around 2-4 seconds.  Very reasonable!  Anyway, it's pretty simple stuff and gplv3 so feel free to give it a try or even modify it.  Note, you'll need the excellent HAM gba library to recompile.</p>
<p>You can download it here: <a href='http://hunterdavis.com/wp-content/uploads/2008/11/gbacaloriecounter.zip' title='GBA Calorie Counter'>GBA Calorie Counter</a></p>
<p><a href='http://hunterdavis.com/wp-content/uploads/2008/11/gbacalcount.PNG' title='Gba Calorie Counter - In Action'><img src='http://hunterdavis.com/wp-content/uploads/2008/11/gbacalcount.PNG' alt='Gba Calorie Counter - In Action'  align=left/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/34/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Food (and diet) management for the unix geek, a python script</title>
		<link>http://hunterdavis.com/archives/24</link>
		<comments>http://hunterdavis.com/archives/24#comments</comments>
		<pubDate>Mon, 14 Jul 2008 22:39:05 +0000</pubDate>
		<dc:creator>hunter</dc:creator>
				<category><![CDATA[Hacking and Robotics]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programs]]></category>

		<guid isPermaLink="false">http://hunterdavis.com/archives/24</guid>
		<description><![CDATA[For many a scientist like myself, the pear-shaped waistline which has become synonymous with the unix guru has become all too familiar. While there are a number of mitigating factors, I'm going to chalk it up to the sedentary lifestyle of the typical programmer. A study posted on Digg last week showed that on average, [...]]]></description>
			<content:encoded><![CDATA[<p>For many a scientist like myself, the pear-shaped waistline which has become synonymous with the unix guru has become all too familiar.  While there are a number of mitigating factors, I'm going to chalk it up to the sedentary lifestyle of the typical programmer.  A study posted on Digg last week showed that on average, dieters who kept a food journal lose twice as much weight as those who don't.  That's a pretty powerful tool.  Carrying around a notepad doesn't make a lot of sense for me, as I'm almost never without my laptop, so I've been keeping a csv spreadsheet like below:<br />
<code><br />
07:53 ,oatmeal        , 160<br />
07:55 ,water          , 000<br />
10:40 ,kudos          , 100<br />
10:40 ,water          , 000<br />
</code><br />
Which is fine.  It accomplishes what needs to be accomplished, with regards to the diary at least.  However, I would like some statistics with my diet.  How many calories do I have left in the day, how many glasses of water, how many calories did I eat at lunch, etc.  These little statistics and calculations really drive home the message.  I always keep today's .food file on my desktop, and I have my .bashrc set up to show me my dietary information whenever I login or open a shell like so:</p>
<p><code><br />
# display how many calories I've left/eaten today<br />
echo "Remember to fill in your .food file today"<br />
echo "-----------------------------------------"<br />
~/Scripts/DotFoodStatistics.py ~/Desktop/*.food | grep today<br />
echo "-----------------------------------------"<br />
</code></p>
<p>Attached->  <a href='http://hunterdavis.com/wp-content/uploads/2008/07/dotfoodprocessing.py' title='python “food processor” diet statistics'>python “food processor” diet statistics</a> <- is the simple python script I wrote to calculate food statistics and keep track of my dietary intake:</p>
<p>As you can see it's a very simple procedural script.  Took me all of 20 minutes for the python.  Only time will tell if the dieting is as straightforward.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterdavis.com/archives/24/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
