Hapsby uses external save game definitions to determine what games and game information it can edit. The files are stored in the \hsd\ folder:
Step one to adding support for a new game would be creating a new file (or copying an existing one as a template). The file should be named in the following format:
Game_Title_-_Emulator_Name.hsd.xml
Underscores should be used instead of spaces because Hapsby runs on Java which runs on multiple platforms, some of which may not support spaces in file names.
The contents of the file should be in the following format:
Let's look at this in more detail, the first section contains the properties (fields) to edit:
What do all these fields mean?
- name: The name of the property, this is what displays in the property list on the Hapsby window.
- description: A more verbose description for this property, including any advice on how it works.
- byteOrder: For integers this is the order that the bytes are stored in the file. The valid values are LOW_BYTE_FIRST (Little-Endian) or HIGH_BYTE_FIRST (Big-Endian). For strings this is almost always LOW_BYTE_FIRST.
- dataType: The valid values are TYPE_INTEGER and TYPE_STRING, most of the time this will be TYPE_INTEGER.
- address: The address of the first byte of the value in decimal. Repeat, in decimal. If you are finding addresses in a hex editor you'll need to convert it to decimal.
- length: The number of bytes for this value.
- maxValue: The maximum value for an integer. The maximum value is not necessarily 2^length. For example, a game may crash if the character gains more than 9,999 experience points even if 65,535 could be put into the save state. Maximum value is ignored for strings.
- minValue: The minimum value for an integer, also ignored for strings.
The next section contains the attributes of the save game:
What do these fields mean?
- gameTitle: The title of the game.
- gameDescription: A more verbose description of the game.
- saveFilePattern: The file name (ie. save.dat) or pattern (ie. *.dat) for the save game/save state.
The description fields can also contain html if you want the UI to be all colorful and stuff, html characters must be escaped:
Everything on this site is free. If you've found something here to be
especially helpful or entertaining please consider making a small
donation, this can be done through a secure PayPal transaction.
Thanks for visiting my little web page!