Integer Scaling in Retro Emulators: Pixel-Perfect 4:3 Output

Abstract illustration of a CRT screen showing an evenly scaled pixel grid in soft green phosphor, no game art, for an integer scaling tutorial.

Set up integer scaling emulator output so 240p pixels land evenly on 1080p and 1440p screens, with correct 4:3 aspect, scanlines, and a screenshot check.

A 240p game stretched to fill a 1080p screen without integer scaling gives some source pixels three display rows and others four. The result is shimmering edges and uneven sprite widths, especially on scrolling text and thin diagonal lines. Integer scaling fixes that by multiplying every pixel by a whole number, so one source pixel always becomes an exact square or rectangle of screen pixels. Getting there means thinking about aspect ratio, black borders, and the order in which shaders are applied. This guide walks through the math and the menu settings, then shows how a single screenshot proves the output is clean.

Why non-integer scaling makes pixels uneven

Most emulators default to fitting the image to the window, which means a free scale factor like 4.5 or 4.2 rather than a whole number. A rescale like that cannot give every source pixel the same number of screen pixels, so the filter rounds some up and others down. On a static title screen you may not notice, but pan a scrolling level in Sonic the Hedgehog 2 (1992) or Super Metroid (1994) and the uneven columns show up as crawling edges. Nearest-neighbor sampling keeps hard pixel edges, yet even it cannot fix an uneven ratio; the problem is the scale factor, not the filter.

Integer scaling removes the rounding entirely. Each source pixel maps to exactly N by N screen pixels, so a sprite that was eight pixels wide stays eight equal blocks wide. The cost is that the image rarely fills the screen, which is where borders come in.

4:3, PAR, and SAR without the jargon

Two ratios get confused. Storage aspect ratio, or SAR, is the raw pixel grid of the emulated frame, such as 256 by 224 on NES or 320 by 240 on many arcade boards. Pixel aspect ratio, or PAR, describes whether those pixels were meant to be square. The classic television target is a 4:3 display rectangle, and consoles achieved it by using non-square pixels: a 256 by 224 grid stretched to 4:3 means each pixel is slightly wider than it is tall. If you force square pixels, the picture looks too narrow; if you force a 16:9 stretch, everything looks too wide.

The practical setting is to let the core output its native grid, then apply the correct display aspect, usually 4:3, with integer scaling on top. Modern cores expose this as an aspect ratio option and a separate integer scale toggle. Keep both in mind, because setting the wrong aspect and then scaling perfectly still gives a distorted picture.

Integer multiples from 240p to 1080p and 1440p

Vertical resolution is the useful yardstick. A 240p source multiplies cleanly: 240 times 4 is 960, and 240 times 6 is 1440. On a 1080p screen, 4x is the largest whole multiple that fits, leaving 120 rows unused, split as 60-pixel borders top and bottom. On a 1440p screen, 6x fills the height exactly with no vertical border. A 224p source such as many SNES titles gives 224 times 4 equals 896, with wider borders still.

Source Display Integer scale Resulting height Vertical border
240p 1080p 4x 960 120 rows total
240p 1440p 6x 1440 none
224p 1080p 4x 896 184 rows total
240p 2160p (4K) 9x 2160 none

The borders are not wasted space; they are the price of even pixels. Some players prefer a 5x crop on 1080p and accept that part of the image is cut, but that throws away scanlines and can hide HUD elements. I keep the full frame and live with the letterbox.

Setting it up in your emulator, step by step

  1. Set the display or fullscreen resolution to your monitor’s native mode first, so the core knows the real target grid.
  2. Choose the correct core aspect ratio, usually 4:3 for 8-bit and 16-bit consoles, before touching scaling.
  3. Enable integer scaling, often listed as Integer Scale or Force Integer Scale in the video settings.
  4. Disable any aspect-stretch or fill-screen option that overrides the integer value.
  5. Turn off bilinear filtering for a crisp nearest-neighbor look, or leave it only if you deliberately want softness.
  6. Apply scanlines or a CRT shader after scaling, then reload the core so the shader chain rebuilds.
  7. Load a personal backup of a game you own, open a scrolling level with fine text, pause, and take a screenshot for the check below.

In RetroArch these controls sit under Video, Scaling, and Aspect Ratio, with shader options in a separate menu. Standalone emulators bury them under Display, Renderer, or Graphics. The labels differ, but the sequence is the same everywhere: native resolution, correct aspect, integer scale, then filters.

Scanlines, shaders, and the order of operations

Order matters. Integer scaling should happen on the clean emulated frame first, and scanline or CRT shaders should be applied afterward at the final output resolution. If a shader runs before scaling, its one-pixel dark lines get multiplied unevenly and turn into thick bands or moire patterns. A scanline shader designed for a 4x or 6x target looks best when it knows the final grid, so set the shader preset after you fix the scale, not before. The same logic applies to overlay bezels and masks: they belong at the end of the chain.

Borders, per-core settings, and where to look

Cores do not all share one global scale value, because their native grids differ. A PlayStation core running 320 by 240 and a Super Nintendo core running 256 by 224 both want 4x on 1080p but leave different borders, so a saved per-core or per-game config is the tidy approach. If a menu offers a per-directory override, use it for the few systems that need a different aspect. When something looks off, the fastest check is to toggle integer scaling off and back on and watch whether the shimmer on a scrolling grid disappears; if it does, the scale factor was the culprit.

How to verify with a screenshot

Take a lossless screenshot of a paused frame containing a straight horizontal line, a sprite edge, and small text. Open it at 100 percent zoom in an image viewer and count screen pixels across a single source pixel. With a correct 4x setup, one emulated pixel should occupy exactly four screen pixels with no blend between them. Check a vertical edge too, since a wrong aspect ratio shows up as non-square blocks. If the counts are consistent across the frame and the scanlines sit at regular intervals, the output is pixel-perfect.

Once I stopped chasing a full-screen image and accepted the black bars, the difference on a 1440p monitor was immediate: 6x 240p is exact, text stopped crawling, and the scanline shader finally looked even from top to bottom.

Related reading

If you want to keep digging into this corner of the library, these two posts on Roms Get go a little further:

Similar Posts