Can i ask for a DAT feature here?
I'm going to anyway. This is a lot of work, without a script and a fullset already compressed to chd at least.
I'm interested in the games dat file containing two new field for .chd.
Specifically, the file sha1 (for romcenter etc), and the 'Data SHA1' (for retroarch) that chdman info game.chd shows.
This is because 'Data SHA1' only depends on the data files, not the compression level, metadata or anything else, and it's a single 'sum' checksum of all the files, so it won't have the problems with duplicates this set .gdi files hashes have.
Obviously, the limitation here is that this needs to be done by someone that has the fullset in chd already; and can program a script to iterate over all of them and parse out the 'Data SHA1' part of the chdman info -i game.chd output.
All fairly easy tasks to do on linux with find, chdman and sed, as long as you have the set and the set is compressed with chdman already, which i don't.
I'd be ok with just the default compression hash too, if it was too troublesome to automate the above, but i believe the value of 'Data SHA1' on the chd header would be more useful because it appears to be compression method or metadata independent (i think it's just the sha1 of all the original files bytes concatenated). Since it's rare for a dump to need a redump, but not rare for someone to compress more or less...
CHD version used should be the latest, v5 version, made by mame chdman. I believe it's only supported by demul for now (reicast supports v4) but that will probably change.