PSPi: Demonstrates Sony's vendor-specific SCSI commands for the PSP.

Copyright (c) 2006  Jim Paris <jim@jtan.com>
Provided under BSD license, see LICENSE for details.

$Id: README 2012 2006-11-08 06:31:52Z jim $

----------------------------------------------------------------------

When acting as a USB mass storage controller ("USB Connection" mode),
the PSP accepts a few vendor-specific SCSI command blocks.  This
program sends these commands via the Linux generic SCSI interface and
displays the results.

To build, just run
  $ make

To run, pass it the device node of your connected PSP.  Note that
it must be run as root, because Linux blocks unknown SCSI commands
for non-root users:
  # ./pspi /dev/sda

The command to format the memory stick is commented out in the source,
but it does work.  The remaining commands should be non-destructive.

This is the output for a PSP with firmware 2.82:

----------------------------------------------------------------------

Opened /dev/sdb
Command: SCSI Inquiry
  [0000]  12 00 00 00 FF 00                                 ......
Response: 56 bytes
  [0000]  00 80 00 01 33 00 00 00  53 6F 6E 79 20 20 20 20  ....3...Sony....
  [0010]  50 53 50 20 20 20 20 20  20 20 20 20 20 20 20 20  PSP.............
  [0020]  31 2E 30 30 4D 45 4D 4F  52 59 53 54 49 43 4B 2D  1.00MEMORYSTICK.
  [0030]  4D 47 03 01 00 20 20 20                           MG......

Command: Sony 0xFB 0xB4 (unknown)
  [0000]  FB 00 B4 00 00 00 00 01  01 00                    ..........
Response: 64 bytes
  [0000]  00 00 04 01 01 FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0010]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0020]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0030]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................

Command: Sony 0xFB 0xB5 (USB string 3)
  [0000]  FB 00 B5 00 00 00 00 00  01 00                    ..........
Response: 128 bytes
  [0000]  50 00 53 00 50 00 00 00  00 00 00 00 00 00 00 00  P.S.P...........
  [0010]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0020]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0030]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0040]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0050]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0060]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0070]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

Command: Sony 0xFC 0x90 (firmware revision)
  [0000]  FC 00 90 50 53 50 69 00  00 00                    ...PSPi...
Response: 128 bytes
  [0000]  32 2E 38 32 00 00 00 00  00 00 00 00 00 00 00 00  2.82............
  [0010]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0020]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0030]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0040]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0050]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0060]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0070]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

Command: Sony 0xFC 0x91 (nickname)
  [0000]  FC 00 91 50 53 50 69 00  00 00                    ...PSPi...
Response: 128 bytes
  [0000]  6A 69 6D 70 00 00 00 00  00 00 00 00 00 00 00 00  jimp............
  [0010]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0020]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0030]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0040]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0050]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0060]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0070]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

----------------------------------------------------------------------

This is the output for a PSP with firmware 1.50
(retrieving version and nickname are not supported):

----------------------------------------------------------------------

Opened /dev/sdc
Command: SCSI Inquiry
  [0000]  12 00 00 00 FF 00                                 ......
Response: 56 bytes
  [0000]  00 80 00 01 33 00 00 00  53 6F 6E 79 20 20 20 20  ....3...Sony....
  [0010]  50 53 50 20 20 20 20 20  20 20 20 20 20 20 20 20  PSP.............
  [0020]  31 2E 30 30 4D 45 4D 4F  52 59 53 54 49 43 4B 2D  1.00MEMORYSTICK.
  [0030]  4D 47 03 01 00 20 20 20                           MG......

Command: Sony 0xFB 0xB4 (unknown)
  [0000]  FB 00 B4 00 00 00 00 01  01 00                    ..........
Response: 64 bytes
  [0000]  00 00 00 01 01 FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0010]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0020]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................
  [0030]  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ................

Command: Sony 0xFB 0xB5 (USB string 3)
  [0000]  FB 00 B5 00 00 00 00 00  01 00                    ..........
Response: 128 bytes
  [0000]  50 00 53 00 50 00 00 00  00 00 00 00 00 00 00 00  P.S.P...........
  [0010]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0020]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0030]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0040]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0050]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0060]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  [0070]  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................

Command: Sony 0xFC 0x90 (firmware revision)
  [0000]  FC 00 90 50 53 50 69 00  00 00                    ...PSPi...
Failed with status 0x01

Command: Sony 0xFC 0x91 (nickname)
  [0000]  FC 00 91 50 53 50 69 00  00 00                    ...PSPi...
Failed with status 0x01

----------------------------------------------------------------------