O'Reilly logo

PSP Hacks by C.K. Sample III

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exchange Files with Any Computer

You know that you can put music, pictures, videos, and saved games on your PSP’s Memory Stick Duo. Did you ever think you could also use the PSP as a makeshift USB drive for backup and easy portable storage?

While you are carrying that little gaming wonder around in your bag, why not keep some of your important documents saved on the Memory Stick Duo card for easy access via any computer with a USB connector?

While working on this book, I kept backup copies of all the documents involved on an encrypted, password-protected disk image, zipped and sitting on my 1GB Memory Stick. Easy and secure access.

Things You’ll Need

  • A PSP

  • A USB mini to USB cable (preferably one with a built-in charger for the PSP)

  • A Memory Stick Duo card with some free space (for files)

  • Some files to store

  • A computer with an available USB port

The Basics

In “Manage Your Saved Games” [Hack #2] , you learned the basics of connecting your PSP to your Mac/PC via USB to copy game files to your computer. This essentially works the same way. Simply plug a USB mini to USB cable into your PSP and the computer you will be using. Navigate to Settings (see Figure 1-12), USB Connection, and hit the X button.

If you are connected to a machine running Windows XP, the PSP’s Memory Stick will show up as a removable USB drive under My Computer, and it will be assigned an available letter in the alphabet (most likely E:, F:, or G:, depending upon how many drives you have connected to your computer). When you first plug it in, a little notice will pop up in the System Tray saying that a new USB device has been detected.

On Mac OS X, the Memory Stick will mount on the desktop and will most likely be named Untitled, unless you have changed its name at some previous point in time.

On Linux, the Memory Stick should be available as any other USB mass storage device. Examine the kernel messages with dmesg to see what device the PSP was recognized as:

USB Connection can be found under the PSP’s general settings

Figure 1-12. USB Connection can be found under the PSP’s general settings

	
	$ dmesg
	Linux version 2.6.8.1-5-686 (buildd@vernadsky) (gcc version 3.3.4 (Debian 1:
	3.3.4-9ubuntu5)) #1 Wed Aug 17 23:34:53 UTC 2005
	BIOS-provided physical RAM map:

	[…] lots of output deleted […]

	scsi0 : SCSI emulation for USB Mass Storage devices
	  Vendor: Sony      Model: PSP               Rev: 1.00
	  Type:   Direct-Access                      ANSI SCSI revision: 02
	USB Mass Storage device found at 2
	usbcore: registered new driver usb-storage
	USB Mass Storage support registered.
	SCSI device sda: 487936 512-byte hdwr sectors (250 MB)
	sda: Write Protect is off
	sda: Mode Sense: 00 6a 20 00
	sda: assuming drive cache: write through
	 /dev/scsi/host0/bus0/target0/lun0: p1

If it’s not automatically detected, run the command modprobe usb-storage as the root user and examine the output of dmesg again. Once you’ve identified the device, you can mount it (if it was identified as sda, you want sda1, the first partition):

	
	$ sudo mount /dev/sda1 /mnt -o uid=$USER
	$ ls -l /mnt/
	total 128
	-rwxr--r--    1 me root          5125 2005-09-04 12:35 index.html
	-rwxr--r--    1 me root          4060 2005-09-04 12:34 make_index.pl
	-r-xr--r--    1 me root             0 2005-01-30 22:28 memstick.ind
	drwxr--r--    4 me root         32768 2005-09-02 22:50 mp_root
	-r-xr--r--    1 me root             0 1979-12-31 23:00 mstk_pro.ind
	drwxr--r--    9 me root         32768 2005-04-08 23:55 psp

The sudo command lets you run mount as root, and the -o uid $USER mounts it so that the currently logged-in user is the owner of the files on the stick.

You can now treat the Memory Stick just like any other drive on your computer. Drag files over to the Memory Stick or write a document in Microsoft Word, and choose Save As and select the Memory Stick as the location to save the file.

You can also open any file you have previously stored on the Memory Stick by simply double-clicking the file. Double-click on an Excel spreadsheet to input some information, choose Save, and then quit Excel. Everything will be updated nicely and ready to go with you and your PSP.

When you are done copying files to and from the Memory Stick, you have to dismount the Memory Stick before unplugging the USB cord from your computer. Otherwise, you could risk harming the data (including all those saved games) contained on your Memory Stick.

To do this in Windows XP, click on the little USB device icon in the System Tray, and select “Safely remove USB Mass Storage Device” from the menu that pops up (see Figure 1-13—if you have more than one USB device connected, there may be multiple entries in this list). It should immediately tell you that the device is now safe to remove.

Select this menu from the System Tray to safely remove your Memory Stick

Figure 1-13. Select this menu from the System Tray to safely remove your Memory Stick

Warning

If Windows or Mac OS X complains that the drive couldn’t be removed, make sure you’ve closed all the files on the drive, including any open command prompts or terminal windows. Then try to remove it again.

In Mac OS X, drag the Memory Stick to the Trash/Eject icon, or click the Eject icon next to its name in a Finder window.

After you have successfully dismounted your Memory Stick from your computer, hit the O button on your PSP to turn off the USB connection. Now unplug the USB cable and be on your merry way.

Keep Things Organized

The PSP keeps a rudimentary file structure on the Memory Stick that you shouldn’t tamper with too much. There are two locked files at the root level of the Memory Stick, MEMSTICK.IND and MSTK_PRO.IND, that you should leave alone. I’d avoid putting any of your files inside the PSP folder, which the PSP uses to organize your game saves, photos, and music. Nor would I place these files inside an MP_ROOT folder that you may have created for videos. These files would show up as corrupted data files on the PSP. Scrolling through corrupted data files while trying to pick a song to listen to isn’t really as fun as it sounds.

Instead, create a new folder at the root level of the Memory Stick. Perhaps make it a Documents folder for holding all these files that you will be using on various machines. If the files are HTML or plain text files and you have Version 2.0 of the firmware on your PSP, you can view these files using the PSP’s Browser (see “Find Yourself a PSP Web Browser” [Hack #41] and “Turn Your PSP into a PDA” [Hack #35] ).

Think Security

This is a good tip for regular files you may be working on, but you should consider the security issues involved in carrying any type of sensitive data around with you, especially if these files are crammed on an object as desirable of thievery as the PSP.

Since I am working almost exclusively on an OS X system, I’ve created a password-protected and encrypted disk image of my files using Disk Utility (located in /Applications/Utilities/).

There are many ways to encrypt and lock up your data on Windows, Mac OS X, and Linux. For Windows and Linux, you can use the open source software TrueCrypt (http://www.truecrypt.org). For more information on Linux disk encryption, see http://www.tldp.org/HOWTO/Disk-Encryption-HOWTO/.

Also, consider practicing a little social hacking. Keep all your backed-up files inside a folder named Virus Quarantine Folder to persuade anyone who might come across the information to throw it away immediately rather than rummaging through your top secret files.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required