Achieving correct resolution for microcomputer cores on CRT TVs

Hello,

I’m using RetroArch on a PC using crtemudriver and custom resolutions (super/normal). I have observed that the displayed image (regarding microcomputers) doesn’t always match the original hardware. My setup is fairly standard, having followed the most popular guides and using provided modelines, plus a slew of experimental ones.

The standout example here is ZX Spectrum, which in RA seems to be displayed in 320x240, while the machines’s original resolution is 256x192 (it’s for the active area, adjusting for borders it should be probably somewhere ~344x284).

This is the machine I spent most time analyzing. A brief look at C64/Amiga shows they’re mostly accurate. Amstrad CPC seems slightly bigger horizontally. I’m not sure about Atari 8 bit as a I struggle with getting some games going atm, and have yet to check MSX properly.

Here’s a gallery with some comparison photos (“pc” means -crtemudriver PC, “mister” is MiSTer FPGA and “zx+2” the original ZX Spectrum +2. There are also a couple of CPC/C64 shots from PC vs MiSTer, which is pretty much 1:1 with OG hardware.)

So, I was wondering if anybody has looked into this and could advise on how to get at least ZX Spectrum right (there’s a similar thread here, but the author seems to end up interested in interlaced resolutions, not 240p). I have read about and experimented with this quite a lot over the years, but must admit that my brain just can’t comprehend the multum of variables involved here and would really appreciate some outside help.

Assuming you’re using the FUSE core (Final Burn and MAME also have some Spectrum support), then the situation with the core is just that it displays less borders - the active area is still 256x192. It doesn’t do any aspect correction (pixel aspect 1:1) by default, so maybe this is also affecting crtemudriver/switchres.

Situation is about the same with Atari8bit or MSX specific cores, the last time I used them. Aspect ratio fixing is possible if you do it manually. Or in other words, if you’re using switchres, you need to disable it.

1 Like

Thank you for the reply. I have some more questions…

-doesn’t less borders mean that the image has to be stretched? If so, how is the active area still 256x192?

Also, I measured the active areas of images with a ruler in windows (and live on screen before) and thought that even if numbers are expressed in different units, the ratio should still be the same. So, 256/192=1.333, but the real ZX Spectrum measures 1195 / 786 = 1.520. The Retroarch/Fuse image @320x240 measures 1260 / 908 = 1.308 - which is actually closer to 1.33?

Sorry if all that sounds stupid, but like I said my understanding of this subject (and maths in general) is extremely poor…somehow my brain usually just breaks when trying to process display-related things :wink:

-regarding aspect ratio, my setting is for Core Provided. Everything else breaks the display (either too narrow or too blown up), even with switchres off. How would I fix this manually? Do you mean using custom_viewport_height and the like in the config?

So overall, I’d like RA to display near-identical image to the one real Spectrum does (even though it seems to be displayed without scaling artifacts atm).

  • You have the core borders in colour depending on the content and the additional always black border of the 50 Hz resolution/modeline. So basically you’re running 240 core lines in a 288p resolution frame. On TVs, the actual visible lines will typically be lower though. With 50 Hz, you probably see about ~264 lines. If you’re running the Fuse core with a 60 Hz modeline, this is different ofc.

  • If you set scaling to “custom” you can stretch freely. With integer scaling, it should go in core resolution steps. I.e. for Spectrum it will stretch in 320px horizontal steps and 240 vertical. If you turn integer scaling off, you scale freely. So with that, you fine tune the aspect. With wide custom resolutions, this tends to smooth out any artifacts. However, if you’re not satisfied with this, you need to adjust the horizontal pixel part of the modeline.

Modeline “1920x240_60 15,7kHz” 39.980 1920 2096 2296 2544 240 243 246 262 -hsync -vsync

So this is a wide custom resolution 60 Hz resolution. 1920 is the number of active pixels. 2544 is the number of total pixels. If you lower this number, the image should expand, increasing it will decrease the width.

Might also be fixable while using switchres, but I haven’t keep track with it.