|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.monkeycoder.monkeynes.hardware.GameGenieCode
This class holds a translated code, and provides static methods for
translating codes.
Originally part of the MonkeyNES project.
| Field Summary | |
static String[] |
letters
A lookup array of letters used by the Original Game Genie. |
| Constructor Summary | |
GameGenieCode(int inAddress,
int inValue)
Creates a new GameGenieCode with the supplied address and value. |
|
GameGenieCode(int inAddress,
int inValue,
int inTest)
Creates a new GameGenieCode with the supplied address, value, and test value. |
|
| Method Summary | |
int |
getAddress()
Returns the 16-bit address that should be affected by this code. |
String |
getCode()
Returns this GameGenieCode object as a code in the original form used by the Game Genie. |
int |
getTest()
Returns the value that must be in memory at the specified address for the altered value to be returned. |
int |
getValue()
Returns the value that should be returned instead of the value in memory. |
String |
toString()
Creates a String with a reverse engineered code and the data values from this GameGenieCode. |
static String |
translate(GameGenieCode inCode)
Translates any GameGenieCode object into a code in the original form used by the Game Genie. |
static GameGenieCode |
translate(String inCode)
Expects a code in the original form used by the Game Genie and will translate the information into a GameGenieCode object. |
boolean |
usesTest()
Returns whether or not this code uses the test value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String[] letters
| Constructor Detail |
public GameGenieCode(int inAddress,
int inValue)
inAddress - The 16-bit address that may be changed by this code.inValue - The value that will be provided instead of the memory value.usesTest()
public GameGenieCode(int inAddress,
int inValue,
int inTest)
inAddress - The 16-bit address that may be changed by this code.inValue - The value that will be provided instead of the memory value.inTest - The value that the original memory value is compared against.
If the value matches inValue is the response, otherwise the
value in memory is returned unaltered.usesTest()| Method Detail |
public int getAddress()
public int getValue()
public int getTest()
public boolean usesTest()
public String getCode()
public String toString()
toString in class Objectpublic static GameGenieCode translate(String inCode)
inCode - An original Game Genie code.
public static String translate(GameGenieCode inCode)
inCode - A GameGenieCode object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||