Horizontal size can be adjusted.
Vertical size cannot be adjusted.
This is valid for GroovyMAME and ArcadeOSD and Powerstrip and whatever software based on modelines. This is asked so often that I even put a scrolling banner on the main GroovyMAME thread:
GroovyMAME can get all your resolutions to almost fit perfectly on the HORIZONTAL, once you find your custom specs. No software can control the VERTICAL size of a resolution on a CRT monitor, you need to adjust it physically (potentiometers, service menu, etc.).
Adjusting the horizontal size is performed by increasing or decreasing the horizontal borders (porches).