I've been searching for a version of recent MAME with support for HQX scalers. But all MAME variants I could find were pretty much outdated. So I created a new one:
It's a very lean implementation on top of current MAME 0.147, essentially can be shrinked-down to a single "diff" file with support for hq2x, hq3x and hq4x. (So it should be trivial to catch up MAME development in the future.)
By default the GDI version with hq3x scalers is active, but this can be changed via command line: