User avatar
retrorom
Posts: 3
Joined: Thu Apr 02, 2026 8:37 am

Inconsistency between UI/Core region strings and hash XML descriptions

​Inconsistency between UI/Core region strings and hash XML descriptions

​Description:
There is a persistent mismatch between the region names recognized by the MAME core/UI (as seen in the executable's string tables) and the region names used in the <description> tags within the XML files in the /hash directory.

​Details:
While the hash XML files use full country names in descriptions, the internal filtering system of MAME (used for sorting and UI grouping) often expects abbreviated 2-3 letter codes for many regions.
​For example, in megadriv.xml:
​Current entry: <description>Sonic The Hedgehog (Japan, Korea)</description>
​Expected by UI for proper filtering: <description>Sonic The Hedgehog (Jpn, Kor)</description>
​Because of this mismatch, when users try to filter or sort by region (e.g., Megadrive or SNES software lists), many regions like France, Germany, or Japan are not correctly grouped, leaving only "USA" and "Asia" as functional filters in some cases.

​Requested Change:
Standardize the region strings in the /hash/*.xml files to match the internal short-codes used by the MAME core. Below is the mapping currently required for the UI to correctly identify the regions:

XML -> Current MAME Internal (Required)
Australia -> Aus
Austria -> Aut
Belgium -> Bel
Brazil -> Bra
Canada -> Can
China -> Chn
Spain -> Esp
Europe -> Euro
Finland -> Fin
France -> Fra
Germany -> Ger
Italy -> Ita
Japan -> Jpn
Korea -> Kor
Netherlands -> Ned
Russia -> Rus
Sweden -> Swe
Taiwan -> Tw
United Kingdom -> UK

This change would greatly improve the user experience for software list navigation without requiring manual regex fixes by the community at each release, because this is what I do by providing a patch each month.

< EDIT: Link edited out of post. If you want to share this data here, please use google/sendspace/mega.nz or similar solution. >

I include both full hash folders, one patched and one original backup for easy drag and drop. Note that over 750 xml files in hash folder, only 135 are affected by this issue in last 0.287 release.

kind regards,
retrorom.
User avatar
retrorom
Posts: 3
Joined: Thu Apr 02, 2026 8:37 am

Re: Inconsistency between UI/Core region strings and hash XML descriptions

You did not like my previous libk so here is my gdrive link for regex patch for last mame 0.287 :

https://drive.google.com/file/d/1wRIGsn ... p=drivesdk

just overwrite hash folder, a backup of original hash folder is also provided in this archive.

Make this test for proof of concept :
- BEFORE applying my patch, enter SNES machine, click on left panel RELEASE REGION and you can only select ASIA and USA cartridges
- APPLY my patch, return to SNES machine and click RELEASE REGION again : tadaa ! Now you can select only JAPAN, EUROPE, BRAZIL, CHINA, and so on...
- RESTORE original hash folder : only ASIA and USA cartridges can be selected.

It is been several months that I release this patch on the mame forum where I am 90% of time, and I will continue to provide it as long as a mamedev decides to fix it one day.

regards,
retrorom.

Return to “MAME Discussion”