
Save State Cracker v1.2


	Save State Cracker is a utility to aid in save state, sram, and possibly rom hacking. It includes search and comparison abilities, file corruption, as well as being a front end for my hex editor HeX0R.

__________
New in 1.2
~~~~~~~~~~

11/21/01

Clone Data
Cross Reference Results
File Backup System
Results improvement, written to file, can display all
Search speed improvement


1.1

11/18/01

	Compare can now use the search parameters originally made for Unknown Value Search, and those parameters have been extended. 
Added project workspaces.
Added file corruption, for a range or the results. 
Can delete a selected result from the list.


__________
Known Bugs
~~~~~~~~~~

	There's probably quite a few, but I don't know of any.



========================
	 Options
========================
___________
Value Type
~~~~~~~~~~~

	Values can be of byte, word, or double word ranges. So if the variable would be a small value like number of lives, you should use a byte search (0-255). Something higher like money would be a word (0-65,535). The double word ranges from (0-4,294,967,295).	

_______________
Cross Reference
~~~~~~~~~~~~~~~

	This causes the next search to cross reference the results from the last search. If the current search/compare generates an address, that address must also exist in the results from the previous search for it to be added to the new results. This allows the results to be narrowed by, in essence, combining two different searches. 

_______________
Restore On Exit
~~~~~~~~~~~~~~~

	If checked, all the backup files will be restored when the program closes. All backup files are deleted on program exit.

___________________________________
Compare & Unknown Search Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	Sets the parameters for Comparison and Unknown Value Search in order to narrow down the results. The Base Value is the value in the first file, and the Dissimilar Value is the value in the second file (third for Unknown Search) which differs from the Base Value. If Compare is set to display where the files are the same, then the Dissimilar Parameters do not apply.

Base value is:
Zero - The base value must be 0
Not zero - The base value can't be 0
Not max - The base value can't be the max value for its data type

Dissimilar value is:
Larger - You know the value increased in the dissimilar file
Smaller - You know the value decreased in the dissimilar file
Either - Dissimilar value can be greater or smaller, but not equal
Zero - Dissimilar value must be 0
Not Zero - Dissimilar value can't be 0
Not Max - Dissimilar value can't be the max value for its data type

Max Difference - The dissimilar value changed from the base by no more than a certain amount

____________
File Range
~~~~~~~~~~~~

	The range of offsets within the files that Search and Compare will work within, and that Corrupt Entire Range will corrupt. The range is specified by the Starting Offset & Ending Offset, which default to Start of File and End of File if those boxes are checked. To change one of these, uncheck the corresponding check box and type in the offset. 



=========================
	Functions
=========================
__________________
Known Value Search
~~~~~~~~~~~~~~~~~~ 	

	Searches any number of different files for specific values (of a variable), and cross references the matches in each file with matches in the others. Final results are the locations where all files had a match at the same location. 

	For each file, you will be prompted to input a value (in decimal or hex). This can be used to search one file, showing all locations in that file that matched the given value, or many files showing only the locations where every file matched its value. 

	Example: You want to know the location that holds the value for the number of lives in a game's save state. Take a few states, each when you had a different number of lives. 

State1: 3 lives
State2: 2 lives
State3: 5 lives

	Then, search them all, giving the number of lives in a particual state for its value (Files are numbered in the order they appear in the list). The search will find what locations in each file have a match for the file's given value (number of lives). Then it will return the offsets where every file had a match in the same place. 

	If the search produces no results, then a match didn't exist in every file. If it does give results, then one of them should be the offset where the number of lives is stored. The more files you search, the more the search can narrow down the results. 

____________________	
Unknown Value Search
~~~~~~~~~~~~~~~~~~~~ 
	
	Seraches 3 files when the specific values for the variable you're searching for are unknown. All that is known is the state of the variable changed between the files. This is similar to compare, but since it uses 3 files it can further narrow down the results.

	The first file is the Base file, which is the basis for the comparison. The second file is the Similar file; in this file the variable you're searching for has the same value as in the Base file, but some other things have changed (for save state: time passes, you may have moved, etc). The third file is the Dissimilar file, where the variable you're searching for has a different value than in the base state. 

	Using this information, the search finds all locations where both:

1. The Similar file is equal to the Base file, and
2. the Dissimilar file is not equal to the Base file

The Compare & Unknown Search Parameter can be used to narrow down the results.

_______
Compare
~~~~~~~

  	Compares the first two files; If Different is checked, it returns all locations where the files are different. If Same is check, then it retruns where the files are the same. Compare also goes by Byte, Word, or DWord values, and uses the Compare Parameters under Options.

_______
Corrupt
~~~~~~~
	
	Can either corrupt the file within the File Range, or corrupts all the curent results. When a file is corrupted, its data is backed up and can later be reverted by Restore Backup.

Corrupt types are:

0: Changes all bytes to 00
Max: Changes all bytes to FF
Random: Changes all bytes to a random value


========================
     General Usage
========================
_____
Files
~~~~~

	Files can be added to the list via File->Add or by dragging files into the window. File->Delete for the delete key will remove the selected file. Clear All will remove all files from the list.

__________
Workspaces
~~~~~~~~~~

	Saves the files, results and all program options. Can be loaded later to fully restore the stat during previous work.

______________
Undo Changes
~~~~~~~~~~~~~~

	When a file is edited by HeX0R, corruption, or Clone Data, a backup copy of the file data is made. You can then later undo and return the last edited file back to it's original state. 
 
_____
HeX0R
~~~~~

	When a file and offset are selected, you can launch my hex editor HeX0R, which automaticly loads the file and goes to the selected offset. HeX0R can edit in hex mode (keys 0-9 & A-F) and text mode (All alpha-numeric and punctuation keys). See HeX0R Help (F1) for more details.

__________
Clone Data
~~~~~~~~~~

	An idea from UgeTab: Copies the data within the File Range from the first file to the second file, cloning the data. This can be useful in showing exactly what specific data is for without the unpredictable nature of corruption.

___________
File Backup
~~~~~~~~~~~

	Creates a temporary copy of a file, which can be restored at any time, reverting the file to its backup data. There can be any number of backup files at a given time, which can be selected from a list. This differs from Undo in that undo is automatic, but its data is reloaded before every edit. If you edit more than once without undoing, the orignal data is lost. However, if the file is backed up before any editing, the original data can always be restored. These temporary files can be also be deleted from the list.

__________
Quick View
~~~~~~~~~~

	This displays the byte, word, and double word values in hex and decimial for the data in selected file at the selected offset. If both a file and offset are not selected, the Quick View window will be blank.

_____________________
Next/Previous Results
~~~~~~~~~~~~~~~~~~~~~

	If more than 32736 results are generated (list box display limit), then the results will be displayed in chunks of that size. Selecting Next or Previous Results will display the next/previous set of results until the end of the results is reached.

________________
Accelerator Keys
~~~~~~~~~~~~~~~~

Ctrl-A: Add File
Ctrl-H: Launch HeX0R
Ctrl-K: Known Search
Ctrl-U: Unknown Search
Ctrl-C: Compare
Ctrl-R: Remove Result
Ctrl-V/Enter: Quick View



Save State Cracker written for Microsoft Visual C++ 6
HeX0R written for DJGPP

Copyright 2001, Wesley Hopper
HopperW2000@yahoo.com