<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>John Hawthorn</title>
  <link href="http://www.johnhawthorn.com/atom.xml" rel="self" />
  <link href="http://www.johnhawthorn.com/" />
  <updated>2010-02-11T13:26:56-05:00</updated>
  <id>http://www.johnhawthorn.com/</id>
  <author>
    <name>John Hawthorn</name>
    <email>johnhawthorn@gmail.com</email>
  </author>
  <entry>
    <title>Restoring data on rooted Rogers Dream phones</title>
    <link href="http://www.johnhawthorn.com/2010/02/restoring-data-on-rooted-rogers-dream-phones/" />
    <updated>2010-02-03T23:04:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2010/02/restoring-data-on-rooted-rogers-dream-phones</id>
    <content type="html">
      &lt;p&gt;Recently, rogers issued a firmware upgrade to fix an ancient (and rather dangerous) 911 bug in the version shipping on the Rogers Dream and Magic.
      To encourage users to upgrade, Rogers &lt;a href=&quot;http://mobile.slashdot.org/story/10/01/26/2358237/Canadian-Android-Carrier-Forcing-Firmware-Update&quot;&gt;cut off data services&lt;/a&gt; to the affected models of phones who aren't running the new rogers firmware.
      Many, myself included, run custom firmwares on our android phones. Almost all of which, being based on android 1.6+, have had the &lt;a href=&quot;http://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=610419eae1d35b4da27b91de2dc98982d43c7deb&quot;&gt;911 bug fixed&lt;/a&gt;.
      The Rogers update, as an unfortunate side effect, makes it harder to install custom firmwares. This oversight can be worked around by running the new radio firmware shipped with rogers phones.&lt;/p&gt;
      
      &lt;h2&gt;Upgrade instructions for rooted HTC dream&lt;/h2&gt;
      
      &lt;p&gt;DISCLAIMER: Don't do this if you don't understand it. It may break your phone permanently.&lt;/p&gt;
      
      &lt;p&gt;This information is taken from a post by ezterry at &lt;a href=&quot;http://forum.xda-developers.com/showpost.php?p=5440198&quot;&gt;http://forum.xda-developers.com/showpost.php?p=5440198&lt;/a&gt; and from my experience following it.&lt;/p&gt;
      
      &lt;p&gt;These instructions will put your Dream into the following state:&lt;/p&gt;
      
      &lt;ul&gt;
      &lt;li&gt;haykuro's SPL (1.33.2005). You &lt;em&gt;must&lt;/em&gt; already have this installed.&lt;/li&gt;
      &lt;li&gt;Amon_RA's recovery image version 1.5.2&lt;/li&gt;
      &lt;li&gt;Cyanogenmod 4.2.14.1, with EBI1 port (i.e. the rogers-phone-compatible version)&lt;/li&gt;
      &lt;li&gt;Rogers' new radio version 3.22.26.17. This is the crucial component which will restore the data service.&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;h3&gt;Assumptions&lt;/h3&gt;
      
      &lt;ul&gt;
      &lt;li&gt;You &lt;em&gt;must&lt;/em&gt; have a &lt;em&gt;Rogers&lt;/em&gt; &lt;em&gt;Dream&lt;/em&gt;. &lt;em&gt;Not&lt;/em&gt; a Rogers Magic and &lt;em&gt;not&lt;/em&gt; an unlocked dream on the rogers network.&lt;/li&gt;
      &lt;li&gt;You &lt;em&gt;must&lt;/em&gt; have a previously rooted android phone.&lt;/li&gt;
      &lt;li&gt;You must have haykuro's SPL, also known as the &quot;danger&quot; or &quot;death&quot; SPL
      
      &lt;ul&gt;
      &lt;li&gt;Version on this should be
      DREAM PVT 32B ENG S-OFF
      HBOOT-1.33.2005 (DREA21000)&lt;/li&gt;
      &lt;li&gt;Others SPLs may or may not work, try at your own risk.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;You probably want to back up anything you want to keep from your phone.
      
      &lt;ul&gt;
      &lt;li&gt;The thread suggests a nandroid backup. I disagree, especially if your existing install has the EBI0 radio. This update will change you to a EBI1 radio, which is better for rogers devices anyways.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;You must have working fastboot on your computer&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;h3&gt;Instructions&lt;/h3&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Put the following files on the root of your SD card
      
      &lt;ul&gt;
      &lt;li&gt;DREAIMG.nbh - available from above thread. This is the rogers update with the SPL stripped out.&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;http://n0rp.chemlab.org/android/update-cm-4.2.14.1-signed.zip&quot;&gt;update-cm-4.2.14.1-signed.zip&lt;/a&gt;, the CyanogenMod update&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;http://briancrook.ca/magic/cm-ports/bc-4.2.14.1-ebi1-signed.zip&quot;&gt;bc-4.2.14.1-ebi1-signed.zip&lt;/a&gt;, the CyanogenMod &quot;port&quot; file from&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Have the following files available on your computer
      
      &lt;ul&gt;
      &lt;li&gt;system.img, extracted from &lt;a href=&quot;http://hotfile.com/dl/23840731/6546d1c/htc_system_img_14721.zip.html&quot;&gt;htc_system_img_14721.zip&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;http://www.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&amp;amp;file=recovery-RA-dream-v1.5.2R.img&quot;&gt;recovery-RA-dream-v1.5.2R.img&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;Working fastboot in same folder as these images.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Reboot your phone into the SPL
      
      &lt;ul&gt;
      &lt;li&gt;With the phone off: Hold the camera button while starting the phone&lt;/li&gt;
      &lt;li&gt;With the phone on: Hold down the camera button, and press the send (phone), menu, and hang-up buttons at the same time.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Start HBOOT mode by pressing the &quot;send&quot; button.
      
      &lt;ul&gt;
      &lt;li&gt;it will ask you to install &quot;[1] RADIO_V2 [2] RECOVERY [3] BOOT [4] SYSTEM [5] USERDATA&quot;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Press the action key (trackball) to install the rogers firmware, minus the SPL.&lt;/li&gt;
      &lt;li&gt;Wait until it is done. Do now power off your phone.&lt;/li&gt;
      &lt;li&gt;When prompted to reboot hold camera while you press the action key.
      
      &lt;ul&gt;
      &lt;li&gt;You should be returned to the SPL in fastboot mode.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Type the following on your computer, with phone attached, each time waiting for it to finish (requires working fastboot)
      
      &lt;ul&gt;
      &lt;li&gt;fastboot flash recovery recovery-RA-dream-v1.5.2R.img&lt;/li&gt;
      &lt;li&gt;fastboot erase system -w&lt;/li&gt;
      &lt;li&gt;fastboot flash system system.img&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Press Back to reset and immediately (before you see the Rogers logo again) press and hold the home key
      
      &lt;ul&gt;
      &lt;li&gt;The recovery image should start up.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Select flash zip from SD card
      
      &lt;ul&gt;
      &lt;li&gt;Select update-cm-4.2.14.1-signed.zip&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Select flash zip from SD card again
      
      &lt;ul&gt;
      &lt;li&gt;Select bc-4.2.14.1-ebi1-signed.zip&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Reboot, and you're in a fresh CyanogenMod install&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;p&gt;Data wasn't immediately restored, but about 5 hours after this install I rebooted my phone and my data came back online.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Extracting images from a PDF</title>
    <link href="http://www.johnhawthorn.com/2010/01/extracting-images-from-a-pdf/" />
    <updated>2010-01-31T23:26:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2010/01/extracting-images-from-a-pdf</id>
    <content type="html">
      &lt;p&gt;I was reading a PDF which was composed entirely of scanned JPEGs.
      I found this slow and cumbersome in my PDF viewer and would have preferred to be reading it in meh.
      Fortunately, there's a simple tool for accomplishing this.&lt;/p&gt;
      
      &lt;p&gt; pdfimages -j src.pdf dest&lt;/p&gt;
      
      &lt;p&gt;Handy.
      This will extract the images in src.pdf to names like dest-000.jpg, dest-001.jpg, etc.
      The -j flag indicates that images in the PDF which are JPEGs should be created as JPEGs, it won't convert images and lost quality.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>meh 0.3</title>
    <link href="http://www.johnhawthorn.com/2010/01/meh-0.3/" />
    <updated>2010-01-11T14:24:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2010/01/meh-0.3</id>
    <content type="html">
      &lt;p&gt;This is a small quick release, but there's enough features that it needed a release before the larger changes that are to come.&lt;/p&gt;
      
      &lt;h2&gt;Changes in this release&lt;/h2&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Next and previous images are cached&lt;/li&gt;
      &lt;li&gt;Adjust redrawing logic for better responsiveness when resizing windows.&lt;/li&gt;
      &lt;li&gt;Handle alpha transparencies in PNGs with a hardcoded white background.&lt;/li&gt;
      &lt;li&gt;All XLib interfacing is done through a generic interface. This makes the code much cleaner and fixed a bug involving unnecessary redraws from expose events.&lt;/li&gt;
      &lt;li&gt;Small speed increases&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;h2&gt;Download&lt;/h2&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Source: &lt;a href=&quot;http://web.uvic.ca/~jhawthor/meh-0.3.tar.gz&quot;&gt;meh-0.3.tar.gz&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    </content>
  </entry>
  <entry>
    <title>Vectrex Emulator SDL port</title>
    <link href="http://www.johnhawthorn.com/2009/12/vectrex-emulator-sdl-port/" />
    <updated>2009-12-27T14:31:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2009/12/vectrex-emulator-sdl-port</id>
    <content type="html">
      &lt;p&gt;Recently I stumbled across some videos of the Vectrex, an 8-bit game console from 1982.
      Specifically, &lt;a href=&quot;http://www.youtube.com/watch?v=_ml8NcDdQr4&quot;&gt;hyper chase&lt;/a&gt; is about the coolest looking game I've ever seen.&lt;/p&gt;
      
      &lt;p&gt;I couldn't find any existing emulators for linux, but I did find &lt;a href=&quot;http://www.valavan.net/vectrex.html&quot;&gt;vecx&lt;/a&gt; by valavan manohararajah, a well written, super portable vectrex emulator, and made a quick port to SDL.&lt;/p&gt;
      
      &lt;p&gt;The system rom, included with source, plays &quot;Minestorm&quot;, which is similar to asteroids. Other roms can be played by running &lt;code&gt;vecx ROMPATH&lt;/code&gt;.&lt;/p&gt;
      
      &lt;p&gt;A good thing about the vectrex is that the original games are freely available for non-commercial use.
      The system's original roms can be found at: &lt;a href=&quot;http://www.arcadeathome.com/dl.phtml?vectrex/vectrexroms.zip&quot;&gt;http://www.arcadeathome.com/dl.phtml?vectrex/vectrexroms.zip&lt;/a&gt;&lt;/p&gt;
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;h3&gt;SDL vecx download&lt;/h3&gt;
      
      &lt;ul&gt;
      &lt;li&gt;version 1.0:
      &lt;a href=&quot;http://github.com/jhawthorn/vecx/tarball/v1.0&quot;&gt;http://github.com/jhawthorn/vecx/tarball/v1.0&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;on github:
      &lt;a href=&quot;http://github.org/jhawthorn/vecx&quot;&gt;http://github.org/jhawthorn/vecx&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;p&gt;Richard Bannister has also created &lt;a href=&quot;http://www.bannister.org/software/vecx.htm&quot;&gt;vecx for OSX&lt;/a&gt;.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>meh 0.2 released</title>
    <link href="http://www.johnhawthorn.com/2009/12/meh-0.2-released/" />
    <updated>2009-12-22T03:38:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2009/12/meh-0.2-released</id>
    <content type="html">
      &lt;p&gt;Turns out I'm pretty bad at this release early, release often thing. It's been nearly a year since the last release of meh.&lt;/p&gt;
      
      &lt;p&gt;But here it is! &lt;a href=&quot;/meh/&quot;&gt;&lt;strong&gt;meh 0.2&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
      
      &lt;h2&gt;Download&lt;/h2&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Source: &lt;a href=&quot;http://web.uvic.ca/~jhawthor/meh-0.2.tar.gz&quot;&gt;meh-0.2.tar.gz&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;Gentoo Linux
      
      &lt;ul&gt;
      &lt;li&gt;ebuild: &lt;a href=&quot;http://web.uvic.ca/~jhawthor/meh-0.2.ebuild&quot;&gt;meh-0.2&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Exherbo Linux
      
      &lt;ul&gt;
      &lt;li&gt;exheres: &lt;a href=&quot;http://web.uvic.ca/~jhawthor/meh-0.2.exheres-0&quot;&gt;meh-0.2&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;h2&gt;Notable Changes&lt;/h2&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Added a ImageMagick pseudo-format. Any image not supported by meh's internal filters will be piped into ImageMagick's convert (if available). This allows support for ImageMagick's nearly 200 formats, at the expense of being slow to convert. This allows viewing PDFs and SVGs.&lt;/li&gt;
      &lt;li&gt;Super-sampling filter is used for downscaling.&lt;/li&gt;
      &lt;li&gt;Netpbm is now a built-in format.&lt;/li&gt;
      &lt;li&gt;Bug fixes.&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;h2&gt;Future Changes&lt;/h2&gt;
      
      &lt;p&gt;What's aimed for version 0.3, which will hopefully be released much more quickly than this one.&lt;/p&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Image zoom.&lt;/li&gt;
      &lt;li&gt;Caching.&lt;/li&gt;
      &lt;li&gt;Moving images within the window.&lt;/li&gt;
      &lt;/ul&gt;
    </content>
  </entry>
  <entry>
    <title>ACM ICPC Regional Programming Competition</title>
    <link href="http://www.johnhawthorn.com/2009/11/acm-icpc-regional-programming-competition/" />
    <updated>2009-11-12T07:58:00-05:00</updated>
    <id>http://www.johnhawthorn.com/2009/11/acm-icpc-regional-programming-competition</id>
    <content type="html">
      &lt;p&gt;Last Saturday, November 7th, I competed in the &lt;a href=&quot;http://icpc.baylor.edu/&quot;&gt;ACM ICPC 2009&lt;/a&gt; &lt;a href=&quot;http://www.acmicpc-pacnw.org/&quot;&gt;Pacific Northwest Regional&lt;/a&gt; Programming Competition.
      The UVic White team, consisting of Scott Porter, Dan Sanders, and myself, placed 4th behind UBC^ and two teams from Stanford.
      I'm very happy with this result and hopeful that this gets us a wildcard spot for the world finals in Harbin, China. UVic's second team, UVic blue, finished an impressive 23rd. Final standings are available &lt;a href=&quot;http://www.acmicpc-pacnw.org/Standings/2009.htm&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
      
      &lt;p&gt;I had a great time and would really like to thank my teammates and our terrific coach &lt;a href=&quot;http://seanfalconer.blogspot.com&quot;&gt;Sean Falconer&lt;/a&gt;.&lt;/p&gt;
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;br/&gt;
      
      
      &lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;
      
      &lt;p&gt;Seems that we've missed the wildcard spot, which is pretty disappointing since our region had been given three spots for the two previous years.
      We'll be redoubling our efforts for next years regional to ensure we'll make the top two spots.
      Congrats to the UBC and Stanford teams who I'll be cheering for in the world finals.&lt;/p&gt;
    </content>
  </entry>
</feed>
