OK, Gorf is 352 lines (240x352) and Pacman 288 (224x288). It all depends on the resolution of the game you are playing. You can find the resolution of a particular game by pressing 'tab' in game and selecting 'game information'.
And yes, you can set each MAME game at a specific resolution without affecting your front end (or any other MAME game). It's easiest to use MAMEUI to do this, but you can also manually do it by creating an INI file for the game you want to change (for example gorf.ini) and set the resolution there.