Aspect Ratio, VGA, and Scaling

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
cosmicr
Posts: 40
Joined: Tue Nov 14, 2023 4:29 am

General - CX16 Aspect Ratio, VGA, and Scaling

Post by cosmicr »

I know the native resolution is 640x480. Most will probably use an LCD with VGA input. When the VERA scales the screen for different resolutions, how does it do the scaling?

If I want say, 320x200 (Classic MS-DOS game res) it will stay 4:3 but scaled. That's what I want, but will the pixels look evenly scaled, or a bit janky/uneven? Is the scaling done digitally or analog?

As an example, if you scale an image using a paint program with those dimensions and nearest neighbour it doesn't look great. The emulators have bilinear filtering etc, but that's probably not an indication of how it will look on real hardware.

Can anyone offer any insight?
DragWx
Posts: 360
Joined: Tue Mar 07, 2023 9:07 pm

Re: Aspect Ratio, VGA, and Scaling

Post by DragWx »

The VERA performs the screen scaling by itself, but it uses nearest neighbor scaling, so resolutions which are not integer divisions of 640x480 will look wiggly and uneven.

The pixel aspect ratio of the VERA is 1:1 (square) in VGA mode, and 54:55 in NTSC mode (close enough to square that you shouldn't need to worry about the difference). In other words, images that rely on a non-square-pixel screen resolution are not going to work well on the VERA.
BruceRMcF
Posts: 224
Joined: Sat Jan 07, 2023 10:33 pm

Re: Aspect Ratio, VGA, and Scaling

Post by BruceRMcF »

cosmicr wrote: Mon Jan 29, 2024 12:52 am I know the native resolution is 640x480. Most will probably use an LCD with VGA input. When the VERA scales the screen for different resolutions, how does it do the scaling?

If I want say, 320x200 (Classic MS-DOS game res) it will stay 4:3 but scaled. That's what I want, but will the pixels look evenly scaled, or a bit janky/uneven? Is the scaling done digitally or analog?

As an example, if you scale an image using a paint program with those dimensions and nearest neighbour it doesn't look great. The emulators have bilinear filtering etc, but that's probably not an indication of how it will look on real hardware.

Can anyone offer any insight?
A 320x200 active area on a 320x240 display would not have the scaling artifacts, since it would be integral 2x doubling of the pixels, though if assets are designed for 1.6 pixel aspect ratio, they would look squashed.
cosmicr
Posts: 40
Joined: Tue Nov 14, 2023 4:29 am

Re: Aspect Ratio, VGA, and Scaling

Post by cosmicr »

I talking about scaling the display to 320x200 though, not 320x240. So the HSCALE is 64 and the VSCALE is (approx.) 54.
DragWx wrote: Mon Jan 29, 2024 2:08 am The VERA performs the screen scaling by itself, but it uses nearest neighbor scaling, so resolutions which are not integer divisions of 640x480 will look wiggly and uneven.
Yeah that's how it looks on the emulator. hmmm... Thanks for the reply.
kelli217
Posts: 541
Joined: Sun Jul 05, 2020 11:27 pm

Re: Aspect Ratio, VGA, and Scaling

Post by kelli217 »

Have you considered letterboxing? Set VSTART and VSTOP to give a 20-pixel bar at the top and the bottom.
cosmicr
Posts: 40
Joined: Tue Nov 14, 2023 4:29 am

Re: Aspect Ratio, VGA, and Scaling

Post by cosmicr »

kelli217 wrote: Tue Jan 30, 2024 2:51 am Have you considered letterboxing? Set VSTART and VSTOP to give a 20-pixel bar at the top and the bottom.
Yeah definitely, but it ruins the aspect ratio then, making everything squished. Best option is to program for both and let the user choose I reckon :)
Post Reply