1 (edited by sudopinion 2012-09-03 23:37:50)

I was directed here by Nexy,  who said you guys were the people who could help me:

I've written a program that builds a library and configures fe's from roms dragged onto it.
(http://code.google.com/p/rom-jacket)

Files with extensions that are exclusive to an emulated console (.nes) are identified and processed, but .zip, .bin, .rom, .iso, etc...(e.g: extensions for files that many emulated consoles share) must be indexed using a hash of some kind.

I need to query every file's hash in a given directory/subdir against every known hash for every known rom ever stored.
So I guess I'd need a huge db file or many db's that I can compile.

I'm BRAND NEW to dumping and have only a vauge idea of how all these tools work, but ideally I'd need the hash checker to spit out something like this:

FILE: ar2(JPN)[!].zip
MATCH: MD5 af8094t0u34rete93423r
ROM: Superman (JAP) [b2] (1997) (Stupidsoft)
SYSTEM: Super Sega

01100001 01101100 01101100 00100000 01101001 01101110 00100000 01100001 01101100 01101100 00100000 01101001 01110011 00100000 01100001 01101100 01101100 00100000 01110111 01100101 00100000 01100001 01101100 01101100 00100000 01100001 01110010 01100101

Let me know if you're still struggling with this, I have a few thoughts for you..

arkiva: Plextor PX-760A and PX-716A (x2), LG WH08LS20 and UH12NS30, 3.5HD and 5.25HD FDD for raw reading
workstation: Pioneer BDR-XD05R-XL2, Mitsumi D359MN3D 3.5HD, Mitsumi (unidentified) 5.25HD attached to SuperCardPro
Seattle

for compressed files (zip, rar, 7z...), probably the fastest way would be to grab the file listing from out of it with its corresponsing decompressor (if the format supports it)

$ unzip -l some\ game.zip 
Archive:  some game.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2012-12-04 01:20   some game.smc
---------                     -------
        0                     1 file

as for checking its hash, you would have to decompress the archive (unless you just use the hash stored with some archive formats)

$ unzip -p some\ game.zip | md5sum
d41d8cd98f00b204e9800998ecf8427e  -
$ md5sum some\ game.smc 
d41d8cd98f00b204e9800998ecf8427e  some game.smc