Sunday, November 28, 2010

Making a Handspring Visor USB-powered

First, the usual disclaimer: If you decide to follow the rough guidelines in this post, I am not responsible for any direct and indirect harm you may do to yourself and your property, including but not limited to wrecking your PDA, burning the USB port in your computer or bringing about the end of the world.

For some weird reason I bought two Handspring Visor Deluxe PDAs on eBay. They were cutting-edge technology around 10 years ago, equipped with PalmOS 3.5.2, a 4-shade grayscale 160*160 pixel touchscreen, and a whopping 8MB of storage. Now they can be had for about $10 shipped, complete with a docking cradle if you're lucky.
It wasn't too hard to find a use for them. After installing PalmOrb, they can emulate a Matrix Orbital LK204-25 LCD display with a keypad (the real hardware runs somewhere near $70 apiece). They can be connected through either USB (with an internal USB-serial converter) or serial and work with LCDproc, LCD4Linux, LCD Smartie, and similar software. I use one of them as a handy little display for the Seagate Dockstar turned Linux server.
However, these little PDAs are powered by two AAA batteries, and they eat batteries like crazy when using PalmOrb. A pair of new alkaline batteries will run dry in 12 hours or so. Well, since the Visor is connected to the Dockstar via USB, the logical thing to do is to make the Visor USB-powered, and get rid of batteries altogether.

Note: All photos are taken after the hacks have been completed.

The hack is quite simple. From the technical reference documents (faithfully preserved by the Internet Wayback Machine, and now hosted by me), Pin 7 (VDOCK) on the Visor connector is used for charging on the rechargeable Visor models. Since the Visor Deluxe is not rechargeable, that pin is practically unused. Therefore, I simply have to connect that pin to the positive battery terminal and provide the appropriate voltage in the cradle. It might be possible to directly power VCC which is 3.3V, but then I have to mess with the battery detection circuits and such.

Off we go. Disassembly of the Visor is straightforward, simply unscrew the four screws on the corners and unclip the sides using my fingernails. There are 3 PCBs inside: the screen assembly, the button board and the motherboard. Both the connector and battery terminals are on the button board, so that's where the hack will be performed.
The button board can be removed easily. The only place I could solder to the 7th pin was on the connector itself; the solder pad on the PCB lies flush to the casing and has no space. Likewise, the only place to solder to the positive battery terminal is the terminal itself. So I simply soldered a solid core wire to both of them, making sure that I can still close the casing when the wire is in place.
The Visor part is done, next up is the cradle. I bought this cradle already hacked from eBay: the previous owner made a charging only cradle from (presumably) a USB cradle. I made a serial cradle out of it, but it's not quite useful as I hoped. So now it's back to being a USB cradle, albeit with a hacked power line.
The appropriate solder pads can be identified using a multimeter and the pinouts of both the Visor connector and USB plugs. There are 4 connections to worry about: power (VDOCK), Data+, Data- and ground. For D+, D- and GND, simply solder the appropriate wires in the USB cable to the cradle board.
USB devices are powered to 5V, so the voltage must be stepped down to less than 3 volts before being fed to the Visor. The tech reference docs says the critical voltage threshold of the Visor is 1.6V, so anything between 1.6V and 3V should power the Visor fine, but something too close to the lower limit might give you a "low battery" prompt every once in a while.
Access to the university lab gives me a lot of free parts. I saw an adjustable voltage regulator in the parts bin, so I grabbed it and soldered it in place before pulling up a datasheet online. Turns out it's a switching step-down regulator capable of providing 10 watts of power. Talk about overkill. Any 2.5V or adjustable linear regulator should work fine for this if you're trying to do the same thing.
The wiring is easy enough. The power line from USB goes to Vin, Vout goes to VDOCK pin on the cradle, and GND is tied to ground on both the cradle and USB cable. There's not enough space for the regulator near the front of the cradle, so I used several pieces of wire to move it farther away. The shield in USB cables are supposed to be grounded on the host side and NOT grounded on the slave side.
Adjust the regulator to give 3 volts, put everything back together, and the hack is complete. The Visor does not have non-volatile memory so it's wiped clean during the hack when the battery is removed. I performed a hotsync using the new cradle and no batteries and it worked perfectly.
So now the Visor is happily displaying various information for my Dockstar without ever using another pair of batteries. Someone give me a trophy for protecting the environment ;-)

Finally, a warning: do not put a Visor with batteries in it on this cradle while it is plugged in. The batteries will not be very happy and may decide to leak on you or explode.

Monday, January 25, 2010

Wednesday, January 13, 2010

The "i-Slate". No, not the mysterious Apple tablet

There's a current hype around the name "iSlate". Apparently (or at least according to what people suggests), Apple is going to release a tablet computer/oversized iPhone/whatever under that name. One clue to this is that Apple supposedly bought the domain name iSlate.com back in 2007. For more rumors about the iSlate you can go here.

But here I would like to point you to another "i-Slate", a small, handheld, tablet-computer-like educational device target. Points to note include: it's powered by a photovoltaic cells, therefore grid-independent; it's a dedicated device and does not have an OS; it uses low-power chips made from "probabilistic complementary metal-oxide semiconductors" (which means the chips don't do exact calculations but make approximates); and it's cheap (projected cost less than $40).

The creator of the i-Slate is IEEE Fellow Krishna Palem, a compsci professor at Rice.

See the original article here.

I wonder whether there will be trademark issues for Apple just like when Cisco had the "iphone" trademark...

Monday, January 11, 2010

This time 百度 is down!

www.baidu.com is down at the moment. Apparently the domain cannot be resolved; pinging www.baidu.com results in requests timed out. Its homepage can be reached via http://220.181.6.175/, but you can't search, click on any links or see images. That's only natural since all the links/image srcs/etc are written as baidu.com.
DNS hijacking anyone?

Edit 1: It's 6:11 Central Time right now. Pinging now goes through to IP address 209.151.224.242, which, upon some googling, doesn't seem like any useful address. It's probably DNS hijacking then.

Monday, January 4, 2010

[DJMax]Part-Time File Fiddler: DJ Max Online note chart conversion tool

The DJMax series is my favorite music/rhythm games. Unfortunately, I never had a chance to play the original DJMax Online before it was shut down.

Some time ago I challenged myself to hack into the note charts, or *.pt files, for DJMax Online. It turned out to be pretty easy - no reverse-engineering required (although I don't know how to reverse-engineer an executable file anyway). Using some black-box observation, most of the specifications of pt files are easy to figure out, since there's no encryption of any sort.

So I wrote a tool that takes a pt file and turns out bms/bme files, so I could play around with them, edit in BMSE, play in beatmania simulators, and so on.

The tool is called Part-Time File Fiddler, a weird improvised name created to fit the acronym PTFF, which is the first 4 bytes of any pt file.

What it does:
  • Read and parse *.pt files from the original DJMax Online. DJMax Portable series, DJMax Trilogy and DJMax Technica are not supported.
  • Output the note chart to bms/bme files that can be read by BMSE and other bemani emulators.
  • Converts all notes correctly including long (hold) notes and short (hit) notes.
  • Converts background notes correctly.
  • Converts speed/BPM changes correctly.
What it doesn't do:
  • Convert the volume and pan (left/right) of each individual note. pt files do have this feature, but bms files don't support them.
  • Retrieve the information of note charts, including title, composer, genre, etc. As far as I know this info is stored separately in a database in DJ Max Online.
  • Unpack song data, including BGM, key sounds, BGA elements, etc. These data are stored in *.pak files. To unpack pak files please see the link on the bottom of this page.
And here is what Oblivion Hard Style 7k, converted into a bme file, looks like in BMSE:

Screenshot of BMSE


By the way, I made a Beatmania IIDX style note chart from Oblivion_7k_mx.pt. See the video below:




You can find the tool, along with some explanatory stuff, here.