First working version. 240p displays correctly, 480i has an unstable image. Code is a real mess, next step is cleaning it up and improving things.