Weird resolutions generated - Printable Version

+- MME4CRT Forum (
+-- Forum: MME4CRT (
+--- Forum: Issues (
+--- Thread: Weird resolutions generated (/showthread.php?tid=48)

Weird resolutions generated - kamicane - 03-12-2019


I was just setting up an ubuntu retroarch machine for a crt monitor. I tried with retroarch mainline first, but the modelines generated by crt switchres were off-center.

I tried mme4linux and the issue, while slightly different, still persists.

For example, the modeline generated for genesis (genesis-plus-gx) is as follows (xrandr output):

CRT7_320x224_59.92 (0x4db)  6.131MHz -HSync -VSync
  h: width   320 start  330 end  357 total  392 skew    0 clock  15.64KHz
  v: height  224 start  234 end  237 total  261

The modeline I was using previously using under windows for crtemudriver is this:

Modeline "320x224 NTSC (60Hz)" 6.700 320 336 367 426 224 236 239 262 -hsync -vsync


MANUAL_320x224 (0x4dc)  6.700MHz -HSync -VSync *current
  h: width   320 start  336 end  367 total  426 skew    0 clock  15.73KHz
  v: height  224 start  236 end  239 total  262           clock  60.03Hz

I got this modeline from These are usually very good, and produce a centered image on a monitor that was calibrated using consoles outputting 240p.

The visual issue is that the image is slightly wider than it should be, and the left is extremely cut off. I took a couple of pictures:

MME4crt modeline

manual modeline

Checking with the underscan option of my bvm, I can see that the image starts right at the left edge of the screen, rather than being centered.

I tested with a couple of fba games, nestopia, and snes9x, and they all present the same issue. I tried playing with the X Centering option without much success (setting it to 4 kinda freaked out the bvm).

I am using ubuntu server with nodm + openbox, compiled mme4crt by hand, gl driver.

Let me know if I can provide any more information.

RE: Weird resolutions generated - alphanu - 03-12-2019


The only issue with the website that you have mentioned is that all the mode lines are set to either 50 or 60hz. This is not how the real hardware is, the refresh rates of real hardware range between 48 - 62hz eg. genesis is 59.94hz NTSC and 49.74hz PAL.

These modelines have been made around how real hardware would have looked on your TV . It has under gone many changes over time to get as close as possible to the real thing.

Every TV deals with these modlines slightly differently, It would be hard to cater for every situation without having a long and possibly complicated setup process setup.

All this being said I am working on a better xcentring method which should help cater for many more TVs and allow for a much higher amount of change before issues start to show.

RE: Weird resolutions generated - kamicane - 03-12-2019

Thanks for the reply!

(03-12-2019, 02:41 PM)alphanu Wrote: The only issue with the website that you have mentioned is that all the mode lines are set to either 50 or 60hz.

I believe that's just the name of the modeline. The actual refresh does vary by console. The NES modeline for example, when using the modeline calculator (or xrandr), reports a refresh of 60.11hz.

The retroarch generated modelines seem odd to me because the picture starts right at the left of the screen (maybe 1 or 2 pixels are even cut off), and it's almost impossible to correct using the monitor settings. CRT emudriver 2 also autogenerates (with the generic_15 preset) modelines that are very close to the ones in the document.

EDIT: a picture of the bvm underscan mode that shows where the picture begins

Unfortunately I do not have NTSC consoles on hand, but I can try and compare with a PAL mega drive, since genesis-plus-gx res switching for PAL seems to work (save for 480i).

RE: Weird resolutions generated - kamicane - 03-13-2019

I took a few pictures to further illustrate the issue.


Super Mario Bros 3 NES PAL:

PAL NES with composite oputput
MME4crt  - mesen_libretro - switchres off and custom modeline: "CRT_256x240_NES_PAL" 5.320 256 269 294 341 240 270 273 312 -hsync -vsync
MME4crt  - mesen_libretro - switchres on

The custom modeline was taken from The "TV / Arcade Modes" page.

Castlevania Symphony of the Night (USA NTSC)

PS2 with component output through popstarter
MME4crt  - pcsx_rearmed - switchres off and custom modeline: "CRT_256x240_SWITCHRES64" 5.512320 256 272 304 352 240 242 245 261 -hsync -vsync
MME4crt  - pcsx_rearmed - switchres on

The custom modeline in this case was generated with SwitchResLinux version 1.52 from calamity The command used to generate it was: ./switchres64 --calc 256 240 60 --monitor generic_15

Pictures were taken with a tripod, and the monitor was set at max brightness to clearly show black areas.

As you can see, retroarch generates modes that are significantly shifted to the left compared to real console outputs. The "TV / Arcade Modes" page does not seem to be an exact representation of what the real console output is, but it's significantly closer in terms of sizing. The SwitchRes utility from calamity seems to do a better job at creating a generic modeline that has similar sizing / positioning to real 240p output.

All the images can be found in this album.

RE: Weird resolutions generated - retrorepair - 03-13-2019

First of all, popstarter is an emulator itself so I'm not inclined to trust it's output as any kind of representation of a real ps1.

Also, composite video is always going to be in a different position to RGB (shifted right) as it has extra information in the hblank period that RGB doesn't.

That said, the output we have at the moment is a safe "one size fits all" as we cannot make a special case for every system because right now, we can't differentiate between the cores so only individual resolutions can be calculated and not all consoles/systems had the same h/vblank timings per resolution.

In honesty your NES resolution looks quite wide there, I do wonder what crop settings you have enabled/disabled in the core AND retroarch as these make a big difference. I will post my comparison of genesis plus gx to a real megadrive later as well as mame for neo geo cd but I can tell you now, they are quite close by my eye.

As Alphanu said, we can't account for everyone's TVs, they are all different and calibrated differently. What you may consider "calibrated" may in fact be quite wrong, especially if you have done so using popstation or a composite video source. It depends what you will be using the monitor for, if it's rgb then calibrate to that. TVs in my opinion should never be adjusted. If you have picture issues, it's either a poor set or has an electrical fault. Usually capacitors.

I will at some point make a sticky with retroarch and core options that should be set for accurate output.

RE: Weird resolutions generated - kamicane - 03-13-2019

I understand completely. The issue might very well be on my side then, but in that case it must be a combination of retroarch settings with crt_switch_resolution = "1", since this is the only setting I changed during my tests with custom modelines.

During the last couple of years, I have connected / tested multiple things on this BVM:

Xbox > RGB (480i)
Wii > component (240p wiiware / genesis plus gx and 480i native wii games) and RGB.
Ps2 > component (popstarter and native ps2 games)
NES PAL > Composite
Atari 2600 PAL and NTSC > RGB / SVIDEO modded and composite
zx spectrum 48k > composite
Windows with crtemudriver 2 and modelines completely generated by VMMaker with the generic_15 preset

They all have slight differences in size and position, and I understand that this is normal. However, they are all pretty much centered, and the settings on my BVM have been adjusted to be a good middle ground.

The only thing that is off center / overscanned is retroarch with crt_switch_resolution = "1" under linux.

These are the only video settings that I have explicitly set:

crt_switch_resolution = "1"
crt_switch_resolution_super = "0"
video_monitor_index = "2"
video_scale_integer = "false"
video_shader_enable = "false"
video_crop_overscan = "false"
video_smooth = "false"
video_fullscreen = "true"
video_windowed_fullscreen = "false"

RE: Weird resolutions generated - retrorepair - 03-15-2019

See this thread for an example of Megadrive vs Genesis Plus GX.

Try it yourself if you can, this is using FULL boarders in core options as this gives the closest output I believe.

I now have an NTSC NES here (Twin Famicom actually) that I can also test to compare to Mesen.