• Square pixels?

    From Thomas Harte@21:1/5 to All on Mon Jun 7 08:20:17 2021
    I am the author of an Apple II emulator; I recently received a bug report that its pixels aspect ratio is off — e.g. in text mode, pixels are not square.

    I checked the arithmetic on that and the emulator's workings seems to be correct that vanilla NTSC would produce pixels around 93% as wide as tall.

    But then I also took a look at photographic evidence of Apple IIs paired with appropriate monitors and indeed the few of those that are appropriately framed to be able to take measurements from appear to show square pixels*.

    Can anyone give me a sense of the probability distribution here? How common was it to calibrate an Apple II's display to try to make the pixels square? Am I even right to think they wouldn't be square on a television?

    * E.g. this one of Mouse Desk: https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from which I measured the aspect ratio of the desktop and compared to the aspect ratio when output at around the 93% number as shown above; the photograph
    was roughly 8% wider.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to thomas.harte@gmail.com on Mon Jun 7 16:44:27 2021
    In article <4e09a85b-bd8f-40f5-8c04-b9c9704708f9n@googlegroups.com>,
    Thomas Harte <thomas.harte@gmail.com> wrote:
    I am the author of an Apple II emulator; I recently received a bug
    report that its pixels aspect ratio is off — e.g. in text mode, pixels
    are not square.

    I checked the arithmetic on that and the emulator's workings seems to be >correct that vanilla NTSC would produce pixels around 93% as wide as
    tall.

    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show >square pixels*.

    Can anyone give me a sense of the probability distribution here? How
    common was it to calibrate an Apple II's display to try to make the
    pixels square? Am I even right to think they wouldn't be square on a >television?

    * E.g. this one of Mouse Desk: >https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from >which I measured the aspect ratio of the desktop and compared to the
    aspect ratio when output at around the 93% number as shown above; the >photograph was roughly 8% wider.

    I think it was possible to use monitors with square pixels, and some people
    may have done so intentionally, since monitors/TVs of this time often had adjustments to stretch/squeeze the image horizontally and vertically. Some companies may have taken care to adjust their monitors in their photos to get square pixels. Note that your sample photo does not have equidistant borders--the horizontal visible region is compressed, and the vertical stretched, relatively, looking at the border regions (the side borders are larger than the top/bottom borders). It would be interesting to look at a photo of the //c LCD display (which cannot be adjusted) to see if that has square pixels. I believe it does not, and is very squished.

    But in general, I would not expect much software to rely on it since your average TV would not be set up to give you square pixels.

    It was a selling point of the Mac in 1984 that Apple guaranteed square
    pixels there (since the PC world has a wild and crazy place). Since your
    photo has a mouse, that means it is post 1984, so the taker of the photo may have tried to make the Apple IIe subtly look more like a Mac. That's very understandable from a marketing perspective.

    Kent

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cybernesto@21:1/5 to Thomas Harte on Sat Jun 26 15:49:41 2021
    Thomas Harte wrote:
    I am the author of an Apple II emulator; I recently received a bug report that its pixels aspect ratio is off — e.g. in text mode, pixels are not square.

    I checked the arithmetic on that and the emulator's workings seems to be correct that vanilla NTSC would produce pixels around 93% as wide as tall.

    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show square pixels*.

    Can anyone give me a sense of the probability distribution here? How
    common
    was it to calibrate an Apple II's display to try to make the pixels
    square?
    Am I even right to think they wouldn't be square on a television?

    * E.g. this one of Mouse Desk: https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from which I measured the aspect ratio of the desktop and compared to the
    aspect
    ratio when output at around the 93% number as shown above; the photograph
    was roughly 8% wider.


    Thomas Harte wrote:
    I am the author of an Apple II emulator; I recently received a bug report that its pixels aspect ratio is off — e.g. in text mode, pixels are not square.

    I checked the arithmetic on that and the emulator's workings seems to be correct that vanilla NTSC would produce pixels around 93% as wide as tall.

    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show square pixels*.

    Can anyone give me a sense of the probability distribution here? How
    common
    was it to calibrate an Apple II's display to try to make the pixels
    square?
    Am I even right to think they wouldn't be square on a television?

    * E.g. this one of Mouse Desk: https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from which I measured the aspect ratio of the desktop and compared to the
    aspect
    ratio when output at around the 93% number as shown above; the photograph
    was roughly 8% wider.


    I really doubt that you can get a definitive answer on this. I enjoy
    converting graphics to Apple II formats and I have tried to figure out some rule about this, but they all have some caveats.

    You would assume that someone with a 4:3 Monitor would like to use the whole screen real state to display full-screen graphics, so they would adjust the visible area to leave symmetric borders for both axis. In that case the
    aspect ratio in HiRes would be about 91,4%.

    The Apple IIe Card for the Mac LC uses this aspect ratio as well. For
    example, when installed on a Color Classic, the monitor would switch its
    native resolution of 512x384 to 560x384 to make room for the full resolution
    in 80 cols and DHGR. By doing so, it would stretch the pixels to exactly
    32:35.

    But this does not seem to be the common assumption. For example the Analog Clock from AE assumes an aspect ratio of 83%, see https://macgui.com/spyglass/r/0ed4df212b04180a/ANALOG.CLOCK?f=DmNtZWlpYAZqZmRvZg&fk=af3627ab31
    This looks vertically squashed on every system I tried, so I wonder if
    anyone ever adjusted their screen to see this as a circle.

    My PAL Apple //c using the color adapter and connected to a relatively
    modern PAL TV without position controls fixes the aspect ratio to ~1,114 and leaves an uncentered image with unsymmetrical borders.

    I don't think that the MouseDesk Screenshot is a good example. First, it is
    a modern mock-up. Second, Mouse Desk uses the Monochrome DHGR resolution of 560x192 which produces tall pixels, not square pixels.

    Anyway, I think that it might be a good idea if the emulator could allow to select the 1:1 pixel ratio as a non-default option.

    Just a side question... how do I swap disks on your emulator? I have not
    been able to use multi disk programs with it. Am I missing something?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael J. Mahon@21:1/5 to cybernesto on Mon Jul 5 11:08:33 2021
    cybernesto <cybernesto@macgui.com> wrote:
    Thomas Harte wrote:
    I am the author of an Apple II emulator; I recently received a bug report
    that its pixels aspect ratio is off — e.g. in text mode, pixels are not
    square.

    I checked the arithmetic on that and the emulator's workings seems to be
    correct that vanilla NTSC would produce pixels around 93% as wide as tall. >>
    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show
    square pixels*.

    Can anyone give me a sense of the probability distribution here? How
    common
    was it to calibrate an Apple II's display to try to make the pixels
    square?
    Am I even right to think they wouldn't be square on a television?

    * E.g. this one of Mouse Desk:
    https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from
    which I measured the aspect ratio of the desktop and compared to the
    aspect
    ratio when output at around the 93% number as shown above; the photograph
    was roughly 8% wider.


    Thomas Harte wrote:
    I am the author of an Apple II emulator; I recently received a bug report
    that its pixels aspect ratio is off — e.g. in text mode, pixels are not
    square.

    I checked the arithmetic on that and the emulator's workings seems to be
    correct that vanilla NTSC would produce pixels around 93% as wide as tall. >>
    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show
    square pixels*.

    Can anyone give me a sense of the probability distribution here? How
    common
    was it to calibrate an Apple II's display to try to make the pixels
    square?
    Am I even right to think they wouldn't be square on a television?

    * E.g. this one of Mouse Desk:
    https://www.oldcomputr.com/wp-content/uploads/2015/12/apple_iie.jpg from
    which I measured the aspect ratio of the desktop and compared to the
    aspect
    ratio when output at around the 93% number as shown above; the photograph
    was roughly 8% wider.


    I really doubt that you can get a definitive answer on this. I enjoy converting graphics to Apple II formats and I have tried to figure out some rule about this, but they all have some caveats.

    You would assume that someone with a 4:3 Monitor would like to use the whole screen real state to display full-screen graphics, so they would adjust the visible area to leave symmetric borders for both axis. In that case the aspect ratio in HiRes would be about 91,4%.

    The Apple IIe Card for the Mac LC uses this aspect ratio as well. For example, when installed on a Color Classic, the monitor would switch its native resolution of 512x384 to 560x384 to make room for the full resolution in 80 cols and DHGR. By doing so, it would stretch the pixels to exactly 32:35.

    But this does not seem to be the common assumption. For example the Analog Clock from AE assumes an aspect ratio of 83%, see https://macgui.com/spyglass/r/0ed4df212b04180a/ANALOG.CLOCK?f=DmNtZWlpYAZqZmRvZg&fk=af3627ab31
    This looks vertically squashed on every system I tried, so I wonder if
    anyone ever adjusted their screen to see this as a circle.

    My PAL Apple //c using the color adapter and connected to a relatively
    modern PAL TV without position controls fixes the aspect ratio to ~1,114 and leaves an uncentered image with unsymmetrical borders.

    I don't think that the MouseDesk Screenshot is a good example. First, it is
    a modern mock-up. Second, Mouse Desk uses the Monochrome DHGR resolution of 560x192 which produces tall pixels, not square pixels.

    Anyway, I think that it might be a good idea if the emulator could allow to select the 1:1 pixel ratio as a non-default option.

    My assumption regarding Apple II display geometry is that it was designed
    to be used with a TV monitor which was correctly adjusted for use as a TV.
    Nothing in the setup instructions referred to making width or height adjustments for use with the computer.

    But given that many TVs were improperly adjusted, not set up with a test pattern (remember those?), it’s safe to assume that in practice the pixel “shape” covered a wide range of possibilities.

    On my properly adjusted color TV, hires pixels were noticeably narrower
    than they were high, as might be expected when using only 2/3 of the raster width for 280 pixels, and about 4/5 of the raster height for 192 pixels.

    When I wrote hires programs that displayed circles, I always put in a multiplicative factor for the X coordinate to produce a reasonable replica
    of a circle. An X scale factor of about 1.06 produced pleasing “circularity”. ;-)

    If a hard copy was printed, the mapping to printer “pixels” required a different X scale factor, dependent, of course, on the printer used.

    Since the Apple II was never designed to have square pixels, it seems a bit silly to try to impose that after the fact. If you adjust your monitor to produce square Apple II pixels, all of your programs will display
    incorrectly on others’ machines and when printed.

    So just accept that Apple II graphics preceded the desire for square pixels
    and program in a scale factor to make things look the way you want on a
    monitor properly adjusted for TV.
    --
    -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael 'AppleWin Debugger Dev'@21:1/5 to Thomas Harte on Wed Jul 7 09:10:22 2021
    On Monday, June 7, 2021 at 8:20:18 AM UTC-7, Thomas Harte wrote:
    I am the author of an Apple II emulator; I recently received a bug report that its pixels aspect ratio is off — e.g. in text mode, pixels are not square.

    AppleWin developer here.

    I've never known any Apple 2's using a TVs or Apple monitors to have 1:1 aspect ratio (AR). The consensus is that a 4:3 AR is the de facto standard.

    Using pixels, 280/192 = 1.45... which "roughly" matches 4:3 = 1.333.

    If you draw a circle you will need to use scaling to have it display without it looking like an ellipse.

    We had a thread about this back in 2017 called: Emulator aspect ratios?
    * https://groups.google.com/g/comp.emulators.apple2/c/YUsAV1BX1Ks

    At the time I posted this information: (There was a bug in the original code, here is the fixed version)

    # Code

    HGR
    CALL-151
    c051 n c054
    2000:7f
    2027:7f
    3fd0:7f
    3ff7:7f
    c050 n c052

    # Measurements

    Apple Color Monitor
    ===================
    Width: 9.5"
    Height: 7"
    Diagonal: 12"

    Franklin Color Monitor
    ======================
    Width: 9" or 22.5 cm
    Height: 6.5" or 16.5 cm
    Diagonal: 11"
    Aspect Ratio (Width/height):

    # Calculations

    Apple:
    DPI Width: 560 dots/9.5 inches = 58.94 dpi
    DPI Height: 192 dots/7 inches = 27.42 dpi
    Aspect Ratio (Width/Height): 9.5 / 7 = 1.35

    Franklin:
    DPI Width: 560 dots/9 inches = 62 dpi
    DPI Height: 192 dots/6.5 inches = 29.58 dpi
    Aspect Ratio (Width/Height): 9 / 6.5 = 1.38

    Ergo, the aspect ratio is very close to 4/3 = 1.33.

    Hope this helps.

    m.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cybernesto@21:1/5 to All on Sun Mar 20 04:32:08 2022
    My assumption regarding Apple II display geometry is that it was designed
    to be used with a TV monitor which was correctly adjusted for use as a TV. Nothing in the setup instructions referred to making width or height adjustments for use with the computer.

    This is a very valid argument. But who could have thought that this exact topic was already covered in detail by Sather on his book?
    https://archive.org/details/understanding_the_apple_ii/page/n223/mode/1up

    I found it recently while taking a review of the many emulators that have been published recently. Epple-II refers to this topic among others to validate its pretty accurate video emulation.
    https://cmosher01.github.io/Epple-II/screenshots.html

    So actually the pixel aspect ratio of the analog clock program bundled with the Timemaster H.O. I referenced above was not way off. The Horizontal/Vertical aspect ratio in HiRes is indeed 84% when using NTSC. I have been adjusting my monitors wrong all
    this time.

    Sather's test program produces a perfect square in OpenEmulator, Epple-II and in Tom's Clock Signal.

    10 HGR : HCOLOR= 3: HPLOT 0,0 TO 0,159 TO (159 * 1.19 + .5),159 TO (159 * 1.19 +.5),0 TO 0,0

    I have not checked other emulators but it seems like the most popular, AppleWin on Windows and VirtualX on MacOS, do not emulate this pixel aspect ratio. I suppose that this has given the impression to most new users that square pixels are to be expected.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael 'AppleWin Debugger Dev'@21:1/5 to cybernesto on Mon Mar 21 09:51:02 2022
    On Sunday, March 20, 2022 at 4:32:09 AM UTC-7, cybernesto wrote:
    Sather's test program produces a perfect square in OpenEmulator, Epple-II and in Tom's Clock Signal.

    10 HGR : HCOLOR= 3: HPLOT 0,0 TO 0,159 TO (159 * 1.19 + .5),159 TO (159 * 1.19 +.5),0 TO 0,0

    I have not checked other emulators but it seems like the most popular, AppleWin on Windows and VirtualX on MacOS, do not emulate this pixel aspect ratio. I suppose that this has given the impression to most new users that square pixels are to be
    expected.

    We use integer scaling (1x, 2x, 4x) with vertical line doubling in AppleWin for simplicity (1:2 scaling), extra crispness, and historic low resolutions of monitors (sub 1080p). With 4K monitors and "retina displays" becoming prevalent we finally have
    sufficient DPI to simulate the dot pitch and grill mask of a CRT. Not everyone is a fan of blurry images though. i.e. "TV mode"

    That is not meant as an excuse for why we do things wrong but as the reason for why we don't do things right (yet).

    AppleWin's graphics have always been a "hack" -- over time we just use less of them. i.e. Back in 2006 I originally added half-pixel shift support via new video mode to a badly documented renderer that used a magic look up table. Sheldon's NTSC work was
    another leap forward. We still have work to do for Aspect Ratio as you note, along with producing accurate color TV blending, better color controls, etc.

    Michael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From scott@alfter.diespammersdie.us@21:1/5 to Thomas Harte on Mon Mar 21 18:31:51 2022
    Thomas Harte <thomas.harte@gmail.com> wrote:
    I am the author of an Apple II emulator; I recently received a bug report that its pixels aspect ratio is off — e.g. in text mode, pixels are not square.

    I checked the arithmetic on that and the emulator's workings seems to be correct that vanilla NTSC would produce pixels around 93% as wide as tall.

    But then I also took a look at photographic evidence of Apple IIs paired
    with appropriate monitors and indeed the few of those that are
    appropriately framed to be able to take measurements from appear to show square pixels*.

    On a properly-adjusted display, Apple II pixels (whether 40-column/Hi-Res or 80-column/double Hi-Res) will be non-square. It's trivial to adjust the vertical size on most CRT monitors to get whatever shape/size of pixels you want, but 40-column pixels that are slightly narrower than they are tall
    would be correct (I haven't done the math, but I'd guess that your 93%
    number is at least in the ballpark). 80-column pixels will be half the
    width of 40-column pixels.

    --
    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)