Sadly I don't know anything about hex editing so I'll just have to stick with using the config file to force the correct size of my gba games. Anyway I'm glad for your responses. I'm now able to play all my gba games on my computer via retroarch.
You don't strictly need a hex editor.
For example, if you've got a POSIX-compliant terminal environment (Linux, MacOS, Windows with WSL), you should be able to do what I do:
I check DAT-o-MATIC for the correct size, then try this command to verify that I looked up the right revision.
head --bytes=CORRECT_SIZE /path/to/dump.gba | md5sum
If the md5sums match, then I run this command:
head --bytes=CORRECT_SIZE /path/to/dump.gba > /path/to/fixed_dump.gba