Sorry for the delay, haven't had much time to look at this recently and then the MAME code has changed again since I last looked at this so it had to be updatde.
Here's a link to a Windows 64-bit build of mame.
https://mega.nz/file/PTIUhJbT#XVHRPL...PoqohawaDBSVEg
To save from this, use F4 to get to the viewer, then press F12 to save the data for the current display. It will save the palette, tilesets and even the tilemap views. The data is saved to a gfxsave/<romname> folder within the mame folder.
I have not done any extensive testing with this version, so if there's any problems then let me know.
Attached are a couple of example files from commando.
Steve