Though DVI/HDMI monitors are supposed to handle 640x480, over half of the ones I have tested don't display anything. Every single one of them worked just fine at 1280x768, however, so I am changing my projects to use that.
I've found 1024x768 and 1280x720 are both well supported. I tend to use these display timings: https://projectf.io/posts/video-timings-vga-720p-1080p/
VIDEO_ID_CODE 4 (1280x720) works on all monitors I tested while 1 (640x480) only displays on half of them:
https://github.com/nand2mario/nestang/blob/master/src/hdmi2/...