From: Ben Harris Date: Sun, 6 Nov 2016 16:16:39 +0000 (+0000) Subject: Move pixel aspect ratio discussion from NOTES to bedstead.c. X-Git-Tag: bedstead-001.002~19 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=310244e70e0d7d5feffd94b8b24809f5ce7ceafc;p=bedstead.git Move pixel aspect ratio discussion from NOTES to bedstead.c. --- diff --git a/NOTES b/NOTES index c14c991..84bc399 100644 --- a/NOTES +++ b/NOTES @@ -1,12 +1,3 @@ -Pixel aspect ratios: http://www.lurkertech.com/lg/video-systems/#sqnonsq - -In 480i, industry convention is that you get square pixels with a pixel -clock of 12+3/11 MHz. In 576i, you need 14.75 MHz. The SAA5050 takes a -nominal 6MHz clock and uses both edges to output subpixels (duty cycle -between 0.4 and 0.6). This means that the nominal pixel aspect ratios -are 12+3/11:12 for 480i and 14.75:12 for 576i. These correspond to -pixel widths of 102.3 and 122.9 respectively. - Precise pixel layouts for mosaic graphics: Based on a 6x10 grid of pixels: diff --git a/bedstead.c b/bedstead.c index 72922b4..de42f9b 100644 --- a/bedstead.c +++ b/bedstead.c @@ -104,6 +104,24 @@ /* * Design parameters. These can vary between fonts in the Bedstead family. + * + * To faithfully represent the output of an SAA5050, we need to know a + * little about TV pixel aspect ratios: + * + * http://www.lurkertech.com/lg/video-systems/#sqnonsq + * + * The SAA5050 can be used to drive both 480i ("NTSC") and 576i + * ("PAL") displays. In 480i, industry convention is that you get + * square pixels with a pixel clock of 12+3/11 MHz. In 576i, you need + * 14.75 MHz. The SAA5050 takes a nominal 6MHz clock and uses both + * edges to output subpixels (duty cycle between 0.4 and 0.6). This + * means that the nominal pixel aspect ratios are 12+3/11:12 for 480i + * and 14.75:12 for 576i. These correspond to pixel widths of 102.3 + * and 122.9 respectively. + * + * 102.3 is close enough to 100 that we may as well just use square + * pixels, which will work better on modern displays. We round 122.9 + * to 124 so that XQTR will be precisely an integer. */ struct param {