MAMEWorld >> EmuChat
Index   Flat Mode Flat  

mw
MAME Fan
Reged: 01/01/07
Posts: 76
Send PM
Re: Program recognizing file size instead of file name
06/26/15 08:21 AM


> Ya know how MAME needs to recognize the ROM's file name in order to play it. If [
> pacman ] was named [pacmoon], MAME would not recognize it. Well, is there any
> emulator or program that instead of recognizing file names, recognizes file sizes
> (I'm not just talking about MAME either.) Each ROM, program, etc. has a unique file
> size. It is very rare for a file to have exactly the same file size. For example, the
> latest MAME Plus! release has a file size of 121,464,718 bytes. It would be hard to
> even find another program anywhere on the internet that has that exact same file
> size. It's kind of like our unique fingerprints. And the larger the file, the more
> unique file size it probably has.
>
> I'm just curious if this technique has ever been thought up by any of the devs of the
> hundreds of different emulators out there?
>
> Some will probably think this is a dumb question, but whatever, I'm curious and I'm
> dev illiterate. And I'm not suggesting MAME implement this technique either. But
> wouldn't it be possible to do so, since every MAME ROM zip has a unique file size?

You've mixed up the concept of a ROM and a ROM set. A ROM is the data from one IC chip (usually). A ROM set is a collection of ROMs that make up a game. The example names you put in brackets, [packman], [packmoon] are actually folders (or .zip files) that MAME looks inside of when looking for ROMs. The names of the files inside the folders are only there for human readability. What MAME is looking for is the size and CRC of each item. The sizes are usually a power of 2, like 8 KB, or 32 KB, or 1 MB etc. There are many ROMs with the same size. But the CRC is almost always unique, even when ROMs are the same size. by using both the size and CRC, all ROMs in MAME can be uniquely identified. (Well almost always, there is another thing called a SHA1 that can provide even more of a uniqueness factor, but I digress...)

As Robbbert pointed out, the size of the .zip file is not a good choice for matching ROM sets, due to possible inconsistencies in the way .zip files are created.

But there is a practical application for noticing the file sizes of ROM sets in .zip folders!

This application is called TorrentCheck 0.7. It is used to rebuild torrent data more quickly than clrmamepro when trying to join updated torrents. And you don't use plain .zip files, you use torrentzipped .zip files.

For more information, head over to Pleasuredome and the Pleasuredome forums, and search for "TorrentCheck 0.7".







Entire thread
Subject Posted by Posted on
* Program recognizing file size instead of file name Big Karnak 06/26/15 05:25 AM
. * Re: Program recognizing file size instead of file name R. Belmont  06/28/15 01:54 PM
. * Re: Program recognizing file size instead of file name mw  06/26/15 08:21 AM
. * Re: Program recognizing file size instead of file name Moose  06/27/15 01:17 AM
. * Re: Program recognizing file size instead of file name RobbbertModerator  06/26/15 06:06 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 301 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1461