Page 1 of 1

ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 6:18 am
by MadDog

G'day!

Can someone explain to me like I'm 5 what pixel repetition support offers? What it is? What are the benefits?

I use filters and shadow masks like crazy to get "that retro look" on every Core. I have pretty much everything set to V-Integer to ensure the filters and shadow masks apply properly. On a few of the console Cores, I use the 5x scaling to get the proper filter/shadow mask application, while still filling the screen. Will pixel repetition allow me to have it set to 'normal' scaling to fill the screen on Cores that do not have the 5x scaling, while ensuring the filters and shadow masks apply properly?

Thanks!! :D


Re: ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 8:15 am
by grizzly

Have not played or read up about pixel rep on the mister yet.
But i´m pretty sure what native resolution your screen have is important.


Re: ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 9:07 am
by Malor

AFAIK, it's only really useful for one mode, to drive 2560x1440. But it's not really doing that. Instead, what it's doing is doubling the time for each horizontal pixel, so that you end up with a 1280x1440 screen, but the monitor sees a 2560x1440 signal.

If your monitor will accept the signal, 1920x1440 is a nonstandard 4:3 mode that will give you about the maximum possible detail. (IIRC, the absolute upper limit for the HDMI chip on the DE-10 is 2048x1536.) 1920x1440 is video_mode=12 in the ini file. You can set it per core if you want. On my system, I leave 1920x1080 set as default, and then set video_mode=12 for specific cores that I know are 4:3 and work well with it.

You do per-core settings by manually editing your ini file. You start a section by enclosing a core name in square brackets, followed by any settings for that core. For instance, I have this (plus more stuff) set near the bottom of my ini file:

Code: Select all

[Minimig]
video_mode=12
[MacPlus]
video_mode=12

That sets the video mode for those cores only. If you do it this way, you have to list it for every core. You can also set that in the main section as the default, and then set non-4:3 cores to something different. Either way works; do whatever seems easiest to you.


Re: ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 9:15 am
by mapf
MadDog wrote: Fri Dec 30, 2022 6:18 am

Can someone explain to me like I'm 5 what pixel repetition support offers? What it is? What are the benefits?

I do not know how to explain it to a 5-year-old, but I'll try to keep it simple.

HDMI transfers full images from the MiSTer to the display. The larger the resolution and the higher the refresh rate, the more bandwidth is needed on the HDMI connection to transfer all the pixels.

The HDMI chip used on the MiSTer was designed with full HD resolution (1920 x 1080 @ 60 Hz) in mind. I can be "overclocked" to run up to 2048 x 1536 @ 60 Hz, but this is the upper limit. Using WQHD (2.560 x 1.440) displays with their full native resolution is not possible with MiSTer.

"Pixel repetition" does exactly what the name implies. For a given resolution, only half of the horizontal pixels are used, but they have double the width. WQHD with pixel repetition only needs the bandwidth of 1280 x 1440, which is within the limits of the MiSTer hdmi chip.

Benefits: With pixel repetition, MiSTer can use a WQHD display with its native resolution. One would think that simply using a 4:3 resolution like 1920x1440 would be fine with MiSTer, as almost no core uses 16:9 resolutions, but with many displays, these modes with 4:3 aspect ratio are not supported or scaled improperly. But the 16:9 WQHD resolution often works fine and is scaled correctly.

Drawbacks: Pixels are now double width, and no longer square. This can have a negative impact on shadow masks, as these would expect the output pixels on the display to be square.


Re: ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 9:55 am
by FoxbatStargazer
mapf wrote: Fri Dec 30, 2022 9:15 am

Drawbacks: Pixels are now double width, and no longer square. This can have a negative impact on shadow masks, as these would expect the output pixels on the display to be square.

Shadow masks are the least of the issue here. Most cores to get a proper aspect ratio you can't use horizontal integer scaling, which means you need interpolation to avoid shimmer. Doubling pixel width means you have half the resolution for interpolation, meaning a blurrier image. At 1280 its 2/3rds the resolution vs 1920, and effectively even more if you are using 5x cut.

Its probably necessary but IMO unfortunate that the horizontal axis is what was doubled rather than vertical, when its the one that needs more resolution to handle non-integer scaling. This makes the use cases really niche. If you have a 4K TV that can't handle 4:3, you're almost always better off with 1080p for the higher horizontal resolution. Mode 14 is really for stuff like a 1440p monitor with a poor scaler that can't handle 4:3 for whatever reason.


Re: ELI5: Pixel Repetition

Posted: Fri Dec 30, 2022 9:58 am
by Malor

Neither mode 12 nor 14 will integer scale on a 4K TV, so even if you get a workable display, it might suck. It also might increase latency a bunch over a simple 1920x1080 signal.

On a native 1440p screen, however, mode 12 is just about ideal. 1440p screens are cheap, and you can easily find models with low input lag. If you're stuck with a 1440p screen that has a garbage input chip, then as FoxbatStargazer says, mode 14 might be a last-ditch fallback.

I'm using an LG GN850 (which has been replaced by a slightly newer model, I think GP850), and it's just about an ideal match for the MiSTer. It suffers from black crush, so it's not necessarily a great PC or video monitor, but most older videogames tend to be very bright. This model was on routine sale for about $300; I'm not sure what the price is for the replacement.

It would be perfect if the stand would let the screen rotate, but you'd have to add a VESA arm for that.