It doesn't work :(
When extracting hiscores is not working as expected, let's do some debugging together.
Note that I cannot debug an issue if a testcase cannot be provided outside of a potential external tool calling hi2txt utility.
Step 1: understand the basic
hi2txt decodes game hiscores, taking them from a file generated:
- either natively by mame (nvram), often into <your_mame_install_path>\nvram\<game>\<some files with hiscores burried inside>
- either by a LUA plugin (hiscore), relying on a file describing where the scores are stored inside the in-game memory during a play: hiscore.dat file, maintained by Leezer, producing a ".hi" file, often into <your_mame_install_path>\hi\<game>.hi
hi2txt also needs a description of the score file content itself to decode it, provided by hi2txt.zip companion, where is stored all games hiscores file descriptions (hit2txt.zip -> <game>.xml).
hi2txt checks that <game>.xml content description is matching hiscore.dat memory location (address, size, etc.) as hiscore.dat can be updated by Leezer to better dump hiscores, and hi2txt must adapt in this case.
Still with me?
Step 2: locate all the parts, outside of an external software calling hi2txt
- Locate hi2txt tool: hi2txt.exe or hi2txt.bat (let's call it <your_hi2txt_install_path>)
- Locate hi2txt game hiscores file content descriptions: hi2txt.zip (often inside <your_hi2txt_install_path>/hi2txt.zip)
- Locate mame used (let'is call it <your_mame_install_path>)
- Locate hiscore.dat file used (often inside <your_mame_install_path>/plugins/hiscore/hiscore.dat)
- Locate the game hiscores files (often inside <your_mame_install_path>/hi/<game>.hi or <your_mame_install_path>/nvram/<game>/...)
Step 3: be sure that hiscores can be saved by mame
- you found a hiscore plugin, along with a hiscore.dat file, inside your mame installation
- <your_mame_install_path>/mame.ini: plugins 1
- <your_mame_install_path>/mame.ini: nvram_directory nvram
- <your_mame_install_path>/plugin.ini: hiscore 1
Step 4: be sure that this game hiscores can be decoded by hi2txt
- you found the installed hi2txt utility
- hi2txt utility is supporting the game:
- open a Windows command prompt or a Windows powershell
- list all supported games and check if yours is here: <your_hi2txt_install_path>/hi2txt.exe -l
- ... or directly pipe it to "find" command: <your_hi2txt_install_path>/hi2txt.exe -l | find '"donpachi"'
Step 5: call the hiscores decoding yourself
<your_hi2txt_install_path>/hi2txt.exe -hiscoredat <your_mame_install_path>/plugins/hiscore/hiscore.dat -r <your_mame_install_path>/hi/<game>
activate debug mode:
<your_hi2txt_install_path>/hi2txt.exe -hiscoredat <your_mame_install_path>/plugins/hiscore/hiscore.dat -rd <your_mame_install_path>/hi/<game>
Step 6: known problems and solutions
- there is already a .hi file written with a different hiscore.dat file and the new one is trying to read/write the .hi file but with a new size, preventing the hiscore plugin to work for this game
- solution: delete this .hi file (but you will lose your hiscores...)
- mame version is too old
- solution: update to latest mame (ex: 0.219)
- mame version is too recent and some changes have not yet been supported by hi2txt
- solution: report the issue (see step 7) and I will try to support the game
- hiscore.dat is too old and game memory location is not supported by hi2txt
- solution: report the issue (see step 7) and I will try to support the game
- hiscore.dat is too recent and some changes have not yet been supported by hi2txt
- solution: report the issue (see step 7) and I will try to support the game
- hiscore plugin is not activated in mame configuration
- solution: activate the plugin (sees tep 3)
- hi2txt.zip is too old for the mame installation
- solution: install the latest hi2txt release
- hi2txt.zip contains a buggy xml description to decode this game
- solution: report the issue (see step 7) and I will try to support the game
- hi2txt.exe utility has a bug
- solution: report the issue (see step 7) and I will try to support the game
- the game is not yet supported by hiscore.dat file (no entry for the game inside)
- ask to Leezer if he can support it
- the game is not yet supported by hi2txt utility
- solution: ask and I will try to support the game
Step 7: report the issue
In case you cannot see the scores, but you think you should, please report me (hi2txt AT free.fr) the issue with the following information:
- email title: [issue] <game>
- mame release (official/non-official? version? where can I download it if not the official one?)
- attach the hiscore.dat file if possible
- attach the game .hi file or nvram file if possible
- hi2txt version (displayed from "hi2txt.exe -v" command)
- in case of a modified hi2txt.zip, attach the game.xml taken from this zip if possible
- what hiscores you expect to see from hi2txt
- what hiscores you get from hi2txt
- attach the output of hi2txt.exe with the debug mode activated
The more you provide, the easier it will be to help you.
Cheers,
GreatStone.