Widerbug 1.3.0 for Firefox 3

The Firebug team has been hard at work squashing bugs and making Firefox 3 related improvements, culminating in the release of Firebug 1.3.0 yesterday. Some of the notable changes include:

  • Better debugging performance when dealing with large JavaScript files
  • More reliable ‘console’ object for logging
  • Alphabetized DOM properties
  • Added localizations
  • Over 50 bug fixes

After some minor modifications, Widerbug 1.3.0 is ready for use on your widescreen display in its signature 2-up layout, complete with all the changes from above. As usual, head over to the Widerbug page to grab the latest version (please leave comments and note any bugs on that page).

Widerbug 1.3.0 for Firefox 3

fmTuner: A Last.fm Plugin for WordPress

fmTuner is a WordPress plugin for retrieving song details from your Last.fm profile and publishing them anywhere in your WordPress theme. It provides options for choosing among your Recent, Loved, or Top tracks, as well as tools to adjust the update frequency and appearance.

Of particular note is the customizable Display Format option. Using simple tags like [::artist::] and [::image::] intermixed with regular HTML, you can tweak your Last.fm tracks exactly how you like, or however your WordPress theme requires. You have full control!

Download

Download the latest fmTuner from WordPress.org

Requirements

  • WordPress 2.7 or newer.
  • PHP 5 or newer
  • Basic knowledge of PHP, HTML, and WordPress.

Installation

  • Upload fmtuner.php to a directory inside /wp-content/plugins/ directory. For example: /wp-content/plugins/fmtuner/fmtuner.php
  • Ensure /wp-content/plugins/fmtuner/ is writable by your webserver.
  • Activate the plugin through the “Plugins” menu in WordPress.
  • Set up options in the “Settings” menu in WordPress.
  • Place the PHP code if(function_exists('fmtuner')) { fmtuner(); } in your templates, to call up fmTuner.

Release History

  • fmTuner 1.1
    Released on Feb. 1, 2010
    Added a placeholder image field to the fmTuner Settings page, which will be substituted when tracks have no artwork.
    Tested under WordPress 2.9.1.
  • fmTuner 1.0.8
    Released on Nov. 3, 2009
    Fixed a bug with the [::url::] fmTuner tag that caused Last.fm links to appear incorrectly.
  • fmTuner 1.0.7
    Released on Apr. 23, 2009
    Tracks with foreign character sets now display more accurately.
  • fmTuner 1.0.6
    Released on Mar. 29, 2009
    You can now display more than 10 Recent Tracks, and you should get fewer tracks without artwork.
  • fmTuner 1.0.5
    Released on Mar. 22, 2009
    Track information is now properly escaped to handle $ signs, quotes, and other non-alphanumeric characters.
  • fmTuner 1.0.4
    Released on Dec. 14, 2008
    Made minor tweaks for fmTuner Settings page under WordPress 2.7.
  • fmTuner 1.0.3
    Released on Nov. 15, 2008
    By request, a [::number::] fmTuner tag has been added, which emits a sequential number for each track (starting at 1). This is particularly useful for CSS and JavaScript display purposes.
  • fmTuner 1.0.2
    Released on Oct. 5, 2008
    Added a cURL-based alternative to file_get_contents to hopefully resolve “URL file-access is disabled” issues. If allow_url_fopen is disabled in the php.ini, cURL will be used to fetch the Last.fm feed instead.
  • fmTuner 1.0.1
    Released on Sept. 9, 2008
    Added better failure checking and informational messages, removed development code, and updated instructions.
  • fmTuner 1.0
    Released on Sept. 6, 2008
    Initial release.
fmTuner: A Last.fm Plugin for WordPress

iPod Junior

Back when Command-Tab first started, I did a hack where I managed to connect a full size hard drive to a 3G iPod. I’m happy to present today a much easier solution — the “iPod Junior” — using a laptop hard drive and a nearly pre-built adapter. The end result is an iPod with an attached 2.5″ hard drive with next to no soldering.

In my earlier hack, I noted that the 1.8″ hard drive inside the iPod runs on 3.3v (see for yourself) instead of the 5v used in slightly larger laptop drives. Again, some external power source will need to be connected to power the drive, as the iPod alone can’t even spin up the laptop drive, much less a full desktop-sized drive. What I discovered is that the hard drive caddy inside IBM ThinkPad 240 laptops are almost a perfect iPod-to-laptop drive adapter, with the exception of power. On the front of the adapter is a female 1.8″ hard drive plug normally used for connecting to the laptop bus, and on the back is a standard female laptop hard drive connector. With some slight modification to route in the correct power, this modified adapter can easily attach a laptop hard drive to your iPod’s ribbon cable — ready for formatting and use.

You can see more photos of the modification in my Flickr photoset. To do the hack yourself, you’ll need to acquire a ThinkPad 240 hard drive caddy off eBay, like I did. Cut the +3.3v power trace that leads to pins 41 and 42 on the 2.5″ hard drive bus, and also scrape some of the green coating off both positive and ground traces. With the positive lines cut and some bare copper exposed on both traces, you can then solder on whatever power connector you prefer to run 5v to — I used two simple pins from a pin header, as a floppy drive power connector will easily plug onto them. From there, connect everything up, power up the drive, and then the iPod. Format and use. Rinse and repeat.

iPod Junior

iMac LC III


Things have been a little slow around here because I’ve been dedicating a bunch of time to my latest project — disassembling a grape iMac and fitting its parts into an LC III case. I’m finally done now and am happy to report that it was a complete success. It required more hardware modification than I had initially anticipated, and I ran into some problems along the way, but without those troubles I wouldn’t have made it to this point. What follows is a step-by-step of what I did to cram a big gumdrop shaped iMac into a pizza box sized LC III case.

iMac Without It's Candy ShellSeveral weeks ago I received a dead grape iMac from a MUG member who suspected that the power supply had bitten the dust. I had previously agreed that I would take the iMac in trade for retrieving the files off of the hard drive…which was a fairly easy task thanks to an IDE-to-FireWire bridge out of a hard drive enclosure. Since the power supply was useless, I couldn’t easily tell what else on the iMac worked. I disassembled the candy colored machine and salvaged the logic board, video board, speakers, microphone board, hard drive, and case. With all the major useful components laid out, I set to doing a little research on the net.

I found several useful iMac hack pages, including one (saved copy) which detailed the power connector on the bottom of the iMac’s logic board. Attached to the board is a power filter, likely because the power supply is very close to the (electrically) noisy cathode ray tube inside the iMac case. Since I wouldn’t be using the same physical configuration, it most likely wasn’t necessary.

Digging around in my array of old computers, I found a Macintosh LC III which no longer worked. I decided to challenge myself and see if I could fit the iMac’s components into it. The LC III is a dream to take apart compared to the iMac — the back of the case has one screw, then two snaps. The top then easily lifts off to reveal all the parts. Since the LC III was already defunct, I just removed all the parts from the case and set them aside.

I began placing the iMac’s components into the LC III case to get a general idea of where they might fit. As far as I could tell, all the parts would fit within the area of the case, but height was another issue. The case only provides a little over an inch of vertical space, so I had to keep everything very low profile.

Booting the Motherboard with an OS X CDThe first issue I ran into was power. Since the iMac’s power supply was dead, I couldn’t use it’s board, not to mention the fact that it was gigantic and would take up far too much space. On the iMac to ATX conversion page I found earlier, the author detailed how to adapt a standard PC ATX power supply to an iMac. Following his diagrams, I built a small adapter with a female plug and pin header, which would connect an ATX power supply to the bottom of the iMac’s logic board. With the adapter built, I carefully checked my connections — you only get one shot with this type of work. Borrowing a spare ATX power supply, I powered up the iMac logic board. While it had no magnetic or optical drives connected, it still made the familiar Mac startup chime and displayed a blinking question mark, indicating it could not find a system folder to use. I’d never been so happy to see that symbol before. I quickly powered it down and attached the iMac’s CD-ROM and let it start Mac OS X 10.3.5, which also booted just as easily.

After having complete success with the logic board and power supply, I moved on to the optical drive with a good feeling that I may actually accomplish something with this project. I noticed that the LC III had a lot of spare room around the floppy drive, and I thought it would be a perfect spot for a CD drive. However, the slot facing the front wasn’t wide enough for a CD. With a little filing and sanding, the slot was wide enough to accept any disc, and has the benefit of still looking stock to the untrained eye. After that, I spent the next few hours modifying a slot-loading DVD-ROM so that it sat at the proper height to catch an inserted CD or DVD. The hard drive would stay in the same cradle as it was in the original LC III design, and required no modification to make it fit.

IDE Cable FoldingThe biggest task in this project was to clear out most of the raised plastic squares on the bottom of the LC III case to gain an extra quarter of an inch under the motherboard and power supply. Between Dremel grinding wheels, pliers, and some sandpaper, I was able to knock out enough plastic to allow the IDE cable to sit comfortably against the bottom of the case without raising the motherboard any higher. The power supply was another issue — I scavenged a small 120 Watt ATX power supply from an old PC tower and carefully stripped it of its protective metal housing. With the small height gain, the power supply just barely fit inside the case and pressed snug against the imac logic board, holding everything in place. It wasn’t perfect, but it would do.

Drives and CableA final problem I ran into was that the connector on the back of the slot-loading DVD-ROM was on the opposite side of most laptop drives, meaning that my IDE adapter board would stick way too far outside the case. This problem had me stumped for a long while, but I eventually came up with a hack to make it work. I cut a hole in the bottom of the DVD-ROM and moved the main controller board *under* the drive, and ran the ribbon cable to it. This way, I could turn the board 45 degrees and make use of the IDE adapter, although at an awkward angle. Doing this modification also required that I re-run some motor control and switch wires on the drive.

Finished iMac LC IIIFinally, with all the major modifications complete, I carefully fitted all the components into the case, ran power and data wires to the drives, and attached the audio and video cables. While all my hacks had worked throguhout the process, I still half-expected the whole mess to go up in smoke when I powered it up. Yet, when I flipped the switch, the machine slowly came alive. With some final modifications to add a small processor fan and proper AC connector, my iMac LC III is now happily running Mac OS X 10.3.9.

All pictures of the process are available at my Flickr photostream under the imac tag — I would post them in my gallery here, but I still have yet to subscribe to Flickr Pro. When I do, I’ll create a photoset, and that group will appear here. If anyone is willing to donate a Flickr Pro account, it would be greatly appreciated :-) Until next time, happy hardware hacking!

Update: I’ve subscribed to Flickr Pro, and the iMac LC III photoset can be viewed here.

iMac LC III

Apple ADB Mouse Conversion

Here’s a little hack I did not long ago during the course of a weekend. I opened up an old, blocky Apple ADB mouse and swapped the internals with that of a newer USB mouse.

Unlike today’s injection molded, glued together, snap shut technologies, the Apple ADB mouse was no problem to open, with just had 4 standard Phillips screws on the corners of the underside. With the mouse open, two small circuits are visible. The circuit near the front of the mouse is where the pushbutton for clicking resides, and the other board tracks mouse ball movement and the ADB interface. Interestingly enough, the chip inside the Apple ADB mouse was made by Logitech, whose 2-button wheel mice I swear by today. I separated the two boards so that I could use the same pushbutton on the “new” mouse guts — the Apple ADB mouse has a distinct click, and I wanted to maintain that classic feel after the conversion.

Opening the USB mouse (an IBM one I bought a while back but didn’t like the feel of) was just as easy. After locating the left-click pushbutton and tracing the wires to the main board, I marked the points with a permanent marker and cut the ribbon cables, separating the USB mouse’s two boards as well.

The next step was to combine the old Apple pushbutton with the main board of the USB mouse. Since I marked the two points where the USB mouse was expecting a left-click switch to be attached, I soldered wires from the Apple switch to those points. In hindsight, I should have checked and made sure that both switches (old and new) were normally open or normally closed, but I got lucky — they matched.

The hardest step in this whole hack was cutting the right size and depth hole in the bottom of the Apple mouse plastic so that the optics of the USB mouse could fit and work properly. After much dremeling and hot glue, I was able to get the USB main board in a place that was stable and could “see” the desk. After testing the optics and mouse pushbutton, it was time to close the little guy up. I dug up a USB cable left over from another project that actually matched the Apple mouse color, attached it, and routed it through the hole used by the old ADB cable. A little more hot glue to keep everything in place, and I closed it up and put the original screws back. It’s not very pretty on the bottom, but it works. Not bad for a two or three hour weekend hack, I think.

Apple ADB Mouse Conversion

iPod Super

What is this about?

Ultimately, I’d like to get a regular 3.5″ hard drive working with an iPod. The fact that it would be huge will simply be a novelty.

Why do this?

This project came about after I dropped my 40 GB 3rd generation iPod and killed the hard drive in it. I decided to open up the iPod and see what I could do with it. I could do so without fear of breaking it, since I’d already broken the most expensive part in it.

Disassembling the iPod

It’s not terribly hard to open the iPod if you know how. Since I had owned my iPod for some time, it had a little wear, and the seam where plastic and metal meet was open just enough to push my fingernail into. Sliding it down, I was able to stick in a nylon pry tool like the ones from RadTech. After getting the tool in there, you can pop the plastic catches and the top comes loose. OWC suggests squeezing the two halves of the iPod together at the side edge until it clicks. It looks a little scary to me, but I’ve never tried their method. I’m sure it’s perfectly valid, too. After that, detach the small white connector opposite the hold switch, and the two iPod halves separate. After moving all the loose items like the hard drive out of the way, they all disconnect without much of a problem — just be careful with those thin ribbon cables. Work slowly and don’t force things to come apart. If something’s resisting, it’s most likely because there’s a catch or screw that you overlooked.

Hard Drive Connections

After opening the iPod, I took a look at the hard drive that no longer worked. I had a 40GB Toshiba MK4004GAH. I looked up the drive on Toshiba’s site and found a pin diagram of the connector. The top-right pin in the following image is pin 1, and below it is pin 2 — the pattern continues in an up-and-down fashion. I remembered reading somewhere that 1.8″ hard drives used an ATA interface, but I wanted to confirm this. Another search yielded a diagram of a standard ATA/IDE connector. Except for four pins dedicated to logic and power, the two diagrams had the same connections.

Building the Adapter

Now that I knew the hardware would match up fairly well, I needed a way for the iPod to connect to a bigger drive. A post on the ipodhacks.com forums revealed a foreign company that sold an adapter similar to what I needed, but I couldn’t read German to figure out the site, much less order from them. Examinging the ribbon cable that connects the 1.8″ hard drive to the iPod, I saw that there was an open area at each pin where it connected to the actual pins that went into the hard drive. I spent the next several minutes cutting and stripping rather thin 30 gauge wrapping wire. I was going to simply solder wires onto each of those points and run them to a regular IDE connector. With the wire cut, I decided I should look into finding the other end of the connector before I began the tedious soldering task ahead of me.

It didn’t take long to dig up an old dead hard drive whose S.M.A.R.T. status indicated it was ready to go belly-up. I unscrewed the Torx screws on the drive’s circuit board and separated it from the metal housing. Desoldering all 44 pins would be a chore, so I took the easier route and just ripped through the circuit board with a Dremel. I also considered using an IDC connector from an IDE ribbon cable, but I figured that a female IDE connector would allow me more options when it came time to attach the iPod to other devices — I could use an IDE cable and run it to a hard drive, instead of requiring that two parts sit so close together. The next step was to spend some time soldering all 44 tiny wires and testing the connections with a continuity tester. A bead of hot glue was added to hold the wires more securely, and it was finished. Though not part of my plan, this adapter can also connect an iPod hard drive to an IDE bus if necessary.

Preparing the Hard Drive

At this point I read up on how the iPod’s hard drive is formatted. There are basically three partitions: the partition map, a 32 MB firmware partition, and the rest of the disk is where your music is kept. However, the first two aren’t normally visible. Even Disk Utility will only show you the third partition. I found a lot of good info on this page, including this explanation of the partitions:

1: The first partition of the hard drive (partition no. 1 above) is necessary to make the hard drive mountable, it contains the partition map for the disk. It’s size is 63-1 = 62 in blocks which equals 32 KB. This partition is known as ‘master boot record’.

2: The second partition ‘firmware’ from block 63 to 65599, 65536 blocks in total (equals exactly 32 MB), holds the firmware of your iPod. The type is ‘Apple_MDFW’.

3: Finally, the partition ‘disk’ is of type ‘Apple_HFS’ and is keeping the data on your iPod. The size of the last partition is [number of blocks] – [base of partition ‘disk’] which is 4.74 GB of the iPod used in this example.

Formatting the New Disk

Using the information about pdisk and dd on the page mentioned above, I was able to format a 3.5″ drive as the iPod would expect to see it.

Booted

With a 2.5 inch HD

Update:

Here are some iPod articles from Apple that might be of use:

iPod Super