How to: Make hiscores, history and commands work
This guide describes how to setup MAME (0.212 at the moment of writing) in RetroArch to save hiscores and make it possible to view game history and commands through the mame-menu.
With older MAME cores (e.g. mame2003) or FBNeo it is sufficient to place the respective
hiscore.dat file in your
/system/fbneo folder, but current mame switched to a lua-based plugin system which requires a bit of manual-labour to make it work in RetroArch.
[INFO] In Linux , the path separator is
/ . In Windows , it is either
- Windows 7
- Linux Mint 19.2 cinnamon
(If this guide works on other systems as well, please let me know. I will eventually update this post)
1.1. Download the mame plugins
[NOTE] The mame version has to match your current mame core in RetroArch.
other versions should work as well, but i haven’t tested this yet
1.2. Download history.dat and command.dat
The history.dat is found at https://www.arcade-history.com/index.php?page=download
and the command.dat can be downloaded from http://www.progettosnaps.net/command/
2.1. Creating of folders
retroarch/system/mame/ create the following folders:
2.2. Creating the right *.ini files
ini/ folder you should create the following files:
plugins.ini is the only necessary file, but with
ui.ini you can specify the location of your
plugin/ folder and where your
hi/ folders are generated.
hi/ folders are usually generated in the mame root path.
On Windows this is your RetroArch main folder, but on Linux Mint it is your
$home folder (
plugins folder on Windows has to be in
system/mame/plugins and on Linux also in your
$home folder if no other path is specified.
3. Fill in the blanks
Your file should look like this:
# # PLUGINS OPTIONS # data 1 hiscore 1
Here you can define where the
command.dat should be placed. (full path)
# # UI SEARCH PATH OPTIONS # historypath I:\want\some\history
I usually put them in
3.2.1. Another Folder
Now you have to create the folder you defined in the
ui.ini. I will explain later, why you have to create this by yourself.
Here you have to specify the save location of your plugin folder (full path)
# # CORE SEARCH PATH OPTIONS # pluginspath I:\am\using\plugins
Same as above, i am using
/system/mame/plugins as my path
4. Move things around
Now it’s time to move the content of the plugins folder from your previously downloaded mame release to your newly created plugin folder.
commands you need only the following files/folders:
data/ hiscore/ boot.lua
4.2. history.dat & command.dat
Move your downloaded
command.dat in your
5. Edit the hiscore plugin
To specify the save location of your hiscore files you have to edit the
init.lua in the
[NOTE] You have to redo this every time you update the plugins
There should be a possibility to override this with a
hiscore.ini file, but i haven’t figured out how to make this work at the moment.
Change this line
25| local hiscore_path = "hi";
25| local hiscore_path = "I:\\am\\so\\hi";
As you see, you have to use the lua syntax and therefore you have to escape the backslashes on a Windows machine.
On Linux escaping is not needed.
[INFO] The escape character in lua scripts is
On my setup it is
6. Configuring RetroArch
If you followed this guide so far, everything should run with default core settings (on Windows)
On Linux you have to enable
Read configuration in the Quick Menu (don’t ask me why)
Now your high-scores will be saved correctly and you can view the history and commands ingame by opening the mame-menu (
TAB on keyboard) and going to
External DAT View
[INFO] In the mame-menu under
Input (general) you can assign a hotkey on your controller for the mame-menu (Config Menu)
Input (general) └ User Interface └ Config Menu
Ofttimes people mentioned to enable
Read configuration and
Write configuration in
QUICK MENU └ Options
mame_read_config = "enabled" mame_write_config = "enabled"
or even in the
# # CORE CONFIGURATION OPTIONS # readconfig 1 writeconfig 1
but this is NOT needed.
Read configuration is only needed on Linux (i don’t know why it works on Windows without, but not on Linux),
Write configuration is in my opinion not needed at all in RetroArch.
read config will indeed generate the
history/ folder, but if you create it by yourself, you don’t need to enable this (on Windows). I have no idea if this has other effects than this.
write config will produce for every game played a
*gamename*.ini which is a complete
mame.ini with every setting possible that overrides every future change you make in your settings.
This is highly unwanted and should therefore not be turned on
8. Closing words
This guide is not meant to be complete or to be 100% correct, but i think it is the right direction.
Also i am not a native English speaker