I've been always dissatisfied how the native scanline mask looks like so I started digging in the code and I found a solution. The screenshots are from my test build of GroovyMame, but it can be applied to the original mame. Details in the link below