zayamatias
Posts: 2
Joined: Mon Aug 13, 2018 2:47 pm

MAME SHA1 Calculation

Hi Everybody, I'm new to this forum so excuse me if I ask this in the inappropriate section.

Lately I started developing on the NeoGeo platform (just for fun), and I use MAME to quickly test the developments. In order to have a more "clean" experience, I've developed a tool in python in order to add/modify my "code" into the hash file neogeo.xml . Until there nothing extraordinary (you can check it here https://github.com/zayamatias/neogeo if you wish).

In the "rom" section of each software/part/dataarea you have one attribute called SHA1, which actually holds the hash for that particular file.

My tool also calculates the SHA1 of the file (based on code found on the net) and puts its value into that attribute so you hopefully do not get that "this game might not work properly" warning.

What is strange though, is that the calculation of my tools for files compiled by the assembler or even sprite files are not the same as MAME's calculations, and I have discrepancies as a result.

I checked online "hash tools" and they all give me the same results as my tool, but not the same as MAME. I checked with "existing" roms, and in this case, both my tool and mame calculate correctly.

Is there anything I'm missing on how MAME is calculating the SHA1 hash?

Thanks a lot !!
Robert
Posts: 99
Joined: Thu Nov 06, 2014 12:44 pm

Re: MAME SHA1 Calculation

--
Last edited by Robert on Fri May 03, 2019 2:52 pm, edited 1 time in total.
zayamatias
Posts: 2
Joined: Mon Aug 13, 2018 2:47 pm

Re: MAME SHA1 Calculation

Hi!!

Thanks a lot for the reply, that actually worked... wonder why the other python library had these discrepancies. Again, thanks!

Return to “MAME Discussion”