Page 1 of 1

MAME SHA1 Calculation

Posted: Tue Aug 14, 2018 8:00 am
by zayamatias
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 !!

Re: MAME SHA1 Calculation

Posted: Sun Aug 19, 2018 10:52 am
by Robert
--

Re: MAME SHA1 Calculation

Posted: Mon Aug 20, 2018 7:30 am
by zayamatias
Hi!!

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