A HP48GX emulator for the iPhone and iPod Touch

I have just released the source to a HP48GX emulator for the iPhone and iPod Touch.

It’s a very rough port of x48 to the iPhone, but it works πŸ™‚  There is the occasional screen glitch and I’m not too happy with the screen buffer code.  Something else that is a bit annoying is that it appears that compiling in Debug mode to run on the device does not work.  It looks like one of the case statements in the x48 emulation code is too big to be compiled for ARM under gcc.  I had a quick look at using the LLVM compiler but it didn’t seem to like it.
The code can be downloaded from http://github.com/dparnell/i48/tree/master 
Another thing to be aware of is that the code does not include a ROM, but they are fairly easy to come by with a bit of googling πŸ™‚

What I’ve been doing recently

Today I found out that an application I built for the iPhone has become available on the iTunes store.  It’s a simple little app to estimate electricity bills for a household.  Check it out on the iTunes store via the following link πŸ™‚ AGL Energy Efficiency
I’ve also been working on the Windows Live Mail compression code some more and have gotten some good results.  Below in an example of what I’m getting

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danie******pl <m********.com>-Status: n:0Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

ReceLjEE7*d: from randymail-a4.g.dreamhostm>-S ([208.97.132.207]) by bay0-mc8-f11.bay00***.hot-a4. ([2*with Microsoft SMTPSVC(6.0.3790.2668);

Thu, 29 Jan 2009 16:06:38 -080


and this is what I should be getting.


X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danielparnell.com>

X-Message-Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

Received: from randymail-a4.g.dreamhost.com ([208.97.132.207]) by bay0-mc8-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668);

         Thu, 29 Jan 2009 16:06:38 -0800


I’ve been throttled

OH NO!  I’ve used up all of my download limit for the month and have been throttled down to 64kb/s.  It’s like being back on dialup again πŸ™

localhost.localdomain-billion-month.png

Admittedly it is all my own fault.  As you can see from the chart above there was a period of sustained download earlier this month when I was downloading a very large torrent.

Ah well…  I just have to wait another 5 days for the next billing cycle to kick in to get my speed back to normal.

FreeTDS and my new Mac Pro

I’ve been having some “fun” with my new Mac Pro.  In order for me to be able to use it for my daily work I need to be able to connect to a Microsoft SQL Server instance from the Rails app I’m working on at my day job.  Normally this is just a simple matter of installing FreeTDS, Ruby-ODBC and the Ruby DBI and DBD packages.  When I did this, as soon as I tried to make a connection to the SQL Server instance my application would crash with a bus error!  After a bit of digging around with gdb I discovered that the application was crashing when FreeTDS was trying to deallocate a string using the standard C library memory function free.  The really weird thing is that the string was pointing to a valid string.  I dug a little further and found that if I changed the code that was allocating the string to use malloc and strcpy instead of strdup it worked!  If anybody out there knows why this might make a difference I’d really like to hear from them about it.

Windows Live compression update

I had a bit of time yesturday to spend working on the Windows Live compression reverse engineering.  I successfully decompressed around 20 bytes.  The previous record was 2 bytes πŸ˜‰  There are two parts to the compression.  First is the compressed data and the second is pointers back into decompressed data.  The compressed data is working quite well, but the pointers to repeated blocks that have already been decompressed is off a little so I see some correct data and some rubbish.  Hopefully I’ll get some more time in the next couple of days to work on it some more. 

PSMTabBarControl and Interface Builder 3.0

For one of the projects I’m working on I needed a nice looking tab bar control.  Under previous versions of Mac OS X I used the PSMTabBarControl.  The control is nicely integrated into Interface Builder 2.0, but I no longer have IB 2.0 installed as I’ve upgraded to more recent versions of XCode.  I’ve done a very quick port of the code for IB 3.0 and made it available here on github.

Enjoy πŸ™‚

OS X 10.5.6

As many people are aware Apple released Mac OS X 10.5.6 yesterday.  Unfortunately this broke the HttpMail plugin πŸ™  After a little bit of poking around I found and fixed the problem.  The result is a new release of the plugin 1.53.  

Head on over to my downloads site at http://www.automagic-software.com/
Now, for a status report on Windows Live Mail reverse engineering.  I am still making progress.  I’m not getting as much time to work on it as I would like these days due to having two small children πŸ˜‰  If anybody wants to donate a copy of the Hex-Rays decompiler then I imagine things would progress much faster πŸ˜‰

IT LIVES :)

After a bit of playing about I’ve got my water level sensor working πŸ™‚
I’m using Munin to log the data coming back from the unit attached to the sensor.
The unit is overkill for my needs, but since I had it lying about here and I didn’t want to spend anything to do this job it’ll have to do πŸ˜‰
It’s a nice little PIC based board with 4 analog inputs, 8 digital inputs and 8 mains switchable outputs.  It also has an ethernet adaptor and the software I’m using responds to modbus commands.  I’ve had fun getting everything working.
I’d forgotten how much fun it is to make computers actually do something in the real world!

Some tinkering I’ve been up to recently

I’m working on building a system to measure the water level in my rain water tanks.  Finally today I’ve managed to get my hardware all working, and now I need to build the physical measurement device.  Originally I was going to use ultra-sound to measure the depth of the water but I decided that was a bit too fiddly.  Then I considered using some sort of pressure sensor, but they are a bit on the expensive side.  Finally I came up with the idea of using a variable resistor attached to an arm with a float on the end.  This seems like the easiest and above all the cheapest way to get what I want πŸ™‚

It should be interesting to see how it all comes together πŸ™‚