==================
pspHBSortTool v4.0
==================

1. Basic Tool Instructions
2. Additional Items/Tools/Notes
3. Changes Made To Source Files/Folders

Please also view the readMe.txt file.



______________________________________________________________________________
1. INSTRUCTIONS:

  o   There is no installation required for this application.
      - simply double-click the EXE to launch the tool.

  o   Upon loading, the app will search for a PSP drive on a best guess basis.
      - you can select your own drive choice from the "PSP Drive" DDL if this
        guess is inappropriate.

  o   Upon drive selection, the app will load the relevant information from
      the ISO, GAME, GAME150 and GAME5XX folders. In particular, the system
	  will check for CAT_** folders, and mark the information appropriately.
	  - "GAME5XX" can be changed - see below reference to INI file.
	  - for "GCLight" no prefix is used (will pick up all folders).
	  - if "No Plugin" mode is selected no category folders will be looked at.

  o   The information can be reset/reloaded by clicking Reload, and will
      automatically be reloaded when selecting a different drive. A reload
	  will also be prompted by a significant action, such as moving items
	  between categories. (Rescan will "reset" the application, and will
	  rescan and reload as though you were restarting the app.)

  o   Using the "Categories" DDL you can view all recognised HB items grouped
      by category. The category list is created by merging from the various
	  source folders (as they are by the plugin), and each can be sorted:
      + manually - using Up/Down buttons, or by drag'n'drop;
      + in bulk - by clicking column headers.

  o   Multiple changes can be made by switching between the categories as they
      are retained in memory until "Reload", "Rescan" or "Save Changes" is
	  clicked or until you change system options.
      - you can also sort everything at once using the "{All Items}" category.

  o   When you're ready simply click "Save Changes" to push the necessary
      changes up to the source files/folders (see below).
      - to "cancel" changes, simply "Reload".

That's pretty much it!!
(Other than the useful tools - see below...)



______________________________________________________________________________
2. ADDITIONAL ITEMS/TOOLS/NOTES:

There is a growing set of extra items/tools:

(a) "Mode"

    The different plug-ins (and the GC plug-in's different options) use
	different file/folder attributes to organise the display. This seems to be
	an 	inherited function of the way the PSP works and, I guess, is unlikely
	to change anytime soon. This "mode" selection allows you to choose the
	most appropriate method based on your preferred plugin. Details of the
	differences can be found below.

(b) "Sort Categories"

    There is a built-in mini-version of the tool which can sort the categories
	themselves. This is launched via the "Sort Categories" button. Please note
	that this button is disabled for "content browser" mode (categories will
	always be displayed on the PSP alphabetically) and for "no plugin" mode
	(which has no categories).

(c) "SaveData Tool"

    This built-in mini-tool allows you to Browse/BackUp/Restore/Delete SaveData
	items. Unlike other SaveData BackUp tools this one will persist the
	timestamps of the relevant file/folders so that after a restore the
	SaveData items haven't all been set to today's date (which annoys me).

	As an additional security check you to have to enable delete functionality
	each time by ticking the "Enable Deletes" checkbox (pre-ticking this may
	eventually be added as an INI file item).

(d) "Right-Click menu"

    When you R/Click on an item in the main grid a context menu will appear
	giving some or all of the following options (available options will vary
	depending upon your current selection):

    o  Change Category - allows you to move the current item between
 	   categories (and to create a new one if you wish);

    o  Show File Info - displays a popup window detailing some (potentially)
	   useful/interesting file information.

    o  Delete This Item - allows you to delete the chosen item from your
	   memory stick. Please note that because of the way memory cards work
	   ALL DELETES ARE PERMANENT.

    o  Edit Filename - allows you to edit the filename of the current object
	   (can be useful if the filename is too long for PSP to display);

    o  Reduce Filename - will automatically reduce the length of the filename
	   (+ category) to the length set by the WarningLevel value. The last part
	   of the filename becomes "[...]" to indicate a shortened name.

    o  Set Filename From Title - borrows from the above funtions to quickly
	   change the filename to match the title.

	o  [BETA] HexEdit Title - This is BETA functionality - to be used AT YOUR
	   OWN RISK. It *should* replace the bytes in the file stream with those
	   representing a replacement title. Note that titles MUST remain the same
	   length, so entry is size restricted and results will be padded (with
	   underscores) to ensure this. Compressed (CSO) files cannot be changed.
	   Please note that ALL CHANGES ARE PERMANENT (so backup first).

(e) "Double-Click"

    Double-Clicking a row on the main grid has the same effect as R/Clicking
	and selecting "Show File Info" (see above) - i.e. it will display the same
	popup window of (potentially) useful/interesting file information.

(f) The "warning" column

    I have noticed that with long filenames the addition of the category
	folder name sometimes means the PSP does not display the HB item. So I
	added a threshold warning marker which simply displays a "X" if the
	combined name gets too long. Strangely it seems the threshold value is not
	totally fixed but can vary (with the combination of category length and
	ISO filename length) so I made the threshold value changeable via a tool
	under menu option "Settings >> Adjust Warning Level" (also see the INI
	section below).

	Strangely EBOOT.PBP based folders seem to need an even smaller total path,
	and content browser method changes these values still further. To use this
	function with these modes you might need to play with the value a bit...

(g) The "size" column

    The default setting is for this to calculate the entire size of a HB
	folder rather than just show the size of the Eboot file as this gives a
	more accurate representation of the used space on the drive. However, if
	the HB is formed of lots of small files the size calculation can become
	slow and get annoying. Hence there is a setting to switch this off and
	show the size of just the Eboot file under menu option "Settings >>
	Eboot Size" (also see INI section below).

	ISO files are, of course, always shown as single files.

	A value of 0 specifically means "no Eboot was found" - very small values
	(<1mb) are rounded to 1mb for display. All other values are rounded down.

(h) INI files

    The system uses simple defaults - but there is an option to persist
	preferences via an INI file. You have to manually create one (using menu
	item "Settings >> Save Settings To INI File") but once one exists the
	values will update automatically.

	The INI file is normally created in the same folder as the app EXE,
	although I understand Windows 7 does things a little differently.

	The following values can be understood:

    o  WarningLength - defaults to 60 (max 99, min 9)
        + this stores the preferred value for the "filename length warning";
    o  GameFolder - defaults to "GAME5XX"
        + this is to allow an element of future-proofing.
    o  Target - defaults to "ContextMenu"
	    + allows you to persist the chosen "Mode" option. Other settings are
		  "ContentBrowser", "MultipleMS", "GCLight", "GCLite", "NoPlugin";
    o  EbootSize - defaults to "Folder"
	    + setting to "Eboot" allows the file/folder sizing choice to be
		  persisted.
    o  IncludePic1 - defaults to "Yes"
        + setting to "False" or "No" forces decoding of Pic1.png data to be
		  skipped. This value can only be changed manually, but may help
		  speed up loading times on very packed memory cards and can sometimes
		  be useful if you are scanning items with badly constructed embedded
		  images (such as some hand-converted PSX files).
    o  StartMaximised - defaults to "Yes"
        + setting to "False" or "No" starts the app in normal mode. This value
		  can only be changed manually, as I figured most people don't care.
    o  IconSize - defaults to "Medium"
        + directly affects the size of the icon displayed in the main grid.
		  Other settings are "Small", "Large" or "FullSize".

    The INI file can of course be updated manually, and is read when the app
	is loaded.

(i) INI path override

	The combination of "Windows 7", "Program Files" and "Use INI File" doesn't
	work because of Windows UAC etc. To use this app from "Program Files" you
	need to manually create a dummy file called "useAppData.ini" in the same
	folder as the EXE file. This forces the app to use "LocalUser\AppData" for
	the INI files instead of the folder with the EXE.

	This should only be needed if you don't want to run as portable app and
	instead prefer to "manually install" into Program Files area.

(j) "Clean Up Empty Categories"

    This application allows you to move items between categories, creating new
	ones on the fly as desired. This can, of course, leave empty folders
	behind on the source drive.

	This tool (from menu item "Tools >> Clean Up Category Folders") will
	recurse through the CAT_** folders deleting any that are found to be
	empty.

	If you use this tool, PLEASE take care that you have backed up any data
	you regard as essential to prevent accidental loss. There is a double
	redundancy check to ensure only empty folders are deleted (and prevent
	such data loss), but better safe than sorry.

(k) "Clean Up ReadOnly Items"

    More often than not, files marked as RO (read-only) have been marked that
	way by mistake. Although this application provides code to handle this
	additional security on files, the warning messages can become annoying.

	This tool (from menu item "Tools >> Clean Up ReadOnly Items") will clear
	the RO flag from any files so marked, enabling the main sorting functions
	to work as intended.

(k) "Validate Compressed Items"

    It is not unknown for cso files to retain the ".iso" extension. As this
	tool makes a few assumptions about files based on their extension it was
	sensible for there to be a way to test the validity of these extensions.

	This tool simply checks for the "magic" compression indicator in all iso
	and cso files and reports back any mismatches. The tool will also rename
	any affected files, should the user choose to do so.

(l) Options

    For those who prefer to set all their options at once there is now a
	"proper" options screen (from menu item "Tools >> Options"). Using this
	will always force a reload as some options affect the display.



______________________________________________________________________________
3. CHANGES MADE TO SOURCE FILES/FOLDERS:

This tool updates various source file/folder datetimes into an order that the
PSP will correctly reflect on screen. This section briefly outlines which
values will be changed.

(a) When sorting for "Multiple MS", "Context Menu" or "GCLite":
  o   ISO/CSO Files: File Created Date of ISO/CSO file is updated;
  o   HB EBoots (GAME/GAME150/GAME5XX): Folder Modified Date of container is
      updated;
  o   Category Folders: Folder Modified Date of "CAT_**" folder is updated.

(b) When sorting for "Content Browser":
  o   ISO/CSO Files: File Created Date of ISO/CSO file is updated;
  o   HB EBoots (GAME/GAME150/GAME5XX): File Modified Date of EBOOT.PBP file
      is updated.

(c) GCLight:
  o   ISO/CSO Files: File Created Date of ISO/CSO file is updated;
  o   HB EBoots (GAME/GAME150/GAME5XX): Folder Modified Date of container is
      updated;
  o   Category Folders: Folder Modified Date of "all folders without EBOOT.PBP
      file" is updated.

(d) When sorting for "No Plugin":
  o   ISO/CSO Files: File Created Date of ISO/CSO file is updated;
  o   HB EBoots (GAME/GAME150/GAME5XX): Folder Modified Date of container is
      updated;

In addition, any actions involving moving items between categories, editing
filenames and/or changing RO status will be moving/renaming/creating/changing
files/folders on the selected source drive.

The new BackUp/Restore tools and Delete functions also bring in file deletion
and overwriting possibilities.

To allow for the way more recent FWs seem to work, when saving changes the
isocache.bin file is deleted - this forces the PSP to reread the (new)
timestamps (ie those being set by this app).

The BETA "HexEdit Title" function is a particular risk as there is no possible
validation on this kind of byte swapping activity. There is, therefore, an
increased risk of permanent damage to files if this BETA function is used.

========================================================
ALL THESE CHANGES ARE, OF COURSE, MADE AT YOUR OWN RISK.
========================================================
