22

Are "tile pixels" the same size as "sprite pixels", and are they both square (ignoring the rule that multicolor sprites can only be colored in groups of two pixels)?

By "square" I mean that the pixels have a 1:1 aspect ratio.

If the answer depends on the display, then I am asking about the ubiquitous 1702 monitor.

EDIT: I am asking so that I can configure the graphics editor on my modern laptop for creating Commodore 64 artwork. In my case, I am using an NTSC system.

Ola Ström
  • 327
  • 1
  • 2
  • 9
Woodrow Barlow
  • 685
  • 6
  • 12
  • 4
    Using a 4:3 monitor the pixels (408x284 including the border) should have been nearly square. Please note that CRT monitors had a knob that allowed adjusting the aspect ratio of the image. The 1702 had this inside the case intended to be used by repair shops only. – Martin Rosenau Feb 20 '20 at 22:11
  • @MartinRosenau that's assuming 50Hz timings? – Tommy Feb 20 '20 at 22:30
  • 6
    Ugh. This is one of those questions where more context on what you hope to accomplish is needed to prevent the answer being rather complicated. For example, are you targeting PAL or NTSC C64? Are you exporting graphics created on a modern system (versus drawing graphics on a real C64)? Do you just want to know something really specific, like "How should I setup The Gimp for C64 artwork"? – Brian H Feb 20 '20 at 22:34
  • @BrianH i actually am trying to set up my sprite editor for c64 artwork. – Woodrow Barlow Feb 21 '20 at 15:10
  • I am wondering how the 'squareness' of pixels is defined in TV standards? For example, is there a pixel clock definition, such that pixels at that pixel clock must be square? Is there a requirement to tune vert. vs horiz. picture size (both easily adjustable at CRT TVs) in a specific way for the 'square' pixels to become actually square? – lvd Feb 22 '20 at 10:36
  • The answers might benefit from mentioning multicolour mode, where the pixels were twice as wide as normal but you could have 4 colours per character square. I remember this kind of thing being used a lot in games, which gave C64 graphics a very distinctive look. – N. Virgo Feb 22 '20 at 21:09
  • @lvd No, TV standards do not know about pixels. They haven't been invented. It's a continuous signal during each line. Adjustment was done using a test card signal. It usually contained a large circle, to be positioned in the middle and fully visible. Now height and upper borders were adjusted. Next width was adjusted until the circle was a circle. Measurement device: your fingers or a ruler. Finally brightness was adjusted according to the wedges. Which could be used to exact measure the signal quality – Raffzahn Feb 22 '20 at 22:44
  • @Raffzahn So was there a standard for that test card signal? If it was, we can immediately derive a definition for the pixel being "square" in terms of pixelclock and then immediately decide what aspect ratio was in every home computer of the era. Otherwise all the talk here is just more or less meaningless. – lvd Feb 24 '20 at 22:40
  • @lvd Nor sure if it has been mentioned before, but TV does not have pixels. A TV line is an analogue signal, not digital. A testcard is exactly that, a picture taken by a TV camera and transmitted. See the link provided. – Raffzahn Feb 24 '20 at 23:36
  • I was watching one of the retrocomputing YouTubers in the last couple of days and on the same monitor one machine had a slightly narrower display than another. I forget if they were both C64s with different mainboard revisions or if one was a C128 in C64 mode. It was a noticeable difference even before he mentioned it. – hippietrail Feb 07 '23 at 15:34

3 Answers3

27

The pixels are not exactly square, the actual aspect ratio depends on the TV system. For PAL-B, the pixel aspect ratio is 0.937:1, the pixels are a bit higher than they are wide. For NTSC, the ratio is 0.75:1. At this ratio it can be clearly seen that the cursor block is definitely higher than wide.C64 NTSC model rendered by VICE emulator

Peter B.
  • 4,447
  • 15
  • 36
22

In standard bitmap mode the C64 outputs 320 pixels in 40µs.

The visible portion of a line is ~52µs; in 60Hz regions ~240 lines are considered 'visible', but in PAL regions it's ~288 lines.

So if there were no borders, there'd be around 52/40*320 = 416 pixels across the visible portion of a line.

Given that each line is 4/3rds as wide as a hypothetical vertical scan, you can compute that 416 * 3/4 = 312, implying that so you would have square pixels in a hypothetical 312 line display.

A PAL screen has only 288 lines, so it's like taking that 312 line display and stretching out only 288 lines of it. Therefore the pixels will be very slightly taller than wide. Around 288/312 = ~92% as wide as tall.

An NTSC screen has only 240, so its pixels would be more like 240/312 = ~77% as wide as tall.

Heavy caveats apply: different screens are calibrated differently, to numbers usually near to those above but subject to being only as close as the engineer turning the dials could get.

A further nuance is that total line time may be 64µs or 65µs (depending on revision) in 60Hz world, but will be 63µs in 50Hz world. Your screen will have a PLL of some sort to bring itself into synchronisation with the horizontal sync period, but often that'll result in the line contents being slightly stretched or slightly compressed, further throwing off the arithmetic.

You therefore might as well say that PAL pixels are square, as 92% is within the margin of error given the effective approximations of all the other numbers. But NTSC pixels shouldn't be close.

Tommy
  • 36,843
  • 2
  • 124
  • 171
  • 7
    Yet another nuance is that some monitors have an easily-reachable vertical-height knob, and people in the US who play games written for PAL may very well adjust their monitors to show more of the overscan, shrinking the aspect ratio. – supercat Feb 21 '20 at 15:36
  • 1
    I'm wondering what was the calibration on 1702 or 8833 monitors -- did they have C64 pixels square? Was it easy to adjust picture height and width of those monitors? – lvd Feb 24 '20 at 22:43
4

As for the first part of your question, yes, for sprites as well as characters or bitmap images the same principle holds: either you can be in single colour/hi-res mode (320x200, 1 bit of foreground colour info per logical pixel) or multi colour mode (160x200, 2 bits of colour info per logical pixel).

In practice, for PAL, a single colour pixel that is rendered is very close (0.936:1) to being a square.

Retrograde
  • 4,506
  • 1
  • 17
  • 40