No bites on the
www.mame.net thread, but I think I know what is happening. I also think the best option would be to go back to what NNM was previously using as it was less complicated and actually seemed to work better.
Now, this is all ASSumption. No replies on MAME.net. I don't understand the source, and I haven't done any empirical testing, but it SEEMS logical to me. (on the other hand, when I was modifying art files to get this set up, MAME seems to be 50 pixels too wide with art turned on, and I was modifying the art for what I thought MAME should see, so I might be completely off here.)
What I do know is MAME only uses 4 points to scale the artwork. The upper left corner of the bezel, the lower right corner of the bezel, the upper left corner of the bezel cutout (alpha mask), and the lower right corner of the bezel cutout.
What I THINK is happening is MAME is scaling the artwork to fit the screen (with or without keep aspect) and then scaling the gamescreen to fit the scaled bezel cutout space. The problem is that the bezel cutout (in the .png file and in real life) may not be in the proper 4:3 ratio.
For an exaggerated example, lets ASSume we have a vertical game with a square bezel of 300x300 with a cutout of 100x100. What I THINK will happen is:
With -keepaspect on, MAME will stretch the artwork vertically to 600 pixels and horizontally to 600 pixels. This results in a 200x200 cutout which MAME will display the game in.
With -keepaspect off, MAME will stretch the artwork to 800x600, stretching it horizontally, and will stretch the game screen to 800/300*100 or 266x200 pixels and display the game on this screen.
To preserve the games aspect ratio, one of the following four options could be implemented (in the example above):
1) You could change the .art file to specify a 75x100 pixel cutout. This would result in a 150x200 game image with -keepaspect on, and 25 pixel black vertical bars on either side of the image. (You would likely get "letterboxing" with this method in any case, unless your art just happened to have a perfect 4:3 cutout area.)
2) You could add a new function -keep_game_aspect ratio, which would just recalculate this inside of MAME and do the same thing.
3) You could Photoshop the art to expand the artwork to ensure the cutout conformed to the 4:3 ratio and re-calculate the .art file values. This might look funny, and might not be accurate, and would probably never be able to be posted to
www.mame.net.
4) You could add a new function to MAME to do the above, but I think the calculations would be complicated, and I don't know that the end result would be desirable.
In summary, I will try to test this out, but I suspect that the 5-10% stretch or shrink looks better than the letterboxing that would result from the above, so we probably should go back to how artwork_fill_edges used to work.