Your card may be outputting 640*480... but Mame will often try to output a higher
resolution if its not properly limiting this.
So, when mame ups the res, and the card cant go any higher, the card
interprets this and does the next best thing.. To keep the res at
640, and to make the screen lager than the actual physical display.
This is how all the ATI cards function. Not sure about others,
but i suspect the same.
Usually its vector games in mame that do this.. because vector games
try to use the highest res possible. Also, if artworks are turned on,
mame will also try to use higher resolutions.
Finally, there is the possibility of external programs interferences...
such as mouseware programs that sometimes glitch. Try disabling them.