Got the maths for horizontal / vertical size, used by the Nintendo Super System logo so far.

[Linked Image from mamedev.emulab.it]