This is a dreamcast utility I've just posted on github that checks the integrity of a console dump and applies pregap / offset corrections, which allows to get a redump compliant copy of any dump, provided it's already in the database.

It works on Linux/WSL and can be found at https://github.com/jonblau/dcsdchk.